meep-openmpi-1.1.1/0000755000175200017520000000000011244567006013344 5ustar debiandebianmeep-openmpi-1.1.1/Makefile.in0000644000175200017520000006433311243546263015423 0ustar debiandebian# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/meep-pkgconfig.in $(top_srcdir)/configure AUTHORS \ COPYING ChangeLog INSTALL NEWS TODO config.guess config.sub \ depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = meep-pkgconfig CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = src libctl tests examples DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @WITH_LIBCTL_FALSE@LIBCTL = @WITH_LIBCTL_TRUE@LIBCTL = libctl ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src $(LIBCTL) tests examples EXTRA_DIST = COPYRIGHT m4 meep-pkgconfig.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = meep@MEEP_SUFFIX@.pc DISTCLEANFILES = meep@MEEP_SUFFIX@.pc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 meep-pkgconfig: $(top_builddir)/config.status $(srcdir)/meep-pkgconfig.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ *"$(VERSION)"*) : ;; \ *) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-pkgconfigDATA meep@MEEP_SUFFIX@.pc: meep-pkgconfig cp -f $(top_builddir)/meep-pkgconfig $@ libmeep: cd src && $(MAKE) # Somewhat hackish. The "right" way to do this is by a dist-hook target, # but then darcs check will fail because it doesn't run in the darcs # repository. darcs-dist: distdir darcs changes --summary > $(distdir)/ChangeLog tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-openmpi-1.1.1/config.h.in0000644000175200017520000001270411243546272015374 0ustar debiandebian/* config.h.in. Generated from configure.ac by autoheader. */ /* define to enable debugging code */ #undef DEBUG /* Define to dummy `main' function (if any) required to link to the Fortran libraries. */ #undef F77_DUMMY_MAIN /* Define to a macro mangling the given C identifier (in lower and upper case), which must not contain underscores, for linking with Fortran. */ #undef F77_FUNC /* As F77_FUNC, but for C identifiers containing underscores. */ #undef F77_FUNC_ /* Define if F77 and FC dummy `main' functions are identical. */ #undef FC_DUMMY_MAIN_EQ_F77 /* Define if you have a BLAS library. */ #undef HAVE_BLAS /* Define to 1 if you have the `BSDgettimeofday' function. */ #undef HAVE_BSDGETTIMEOFDAY /* Define to 1 if you have the `cblas_daxpy' function. */ #undef HAVE_CBLAS_DAXPY /* Define to 1 if you have the `cblas_ddot' function. */ #undef HAVE_CBLAS_DDOT /* Define if fenv.h declares this. */ #undef HAVE_DECL_FEENABLEEXCEPT /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `feenableexcept' function. */ #undef HAVE_FEENABLEEXCEPT /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `H5Pset_fapl_mpio' function. */ #undef HAVE_H5PSET_FAPL_MPIO /* Define to 1 if you have the `H5Pset_mpi' function. */ #undef HAVE_H5PSET_MPI /* Define if you have libharminv */ #undef HAVE_HARMINV /* Define if we have & link HDF5 */ #undef HAVE_HDF5 /* Define to 1 if you have the header file. */ #undef HAVE_HDF5_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if you have LAPACK library. */ #undef HAVE_LAPACK /* Define to 1 if you have the `ctl' library (-lctl). */ #undef HAVE_LIBCTL /* Define to 1 if you have the `dfftw' library (-ldfftw). */ #undef HAVE_LIBDFFTW /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the `fftw' library (-lfftw). */ #undef HAVE_LIBFFTW /* Define to 1 if you have the `fftw3' library (-lfftw3). */ #undef HAVE_LIBFFTW3 /* Define to 1 if you have the `gen' library (-lgen). */ #undef HAVE_LIBGEN /* Define to 1 if you have the `gsl' library (-lgsl). */ #undef HAVE_LIBGSL /* Define to 1 if you have the `gslcblas' library (-lgslcblas). */ #undef HAVE_LIBGSLCBLAS /* Define to 1 if you have the `guile' library (-lguile). */ #undef HAVE_LIBGUILE /* Define to 1 if you have the `guile-ltdl' library (-lguile-ltdl). */ #undef HAVE_LIBGUILE_LTDL /* Define to 1 if you have the `ltdl' library (-lltdl). */ #undef HAVE_LIBLTDL /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `readline' library (-lreadline). */ #undef HAVE_LIBREADLINE /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define if you have libmpb */ #undef HAVE_MPB /* Define if you have the MPI library. */ #undef HAVE_MPI /* Define to 1 if you have the `scm_make_smob_type' function. */ #undef HAVE_SCM_MAKE_SMOB_TYPE /* define if we have SCM_NEWSMOB */ #undef HAVE_SCM_NEWSMOB /* define if we have SCM_SMOB_DATA */ #undef HAVE_SCM_SMOB_DATA /* define if we have SCM_SMOB_PREDICATE */ #undef HAVE_SCM_SMOB_PREDICATE /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to catch and ignore SIGFPE signals */ #undef IGNORE_SIGFPE /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define if mpi.h needs SEEK macros to be undefined */ #undef NEED_UNDEF_SEEK_FOR_MPI /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* define to nothing if C99 _Pragma is not supported */ #undef _Pragma /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif meep-openmpi-1.1.1/examples/0000755000175200017520000000000011244567007015163 5ustar debiandebianmeep-openmpi-1.1.1/examples/Makefile.in0000644000175200017520000002522311243546263017234 0ustar debiandebian# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = 3rd-harm-1d.ctl bend-flux.ctl holey-wvg-bands.ctl \ holey-wvg-cavity.ctl ring.ctl ring-cyl.ctl material-dispersion.ctl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-openmpi-1.1.1/examples/ring.ctl0000644000175200017520000000353311243157461016630 0ustar debiandebian; Calculating 2d ring-resonator modes, from the Meep tutorial. (define-param n 3.4) ; index of waveguide (define-param w 1) ; width of waveguide (define-param r 1) ; inner radius of ring (define-param pad 4) ; padding between waveguide and edge of PML (define-param dpml 2) ; thickness of PML (define sxy (* 2 (+ r w pad dpml))) ; cell size (set! geometry-lattice (make lattice (size sxy sxy no-size))) ; Create a ring waveguide by two overlapping cylinders - later objects ; take precedence over earlier objects, so we put the outer cylinder first. ; and the inner (air) cylinder second. (set! geometry (list (make cylinder (center 0 0) (height infinity) (radius (+ r w)) (material (make dielectric (index n)))) (make cylinder (center 0 0) (height infinity) (radius r) (material air)))) (set! pml-layers (list (make pml (thickness dpml)))) (set-param! resolution 10) ; If we don't want to excite a specific mode symmetry, we can just ; put a single point source at some arbitrary place, pointing in some ; arbitrary direction. We will only look for TM modes (E out of the plane). (define-param fcen 0.15) ; pulse center frequency (define-param df 0.1) ; pulse width (in frequency) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center (+ r 0.1) 0)))) ; exploit the mirror symmetry in structure+source: (set! symmetries (list (make mirror-sym (direction Y)))) (run-sources+ 300 (at-beginning output-epsilon) (after-sources (harminv Ez (vector3 (+ r 0.1)) fcen df))) ; Output fields for one period at the end. (If we output ; at a single time, we might accidentally catch the Ez field when it is ; almost zero and get a distorted view.) (run-until (/ 1 fcen) (at-every (/ 1 fcen 20) output-efield-z)) meep-openmpi-1.1.1/examples/3rd-harm-1d.ctl0000644000175200017520000000375011173421136017604 0ustar debiandebian; 1d simulation of a plane wave propagating through a Kerr medium ; and generating the third-harmonic frequency component. (define-param sz 100) ; size of cell in z direction (define-param fcen (/ 1 3)) ; center frequency of source (define-param df (/ fcen 20)) ; frequency width of source (define-param amp 1.0) ; amplitude of source (define-param k 1e-2) ; Kerr susceptibility (define-param dpml 1.0) ; PML layer thickness ; We'll use an explicitly 1d simulation. Setting dimensions=1 will actually ; result in faster execution than just using two no-size dimensions. However, ; in this case Meep requires us to use E in the x direction (and H in y), ; and our one no-size dimension must be z. (set-param! dimensions 1) (set! geometry-lattice (make lattice (size no-size no-size sz))) ; to put the same material in all space, we can just set the default material (set! default-material (make dielectric (index 1) (chi3 k))) (set! pml-layers (list (make pml (thickness dpml)))) (set-param! resolution 20) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ex) (center 0 0 (+ (* -0.5 sz) dpml)) (amplitude amp)))) ; frequency range for flux calculation (define-param nfreq 400) (define-param fmin (/ fcen 2)) (define-param fmax (* fcen 4)) (define trans ; transmitted flux (add-flux (* 0.5 (+ fmin fmax)) (- fmax fmin) nfreq (make flux-region (center 0 0 (- (* 0.5 sz) dpml 0.5))))) ; also compute a ''single'' flux point at fcen and 3*fcen (define trans1 (add-flux fcen 0 1 (make flux-region (center 0 0 (- (* 0.5 sz) dpml 0.5))))) (define trans3 (add-flux (* 3 fcen) 0 1 (make flux-region (center 0 0 (- (* 0.5 sz) dpml 0.5))))) (run-sources+ (stop-when-fields-decayed 50 Ex (vector3 0 0 (- (* 0.5 sz) dpml 0.5)) 1e-6)) (display-fluxes trans) (print "harmonics:, " k ", " amp ", " (first (get-fluxes trans1)) ", " (first (get-fluxes trans3)) "\n") meep-openmpi-1.1.1/examples/material-dispersion.ctl0000644000175200017520000000301511175712467021646 0ustar debiandebian; Material dispersion example, from the Meep tutorial. Here, we simply ; simulate homogenous space filled with a dispersive material, and compute ; its modes as a function of wavevector k. Since omega/c = k/n, we can ; extract the dielectric function epsilon(omega) = (ck/omega)^2. (set! geometry-lattice (make lattice (size no-size no-size no-size))) (set-param! resolution 20) ; We'll use a dispersive material with two polarization terms, just for ; illustration. The first one is a strong resonance at omega=1.1, ; which leads to a polaritonic gap in the dispersion relation. The second ; one is a weak resonance at omega=0.5, whose main effect is to add a ; small absorption loss around that frequency. (set! default-material (make dielectric (epsilon 2.25) (polarizations (make polarizability (omega 1.1) (gamma 1e-5) (sigma 0.5)) (make polarizability (omega 0.5) (gamma 0.1) (sigma 2e-5)) ))) (define-param fcen 1.0) (define-param df 2.0) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center 0 0 0)))) (define-param kmin 0.3) (define-param kmax 2.2) (define-param k-interp 99) (define kpts (interpolate k-interp (list (vector3 kmin) (vector3 kmax)))) (define all-freqs (run-k-points 200 kpts)) ; a list of lists of frequencies (map (lambda (kx fs) (map (lambda (f) (print "eps:, " (real-part f) ", " (imag-part f) ", " (sqr (/ kx f)) "\n")) fs)) (map vector3-x kpts) all-freqs) meep-openmpi-1.1.1/examples/ring-cyl.ctl0000644000175200017520000000373211173421136017411 0ustar debiandebian; Calculating 2d ring-resonator modes using cylindrical coordinates, ; from the Meep tutorial. (define-param n 3.4) ; index of waveguide (define-param w 1) ; width of waveguide (define-param r 1) ; inner radius of ring (define-param pad 4) ; padding between waveguide and edge of PML (define-param dpml 2) ; thickness of PML (define sr (+ r w pad dpml)) ; radial size (cell is from 0 to sr) (set! dimensions CYLINDRICAL) (set! geometry-lattice (make lattice (size sr no-size no-size))) ; in cylindrical coordinates, the phi (angular) dependence of the fields ; is given by exp(i m phi), where m is given by: (set-param! m 3) (set! geometry (list (make block (center (+ r (/ w 2))) (size w infinity infinity) (material (make dielectric (index n)))))) (set! pml-layers (list (make pml (thickness dpml)))) (set-param! resolution 10) ; If we don't want to excite a specific mode symmetry, we can just ; put a single point source at some arbitrary place, pointing in some ; arbitrary direction. We will only look for TM modes (E out of the plane). (define-param fcen 0.15) ; pulse center frequency (define-param df 0.1) ; pulse width (in frequency) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center (+ r 0.1) 0)))) ; note that the r -> -r mirror symmetry is exploited automatically (run-sources+ 200 (after-sources (harminv Ez (vector3 (+ r 0.1)) fcen df))) ; Output fields for one period at the end. (If we output ; at a single time, we might accidentally catch the Ez field when it is ; almost zero and get a distorted view.) We'll append the fields ; to a file to get an r-by-t picture. We'll also output from -sr to -sr ; instead of from 0 to sr. (run-until (/ 1 fcen) (in-volume (volume (center 0) (size (* 2 sr))) (at-beginning output-epsilon) (to-appended "ez" (at-every (/ 1 fcen 20) output-efield-z)))) meep-openmpi-1.1.1/examples/Makefile.am0000644000175200017520000000020411173421136017204 0ustar debiandebianEXTRA_DIST = 3rd-harm-1d.ctl bend-flux.ctl holey-wvg-bands.ctl \ holey-wvg-cavity.ctl ring.ctl ring-cyl.ctl material-dispersion.ctl meep-openmpi-1.1.1/examples/holey-wvg-bands.ctl0000644000175200017520000000370111173421136020667 0ustar debiandebian; Meep Tutorial: TE transmission and reflection through a cavity ; formed by a periodic sequence of holes in a dielectric waveguide, ; with a defect formed by a larger spacing between one pair of holes. ; This structure is based on one analyzed in: ; S. Fan, J. N. Winn, A. Devenyi, J. C. Chen, R. D. Meade, and ; J. D. Joannopoulos, "Guided and defect modes in periodic dielectric ; waveguides," J. Opt. Soc. Am. B, 12 (7), 1267-1272 (1995). ; Some parameters to describe the geometry: (define-param eps 13) ; dielectric constant of waveguide (define-param w 1.2) ; width of waveguide (define-param r 0.36) ; radius of holes ; The cell dimensions (define-param sy 12) ; size of cell in y direction (perpendicular to wvg.) (define-param dpml 1) ; PML thickness (y direction only!) (set! geometry-lattice (make lattice (size 1 sy no-size))) (set! geometry (list (make block (center 0 0) (size infinity w infinity) (material (make dielectric (epsilon eps)))) (make cylinder (center 0 0) (radius r) (height infinity) (material air)))) (set! pml-layers (list (make pml (direction Y) (thickness dpml)))) (set-param! resolution 20) (define-param fcen 0.25) ; pulse center frequency (define-param df 1.5) ; pulse freq. width: large df = short impulse (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Hz) (center 0.1234 0)))) (set! symmetries (list (make mirror-sym (direction Y) (phase -1)))) (define-param kx false) ; if true, do run at specified kx and get fields (define-param k-interp 19) ; # k-points to interpolate, otherwise (if kx (begin (set! k-point (vector3 kx)) (run-sources+ 300 (at-beginning output-epsilon) (after-sources (harminv Hz (vector3 0.1234 0) fcen df))) (run-until (/ 1 fcen) (at-every (/ 1 fcen 20) output-hfield-z))) (run-k-points 300 (interpolate k-interp (list (vector3 0) (vector3 0.5))))) meep-openmpi-1.1.1/examples/holey-wvg-cavity.ctl0000644000175200017520000000633311173421136021103 0ustar debiandebian; Meep Tutorial: TE transmission and reflection through a cavity ; formed by a periodic sequence of holes in a dielectric waveguide, ; with a defect formed by a larger spacing between one pair of holes. ; This structure is based on one analyzed in: ; S. Fan, J. N. Winn, A. Devenyi, J. C. Chen, R. D. Meade, and ; J. D. Joannopoulos, "Guided and defect modes in periodic dielectric ; waveguides," J. Opt. Soc. Am. B, 12 (7), 1267-1272 (1995). ; Some parameters to describe the geometry: (define-param eps 13) ; dielectric constant of waveguide (define-param w 1.2) ; width of waveguide (define-param r 0.36) ; radius of holes (define-param d 1.4) ; defect spacing (ordinary spacing = 1) (define-param N 3) ; number of holes on either side of defect ; The cell dimensions (define-param sy 6) ; size of cell in y direction (perpendicular to wvg.) (define-param pad 2) ; padding between last hole and PML edge (define-param dpml 1) ; PML thickness (define sx (+ (* 2 (+ pad dpml N)) d -1)) ; size of cell in x direction (set! geometry-lattice (make lattice (size sx sy no-size))) (set! geometry (append ; combine lists of objects: (list (make block (center 0 0) (size infinity w infinity) (material (make dielectric (epsilon eps))))) (geometric-object-duplicates (vector3 1 0) 0 (- N 1) (make cylinder (center (/ d 2) 0) (radius r) (height infinity) (material air))) (geometric-object-duplicates (vector3 -1 0) 0 (- N 1) (make cylinder (center (/ d -2) 0) (radius r) (height infinity) (material air))))) (set! pml-layers (list (make pml (thickness dpml)))) (set-param! resolution 20) (define-param fcen 0.25) ; pulse center frequency (define-param df 0.2) ; pulse width (in frequency) (define-param nfreq 500) ; number of frequencies at which to compute flux ; false = transmission spectrum, true = resonant modes: (define-param compute-mode? false) (if compute-mode? (begin (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Hz) (center 0 0)))) (set! symmetries (list (make mirror-sym (direction Y) (phase -1)) (make mirror-sym (direction X) (phase -1)))) (run-sources+ 400 (at-beginning output-epsilon) (after-sources (harminv Hz (vector3 0) fcen df))) (run-until (/ 1 fcen) (at-every (/ 1 fcen 20) output-hfield-z)) ) (begin (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ey) (center (+ dpml (* -0.5 sx)) 0) (size 0 w)))) (set! symmetries (list (make mirror-sym (direction Y) (phase -1)))) (define trans ; transmitted flux (add-flux fcen df nfreq (make flux-region (center (- (* 0.5 sx) dpml 0.5) 0) (size 0 (* w 2))))) (run-sources+ (stop-when-fields-decayed 50 Ey (vector3 (- (* 0.5 sx) dpml 0.5) 0) 1e-3) (at-beginning output-epsilon) (during-sources (in-volume (volume (center 0 0) (size sx 0)) (to-appended "hz-slice" (at-every 0.4 output-hfield-z))))) (display-fluxes trans) ; print out the flux spectrum )) meep-openmpi-1.1.1/examples/bend-flux.ctl0000644000175200017520000000443011173421136017545 0ustar debiandebian; From the Meep tutorial: transmission around a 90-degree waveguide ; bend in 2d. (define-param sx 16) ; size of cell in X direction (define-param sy 32) ; size of cell in Y direction (set! geometry-lattice (make lattice (size sx sy no-size))) (define-param pad 4) ; padding distance between waveguide and cell edge (define-param w 1) ; width of waveguide (define wvg-ycen (* -0.5 (- sy w (* 2 pad)))) ; y center of horiz. wvg (define wvg-xcen (* 0.5 (- sx w (* 2 pad)))) ; x center of vert. wvg (define-param no-bend? false) ; if true, have straight waveguide, not bend (set! geometry (if no-bend? (list (make block (center 0 wvg-ycen) (size infinity w infinity) (material (make dielectric (epsilon 12))))) (list (make block (center (* -0.5 pad) wvg-ycen) (size (- sx pad) w infinity) (material (make dielectric (epsilon 12)))) (make block (center wvg-xcen (* 0.5 pad)) (size w (- sy pad) infinity) (material (make dielectric (epsilon 12))))))) (define-param fcen 0.15) ; pulse center frequency (define-param df 0.1) ; pulse width (in frequency) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center (+ 1 (* -0.5 sx)) wvg-ycen) (size 0 w)))) (set! pml-layers (list (make pml (thickness 1.0)))) (set-param! resolution 10) (define-param nfreq 100) ; number of frequencies at which to compute flux (define trans ; transmitted flux (add-flux fcen df nfreq (if no-bend? (make flux-region (center (- (/ sx 2) 1.5) wvg-ycen) (size 0 (* w 2))) (make flux-region (center wvg-xcen (- (/ sy 2) 1.5)) (size (* w 2) 0))))) (define refl ; reflected flux (add-flux fcen df nfreq (make flux-region (center (+ (* -0.5 sx) 1.5) wvg-ycen) (size 0 (* w 2))))) ; for normal run, load negated fields to subtract incident from refl. fields (if (not no-bend?) (load-minus-flux "refl-flux" refl)) (run-sources+ (stop-when-fields-decayed 50 Ez (if no-bend? (vector3 (- (/ sx 2) 1.5) wvg-ycen) (vector3 wvg-xcen (- (/ sy 2) 1.5))) 1e-3) (at-beginning output-epsilon)) ; for normalization run, save flux fields for refl. plane (if no-bend? (save-flux "refl-flux" refl)) (display-fluxes trans refl) meep-openmpi-1.1.1/libctl/0000755000175200017520000000000011244567007014616 5ustar debiandebianmeep-openmpi-1.1.1/libctl/Makefile.in0000644000175200017520000006654511243546263016703 0ustar debiandebian# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = meep@MEEP_SUFFIX@$(EXEEXT) subdir = libctl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/meep.scm.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = meep.scm CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = am_meep@MEEP_SUFFIX@_OBJECTS = meep.$(OBJEXT) structure.$(OBJEXT) \ meep_wrap.$(OBJEXT) $(am__objects_1) nodist_meep@MEEP_SUFFIX@_OBJECTS = main.$(OBJEXT) geom.$(OBJEXT) \ ctl-io.$(OBJEXT) meep@MEEP_SUFFIX@_OBJECTS = $(am_meep@MEEP_SUFFIX@_OBJECTS) \ $(nodist_meep@MEEP_SUFFIX@_OBJECTS) meep@MEEP_SUFFIX@_DEPENDENCIES = $(LIBMEEP) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_$(V)) am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) am__v_CXX_0 = @echo " CXX " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_$(V)) am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(meep@MEEP_SUFFIX@_SOURCES) \ $(nodist_meep@MEEP_SUFFIX@_SOURCES) DIST_SOURCES = $(meep@MEEP_SUFFIX@_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DATA = $(nodist_pkgdata_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ # gen-ctl-io program GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ # libctl install. dir., e.g. /usr/local/share/libctl LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = meep.scm.in meep-enums.scm casimir.scm LIBMEEP = $(top_builddir)/src/libmeep@MEEP_SUFFIX@.la HDRS = meep-ctl.hpp meep-ctl-const.hpp meep-ctl-swig.hpp LIBHDRS = $(top_srcdir)/src/meep.hpp $(top_srcdir)/src/meep/vec.hpp $(top_srcdir)/src/meep/mympi.hpp CTLHDRS = $(LIBHDRS) $(srcdir)/meep-ctl.hpp $(top_builddir)/config.h $(srcdir)/meep-ctl-const.hpp ctl-io.h meep@MEEP_SUFFIX@_SOURCES = meep.cpp structure.cpp meep_wrap.cxx $(HDRS) meep.i meep_op_renames.i meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i nodist_meep@MEEP_SUFFIX@_SOURCES = main.cpp geom.cpp ctl-io.cpp ctl-io.h ctl-io.i meep@MEEP_SUFFIX@_LDADD = $(LIBMEEP) @LIBCTL_LIBS@ BUILT_SOURCES = $(nodist_meep_SOURCES) meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i meep-enums.scm meep_wrap.cxx ############################################################################## # stuff below is based on example Makefile.in included with libctl ############################################################################## # what is printed out when invoking your program with --version: VERSION_STRING = "Meep @VERSION@, Copyright (C) 2005-2009 Massachusetts Insitute of Technology." MY_DEFS = -DHAVE_CTL_HOOKS=1 -DHAVE_CTL_EXPORT_HOOK=1 PROGRAM_NAME = meep SPECIFICATION_FILE = $(PROGRAM_NAME).scm nodist_pkgdata_DATA = $(SPECIFICATION_FILE) meep-enums.scm casimir.scm ############################################################################## AM_CPPFLAGS = -I$(top_srcdir)/src $(MY_DEFS) $(CTL_DEFS) $(CTL_H_CPPFLAG) ############################################################################## CTL_DEFS = -DCTL_SCM='"'$(LIBCTL_DIR)/base/ctl.scm'"' \ -DINCLUDE_SCM='"'$(LIBCTL_DIR)/base/include.scm'"' \ -DSPEC_SCM='"'$(pkgdatadir)/$(SPECIFICATION_FILE)'"' \ -DVERSION_STRING='"'$(VERSION_STRING)'"' all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .cxx .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libctl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libctl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): meep.scm: $(top_builddir)/config.status $(srcdir)/meep.scm.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list meep@MEEP_SUFFIX@$(EXEEXT): $(meep@MEEP_SUFFIX@_OBJECTS) $(meep@MEEP_SUFFIX@_DEPENDENCIES) @rm -f meep@MEEP_SUFFIX@$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(meep@MEEP_SUFFIX@_OBJECTS) $(meep@MEEP_SUFFIX@_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctl-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geom.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meep_wrap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/structure.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< .cxx.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_pkgdataDATA: $(nodist_pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(nodist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-nodist_pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_pkgdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-nodist_pkgdataDATA .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-local ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-nodist_pkgdataDATA \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-nodist_pkgdataDATA # manual dependency hack to force the build order in certain cases # ... for some reason automake's automatic dependencies are not working here meep.o: meep.cpp meep-enums.scm $(CTLHDRS) structure.o: structure.cpp $(CTLHDRS) meep_wrap.o: meep_wrap.cxx $(srcdir)/meep-ctl-swig.hpp $(CTLHDRS) @MAINTAINER_MODE_TRUE@@WITH_LIBCTL_TRUE@meep_wrap.cxx: meep.i meep_op_renames.i meep_enum_renames.i meep_renames.i ctl-io.i meep-ctl-swig.hpp meep_swig_bug_workaround.i $(LIBHDRS) @MAINTAINER_MODE_TRUE@@WITH_LIBCTL_TRUE@ swig -I$(top_srcdir)/src -c++ -guile -o $@ meep.i @MAINTAINER_MODE_FALSE@@WITH_LIBCTL_TRUE@meep_wrap.cxx: @MAINTAINER_MODE_FALSE@@WITH_LIBCTL_TRUE@ echo "#error need --with-maintainer-mode to generate this file" 1>&2 @MAINTAINER_MODE_FALSE@@WITH_LIBCTL_TRUE@ exit 1 @WITH_LIBCTL_FALSE@meep_wrap.cxx: @WITH_LIBCTL_FALSE@ echo "#error need --with-libctl to generate this file" > $@ # workaround missing namespace prefix in swig meep_renames.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; sed 's/^ *class \+\([A-Za-z_0-9:]*\)\( *\| *:[^{]*\){.*$$/%rename(meep_\1) meep::\1;/' $(LIBHDRS) | grep "%rename" | sort -u; echo; grep -hv typedef $(LIBHDRS) | sed 's/\(inline\|const\|extern\|static\) \+//g' | sed 's/^[A-Za-z_0-9:<>]\+[* ]\+\([A-Za-z_0-9:]*\) *(.*$$/%rename(meep_\1) meep::\1;/' | grep "%rename" | sort -u; ) > $@ # work around bug in swig, where it doesn't prepend namespace to friend funcs meep_swig_bug_workaround.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; grep -h friend $(LIBHDRS) | sed 's/^ *friend \+[A-Za-z_0-9:<>]\+[* ]\+\([A-Za-z_0-9:]*\) *(.*$$/%ignore \1;/' | grep "%ignore" | sort -u;) > $@ meep_enum_renames.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; for f in $(LIBHDRS); do egrep "^enum" $$f | sed 's/enum \+\([A-Za-z_0-9:]\+\).*$$/\1/g' | while read enum; do cat $$f | tr -d '\n' | sed 's/.*enum \+'$${enum}' *{\([^}]*\)}.*/\1/g' | sed 's/= *[0-9]\+//g' |tr -d ' \t' | tr ',' '\n' | sed 's/^.*$$/'"%rename(meep_$${enum}_\0) meep::\0;/g"; echo; done; done;) > $@ meep-enums.scm: meep_enum_renames.i (sed 's/%rename(\([A-Za-z0-9_]*\)) *\([A-Za-z0-9:_]*\);$$/(define \2 (\1))/' meep_enum_renames.i | sed 's/[A-Za-z0-9:_]*:://g' | sed 's/_/-/g' | sed 's,//,;,'; echo "(define Centered Dielectric)") > $@ ############################################################################## ctl-io.cpp: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm ctl-io.h $(GEN_CTL_IO) --cxx --code -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) ctl-io.h: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm $(GEN_CTL_IO) --cxx --header -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) ctl-io.i: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm $(GEN_CTL_IO) --cxx --swig -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) main.cpp: $(LIBCTL_DIR)/base/main.c ctl-io.h cp -f $(LIBCTL_DIR)/base/main.c $@ geom.cpp: $(LIBCTL_DIR)/utils/geom.c ctl-io.h cp -f $(LIBCTL_DIR)/utils/geom.c $@ clean-local: rm -f $(nodist_meep_SOURCES) meep-enums.scm ctl-io.* main.* geom.* maintainer-clean-local: rm -f $(BUILT_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-openmpi-1.1.1/libctl/meep_wrap.cxx0000644000175200017520000451157611243672543017345 0ustar debiandebian/* -*- buffer-read-only: t -*- vi: set ro: */ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.36 * * 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. * ----------------------------------------------------------------------------- */ /* Implementation : GUILE */ #define SWIG_GUILE_INIT_STATIC extern extern "C" { SWIG_GUILE_INIT_STATIC void SWIG_init (void); } #ifdef __cplusplus template class SwigValueWrapper { T *tt; public: SwigValueWrapper() : tt(0) { } SwigValueWrapper(const SwigValueWrapper& rhs) : tt(new T(*rhs.tt)) { } SwigValueWrapper(const T& t) : tt(new T(t)) { } ~SwigValueWrapper() { delete tt; } SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; } operator T&() const { return *tt; } T *operator&() { return tt; } private: SwigValueWrapper& operator=(const SwigValueWrapper& rhs); }; template 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 (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # 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 /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic CAPI 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 is strictly necessary, ie, if you have problems with your compiler or so. */ #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 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The swig conversion methods, as ConvertPtr, return and 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 swig versions, you usually write code as: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit as: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } that seems to be the same, 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 requires also to SWIG_ConvertPtr to return new result values, as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; 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 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #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" == "Class", 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 ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* think of this as a c++ template<> or a scheme macro */ #define SWIG_TypeCheck_Template(comparison, ty) \ if (ty) { \ swig_cast_info *iter = ty->cast; \ while (iter) { \ if (comparison) { \ 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 /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); } /* Same as previous function, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { SWIG_TypeCheck_Template(iter->type == from, into); } /* 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) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register 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 { register 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"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register 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) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (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 /* ----------------------------------------------------------------------------- * See the LICENSE file for information on copyright, usage and redistribution * of SWIG, and the README file for authors - http://www.swig.org/release.html. * * guile_scm_run.swg * ----------------------------------------------------------------------------- */ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif typedef SCM (*swig_guile_proc)(); typedef SCM (*guile_destructor)(SCM); typedef struct swig_guile_clientdata { guile_destructor destroy; SCM goops_class; } swig_guile_clientdata; #define SWIG_scm2str(s) \ SWIG_Guile_scm2newstr(s, NULL) #define SWIG_malloc(size) \ SCM_MUST_MALLOC(size) #define SWIG_free(mem) \ scm_must_free(mem) #define SWIG_ConvertPtr(s, result, type, flags) \ SWIG_Guile_ConvertPtr(s, result, type, flags) #define SWIG_MustGetPtr(s, type, argnum, flags) \ SWIG_Guile_MustGetPtr(s, type, argnum, flags, FUNC_NAME) #define SWIG_NewPointerObj(ptr, type, owner) \ SWIG_Guile_NewPointerObj((void*)ptr, type, owner) #define SWIG_PointerAddress(object) \ SWIG_Guile_PointerAddress(object) #define SWIG_PointerType(object) \ SWIG_Guile_PointerType(object) #define SWIG_IsPointerOfType(object, type) \ SWIG_Guile_IsPointerOfType(object, type) #define SWIG_IsPointer(object) \ SWIG_Guile_IsPointer(object) #define SWIG_contract_assert(expr, msg) \ if (!(expr)) \ scm_error(scm_str2symbol("swig-contract-assertion-failed"), \ (char *) FUNC_NAME, (char *) msg, \ SCM_EOL, SCM_BOOL_F); else /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) \ SWIG_Guile_ConvertMember(obj, ptr, sz, ty, FUNC_NAME) #define SWIG_NewMemberObj(ptr, sz, type) \ SWIG_Guile_NewMemberObj(ptr, sz, type, FUNC_NAME) /* Runtime API */ static swig_module_info *SWIG_Guile_GetModule(void); #define SWIG_GetModule(clientdata) SWIG_Guile_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Guile_SetModule(pointer) SWIGINTERN char * SWIG_Guile_scm2newstr(SCM str, size_t *len) { #define FUNC_NAME "SWIG_Guile_scm2newstr" char *ret; size_t l; SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); l = SCM_STRING_LENGTH(str); ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); if (!ret) return NULL; memcpy(ret, SCM_STRING_CHARS(str), l); ret[l] = '\0'; if (len) *len = l; return ret; #undef FUNC_NAME } static int swig_initialized = 0; static scm_t_bits swig_tag = 0; static scm_t_bits swig_collectable_tag = 0; static scm_t_bits swig_destroyed_tag = 0; static scm_t_bits swig_member_function_tag = 0; static SCM swig_make_func = SCM_EOL; static SCM swig_keyword = SCM_EOL; static SCM swig_symbol = SCM_EOL; #define SWIG_Guile_GetSmob(x) \ ( SCM_NNULLP(x) && SCM_INSTANCEP(x) && SCM_NFALSEP(scm_slot_exists_p(x, swig_symbol)) \ ? scm_slot_ref(x, swig_symbol) : (x) ) SWIGINTERN SCM SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner) { if (ptr == NULL) return SCM_EOL; else { SCM smob; swig_guile_clientdata *cdata = (swig_guile_clientdata *) type->clientdata; if (owner) SCM_NEWSMOB2(smob, swig_collectable_tag, ptr, (void *) type); else SCM_NEWSMOB2(smob, swig_tag, ptr, (void *) type); if (!cdata || SCM_NULLP(cdata->goops_class) || swig_make_func == SCM_EOL ) { return smob; } else { /* the scm_make() C function only handles the creation of gf, methods and classes (no instances) the (make ...) function is later redefined in goops.scm. So we need to call that Scheme function. */ return scm_apply(swig_make_func, scm_list_3(cdata->goops_class, swig_keyword, smob), SCM_EOL); } } } SWIGINTERN unsigned long SWIG_Guile_PointerAddress(SCM object) { SCM smob = SWIG_Guile_GetSmob(object); if (SCM_NULLP(smob)) return 0; else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob) || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) { return (unsigned long) (void *) SCM_CELL_WORD_1(smob); } else scm_wrong_type_arg("SWIG-Guile-PointerAddress", 1, object); } SWIGINTERN swig_type_info * SWIG_Guile_PointerType(SCM object) { SCM smob = SWIG_Guile_GetSmob(object); if (SCM_NULLP(smob)) return NULL; else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob) || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) { return (swig_type_info *) SCM_CELL_WORD_2(smob); } else scm_wrong_type_arg("SWIG-Guile-PointerType", 1, object); } SWIGINTERN int SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags) { swig_cast_info *cast; swig_type_info *from; SCM smob = SWIG_Guile_GetSmob(s); if (SCM_NULLP(smob)) { *result = NULL; return SWIG_OK; } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { /* we do not accept smobs representing destroyed pointers */ from = (swig_type_info *) SCM_CELL_WORD_2(smob); if (!from) return SWIG_ERROR; if (type) { cast = SWIG_TypeCheckStruct(from, type); if (cast) { int newmemory = 0; *result = SWIG_TypeCast(cast, (void *) SCM_CELL_WORD_1(smob), &newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ return SWIG_OK; } else { return SWIG_ERROR; } } else { *result = (void *) SCM_CELL_WORD_1(smob); return SWIG_OK; } } return SWIG_ERROR; } SWIGINTERNINLINE void * SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type, int argnum, int flags, const char *func_name) { void *result; int res = SWIG_Guile_ConvertPtr(s, &result, type, flags); if (!SWIG_IsOK(res)) { /* type mismatch */ scm_wrong_type_arg((char *) func_name, argnum, s); } return result; } SWIGINTERNINLINE int SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type) { void *result; if (SWIG_Guile_ConvertPtr(s, &result, type, 0)) { /* type mismatch */ return 0; } else return 1; } SWIGINTERNINLINE int SWIG_Guile_IsPointer (SCM s) { /* module might not be initialized yet, so initialize it */ SWIG_Guile_GetModule(); return SWIG_Guile_IsPointerOfType (s, NULL); } /* Mark a pointer object non-collectable */ SWIGINTERN void SWIG_Guile_MarkPointerNoncollectable(SCM s) { SCM smob = SWIG_Guile_GetSmob(s); if (!SCM_NULLP(smob)) { if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { SCM_SET_CELL_TYPE(smob, swig_tag); } else scm_wrong_type_arg(NULL, 0, s); } } /* Mark a pointer object destroyed */ SWIGINTERN void SWIG_Guile_MarkPointerDestroyed(SCM s) { SCM smob = SWIG_Guile_GetSmob(s); if (!SCM_NULLP(smob)) { if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { SCM_SET_CELL_TYPE(smob, swig_destroyed_tag); } else scm_wrong_type_arg(NULL, 0, s); } } /* Member functions */ SWIGINTERN SCM SWIG_Guile_NewMemberObj(void *ptr, size_t sz, swig_type_info *type, const char *func_name) { SCM smob; void *copy = malloc(sz); memcpy(copy, ptr, sz); SCM_NEWSMOB2(smob, swig_member_function_tag, copy, (void *) type); return smob; } SWIGINTERN int SWIG_Guile_ConvertMember(SCM smob, void *ptr, size_t sz, swig_type_info *type, const char *func_name) { swig_cast_info *cast; swig_type_info *from; if (SCM_SMOB_PREDICATE(swig_member_function_tag, smob)) { from = (swig_type_info *) SCM_CELL_WORD_2(smob); if (!from) return SWIG_ERROR; if (type) { cast = SWIG_TypeCheckStruct(from, type); if (!cast) return SWIG_ERROR; } memcpy(ptr, (void *) SCM_CELL_WORD_1(smob), sz); return SWIG_OK; } return SWIG_ERROR; } /* Init */ SWIGINTERN int print_swig_aux (SCM swig_smob, SCM port, scm_print_state *pstate, const char *attribute) { swig_type_info *type; type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob); if (type) { scm_puts((char *) "#<", port); scm_puts((char *) attribute, port); scm_puts((char *) "swig-pointer ", port); scm_puts((char *) SWIG_TypePrettyName(type), port); scm_puts((char *) " ", port); scm_intprint((long) SCM_CELL_WORD_1(swig_smob), 16, port); scm_puts((char *) ">", port); /* non-zero means success */ return 1; } else { return 0; } } SWIGINTERN int print_swig (SCM swig_smob, SCM port, scm_print_state *pstate) { return print_swig_aux(swig_smob, port, pstate, ""); } SWIGINTERN int print_collectable_swig (SCM swig_smob, SCM port, scm_print_state *pstate) { return print_swig_aux(swig_smob, port, pstate, "collectable-"); } SWIGINTERN int print_destroyed_swig (SCM swig_smob, SCM port, scm_print_state *pstate) { return print_swig_aux(swig_smob, port, pstate, "destroyed-"); } SWIGINTERN int print_member_function_swig (SCM swig_smob, SCM port, scm_print_state *pstate) { swig_type_info *type; type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob); if (type) { scm_puts((char *) "#<", port); scm_puts((char *) "swig-member-function-pointer ", port); scm_puts((char *) SWIG_TypePrettyName(type), port); scm_puts((char *) " >", port); /* non-zero means success */ return 1; } else { return 0; } } SWIGINTERN SCM equalp_swig (SCM A, SCM B) { if (SCM_CELL_WORD_0(A) == SCM_CELL_WORD_0(B) && SCM_CELL_WORD_1(A) == SCM_CELL_WORD_1(B) && SCM_CELL_WORD_2(A) == SCM_CELL_WORD_2(B)) return SCM_BOOL_T; else return SCM_BOOL_F; } SWIGINTERN size_t free_swig(SCM A) { swig_type_info *type = (swig_type_info *) SCM_CELL_WORD_2(A); if (type) { if (type->clientdata && ((swig_guile_clientdata *)type->clientdata)->destroy) ((swig_guile_clientdata *)type->clientdata)->destroy(A); } return 0; } SWIGINTERN size_t free_swig_member_function(SCM A) { free((swig_type_info *) SCM_CELL_WORD_1(A)); return 0; } SWIGINTERN int ensure_smob_tag(SCM swig_module, scm_t_bits *tag_variable, const char *smob_name, const char *scheme_variable_name) { SCM variable = scm_sym2var(scm_str2symbol(scheme_variable_name), scm_module_lookup_closure(swig_module), SCM_BOOL_T); if (SCM_UNBNDP(SCM_VARIABLE_REF(variable))) { *tag_variable = scm_make_smob_type((char*)scheme_variable_name, 0); SCM_VARIABLE_SET(variable, scm_ulong2num(*tag_variable)); return 1; } else { *tag_variable = scm_num2ulong(SCM_VARIABLE_REF(variable), 0, "SWIG_Guile_Init"); return 0; } } SWIGINTERN SCM SWIG_Guile_Init () { static SCM swig_module; if (swig_initialized) return swig_module; swig_initialized = 1; swig_module = scm_c_resolve_module("Swig swigrun"); if (ensure_smob_tag(swig_module, &swig_tag, "swig-pointer", "swig-pointer-tag")) { scm_set_smob_print(swig_tag, print_swig); scm_set_smob_equalp(swig_tag, equalp_swig); } if (ensure_smob_tag(swig_module, &swig_collectable_tag, "collectable-swig-pointer", "collectable-swig-pointer-tag")) { scm_set_smob_print(swig_collectable_tag, print_collectable_swig); scm_set_smob_equalp(swig_collectable_tag, equalp_swig); scm_set_smob_free(swig_collectable_tag, free_swig); } if (ensure_smob_tag(swig_module, &swig_destroyed_tag, "destroyed-swig-pointer", "destroyed-swig-pointer-tag")) { scm_set_smob_print(swig_destroyed_tag, print_destroyed_swig); scm_set_smob_equalp(swig_destroyed_tag, equalp_swig); } if (ensure_smob_tag(swig_module, &swig_member_function_tag, "swig-member-function-pointer", "swig-member-function-pointer-tag")) { scm_set_smob_print(swig_member_function_tag, print_member_function_swig); scm_set_smob_free(swig_member_function_tag, free_swig_member_function); } swig_make_func = scm_permanent_object( scm_variable_ref(scm_c_module_lookup(scm_c_resolve_module("oop goops"), "make"))); swig_keyword = scm_permanent_object(scm_c_make_keyword((char*) "init-smob")); swig_symbol = scm_permanent_object(scm_str2symbol("swig-smob")); #ifdef SWIG_INIT_RUNTIME_MODULE SWIG_INIT_RUNTIME_MODULE #endif return swig_module; } SWIGINTERN swig_module_info * SWIG_Guile_GetModule(void) { SCM module; SCM variable; module = SWIG_Guile_Init(); variable = scm_sym2var(scm_str2symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME), scm_module_lookup_closure(module), SCM_BOOL_T); if (SCM_UNBNDP(SCM_VARIABLE_REF(variable))) { return NULL; } else { return (swig_module_info *) scm_num2ulong(SCM_VARIABLE_REF(variable), 0, "SWIG_Guile_Init"); } } SWIGINTERN void SWIG_Guile_SetModule(swig_module_info *swig_module) { SCM module; SCM variable; module = SWIG_Guile_Init(); variable = scm_sym2var(scm_str2symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME), scm_module_lookup_closure(module), SCM_BOOL_T); SCM_VARIABLE_SET(variable, scm_ulong2num((unsigned long) swig_module)); } SWIGINTERN int SWIG_Guile_GetArgs (SCM *dest, SCM rest, int reqargs, int optargs, const char *procname) { int i; int num_args_passed = 0; for (i = 0; i my_complex_func(meep::vec const &v) { SCM ret = gh_call1(my_complex_func_scm, ctl_convert_vector3_to_scm(vec_to_vector3(v))); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } static inline complex my_complex_func2(double t, void *f) { SCM ret = gh_call1((SCM) f, gh_double2scm(t)); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } typedef struct { SCM func; int nf; } my_field_func_data; static inline complex my_field_func(const complex *fields, const meep::vec &loc, void *data_) { my_field_func_data *data = (my_field_func_data *) data_; int num_items = data->nf; cnumber *items = new cnumber[num_items]; for (int i = 0; i < num_items; ++i) items[i] = make_cnumber(real(fields[i]), imag(fields[i])); SCM ret = gh_apply(data->func, scm_cons(ctl_convert_vector3_to_scm(vec_to_vector3(loc)), make_cnumber_list(num_items, items))); delete[] items; cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } /* Unfortunately, this is not re-entrant. Damn dynamic scoping. Hopefully, it should be good enough for our purposes. */ static SCM my_complex_func3_scm; static inline complex my_complex_func3(complex x) { cnumber cx; cx.re = real(x); cx.im = imag(x); SCM ret = gh_call1(my_complex_func3_scm, ctl_convert_cnumber_to_scm(cx)); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } static int gswig_const_meep_component_Ex = meep::Ex; static int gswig_const_meep_component_Ey = meep::Ey; static int gswig_const_meep_component_Er = meep::Er; static int gswig_const_meep_component_Ep = meep::Ep; static int gswig_const_meep_component_Ez = meep::Ez; static int gswig_const_meep_component_Hx = meep::Hx; static int gswig_const_meep_component_Hy = meep::Hy; static int gswig_const_meep_component_Hr = meep::Hr; static int gswig_const_meep_component_Hp = meep::Hp; static int gswig_const_meep_component_Hz = meep::Hz; static int gswig_const_meep_component_Dx = meep::Dx; static int gswig_const_meep_component_Dy = meep::Dy; static int gswig_const_meep_component_Dr = meep::Dr; static int gswig_const_meep_component_Dp = meep::Dp; static int gswig_const_meep_component_Dz = meep::Dz; static int gswig_const_meep_component_Bx = meep::Bx; static int gswig_const_meep_component_By = meep::By; static int gswig_const_meep_component_Br = meep::Br; static int gswig_const_meep_component_Bp = meep::Bp; static int gswig_const_meep_component_Bz = meep::Bz; static int gswig_const_meep_component_Dielectric = meep::Dielectric; static int gswig_const_meep_component_Permeability = meep::Permeability; static int gswig_const_meep_derived_component_Sx = meep::Sx; static int gswig_const_meep_derived_component_Sy = meep::Sy; static int gswig_const_meep_derived_component_Sr = meep::Sr; static int gswig_const_meep_derived_component_Sp = meep::Sp; static int gswig_const_meep_derived_component_Sz = meep::Sz; static int gswig_const_meep_derived_component_EnergyDensity = meep::EnergyDensity; static int gswig_const_meep_derived_component_D_EnergyDensity = meep::D_EnergyDensity; static int gswig_const_meep_derived_component_H_EnergyDensity = meep::H_EnergyDensity; static int gswig_const_meep_ndim_D1 = meep::D1; static int gswig_const_meep_ndim_D2 = meep::D2; static int gswig_const_meep_ndim_D3 = meep::D3; static int gswig_const_meep_ndim_Dcyl = meep::Dcyl; static int gswig_const_meep_field_type_E_stuff = meep::E_stuff; static int gswig_const_meep_field_type_H_stuff = meep::H_stuff; static int gswig_const_meep_field_type_D_stuff = meep::D_stuff; static int gswig_const_meep_field_type_B_stuff = meep::B_stuff; static int gswig_const_meep_field_type_PE_stuff = meep::PE_stuff; static int gswig_const_meep_field_type_PH_stuff = meep::PH_stuff; static int gswig_const_meep_boundary_side_High = meep::High; static int gswig_const_meep_boundary_side_Low = meep::Low; static int gswig_const_meep_direction_X = meep::X; static int gswig_const_meep_direction_Y = meep::Y; static int gswig_const_meep_direction_Z = meep::Z; static int gswig_const_meep_direction_R = meep::R; static int gswig_const_meep_direction_P = meep::P; static int gswig_const_meep_direction_NO_DIRECTION = meep::NO_DIRECTION; static int gswig_const_MEEP_SINGLE = 0; static int gswig_const_meep_h5file_READONLY = meep::h5file::READONLY; static int gswig_const_meep_h5file_READWRITE = meep::h5file::READWRITE; static int gswig_const_meep_h5file_WRITE = meep::h5file::WRITE; static double gswig_const_DEFAULT_SUBPIXEL_TOL = 1e-4; static int gswig_const_DEFAULT_SUBPIXEL_MAXEVAL = 100000; static int gswig_const_meep_boundary_region_NOTHING_SPECIAL = meep::boundary_region::NOTHING_SPECIAL; static int gswig_const_meep_boundary_region_PML = meep::boundary_region::PML; static int gswig_const_meep_in_or_out_Incoming = meep::Incoming; static int gswig_const_meep_in_or_out_Outgoing = meep::Outgoing; static int gswig_const_meep_connect_phase_CONNECT_PHASE = meep::CONNECT_PHASE; static int gswig_const_meep_connect_phase_CONNECT_NEGATE = meep::CONNECT_NEGATE; static int gswig_const_meep_connect_phase_CONNECT_COPY = meep::CONNECT_COPY; static int gswig_const_meep_boundary_condition_Periodic = meep::Periodic; static int gswig_const_meep_boundary_condition_Metallic = meep::Metallic; static int gswig_const_meep_boundary_condition_Magnetic = meep::Magnetic; static int gswig_const_meep_boundary_condition_None = meep::None; static int gswig_const_meep_time_sink_Connecting = meep::Connecting; static int gswig_const_meep_time_sink_Stepping = meep::Stepping; static int gswig_const_meep_time_sink_Boundaries = meep::Boundaries; static int gswig_const_meep_time_sink_MpiTime = meep::MpiTime; static int gswig_const_meep_time_sink_FieldOutput = meep::FieldOutput; static int gswig_const_meep_time_sink_FourierTransforming = meep::FourierTransforming; static int gswig_const_meep_time_sink_Other = meep::Other; static int gswig_const_meep_grace_type_XY = meep::XY; static int gswig_const_meep_grace_type_ERROR_BARS = meep::ERROR_BARS; #include "ctl-io.h" #include "meep-ctl-swig.hpp" static int gswig_const_MEEP_CTL_SWIG_HPP = 1; static SCM _wrap_NUM_FIELD_COMPONENTS(SCM s_0) { #define FUNC_NAME "NUM-FIELD-COMPONENTS" SCM gswig_result; { gswig_result = scm_long2num(meep::NUM_FIELD_COMPONENTS); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_NUM_FIELD_TYPES(SCM s_0) { #define FUNC_NAME "NUM-FIELD-TYPES" SCM gswig_result; { gswig_result = scm_long2num(meep::NUM_FIELD_TYPES); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Ex(SCM s_0) { #define FUNC_NAME "meep-component-Ex" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Ex); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Ey(SCM s_0) { #define FUNC_NAME "meep-component-Ey" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Ey); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Er(SCM s_0) { #define FUNC_NAME "meep-component-Er" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Er); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Ep(SCM s_0) { #define FUNC_NAME "meep-component-Ep" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Ep); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Ez(SCM s_0) { #define FUNC_NAME "meep-component-Ez" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Ez); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hx(SCM s_0) { #define FUNC_NAME "meep-component-Hx" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Hx); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hy(SCM s_0) { #define FUNC_NAME "meep-component-Hy" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Hy); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hr(SCM s_0) { #define FUNC_NAME "meep-component-Hr" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Hr); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hp(SCM s_0) { #define FUNC_NAME "meep-component-Hp" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Hp); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Hz(SCM s_0) { #define FUNC_NAME "meep-component-Hz" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Hz); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dx(SCM s_0) { #define FUNC_NAME "meep-component-Dx" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Dx); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dy(SCM s_0) { #define FUNC_NAME "meep-component-Dy" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Dy); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dr(SCM s_0) { #define FUNC_NAME "meep-component-Dr" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Dr); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dp(SCM s_0) { #define FUNC_NAME "meep-component-Dp" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Dp); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dz(SCM s_0) { #define FUNC_NAME "meep-component-Dz" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Dz); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Bx(SCM s_0) { #define FUNC_NAME "meep-component-Bx" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Bx); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_By(SCM s_0) { #define FUNC_NAME "meep-component-By" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_By); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Br(SCM s_0) { #define FUNC_NAME "meep-component-Br" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Br); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Bp(SCM s_0) { #define FUNC_NAME "meep-component-Bp" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Bp); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Bz(SCM s_0) { #define FUNC_NAME "meep-component-Bz" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Bz); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Dielectric(SCM s_0) { #define FUNC_NAME "meep-component-Dielectric" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Dielectric); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_Permeability(SCM s_0) { #define FUNC_NAME "meep-component-Permeability" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_component_Permeability); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sx(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sx" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_derived_component_Sx); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sy(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sy" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_derived_component_Sy); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sr(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sr" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_derived_component_Sr); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sp(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sp" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_derived_component_Sp); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_Sz(SCM s_0) { #define FUNC_NAME "meep-derived-component-Sz" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_derived_component_Sz); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_EnergyDensity(SCM s_0) { #define FUNC_NAME "meep-derived-component-EnergyDensity" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_derived_component_EnergyDensity); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_D_EnergyDensity(SCM s_0) { #define FUNC_NAME "meep-derived-component-D-EnergyDensity" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_derived_component_D_EnergyDensity); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_H_EnergyDensity(SCM s_0) { #define FUNC_NAME "meep-derived-component-H-EnergyDensity" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_derived_component_H_EnergyDensity); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ndim_D1(SCM s_0) { #define FUNC_NAME "meep-ndim-D1" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_ndim_D1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ndim_D2(SCM s_0) { #define FUNC_NAME "meep-ndim-D2" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_ndim_D2); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ndim_D3(SCM s_0) { #define FUNC_NAME "meep-ndim-D3" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_ndim_D3); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ndim_Dcyl(SCM s_0) { #define FUNC_NAME "meep-ndim-Dcyl" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_ndim_Dcyl); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_E_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-E-stuff" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_field_type_E_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_H_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-H-stuff" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_field_type_H_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_D_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-D-stuff" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_field_type_D_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_B_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-B-stuff" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_field_type_B_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_PE_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-PE-stuff" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_field_type_PE_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_field_type_PH_stuff(SCM s_0) { #define FUNC_NAME "meep-field-type-PH-stuff" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_field_type_PH_stuff); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_side_High(SCM s_0) { #define FUNC_NAME "meep-boundary-side-High" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_boundary_side_High); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_side_Low(SCM s_0) { #define FUNC_NAME "meep-boundary-side-Low" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_boundary_side_Low); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_X(SCM s_0) { #define FUNC_NAME "meep-direction-X" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_direction_X); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_Y(SCM s_0) { #define FUNC_NAME "meep-direction-Y" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_direction_Y); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_Z(SCM s_0) { #define FUNC_NAME "meep-direction-Z" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_direction_Z); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_R(SCM s_0) { #define FUNC_NAME "meep-direction-R" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_direction_R); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_P(SCM s_0) { #define FUNC_NAME "meep-direction-P" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_direction_P); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_NO_DIRECTION(SCM s_0) { #define FUNC_NAME "meep-direction-NO-DIRECTION" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_direction_NO_DIRECTION); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" meep::direction arg1 ; bool arg2 ; complex< double > arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; { arg1 = (meep::direction) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (bool) SCM_NFALSEP(argv[1]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[2]); arg3 = std::complex(cnum.re, cnum.im); } result = (meep::signed_direction *)new meep::signed_direction(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" meep::direction arg1 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; { arg1 = (meep::direction) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (bool) SCM_NFALSEP(argv[1]); } result = (meep::signed_direction *)new meep::signed_direction(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" meep::direction arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; { arg1 = (meep::direction) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (meep::signed_direction *)new meep::signed_direction(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; result = (meep::signed_direction *)new meep::signed_direction(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-signed-direction" meep::signed_direction *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction *result = 0 ; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__signed_direction, 1, 0); } result = (meep::signed_direction *)new meep::signed_direction((meep::signed_direction const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_signed_direction(SCM rest) { #define FUNC_NAME "new-signed-direction" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-signed-direction"); if (argc == 0) { return _wrap_new_signed_direction__SWIG_3(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__signed_direction, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_signed_direction__SWIG_4(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_new_signed_direction__SWIG_2(argc,argv); } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[1]) ? 1 : 0; } if (_v) { return _wrap_new_signed_direction__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[1]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[2]); } if (_v) { return _wrap_new_signed_direction__SWIG_0(argc,argv); } } } } scm_misc_error("new-signed-direction", "No matching method for generic function `new_signed_direction'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_signed_direction_d_set (SCM s_0, SCM s_1) { #define FUNC_NAME "signed-direction-d-set" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->d = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_d_get (SCM s_0) { #define FUNC_NAME "signed-direction-d-get" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } result = (meep::direction) ((arg1)->d); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_flipped_set (SCM s_0, SCM s_1) { #define FUNC_NAME "signed-direction-flipped-set" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } { arg2 = (bool) SCM_NFALSEP(s_1); } if (arg1) (arg1)->flipped = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_flipped_get (SCM s_0) { #define FUNC_NAME "signed-direction-flipped-get" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } result = (bool) ((arg1)->flipped); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_phase_set (SCM s_0, SCM s_1) { #define FUNC_NAME "signed-direction-phase-set" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } if (arg1) (arg1)->phase = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_signed_direction_phase_get (SCM s_0) { #define FUNC_NAME "signed-direction-phase-get" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } result = ((arg1)->phase); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_signed_direction (SCM s_0) { #define FUNC_NAME "delete-signed-direction" meep::signed_direction *arg1 = (meep::signed_direction *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_number_of_directions (SCM s_0) { #define FUNC_NAME "meep-number-of-directions" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (int)meep::number_of_directions(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_start_at_direction (SCM s_0) { #define FUNC_NAME "meep-start-at-direction" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (meep::direction)meep::start_at_direction(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_stop_at_direction (SCM s_0) { #define FUNC_NAME "meep-stop-at-direction" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (meep::direction)meep::stop_at_direction(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_first_field_component (SCM s_0) { #define FUNC_NAME "meep-first-field-component" meep::field_type arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::field_type) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (meep::component)meep::first_field_component(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flip (SCM s_0) { #define FUNC_NAME "meep-flip" meep::signed_direction arg1 ; meep::signed_direction *argp1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction result; { argp1 = (meep::signed_direction *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__signed_direction, 1, 0); arg1 = *argp1; } result = meep::flip(arg1); { meep::signed_direction * resultptr; resultptr = new meep::signed_direction((const meep::signed_direction &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_has_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-has-direction" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (bool)meep::has_direction(arg1,arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_has_field_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-has-field-direction" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (bool)meep::has_field_direction(arg1,arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_coordinate_mismatch__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-coordinate-mismatch" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (bool)meep::coordinate_mismatch(arg1,arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_tm (SCM s_0) { #define FUNC_NAME "meep-is-tm" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (bool)meep::is_tm(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_abort (SCM s_0) { #define FUNC_NAME "meep-abort" char *arg1 = (char *) 0 ; void *arg2 = 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } meep::abort((char const *)arg1,arg2); gswig_result = SCM_UNSPECIFIED; if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_electric (SCM s_0) { #define FUNC_NAME "meep-is-electric" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (bool)meep::is_electric(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_magnetic (SCM s_0) { #define FUNC_NAME "meep-is-magnetic" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (bool)meep::is_magnetic(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_D (SCM s_0) { #define FUNC_NAME "meep-is-D" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (bool)meep::is_D(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_B (SCM s_0) { #define FUNC_NAME "meep-is-B" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (bool)meep::is_B(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_derived (SCM s_0) { #define FUNC_NAME "meep-is-derived" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (int) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (bool)meep::is_derived(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_poynting (SCM s_0) { #define FUNC_NAME "meep-is-poynting" meep::derived_component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::derived_component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (bool)meep::is_poynting(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_is_energydensity (SCM s_0) { #define FUNC_NAME "meep-is-energydensity" meep::derived_component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::derived_component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (bool)meep::is_energydensity(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_type (SCM s_0) { #define FUNC_NAME "meep-type" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::field_type result; { arg1 = (meep::component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (meep::field_type)meep::type(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_name__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-name" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::component) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (char *)meep::component_name(arg1); { gswig_result = scm_makfrom0str((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_name__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-name" meep::derived_component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::derived_component) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (char *)meep::component_name(arg1); { gswig_result = scm_makfrom0str((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_name__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-name" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (char *)meep::component_name(arg1); { gswig_result = scm_makfrom0str((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_name(SCM rest) { #define FUNC_NAME "meep-component-name" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "meep-component-name"); if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_component_name__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_component_name__SWIG_1(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_component_name__SWIG_2(argc,argv); } } scm_misc_error("meep-component-name", "No matching method for generic function `meep_component_name'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_direction_name (SCM s_0) { #define FUNC_NAME "meep-direction-name" meep::direction arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::direction) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (char *)meep::direction_name(arg1); { gswig_result = scm_makfrom0str((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dimension_name (SCM s_0) { #define FUNC_NAME "meep-dimension-name" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (char *)meep::dimension_name(arg1); { gswig_result = scm_makfrom0str((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_index (SCM s_0) { #define FUNC_NAME "meep-component-index" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (int)meep::component_index(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_direction__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-direction" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (meep::direction)meep::component_direction(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_component__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-direction-component" int arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (int)meep::direction_component(arg1,arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_direction__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-direction" meep::component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::component) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (meep::direction)meep::component_direction(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_direction__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-component-direction" meep::derived_component arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::derived_component) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (meep::direction)meep::component_direction(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_component_direction(SCM rest) { #define FUNC_NAME "meep-component-direction" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "meep-component-direction"); if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_component_direction__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_component_direction__SWIG_1(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_component_direction__SWIG_2(argc,argv); } } scm_misc_error("meep-component-direction", "No matching method for generic function `meep_component_direction'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_direction_component__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-direction-component" meep::component arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::component) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (meep::component)meep::direction_component(arg1,arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_component__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-direction-component" meep::derived_component arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::derived_component result; { arg1 = (meep::derived_component) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (meep::derived_component)meep::direction_component(arg1,arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_direction_component(SCM rest) { #define FUNC_NAME "meep-direction-component" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-direction-component"); if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_direction_component__SWIG_0(argc,argv); } } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_direction_component__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_direction_component__SWIG_2(argc,argv); } } } scm_misc_error("meep-direction-component", "No matching method for generic function `meep_direction_component'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_field_type_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-field-type-component" meep::field_type arg1 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::field_type) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (meep::component)meep::field_type_component(arg1,arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_coordinate_mismatch__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-coordinate-mismatch" meep::ndim arg1 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (bool)meep::coordinate_mismatch(arg1,arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_coordinate_mismatch__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-coordinate-mismatch" meep::ndim arg1 ; meep::derived_component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::ndim) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (bool)meep::coordinate_mismatch(arg1,arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_coordinate_mismatch(SCM rest) { #define FUNC_NAME "meep-coordinate-mismatch" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-coordinate-mismatch"); if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_coordinate_mismatch__SWIG_0(argc,argv); } } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_coordinate_mismatch__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_coordinate_mismatch__SWIG_2(argc,argv); } } } scm_misc_error("meep-coordinate-mismatch", "No matching method for generic function `meep_coordinate_mismatch'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_cycle_direction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-cycle-direction" meep::ndim arg1 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = (meep::direction)meep::cycle_direction(arg1,arg2,arg3); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_cycle_component (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-cycle-component" meep::ndim arg1 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = (meep::component)meep::cycle_component(arg1,arg2,arg3); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_veccyl (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-veccyl" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } result = meep::veccyl(arg1,arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_zero_vec (SCM s_0) { #define FUNC_NAME "meep-zero-vec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = meep::zero_vec(arg1); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; result = (meep::vec *)new meep::vec(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::ndim) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (meep::vec *)new meep::vec(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" meep::ndim arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::ndim) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = (meep::vec *)new meep::vec(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } result = (meep::vec *)new meep::vec(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = (meep::vec *)new meep::vec(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-vec" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } result = (meep::vec *)new meep::vec(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_vec(SCM rest) { #define FUNC_NAME "new-meep-vec" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-meep-vec"); if (argc == 0) { return _wrap_new_meep_vec__SWIG_0(argc,argv); } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_1(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_3(argc,argv); } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_2(argc,argv); } } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_4(argc,argv); } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_vec__SWIG_5(argc,argv); } } } } scm_misc_error("new-meep-vec", "No matching method for generic function `new_meep_vec'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_vec (SCM s_0) { #define FUNC_NAME "delete-meep-vec" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_round_float (SCM s_0) { #define FUNC_NAME "meep-vec-round-float" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = ((meep::vec const *)arg1)->round_float(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_dim_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-vec-dim-set" meep::vec *arg1 = (meep::vec *) 0 ; meep::ndim arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } { arg2 = (meep::ndim) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->dim = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_dim_get (SCM s_0) { #define FUNC_NAME "meep-vec-dim-get" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ndim result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (meep::ndim) ((arg1)->dim); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_r (SCM s_0) { #define FUNC_NAME "meep-vec-r" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (double)((meep::vec const *)arg1)->r(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_x (SCM s_0) { #define FUNC_NAME "meep-vec-x" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (double)((meep::vec const *)arg1)->x(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_y (SCM s_0) { #define FUNC_NAME "meep-vec-y" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (double)((meep::vec const *)arg1)->y(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_z (SCM s_0) { #define FUNC_NAME "meep-vec-z" meep::vec *arg1 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } result = (double)((meep::vec const *)arg1)->z(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-vec-in-direction" meep::vec *arg1 = (meep::vec *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (double)((meep::vec const *)arg1)->in_direction(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_set_direction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-vec-set-direction" meep::vec *arg1 = (meep::vec *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } (arg1)->set_direction(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vec_project_to_boundary (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-vec-project-to-boundary" meep::vec *arg1 = (meep::vec *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::vec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__vec, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } result = (double)(arg1)->project_to_boundary(arg2,arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_one_vec (SCM s_0) { #define FUNC_NAME "meep-one-vec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = meep::one_vec(arg1); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_abs (SCM s_0) { #define FUNC_NAME "meep-abs" meep::vec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(s_0)); arg1 = &vec__arg1; result = (double)meep::abs((meep::vec const &)*arg1); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_unit_vec (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-unit-vec" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = meep::unit_vec(arg1,arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_clean_vec__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-clean-vec" meep::vec *arg1 = 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = meep::clean_vec((meep::vec const &)*arg1,arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_clean_vec__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-clean-vec" meep::vec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; result = meep::clean_vec((meep::vec const &)*arg1); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_clean_vec(SCM rest) { #define FUNC_NAME "meep-clean-vec" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-clean-vec"); if (argc == 1) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { return _wrap_meep_clean_vec__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_clean_vec__SWIG_0(argc,argv); } } } scm_misc_error("meep-clean-vec", "No matching method for generic function `meep_clean_vec'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_iveccyl (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-iveccyl" int arg1 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (int) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = meep::iveccyl(arg1,arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_zero_ivec (SCM s_0) { #define FUNC_NAME "meep-zero-ivec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = meep::zero_ivec(arg1); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_one_ivec (SCM s_0) { #define FUNC_NAME "meep-one-ivec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = meep::one_ivec(arg1); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; result = (meep::ivec *)new meep::ivec(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (meep::ndim) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (meep::ivec *)new meep::ivec(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" meep::ndim arg1 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (meep::ndim) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (meep::ivec *)new meep::ivec(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (meep::ivec *)new meep::ivec(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" int arg1 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (meep::ivec *)new meep::ivec(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-ivec" int arg1 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec *result = 0 ; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = (meep::ivec *)new meep::ivec(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_ivec(SCM rest) { #define FUNC_NAME "new-meep-ivec" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-meep-ivec"); if (argc == 0) { return _wrap_new_meep_ivec__SWIG_0(argc,argv); } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_1(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_3(argc,argv); } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_2(argc,argv); } } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_4(argc,argv); } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_ivec__SWIG_5(argc,argv); } } } } scm_misc_error("new-meep-ivec", "No matching method for generic function `new_meep_ivec'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_ivec (SCM s_0) { #define FUNC_NAME "delete-meep-ivec" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_yucky_val (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-ivec-yucky-val" meep::ivec *arg1 = (meep::ivec *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (int)((meep::ivec const *)arg1)->yucky_val(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_dim_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-ivec-dim-set" meep::ivec *arg1 = (meep::ivec *) 0 ; meep::ndim arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::ndim) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->dim = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_dim_get (SCM s_0) { #define FUNC_NAME "meep-ivec-dim-get" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ndim result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (meep::ndim) ((arg1)->dim); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_r (SCM s_0) { #define FUNC_NAME "meep-ivec-r" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (int)((meep::ivec const *)arg1)->r(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_x (SCM s_0) { #define FUNC_NAME "meep-ivec-x" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (int)((meep::ivec const *)arg1)->x(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_y (SCM s_0) { #define FUNC_NAME "meep-ivec-y" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (int)((meep::ivec const *)arg1)->y(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_z (SCM s_0) { #define FUNC_NAME "meep-ivec-z" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = (int)((meep::ivec const *)arg1)->z(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-ivec-in-direction" meep::ivec *arg1 = (meep::ivec *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (int)((meep::ivec const *)arg1)->in_direction(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_set_direction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-ivec-set-direction" meep::ivec *arg1 = (meep::ivec *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } (arg1)->set_direction(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_ivec_round_up_to_even (SCM s_0) { #define FUNC_NAME "meep-ivec-round-up-to-even" meep::ivec *arg1 = (meep::ivec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__ivec, 1, 0); } result = ((meep::ivec const *)arg1)->round_up_to_even(); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_unit_ivec (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-unit-ivec" meep::ndim arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ndim) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = meep::unit_ivec(arg1,arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-max" meep::vec *arg1 = 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = meep::max((meep::vec const &)*arg1,(meep::vec const &)*arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_min__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-min" meep::vec *arg1 = 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = meep::min((meep::vec const &)*arg1,(meep::vec const &)*arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-max" meep::ivec *arg1 = 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = meep::max((meep::ivec const &)*arg1,(meep::ivec const &)*arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max(SCM rest) { #define FUNC_NAME "meep-max" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-max"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_max__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_max__SWIG_0(argc,argv); } } } scm_misc_error("meep-max", "No matching method for generic function `meep_max'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_min__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-min" meep::ivec *arg1 = 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__ivec, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = meep::min((meep::ivec const &)*arg1,(meep::ivec const &)*arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_min(SCM rest) { #define FUNC_NAME "meep-min" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-min"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_min__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_min__SWIG_0(argc,argv); } } } scm_misc_error("meep-min", "No matching method for generic function `meep_min'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_max_to_all__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-max-to-all" meep::ivec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::ivec *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__ivec, 1, 0); } result = meep::max_to_all((meep::ivec const &)*arg1); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_dim_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-dim-set" meep::volume *arg1 = (meep::volume *) 0 ; meep::ndim arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::ndim) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->dim = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_dim_get (SCM s_0) { #define FUNC_NAME "meep-volume-dim-get" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ndim result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (meep::ndim) ((arg1)->dim); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume" meep::ndim arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::ndim) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (meep::volume *)new meep::volume(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume" meep::vec *arg1 = 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = (meep::volume *)new meep::volume((meep::vec const &)*arg1,(meep::vec const &)*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume" meep::vec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(argv[0])); arg1 = &vec__arg1; result = (meep::volume *)new meep::volume((meep::vec const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume(SCM rest) { #define FUNC_NAME "new-meep-volume" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "new-meep-volume"); if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_new_meep_volume__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { return _wrap_new_meep_volume__SWIG_2(argc,argv); } } if (argc == 2) { int _v; { _v = SwigVector3_Check(argv[0]); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_new_meep_volume__SWIG_1(argc,argv); } } } scm_misc_error("new-meep-volume", "No matching method for generic function `new_meep_volume'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_volume_set_direction_min (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-volume-set-direction-min" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } (arg1)->set_direction_min(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_set_direction_max (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-volume-set-direction-max" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } (arg1)->set_direction_max(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_in_direction_min (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-in-direction-min" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (double)((meep::volume const *)arg1)->in_direction_min(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_in_direction_max (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-in-direction-max" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (double)((meep::volume const *)arg1)->in_direction_max(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-in-direction" meep::volume *arg1 = (meep::volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (double)((meep::volume const *)arg1)->in_direction(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_computational_volume (SCM s_0) { #define FUNC_NAME "meep-volume-computational-volume" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (double)((meep::volume const *)arg1)->computational_volume(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_integral_volume (SCM s_0) { #define FUNC_NAME "meep-volume-integral-volume" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (double)((meep::volume const *)arg1)->integral_volume(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_full_volume (SCM s_0) { #define FUNC_NAME "meep-volume-full-volume" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (double)((meep::volume const *)arg1)->full_volume(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_center (SCM s_0) { #define FUNC_NAME "meep-volume-center" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = ((meep::volume const *)arg1)->center(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_diameter (SCM s_0) { #define FUNC_NAME "meep-volume-diameter" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (double)((meep::volume const *)arg1)->diameter(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_contains__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-volume-contains" meep::volume *arg1 = (meep::volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = (bool)((meep::volume const *)arg1)->contains((meep::vec const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_contains__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-volume-contains" meep::volume *arg1 = (meep::volume *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } result = (bool)((meep::volume const *)arg1)->contains((meep::volume const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_contains(SCM rest) { #define FUNC_NAME "meep-volume-contains" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-volume-contains"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_volume_contains__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_volume_contains__SWIG_0(argc,argv); } } } scm_misc_error("meep-volume-contains", "No matching method for generic function `meep_volume_contains'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_volume_intersect_with (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-intersect-with" meep::volume *arg1 = (meep::volume *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = ((meep::volume const *)arg1)->intersect_with((meep::volume const &)*arg2); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_round_float (SCM s_0) { #define FUNC_NAME "meep-volume-round-float" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = ((meep::volume const *)arg1)->round_float(); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_intersects (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-intersects" meep::volume *arg1 = (meep::volume *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (bool)((meep::volume const *)arg1)->intersects((meep::volume const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_get_min_corner (SCM s_0) { #define FUNC_NAME "meep-volume-get-min-corner" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = ((meep::volume const *)arg1)->get_min_corner(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_get_max_corner (SCM s_0) { #define FUNC_NAME "meep-volume-get-max-corner" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = ((meep::volume const *)arg1)->get_max_corner(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_normal_direction (SCM s_0) { #define FUNC_NAME "meep-volume-normal-direction" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } result = (meep::direction)((meep::volume const *)arg1)->normal_direction(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_volume (SCM s_0) { #define FUNC_NAME "delete-meep-volume" meep::volume *arg1 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volcyl (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-volcyl" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } result = meep::volcyl(arg1,arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volone (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volone" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } result = meep::volone(arg1,arg2); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vol1d (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-vol1d" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } result = meep::vol1d(arg1,arg2); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_voltwo (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-voltwo" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } result = meep::voltwo(arg1,arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vol2d (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-vol2d" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } result = meep::vol2d(arg1,arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_vol3d (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-vol3d" double arg1 ; double arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } result = meep::vol3d(arg1,arg2,arg3,arg4); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_grid_volume () { #define FUNC_NAME "new-meep-grid-volume" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; result = (meep::grid_volume *)new meep::grid_volume(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dim_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-dim-set" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ndim arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ndim) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->dim = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dim_get (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dim-get" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ndim result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (meep::ndim) ((arg1)->dim); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-a-set" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_a_get (SCM s_0) { #define FUNC_NAME "meep-grid-volume-a-get" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_inva_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-inva-set" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->inva = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_inva_get (SCM s_0) { #define FUNC_NAME "meep-grid-volume-inva-get" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double) ((arg1)->inva); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_print (SCM s_0) { #define FUNC_NAME "meep-grid-volume-print" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } ((meep::grid_volume const *)arg1)->print(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_stride (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-stride" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (int)((meep::grid_volume const *)arg1)->stride(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_num_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-num-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (int)((meep::grid_volume const *)arg1)->num_direction(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yucky_num (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-yucky-num" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (int)((meep::grid_volume const *)arg1)->yucky_num(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yucky_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-yucky-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (meep::direction)((meep::grid_volume const *)arg1)->yucky_direction(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_num_direction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-set-num-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } (arg1)->set_num_direction(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nr (SCM s_0) { #define FUNC_NAME "meep-grid-volume-nr" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->nr(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nx (SCM s_0) { #define FUNC_NAME "meep-grid-volume-nx" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->nx(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ny (SCM s_0) { #define FUNC_NAME "meep-grid-volume-ny" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->ny(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nz (SCM s_0) { #define FUNC_NAME "meep-grid-volume-nz" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->nz(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_has_field (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-has-field" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (bool)((meep::grid_volume const *)arg1)->has_field(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_has_boundary (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-has-boundary" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::boundary_side arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::boundary_side) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = (int)((meep::grid_volume const *)arg1)->has_boundary(arg2,arg3); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dr (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dr" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->dr(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dx (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dx" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->dx(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dy (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dy" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->dy(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dz (SCM s_0) { #define FUNC_NAME "meep-grid-volume-dz" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->dz(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ntot (SCM s_0) { #define FUNC_NAME "meep-grid-volume-ntot" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->ntot(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nowned_min (SCM s_0) { #define FUNC_NAME "meep-grid-volume-nowned-min" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (int)((meep::grid_volume const *)arg1)->nowned_min(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_nowned (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-nowned" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (int)((meep::grid_volume const *)arg1)->nowned(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_index (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-index" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; meep::ivec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::ivec *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__ivec, 3, 0); } result = (int)((meep::grid_volume const *)arg1)->index(arg2,(meep::ivec const &)*arg3); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_round_vec (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-round-vec" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = ((meep::grid_volume const *)arg1)->round_vec((meep::vec const &)*arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_interpolate__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-interpolate" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; int *arg4 ; double *arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (double *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 5, 0); } ((meep::grid_volume const *)arg1)->interpolate(arg2,(meep::vec const &)*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_interpolate__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-interpolate" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; meep::ivec *arg4 ; double *arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; { arg4 = (meep::ivec *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__ivec, 4, 0); } { arg5 = (double *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 5, 0); } ((meep::grid_volume const *)arg1)->interpolate(arg2,(meep::vec const &)*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_interpolate(SCM rest) { #define FUNC_NAME "meep-grid-volume-interpolate" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-grid-volume-interpolate"); if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_interpolate__SWIG_0(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_interpolate__SWIG_1(argc,argv); } } } } } } scm_misc_error("meep-grid-volume-interpolate", "No matching method for generic function `meep_grid_volume_interpolate'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dV__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-dV" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->dV(arg2,arg3); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dV__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-dV" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->dV((meep::ivec const &)*arg2,arg3); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dV__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-dV" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = ((meep::grid_volume const *)arg1)->dV((meep::ivec const &)*arg2); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_dV(SCM rest) { #define FUNC_NAME "meep-grid-volume-dV" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-grid-volume-dV"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_dV__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_dV__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_dV__SWIG_0(argc,argv); } } } } scm_misc_error("meep-grid-volume-dV", "No matching method for generic function `meep_grid_volume_dV'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-intersect-with" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grid_volume, 2, 0); } { arg3 = (meep::grid_volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__grid_volume, 3, 0); } { arg4 = (meep::grid_volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__grid_volume, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2,arg3,arg4,arg5); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-intersect-with" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grid_volume, 2, 0); } { arg3 = (meep::grid_volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__grid_volume, 3, 0); } { arg4 = (meep::grid_volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__grid_volume, 4, 0); } result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2,arg3,arg4); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-intersect-with" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::grid_volume *arg2 = 0 ; meep::grid_volume *arg3 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grid_volume, 2, 0); } { arg3 = (meep::grid_volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__grid_volume, 3, 0); } result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2,arg3); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-intersect-with" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grid_volume, 2, 0); } result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_intersect_with(SCM rest) { #define FUNC_NAME "meep-grid-volume-intersect-with" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-grid-volume-intersect-with"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_intersect_with__SWIG_3(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_intersect_with__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_intersect_with__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_intersect_with__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-grid-volume-intersect-with", "No matching method for generic function `meep_grid_volume_intersect_with'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_rmin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-rmin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->rmin(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_rmax (SCM s_0) { #define FUNC_NAME "meep-grid-volume-rmax" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->rmax(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_xmin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-xmin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->xmin(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_xmax (SCM s_0) { #define FUNC_NAME "meep-grid-volume-xmax" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->xmax(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ymin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-ymin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->ymin(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ymax (SCM s_0) { #define FUNC_NAME "meep-grid-volume-ymax" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->ymax(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_zmin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-zmin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->zmin(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_zmax (SCM s_0) { #define FUNC_NAME "meep-grid-volume-zmax" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->zmax(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_center (SCM s_0) { #define FUNC_NAME "meep-grid-volume-center" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->center(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_icenter (SCM s_0) { #define FUNC_NAME "meep-grid-volume-icenter" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->icenter(); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_loc (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-loc" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->loc(arg2,arg3); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_loc_at_resolution (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-loc-at-resolution" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->loc_at_resolution(arg2,arg3); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_ntot_at_resolution (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-ntot-at-resolution" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } result = (int)((meep::grid_volume const *)arg1)->ntot_at_resolution(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_iloc (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-iloc" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->iloc(arg2,arg3); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yee_index (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-yee-index" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (int)((meep::grid_volume const *)arg1)->yee_index(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yee_shift (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-yee-shift" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->yee_shift(arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_eps_component (SCM s_0) { #define FUNC_NAME "meep-grid-volume-eps-component" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (meep::component)((meep::grid_volume const *)arg1)->eps_component(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_yee2cent_offsets (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-grid-volume-yee2cent-offsets" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; int *arg3 = 0 ; int *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } (arg1)->yee2cent_offsets(arg2,*arg3,*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_boundary_location (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-boundary-location" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::boundary_side arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::boundary_side) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = (double)((meep::grid_volume const *)arg1)->boundary_location(arg2,arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_big_corner (SCM s_0) { #define FUNC_NAME "meep-grid-volume-big-corner" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->big_corner(); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_little_corner (SCM s_0) { #define FUNC_NAME "meep-grid-volume-little-corner" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->little_corner(); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_corner (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-corner" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::boundary_side arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::boundary_side) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->corner(arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_contains__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-contains" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = (bool)((meep::grid_volume const *)arg1)->contains((meep::vec const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_contains__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-contains" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = (bool)((meep::grid_volume const *)arg1)->contains((meep::ivec const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_contains(SCM rest) { #define FUNC_NAME "meep-grid-volume-contains" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-grid-volume-contains"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_contains__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_grid_volume_contains__SWIG_0(argc,argv); } } } scm_misc_error("meep-grid-volume-contains", "No matching method for generic function `meep_grid_volume_contains'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_little_owned_corner0 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-little-owned-corner0" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->little_owned_corner0(arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_little_owned_corner (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-little-owned-corner" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->little_owned_corner(arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_owns (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-owns" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); } result = (bool)((meep::grid_volume const *)arg1)->owns((meep::ivec const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_surroundings (SCM s_0) { #define FUNC_NAME "meep-grid-volume-surroundings" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->surroundings(); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_interior (SCM s_0) { #define FUNC_NAME "meep-grid-volume-interior" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->interior(); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_get_boundary_icorners (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-grid-volume-get-boundary-icorners" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__ivec, 4, 0); } { arg5 = (meep::ivec *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_meep__ivec, 5, 0); } result = (bool)((meep::grid_volume const *)arg1)->get_boundary_icorners(arg2,arg3,arg4,arg5); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-split" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->split(arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-split-by-effort" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; int arg4 ; meep::grid_volume *arg5 = (meep::grid_volume *) 0 ; double *arg6 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (int) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } { arg5 = (meep::grid_volume *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__grid_volume, 5, 0); } { arg6 = (double *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_double, 6, 0); } result = ((meep::grid_volume const *)arg1)->split_by_effort(arg2,arg3,arg4,(meep::grid_volume const *)arg5,arg6); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-split-by-effort" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; int arg4 ; meep::grid_volume *arg5 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (int) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } { arg5 = (meep::grid_volume *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__grid_volume, 5, 0); } result = ((meep::grid_volume const *)arg1)->split_by_effort(arg2,arg3,arg4,(meep::grid_volume const *)arg5); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-split-by-effort" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; int arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (int) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->split_by_effort(arg2,arg3,arg4); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-split-by-effort" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->split_by_effort(arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_by_effort(SCM rest) { #define FUNC_NAME "meep-grid-volume-split-by-effort" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-grid-volume-split-by-effort"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_split_by_effort__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_split_by_effort__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_split_by_effort__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_split_by_effort__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-grid-volume-split-by-effort", "No matching method for generic function `meep_grid_volume_split_by_effort'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_split_at_fraction (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-grid-volume-split-at-fraction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; bool arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (bool) SCM_NFALSEP(s_1); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->split_at_fraction(arg2,arg3); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_halve (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-halve" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->halve(arg2); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_pad_self (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-pad-self" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->pad_self(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_pad__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-pad" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->pad(arg2); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_pad__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-pad" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->pad(); { meep::grid_volume * resultptr; resultptr = new meep::grid_volume((const meep::grid_volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__grid_volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_pad(SCM rest) { #define FUNC_NAME "meep-grid-volume-pad" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-grid-volume-pad"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_pad__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_pad__SWIG_0(argc,argv); } } } scm_misc_error("meep-grid-volume-pad", "No matching method for generic function `meep_grid_volume_pad'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_iyee_shift (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-iyee-shift" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = ((meep::grid_volume const *)arg1)->iyee_shift(arg2); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_get_origin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-get-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = ((meep::grid_volume const *)arg1)->get_origin(); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_origin__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-set-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; (arg1)->set_origin((meep::vec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_origin__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-set-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } (arg1)->set_origin((meep::ivec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_shift_origin__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-shift-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; (arg1)->shift_origin((meep::vec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_shift_origin__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-shift-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } (arg1)->shift_origin((meep::ivec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_shift_origin__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-shift-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } (arg1)->shift_origin(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_shift_origin(SCM rest) { #define FUNC_NAME "meep-grid-volume-shift-origin" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-grid-volume-shift-origin"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_shift_origin__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_grid_volume_shift_origin__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_shift_origin__SWIG_2(argc,argv); } } } } scm_misc_error("meep-grid-volume-shift-origin", "No matching method for generic function `meep_grid_volume_shift_origin'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_origin__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grid-volume-set-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } (arg1)->set_origin(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_set_origin(SCM rest) { #define FUNC_NAME "meep-grid-volume-set-origin" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-grid-volume-set-origin"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grid_volume_set_origin__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_grid_volume_set_origin__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_grid_volume_set_origin__SWIG_2(argc,argv); } } } } scm_misc_error("meep-grid-volume-set-origin", "No matching method for generic function `meep_grid_volume_set_origin'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_center_origin (SCM s_0) { #define FUNC_NAME "meep-grid-volume-center-origin" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } (arg1)->center_origin(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-origin-in-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (double)((meep::grid_volume const *)arg1)->origin_in_direction(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_iorigin_in_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grid-volume-iorigin-in-direction" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (int)((meep::grid_volume const *)arg1)->iorigin_in_direction(arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_r (SCM s_0) { #define FUNC_NAME "meep-grid-volume-origin-r" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->origin_r(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_x (SCM s_0) { #define FUNC_NAME "meep-grid-volume-origin-x" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->origin_x(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_y (SCM s_0) { #define FUNC_NAME "meep-grid-volume-origin-y" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->origin_y(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grid_volume_origin_z (SCM s_0) { #define FUNC_NAME "meep-grid-volume-origin-z" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } result = (double)((meep::grid_volume const *)arg1)->origin_z(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_grid_volume (SCM s_0) { #define FUNC_NAME "delete-meep-grid-volume" meep::grid_volume *arg1 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grid_volume, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_identity () { #define FUNC_NAME "meep-identity" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; result = meep::identity(); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_rotate4 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-rotate4" meep::direction arg1 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::direction) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } result = meep::rotate4(arg1,(meep::grid_volume const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_rotate2 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-rotate2" meep::direction arg1 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::direction) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } result = meep::rotate2(arg1,(meep::grid_volume const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_mirror (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-mirror" meep::direction arg1 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::direction) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } result = meep::mirror(arg1,(meep::grid_volume const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_r_to_minus_r_symmetry (SCM s_0) { #define FUNC_NAME "meep-r-to-minus-r-symmetry" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } result = meep::r_to_minus_r_symmetry(arg1); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_symmetry__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-symmetry" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry *result = 0 ; result = (meep::symmetry *)new meep::symmetry(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_symmetry__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-symmetry" meep::symmetry *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry *result = 0 ; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } result = (meep::symmetry *)new meep::symmetry((meep::symmetry const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_symmetry(SCM rest) { #define FUNC_NAME "new-meep-symmetry" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "new-meep-symmetry"); if (argc == 0) { return _wrap_new_meep_symmetry__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_symmetry__SWIG_1(argc,argv); } } scm_misc_error("new-meep-symmetry", "No matching method for generic function `new_meep_symmetry'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_symmetry (SCM s_0) { #define FUNC_NAME "delete-meep-symmetry" meep::symmetry *arg1 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::direction arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::signed_direction result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = ((meep::symmetry const *)arg1)->transform(arg2,arg3); { meep::signed_direction * resultptr; resultptr = new meep::signed_direction((const meep::signed_direction &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__signed_direction, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::ivec *arg2 = 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = ((meep::symmetry const *)arg1)->transform((meep::ivec const &)*arg2,arg3); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::vec *arg2 = 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = ((meep::symmetry const *)arg1)->transform((meep::vec const &)*arg2,arg3); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform_unshifted (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-symmetry-transform-unshifted" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::ivec *arg2 = 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::ivec result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = ((meep::symmetry const *)arg1)->transform_unshifted((meep::ivec const &)*arg2,arg3); { meep::ivec * resultptr; resultptr = new meep::ivec((const meep::ivec &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__ivec, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::volume *arg2 = 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = ((meep::symmetry const *)arg1)->transform((meep::volume const &)*arg2,arg3); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = (meep::component)((meep::symmetry const *)arg1)->transform(arg2,arg3); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_phase_shift__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-phase-shift" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = ((meep::symmetry const *)arg1)->phase_shift(arg2,arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::derived_component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::derived_component result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = (meep::derived_component)((meep::symmetry const *)arg1)->transform(arg2,arg3); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_phase_shift__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-phase-shift" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::derived_component arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = ((meep::symmetry const *)arg1)->phase_shift(arg2,arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-transform" meep::symmetry *arg1 = (meep::symmetry *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = (int)((meep::symmetry const *)arg1)->transform(arg2,arg3); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_transform(SCM rest) { #define FUNC_NAME "meep-symmetry-transform" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-symmetry-transform"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_3(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_4(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_5(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_6(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_transform__SWIG_2(argc,argv); } } } } scm_misc_error("meep-symmetry-transform", "No matching method for generic function `meep_symmetry_transform'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_symmetry_phase_shift__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-phase-shift" meep::symmetry *arg1 = (meep::symmetry *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = ((meep::symmetry const *)arg1)->phase_shift(arg2,arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_phase_shift(SCM rest) { #define FUNC_NAME "meep-symmetry-phase-shift" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-symmetry-phase-shift"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_phase_shift__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_phase_shift__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_symmetry_phase_shift__SWIG_2(argc,argv); } } } } scm_misc_error("meep-symmetry-phase-shift", "No matching method for generic function `meep_symmetry_phase_shift'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_symmetry_multiplicity (SCM s_0) { #define FUNC_NAME "meep-symmetry-multiplicity" meep::symmetry *arg1 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } result = (int)((meep::symmetry const *)arg1)->multiplicity(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_is_primitive (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-is-primitive" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); } result = (bool)((meep::symmetry const *)arg1)->is_primitive((meep::ivec const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_reduce (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-reduce" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume_list, 2, 0); } result = (meep::volume_list *)((meep::symmetry const *)arg1)->reduce((meep::volume_list const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_add (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-meep-symmetry-add" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::symmetry *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } result = ((meep::symmetry const *)arg1)->operator +((meep::symmetry const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_mul (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-meep-symmetry-mul" meep::symmetry *arg1 = (meep::symmetry *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } result = ((meep::symmetry const *)arg1)->operator *(arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_sub__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-meep-symmetry-sub" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::symmetry *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__symmetry, 2, 0); } result = ((meep::symmetry const *)arg1)->operator -((meep::symmetry const &)*arg2); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_sub__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-symmetry-meep-symmetry-sub" meep::symmetry *arg1 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__symmetry, 1, 0); } result = ((meep::symmetry const *)arg1)->operator -(); { meep::symmetry * resultptr; resultptr = new meep::symmetry((const meep::symmetry &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__symmetry, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_sub(SCM rest) { #define FUNC_NAME "meep-symmetry-meep-symmetry-sub" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-symmetry-meep-symmetry-sub"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_symmetry_meep_symmetry_sub__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_symmetry_meep_symmetry_sub__SWIG_0(argc,argv); } } } scm_misc_error("meep-symmetry-meep-symmetry-sub", "No matching method for generic function `meep_symmetry_meep_symmetry_sub'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_eq (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-meep-symmetry-eq" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::symmetry *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } result = (bool)((meep::symmetry const *)arg1)->operator ==((meep::symmetry const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_symmetry_meep_symmetry_neq (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-symmetry-meep-symmetry-neq" meep::symmetry *arg1 = (meep::symmetry *) 0 ; meep::symmetry *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::symmetry *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__symmetry, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } result = (bool)((meep::symmetry const *)arg1)->operator !=((meep::symmetry const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume_list__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume-list" meep::volume *arg1 = 0 ; int arg2 ; complex< double > arg3 ; meep::volume_list *arg4 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[2]); arg3 = std::complex(cnum.re, cnum.im); } { arg4 = (meep::volume_list *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume_list, 4, 0); } result = (meep::volume_list *)new meep::volume_list((meep::volume const &)*arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume_list__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume-list" meep::volume *arg1 = 0 ; int arg2 ; complex< double > arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[2]); arg3 = std::complex(cnum.re, cnum.im); } result = (meep::volume_list *)new meep::volume_list((meep::volume const &)*arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume_list__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-volume-list" meep::volume *arg1 = 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (meep::volume_list *)new meep::volume_list((meep::volume const &)*arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_volume_list(SCM rest) { #define FUNC_NAME "new-meep-volume-list" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "new-meep-volume-list"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_volume_list__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[2]); } if (_v) { return _wrap_new_meep_volume_list__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[2]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume_list, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_volume_list__SWIG_0(argc,argv); } } } } } scm_misc_error("new-meep-volume-list", "No matching method for generic function `new_meep_volume_list'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_volume_list (SCM s_0) { #define FUNC_NAME "delete-meep-volume-list" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-list-v-set" meep::volume_list *arg1 = (meep::volume_list *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_v_get (SCM s_0) { #define FUNC_NAME "meep-volume-list-v-get" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_c_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-list-c-set" meep::volume_list *arg1 = (meep::volume_list *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->c = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_c_get (SCM s_0) { #define FUNC_NAME "meep-volume-list-c-get" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } result = (int) ((arg1)->c); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_weight_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-list-weight-set" meep::volume_list *arg1 = (meep::volume_list *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } if (arg1) (arg1)->weight = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_weight_get (SCM s_0) { #define FUNC_NAME "meep-volume-list-weight-get" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } result = ((arg1)->weight); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-volume-list-next-set" meep::volume_list *arg1 = (meep::volume_list *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume_list, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_volume_list_next_get (SCM s_0) { #define FUNC_NAME "meep-volume-list-next-get" meep::volume_list *arg1 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume_list *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume_list, 1, 0); } result = (meep::volume_list *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_wall_time () { #define FUNC_NAME "meep-wall-time" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; result = (double)meep::wall_time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_initialize (SCM s_0, SCM s_1) { #define FUNC_NAME "new-meep-initialize" int *arg1 = 0 ; char ***arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::initialize *result = 0 ; { arg1 = (int *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_int, 1, 0); } { arg2 = (char ***)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_p_char, 2, 0); } result = (meep::initialize *)new meep::initialize(*arg1,*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__initialize, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_initialize (SCM s_0) { #define FUNC_NAME "delete-meep-initialize" meep::initialize *arg1 = (meep::initialize *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::initialize *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__initialize, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_initialize_elapsed_time (SCM s_0) { #define FUNC_NAME "meep-initialize-elapsed-time" meep::initialize *arg1 = (meep::initialize *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::initialize *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__initialize, 1, 0); } result = (double)(arg1)->elapsed_time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_all_wait () { #define FUNC_NAME "meep-all-wait" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::all_wait(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_count_processors () { #define FUNC_NAME "meep-count-processors" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; result = (int)meep::count_processors(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_my_rank () { #define FUNC_NAME "meep-my-rank" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; result = (int)meep::my_rank(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_am_really_master () { #define FUNC_NAME "meep-am-really-master" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; result = (bool)meep::am_really_master(); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_am_master () { #define FUNC_NAME "meep-am-master" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; result = (int)meep::am_master(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_send__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-send" int arg1 ; int arg2 ; double *arg3 = (double *) 0 ; int arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } { arg4 = (int) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } meep::send(arg1,arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_send__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-send" int arg1 ; int arg2 ; double *arg3 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } meep::send(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_send(SCM rest) { #define FUNC_NAME "meep-send" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-send"); if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_send__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_send__SWIG_0(argc,argv); } } } } } scm_misc_error("meep-send", "No matching method for generic function `meep_send'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; double *arg2 = (double *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (double *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_double, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } meep::broadcast(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; char *arg2 = (char *) 0 ; int arg3 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } meep::broadcast(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; int *arg2 = (int *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (int *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_int, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } meep::broadcast(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; complex< double > *arg2 = (complex< double > *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (complex< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_complexT_double_t, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } meep::broadcast(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[1]); arg2 = std::complex(cnum.re, cnum.im); } result = meep::broadcast(arg1,arg2); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = (double)meep::broadcast(arg1,arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (int)meep::broadcast(arg1,arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-broadcast" int arg1 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (bool) SCM_NFALSEP(argv[1]); } result = (bool)meep::broadcast(arg1,arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_broadcast(SCM rest) { #define FUNC_NAME "meep-broadcast" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-broadcast"); if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_7(argc,argv); } } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_6(argc,argv); } } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_5(argc,argv); } } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[1]); } if (_v) { return _wrap_meep_broadcast__SWIG_4(argc,argv); } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_2(argc,argv); } } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_3(argc,argv); } } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_broadcast__SWIG_1(argc,argv); } } } } scm_misc_error("meep-broadcast", "No matching method for generic function `meep_broadcast'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_max_to_master (SCM s_0) { #define FUNC_NAME "meep-max-to-master" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } result = (double)meep::max_to_master(arg1); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max_to_all__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-max-to-all" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } result = (double)meep::max_to_all(arg1); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max_to_all__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-max-to-all" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (int)meep::max_to_all(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_max_to_all(SCM rest) { #define FUNC_NAME "meep-max-to-all" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "meep-max-to-all"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_max_to_all__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_max_to_all__SWIG_2(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_max_to_all__SWIG_1(argc,argv); } } scm_misc_error("meep-max-to-all", "No matching method for generic function `meep_max_to_all'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_sum_to_master (SCM s_0) { #define FUNC_NAME "meep-sum-to-master" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } result = (double)meep::sum_to_master(arg1); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } result = (double)meep::sum_to_all(arg1); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" double *arg1 = (double *) 0 ; double *arg2 = (double *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (double *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_double, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_double, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } meep::sum_to_all((double const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" long double arg1 ; long double *argp1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; long double result; { argp1 = (long double *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_long_double, 1, 0); arg1 = *argp1; } result = (long double)meep::sum_to_all(arg1); { long double * resultptr; resultptr = new long double((const long double &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_long_double, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" complex< double > arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } result = meep::sum_to_all(arg1); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" complex< long double > arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< long double > result; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } result = meep::sum_to_all(arg1); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-sum-to-all" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } result = (int)meep::sum_to_all(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_sum_to_all(SCM rest) { #define FUNC_NAME "meep-sum-to-all" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-sum-to-all"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_long_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_sum_to_all__SWIG_2(argc,argv); } } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_complexT_long_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_sum_to_all__SWIG_4(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_sum_to_all__SWIG_5(argc,argv); } } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_sum_to_all__SWIG_0(argc,argv); } } if (argc == 1) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { return _wrap_meep_sum_to_all__SWIG_3(argc,argv); } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_sum_to_all__SWIG_1(argc,argv); } } } } scm_misc_error("meep-sum-to-all", "No matching method for generic function `meep_sum_to_all'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_partial_sum_to_all (SCM s_0) { #define FUNC_NAME "meep-partial-sum-to-all" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (int)meep::partial_sum_to_all(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_or_to_all__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-or-to-all" bool arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (bool) SCM_NFALSEP(argv[0]); } result = (bool)meep::or_to_all(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_or_to_all__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-or-to-all" int *arg1 = (int *) 0 ; int *arg2 = (int *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_int, 1, 0); } { arg2 = (int *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_int, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } meep::or_to_all((int const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_or_to_all(SCM rest) { #define FUNC_NAME "meep-or-to-all" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-or-to-all"); if (argc == 1) { int _v; { _v = SCM_BOOLP(argv[0]) ? 1 : 0; } if (_v) { return _wrap_meep_or_to_all__SWIG_0(argc,argv); } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_or_to_all__SWIG_1(argc,argv); } } } } scm_misc_error("meep-or-to-all", "No matching method for generic function `meep_or_to_all'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_and_to_all__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-and-to-all" bool arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (bool) SCM_NFALSEP(argv[0]); } result = (bool)meep::and_to_all(arg1); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_and_to_all__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-and-to-all" int *arg1 = (int *) 0 ; int *arg2 = (int *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_int, 1, 0); } { arg2 = (int *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_int, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } meep::and_to_all((int const *)arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_and_to_all(SCM rest) { #define FUNC_NAME "meep-and-to-all" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-and-to-all"); if (argc == 1) { int _v; { _v = SCM_BOOLP(argv[0]) ? 1 : 0; } if (_v) { return _wrap_meep_and_to_all__SWIG_0(argc,argv); } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_and_to_all__SWIG_1(argc,argv); } } } } scm_misc_error("meep-and-to-all", "No matching method for generic function `meep_and_to_all'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_master_printf (SCM s_0) { #define FUNC_NAME "meep-master-printf" char *arg1 = (char *) 0 ; void *arg2 = 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } meep::master_printf((char const *)arg1,arg2); gswig_result = SCM_UNSPECIFIED; if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_debug_printf (SCM s_0) { #define FUNC_NAME "meep-debug-printf" char *arg1 = (char *) 0 ; void *arg2 = 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } meep::debug_printf((char const *)arg1,arg2); gswig_result = SCM_UNSPECIFIED; if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_master_fprintf (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-master-fprintf" FILE *arg1 = (FILE *) 0 ; char *arg2 = (char *) 0 ; void *arg3 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (FILE *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_FILE, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } meep::master_fprintf(arg1,(char const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_master_fopen (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-master-fopen" char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int must_free1 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; FILE *result = 0 ; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } result = (FILE *)meep::master_fopen((char const *)arg1,(char const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_FILE, 0); } if (must_free1 && arg1) SWIG_free(arg1); if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_master_fclose (SCM s_0) { #define FUNC_NAME "meep-master-fclose" FILE *arg1 = (FILE *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (FILE *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_FILE, 1, 0); } meep::master_fclose(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_begin_critical_section (SCM s_0) { #define FUNC_NAME "meep-begin-critical-section" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } meep::begin_critical_section(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_end_critical_section (SCM s_0) { #define FUNC_NAME "meep-end-critical-section" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } meep::end_critical_section(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_divide_parallel_processes (SCM s_0) { #define FUNC_NAME "meep-divide-parallel-processes" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (int) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } result = (int)meep::divide_parallel_processes(arg1); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_begin_global_communications () { #define FUNC_NAME "meep-begin-global-communications" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::begin_global_communications(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_end_global_communications () { #define FUNC_NAME "meep-end-global-communications" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::end_global_communications(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_end_divide_parallel () { #define FUNC_NAME "meep-end-divide-parallel" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::end_divide_parallel(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_MEEP_SINGLE(SCM s_0) { #define FUNC_NAME "MEEP-SINGLE" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_MEEP_SINGLE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_quiet(SCM s_0) { #define FUNC_NAME "quiet" SCM gswig_result; if (s_0 != SCM_UNDEFINED) { { meep::quiet = (bool) SCM_NFALSEP(s_0); } } { gswig_result = SCM_BOOL(meep::quiet); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_pi(SCM s_0) { #define FUNC_NAME "pi" SCM gswig_result; { gswig_result = scm_make_real(meep::pi); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_infinity(SCM s_0) { #define FUNC_NAME "infinity" SCM gswig_result; { gswig_result = scm_make_real(meep::infinity); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_nan(SCM s_0) { #define FUNC_NAME "nan" SCM gswig_result; { gswig_result = scm_make_real(meep::nan); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_polarizability_identifier_ft_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-polarizability-identifier-ft-set" meep::polarizability_identifier *arg1 = (meep::polarizability_identifier *) 0 ; meep::field_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::polarizability_identifier *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarizability_identifier, 1, 0); } { arg2 = (meep::field_type) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->ft = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_polarizability_identifier_ft_get (SCM s_0) { #define FUNC_NAME "meep-polarizability-identifier-ft-get" meep::polarizability_identifier *arg1 = (meep::polarizability_identifier *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::field_type result; { arg1 = (meep::polarizability_identifier *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarizability_identifier, 1, 0); } result = (meep::field_type) ((arg1)->ft); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_polarizability_identifier_gamma_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-polarizability-identifier-gamma-set" meep::polarizability_identifier *arg1 = (meep::polarizability_identifier *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::polarizability_identifier *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarizability_identifier, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->gamma = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_polarizability_identifier_gamma_get (SCM s_0) { #define FUNC_NAME "meep-polarizability-identifier-gamma-get" meep::polarizability_identifier *arg1 = (meep::polarizability_identifier *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::polarizability_identifier *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarizability_identifier, 1, 0); } result = (double) ((arg1)->gamma); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_polarizability_identifier_omeganot_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-polarizability-identifier-omeganot-set" meep::polarizability_identifier *arg1 = (meep::polarizability_identifier *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::polarizability_identifier *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarizability_identifier, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->omeganot = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_polarizability_identifier_omeganot_get (SCM s_0) { #define FUNC_NAME "meep-polarizability-identifier-omeganot-get" meep::polarizability_identifier *arg1 = (meep::polarizability_identifier *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::polarizability_identifier *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarizability_identifier, 1, 0); } result = (double) ((arg1)->omeganot); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_polarizability_identifier () { #define FUNC_NAME "new-meep-polarizability-identifier" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarizability_identifier *result = 0 ; result = (meep::polarizability_identifier *)new meep::polarizability_identifier(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__polarizability_identifier, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_polarizability_identifier (SCM s_0) { #define FUNC_NAME "delete-meep-polarizability-identifier" meep::polarizability_identifier *arg1 = (meep::polarizability_identifier *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::polarizability_identifier *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__polarizability_identifier, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_READONLY(SCM s_0) { #define FUNC_NAME "meep-h5file-READONLY" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_h5file_READONLY); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_READWRITE(SCM s_0) { #define FUNC_NAME "meep-h5file-READWRITE" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_h5file_READWRITE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_WRITE(SCM s_0) { #define FUNC_NAME "meep-h5file-WRITE" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_h5file_WRITE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_h5file__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-h5file" char *arg1 = (char *) 0 ; meep::h5file::access_mode arg2 ; bool arg3 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } { arg2 = (meep::h5file::access_mode) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } result = (meep::h5file *)new meep::h5file((char const *)arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_h5file__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-h5file" char *arg1 = (char *) 0 ; meep::h5file::access_mode arg2 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } { arg2 = (meep::h5file::access_mode) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (meep::h5file *)new meep::h5file((char const *)arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_h5file__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-h5file" char *arg1 = (char *) 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } result = (meep::h5file *)new meep::h5file((char const *)arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_h5file(SCM rest) { #define FUNC_NAME "new-meep-h5file" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-meep-h5file"); if (argc == 1) { int _v; { _v = SCM_STRINGP(argv[0]) ? 1 : 0; } if (_v) { return _wrap_new_meep_h5file__SWIG_2(argc,argv); } } if (argc == 2) { int _v; { _v = SCM_STRINGP(argv[0]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_h5file__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = SCM_STRINGP(argv[0]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_new_meep_h5file__SWIG_0(argc,argv); } } } } scm_misc_error("new-meep-h5file", "No matching method for generic function `new_meep_h5file'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_h5file (SCM s_0) { #define FUNC_NAME "delete-meep-h5file" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_ok (SCM s_0) { #define FUNC_NAME "meep-h5file-ok" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } result = (bool)(arg1)->ok(); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-read" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; int arg5 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *result = 0 ; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } result = (meep::realnum *)(arg1)->read((char const *)arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_write__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-write" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; meep::realnum *arg5 = (meep::realnum *) 0 ; bool arg6 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (meep::realnum *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 5, 0); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } (arg1)->write((char const *)arg2,arg3,(int const *)arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_write__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-write" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; meep::realnum *arg5 = (meep::realnum *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (meep::realnum *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 5, 0); } (arg1)->write((char const *)arg2,arg3,(int const *)arg4,arg5); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-read" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (char *)(arg1)->read((char const *)arg2); { gswig_result = scm_makfrom0str((const char *)result); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read(SCM rest) { #define FUNC_NAME "meep-h5file-read" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-h5file-read"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_read__SWIG_1(argc,argv); } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_read__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-h5file-read", "No matching method for generic function `meep_h5file_read'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_h5file_write__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-write" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int must_free2 = 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->write((char const *)arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_write(SCM rest) { #define FUNC_NAME "meep-h5file-write" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-h5file-write"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_write__SWIG_2(argc,argv); } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_h5file_write__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_write__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-h5file-write", "No matching method for generic function `meep_h5file_write'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_data__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-create-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; bool arg5 ; bool arg6 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (bool) SCM_NFALSEP(argv[4]); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } (arg1)->create_data((char const *)arg2,arg3,(int const *)arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_data__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-create-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; bool arg5 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } { arg5 = (bool) SCM_NFALSEP(argv[4]); } (arg1)->create_data((char const *)arg2,arg3,(int const *)arg4,arg5); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_data__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-h5file-create-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (int *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_int, 4, 0); } (arg1)->create_data((char const *)arg2,arg3,(int const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_data(SCM rest) { #define FUNC_NAME "meep-h5file-create-data" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-h5file-create-data"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_h5file_create_data__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_create_data__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_h5file_create_data__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-h5file-create-data", "No matching method for generic function `meep_h5file_create_data'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_h5file_extend_data (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-h5file-extend-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } (arg1)->extend_data((char const *)arg2,arg3,(int const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_create_or_extend_data (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-h5file-create-or-extend-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; bool arg5 ; bool arg6 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } { arg5 = (bool) SCM_NFALSEP(s_4); } { arg6 = (bool) SCM_NFALSEP(s_5); } (arg1)->create_or_extend_data((char const *)arg2,arg3,(int const *)arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_write_chunk (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-h5file-write-chunk" meep::h5file *arg1 = (meep::h5file *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; meep::realnum *arg5 = (meep::realnum *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } { arg5 = (meep::realnum *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_double, 5, 0); } (arg1)->write_chunk(arg2,(int const *)arg3,(int const *)arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_done_writing_chunks (SCM s_0) { #define FUNC_NAME "meep-h5file-done-writing-chunks" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } (arg1)->done_writing_chunks(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read_size (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-h5file-read-size" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; int arg5 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } { arg5 = (int) scm_num2int(s_4, SCM_ARG1, FUNC_NAME); } (arg1)->read_size((char const *)arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_read_chunk (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-h5file-read-chunk" meep::h5file *arg1 = (meep::h5file *) 0 ; int arg2 ; int *arg3 = (int *) 0 ; int *arg4 = (int *) 0 ; meep::realnum *arg5 = (meep::realnum *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (int *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_int, 4, 0); } { arg5 = (meep::realnum *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_double, 5, 0); } (arg1)->read_chunk(arg2,(int const *)arg3,(int const *)arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_remove (SCM s_0) { #define FUNC_NAME "meep-h5file-remove" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } (arg1)->remove(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_remove_data (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-h5file-remove-data" meep::h5file *arg1 = (meep::h5file *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->remove_data((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_file_name (SCM s_0) { #define FUNC_NAME "meep-h5file-file-name" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } result = (char *)((meep::h5file const *)arg1)->file_name(); { gswig_result = scm_makfrom0str((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_h5file_prevent_deadlock (SCM s_0) { #define FUNC_NAME "meep-h5file-prevent-deadlock" meep::h5file *arg1 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::h5file *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__h5file, 1, 0); } (arg1)->prevent_deadlock(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_DEFAULT_SUBPIXEL_TOL(SCM s_0) { #define FUNC_NAME "DEFAULT-SUBPIXEL-TOL" SCM gswig_result; { gswig_result = scm_make_real(gswig_const_DEFAULT_SUBPIXEL_TOL); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_DEFAULT_SUBPIXEL_MAXEVAL(SCM s_0) { #define FUNC_NAME "DEFAULT-SUBPIXEL-MAXEVAL" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_DEFAULT_SUBPIXEL_MAXEVAL); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_material_function () { #define FUNC_NAME "new-meep-material-function" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::material_function *result = 0 ; result = (meep::material_function *)new meep::material_function(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__material_function, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_material_function (SCM s_0) { #define FUNC_NAME "delete-meep-material-function" meep::material_function *arg1 = (meep::material_function *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_set_volume (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-set-volume" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } (arg1)->set_volume((meep::volume const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_unset_volume (SCM s_0) { #define FUNC_NAME "meep-material-function-unset-volume" meep::material_function *arg1 = (meep::material_function *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } (arg1)->unset_volume(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_chi1p1 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-chi1p1" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::field_type arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::field_type) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi1p1(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eps (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-eps" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)(arg1)->eps((meep::vec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_has_mu (SCM s_0) { #define FUNC_NAME "meep-material-function-has-mu" meep::material_function *arg1 = (meep::material_function *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } result = (bool)(arg1)->has_mu(); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_mu (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-mu" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)(arg1)->mu((meep::vec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_has_conductivity (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-has-conductivity" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->has_conductivity(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_conductivity (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-conductivity" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->conductivity(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_normal_vector (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-normal-vector" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::field_type arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::field_type) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (arg1)->normal_vector(arg2,(meep::volume const &)*arg3); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eff_chi1inv_row__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-material-function-eff-chi1inv-row" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::volume *arg4 = 0 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eff_chi1inv_row__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-material-function-eff-chi1inv-row" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::volume *arg4 = 0 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eff_chi1inv_row__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-material-function-eff-chi1inv-row" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::volume *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_eff_chi1inv_row(SCM rest) { #define FUNC_NAME "meep-material-function-eff-chi1inv-row" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-material-function-eff-chi1inv-row"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_material_function_eff_chi1inv_row__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_material_function_eff_chi1inv_row__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_material_function_eff_chi1inv_row__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-material-function-eff-chi1inv-row", "No matching method for generic function `meep_material_function_eff_chi1inv_row'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_material_function_sigma_row (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-material-function-sigma-row" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_double, 3, 0); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); arg4 = &vec__arg4; (arg1)->sigma_row(arg2,arg3,(meep::vec const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_set_polarizability (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-material-function-set-polarizability" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::field_type arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::field_type) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } (arg1)->set_polarizability(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_has_chi3 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-has-chi3" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->has_chi3(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_chi3 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-chi3" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi3(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_has_chi2 (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-material-function-has-chi2" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->has_chi2(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_material_function_chi2 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-material-function-chi2" meep::material_function *arg1 = (meep::material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi2(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_simple_material_function (SCM s_0) { #define FUNC_NAME "new-meep-simple-material-function" double (*arg1)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::simple_material_function *result = 0 ; { arg1 = (double (*)(meep::vec const &))SWIG_MustGetPtr(s_0, SWIGTYPE_p_f_r_q_const__meep__vec__double, 1, 0); } result = (meep::simple_material_function *)new meep::simple_material_function(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__simple_material_function, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_simple_material_function (SCM s_0) { #define FUNC_NAME "delete-meep-simple-material-function" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_chi1p1 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-simple-material-function-chi1p1" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::field_type arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::field_type) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi1p1(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_eps (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-simple-material-function-eps" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)(arg1)->eps((meep::vec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_mu (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-simple-material-function-mu" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)(arg1)->mu((meep::vec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_conductivity (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-simple-material-function-conductivity" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->conductivity(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_sigma_row (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-simple-material-function-sigma-row" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::component arg2 ; double *arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_double, 3, 0); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); arg4 = &vec__arg4; (arg1)->sigma_row(arg2,arg3,(meep::vec const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_chi3 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-simple-material-function-chi3" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi3(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_simple_material_function_chi2 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-simple-material-function-chi2" meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::simple_material_function *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__simple_material_function, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->chi2(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-a-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_a_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-a-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_Courant_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-Courant-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->Courant = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_Courant_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-Courant-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double) ((arg1)->Courant); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_dt_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-dt-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->dt = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_dt_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-dt-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double) ((arg1)->dt); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi3_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-chi3-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_double, 2, 0); } { size_t ii; meep::realnum * *b = (meep::realnum * *) arg1->chi3; for (ii = 0; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ii++) b[ii] = *((meep::realnum * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi3_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-chi3-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum **)(meep::realnum **) ((arg1)->chi3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi2_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-chi2-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_double, 2, 0); } { size_t ii; meep::realnum * *b = (meep::realnum * *) arg1->chi2; for (ii = 0; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ii++) b[ii] = *((meep::realnum * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi2_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-chi2-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum **)(meep::realnum **) ((arg1)->chi2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi1inv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-chi1inv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum *(*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__p_double, 2, 0); } { meep::realnum * (*inp)[5] = (meep::realnum * (*)[5])(arg2); meep::realnum * (*dest)[5] = (meep::realnum * (*)[5])(arg1->chi1inv); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_chi1inv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-chi1inv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[5] = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->chi1inv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_trivial_chi1inv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-trivial-chi1inv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; bool (*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (bool (*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__bool, 2, 0); } { bool (*inp)[5] = (bool (*)[5])(arg2); bool (*dest)[5] = (bool (*)[5])(arg1->trivial_chi1inv); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { bool *ip = inp[ii]; bool *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_trivial_chi1inv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-trivial-chi1inv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool (*result)[5] = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (bool (*)[5])(bool (*)[5]) ((arg1)->trivial_chi1inv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__bool, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_conductivity_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-conductivity-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum *(*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__p_double, 2, 0); } { meep::realnum * (*inp)[5] = (meep::realnum * (*)[5])(arg2); meep::realnum * (*dest)[5] = (meep::realnum * (*)[5])(arg1->conductivity); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_conductivity_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-conductivity-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[5] = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->conductivity); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_condinv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-condinv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::realnum *(*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__p_double, 2, 0); } { meep::realnum * (*inp)[5] = (meep::realnum * (*)[5])(arg2); meep::realnum * (*dest)[5] = (meep::realnum * (*)[5])(arg1->condinv); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_condinv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-condinv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[5] = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->condinv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_condinv_stale_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-condinv-stale-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (bool) SCM_NFALSEP(s_1); } if (arg1) (arg1)->condinv_stale = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_condinv_stale_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-condinv-stale-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (bool) ((arg1)->condinv_stale); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_sig_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-sig-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_double, 2, 0); } { size_t ii; double * *b = (double * *) arg1->sig; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((double * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_sig_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-sig-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double **)(double **) ((arg1)->sig); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_siginv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-siginv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; double **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (double **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_double, 2, 0); } { size_t ii; double * *b = (double * *) arg1->siginv; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((double * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_siginv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-siginv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double **result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double **)(double **) ((arg1)->siginv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_sigsize_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-sigsize-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; int *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (int *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_int, 2, 0); } { size_t ii; int *b = (int *) arg1->sigsize; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((int *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_sigsize_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-sigsize-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (int *)(int *) ((arg1)->sigsize); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_int, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_gv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-gv-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->gv = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_gv_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-gv-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::grid_volume *)& ((arg1)->gv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-v-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_v_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-v-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_pb_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-pb-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::polarizability *arg2 = (meep::polarizability *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::polarizability *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__polarizability, 2, 0); } if (arg1) (arg1)->pb = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_pb_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-pb-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarizability *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::polarizability *) ((arg1)->pb); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__polarizability, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_refcount_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunk-refcount-set" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->refcount = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_refcount_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-refcount-get" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (int) ((arg1)->refcount); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_structure_chunk (SCM s_0) { #define FUNC_NAME "delete-meep-structure-chunk" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure_chunk__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure-chunk" meep::grid_volume *arg1 = 0 ; meep::volume *arg2 = 0 ; double arg3 ; int arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (int) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } result = (meep::structure_chunk *)new meep::structure_chunk((meep::grid_volume const &)*arg1,(meep::volume const &)*arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure_chunk, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure_chunk__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure-chunk" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (meep::structure_chunk *)new meep::structure_chunk((meep::structure_chunk const *)arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure_chunk, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure_chunk(SCM rest) { #define FUNC_NAME "new-meep-structure-chunk" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "new-meep-structure-chunk"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure_chunk__SWIG_1(argc,argv); } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure_chunk__SWIG_0(argc,argv); } } } } } scm_misc_error("new-meep-structure-chunk", "No matching method for generic function `new_meep_structure_chunk'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_set_chi1inv (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-structure-chunk-set-chi1inv" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; bool arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__material_function, 3, 0); } { arg4 = (bool) SCM_NFALSEP(s_3); } { arg5 = (double) scm_num2dbl(s_4, FUNC_NAME); } { arg6 = (int) scm_num2int(s_5, SCM_ARG1, FUNC_NAME); } (arg1)->set_chi1inv(arg2,*arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_has_chi1inv (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-has-chi1inv" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = (bool)((meep::structure_chunk const *)arg1)->has_chi1inv(arg2,arg3); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_set_conductivity (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-set-conductivity" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_conductivity(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_update_condinv (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-update-condinv" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } (arg1)->update_condinv(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_set_chi3 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-set-chi3" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi3(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_set_chi2 (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-set-chi2" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi2(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_use_pml (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7) { #define FUNC_NAME "meep-structure-chunk-use-pml" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::direction arg2 ; double arg3 ; double arg4 ; double arg5 ; meep::pml_profile_func arg6 = (meep::pml_profile_func) 0 ; void *arg7 = (void *) 0 ; double arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } { arg5 = (double) scm_num2dbl(s_4, FUNC_NAME); } { arg6 = (meep::pml_profile_func)SWIG_MustGetPtr(s_5, SWIGTYPE_p_f_double_p_void__double, 6, 0); } { arg7 = (void *)SWIG_MustGetPtr(s_6, NULL, 7, 0); } { arg8 = (double) scm_num2dbl(s_7, FUNC_NAME); } (arg1)->use_pml(arg2,arg3,arg4,arg5,arg6,arg7,arg8); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_add_polarizability (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-structure-chunk-add-polarizability" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::material_function *arg2 = 0 ; meep::field_type arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::field_type) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } { arg5 = (double) scm_num2dbl(s_4, FUNC_NAME); } (arg1)->add_polarizability(*arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_mix_with (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-chunk-mix-with" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::structure_chunk *arg2 = (meep::structure_chunk *) 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::structure_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure_chunk, 2, 0); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } (arg1)->mix_with((meep::structure_chunk const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_n_proc (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-n-proc" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (int)((meep::structure_chunk const *)arg1)->n_proc(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_is_mine (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-is-mine" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (int)((meep::structure_chunk const *)arg1)->is_mine(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_remove_polarizabilities (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-remove-polarizabilities" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } (arg1)->remove_polarizabilities(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_get_chi1inv (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-structure-chunk-get-chi1inv" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::structure_chunk const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_get_inveps (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-structure-chunk-get-inveps" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::structure_chunk const *)arg1)->get_inveps(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunk_max_eps (SCM s_0) { #define FUNC_NAME "meep-structure-chunk-max-eps" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure_chunk, 1, 0); } result = (double)((meep::structure_chunk const *)arg1)->max_eps(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml_quadratic_profile (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-pml-quadratic-profile" double arg1 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (void *)SWIG_MustGetPtr(s_1, NULL, 2, 0); } result = (double)meep::pml_quadratic_profile(arg1,arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_NOTHING_SPECIAL(SCM s_0) { #define FUNC_NAME "meep-boundary-region-NOTHING-SPECIAL" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_boundary_region_NOTHING_SPECIAL); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_PML(SCM s_0) { #define FUNC_NAME "meep-boundary-region-PML" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_boundary_region_PML); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-boundary-region" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region *result = 0 ; result = (meep::boundary_region *)new meep::boundary_region(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-boundary-region" meep::boundary_region::boundary_region_kind arg1 ; double arg2 ; double arg3 ; meep::pml_profile_func arg4 = (meep::pml_profile_func) 0 ; void *arg5 = (void *) 0 ; double arg6 ; meep::direction arg7 ; meep::boundary_side arg8 ; meep::boundary_region *arg9 = (meep::boundary_region *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region *result = 0 ; { arg1 = (meep::boundary_region::boundary_region_kind) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (meep::pml_profile_func)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_f_double_p_void__double, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(argv[4], NULL, 5, 0); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (meep::direction) scm_num2int(argv[6], SCM_ARG1, FUNC_NAME); } { arg8 = (meep::boundary_side) scm_num2int(argv[7], SCM_ARG1, FUNC_NAME); } { arg9 = (meep::boundary_region *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__boundary_region, 9, 0); } result = (meep::boundary_region *)new meep::boundary_region(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-boundary-region" meep::boundary_region::boundary_region_kind arg1 ; double arg2 ; double arg3 ; meep::pml_profile_func arg4 = (meep::pml_profile_func) 0 ; void *arg5 = (void *) 0 ; double arg6 ; meep::direction arg7 ; meep::boundary_side arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region *result = 0 ; { arg1 = (meep::boundary_region::boundary_region_kind) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (meep::pml_profile_func)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_f_double_p_void__double, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(argv[4], NULL, 5, 0); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (meep::direction) scm_num2int(argv[6], SCM_ARG1, FUNC_NAME); } { arg8 = (meep::boundary_side) scm_num2int(argv[7], SCM_ARG1, FUNC_NAME); } result = (meep::boundary_region *)new meep::boundary_region(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-boundary-region" meep::boundary_region *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region *result = 0 ; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__boundary_region, 1, 0); } result = (meep::boundary_region *)new meep::boundary_region((meep::boundary_region const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_boundary_region(SCM rest) { #define FUNC_NAME "new-meep-boundary-region" SCM argv[9]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 9, "new-meep-boundary-region"); if (argc == 0) { return _wrap_new_meep_boundary_region__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_boundary_region__SWIG_3(argc,argv); } } if (argc == 8) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_f_double_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[6])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[7])) ? 1 : 0; } if (_v) { return _wrap_new_meep_boundary_region__SWIG_2(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_f_double_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[6])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[7])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_boundary_region__SWIG_1(argc,argv); } } } } } } } } } } scm_misc_error("new-meep-boundary-region", "No matching method for generic function `new_meep_boundary_region'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_boundary_region (SCM s_0) { #define FUNC_NAME "delete-meep-boundary-region" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__boundary_region, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_meep_boundary_region_add (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-boundary-region-meep-boundary-region-add" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; meep::boundary_region *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (meep::boundary_region *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__boundary_region, 2, 0); } result = ((meep::boundary_region const *)arg1)->operator +((meep::boundary_region const &)*arg2); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_meep_boundary_region_mul (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-boundary-region-meep-boundary-region-mul" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } result = ((meep::boundary_region const *)arg1)->operator *(arg2); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_apply__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-boundary-region-apply" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; meep::structure *arg2 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__structure, 2, 0); } ((meep::boundary_region const *)arg1)->apply(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_apply__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-boundary-region-apply" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; meep::structure *arg2 = (meep::structure *) 0 ; meep::structure_chunk *arg3 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__structure, 2, 0); } { arg3 = (meep::structure_chunk *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__structure_chunk, 3, 0); } ((meep::boundary_region const *)arg1)->apply((meep::structure const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_apply(SCM rest) { #define FUNC_NAME "meep-boundary-region-apply" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-boundary-region-apply"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_boundary_region_apply__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__structure_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_boundary_region_apply__SWIG_1(argc,argv); } } } } scm_misc_error("meep-boundary-region-apply", "No matching method for generic function `meep_boundary_region_apply'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_boundary_region_check_ok (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-boundary-region-check-ok" meep::boundary_region *arg1 = (meep::boundary_region *) 0 ; meep::grid_volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::boundary_region *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__boundary_region, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } result = (bool)((meep::boundary_region const *)arg1)->check_ok((meep::grid_volume const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; meep::direction arg2 ; meep::boundary_side arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::boundary_side) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = meep::pml(arg1,arg2,arg3); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = meep::pml(arg1,arg2); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-pml" double arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_region result; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } result = meep::pml(arg1); { meep::boundary_region * resultptr; resultptr = new meep::boundary_region((const meep::boundary_region &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__boundary_region, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_pml(SCM rest) { #define FUNC_NAME "meep-pml" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-pml"); if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_2(argc,argv); } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_pml__SWIG_0(argc,argv); } } } } scm_misc_error("meep-pml", "No matching method for generic function `meep_pml'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-chunks-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::structure_chunk **arg2 = (meep::structure_chunk **) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::structure_chunk **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__structure_chunk, 2, 0); } if (arg1) (arg1)->chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_chunks_get (SCM s_0) { #define FUNC_NAME "meep-structure-chunks-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk **result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::structure_chunk **) ((arg1)->chunks); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__structure_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_num_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-num-chunks-set" meep::structure *arg1 = (meep::structure *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->num_chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_num_chunks_get (SCM s_0) { #define FUNC_NAME "meep-structure-num-chunks-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (int) ((arg1)->num_chunks); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_gv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-gv-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->gv = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_gv_get (SCM s_0) { #define FUNC_NAME "meep-structure-gv-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::grid_volume *)& ((arg1)->gv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_user_volume_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-user-volume-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->user_volume = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_user_volume_get (SCM s_0) { #define FUNC_NAME "meep-structure-user-volume-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::grid_volume *)& ((arg1)->user_volume); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-a-set" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_a_get (SCM s_0) { #define FUNC_NAME "meep-structure-a-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_Courant_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-Courant-set" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->Courant = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_Courant_get (SCM s_0) { #define FUNC_NAME "meep-structure-Courant-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double) ((arg1)->Courant); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_dt_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-dt-set" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->dt = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_dt_get (SCM s_0) { #define FUNC_NAME "meep-structure-dt-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double) ((arg1)->dt); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-v-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_v_get (SCM s_0) { #define FUNC_NAME "meep-structure-v-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_S_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-S-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::symmetry *arg2 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } if (arg1) (arg1)->S = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_S_get (SCM s_0) { #define FUNC_NAME "meep-structure-S-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::symmetry *)& ((arg1)->S); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__symmetry, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_outdir_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-outdir-set" meep::structure *arg1 = (meep::structure *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { if (arg2) { arg1->outdir = (char const *) (new char[strlen((const char *)arg2)+1]); strcpy((char *)arg1->outdir, (const char *)arg2); } else { arg1->outdir = 0; } } gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_outdir_get (SCM s_0) { #define FUNC_NAME "meep-structure-outdir-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (char *) ((arg1)->outdir); { gswig_result = scm_makfrom0str((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_effort_volumes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-effort-volumes-set" meep::structure *arg1 = (meep::structure *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->effort_volumes = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_effort_volumes_get (SCM s_0) { #define FUNC_NAME "meep-structure-effort-volumes-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::grid_volume *) ((arg1)->effort_volumes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_effort_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-effort-set" meep::structure *arg1 = (meep::structure *) 0 ; double *arg2 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_double, 2, 0); } if (arg1) (arg1)->effort = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_effort_get (SCM s_0) { #define FUNC_NAME "meep-structure-effort-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double *) ((arg1)->effort); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_num_effort_volumes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-num-effort-volumes-set" meep::structure *arg1 = (meep::structure *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->num_effort_volumes = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_num_effort_volumes_get (SCM s_0) { #define FUNC_NAME "meep-structure-num-effort-volumes-get" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (int) ((arg1)->num_effort_volumes); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_structure (SCM s_0) { #define FUNC_NAME "delete-meep-structure" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; result = (meep::structure *)new meep::structure(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } { arg8 = (double) scm_num2dbl(argv[7], FUNC_NAME); } { arg9 = (int) scm_num2int(argv[8], SCM_ARG1, FUNC_NAME); } 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); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } { arg8 = (double) scm_num2dbl(argv[7], FUNC_NAME); } 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); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; meep::boundary_region *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_8 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_9 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } { arg8 = (double) scm_num2dbl(argv[7], FUNC_NAME); } { arg9 = (int) scm_num2int(argv[8], SCM_ARG1, FUNC_NAME); } 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); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_10 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } { arg8 = (double) scm_num2dbl(argv[7], FUNC_NAME); } 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); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_11 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_12 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_13 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_14 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::boundary_region *arg3 = 0 ; meep::symmetry *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } { arg4 = (meep::symmetry *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__symmetry, 4, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_15 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::boundary_region *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::boundary_region *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__boundary_region, 3, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_16 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::grid_volume *arg1 = 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::grid_volume *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grid_volume, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_17 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::structure *)new meep::structure((meep::structure const *)arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure__SWIG_18 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-structure" meep::structure *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::structure *)new meep::structure((meep::structure const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_structure(SCM rest) { #define FUNC_NAME "new-meep-structure" SCM argv[9]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 9, "new-meep-structure"); if (argc == 0) { return _wrap_new_meep_structure__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_17(argc,argv); } } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_18(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_8(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_16(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_15(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_7(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_6(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_structure__SWIG_14(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_13(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_5(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_4(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_12(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_11(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_3(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_2(argc,argv); } } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_10(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[8])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_9(argc,argv); } } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grid_volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__boundary_region, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__symmetry, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[7])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[8])) ? 1 : 0; } if (_v) { return _wrap_new_meep_structure__SWIG_1(argc,argv); } } } } } } } } } } scm_misc_error("new-meep-structure", "No matching method for generic function `new_meep_structure'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-materials" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } (arg1)->set_materials(*arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-materials" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } (arg1)->set_materials(*arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-materials" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } (arg1)->set_materials(*arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-materials" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_materials(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_materials(SCM rest) { #define FUNC_NAME "meep-structure-set-materials" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-structure-set-materials"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_materials__SWIG_3(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_materials__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_materials__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_materials__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-structure-set-materials", "No matching method for generic function `meep_structure_set_materials'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; bool arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } { arg4 = (bool) SCM_NFALSEP(argv[3]); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } (arg1)->set_chi1inv(arg2,*arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; bool arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } { arg4 = (bool) SCM_NFALSEP(argv[3]); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } (arg1)->set_chi1inv(arg2,*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; bool arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } { arg4 = (bool) SCM_NFALSEP(argv[3]); } (arg1)->set_chi1inv(arg2,*arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi1inv(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi1inv(SCM rest) { #define FUNC_NAME "meep-structure-set-chi1inv" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-structure-set-chi1inv"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi1inv__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_chi1inv__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_chi1inv__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_chi1inv__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-structure-set-chi1inv", "No matching method for generic function `meep_structure_set_chi1inv'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_has_chi1inv (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-has-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = (bool)((meep::structure const *)arg1)->has_chi1inv(arg2,arg3); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } (arg1)->set_epsilon(*arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } (arg1)->set_epsilon(*arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } (arg1)->set_epsilon(*arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_epsilon(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } (arg1)->set_epsilon(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } (arg1)->set_epsilon(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } (arg1)->set_epsilon(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-epsilon" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } (arg1)->set_epsilon(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_epsilon(SCM rest) { #define FUNC_NAME "meep-structure-set-epsilon" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-structure-set-epsilon"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_3(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_7(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_6(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_1(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_5(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_4(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_epsilon__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-structure-set-epsilon", "No matching method for generic function `meep_structure_set_epsilon'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } (arg1)->set_mu(*arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } (arg1)->set_mu(*arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } (arg1)->set_mu(*arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_mu(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } (arg1)->set_mu(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } (arg1)->set_mu(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } (arg1)->set_mu(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-mu" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } (arg1)->set_mu(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_mu(SCM rest) { #define FUNC_NAME "meep-structure-set-mu" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-structure-set-mu"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_mu__SWIG_3(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_mu__SWIG_7(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_6(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_1(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_5(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_4(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_set_mu__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-structure-set-mu", "No matching method for generic function `meep_structure_set_mu'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_conductivity__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-conductivity" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_conductivity(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_conductivity__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-conductivity" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; double (*arg3)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[2], SWIGTYPE_p_f_r_q_const__meep__vec__double, 3, 0); } (arg1)->set_conductivity(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_conductivity(SCM rest) { #define FUNC_NAME "meep-structure-set-conductivity" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-structure-set-conductivity"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_conductivity__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_conductivity__SWIG_1(argc,argv); } } } } scm_misc_error("meep-structure-set-conductivity", "No matching method for generic function `meep_structure_set_conductivity'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi3__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi3" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi3(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi3__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi3" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_chi3(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi3__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi3" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } (arg1)->set_chi3(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi3(SCM rest) { #define FUNC_NAME "meep-structure-set-chi3" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-structure-set-chi3"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi3__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi3__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi3__SWIG_0(argc,argv); } } } } scm_misc_error("meep-structure-set-chi3", "No matching method for generic function `meep_structure_set_chi3'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi2__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi2" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::material_function *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::material_function *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__material_function, 3, 0); } (arg1)->set_chi2(arg2,*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi2__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi2" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } (arg1)->set_chi2(*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi2__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-set-chi2" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } (arg1)->set_chi2(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_chi2(SCM rest) { #define FUNC_NAME "meep-structure-set-chi2" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-structure-set-chi2"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi2__SWIG_1(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi2__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_set_chi2__SWIG_0(argc,argv); } } } } scm_misc_error("meep-structure-set-chi2", "No matching method for generic function `meep_structure_set_chi2'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_add_polarizability__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-add-polarizability" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::field_type arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarizability_identifier result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::field_type) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } result = (arg1)->add_polarizability(arg2,arg3,arg4,arg5); { meep::polarizability_identifier * resultptr; resultptr = new meep::polarizability_identifier((const meep::polarizability_identifier &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__polarizability_identifier, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_add_polarizability__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-add-polarizability" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; meep::field_type arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarizability_identifier result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (meep::field_type) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } result = (arg1)->add_polarizability(*arg2,arg3,arg4,arg5); { meep::polarizability_identifier * resultptr; resultptr = new meep::polarizability_identifier((const meep::polarizability_identifier &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__polarizability_identifier, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_add_polarizability__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-add-polarizability" meep::structure *arg1 = (meep::structure *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarizability_identifier result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } result = (arg1)->add_polarizability(arg2,arg3,arg4); { meep::polarizability_identifier * resultptr; resultptr = new meep::polarizability_identifier((const meep::polarizability_identifier &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__polarizability_identifier, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_add_polarizability__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-add-polarizability" meep::structure *arg1 = (meep::structure *) 0 ; meep::material_function *arg2 = 0 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarizability_identifier result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::material_function *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__material_function, 2, 0); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } result = (arg1)->add_polarizability(*arg2,arg3,arg4); { meep::polarizability_identifier * resultptr; resultptr = new meep::polarizability_identifier((const meep::polarizability_identifier &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__polarizability_identifier, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_add_polarizability(SCM rest) { #define FUNC_NAME "meep-structure-add-polarizability" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-structure-add-polarizability"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_add_polarizability__SWIG_2(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_add_polarizability__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__meep__vec__double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_add_polarizability__SWIG_0(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__material_function, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_structure_add_polarizability__SWIG_1(argc,argv); } } } } } } scm_misc_error("meep-structure-add-polarizability", "No matching method for generic function `meep_structure_add_polarizability'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_remove_polarizabilities (SCM s_0) { #define FUNC_NAME "meep-structure-remove-polarizabilities" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } (arg1)->remove_polarizabilities(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_set_output_directory (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-set-output-directory" meep::structure *arg1 = (meep::structure *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->set_output_directory((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_mix_with (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-structure-mix-with" meep::structure *arg1 = (meep::structure *) 0 ; meep::structure *arg2 = (meep::structure *) 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure, 2, 0); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } (arg1)->mix_with((meep::structure const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_equal_layout (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-equal-layout" meep::structure *arg1 = (meep::structure *) 0 ; meep::structure *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure, 2, 0); } result = (bool)((meep::structure const *)arg1)->equal_layout((meep::structure const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_print_layout (SCM s_0) { #define FUNC_NAME "meep-structure-print-layout" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } ((meep::structure const *)arg1)->print_layout(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_chi1inv__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-get-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_chi1inv__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-get-chi1inv" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(argv[3])); arg4 = &vec__arg4; result = (double)((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_chi1inv(SCM rest) { #define FUNC_NAME "meep-structure-get-chi1inv" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-structure-get-chi1inv"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_get_chi1inv__SWIG_0(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[3]); } if (_v) { return _wrap_meep_structure_get_chi1inv__SWIG_1(argc,argv); } } } } } scm_misc_error("meep-structure-get-chi1inv", "No matching method for generic function `meep_structure_get_chi1inv'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_get_inveps__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-get-inveps" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::structure const *)arg1)->get_inveps(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_inveps__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-structure-get-inveps" meep::structure *arg1 = (meep::structure *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(argv[3])); arg4 = &vec__arg4; result = (double)((meep::structure const *)arg1)->get_inveps(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_inveps(SCM rest) { #define FUNC_NAME "meep-structure-get-inveps" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-structure-get-inveps"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_structure_get_inveps__SWIG_0(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[3]); } if (_v) { return _wrap_meep_structure_get_inveps__SWIG_1(argc,argv); } } } } } scm_misc_error("meep-structure-get-inveps", "No matching method for generic function `meep_structure_get_inveps'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_structure_get_eps (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-get-eps" meep::structure *arg1 = (meep::structure *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)((meep::structure const *)arg1)->get_eps((meep::vec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_get_mu (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-structure-get-mu" meep::structure *arg1 = (meep::structure *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)((meep::structure const *)arg1)->get_mu((meep::vec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_structure_max_eps (SCM s_0) { #define FUNC_NAME "meep-structure-max-eps" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::structure *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__structure, 1, 0); } result = (double)((meep::structure const *)arg1)->max_eps(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_is_integrated_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-time-is-integrated-set" meep::src_time *arg1 = (meep::src_time *) 0 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (bool) SCM_NFALSEP(s_1); } if (arg1) (arg1)->is_integrated = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_is_integrated_get (SCM s_0) { #define FUNC_NAME "meep-src-time-is-integrated-get" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = (bool) ((arg1)->is_integrated); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_src_time__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-src-time" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; result = (meep::src_time *)new meep::src_time(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_src_time (SCM s_0) { #define FUNC_NAME "delete-meep-src-time" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_src_time__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-src-time" meep::src_time *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } result = (meep::src_time *)new meep::src_time((meep::src_time const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_src_time(SCM rest) { #define FUNC_NAME "new-meep-src-time" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "new-meep-src-time"); if (argc == 0) { return _wrap_new_meep_src_time__SWIG_0(argc,argv); } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_src_time__SWIG_1(argc,argv); } } scm_misc_error("new-meep-src-time", "No matching method for generic function `new_meep_src_time'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_src_time_dipole__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-dipole" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } result = ((meep::src_time const *)arg1)->dipole(); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_current__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-current" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } result = ((meep::src_time const *)arg1)->current(); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_update (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-src-time-update" meep::src_time *arg1 = (meep::src_time *) 0 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } (arg1)->update(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_current__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-current" meep::src_time *arg1 = (meep::src_time *) 0 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } result = ((meep::src_time const *)arg1)->current(arg2,arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_current(SCM rest) { #define FUNC_NAME "meep-src-time-current" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-src-time-current"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_src_time_current__SWIG_0(argc,argv); } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_src_time_current__SWIG_1(argc,argv); } } } } scm_misc_error("meep-src-time-current", "No matching method for generic function `meep_src_time_current'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_src_time_last_time_max__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-last-time-max" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } result = (double)(arg1)->last_time_max(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_last_time_max__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-last-time-max" meep::src_time *arg1 = (meep::src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = (double)(arg1)->last_time_max(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_last_time_max(SCM rest) { #define FUNC_NAME "meep-src-time-last-time-max" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-src-time-last-time-max"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_src_time_last_time_max__SWIG_0(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_src_time_last_time_max__SWIG_1(argc,argv); } } } scm_misc_error("meep-src-time-last-time-max", "No matching method for generic function `meep_src_time_last_time_max'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_src_time_add_to (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-src-time-add-to" meep::src_time *arg1 = (meep::src_time *) 0 ; meep::src_time *arg2 = (meep::src_time *) 0 ; meep::src_time **arg3 = (meep::src_time **) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } { arg3 = (meep::src_time **)SWIG_MustGetPtr(s_2, SWIGTYPE_p_p_meep__src_time, 3, 0); } result = (meep::src_time *)((meep::src_time const *)arg1)->add_to(arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-time-next-set" meep::src_time *arg1 = (meep::src_time *) 0 ; meep::src_time *arg2 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_next_get (SCM s_0) { #define FUNC_NAME "meep-src-time-next-get" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = (meep::src_time *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_dipole__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-src-time-dipole" meep::src_time *arg1 = (meep::src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = ((meep::src_time const *)arg1)->dipole(arg2); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_dipole(SCM rest) { #define FUNC_NAME "meep-src-time-dipole" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-src-time-dipole"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_src_time_dipole__SWIG_0(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_src_time_dipole__SWIG_1(argc,argv); } } } scm_misc_error("meep-src-time-dipole", "No matching method for generic function `meep_src_time_dipole'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_src_time_last_time (SCM s_0) { #define FUNC_NAME "meep-src-time-last-time" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = (double)((meep::src_time const *)arg1)->last_time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_clone (SCM s_0) { #define FUNC_NAME "meep-src-time-clone" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = (meep::src_time *)((meep::src_time const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_is_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-time-is-equal" meep::src_time *arg1 = (meep::src_time *) 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)((meep::src_time const *)arg1)->is_equal((meep::src_time const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_frequency (SCM s_0) { #define FUNC_NAME "meep-src-time-frequency" meep::src_time *arg1 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } result = ((meep::src_time const *)arg1)->frequency(); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_time_set_frequency (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-time-set-frequency" meep::src_time *arg1 = (meep::src_time *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_frequency(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_src_times_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-src-times-equal" meep::src_time *arg1 = 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)meep::src_times_equal((meep::src_time const &)*arg1,(meep::src_time const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_gaussian_src_time__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-gaussian-src-time" double arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::gaussian_src_time *result = 0 ; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } result = (meep::gaussian_src_time *)new meep::gaussian_src_time(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__gaussian_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_gaussian_src_time__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-gaussian-src-time" double arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::gaussian_src_time *result = 0 ; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = (meep::gaussian_src_time *)new meep::gaussian_src_time(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__gaussian_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_gaussian_src_time__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-gaussian-src-time" double arg1 ; double arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::gaussian_src_time *result = 0 ; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } result = (meep::gaussian_src_time *)new meep::gaussian_src_time(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__gaussian_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_gaussian_src_time(SCM rest) { #define FUNC_NAME "new-meep-gaussian-src-time" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "new-meep-gaussian-src-time"); if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_gaussian_src_time__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_gaussian_src_time__SWIG_0(argc,argv); } } } } if (argc == 4) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_new_meep_gaussian_src_time__SWIG_2(argc,argv); } } } } } scm_misc_error("new-meep-gaussian-src-time", "No matching method for generic function `new_meep_gaussian_src_time'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_gaussian_src_time (SCM s_0) { #define FUNC_NAME "delete-meep-gaussian-src-time" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_dipole (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-gaussian-src-time-dipole" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } result = ((meep::gaussian_src_time const *)arg1)->dipole(arg2); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_last_time (SCM s_0) { #define FUNC_NAME "meep-gaussian-src-time-last-time" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } result = (double)((meep::gaussian_src_time const *)arg1)->last_time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_clone (SCM s_0) { #define FUNC_NAME "meep-gaussian-src-time-clone" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } result = (meep::src_time *)((meep::gaussian_src_time const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_is_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-gaussian-src-time-is-equal" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)((meep::gaussian_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_frequency (SCM s_0) { #define FUNC_NAME "meep-gaussian-src-time-frequency" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } result = ((meep::gaussian_src_time const *)arg1)->frequency(); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_gaussian_src_time_set_frequency (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-gaussian-src-time-set-frequency" meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::gaussian_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__gaussian_src_time, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_frequency(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" complex< double > arg1 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" complex< double > arg1 ; double arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" complex< double > arg1 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" complex< double > arg1 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-continuous-src-time" complex< double > arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::continuous_src_time *result = 0 ; { cnumber cnum = ctl_convert_cnumber_to_c(argv[0]); arg1 = std::complex(cnum.re, cnum.im); } result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__continuous_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_continuous_src_time(SCM rest) { #define FUNC_NAME "new-meep-continuous-src-time" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "new-meep-continuous-src-time"); if (argc == 1) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_4(argc,argv); } } if (argc == 2) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_3(argc,argv); } } } if (argc == 3) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { _v = SwigComplex_Check(argv[0]); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_new_meep_continuous_src_time__SWIG_0(argc,argv); } } } } } } scm_misc_error("new-meep-continuous-src-time", "No matching method for generic function `new_meep_continuous_src_time'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_continuous_src_time (SCM s_0) { #define FUNC_NAME "delete-meep-continuous-src-time" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_dipole (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-continuous-src-time-dipole" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } result = ((meep::continuous_src_time const *)arg1)->dipole(arg2); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_last_time (SCM s_0) { #define FUNC_NAME "meep-continuous-src-time-last-time" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } result = (double)((meep::continuous_src_time const *)arg1)->last_time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_clone (SCM s_0) { #define FUNC_NAME "meep-continuous-src-time-clone" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } result = (meep::src_time *)((meep::continuous_src_time const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_is_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-continuous-src-time-is-equal" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)((meep::continuous_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_frequency (SCM s_0) { #define FUNC_NAME "meep-continuous-src-time-frequency" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } result = ((meep::continuous_src_time const *)arg1)->frequency(); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_continuous_src_time_set_frequency (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-continuous-src-time-set-frequency" meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::continuous_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__continuous_src_time, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_frequency(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_custom_src_time__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-custom-src-time" complex< double > (*arg1)(double,void *) = (complex< double > (*)(double,void *)) 0 ; void *arg2 = (void *) 0 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::custom_src_time *result = 0 ; { arg1 = my_complex_func2; arg2 = (void *) argv[0]; // input is SCM pointer to Scheme function } { arg3 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[2], FUNC_NAME); } result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__custom_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_custom_src_time__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-custom-src-time" complex< double > (*arg1)(double,void *) = (complex< double > (*)(double,void *)) 0 ; void *arg2 = (void *) 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::custom_src_time *result = 0 ; { arg1 = my_complex_func2; arg2 = (void *) argv[0]; // input is SCM pointer to Scheme function } { arg3 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__custom_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_custom_src_time__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-custom-src-time" complex< double > (*arg1)(double,void *) = (complex< double > (*)(double,void *)) 0 ; void *arg2 = (void *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::custom_src_time *result = 0 ; { arg1 = my_complex_func2; arg2 = (void *) argv[0]; // input is SCM pointer to Scheme function } result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__custom_src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_custom_src_time(SCM rest) { #define FUNC_NAME "new-meep-custom-src-time" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "new-meep-custom-src-time"); if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_procedure_p(argv[0])); } if (_v) { if (argc <= 1) { return _wrap_new_meep_custom_src_time__SWIG_2(argc,argv); } return _wrap_new_meep_custom_src_time__SWIG_2(argc,argv); } } if (argc == 2) { int _v; { _v = SCM_NFALSEP(scm_procedure_p(argv[0])); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_custom_src_time__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { _v = SCM_NFALSEP(scm_procedure_p(argv[0])); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_new_meep_custom_src_time__SWIG_0(argc,argv); } } } } scm_misc_error("new-meep-custom-src-time", "No matching method for generic function `new_meep_custom_src_time'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_custom_src_time (SCM s_0) { #define FUNC_NAME "delete-meep-custom-src-time" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_current (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-custom-src-time-current" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } result = ((meep::custom_src_time const *)arg1)->current(arg2,arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_dipole (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-custom-src-time-dipole" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } result = ((meep::custom_src_time const *)arg1)->dipole(arg2); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_last_time (SCM s_0) { #define FUNC_NAME "meep-custom-src-time-last-time" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } result = (double)((meep::custom_src_time const *)arg1)->last_time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_clone (SCM s_0) { #define FUNC_NAME "meep-custom-src-time-clone" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } result = (meep::src_time *)((meep::custom_src_time const *)arg1)->clone(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_custom_src_time_is_equal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-custom-src-time-is-equal" meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ; meep::src_time *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::custom_src_time *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__custom_src_time, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } result = (bool)((meep::custom_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_monitor_point () { #define FUNC_NAME "new-meep-monitor-point" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::monitor_point *result = 0 ; result = (meep::monitor_point *)new meep::monitor_point(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__monitor_point, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_monitor_point (SCM s_0) { #define FUNC_NAME "delete-meep-monitor-point" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_loc_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-loc-set" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::vec *arg2 = (meep::vec *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::vec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__vec, 2, 0); } if (arg1) (arg1)->loc = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_loc_get (SCM s_0) { #define FUNC_NAME "meep-monitor-point-loc-get" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec *result = 0 ; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } result = (meep::vec *)& ((arg1)->loc); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__vec, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_t_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-t-set" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->t = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_t_get (SCM s_0) { #define FUNC_NAME "meep-monitor-point-t-get" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } result = (double) ((arg1)->t); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_f_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-f-set" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; complex< double > *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (complex< double > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_complexT_double_t, 2, 0); } { size_t ii; complex< double > *b = (complex< double > *) arg1->f; for (ii = 0; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ii++) b[ii] = *((complex< double > *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_f_get (SCM s_0) { #define FUNC_NAME "meep-monitor-point-f-get" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > *result = 0 ; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } result = (complex< double > *)(complex< double > *) ((arg1)->f); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-next-set" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::monitor_point *arg2 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::monitor_point *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__monitor_point, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_next_get (SCM s_0) { #define FUNC_NAME "meep-monitor-point-next-get" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::monitor_point *result = 0 ; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } result = (meep::monitor_point *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__monitor_point, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_get_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-monitor-point-get-component" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (arg1)->get_component(arg2); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_poynting_in_direction__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-poynting-in-direction" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (double)(arg1)->poynting_in_direction(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_poynting_in_direction__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-poynting-in-direction" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::vec arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); } result = (double)(arg1)->poynting_in_direction(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_poynting_in_direction(SCM rest) { #define FUNC_NAME "meep-monitor-point-poynting-in-direction" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-monitor-point-poynting-in-direction"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_monitor_point_poynting_in_direction__SWIG_0(argc,argv); } } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_monitor_point_poynting_in_direction__SWIG_1(argc,argv); } } } scm_misc_error("meep-monitor-point-poynting-in-direction", "No matching method for generic function `meep_monitor_point_poynting_in_direction'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-fourier-transform" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; complex< double > **arg3 = (complex< double > **) 0 ; complex< double > **arg4 = (complex< double > **) 0 ; int *arg5 = (int *) 0 ; double arg6 ; double arg7 ; int arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (complex< double > **)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_p_complexT_double_t, 3, 0); } { arg4 = (complex< double > **)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_p_complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (double) scm_num2dbl(argv[6], FUNC_NAME); } { arg8 = (int) scm_num2int(argv[7], SCM_ARG1, FUNC_NAME); } (arg1)->fourier_transform(arg2,arg3,arg4,arg5,arg6,arg7,arg8); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-fourier-transform" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; complex< double > **arg3 = (complex< double > **) 0 ; complex< double > **arg4 = (complex< double > **) 0 ; int *arg5 = (int *) 0 ; double arg6 ; double arg7 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (complex< double > **)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_p_complexT_double_t, 3, 0); } { arg4 = (complex< double > **)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_p_complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (double) scm_num2dbl(argv[6], FUNC_NAME); } (arg1)->fourier_transform(arg2,arg3,arg4,arg5,arg6,arg7); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-fourier-transform" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; complex< double > **arg3 = (complex< double > **) 0 ; complex< double > **arg4 = (complex< double > **) 0 ; int *arg5 = (int *) 0 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (complex< double > **)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_p_complexT_double_t, 3, 0); } { arg4 = (complex< double > **)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_p_complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } (arg1)->fourier_transform(arg2,arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-monitor-point-fourier-transform" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; complex< double > **arg3 = (complex< double > **) 0 ; complex< double > **arg4 = (complex< double > **) 0 ; int *arg5 = (int *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (complex< double > **)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_p_complexT_double_t, 3, 0); } { arg4 = (complex< double > **)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_p_complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_int, 5, 0); } (arg1)->fourier_transform(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_fourier_transform(SCM rest) { #define FUNC_NAME "meep-monitor-point-fourier-transform" SCM argv[8]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 8, "meep-monitor-point-fourier-transform"); if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_monitor_point_fourier_transform__SWIG_3(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_monitor_point_fourier_transform__SWIG_2(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[6])) ? 1 : 0; } if (_v) { return _wrap_meep_monitor_point_fourier_transform__SWIG_1(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_int, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[6])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[7])) ? 1 : 0; } if (_v) { return _wrap_meep_monitor_point_fourier_transform__SWIG_0(argc,argv); } } } } } } } } } scm_misc_error("meep-monitor-point-fourier-transform", "No matching method for generic function `meep_monitor_point_fourier_transform'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_monitor_point_harminv (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7) { #define FUNC_NAME "meep-monitor-point-harminv" meep::monitor_point *arg1 = (meep::monitor_point *) 0 ; meep::component arg2 ; complex< double > **arg3 = (complex< double > **) 0 ; complex< double > **arg4 = (complex< double > **) 0 ; int *arg5 = (int *) 0 ; double arg6 ; double arg7 ; int arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::monitor_point *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__monitor_point, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (complex< double > **)SWIG_MustGetPtr(s_2, SWIGTYPE_p_p_complexT_double_t, 3, 0); } { arg4 = (complex< double > **)SWIG_MustGetPtr(s_3, SWIGTYPE_p_p_complexT_double_t, 4, 0); } { arg5 = (int *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_int, 5, 0); } { arg6 = (double) scm_num2dbl(s_5, FUNC_NAME); } { arg7 = (double) scm_num2dbl(s_6, FUNC_NAME); } { arg8 = (int) scm_num2int(s_7, SCM_ARG1, FUNC_NAME); } (arg1)->harminv(arg2,arg3,arg4,arg5,arg6,arg7,arg8); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_chunk (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7, SCM s_8, SCM s_9, SCM s_10, SCM s_11, SCM s_12, SCM s_13) { #define FUNC_NAME "new-meep-dft-chunk" 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 ; complex< double > arg10 ; complex< double > arg11 ; meep::component arg12 ; bool arg13 ; void *arg14 = (void *) 0 ; meep::ivec *argp2 ; meep::ivec *argp3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { argp2 = (meep::ivec *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__ivec, 2, 0); arg2 = *argp2; } { argp3 = (meep::ivec *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__ivec, 3, 0); arg3 = *argp3; } { arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); } { arg5 = vector3_to_vec(ctl_convert_vector3_to_c(s_4)); } { arg6 = vector3_to_vec(ctl_convert_vector3_to_c(s_5)); } { arg7 = vector3_to_vec(ctl_convert_vector3_to_c(s_6)); } { arg8 = (double) scm_num2dbl(s_7, FUNC_NAME); } { arg9 = (double) scm_num2dbl(s_8, FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(s_9); arg10 = std::complex(cnum.re, cnum.im); } { cnumber cnum = ctl_convert_cnumber_to_c(s_10); arg11 = std::complex(cnum.re, cnum.im); } { arg12 = (meep::component) scm_num2int(s_11, SCM_ARG1, FUNC_NAME); } { arg13 = (bool) SCM_NFALSEP(s_12); } { arg14 = (void *)SWIG_MustGetPtr(s_13, NULL, 14, 0); } result = (meep::dft_chunk *)new meep::dft_chunk(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,(void const *)arg14); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_chunk_rest (SCM rest) { SCM arg[14]; SWIG_Guile_GetArgs (arg, rest, 14, 0, "new-meep-dft-chunk"); return _wrap_new_meep_dft_chunk(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8], arg[9], arg[10], arg[11], arg[12], arg[13]); } static SCM _wrap_delete_meep_dft_chunk (SCM s_0) { #define FUNC_NAME "delete-meep-dft-chunk" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_update_dft (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-update-dft" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } (arg1)->update_dft(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_scale_dft (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-scale-dft" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->scale_dft(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_meep_dft_chunk_subeq (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-meep-dft-chunk-subeq" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::dft_chunk *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } (arg1)->operator -=((meep::dft_chunk const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_omega_min_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-omega-min-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->omega_min = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_omega_min_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-omega-min-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (double) ((arg1)->omega_min); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_domega_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-domega-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->domega = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_domega_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-domega-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (double) ((arg1)->domega); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_Nomega_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-Nomega-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->Nomega = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_Nomega_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-Nomega-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (int) ((arg1)->Nomega); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_c_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-c-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->c = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_c_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-c-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::component) ((arg1)->c); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_N_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-N-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->N = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_N_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-N-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (int) ((arg1)->N); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dft_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-dft-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; complex< meep::realnum > *arg2 = (complex< meep::realnum > *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (complex< meep::realnum > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_complexT_double_t, 2, 0); } if (arg1) (arg1)->dft = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_dft_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-dft-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< meep::realnum > *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (complex< meep::realnum > *) ((arg1)->dft); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_next_in_chunk_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-next-in-chunk-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->next_in_chunk = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_next_in_chunk_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-next-in-chunk-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::dft_chunk *) ((arg1)->next_in_chunk); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_next_in_dft_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-next-in-dft-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->next_in_dft = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_next_in_dft_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-next-in-dft-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = (meep::dft_chunk *) ((arg1)->next_in_dft); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_extra_weight_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-chunk-extra-weight-set" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } if (arg1) (arg1)->extra_weight = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_chunk_extra_weight_get (SCM s_0) { #define FUNC_NAME "meep-dft-chunk-extra-weight-get" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_chunk, 1, 0); } result = ((arg1)->extra_weight); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-save-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; meep::h5file *arg3 = (meep::h5file *) 0 ; char *arg4 = (char *) 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } meep::save_dft_hdf5(arg1,arg2,arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-save-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; meep::h5file *arg3 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } meep::save_dft_hdf5(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-load-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; meep::h5file *arg3 = (meep::h5file *) 0 ; char *arg4 = (char *) 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } meep::load_dft_hdf5(arg1,arg2,arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-load-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; meep::component arg2 ; meep::h5file *arg3 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } meep::load_dft_hdf5(arg1,arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-save-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; char *arg2 = (char *) 0 ; meep::h5file *arg3 = (meep::h5file *) 0 ; char *arg4 = (char *) 0 ; int must_free2 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } meep::save_dft_hdf5(arg1,(char const *)arg2,arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-save-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; char *arg2 = (char *) 0 ; meep::h5file *arg3 = (meep::h5file *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } meep::save_dft_hdf5(arg1,(char const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_save_dft_hdf5(SCM rest) { #define FUNC_NAME "meep-save-dft-hdf5" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-save-dft-hdf5"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_save_dft_hdf5__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_save_dft_hdf5__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_save_dft_hdf5__SWIG_0(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_save_dft_hdf5__SWIG_2(argc,argv); } } } } } scm_misc_error("meep-save-dft-hdf5", "No matching method for generic function `meep_save_dft_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-load-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; char *arg2 = (char *) 0 ; meep::h5file *arg3 = (meep::h5file *) 0 ; char *arg4 = (char *) 0 ; int must_free2 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } meep::load_dft_hdf5(arg1,(char const *)arg2,arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-load-dft-hdf5" meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ; char *arg2 = (char *) 0 ; meep::h5file *arg3 = (meep::h5file *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__h5file, 3, 0); } meep::load_dft_hdf5(arg1,(char const *)arg2,arg3); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_load_dft_hdf5(SCM rest) { #define FUNC_NAME "meep-load-dft-hdf5" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-load-dft-hdf5"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_load_dft_hdf5__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_load_dft_hdf5__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_load_dft_hdf5__SWIG_0(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_load_dft_hdf5__SWIG_2(argc,argv); } } } } } scm_misc_error("meep-load-dft-hdf5", "No matching method for generic function `meep_load_dft_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_new_meep_dft_flux__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-flux" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_flux *result = 0 ; { arg1 = (meep::component const) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } { arg2 = (meep::component const) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__dft_chunk, 3, 0); } { arg4 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__dft_chunk, 4, 0); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (int) scm_num2int(argv[6], SCM_ARG1, FUNC_NAME); } result = (meep::dft_flux *)new meep::dft_flux(arg1,arg2,arg3,arg4,arg5,arg6,arg7); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_flux__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-flux" meep::dft_flux *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_flux *result = 0 ; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::dft_flux *)new meep::dft_flux((meep::dft_flux const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_flux(SCM rest) { #define FUNC_NAME "new-meep-dft-flux" SCM argv[7]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 7, "new-meep-dft-flux"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_dft_flux__SWIG_1(argc,argv); } } if (argc == 7) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[6])) ? 1 : 0; } if (_v) { return _wrap_new_meep_dft_flux__SWIG_0(argc,argv); } } } } } } } } scm_misc_error("new-meep-dft-flux", "No matching method for generic function `new_meep_dft_flux'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_flux (SCM s_0) { #define FUNC_NAME "meep-dft-flux-flux" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (double *)(arg1)->flux(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->save_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->load_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_meep_dft_flux_subeq (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-meep-dft-flux-subeq" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::dft_flux *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::dft_flux *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_flux, 2, 0); } (arg1)->operator -=((meep::dft_flux const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-save-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_save_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-flux-save-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-flux-save-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_save_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-flux-save-hdf5", "No matching method for generic function `meep_dft_flux_save_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-flux-load-hdf5" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_load_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-flux-load-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-flux-load-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_flux, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_flux_load_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-flux-load-hdf5", "No matching method for generic function `meep_dft_flux_load_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_scale_dfts (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-scale-dfts" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->scale_dfts(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_remove (SCM s_0) { #define FUNC_NAME "meep-dft-flux-remove" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } (arg1)->remove(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_freq_min_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-freq-min-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->freq_min = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_freq_min_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-freq-min-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (double) ((arg1)->freq_min); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_dfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-dfreq-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->dfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_dfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-dfreq-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (double) ((arg1)->dfreq); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_Nfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-Nfreq-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->Nfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_Nfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-Nfreq-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (int) ((arg1)->Nfreq); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_E_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-E-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->E = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_E_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-E-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::dft_chunk *) ((arg1)->E); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_H_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-H-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->H = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_H_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-H-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::dft_chunk *) ((arg1)->H); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_cE_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-cE-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->cE = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_cE_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-cE-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::component) ((arg1)->cE); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_cH_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-flux-cH-set" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->cH = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_flux_cH_get (SCM s_0) { #define FUNC_NAME "meep-dft-flux-cH-get" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::component result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = (meep::component) ((arg1)->cH); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_dft_flux (SCM s_0) { #define FUNC_NAME "delete-meep-dft-flux" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_force__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-force" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_force *result = 0 ; { arg1 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__dft_chunk, 2, 0); } { arg3 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__dft_chunk, 3, 0); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } result = (meep::dft_force *)new meep::dft_force(arg1,arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_force, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_force__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-dft-force" meep::dft_force *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_force *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } result = (meep::dft_force *)new meep::dft_force((meep::dft_force const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_force, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_dft_force(SCM rest) { #define FUNC_NAME "new-meep-dft-force" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "new-meep-dft-force"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_dft_force__SWIG_1(argc,argv); } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_new_meep_dft_force__SWIG_0(argc,argv); } } } } } } } scm_misc_error("new-meep-dft-force", "No matching method for generic function `new_meep_dft_force'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_force_force (SCM s_0) { #define FUNC_NAME "meep-dft-force-force" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (double *)(arg1)->force(); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->save_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::h5file *arg2 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } (arg1)->load_hdf5(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-save-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->save_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_save_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-force-save-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-force-save-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_save_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-force-save-hdf5", "No matching method for generic function `meep_dft_force_save_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; char *arg5 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; int must_free5 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (char *)SWIG_scm2str(argv[4]); must_free5 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); if (must_free5 && arg5) SWIG_free(arg5); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; int must_free3 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-dft-force-load-hdf5" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::fields *arg2 = 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->load_hdf5(*arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_load_hdf5(SCM rest) { #define FUNC_NAME "meep-dft-force-load-hdf5" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-dft-force-load-hdf5"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_4(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__dft_force, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_dft_force_load_hdf5__SWIG_2(argc,argv); } } } } } } scm_misc_error("meep-dft-force-load-hdf5", "No matching method for generic function `meep_dft_force_load_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_dft_force_scale_dfts (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-scale-dfts" meep::dft_force *arg1 = (meep::dft_force *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->scale_dfts(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_remove (SCM s_0) { #define FUNC_NAME "meep-dft-force-remove" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } (arg1)->remove(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_freq_min_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-freq-min-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->freq_min = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_freq_min_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-freq-min-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (double) ((arg1)->freq_min); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_dfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-dfreq-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->dfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_dfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-dfreq-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (double) ((arg1)->dfreq); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_Nfreq_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-Nfreq-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->Nfreq = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_Nfreq_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-Nfreq-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (int) ((arg1)->Nfreq); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_offdiag1_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-offdiag1-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->offdiag1 = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_offdiag1_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-offdiag1-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (meep::dft_chunk *) ((arg1)->offdiag1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_offdiag2_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-offdiag2-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->offdiag2 = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_offdiag2_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-offdiag2-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (meep::dft_chunk *) ((arg1)->offdiag2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_diag_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-dft-force-diag-set" meep::dft_force *arg1 = (meep::dft_force *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->diag = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_dft_force_diag_get (SCM s_0) { #define FUNC_NAME "meep-dft-force-diag-get" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = (meep::dft_chunk *) ((arg1)->diag); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_dft_force (SCM s_0) { #define FUNC_NAME "delete-meep-dft-force" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_in_or_out_Incoming(SCM s_0) { #define FUNC_NAME "meep-in-or-out-Incoming" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_in_or_out_Incoming); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_in_or_out_Outgoing(SCM s_0) { #define FUNC_NAME "meep-in-or-out-Outgoing" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_in_or_out_Outgoing); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_connect_phase_CONNECT_PHASE(SCM s_0) { #define FUNC_NAME "meep-connect-phase-CONNECT-PHASE" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_connect_phase_CONNECT_PHASE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_connect_phase_CONNECT_NEGATE(SCM s_0) { #define FUNC_NAME "meep-connect-phase-CONNECT-NEGATE" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_connect_phase_CONNECT_NEGATE); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_connect_phase_CONNECT_COPY(SCM s_0) { #define FUNC_NAME "meep-connect-phase-CONNECT-COPY" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_connect_phase_CONNECT_COPY); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_u_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-u-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_u); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_u_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-u-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_u); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-w-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_w); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-w-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_w); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_cond_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-cond-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_cond); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_cond_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-cond-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_cond); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_backup_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-backup-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_backup); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_backup_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-backup-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_backup); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_u_backup_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-u-backup-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_u_backup); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_u_backup_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-u-backup-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_u_backup); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_backup_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-w-backup-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_w_backup); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_w_backup_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-w-backup-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_w_backup); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_cond_backup_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-cond-backup-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_cond_backup); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_cond_backup_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-cond-backup-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_cond_backup); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_minus_p_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-minus-p-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *(*arg2)[2] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *(*)[2])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_2__p_double, 2, 0); } { meep::realnum * (*inp)[2] = (meep::realnum * (*)[2])(arg2); meep::realnum * (*dest)[2] = (meep::realnum * (*)[2])(arg1->f_minus_p); size_t ii = 0; for (; ii < meep::NUM_FIELD_COMPONENTS; ++ii) { meep::realnum * *ip = inp[ii]; meep::realnum * *dp = dest[ii]; size_t jj = 0; for (; jj < 2; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_minus_p_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-minus-p-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *(*result)[2] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *(*)[2])(meep::realnum *(*)[2]) ((arg1)->f_minus_p); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_2__p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_rderiv_int_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-f-rderiv-int-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum *arg2 = (meep::realnum *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_double, 2, 0); } if (arg1) (arg1)->f_rderiv_int = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_f_rderiv_int_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-f-rderiv-int-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum *) ((arg1)->f_rderiv_int); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_dft_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-dft-chunks-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::dft_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__dft_chunk, 2, 0); } if (arg1) (arg1)->dft_chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_dft_chunks_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-dft-chunks-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::dft_chunk *) ((arg1)->dft_chunks); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zeroes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-zeroes-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum ***arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum ***)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_p_double, 2, 0); } { size_t ii; meep::realnum ** *b = (meep::realnum ** *) arg1->zeroes; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::realnum ** *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zeroes_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-zeroes-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum ***result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum ***)(meep::realnum ***) ((arg1)->zeroes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_num_zeroes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-num-zeroes-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_int, 2, 0); } { size_t ii; int *b = (int *) arg1->num_zeroes; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((int *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_num_zeroes_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-num-zeroes-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int *)(int *) ((arg1)->num_zeroes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_int, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_connections_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-connections-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::realnum **(*arg2)[meep::CONNECT_COPY+1][meep::Outgoing+1] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::realnum **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, 2, 0); } { meep::realnum ** (*inp)[meep::CONNECT_COPY+1] = (meep::realnum ** (*)[meep::CONNECT_COPY+1])(arg2); meep::realnum ** (*dest)[meep::CONNECT_COPY+1] = (meep::realnum ** (*)[meep::CONNECT_COPY+1])(arg1->connections); size_t ii = 0; for (; ii < meep::NUM_FIELD_TYPES; ++ii) { meep::realnum ** *ip = inp[ii]; meep::realnum ** *dp = dest[ii]; size_t jj = 0; for (; jj < meep::CONNECT_COPY+1; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_connections_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-connections-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum **(*result)[meep::CONNECT_COPY+1][meep::Outgoing+1] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::realnum **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1])(meep::realnum **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1]) ((arg1)->connections); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_num_connections_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-num-connections-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int (*arg2)[meep::CONNECT_COPY+1][meep::Outgoing+1] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int (*)[meep::CONNECT_COPY+1][meep::Outgoing+1])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, 2, 0); } { int (*inp)[meep::CONNECT_COPY+1] = (int (*)[meep::CONNECT_COPY+1])(arg2); int (*dest)[meep::CONNECT_COPY+1] = (int (*)[meep::CONNECT_COPY+1])(arg1->num_connections); size_t ii = 0; for (; ii < meep::NUM_FIELD_TYPES; ++ii) { int *ip = inp[ii]; int *dp = dest[ii]; size_t jj = 0; for (; jj < meep::CONNECT_COPY+1; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_num_connections_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-num-connections-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int (*result)[meep::CONNECT_COPY+1][meep::Outgoing+1] = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int (*)[meep::CONNECT_COPY+1][meep::Outgoing+1])(int (*)[meep::CONNECT_COPY+1][meep::Outgoing+1]) ((arg1)->num_connections); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_connection_phases_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-connection-phases-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; complex< meep::realnum > **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (complex< meep::realnum > **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_complexT_double_t, 2, 0); } { size_t ii; complex< meep::realnum > * *b = (complex< meep::realnum > * *) arg1->connection_phases; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((complex< meep::realnum > * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_connection_phases_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-connection-phases-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< meep::realnum > **result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (complex< meep::realnum > **)(complex< meep::realnum > **) ((arg1)->connection_phases); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_pols_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-pols-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::polarization **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::polarization **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__polarization, 2, 0); } { size_t ii; meep::polarization * *b = (meep::polarization * *) arg1->pols; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::polarization * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_pols_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-pols-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarization **result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::polarization **)(meep::polarization **) ((arg1)->pols); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__polarization, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_olpols_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-olpols-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::polarization **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::polarization **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__polarization, 2, 0); } { size_t ii; meep::polarization * *b = (meep::polarization * *) arg1->olpols; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::polarization * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_olpols_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-olpols-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::polarization **result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::polarization **)(meep::polarization **) ((arg1)->olpols); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__polarization, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-a-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_a_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-a-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_Courant_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-Courant-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->Courant = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_Courant_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-Courant-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->Courant); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_dt_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-dt-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->dt = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_dt_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-dt-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->dt); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_gv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-gv-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->gv = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_gv_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-gv-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::grid_volume *)& ((arg1)->gv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-v-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_v_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-v-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_m_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-m-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->m = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_m_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-m-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->m); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zero_fields_near_cylorigin_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-zero-fields-near-cylorigin-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; bool arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (bool) SCM_NFALSEP(s_1); } if (arg1) (arg1)->zero_fields_near_cylorigin = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zero_fields_near_cylorigin_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-zero-fields-near-cylorigin-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (bool) ((arg1)->zero_fields_near_cylorigin); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_beta_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-beta-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->beta = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_beta_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-beta-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double) ((arg1)->beta); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_is_real_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-is-real-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->is_real = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_is_real_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-is-real-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int) ((arg1)->is_real); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_store_pol_energy_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-store-pol-energy-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->store_pol_energy = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_store_pol_energy_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-store-pol-energy-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int) ((arg1)->store_pol_energy); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_bands_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-bands-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::bandsdata *arg2 = (meep::bandsdata *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::bandsdata *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__bandsdata, 2, 0); } if (arg1) (arg1)->bands = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_bands_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-bands-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::bandsdata *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::bandsdata *) ((arg1)->bands); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__bandsdata, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_sources_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-sources-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::src_vol **arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::src_vol **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__src_vol, 2, 0); } { size_t ii; meep::src_vol * *b = (meep::src_vol * *) arg1->sources; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::src_vol * *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_sources_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-sources-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_vol **result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::src_vol **)(meep::src_vol **) ((arg1)->sources); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__src_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_new_s_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-new-s-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::structure_chunk *arg2 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::structure_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure_chunk, 2, 0); } if (arg1) (arg1)->new_s = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_new_s_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-new-s-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::structure_chunk *) ((arg1)->new_s); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_s_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-s-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::structure_chunk *arg2 = (meep::structure_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::structure_chunk *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure_chunk, 2, 0); } if (arg1) (arg1)->s = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_s_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-s-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::structure_chunk *) ((arg1)->s); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_outdir_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-outdir-set" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { if (arg2) { arg1->outdir = (char const *) (new char[strlen((const char *)arg2)+1]); strcpy((char *)arg1->outdir, (const char *)arg2); } else { arg1->outdir = 0; } } gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_outdir_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-outdir-get" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (char *) ((arg1)->outdir); { gswig_result = scm_makfrom0str((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields_chunk__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields-chunk" meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ; char *arg2 = (char *) 0 ; double arg3 ; bool arg4 ; double arg5 ; bool arg6 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields_chunk *result = 0 ; { arg1 = (meep::structure_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (bool) SCM_NFALSEP(argv[3]); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } result = (meep::fields_chunk *)new meep::fields_chunk(arg1,(char const *)arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields_chunk, 1); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields_chunk__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields-chunk" meep::fields_chunk *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields_chunk *result = 0 ; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (meep::fields_chunk *)new meep::fields_chunk((meep::fields_chunk const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields_chunk, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields_chunk(SCM rest) { #define FUNC_NAME "new-meep-fields-chunk" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "new-meep-fields-chunk"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_fields_chunk__SWIG_1(argc,argv); } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_new_meep_fields_chunk__SWIG_0(argc,argv); } } } } } } } scm_misc_error("new-meep-fields-chunk", "No matching method for generic function `new_meep_fields_chunk'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_fields_chunk (SCM s_0) { #define FUNC_NAME "delete-meep-fields-chunk" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_peek_field (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-chunk-peek-field" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; result = (double)(arg1)->peek_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_use_real_fields (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-use-real-fields" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->use_real_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_have_component__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-have-component" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } result = (bool)(arg1)->have_component(arg2,arg3); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_have_component__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-have-component" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->have_component(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_have_component(SCM rest) { #define FUNC_NAME "meep-fields-chunk-have-component" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-chunk-have-component"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_have_component__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_have_component__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-chunk-have-component", "No matching method for generic function `meep_fields_chunk_have_component'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_last_source_time (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-last-source-time" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (double)(arg1)->last_source_time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_field__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-get-field" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; meep::ivec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::ivec *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__ivec, 3, 0); } result = ((meep::fields_chunk const *)arg1)->get_field(arg2,(meep::ivec const &)*arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_field_gv (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-get-field-gv" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = ((meep::fields_chunk const *)arg1)->get_field_gv(arg2); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_field__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-get-field" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = ((meep::fields_chunk const *)arg1)->get_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_field(SCM rest) { #define FUNC_NAME "meep-fields-chunk-get-field" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-chunk-get-field"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_chunk_get_field__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_chunk_get_field__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-chunk-get-field", "No matching method for generic function `meep_fields_chunk_get_field'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_polarization_energy__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-get-polarization-energy" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = (double)((meep::fields_chunk const *)arg1)->get_polarization_energy((meep::ivec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_my_polarization_energy__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-my-polarization-energy" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::ivec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::ivec *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__ivec, 2, 0); } result = (double)((meep::fields_chunk const *)arg1)->my_polarization_energy((meep::ivec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_polarization_energy__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-get-polarization-energy" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::polarizability_identifier *arg2 = 0 ; meep::ivec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::polarizability_identifier *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__polarizability_identifier, 2, 0); } { arg3 = (meep::ivec *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__ivec, 3, 0); } result = (double)((meep::fields_chunk const *)arg1)->get_polarization_energy((meep::polarizability_identifier const &)*arg2,(meep::ivec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_polarization_energy(SCM rest) { #define FUNC_NAME "meep-fields-chunk-get-polarization-energy" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-chunk-get-polarization-energy"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_chunk_get_polarization_energy__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__polarizability_identifier, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_chunk_get_polarization_energy__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-chunk-get-polarization-energy", "No matching method for generic function `meep_fields_chunk_get_polarization_energy'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_my_polarization_energy__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-my-polarization-energy" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::polarizability_identifier *arg2 = 0 ; meep::ivec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::polarizability_identifier *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__polarizability_identifier, 2, 0); } { arg3 = (meep::ivec *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__ivec, 3, 0); } result = (double)((meep::fields_chunk const *)arg1)->my_polarization_energy((meep::polarizability_identifier const &)*arg2,(meep::ivec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_my_polarization_energy(SCM rest) { #define FUNC_NAME "meep-fields-chunk-my-polarization-energy" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-chunk-my-polarization-energy"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_chunk_my_polarization_energy__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__polarizability_identifier, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__ivec, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_chunk_my_polarization_energy__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-chunk-my-polarization-energy", "No matching method for generic function `meep_fields_chunk_my_polarization_energy'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_get_chi1inv (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-chunk-get-chi1inv" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::ivec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } { arg4 = (meep::ivec *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__ivec, 4, 0); } result = (double)((meep::fields_chunk const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_analytic_chi1 (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-chunk-analytic-chi1" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; double arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); arg4 = &vec__arg4; result = ((meep::fields_chunk const *)arg1)->analytic_chi1(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_backup_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-backup-component" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->backup_component(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_average_with_backup (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-average-with-backup" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->average_with_backup(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_restore_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-restore-component" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->restore_component(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_set_output_directory (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-set-output-directory" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->set_output_directory((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_verbose__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-verbose" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } (arg1)->verbose(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_verbose__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-verbose" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->verbose(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_verbose(SCM rest) { #define FUNC_NAME "meep-fields-chunk-verbose" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-fields-chunk-verbose"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_chunk_verbose__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_verbose__SWIG_0(argc,argv); } } } scm_misc_error("meep-fields-chunk-verbose", "No matching method for generic function `meep_fields_chunk_verbose'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_count_volume (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-count-volume" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (double)(arg1)->count_volume(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_n_proc (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-n-proc" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int)((meep::fields_chunk const *)arg1)->n_proc(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_is_mine (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-is-mine" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } result = (int)((meep::fields_chunk const *)arg1)->is_mine(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zero_metal (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-zero-metal" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::field_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::field_type) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->zero_metal(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_remove_sources (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-remove-sources" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->remove_sources(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_remove_polarizabilities (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-remove-polarizabilities" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->remove_polarizabilities(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_zero_fields (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-zero-fields" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->zero_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_update_eh__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-update-eh" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::field_type arg2 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::field_type) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } result = (bool)(arg1)->update_eh(arg2,arg3); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_update_eh__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-chunk-update-eh" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::field_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::field_type) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->update_eh(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_update_eh(SCM rest) { #define FUNC_NAME "meep-fields-chunk-update-eh" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-chunk-update-eh"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_update_eh__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_chunk_update_eh__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-chunk-update-eh", "No matching method for generic function `meep_fields_chunk_update_eh'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_alloc_f (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-alloc-f" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->alloc_f(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_figure_out_step_plan (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-figure-out-step-plan" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->figure_out_step_plan(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_set_solve_cw_omega (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunk-set-solve-cw-omega" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_solve_cw_omega(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunk_unset_solve_cw_omega (SCM s_0) { #define FUNC_NAME "meep-fields-chunk-unset-solve-cw-omega" meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields_chunk *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields_chunk, 1, 0); } (arg1)->unset_solve_cw_omega(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_condition_Periodic(SCM s_0) { #define FUNC_NAME "meep-boundary-condition-Periodic" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_boundary_condition_Periodic); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_condition_Metallic(SCM s_0) { #define FUNC_NAME "meep-boundary-condition-Metallic" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_boundary_condition_Metallic); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_condition_Magnetic(SCM s_0) { #define FUNC_NAME "meep-boundary-condition-Magnetic" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_boundary_condition_Magnetic); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_boundary_condition_None(SCM s_0) { #define FUNC_NAME "meep-boundary-condition-None" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_boundary_condition_None); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_Connecting(SCM s_0) { #define FUNC_NAME "meep-time-sink-Connecting" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_time_sink_Connecting); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_Stepping(SCM s_0) { #define FUNC_NAME "meep-time-sink-Stepping" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_time_sink_Stepping); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_Boundaries(SCM s_0) { #define FUNC_NAME "meep-time-sink-Boundaries" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_time_sink_Boundaries); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_MpiTime(SCM s_0) { #define FUNC_NAME "meep-time-sink-MpiTime" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_time_sink_MpiTime); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_FieldOutput(SCM s_0) { #define FUNC_NAME "meep-time-sink-FieldOutput" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_time_sink_FieldOutput); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_FourierTransforming(SCM s_0) { #define FUNC_NAME "meep-time-sink-FourierTransforming" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_time_sink_FourierTransforming); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_time_sink_Other(SCM s_0) { #define FUNC_NAME "meep-time-sink-Other" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_time_sink_Other); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_derived_component_func (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-derived-component-func" meep::derived_component arg1 ; meep::grid_volume *arg2 = 0 ; int *arg3 = 0 ; meep::component *arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::field_rfunction result; { arg1 = (meep::derived_component) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } { arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0); } { arg4 = (meep::component *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__component, 4, 0); } result = (meep::field_rfunction)meep::derived_component_func(arg1,(meep::grid_volume const &)*arg2,*arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_num_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-num-chunks-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->num_chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_num_chunks_get (SCM s_0) { #define FUNC_NAME "meep-fields-num-chunks-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->num_chunks); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-chunks-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::fields_chunk **arg2 = (meep::fields_chunk **) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields_chunk **)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_meep__fields_chunk, 2, 0); } if (arg1) (arg1)->chunks = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_chunks_get (SCM s_0) { #define FUNC_NAME "meep-fields-chunks-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields_chunk **result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::fields_chunk **) ((arg1)->chunks); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_meep__fields_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_sources_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-sources-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::src_time *arg2 = (meep::src_time *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::src_time *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__src_time, 2, 0); } if (arg1) (arg1)->sources = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_sources_get (SCM s_0) { #define FUNC_NAME "meep-fields-sources-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::src_time *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::src_time *) ((arg1)->sources); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__src_time, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_fluxes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-fluxes-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::flux_vol *arg2 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::flux_vol *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__flux_vol, 2, 0); } if (arg1) (arg1)->fluxes = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_fluxes_get (SCM s_0) { #define FUNC_NAME "meep-fields-fluxes-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::flux_vol *) ((arg1)->fluxes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_S_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-S-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::symmetry *arg2 = (meep::symmetry *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::symmetry *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__symmetry, 2, 0); } if (arg1) (arg1)->S = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_S_get (SCM s_0) { #define FUNC_NAME "meep-fields-S-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::symmetry *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::symmetry *)& ((arg1)->S); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__symmetry, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_blocks_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-comm-blocks-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::realnum ***arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::realnum ***)SWIG_MustGetPtr(s_1, SWIGTYPE_p_p_p_double, 2, 0); } { size_t ii; meep::realnum ** *b = (meep::realnum ** *) arg1->comm_blocks; for (ii = 0; ii < (size_t)meep::NUM_FIELD_TYPES; ii++) b[ii] = *((meep::realnum ** *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_blocks_get (SCM s_0) { #define FUNC_NAME "meep-fields-comm-blocks-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::realnum ***result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::realnum ***)(meep::realnum ***) ((arg1)->comm_blocks); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_p_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_sizes_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-comm-sizes-set" meep::fields *arg1 = (meep::fields *) 0 ; int *(*arg2)[meep::CONNECT_COPY+1] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int *(*)[meep::CONNECT_COPY+1])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_meep__CONNECT_COPY_1__p_int, 2, 0); } { int * (*inp)[meep::CONNECT_COPY+1] = (int * (*)[meep::CONNECT_COPY+1])(arg2); int * (*dest)[meep::CONNECT_COPY+1] = (int * (*)[meep::CONNECT_COPY+1])(arg1->comm_sizes); size_t ii = 0; for (; ii < meep::NUM_FIELD_TYPES; ++ii) { int * *ip = inp[ii]; int * *dp = dest[ii]; size_t jj = 0; for (; jj < meep::CONNECT_COPY+1; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_sizes_get (SCM s_0) { #define FUNC_NAME "meep-fields-comm-sizes-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int *(*result)[meep::CONNECT_COPY+1] = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int *(*)[meep::CONNECT_COPY+1])(int *(*)[meep::CONNECT_COPY+1]) ((arg1)->comm_sizes); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_meep__CONNECT_COPY_1__p_int, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_comm_size_tot (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-comm-size-tot" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } result = (int)((meep::fields const *)arg1)->comm_size_tot(arg2,arg3); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_a_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-a-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->a = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_a_get (SCM s_0) { #define FUNC_NAME "meep-fields-a-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->a); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_dt_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-dt-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->dt = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_dt_get (SCM s_0) { #define FUNC_NAME "meep-fields-dt-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->dt); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_gv_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-gv-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->gv = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_gv_get (SCM s_0) { #define FUNC_NAME "meep-fields-gv-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::grid_volume *)& ((arg1)->gv); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_user_volume_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-user-volume-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::grid_volume *arg2 = (meep::grid_volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::grid_volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__grid_volume, 2, 0); } if (arg1) (arg1)->user_volume = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_user_volume_get (SCM s_0) { #define FUNC_NAME "meep-fields-user-volume-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grid_volume *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::grid_volume *)& ((arg1)->user_volume); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grid_volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_v_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-v-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = (meep::volume *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } if (arg1) (arg1)->v = *arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_v_get (SCM s_0) { #define FUNC_NAME "meep-fields-v-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::volume *)& ((arg1)->v); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_m_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-m-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->m = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_m_get (SCM s_0) { #define FUNC_NAME "meep-fields-m-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->m); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_beta_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-beta-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->beta = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_beta_get (SCM s_0) { #define FUNC_NAME "meep-fields-beta-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->beta); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_t_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-t-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->t = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_t_get (SCM s_0) { #define FUNC_NAME "meep-fields-t-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->t); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_phasein_time_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-phasein-time-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->phasein_time = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_phasein_time_get (SCM s_0) { #define FUNC_NAME "meep-fields-phasein-time-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->phasein_time); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_is_real_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-is-real-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->is_real = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_is_real_get (SCM s_0) { #define FUNC_NAME "meep-fields-is-real-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->is_real); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_k_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-k-set" meep::fields *arg1 = (meep::fields *) 0 ; complex< double > *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (complex< double > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_complexT_double_t, 2, 0); } { size_t ii; complex< double > *b = (complex< double > *) arg1->k; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((complex< double > *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_k_get (SCM s_0) { #define FUNC_NAME "meep-fields-k-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (complex< double > *)(complex< double > *) ((arg1)->k); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_eikna_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-eikna-set" meep::fields *arg1 = (meep::fields *) 0 ; complex< double > *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (complex< double > *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_complexT_double_t, 2, 0); } { size_t ii; complex< double > *b = (complex< double > *) arg1->eikna; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((complex< double > *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_eikna_get (SCM s_0) { #define FUNC_NAME "meep-fields-eikna-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (complex< double > *)(complex< double > *) ((arg1)->eikna); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_coskna_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-coskna-set" meep::fields *arg1 = (meep::fields *) 0 ; double *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_double, 2, 0); } { size_t ii; double *b = (double *) arg1->coskna; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((double *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_coskna_get (SCM s_0) { #define FUNC_NAME "meep-fields-coskna-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double *)(double *) ((arg1)->coskna); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_sinkna_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-sinkna-set" meep::fields *arg1 = (meep::fields *) 0 ; double *arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_double, 2, 0); } { size_t ii; double *b = (double *) arg1->sinkna; for (ii = 0; ii < (size_t)5; ii++) b[ii] = *((double *) arg2 + ii); } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_sinkna_get (SCM s_0) { #define FUNC_NAME "meep-fields-sinkna-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double *)(double *) ((arg1)->sinkna); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_double, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_boundaries_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-boundaries-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::boundary_condition (*arg2)[5] ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::boundary_condition (*)[5])SWIG_MustGetPtr(s_1, SWIGTYPE_p_a_5__meep__boundary_condition, 2, 0); } { meep::boundary_condition (*inp)[5] = (meep::boundary_condition (*)[5])(arg2); meep::boundary_condition (*dest)[5] = (meep::boundary_condition (*)[5])(arg1->boundaries); size_t ii = 0; for (; ii < 2; ++ii) { meep::boundary_condition *ip = inp[ii]; meep::boundary_condition *dp = dest[ii]; size_t jj = 0; for (; jj < 5; ++jj) dp[jj] = ip[jj]; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_boundaries_get (SCM s_0) { #define FUNC_NAME "meep-fields-boundaries-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::boundary_condition (*result)[5] = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::boundary_condition (*)[5])(meep::boundary_condition (*)[5]) ((arg1)->boundaries); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_a_5__meep__boundary_condition, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_bands_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-bands-set" meep::fields *arg1 = (meep::fields *) 0 ; meep::bandsdata *arg2 = (meep::bandsdata *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::bandsdata *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__bandsdata, 2, 0); } if (arg1) (arg1)->bands = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_bands_get (SCM s_0) { #define FUNC_NAME "meep-fields-bands-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::bandsdata *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::bandsdata *) ((arg1)->bands); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__bandsdata, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_outdir_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-outdir-set" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } { if (arg1->outdir) delete [] arg1->outdir; if (arg2) { arg1->outdir = (char *) (new char[strlen((const char *)arg2)+1]); strcpy((char *)arg1->outdir, (const char *)arg2); } else { arg1->outdir = 0; } } gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_outdir_get (SCM s_0) { #define FUNC_NAME "meep-fields-outdir-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (char *) ((arg1)->outdir); { gswig_result = scm_makfrom0str((const char *)result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; bool arg3 ; double arg4 ; bool arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (bool) SCM_NFALSEP(argv[4]); } result = (meep::fields *)new meep::fields(arg1,arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; bool arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } result = (meep::fields *)new meep::fields(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } result = (meep::fields *)new meep::fields(arg1,arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::structure *arg1 = (meep::structure *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = (meep::fields *)new meep::fields(arg1,arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::structure *arg1 = (meep::structure *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::structure *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__structure, 1, 0); } result = (meep::fields *)new meep::fields(arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-fields" meep::fields *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::fields *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } result = (meep::fields *)new meep::fields((meep::fields const &)*arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__fields, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_fields(SCM rest) { #define FUNC_NAME "new-meep-fields" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "new-meep-fields"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_fields__SWIG_4(argc,argv); } } if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_meep_fields__SWIG_5(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_new_meep_fields__SWIG_3(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_new_meep_fields__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_new_meep_fields__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__structure, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_new_meep_fields__SWIG_0(argc,argv); } } } } } } scm_misc_error("new-meep-fields", "No matching method for generic function `new_meep_fields'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_fields (SCM s_0) { #define FUNC_NAME "delete-meep-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_equal_layout (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-equal-layout" meep::fields *arg1 = (meep::fields *) 0 ; meep::fields *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__fields, 2, 0); } result = (bool)((meep::fields const *)arg1)->equal_layout((meep::fields const &)*arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_real_fields (SCM s_0) { #define FUNC_NAME "meep-fields-use-real-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->use_real_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_zero_fields (SCM s_0) { #define FUNC_NAME "meep-fields-zero-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->zero_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_remove_sources (SCM s_0) { #define FUNC_NAME "meep-fields-remove-sources" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->remove_sources(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_remove_polarizabilities (SCM s_0) { #define FUNC_NAME "meep-fields-remove-polarizabilities" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->remove_polarizabilities(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_remove_fluxes (SCM s_0) { #define FUNC_NAME "meep-fields-remove-fluxes" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->remove_fluxes(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_reset (SCM s_0) { #define FUNC_NAME "meep-fields-reset" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->reset(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_time_spent_on (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-time-spent-on" meep::fields *arg1 = (meep::fields *) 0 ; meep::time_sink arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::time_sink) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (double)(arg1)->time_spent_on(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_print_times (SCM s_0) { #define FUNC_NAME "meep-fields-print-times" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->print_times(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_set_boundary (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-set-boundary" meep::fields *arg1 = (meep::fields *) 0 ; meep::boundary_side arg2 ; meep::direction arg3 ; meep::boundary_condition arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::boundary_side) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } { arg4 = (meep::boundary_condition) scm_num2int(s_3, SCM_ARG1, FUNC_NAME); } (arg1)->set_boundary(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_bloch__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-use-bloch" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } (arg1)->use_bloch(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_bloch__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-use-bloch" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; complex< double > arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[2]); arg3 = std::complex(cnum.re, cnum.im); } (arg1)->use_bloch(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_bloch__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-use-bloch" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; (arg1)->use_bloch((meep::vec const &)*arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_use_bloch(SCM rest) { #define FUNC_NAME "meep-fields-use-bloch" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-use-bloch"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_fields_use_bloch__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_use_bloch__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[2]); } if (_v) { return _wrap_meep_fields_use_bloch__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-use-bloch", "No matching method for generic function `meep_fields_use_bloch'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_lattice_vector (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-lattice-vector" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = ((meep::fields const *)arg1)->lattice_vector(arg2); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_update_eh__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-update-eh" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_type arg2 ; bool arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_type) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (bool) SCM_NFALSEP(argv[2]); } (arg1)->update_eh(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_update_eh__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-update-eh" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_type) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } (arg1)->update_eh(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_update_eh(SCM rest) { #define FUNC_NAME "meep-fields-update-eh" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-update-eh"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_update_eh__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_update_eh__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-update-eh", "No matching method for generic function `meep_fields_update_eh'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_total_volume (SCM s_0) { #define FUNC_NAME "meep-fields-total-volume" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::volume > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = ((meep::fields const *)arg1)->total_volume(); { meep::volume * resultptr; resultptr = new meep::volume((const meep::volume &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__volume, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free3 = 0 ; my_field_func_data data4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = list_length(SCM_CAR(argv[3])); arg5 = new meep::component[arg4]; for (int i = 0; i < arg4; ++i) arg5[i] = meep::component(integer_list_ref(SCM_CAR(argv[3]), i)); data4.nf = arg4; data4.func = SCM_CDR(argv[3]); arg6 = my_field_func; arg7 = &data4; } { arg8 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 9, 0); } { arg10 = (bool) SCM_NFALSEP(argv[6]); } { arg11 = (bool) SCM_NFALSEP(argv[7]); } (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9,arg10,arg11); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); { if (arg5) delete[] arg5; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free3 = 0 ; my_field_func_data data4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = list_length(SCM_CAR(argv[3])); arg5 = new meep::component[arg4]; for (int i = 0; i < arg4; ++i) arg5[i] = meep::component(integer_list_ref(SCM_CAR(argv[3]), i)); data4.nf = arg4; data4.func = SCM_CDR(argv[3]); arg6 = my_field_func; arg7 = &data4; } { arg8 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 9, 0); } { arg10 = (bool) SCM_NFALSEP(argv[6]); } (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9,arg10); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); { if (arg5) delete[] arg5; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free3 = 0 ; my_field_func_data data4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::h5file *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__h5file, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = list_length(SCM_CAR(argv[3])); arg5 = new meep::component[arg4]; for (int i = 0; i < arg4; ++i) arg5[i] = meep::component(integer_list_ref(SCM_CAR(argv[3]), i)); data4.nf = arg4; data4.func = SCM_CDR(argv[3]); arg6 = my_field_func; arg7 = &data4; } { arg8 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 9, 0); } (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); { if (arg5) delete[] arg5; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; my_field_func_data data3 ; int must_free11 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(SCM_CAR(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(SCM_CAR(argv[2]), i)); data3.nf = arg3; data3.func = SCM_CDR(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) SCM_NFALSEP(argv[5]); } { arg10 = (bool) SCM_NFALSEP(argv[6]); } { arg11 = (char *)SWIG_scm2str(argv[7]); must_free11 = 1; } { arg12 = (bool) SCM_NFALSEP(argv[8]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11,arg12); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } if (must_free11 && arg11) SWIG_free(arg11); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; my_field_func_data data3 ; int must_free11 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(SCM_CAR(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(SCM_CAR(argv[2]), i)); data3.nf = arg3; data3.func = SCM_CDR(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) SCM_NFALSEP(argv[5]); } { arg10 = (bool) SCM_NFALSEP(argv[6]); } { arg11 = (char *)SWIG_scm2str(argv[7]); must_free11 = 1; } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } if (must_free11 && arg11) SWIG_free(arg11); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; my_field_func_data data3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(SCM_CAR(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(SCM_CAR(argv[2]), i)); data3.nf = arg3; data3.func = SCM_CDR(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) SCM_NFALSEP(argv[5]); } { arg10 = (bool) SCM_NFALSEP(argv[6]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; my_field_func_data data3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(SCM_CAR(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(SCM_CAR(argv[2]), i)); data3.nf = arg3; data3.func = SCM_CDR(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) SCM_NFALSEP(argv[5]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; my_field_func_data data3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(SCM_CAR(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(SCM_CAR(argv[2]), i)); data3.nf = arg3; data3.func = SCM_CDR(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__h5file, 8, 0); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_8 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; my_field_func_data data3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = list_length(SCM_CAR(argv[2])); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(SCM_CAR(argv[2]), i)); data3.nf = arg3; data3.func = SCM_CDR(argv[2]); arg5 = my_field_func; arg6 = &data3; } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 7, 0); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); { if (arg4) delete[] arg4; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_9 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; int must_free11 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) SCM_NFALSEP(argv[8]); } { arg10 = (bool) SCM_NFALSEP(argv[9]); } { arg11 = (char *)SWIG_scm2str(argv[10]); must_free11 = 1; } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); if (must_free11 && arg11) SWIG_free(arg11); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_10 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) SCM_NFALSEP(argv[8]); } { arg10 = (bool) SCM_NFALSEP(argv[9]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_11 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__h5file, 8, 0); } { arg9 = (bool) SCM_NFALSEP(argv[8]); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_12 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } { arg8 = (meep::h5file *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__h5file, 8, 0); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_13 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (meep::field_rfunction)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 5, 0); } { arg6 = (void *)SWIG_MustGetPtr(argv[5], NULL, 6, 0); } { arg7 = (meep::volume *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_meep__volume, 7, 0); } (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_14 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free7 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) SCM_NFALSEP(argv[4]); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } { arg7 = (char *)SWIG_scm2str(argv[6]); must_free7 = 1; } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,(char const *)arg7); gswig_result = SCM_UNSPECIFIED; if (must_free7 && arg7) SWIG_free(arg7); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_15 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; bool arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) SCM_NFALSEP(argv[4]); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_16 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) SCM_NFALSEP(argv[4]); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_17 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_18 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_19 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" 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 ; int must_free7 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) SCM_NFALSEP(argv[4]); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } { arg7 = (char *)SWIG_scm2str(argv[6]); must_free7 = 1; } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,(char const *)arg7); gswig_result = SCM_UNSPECIFIED; if (must_free7 && arg7) SWIG_free(arg7); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_20 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; bool arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) SCM_NFALSEP(argv[4]); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_21 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; bool arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } { arg5 = (bool) SCM_NFALSEP(argv[4]); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_22 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; meep::h5file *arg4 = (meep::h5file *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (meep::h5file *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__h5file, 4, 0); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5__SWIG_23 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-hdf5" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_hdf5(SCM rest) { #define FUNC_NAME "meep-fields-output-hdf5" SCM argv[11]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 11, "meep-fields-output-hdf5"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_18(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_23(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_22(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_17(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[2]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_8(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_21(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_16(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[2]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_7(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[3])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[3]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[3]))); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_2(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_20(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_15(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[2]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_6(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[3])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[3]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[3]))); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_1(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_19(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_14(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[2]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_5(argc,argv); } } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_13(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[3])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[3]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[3]))); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[7]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_0(argc,argv); } } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[2]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[7]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_4(argc,argv); } } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_12(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[2]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[7]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_3(argc,argv); } } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_11(argc,argv); } } } } } } } } } } if (argc == 10) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_10(argc,argv); } } } } } } } } } } } if (argc == 11) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__h5file, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[10]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_hdf5__SWIG_9(argc,argv); } } } } } } } } } } } } scm_misc_error("meep-fields-output-hdf5", "No matching method for generic function `meep_fields_output_hdf5'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-open-h5file" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; meep::h5file::access_mode arg3 ; char *arg4 = (char *) 0 ; bool arg5 ; int must_free2 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file::access_mode) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } { arg5 = (bool) SCM_NFALSEP(argv[4]); } result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2,arg3,(char const *)arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free2 && arg2) SWIG_free(arg2); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-open-h5file" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; meep::h5file::access_mode arg3 ; char *arg4 = (char *) 0 ; int must_free2 = 0 ; int must_free4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file::access_mode) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (char *)SWIG_scm2str(argv[3]); must_free4 = 1; } result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2,arg3,(char const *)arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free2 && arg2) SWIG_free(arg2); if (must_free4 && arg4) SWIG_free(arg4); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-open-h5file" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; meep::h5file::access_mode arg3 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (meep::h5file::access_mode) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-open-h5file" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::h5file *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__h5file, 1); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_open_h5file(SCM rest) { #define FUNC_NAME "meep-fields-open-h5file" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-fields-open-h5file"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_open_h5file__SWIG_3(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_open_h5file__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_open_h5file__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[3]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[4]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_open_h5file__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-fields-open-h5file", "No matching method for generic function `meep_fields_open_h5file'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_h5file_name__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-h5file-name" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; bool arg4 ; int must_free2 = 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (bool) SCM_NFALSEP(argv[3]); } result = (char *)(arg1)->h5file_name((char const *)arg2,(char const *)arg3,arg4); { gswig_result = scm_makfrom0str((const char *)result); } if (must_free2 && arg2) SWIG_free(arg2); if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_h5file_name__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-h5file-name" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int must_free2 = 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } result = (char *)(arg1)->h5file_name((char const *)arg2,(char const *)arg3); { gswig_result = scm_makfrom0str((const char *)result); } if (must_free2 && arg2) SWIG_free(arg2); if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_h5file_name__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-h5file-name" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (char *)(arg1)->h5file_name((char const *)arg2); { gswig_result = scm_makfrom0str((const char *)result); } if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_h5file_name(SCM rest) { #define FUNC_NAME "meep-fields-h5file-name" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-fields-h5file-name"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_h5file_name__SWIG_2(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_h5file_name__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[3]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_h5file_name__SWIG_0(argc,argv); } } } } } scm_misc_error("meep-fields-h5file-name", "No matching method for generic function `meep_fields_h5file_name'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_last_step_output_wall_time_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-last-step-output-wall-time-set" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } if (arg1) (arg1)->last_step_output_wall_time = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_last_step_output_wall_time_get (SCM s_0) { #define FUNC_NAME "meep-fields-last-step-output-wall-time-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double) ((arg1)->last_step_output_wall_time); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_last_step_output_t_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-last-step-output-t-set" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } if (arg1) (arg1)->last_step_output_t = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_last_step_output_t_get (SCM s_0) { #define FUNC_NAME "meep-fields-last-step-output-t-get" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int) ((arg1)->last_step_output_t); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_step (SCM s_0) { #define FUNC_NAME "meep-fields-step" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->step(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_round_time (SCM s_0) { #define FUNC_NAME "meep-fields-round-time" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)((meep::fields const *)arg1)->round_time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_time (SCM s_0) { #define FUNC_NAME "meep-fields-time" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)((meep::fields const *)arg1)->time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; int arg3 ; complex< double > arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[3]); arg4 = std::complex(cnum.re, cnum.im); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->solve_cw(arg2,arg3,arg4,arg5); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; int arg3 ; complex< double > arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[3]); arg4 = std::complex(cnum.re, cnum.im); } result = (bool)(arg1)->solve_cw(arg2,arg3,arg4); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; int arg3 ; int arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (int) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->solve_cw(arg2,arg3,arg4); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->solve_cw(arg2,arg3); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; double arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } result = (bool)(arg1)->solve_cw(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-solve-cw" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } result = (bool)(arg1)->solve_cw(); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_solve_cw(SCM rest) { #define FUNC_NAME "meep-fields-solve-cw" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-fields-solve-cw"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_5(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_4(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_2(argc,argv); } } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[3]); } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[3]); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_solve_cw__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-fields-solve-cw", "No matching method for generic function `meep_fields_solve_cw'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_last_source_time (SCM s_0) { #define FUNC_NAME "meep-fields-last-source-time" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)(arg1)->last_source_time(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; meep::vec *arg7 = 0 ; complex< double > arg8 ; int arg9 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } meep::vec vec__arg7 = vector3_to_vec(ctl_convert_vector3_to_c(argv[6])); arg7 = &vec__arg7; { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (int) scm_num2int(argv[8], SCM_ARG1, FUNC_NAME); } (arg1)->add_point_source(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8,arg9); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; meep::vec *arg7 = 0 ; complex< double > arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } meep::vec vec__arg7 = vector3_to_vec(ctl_convert_vector3_to_c(argv[6])); arg7 = &vec__arg7; { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } (arg1)->add_point_source(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; meep::vec *arg7 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } meep::vec vec__arg7 = vector3_to_vec(ctl_convert_vector3_to_c(argv[6])); arg7 = &vec__arg7; (arg1)->add_point_source(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::vec *arg4 = 0 ; complex< double > arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(argv[3])); arg4 = &vec__arg4; { cnumber cnum = ctl_convert_cnumber_to_c(argv[4]); arg5 = std::complex(cnum.re, cnum.im); } (arg1)->add_point_source(arg2,(meep::src_time const &)*arg3,(meep::vec const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-point-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(argv[3])); arg4 = &vec__arg4; (arg1)->add_point_source(arg2,(meep::src_time const &)*arg3,(meep::vec const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_point_source(SCM rest) { #define FUNC_NAME "meep-fields-add-point-source" SCM argv[9]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 9, "meep-fields-add-point-source"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[3]); } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_4(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[3]); } if (_v) { { _v = SwigComplex_Check(argv[4]); } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_3(argc,argv); } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[6]); } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_2(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[6]); } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_1(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[6]); } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[8])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_point_source__SWIG_0(argc,argv); } } } } } } } } } } scm_misc_error("meep-fields-add-point-source", "No matching method for generic function `meep_fields_add_point_source'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-volume-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; complex< double > (*arg5)(meep::vec const &) = (complex< double > (*)(meep::vec const &)) 0 ; complex< double > arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { my_complex_func_scm = argv[4]; arg5 = my_complex_func; } { cnumber cnum = ctl_convert_cnumber_to_c(argv[5]); arg6 = std::complex(cnum.re, cnum.im); } (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-volume-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; complex< double > (*arg5)(meep::vec const &) = (complex< double > (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { my_complex_func_scm = argv[4]; arg5 = my_complex_func; } (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-volume-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; complex< double > arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[4]); arg5 = std::complex(cnum.re, cnum.im); } (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-volume-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_volume_source(SCM rest) { #define FUNC_NAME "meep-fields-add-volume-source" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-fields-add-volume-source"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_add_volume_source__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { return _wrap_meep_fields_add_volume_source__SWIG_1(argc,argv); } } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigComplex_Check(argv[4]); } if (_v) { return _wrap_meep_fields_add_volume_source__SWIG_2(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { { _v = SwigComplex_Check(argv[5]); } if (_v) { return _wrap_meep_fields_add_volume_source__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-fields-add-volume-source", "No matching method for generic function `meep_fields_add_volume_source'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_require_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-require-component" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->require_component(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_eigenmode_source__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-eigenmode-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; meep::volume *arg5 = 0 ; int arg6 ; meep::vec *arg7 = 0 ; int arg8 ; double arg9 ; double arg10 ; complex< double > arg11 ; complex< double > (*arg12)(meep::vec const &) = (complex< double > (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (meep::volume *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__volume, 5, 0); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg7 = vector3_to_vec(ctl_convert_vector3_to_c(argv[6])); arg7 = &vec__arg7; { arg8 = (int) scm_num2int(argv[7], SCM_ARG1, FUNC_NAME); } { arg9 = (double) scm_num2dbl(argv[8], FUNC_NAME); } { arg10 = (double) scm_num2dbl(argv[9], FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[10]); arg11 = std::complex(cnum.re, cnum.im); } { my_complex_func_scm = argv[11]; arg12 = my_complex_func; } (arg1)->add_eigenmode_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,(meep::volume const &)*arg5,arg6,(meep::vec const &)*arg7,arg8,arg9,arg10,arg11,arg12); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_eigenmode_source__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-eigenmode-source" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::src_time *arg3 = 0 ; meep::volume *arg4 = 0 ; meep::volume *arg5 = 0 ; int arg6 ; meep::vec *arg7 = 0 ; int arg8 ; double arg9 ; double arg10 ; complex< double > arg11 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::src_time *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__src_time, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (meep::volume *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_meep__volume, 5, 0); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg7 = vector3_to_vec(ctl_convert_vector3_to_c(argv[6])); arg7 = &vec__arg7; { arg8 = (int) scm_num2int(argv[7], SCM_ARG1, FUNC_NAME); } { arg9 = (double) scm_num2dbl(argv[8], FUNC_NAME); } { arg10 = (double) scm_num2dbl(argv[9], FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[10]); arg11 = std::complex(cnum.re, cnum.im); } (arg1)->add_eigenmode_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,(meep::volume const &)*arg5,arg6,(meep::vec const &)*arg7,arg8,arg9,arg10,arg11); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_eigenmode_source(SCM rest) { #define FUNC_NAME "meep-fields-add-eigenmode-source" SCM argv[12]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 12, "meep-fields-add-eigenmode-source"); if (argc == 11) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[6]); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[7])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[8])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[9])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[10]); } if (_v) { return _wrap_meep_fields_add_eigenmode_source__SWIG_1(argc,argv); } } } } } } } } } } } } if (argc == 12) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__src_time, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[6]); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[7])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[8])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[9])) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[10]); } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[11])); } if (_v) { return _wrap_meep_fields_add_eigenmode_source__SWIG_0(argc,argv); } } } } } } } } } } } } } scm_misc_error("meep-fields-add-eigenmode-source", "No matching method for generic function `meep_fields_add_eigenmode_source'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_field (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-initialize-field" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; complex< double > (*arg3)(meep::vec const &) = (complex< double > (*)(meep::vec const &)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { my_complex_func_scm = s_2; arg3 = my_complex_func; } (arg1)->initialize_field(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_with_nth_te (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-initialize-with-nth-te" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->initialize_with_nth_te(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_with_nth_tm (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-initialize-with-nth-tm" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->initialize_with_nth_tm(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_with_n_te (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-initialize-with-n-te" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->initialize_with_n_te(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_initialize_with_n_tm (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-initialize-with-n-tm" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->initialize_with_n_tm(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_phase_in_material (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-phase-in-material" meep::fields *arg1 = (meep::fields *) 0 ; meep::structure *arg2 = (meep::structure *) 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::structure *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__structure, 2, 0); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } result = (int)(arg1)->phase_in_material((meep::structure const *)arg2,arg3); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_is_phasing (SCM s_0) { #define FUNC_NAME "meep-fields-is-phasing" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (int)(arg1)->is_phasing(); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-loop-in-chunks" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_chunkloop)SWIG_MustGetPtr(argv[1], 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_complex__double___r_q_const__meep__symmetry_int_p_void__void, 2, 0); } { arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (meep::component) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6,arg7); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-loop-in-chunks" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_chunkloop)SWIG_MustGetPtr(argv[1], 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_complex__double___r_q_const__meep__symmetry_int_p_void__void, 2, 0); } { arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (meep::component) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-loop-in-chunks" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_chunkloop)SWIG_MustGetPtr(argv[1], 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_complex__double___r_q_const__meep__symmetry_int_p_void__void, 2, 0); } { arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } { arg5 = (meep::component) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-loop-in-chunks" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_chunkloop arg2 = (meep::field_chunkloop) 0 ; void *arg3 = (void *) 0 ; meep::volume *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_chunkloop)SWIG_MustGetPtr(argv[1], 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_complex__double___r_q_const__meep__symmetry_int_p_void__void, 2, 0); } { arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0); } { arg4 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 4, 0); } (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_loop_in_chunks(SCM rest) { #define FUNC_NAME "meep-fields-loop-in-chunks" SCM argv[7]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 7, "meep-fields-loop-in-chunks"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(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_complex__double___r_q_const__meep__symmetry_int_p_void__void, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_loop_in_chunks__SWIG_3(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(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_complex__double___r_q_const__meep__symmetry_int_p_void__void, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_loop_in_chunks__SWIG_2(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(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_complex__double___r_q_const__meep__symmetry_int_p_void__void, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_loop_in_chunks__SWIG_1(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(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_complex__double___r_q_const__meep__symmetry_int_p_void__void, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_loop_in_chunks__SWIG_0(argc,argv); } } } } } } } } scm_misc_error("meep-fields-loop-in-chunks", "No matching method for generic function `meep_fields_loop_in_chunks'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate" 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 ; my_field_func_data data2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = list_length(SCM_CAR(argv[1])); arg3 = new meep::component[arg2]; for (int i = 0; i < arg2; ++i) arg3[i] = meep::component(integer_list_ref(SCM_CAR(argv[1]), i)); data2.nf = arg2; data2.func = SCM_CDR(argv[1]); arg4 = my_field_func; arg5 = &data2; } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 6, 0); } { arg7 = (double *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_double, 7, 0); } result = (arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6,arg7); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } { if (arg3) delete[] arg3; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate" 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 ; my_field_func_data data2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = list_length(SCM_CAR(argv[1])); arg3 = new meep::component[arg2]; for (int i = 0; i < arg2; ++i) arg3[i] = meep::component(integer_list_ref(SCM_CAR(argv[1]), i)); data2.nf = arg2; data2.func = SCM_CDR(argv[1]); arg4 = my_field_func; arg5 = &data2; } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 6, 0); } result = (arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } { if (arg3) delete[] arg3; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::component *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__component, 3, 0); } { arg4 = (meep::field_rfunction)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(argv[4], NULL, 5, 0); } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 6, 0); } { arg7 = (double *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_double, 7, 0); } result = (double)(arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6,arg7); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::component *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__component, 3, 0); } { arg4 = (meep::field_rfunction)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(argv[4], NULL, 5, 0); } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 6, 0); } result = (double)(arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate(SCM rest) { #define FUNC_NAME "meep-fields-integrate" SCM argv[7]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 7, "meep-fields-integrate"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[1])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[1]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[1]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[1])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[1]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[1]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate__SWIG_0(argc,argv); } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate__SWIG_3(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate__SWIG_2(argc,argv); } } } } } } } } scm_misc_error("meep-fields-integrate", "No matching method for generic function `meep_fields_integrate'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate2" 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 ; my_field_func_data data3 ; my_field_func_data data30 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = list_length(SCM_CAR(SCM_CAR(argv[2]))); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(SCM_CAR(SCM_CAR(argv[2])), i)); arg5 = list_length(SCM_CDR(SCM_CAR(argv[2]))); arg6 = new meep::component[arg5]; for (int i = 0; i < arg5; ++i) arg6[i] = meep::component(integer_list_ref(SCM_CDR(SCM_CAR(argv[2])), i)); data3.nf = arg3 + arg5; data3.func = SCM_CDR(argv[2]); arg7 = my_field_func; arg8 = &data3; } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_double, 10, 0); } result = (arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9,arg10); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } { if (arg4) delete[] arg4; if (arg6) delete[] arg6; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate2" 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 ; my_field_func_data data3 ; my_field_func_data data30 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = list_length(SCM_CAR(SCM_CAR(argv[2]))); arg4 = new meep::component[arg3]; for (int i = 0; i < arg3; ++i) arg4[i] = meep::component(integer_list_ref(SCM_CAR(SCM_CAR(argv[2])), i)); arg5 = list_length(SCM_CDR(SCM_CAR(argv[2]))); arg6 = new meep::component[arg5]; for (int i = 0; i < arg5; ++i) arg6[i] = meep::component(integer_list_ref(SCM_CDR(SCM_CAR(argv[2])), i)); data3.nf = arg3 + arg5; data3.func = SCM_CDR(argv[2]); arg7 = my_field_func; arg8 = &data3; } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__volume, 9, 0); } result = (arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } { if (arg4) delete[] arg4; if (arg6) delete[] arg6; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate2" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (meep::component *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__component, 6, 0); } { arg7 = (meep::field_rfunction)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 7, 0); } { arg8 = (void *)SWIG_MustGetPtr(argv[7], NULL, 8, 0); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__volume, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } 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); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-integrate2" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::fields *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__fields, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (meep::component *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_meep__component, 4, 0); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (meep::component *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__component, 6, 0); } { arg7 = (meep::field_rfunction)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 7, 0); } { arg8 = (void *)SWIG_MustGetPtr(argv[7], NULL, 8, 0); } { arg9 = (meep::volume *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__volume, 9, 0); } result = (double)(arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_integrate2(SCM rest) { #define FUNC_NAME "meep-fields-integrate2" SCM argv[10]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 10, "meep-fields-integrate2"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_pair_p(SCM_CAR(argv[2]))) && SCM_NFALSEP(scm_list_p(SCM_CAR(SCM_CAR(argv[2])))) && SCM_NFALSEP(scm_list_p(SCM_CDR(SCM_CAR(argv[2])))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate2__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[2])) && SCM_NFALSEP(scm_pair_p(SCM_CAR(argv[2]))) && SCM_NFALSEP(scm_list_p(SCM_CAR(SCM_CAR(argv[2])))) && SCM_NFALSEP(scm_list_p(SCM_CDR(SCM_CAR(argv[2])))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[2]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate2__SWIG_0(argc,argv); } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate2__SWIG_3(argc,argv); } } } } } } } } } } if (argc == 10) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_integrate2__SWIG_2(argc,argv); } } } } } } } } } } } scm_misc_error("meep-fields-integrate2", "No matching method for generic function `meep_fields_integrate2'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" 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 ; my_field_func_data data2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = list_length(SCM_CAR(argv[1])); arg3 = new meep::component[arg2]; for (int i = 0; i < arg2; ++i) arg3[i] = meep::component(integer_list_ref(SCM_CAR(argv[1]), i)); data2.nf = arg2; data2.func = SCM_CDR(argv[1]); arg4 = my_field_func; arg5 = &data2; } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 6, 0); } result = (double)(arg1)->max_abs(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6); { gswig_result = scm_make_real(result); } { if (arg3) delete[] arg3; } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" 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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::component *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__component, 3, 0); } { arg4 = (meep::field_rfunction)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 4, 0); } { arg5 = (void *)SWIG_MustGetPtr(argv[4], NULL, 5, 0); } { arg6 = (meep::volume *)SWIG_MustGetPtr(argv[5], SWIGTYPE_p_meep__volume, 6, 0); } result = (double)(arg1)->max_abs(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->max_abs(arg2,(meep::volume const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->max_abs(arg2,(meep::volume const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-max-abs" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->max_abs(arg2,(meep::volume const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_abs(SCM rest) { #define FUNC_NAME "meep-fields-max-abs" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-fields-max-abs"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_pair_p(argv[1])) && SCM_NFALSEP(scm_list_p(SCM_CAR(argv[1]))) && SCM_NFALSEP(scm_procedure_p(SCM_CDR(argv[1]))); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_2(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_3(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_4(argc,argv); } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__component, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[5], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_max_abs__SWIG_1(argc,argv); } } } } } } } scm_misc_error("meep-fields-max-abs", "No matching method for generic function `meep_fields_max_abs'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; complex< double > arg8 ; meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ; bool arg10 ; complex< double > arg11 ; bool arg12 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__dft_chunk, 9, 0); } { arg10 = (bool) SCM_NFALSEP(argv[9]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[10]); arg11 = std::complex(cnum.re, cnum.im); } { arg12 = (bool) SCM_NFALSEP(argv[11]); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; complex< double > arg8 ; meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ; bool arg10 ; complex< double > arg11 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__dft_chunk, 9, 0); } { arg10 = (bool) SCM_NFALSEP(argv[9]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[10]); arg11 = std::complex(cnum.re, cnum.im); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; complex< double > arg8 ; meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ; bool arg10 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__dft_chunk, 9, 0); } { arg10 = (bool) SCM_NFALSEP(argv[9]); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; complex< double > arg8 ; meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } { arg9 = (meep::dft_chunk *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_meep__dft_chunk, 9, 0); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; complex< double > arg8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } { cnumber cnum = ctl_convert_cnumber_to_c(argv[7]); arg8 = std::complex(cnum.re, cnum.im); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; bool arg7 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (bool) SCM_NFALSEP(argv[6]); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_pt (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5) { #define FUNC_NAME "meep-fields-add-dft-pt" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } { arg5 = (double) scm_num2dbl(s_4, FUNC_NAME); } { arg6 = (int) scm_num2int(s_5, SCM_ARG1, FUNC_NAME); } result = (meep::dft_chunk *)(arg1)->add_dft_pt(arg2,(meep::vec const &)*arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; double arg3 ; double arg4 ; int arg5 ; bool arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume_list, 2, 0); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } { arg6 = (bool) SCM_NFALSEP(argv[5]); } result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft__SWIG_8 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::dft_chunk *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume_list, 2, 0); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__dft_chunk, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft(SCM rest) { #define FUNC_NAME "meep-fields-add-dft" SCM argv[12]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 12, "meep-fields-add-dft"); if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume_list, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_8(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume_list, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[5]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_7(argc,argv); } } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_6(argc,argv); } } } } } } } if (argc == 7) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_5(argc,argv); } } } } } } } } if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { return _wrap_meep_fields_add_dft__SWIG_4(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_add_dft__SWIG_3(argc,argv); } } } } } } } } } } if (argc == 10) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_2(argc,argv); } } } } } } } } } } } if (argc == 11) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[10]); } if (_v) { return _wrap_meep_fields_add_dft__SWIG_1(argc,argv); } } } } } } } } } } } } if (argc == 12) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_BOOLP(argv[6]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[7]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_meep__dft_chunk, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[9]) ? 1 : 0; } if (_v) { { _v = SwigComplex_Check(argv[10]); } if (_v) { { _v = SCM_BOOLP(argv[11]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft__SWIG_0(argc,argv); } } } } } } } } } } } } } scm_misc_error("meep-fields-add-dft", "No matching method for generic function `meep_fields_add_dft'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_update_dfts (SCM s_0) { #define FUNC_NAME "meep-fields-update-dfts" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->update_dfts(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft-flux" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; double arg4 ; double arg5 ; int arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_flux > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6); { meep::dft_flux * resultptr; resultptr = new meep::dft_flux((const meep::dft_flux &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux_box (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-fields-add-dft-flux-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_flux > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } { arg5 = (int) scm_num2int(s_4, SCM_ARG1, FUNC_NAME); } result = (arg1)->add_dft_flux_box((meep::volume const &)*arg2,arg3,arg4,arg5); { meep::dft_flux * resultptr; resultptr = new meep::dft_flux((const meep::dft_flux &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux_plane (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-fields-add-dft-flux-plane" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_flux > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } { arg5 = (int) scm_num2int(s_4, SCM_ARG1, FUNC_NAME); } result = (arg1)->add_dft_flux_plane((meep::volume const &)*arg2,arg3,arg4,arg5); { meep::dft_flux * resultptr; resultptr = new meep::dft_flux((const meep::dft_flux &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-dft-flux" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_flux > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume_list, 2, 0); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (int) scm_num2int(argv[4], SCM_ARG1, FUNC_NAME); } result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,arg3,arg4,arg5); { meep::dft_flux * resultptr; resultptr = new meep::dft_flux((const meep::dft_flux &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_flux, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_flux(SCM rest) { #define FUNC_NAME "meep-fields-add-dft-flux" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-fields-add-dft-flux"); if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume_list, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft_flux__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_add_dft_flux__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-fields-add-dft-flux", "No matching method for generic function `meep_fields_add_dft_flux'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_add_dft_force (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-fields-add-dft-force" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume_list *arg2 = (meep::volume_list *) 0 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; SwigValueWrapper< meep::dft_force > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume_list *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume_list, 2, 0); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } { arg5 = (int) scm_num2int(s_4, SCM_ARG1, FUNC_NAME); } result = (arg1)->add_dft_force((meep::volume_list const *)arg2,arg3,arg4,arg5); { meep::dft_force * resultptr; resultptr = new meep::dft_force((const meep::dft_force &) result); gswig_result = SWIG_NewPointerObj (resultptr, SWIGTYPE_p_meep__dft_force, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_chi1inv (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-get-chi1inv" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); arg4 = &vec__arg4; result = (double)((meep::fields const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_inveps (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-get-inveps" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::direction arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(s_2, SCM_ARG1, FUNC_NAME); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); arg4 = &vec__arg4; result = (double)((meep::fields const *)arg1)->get_inveps(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_eps (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-get-eps" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)((meep::fields const *)arg1)->get_eps((meep::vec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_mu (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-get-mu" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(s_1)); arg2 = &vec__arg2; result = (double)((meep::fields const *)arg1)->get_mu((meep::vec const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_point (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-get-point" meep::fields *arg1 = (meep::fields *) 0 ; meep::monitor_point *arg2 = (meep::monitor_point *) 0 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::monitor_point *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__monitor_point, 2, 0); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(s_2)); arg3 = &vec__arg3; ((meep::fields const *)arg1)->get_point(arg2,(meep::vec const &)*arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_new_point__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-new-point" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; meep::monitor_point *arg3 = (meep::monitor_point *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::monitor_point *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (meep::monitor_point *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__monitor_point, 3, 0); } result = (meep::monitor_point *)((meep::fields const *)arg1)->get_new_point((meep::vec const &)*arg2,arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__monitor_point, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_new_point__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-new-point" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::monitor_point *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; result = (meep::monitor_point *)((meep::fields const *)arg1)->get_new_point((meep::vec const &)*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__monitor_point, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_new_point(SCM rest) { #define FUNC_NAME "meep-fields-get-new-point" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-get-new-point"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { return _wrap_meep_fields_get_new_point__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__monitor_point, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_get_new_point__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-get-new-point", "No matching method for generic function `meep_fields_get_new_point'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_analytic_chi1 (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-fields-analytic-chi1" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; double arg3 ; meep::vec *arg4 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } meep::vec vec__arg4 = vector3_to_vec(ctl_convert_vector3_to_c(s_3)); arg4 = &vec__arg4; result = ((meep::fields const *)arg1)->analytic_chi1(arg2,arg3,(meep::vec const &)*arg4); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-prepare-for-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } (arg1)->prepare_for_bands((meep::vec const &)*arg2,arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-prepare-for-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } (arg1)->prepare_for_bands((meep::vec const &)*arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-prepare-for-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } (arg1)->prepare_for_bands((meep::vec const &)*arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-prepare-for-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } (arg1)->prepare_for_bands((meep::vec const &)*arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_prepare_for_bands(SCM rest) { #define FUNC_NAME "meep-fields-prepare-for-bands" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-fields-prepare-for-bands"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_prepare_for_bands__SWIG_3(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_prepare_for_bands__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_prepare_for_bands__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_prepare_for_bands__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-fields-prepare-for-bands", "No matching method for generic function `meep_fields_prepare_for_bands'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_record_bands (SCM s_0) { #define FUNC_NAME "meep-fields-record-bands" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->record_bands(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_band__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-band" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } result = (arg1)->get_band(arg2,arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_band__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-band" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } result = (arg1)->get_band(arg2); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_band(SCM rest) { #define FUNC_NAME "meep-fields-get-band" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-get-band"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_get_band__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_get_band__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-get-band", "No matching method for generic function `meep_fields_get_band'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_grace_bands__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-grace-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::grace *arg2 = (meep::grace *) 0 ; int arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::grace *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grace, 2, 0); } { arg3 = (int) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } (arg1)->grace_bands(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_grace_bands__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-grace-bands" meep::fields *arg1 = (meep::fields *) 0 ; meep::grace *arg2 = (meep::grace *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::grace *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__grace, 2, 0); } (arg1)->grace_bands(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_grace_bands(SCM rest) { #define FUNC_NAME "meep-fields-grace-bands" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-grace-bands"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_grace_bands__SWIG_1(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_grace_bands__SWIG_0(argc,argv); } } } } scm_misc_error("meep-fields-grace-bands", "No matching method for generic function `meep_fields_grace_bands'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_output_bands__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-bands" meep::fields *arg1 = (meep::fields *) 0 ; FILE *arg2 = (FILE *) 0 ; char *arg3 = (char *) 0 ; int arg4 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (FILE *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_FILE, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } { arg4 = (int) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } (arg1)->output_bands(arg2,(char const *)arg3,arg4); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_bands__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-output-bands" meep::fields *arg1 = (meep::fields *) 0 ; FILE *arg2 = (FILE *) 0 ; char *arg3 = (char *) 0 ; int must_free3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (FILE *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_FILE, 2, 0); } { arg3 = (char *)SWIG_scm2str(argv[2]); must_free3 = 1; } (arg1)->output_bands(arg2,(char const *)arg3); gswig_result = SCM_UNSPECIFIED; if (must_free3 && arg3) SWIG_free(arg3); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_output_bands(SCM rest) { #define FUNC_NAME "meep-fields-output-bands" SCM argv[4]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "meep-fields-output-bands"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_FILE, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_bands__SWIG_1(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_FILE, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_STRINGP(argv[2]) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_output_bands__SWIG_0(argc,argv); } } } } } scm_misc_error("meep-fields-output-bands", "No matching method for generic function `meep_fields_output_bands'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_get_field__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-field" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = ((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_field__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-field" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = ((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_field__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-get-field" meep::fields *arg1 = (meep::fields *) 0 ; meep::derived_component arg2 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::derived_component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = (double)((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_get_field(SCM rest) { #define FUNC_NAME "meep-fields-get-field" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-get-field"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_get_field__SWIG_0(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_get_field__SWIG_1(argc,argv); } } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_get_field__SWIG_2(argc,argv); } } } } scm_misc_error("meep-fields-get-field", "No matching method for generic function `meep_fields_get_field'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_synchronize_magnetic_fields (SCM s_0) { #define FUNC_NAME "meep-fields-synchronize-magnetic-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->synchronize_magnetic_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_restore_magnetic_fields (SCM s_0) { #define FUNC_NAME "meep-fields-restore-magnetic-fields" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->restore_magnetic_fields(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_energy_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_electric_energy_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-electric-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->electric_energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_magnetic_energy_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-magnetic-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->magnetic_energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_thermo_energy_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-thermo-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->thermo_energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_total_energy (SCM s_0) { #define FUNC_NAME "meep-fields-total-energy" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)(arg1)->total_energy(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_field_energy_in_box__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-field-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->field_energy_in_box((meep::volume const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_field_energy_in_box__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-field-energy-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->field_energy_in_box(arg2,(meep::volume const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_field_energy_in_box(SCM rest) { #define FUNC_NAME "meep-fields-field-energy-in-box" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-field-energy-in-box"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_field_energy_in_box__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_field_energy_in_box__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-field-energy-in-box", "No matching method for generic function `meep_fields_field_energy_in_box'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_field_energy (SCM s_0) { #define FUNC_NAME "meep-fields-field-energy" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)(arg1)->field_energy(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_flux_in_box_wrongH (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-flux-in-box-wrongH" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->flux_in_box_wrongH(arg2,(meep::volume const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_flux_in_box (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-flux-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->flux_in_box(arg2,(meep::volume const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_flux_vol (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-add-flux-vol" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (meep::flux_vol *)(arg1)->add_flux_vol(arg2,(meep::volume const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_flux_plane__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-flux-plane" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_meep__volume, 2, 0); } result = (meep::flux_vol *)(arg1)->add_flux_plane((meep::volume const &)*arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_flux_plane__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-add-flux-plane" meep::fields *arg1 = (meep::fields *) 0 ; meep::vec *arg2 = 0 ; meep::vec *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } meep::vec vec__arg2 = vector3_to_vec(ctl_convert_vector3_to_c(argv[1])); arg2 = &vec__arg2; meep::vec vec__arg3 = vector3_to_vec(ctl_convert_vector3_to_c(argv[2])); arg3 = &vec__arg3; result = (meep::flux_vol *)(arg1)->add_flux_plane((meep::vec const &)*arg2,(meep::vec const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_add_flux_plane(SCM rest) { #define FUNC_NAME "meep-fields-add-flux-plane" SCM argv[3]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "meep-fields-add-flux-plane"); if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_add_flux_plane__SWIG_0(argc,argv); } } } if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SwigVector3_Check(argv[1]); } if (_v) { { _v = SwigVector3_Check(argv[2]); } if (_v) { return _wrap_meep_fields_add_flux_plane__SWIG_1(argc,argv); } } } } scm_misc_error("meep-fields-add-flux-plane", "No matching method for generic function `meep_fields_add_flux_plane'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_electric_energy_max_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-electric-energy-max-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->electric_energy_max_in_box((meep::volume const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_modal_volume_in_box (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-modal-volume-in-box" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (double)(arg1)->modal_volume_in_box((meep::volume const &)*arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_electric_sqr_weighted_integral (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-electric-sqr-weighted-integral" meep::fields *arg1 = (meep::fields *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(s_1, SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->electric_sqr_weighted_integral(arg2,(meep::volume const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_electric_energy_weighted_integral (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "meep-fields-electric-energy-weighted-integral" meep::fields *arg1 = (meep::fields *) 0 ; double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (double (*)(meep::vec const &))SWIG_MustGetPtr(s_1, SWIGTYPE_p_f_r_q_const__meep__vec__double, 2, 0); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (double)(arg1)->electric_energy_weighted_integral(arg2,(meep::volume const &)*arg3); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_set_output_directory (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-set-output-directory" meep::fields *arg1 = (meep::fields *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->set_output_directory((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_verbose__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-verbose" meep::fields *arg1 = (meep::fields *) 0 ; int arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } (arg1)->verbose(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_verbose__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-verbose" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->verbose(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_verbose(SCM rest) { #define FUNC_NAME "meep-fields-verbose" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-fields-verbose"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_verbose__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_fields_verbose__SWIG_0(argc,argv); } } } scm_misc_error("meep-fields-verbose", "No matching method for generic function `meep_fields_verbose'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_count_volume (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-count-volume" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (double)(arg1)->count_volume(arg2); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_have_component (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-have-component" meep::fields *arg1 = (meep::fields *) 0 ; meep::component arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::component) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (bool)(arg1)->have_component(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_max_eps (SCM s_0) { #define FUNC_NAME "meep-fields-max-eps" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } result = (double)((meep::fields const *)arg1)->max_eps(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_step_boundaries (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-step-boundaries" meep::fields *arg1 = (meep::fields *) 0 ; meep::field_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::field_type) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } (arg1)->step_boundaries(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_nosize_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-nosize-direction" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; bool result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } result = (bool)((meep::fields const *)arg1)->nosize_direction(arg2); { gswig_result = SCM_BOOL(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_normal_direction (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-normal-direction" meep::fields *arg1 = (meep::fields *) 0 ; meep::volume *arg2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::direction result; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::volume *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__volume, 2, 0); } result = (meep::direction)((meep::fields const *)arg1)->normal_direction((meep::volume const &)*arg2); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_casimir_stress_dct_integral__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-casimir-stress-dct-integral" 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 ; meep::volume *argp8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (meep::field_type) scm_num2int(argv[6], SCM_ARG1, FUNC_NAME); } { argp8 = (meep::volume *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__volume, 8, 0); arg8 = *argp8; } { arg9 = (bool) SCM_NFALSEP(argv[8]); } result = (arg1)->casimir_stress_dct_integral(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_casimir_stress_dct_integral__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-fields-casimir-stress-dct-integral" 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 ; meep::volume *argp8 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > result; { arg1 = (meep::fields *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (meep::direction) scm_num2int(argv[2], SCM_ARG1, FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } { arg7 = (meep::field_type) scm_num2int(argv[6], SCM_ARG1, FUNC_NAME); } { argp8 = (meep::volume *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_meep__volume, 8, 0); arg8 = *argp8; } result = (arg1)->casimir_stress_dct_integral(arg2,arg3,arg4,arg5,arg6,arg7,arg8); { gswig_result = scm_make_rectangular(scm_make_real((&result)->real()), scm_make_real((&result)->imag())); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_casimir_stress_dct_integral(SCM rest) { #define FUNC_NAME "meep-fields-casimir-stress-dct-integral" SCM argv[9]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 9, "meep-fields-casimir-stress-dct-integral"); if (argc == 8) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[6])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_fields_casimir_stress_dct_integral__SWIG_1(argc,argv); } } } } } } } } } if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__fields, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[6])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_meep__volume, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_BOOLP(argv[8]) ? 1 : 0; } if (_v) { return _wrap_meep_fields_casimir_stress_dct_integral__SWIG_0(argc,argv); } } } } } } } } } } scm_misc_error("meep-fields-casimir-stress-dct-integral", "No matching method for generic function `meep_fields_casimir_stress_dct_integral'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_fields_set_solve_cw_omega (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-fields-set-solve-cw-omega" meep::fields *arg1 = (meep::fields *) 0 ; complex< double > arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { cnumber cnum = ctl_convert_cnumber_to_c(s_1); arg2 = std::complex(cnum.re, cnum.im); } (arg1)->set_solve_cw_omega(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_fields_unset_solve_cw_omega (SCM s_0) { #define FUNC_NAME "meep-fields-unset-solve-cw-omega" meep::fields *arg1 = (meep::fields *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } (arg1)->unset_solve_cw_omega(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_flux_vol (SCM s_0, SCM s_1, SCM s_2) { #define FUNC_NAME "new-meep-flux-vol" meep::fields *arg1 = (meep::fields *) 0 ; meep::direction arg2 ; meep::volume *arg3 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::fields *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__fields, 1, 0); } { arg2 = (meep::direction) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { arg3 = (meep::volume *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_meep__volume, 3, 0); } result = (meep::flux_vol *)new meep::flux_vol(arg1,arg2,(meep::volume const &)*arg3); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 1); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_delete_meep_flux_vol (SCM s_0) { #define FUNC_NAME "delete-meep-flux-vol" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_update_half (SCM s_0) { #define FUNC_NAME "meep-flux-vol-update-half" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } (arg1)->update_half(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_update (SCM s_0) { #define FUNC_NAME "meep-flux-vol-update" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } (arg1)->update(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_flux (SCM s_0) { #define FUNC_NAME "meep-flux-vol-flux" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; double result; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } result = (double)(arg1)->flux(); { gswig_result = scm_make_real(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_next_set (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-flux-vol-next-set" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; meep::flux_vol *arg2 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } { arg2 = (meep::flux_vol *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_meep__flux_vol, 2, 0); } if (arg1) (arg1)->next = arg2; gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_flux_vol_next_get (SCM s_0) { #define FUNC_NAME "meep-flux-vol-next-get" meep::flux_vol *arg1 = (meep::flux_vol *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::flux_vol *result = 0 ; { arg1 = (meep::flux_vol *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__flux_vol, 1, 0); } result = (meep::flux_vol *) ((arg1)->next); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__flux_vol, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_type_XY(SCM s_0) { #define FUNC_NAME "meep-grace-type-XY" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_grace_type_XY); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_type_ERROR_BARS(SCM s_0) { #define FUNC_NAME "meep-grace-type-ERROR-BARS" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_meep_grace_type_ERROR_BARS); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_grace__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-grace" char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int must_free1 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grace *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (meep::grace *)new meep::grace((char const *)arg1,(char const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grace, 1); } if (must_free1 && arg1) SWIG_free(arg1); if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_grace__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "new-meep-grace" char *arg1 = (char *) 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::grace *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } result = (meep::grace *)new meep::grace((char const *)arg1); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__grace, 1); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_new_meep_grace(SCM rest) { #define FUNC_NAME "new-meep-grace" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "new-meep-grace"); if (argc == 1) { int _v; { _v = SCM_STRINGP(argv[0]) ? 1 : 0; } if (_v) { return _wrap_new_meep_grace__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { _v = SCM_STRINGP(argv[0]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { return _wrap_new_meep_grace__SWIG_0(argc,argv); } } } scm_misc_error("new-meep-grace", "No matching method for generic function `new_meep_grace'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_delete_meep_grace (SCM s_0) { #define FUNC_NAME "delete-meep-grace" meep::grace *arg1 = (meep::grace *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grace, 1, 0); } delete arg1; gswig_result = SCM_UNSPECIFIED; SWIG_Guile_MarkPointerDestroyed(s_0); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_new_set__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-new-set" meep::grace *arg1 = (meep::grace *) 0 ; meep::grace_type arg2 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (meep::grace_type) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } (arg1)->new_set(arg2); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_new_set__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-new-set" meep::grace *arg1 = (meep::grace *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } (arg1)->new_set(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_new_set(SCM rest) { #define FUNC_NAME "meep-grace-new-set" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-grace-new-set"); if (argc == 1) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_grace_new_set__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_new_set__SWIG_0(argc,argv); } } } scm_misc_error("meep-grace-new-set", "No matching method for generic function `meep_grace_new_set'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grace_new_curve (SCM s_0) { #define FUNC_NAME "meep-grace-new-curve" meep::grace *arg1 = (meep::grace *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grace, 1, 0); } (arg1)->new_curve(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_set_legend (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-grace-set-legend" meep::grace *arg1 = (meep::grace *) 0 ; char *arg2 = (char *) 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } (arg1)->set_legend((char const *)arg2); gswig_result = SCM_UNSPECIFIED; if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_set_range (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "meep-grace-set-range" meep::grace *arg1 = (meep::grace *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } { arg5 = (double) scm_num2dbl(s_4, FUNC_NAME); } (arg1)->set_range(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_point__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-point" meep::grace *arg1 = (meep::grace *) 0 ; double arg2 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } (arg1)->output_point(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_point__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-point" meep::grace *arg1 = (meep::grace *) 0 ; double arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } (arg1)->output_point(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_point__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-point" meep::grace *arg1 = (meep::grace *) 0 ; double arg2 ; double arg3 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } (arg1)->output_point(arg2,arg3); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_point(SCM rest) { #define FUNC_NAME "meep-grace-output-point" SCM argv[5]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 5, "meep-grace-output-point"); if (argc == 3) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_point__SWIG_2(argc,argv); } } } } if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_point__SWIG_1(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_point__SWIG_0(argc,argv); } } } } } } scm_misc_error("meep-grace-output-point", "No matching method for generic function `meep_grace_output_point'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_grace_output_out_of_order__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-out-of-order" meep::grace *arg1 = (meep::grace *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } (arg1)->output_out_of_order(arg2,arg3,arg4,arg5,arg6); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_out_of_order__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-out-of-order" meep::grace *arg1 = (meep::grace *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } (arg1)->output_out_of_order(arg2,arg3,arg4,arg5); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_out_of_order__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-grace-output-out-of-order" meep::grace *arg1 = (meep::grace *) 0 ; int arg2 ; double arg3 ; double arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (meep::grace *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_meep__grace, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } (arg1)->output_out_of_order(arg2,arg3,arg4); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_grace_output_out_of_order(SCM rest) { #define FUNC_NAME "meep-grace-output-out-of-order" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-grace-output-out-of-order"); if (argc == 4) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_out_of_order__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_out_of_order__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_meep__grace, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_grace_output_out_of_order__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-grace-output-out-of-order", "No matching method for generic function `meep_grace_output_out_of_order'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_make_output_directory__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-output-directory" char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int must_free1 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } { arg2 = (char *)SWIG_scm2str(argv[1]); must_free2 = 1; } result = (char *)meep::make_output_directory((char const *)arg1,(char const *)arg2); { gswig_result = scm_makfrom0str((const char *)result); } if (must_free1 && arg1) SWIG_free(arg1); if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_output_directory__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-output-directory" char *arg1 = (char *) 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; char *result = 0 ; { arg1 = (char *)SWIG_scm2str(argv[0]); must_free1 = 1; } result = (char *)meep::make_output_directory((char const *)arg1); { gswig_result = scm_makfrom0str((const char *)result); } if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_output_directory(SCM rest) { #define FUNC_NAME "meep-make-output-directory" SCM argv[2]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "meep-make-output-directory"); if (argc == 1) { int _v; { _v = SCM_STRINGP(argv[0]) ? 1 : 0; } if (_v) { return _wrap_meep_make_output_directory__SWIG_1(argc,argv); } } if (argc == 2) { int _v; { _v = SCM_STRINGP(argv[0]) ? 1 : 0; } if (_v) { { _v = SCM_STRINGP(argv[1]) ? 1 : 0; } if (_v) { return _wrap_meep_make_output_directory__SWIG_0(argc,argv); } } } scm_misc_error("meep-make-output-directory", "No matching method for generic function `meep_make_output_directory'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_trash_output_directory (SCM s_0) { #define FUNC_NAME "meep-trash-output-directory" char *arg1 = (char *) 0 ; int must_free1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } meep::trash_output_directory((char const *)arg1); gswig_result = SCM_UNSPECIFIED; if (must_free1 && arg1) SWIG_free(arg1); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_create_output_file (SCM s_0, SCM s_1) { #define FUNC_NAME "meep-create-output-file" char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; int must_free1 = 0 ; int must_free2 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; FILE *result = 0 ; { arg1 = (char *)SWIG_scm2str(s_0); must_free1 = 1; } { arg2 = (char *)SWIG_scm2str(s_1); must_free2 = 1; } result = (FILE *)meep::create_output_file((char const *)arg1,(char const *)arg2); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_FILE, 0); } if (must_free1 && arg1) SWIG_free(arg1); if (must_free2 && arg2) SWIG_free(arg2); return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_deal_with_ctrl_c__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-deal-with-ctrl-c" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(argv[0], SCM_ARG1, FUNC_NAME); } meep::deal_with_ctrl_c(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_deal_with_ctrl_c__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-deal-with-ctrl-c" SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::deal_with_ctrl_c(); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_deal_with_ctrl_c(SCM rest) { #define FUNC_NAME "meep-deal-with-ctrl-c" SCM argv[1]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 1, "meep-deal-with-ctrl-c"); if (argc == 0) { return _wrap_meep_deal_with_ctrl_c__SWIG_1(argc,argv); } if (argc == 1) { int _v; { _v = SCM_NFALSEP(scm_integer_p(argv[0])) ? 1 : 0; } if (_v) { return _wrap_meep_deal_with_ctrl_c__SWIG_0(argc,argv); } } scm_misc_error("meep-deal-with-ctrl-c", "No matching method for generic function `meep_deal_with_ctrl_c'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_interrupt(SCM s_0) { #define FUNC_NAME "interrupt" SCM gswig_result; if (s_0 != SCM_UNDEFINED) { { meep::interrupt = (int) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } } { gswig_result = scm_long2num(meep::interrupt); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" complex< double > *arg1 = (complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; complex< double > *arg7 = (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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_complexT_double_t, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_num2dbl(argv[10], FUNC_NAME); } { arg12 = (double) scm_num2dbl(argv[11], FUNC_NAME); } { arg13 = (double) scm_num2dbl(argv[12], FUNC_NAME); } { arg14 = (double) scm_num2dbl(argv[13], FUNC_NAME); } { arg15 = (double) scm_num2dbl(argv[14], FUNC_NAME); } { arg16 = (double) scm_num2dbl(argv[15], FUNC_NAME); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" complex< double > *arg1 = (complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; complex< double > *arg7 = (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 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_complexT_double_t, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_num2dbl(argv[10], FUNC_NAME); } { arg12 = (double) scm_num2dbl(argv[11], FUNC_NAME); } { arg13 = (double) scm_num2dbl(argv[12], FUNC_NAME); } { arg14 = (double) scm_num2dbl(argv[13], FUNC_NAME); } { arg15 = (double) scm_num2dbl(argv[14], FUNC_NAME); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" complex< double > *arg1 = (complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; complex< double > *arg7 = (complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; double arg12 ; double arg13 ; double arg14 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_complexT_double_t, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_num2dbl(argv[10], FUNC_NAME); } { arg12 = (double) scm_num2dbl(argv[11], FUNC_NAME); } { arg13 = (double) scm_num2dbl(argv[12], FUNC_NAME); } { arg14 = (double) scm_num2dbl(argv[13], FUNC_NAME); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_3 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" complex< double > *arg1 = (complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; complex< double > *arg7 = (complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; double arg12 ; double arg13 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_complexT_double_t, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_num2dbl(argv[10], FUNC_NAME); } { arg12 = (double) scm_num2dbl(argv[11], FUNC_NAME); } { arg13 = (double) scm_num2dbl(argv[12], FUNC_NAME); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_4 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" complex< double > *arg1 = (complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; complex< double > *arg7 = (complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; double arg12 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_complexT_double_t, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_num2dbl(argv[10], FUNC_NAME); } { arg12 = (double) scm_num2dbl(argv[11], FUNC_NAME); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_5 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" complex< double > *arg1 = (complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; complex< double > *arg7 = (complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; double arg11 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_complexT_double_t, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } { arg11 = (double) scm_num2dbl(argv[10], FUNC_NAME); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_6 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" complex< double > *arg1 = (complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; complex< double > *arg7 = (complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; double *arg10 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_complexT_double_t, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } { arg10 = (double *)SWIG_MustGetPtr(argv[9], SWIGTYPE_p_double, 10, 0); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv__SWIG_7 (int argc, SCM *argv) { #define FUNC_NAME "meep-do-harminv" complex< double > *arg1 = (complex< double > *) 0 ; int arg2 ; double arg3 ; double arg4 ; double arg5 ; int arg6 ; complex< double > *arg7 = (complex< double > *) 0 ; double *arg8 = (double *) 0 ; double *arg9 = (double *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; int result; { arg1 = (complex< double > *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_complexT_double_t, 1, 0); } { arg2 = (int) scm_num2int(argv[1], SCM_ARG1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (double) scm_num2dbl(argv[3], FUNC_NAME); } { arg5 = (double) scm_num2dbl(argv[4], FUNC_NAME); } { arg6 = (int) scm_num2int(argv[5], SCM_ARG1, FUNC_NAME); } { arg7 = (complex< double > *)SWIG_MustGetPtr(argv[6], SWIGTYPE_p_complexT_double_t, 7, 0); } { arg8 = (double *)SWIG_MustGetPtr(argv[7], SWIGTYPE_p_double, 8, 0); } { arg9 = (double *)SWIG_MustGetPtr(argv[8], SWIGTYPE_p_double, 9, 0); } result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); { gswig_result = scm_long2num(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_do_harminv(SCM rest) { #define FUNC_NAME "meep-do-harminv" SCM argv[16]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 16, "meep-do-harminv"); if (argc == 9) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_do_harminv__SWIG_7(argc,argv); } } } } } } } } } } if (argc == 10) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { return _wrap_meep_do_harminv__SWIG_6(argc,argv); } } } } } } } } } } } if (argc == 11) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_5(argc,argv); } } } } } } } } } } } } if (argc == 12) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_4(argc,argv); } } } } } } } } } } } } } if (argc == 13) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[12])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_3(argc,argv); } } } } } } } } } } } } } } if (argc == 14) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[12])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[13])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_2(argc,argv); } } } } } } } } } } } } } } } if (argc == 15) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[12])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[13])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[14])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_1(argc,argv); } } } } } } } } } } } } } } } } if (argc == 16) { int _v; { void *ptr; int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[4])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[5])) ? 1 : 0; } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[6], &ptr, SWIGTYPE_p_complexT_double_t, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[7], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[8], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { void *ptr; int res = SWIG_ConvertPtr(argv[9], &ptr, SWIGTYPE_p_double, 0); _v = SWIG_CheckState(res); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[10])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[11])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[12])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[13])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[14])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[15])) ? 1 : 0; } if (_v) { return _wrap_meep_do_harminv__SWIG_0(argc,argv); } } } } } } } } } } } } } } } } } scm_misc_error("meep-do-harminv", "No matching method for generic function `meep_do_harminv'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-casimir-gfunc" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; complex< double > (*arg5)(complex< double >) = (complex< double > (*)(complex< double >)) 0 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > *result = 0 ; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (meep::field_type) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } { my_complex_func3_scm = argv[4]; arg5 = my_complex_func3; } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } result = (complex< double > *)meep::make_casimir_gfunc(arg1,arg2,arg3,arg4,arg5,arg6); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-casimir-gfunc" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; complex< double > (*arg5)(complex< double >) = (complex< double > (*)(complex< double >)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > *result = 0 ; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (meep::field_type) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } { my_complex_func3_scm = argv[4]; arg5 = my_complex_func3; } result = (complex< double > *)meep::make_casimir_gfunc(arg1,arg2,arg3,arg4,arg5); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "meep-make-casimir-gfunc" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > *result = 0 ; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (meep::field_type) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } result = (complex< double > *)meep::make_casimir_gfunc(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc(SCM rest) { #define FUNC_NAME "meep-make-casimir-gfunc" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "meep-make-casimir-gfunc"); if (argc == 4) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_meep_make_casimir_gfunc__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { return _wrap_meep_make_casimir_gfunc__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_meep_make_casimir_gfunc__SWIG_0(argc,argv); } } } } } } } scm_misc_error("meep-make-casimir-gfunc", "No matching method for generic function `meep_make_casimir_gfunc'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_meep_make_casimir_gfunc_kz (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "meep-make-casimir-gfunc-kz" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; complex< double > *result = 0 ; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (meep::field_type) scm_num2int(s_3, SCM_ARG1, FUNC_NAME); } result = (complex< double > *)meep::make_casimir_gfunc_kz(arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_complexT_double_t, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_MEEP_CTL_SWIG_HPP(SCM s_0) { #define FUNC_NAME "MEEP-CTL-SWIG-HPP" SCM gswig_result; { gswig_result = scm_long2num(gswig_const_MEEP_CTL_SWIG_HPP); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_vec_to_vector3 (SCM s_0) { #define FUNC_NAME "vec-to-vector3" meep::vec *arg1 = 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; vector3 result; meep::vec vec__arg1 = vector3_to_vec(ctl_convert_vector3_to_c(s_0)); arg1 = &vec__arg1; result = vec_to_vector3((meep::vec const &)*arg1); { gswig_result = ctl_convert_vector3_to_scm(result); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_vector3_to_vec (SCM s_0) { #define FUNC_NAME "vector3-to-vec" vector3 arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::vec result; { arg1 = ctl_convert_vector3_to_c(s_0); } result = vector3_to_vec(arg1); { gswig_result = ctl_convert_vector3_to_scm(vec_to_vector3(result)); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_set_dimensions (SCM s_0) { #define FUNC_NAME "set-dimensions" int arg1 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (int) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } set_dimensions(arg1); gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_structure (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4, SCM s_5, SCM s_6, SCM s_7, SCM s_8, SCM s_9, SCM s_10, SCM s_11, SCM s_12, SCM s_13, SCM s_14, SCM s_15, SCM s_16) { #define FUNC_NAME "make-structure" int arg1 ; vector3 arg2 ; vector3 arg3 ; double arg4 ; bool arg5 ; double arg6 ; int arg7 ; bool arg8 ; ctlio::geometric_object_list arg9 ; ctlio::material_type_list arg10 ; ctlio::material_type arg11 ; ctlio::pml_list arg12 ; ctlio::symmetry_list arg13 ; int arg14 ; double arg15 ; double arg16 ; double arg17 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::structure *result = 0 ; { arg1 = (int) scm_num2int(s_0, SCM_ARG1, FUNC_NAME); } { arg2 = ctl_convert_vector3_to_c(s_1); } { arg3 = ctl_convert_vector3_to_c(s_2); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } { arg5 = (bool) SCM_NFALSEP(s_4); } { arg6 = (double) scm_num2dbl(s_5, FUNC_NAME); } { arg7 = (int) scm_num2int(s_6, SCM_ARG1, FUNC_NAME); } { arg8 = (bool) SCM_NFALSEP(s_7); } { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_8); int i_t; (&arg9)->num_items = list_length(lo_t); (&arg9)->items = (new geometric_object[(&arg9)->num_items]); for (i_t = 0; i_t < (&arg9)->num_items; i_t++) { geometric_object_input(object_list_ref(lo_t, i_t), &(&arg9)->items[i_t]); } } } { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_9); int i_t; (&arg10)->num_items = list_length(lo_t); (&arg10)->items = (new material_type[(&arg10)->num_items]); for (i_t = 0; i_t < (&arg10)->num_items; i_t++) { material_type_input(object_list_ref(lo_t, i_t), &(&arg10)->items[i_t]); } } } { using namespace ctlio; material_type_input(ctl_convert_object_to_c(s_10), &arg11); } { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_11); int i_t; (&arg12)->num_items = list_length(lo_t); (&arg12)->items = (new pml[(&arg12)->num_items]); for (i_t = 0; i_t < (&arg12)->num_items; i_t++) { pml_input(object_list_ref(lo_t, i_t), &(&arg12)->items[i_t]); } } } { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_12); int i_t; (&arg13)->num_items = list_length(lo_t); (&arg13)->items = (new symmetry[(&arg13)->num_items]); for (i_t = 0; i_t < (&arg13)->num_items; i_t++) { symmetry_input(object_list_ref(lo_t, i_t), &(&arg13)->items[i_t]); } } } { arg14 = (int) scm_num2int(s_13, SCM_ARG1, FUNC_NAME); } { arg15 = (double) scm_num2dbl(s_14, FUNC_NAME); } { arg16 = (double) scm_num2dbl(s_15, FUNC_NAME); } { arg17 = (double) scm_num2dbl(s_16, FUNC_NAME); } result = (meep::structure *)make_structure(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__structure, 0); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_structure_rest (SCM rest) { SCM arg[17]; SWIG_Guile_GetArgs (arg, rest, 17, 0, "make-structure"); return _wrap_make_structure(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8], arg[9], arg[10], arg[11], arg[12], arg[13], arg[14], arg[15], arg[16]); } static SCM _wrap_do_harminv (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4) { #define FUNC_NAME "do-harminv" ctlio::cnumber_list arg1 ; double arg2 ; double arg3 ; double arg4 ; int arg5 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cvector3_list result; { using namespace ctlio; { list lo_t = ctl_convert_list_to_c(s_0); int i_t; (&arg1)->num_items = list_length(lo_t); (&arg1)->items = (new cnumber[(&arg1)->num_items]); for (i_t = 0; i_t < (&arg1)->num_items; i_t++) { (&arg1)->items[i_t] = cnumber_list_ref(lo_t, i_t); } } } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (double) scm_num2dbl(s_3, FUNC_NAME); } { arg5 = (int) scm_num2int(s_4, SCM_ARG1, FUNC_NAME); } result = do_harminv(arg1,arg2,arg3,arg4,arg5); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cvector3_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_dft_flux_flux (SCM s_0) { #define FUNC_NAME "dft-flux-flux" meep::dft_flux *arg1 = (meep::dft_flux *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::number_list result; { arg1 = (meep::dft_flux *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_flux, 1, 0); } result = dft_flux_flux(arg1); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_number_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_dft_force_force (SCM s_0) { #define FUNC_NAME "dft-force-force" meep::dft_force *arg1 = (meep::dft_force *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::number_list result; { arg1 = (meep::dft_force *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__dft_force, 1, 0); } result = dft_force_force(arg1); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_number_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_casimir_g__SWIG_0 (int argc, SCM *argv) { #define FUNC_NAME "make-casimir-g" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; complex< double > (*arg5)(complex< double >) = (complex< double > (*)(complex< double >)) 0 ; double arg6 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (meep::field_type) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } { my_complex_func3_scm = argv[4]; arg5 = my_complex_func3; } { arg6 = (double) scm_num2dbl(argv[5], FUNC_NAME); } result = make_casimir_g(arg1,arg2,arg3,arg4,arg5,arg6); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_casimir_g__SWIG_1 (int argc, SCM *argv) { #define FUNC_NAME "make-casimir-g" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; complex< double > (*arg5)(complex< double >) = (complex< double > (*)(complex< double >)) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (meep::field_type) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } { my_complex_func3_scm = argv[4]; arg5 = my_complex_func3; } result = make_casimir_g(arg1,arg2,arg3,arg4,arg5); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_casimir_g__SWIG_2 (int argc, SCM *argv) { #define FUNC_NAME "make-casimir-g" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (double) scm_num2dbl(argv[0], FUNC_NAME); } { arg2 = (double) scm_num2dbl(argv[1], FUNC_NAME); } { arg3 = (double) scm_num2dbl(argv[2], FUNC_NAME); } { arg4 = (meep::field_type) scm_num2int(argv[3], SCM_ARG1, FUNC_NAME); } result = make_casimir_g(arg1,arg2,arg3,arg4); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_casimir_g(SCM rest) { #define FUNC_NAME "make-casimir-g" SCM argv[6]; int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "make-casimir-g"); if (argc == 4) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { return _wrap_make_casimir_g__SWIG_2(argc,argv); } } } } } if (argc == 5) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { return _wrap_make_casimir_g__SWIG_1(argc,argv); } } } } } } if (argc == 6) { int _v; { _v = SCM_NFALSEP(scm_real_p(argv[0])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[1])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[2])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_integer_p(argv[3])) ? 1 : 0; } if (_v) { { _v = SCM_NFALSEP(scm_procedure_p(argv[4])); } if (_v) { { _v = SCM_NFALSEP(scm_real_p(argv[5])) ? 1 : 0; } if (_v) { return _wrap_make_casimir_g__SWIG_0(argc,argv); } } } } } } } scm_misc_error("make-casimir-g", "No matching method for generic function `make_casimir_g'", SCM_EOL); #undef FUNC_NAME } static SCM _wrap_make_casimir_g_kz (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "make-casimir-g-kz" double arg1 ; double arg2 ; double arg3 ; meep::field_type arg4 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; ctlio::cnumber_list result; { arg1 = (double) scm_num2dbl(s_0, FUNC_NAME); } { arg2 = (double) scm_num2dbl(s_1, FUNC_NAME); } { arg3 = (double) scm_num2dbl(s_2, FUNC_NAME); } { arg4 = (meep::field_type) scm_num2int(s_3, SCM_ARG1, FUNC_NAME); } result = make_casimir_g_kz(arg1,arg2,arg3,arg4); { using namespace ctlio; gswig_result = ctl_convert_list_to_scm(make_cnumber_list((&result)->num_items, (&result)->items)); { int index_t; for (index_t = 0; index_t < (&result)->num_items; index_t++) { } } delete[] ((&result)->items); } return gswig_result; #undef FUNC_NAME } static SCM _wrap_make_volume_list (SCM s_0, SCM s_1, SCM s_2, SCM s_3) { #define FUNC_NAME "make-volume-list" meep::volume *arg1 = 0 ; int arg2 ; complex< double > arg3 ; meep::volume_list *arg4 = (meep::volume_list *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; meep::volume_list *result = 0 ; { arg1 = (meep::volume *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_meep__volume, 1, 0); } { arg2 = (int) scm_num2int(s_1, SCM_ARG1, FUNC_NAME); } { cnumber cnum = ctl_convert_cnumber_to_c(s_2); arg3 = std::complex(cnum.re, cnum.im); } { arg4 = (meep::volume_list *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_meep__volume_list, 4, 0); } result = (meep::volume_list *)make_volume_list((meep::volume const &)*arg1,arg2,arg3,arg4); { gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_meep__volume_list, 0); } return gswig_result; #undef FUNC_NAME } #ifdef __cplusplus extern "C" { #endif /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ 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_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_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 swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 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_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int = {"_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int", "int (*)[meep::CONNECT_COPY+1][meep::Outgoing+1]", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double = {"_p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double", "double **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1]|meep::realnum **(*)[meep::CONNECT_COPY+1][meep::Outgoing+1]", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_a_meep__CONNECT_COPY_1__p_int = {"_p_a_meep__CONNECT_COPY_1__p_int", "int *(*)[meep::CONNECT_COPY+1]", 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_boundary_region_kind = {"_p_boundary_region_kind", "boundary_region_kind *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_complexT_double_t = {"_p_complexT_double_t", "complex< meep::realnum > *|complex< double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_complexT_long_double_t = {"_p_complexT_long_double_t", "complex< long double > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__cnumber_list = {"_p_ctlio__cnumber_list", "ctlio::cnumber_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__geometric_object_list = {"_p_ctlio__geometric_object_list", "ctlio::geometric_object_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__material_type = {"_p_ctlio__material_type", "ctlio::material_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__material_type_list = {"_p_ctlio__material_type_list", "ctlio::material_type_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__pml_list = {"_p_ctlio__pml_list", "ctlio::pml_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ctlio__symmetry_list = {"_p_ctlio__symmetry_list", "ctlio::symmetry_list *", 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_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_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_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_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,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__complex__double___r_q_const__meep__vec_p_void__double = {"_p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double", "double (*)(complex< double > const *,meep::vec const &,void *)|meep::field_rfunction", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_f_r_q_const__meep__vec__double = {"_p_f_r_q_const__meep__vec__double", "double (*)(meep::vec const &)", 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_meep__bandsdata = {"_p_meep__bandsdata", "meep::bandsdata *", 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__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_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_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__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__grace = {"_p_meep__grace", "meep::grace *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__grid_volume = {"_p_meep__grid_volume", "meep::grid_volume *", 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__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__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__polarizability = {"_p_meep__polarizability", "meep::polarizability *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_meep__polarizability_identifier = {"_p_meep__polarizability_identifier", "meep::polarizability_identifier *", 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__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__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 *", 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_p_complexT_double_t = {"_p_p_complexT_double_t", "complex< meep::realnum > **|complex< double > **", 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__fields_chunk = {"_p_p_meep__fields_chunk", "meep::fields_chunk **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_meep__polarization = {"_p_p_meep__polarization", "meep::polarization **", 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__src_vol = {"_p_p_meep__src_vol", "meep::src_vol **", 0, 0, (void*)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_p_char = {"_p_p_p_char", "char ***", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_p_double = {"_p_p_p_double", "meep::realnum ***|double ***", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "SCM *|unsigned long *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vector3 = {"_p_vector3", "vector3 *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_FILE, &_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_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, &_swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, &_swigt__p_a_meep__CONNECT_COPY_1__p_int, &_swigt__p_access_mode, &_swigt__p_boundary_region_kind, &_swigt__p_complexT_double_t, &_swigt__p_complexT_long_double_t, &_swigt__p_ctlio__cnumber_list, &_swigt__p_ctlio__geometric_object_list, &_swigt__p_ctlio__material_type, &_swigt__p_ctlio__material_type_list, &_swigt__p_ctlio__pml_list, &_swigt__p_ctlio__symmetry_list, &_swigt__p_double, &_swigt__p_f_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_complex__double___r_q_const__meep__symmetry_int_p_void__void, &_swigt__p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, &_swigt__p_f_r_q_const__meep__vec__double, &_swigt__p_int, &_swigt__p_long_double, &_swigt__p_meep__bandsdata, &_swigt__p_meep__boundary_region, &_swigt__p_meep__component, &_swigt__p_meep__continuous_src_time, &_swigt__p_meep__custom_src_time, &_swigt__p_meep__dft_chunk, &_swigt__p_meep__dft_flux, &_swigt__p_meep__dft_force, &_swigt__p_meep__fields, &_swigt__p_meep__fields_chunk, &_swigt__p_meep__flux_vol, &_swigt__p_meep__gaussian_src_time, &_swigt__p_meep__grace, &_swigt__p_meep__grid_volume, &_swigt__p_meep__h5file, &_swigt__p_meep__initialize, &_swigt__p_meep__ivec, &_swigt__p_meep__material_function, &_swigt__p_meep__monitor_point, &_swigt__p_meep__polarizability, &_swigt__p_meep__polarizability_identifier, &_swigt__p_meep__signed_direction, &_swigt__p_meep__simple_material_function, &_swigt__p_meep__src_time, &_swigt__p_meep__structure, &_swigt__p_meep__structure_chunk, &_swigt__p_meep__symmetry, &_swigt__p_meep__vec, &_swigt__p_meep__volume, &_swigt__p_meep__volume_list, &_swigt__p_p_complexT_double_t, &_swigt__p_p_double, &_swigt__p_p_meep__continuous_src_time, &_swigt__p_p_meep__custom_src_time, &_swigt__p_p_meep__fields_chunk, &_swigt__p_p_meep__gaussian_src_time, &_swigt__p_p_meep__polarization, &_swigt__p_p_meep__src_time, &_swigt__p_p_meep__src_vol, &_swigt__p_p_meep__structure_chunk, &_swigt__p_p_p_char, &_swigt__p_p_p_double, &_swigt__p_unsigned_long, &_swigt__p_vector3, }; static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 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_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int[] = { {&_swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double[] = { {&_swigt__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_a_meep__CONNECT_COPY_1__p_int[] = { {&_swigt__p_a_meep__CONNECT_COPY_1__p_int, 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_boundary_region_kind[] = { {&_swigt__p_boundary_region_kind, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_complexT_double_t[] = { {&_swigt__p_complexT_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_complexT_long_double_t[] = { {&_swigt__p_complexT_long_double_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__cnumber_list[] = { {&_swigt__p_ctlio__cnumber_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__geometric_object_list[] = { {&_swigt__p_ctlio__geometric_object_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__material_type[] = { {&_swigt__p_ctlio__material_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__material_type_list[] = { {&_swigt__p_ctlio__material_type_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__pml_list[] = { {&_swigt__p_ctlio__pml_list, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ctlio__symmetry_list[] = { {&_swigt__p_ctlio__symmetry_list, 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_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_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_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_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__complex__double___r_q_const__meep__vec_p_void__double[] = { {&_swigt__p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_f_r_q_const__meep__vec__double[] = { {&_swigt__p_f_r_q_const__meep__vec__double, 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_meep__bandsdata[] = { {&_swigt__p_meep__bandsdata, 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__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_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_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__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__grace[] = { {&_swigt__p_meep__grace, 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__h5file[] = { {&_swigt__p_meep__h5file, 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__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},{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__polarizability[] = { {&_swigt__p_meep__polarizability, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_meep__polarizability_identifier[] = { {&_swigt__p_meep__polarizability_identifier, 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__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},{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__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_p_complexT_double_t[] = { {&_swigt__p_p_complexT_double_t, 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__fields_chunk[] = { {&_swigt__p_p_meep__fields_chunk, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__polarization[] = { {&_swigt__p_p_meep__polarization, 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__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},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_meep__src_vol[] = { {&_swigt__p_p_meep__src_vol, 0, 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_p_char[] = { {&_swigt__p_p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_p_double[] = { {&_swigt__p_p_p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 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 *swig_cast_initial[] = { _swigc__p_FILE, _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_meep__CONNECT_COPY_1__a_meep__Outgoing_1__int, _swigc__p_a_meep__CONNECT_COPY_1__a_meep__Outgoing_1__p_p_double, _swigc__p_a_meep__CONNECT_COPY_1__p_int, _swigc__p_access_mode, _swigc__p_boundary_region_kind, _swigc__p_complexT_double_t, _swigc__p_complexT_long_double_t, _swigc__p_ctlio__cnumber_list, _swigc__p_ctlio__geometric_object_list, _swigc__p_ctlio__material_type, _swigc__p_ctlio__material_type_list, _swigc__p_ctlio__pml_list, _swigc__p_ctlio__symmetry_list, _swigc__p_double, _swigc__p_f_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_complex__double___r_q_const__meep__symmetry_int_p_void__void, _swigc__p_f_p_q_const__complex__double___r_q_const__meep__vec_p_void__double, _swigc__p_f_r_q_const__meep__vec__double, _swigc__p_int, _swigc__p_long_double, _swigc__p_meep__bandsdata, _swigc__p_meep__boundary_region, _swigc__p_meep__component, _swigc__p_meep__continuous_src_time, _swigc__p_meep__custom_src_time, _swigc__p_meep__dft_chunk, _swigc__p_meep__dft_flux, _swigc__p_meep__dft_force, _swigc__p_meep__fields, _swigc__p_meep__fields_chunk, _swigc__p_meep__flux_vol, _swigc__p_meep__gaussian_src_time, _swigc__p_meep__grace, _swigc__p_meep__grid_volume, _swigc__p_meep__h5file, _swigc__p_meep__initialize, _swigc__p_meep__ivec, _swigc__p_meep__material_function, _swigc__p_meep__monitor_point, _swigc__p_meep__polarizability, _swigc__p_meep__polarizability_identifier, _swigc__p_meep__signed_direction, _swigc__p_meep__simple_material_function, _swigc__p_meep__src_time, _swigc__p_meep__structure, _swigc__p_meep__structure_chunk, _swigc__p_meep__symmetry, _swigc__p_meep__vec, _swigc__p_meep__volume, _swigc__p_meep__volume_list, _swigc__p_p_complexT_double_t, _swigc__p_p_double, _swigc__p_p_meep__continuous_src_time, _swigc__p_p_meep__custom_src_time, _swigc__p_p_meep__fields_chunk, _swigc__p_p_meep__gaussian_src_time, _swigc__p_p_meep__polarization, _swigc__p_p_meep__src_time, _swigc__p_p_meep__src_vol, _swigc__p_p_meep__structure_chunk, _swigc__p_p_p_char, _swigc__p_p_p_double, _swigc__p_unsigned_long, _swigc__p_vector3, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ /* ----------------------------------------------------------------------------- * 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 staticly 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 found, init; clientdata = clientdata; /* 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); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters 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 %d\n", 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 %d %s\n", 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 %d %s\n", 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 SWIG_GUILE_INIT_STATIC void SWIG_init(void) { SWIG_InitializeModule(0); SWIG_PropagateClientData(); scm_c_define_gsubr("NUM-FIELD-COMPONENTS", 0, 0, 0, (swig_guile_proc) _wrap_NUM_FIELD_COMPONENTS); scm_c_define_gsubr("NUM-FIELD-TYPES", 0, 0, 0, (swig_guile_proc) _wrap_NUM_FIELD_TYPES); scm_c_define_gsubr("meep-component-Ex", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Ex); scm_c_define_gsubr("meep-component-Ey", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Ey); scm_c_define_gsubr("meep-component-Er", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Er); scm_c_define_gsubr("meep-component-Ep", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Ep); scm_c_define_gsubr("meep-component-Ez", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Ez); scm_c_define_gsubr("meep-component-Hx", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hx); scm_c_define_gsubr("meep-component-Hy", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hy); scm_c_define_gsubr("meep-component-Hr", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hr); scm_c_define_gsubr("meep-component-Hp", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hp); scm_c_define_gsubr("meep-component-Hz", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Hz); scm_c_define_gsubr("meep-component-Dx", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dx); scm_c_define_gsubr("meep-component-Dy", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dy); scm_c_define_gsubr("meep-component-Dr", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dr); scm_c_define_gsubr("meep-component-Dp", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dp); scm_c_define_gsubr("meep-component-Dz", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dz); scm_c_define_gsubr("meep-component-Bx", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Bx); scm_c_define_gsubr("meep-component-By", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_By); scm_c_define_gsubr("meep-component-Br", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Br); scm_c_define_gsubr("meep-component-Bp", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Bp); scm_c_define_gsubr("meep-component-Bz", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Bz); scm_c_define_gsubr("meep-component-Dielectric", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Dielectric); scm_c_define_gsubr("meep-component-Permeability", 0, 0, 0, (swig_guile_proc) _wrap_meep_component_Permeability); scm_c_define_gsubr("meep-derived-component-Sx", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sx); scm_c_define_gsubr("meep-derived-component-Sy", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sy); scm_c_define_gsubr("meep-derived-component-Sr", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sr); scm_c_define_gsubr("meep-derived-component-Sp", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sp); scm_c_define_gsubr("meep-derived-component-Sz", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_Sz); scm_c_define_gsubr("meep-derived-component-EnergyDensity", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_EnergyDensity); scm_c_define_gsubr("meep-derived-component-D-EnergyDensity", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_D_EnergyDensity); scm_c_define_gsubr("meep-derived-component-H-EnergyDensity", 0, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_H_EnergyDensity); scm_c_define_gsubr("meep-ndim-D1", 0, 0, 0, (swig_guile_proc) _wrap_meep_ndim_D1); scm_c_define_gsubr("meep-ndim-D2", 0, 0, 0, (swig_guile_proc) _wrap_meep_ndim_D2); scm_c_define_gsubr("meep-ndim-D3", 0, 0, 0, (swig_guile_proc) _wrap_meep_ndim_D3); scm_c_define_gsubr("meep-ndim-Dcyl", 0, 0, 0, (swig_guile_proc) _wrap_meep_ndim_Dcyl); scm_c_define_gsubr("meep-field-type-E-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_E_stuff); scm_c_define_gsubr("meep-field-type-H-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_H_stuff); scm_c_define_gsubr("meep-field-type-D-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_D_stuff); scm_c_define_gsubr("meep-field-type-B-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_B_stuff); scm_c_define_gsubr("meep-field-type-PE-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_PE_stuff); scm_c_define_gsubr("meep-field-type-PH-stuff", 0, 0, 0, (swig_guile_proc) _wrap_meep_field_type_PH_stuff); scm_c_define_gsubr("meep-boundary-side-High", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_side_High); scm_c_define_gsubr("meep-boundary-side-Low", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_side_Low); scm_c_define_gsubr("meep-direction-X", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_X); scm_c_define_gsubr("meep-direction-Y", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_Y); scm_c_define_gsubr("meep-direction-Z", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_Z); scm_c_define_gsubr("meep-direction-R", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_R); scm_c_define_gsubr("meep-direction-P", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_P); scm_c_define_gsubr("meep-direction-NO-DIRECTION", 0, 0, 0, (swig_guile_proc) _wrap_meep_direction_NO_DIRECTION); SWIG_TypeClientData(SWIGTYPE_p_meep__signed_direction, (void *) &_swig_guile_clientdatasigned_direction); scm_c_define_gsubr("new-signed-direction", 0, 0, 1, (swig_guile_proc) _wrap_new_signed_direction); scm_c_define_gsubr("signed-direction-d-set", 2, 0, 0, (swig_guile_proc) _wrap_signed_direction_d_set); scm_c_define_gsubr("signed-direction-d-get", 1, 0, 0, (swig_guile_proc) _wrap_signed_direction_d_get); scm_c_define_gsubr("signed-direction-flipped-set", 2, 0, 0, (swig_guile_proc) _wrap_signed_direction_flipped_set); scm_c_define_gsubr("signed-direction-flipped-get", 1, 0, 0, (swig_guile_proc) _wrap_signed_direction_flipped_get); scm_c_define_gsubr("signed-direction-phase-set", 2, 0, 0, (swig_guile_proc) _wrap_signed_direction_phase_set); scm_c_define_gsubr("signed-direction-phase-get", 1, 0, 0, (swig_guile_proc) _wrap_signed_direction_phase_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__signed_direction->clientdata))->destroy = (guile_destructor) _wrap_delete_signed_direction; scm_c_define_gsubr("delete-signed-direction", 1, 0, 0, (swig_guile_proc) _wrap_delete_signed_direction); scm_c_define_gsubr("meep-number-of-directions", 1, 0, 0, (swig_guile_proc) _wrap_meep_number_of_directions); scm_c_define_gsubr("meep-start-at-direction", 1, 0, 0, (swig_guile_proc) _wrap_meep_start_at_direction); scm_c_define_gsubr("meep-stop-at-direction", 1, 0, 0, (swig_guile_proc) _wrap_meep_stop_at_direction); scm_c_define_gsubr("meep-first-field-component", 1, 0, 0, (swig_guile_proc) _wrap_meep_first_field_component); scm_c_define_gsubr("meep-flip", 1, 0, 0, (swig_guile_proc) _wrap_meep_flip); scm_c_define_gsubr("meep-has-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_has_direction); scm_c_define_gsubr("meep-has-field-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_has_field_direction); scm_c_define_gsubr("meep-is-tm", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_tm); scm_c_define_gsubr("meep-abort", 1, 0, 0, (swig_guile_proc) _wrap_meep_abort); scm_c_define_gsubr("meep-is-electric", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_electric); scm_c_define_gsubr("meep-is-magnetic", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_magnetic); scm_c_define_gsubr("meep-is-D", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_D); scm_c_define_gsubr("meep-is-B", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_B); scm_c_define_gsubr("meep-is-derived", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_derived); scm_c_define_gsubr("meep-is-poynting", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_poynting); scm_c_define_gsubr("meep-is-energydensity", 1, 0, 0, (swig_guile_proc) _wrap_meep_is_energydensity); scm_c_define_gsubr("meep-type", 1, 0, 0, (swig_guile_proc) _wrap_meep_type); scm_c_define_gsubr("meep-component-name", 0, 0, 1, (swig_guile_proc) _wrap_meep_component_name); scm_c_define_gsubr("meep-direction-name", 1, 0, 0, (swig_guile_proc) _wrap_meep_direction_name); scm_c_define_gsubr("meep-dimension-name", 1, 0, 0, (swig_guile_proc) _wrap_meep_dimension_name); scm_c_define_gsubr("meep-component-index", 1, 0, 0, (swig_guile_proc) _wrap_meep_component_index); scm_c_define_gsubr("meep-component-direction", 0, 0, 1, (swig_guile_proc) _wrap_meep_component_direction); scm_c_define_gsubr("meep-direction-component", 0, 0, 1, (swig_guile_proc) _wrap_meep_direction_component); scm_c_define_gsubr("meep-field-type-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_field_type_component); scm_c_define_gsubr("meep-coordinate-mismatch", 0, 0, 1, (swig_guile_proc) _wrap_meep_coordinate_mismatch); scm_c_define_gsubr("meep-cycle-direction", 3, 0, 0, (swig_guile_proc) _wrap_meep_cycle_direction); scm_c_define_gsubr("meep-cycle-component", 3, 0, 0, (swig_guile_proc) _wrap_meep_cycle_component); scm_c_define_gsubr("meep-veccyl", 2, 0, 0, (swig_guile_proc) _wrap_meep_veccyl); scm_c_define_gsubr("meep-zero-vec", 1, 0, 0, (swig_guile_proc) _wrap_meep_zero_vec); SWIG_TypeClientData(SWIGTYPE_p_meep__vec, (void *) &_swig_guile_clientdatameep_vec); scm_c_define_gsubr("new-meep-vec", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_vec); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__vec->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_vec; scm_c_define_gsubr("delete-meep-vec", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_vec); scm_c_define_gsubr("meep-vec-round-float", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_round_float); scm_c_define_gsubr("meep-vec-dim-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_vec_dim_set); scm_c_define_gsubr("meep-vec-dim-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_dim_get); scm_c_define_gsubr("meep-vec-r", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_r); scm_c_define_gsubr("meep-vec-x", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_x); scm_c_define_gsubr("meep-vec-y", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_y); scm_c_define_gsubr("meep-vec-z", 1, 0, 0, (swig_guile_proc) _wrap_meep_vec_z); scm_c_define_gsubr("meep-vec-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_vec_in_direction); scm_c_define_gsubr("meep-vec-set-direction", 3, 0, 0, (swig_guile_proc) _wrap_meep_vec_set_direction); scm_c_define_gsubr("meep-vec-project-to-boundary", 3, 0, 0, (swig_guile_proc) _wrap_meep_vec_project_to_boundary); scm_c_define_gsubr("meep-one-vec", 1, 0, 0, (swig_guile_proc) _wrap_meep_one_vec); scm_c_define_gsubr("meep-abs", 1, 0, 0, (swig_guile_proc) _wrap_meep_abs); scm_c_define_gsubr("meep-unit-vec", 2, 0, 0, (swig_guile_proc) _wrap_meep_unit_vec); scm_c_define_gsubr("meep-clean-vec", 0, 0, 1, (swig_guile_proc) _wrap_meep_clean_vec); scm_c_define_gsubr("meep-iveccyl", 2, 0, 0, (swig_guile_proc) _wrap_meep_iveccyl); scm_c_define_gsubr("meep-zero-ivec", 1, 0, 0, (swig_guile_proc) _wrap_meep_zero_ivec); scm_c_define_gsubr("meep-one-ivec", 1, 0, 0, (swig_guile_proc) _wrap_meep_one_ivec); SWIG_TypeClientData(SWIGTYPE_p_meep__ivec, (void *) &_swig_guile_clientdatameep_ivec); scm_c_define_gsubr("new-meep-ivec", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_ivec); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__ivec->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_ivec; scm_c_define_gsubr("delete-meep-ivec", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_ivec); scm_c_define_gsubr("meep-ivec-yucky-val", 2, 0, 0, (swig_guile_proc) _wrap_meep_ivec_yucky_val); scm_c_define_gsubr("meep-ivec-dim-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_ivec_dim_set); scm_c_define_gsubr("meep-ivec-dim-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_dim_get); scm_c_define_gsubr("meep-ivec-r", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_r); scm_c_define_gsubr("meep-ivec-x", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_x); scm_c_define_gsubr("meep-ivec-y", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_y); scm_c_define_gsubr("meep-ivec-z", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_z); scm_c_define_gsubr("meep-ivec-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_ivec_in_direction); scm_c_define_gsubr("meep-ivec-set-direction", 3, 0, 0, (swig_guile_proc) _wrap_meep_ivec_set_direction); scm_c_define_gsubr("meep-ivec-round-up-to-even", 1, 0, 0, (swig_guile_proc) _wrap_meep_ivec_round_up_to_even); scm_c_define_gsubr("meep-unit-ivec", 2, 0, 0, (swig_guile_proc) _wrap_meep_unit_ivec); scm_c_define_gsubr("meep-max", 0, 0, 1, (swig_guile_proc) _wrap_meep_max); scm_c_define_gsubr("meep-min", 0, 0, 1, (swig_guile_proc) _wrap_meep_min); SWIG_TypeClientData(SWIGTYPE_p_meep__volume, (void *) &_swig_guile_clientdatameep_volume); scm_c_define_gsubr("meep-volume-dim-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_dim_set); scm_c_define_gsubr("meep-volume-dim-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_dim_get); scm_c_define_gsubr("new-meep-volume", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_volume); scm_c_define_gsubr("meep-volume-set-direction-min", 3, 0, 0, (swig_guile_proc) _wrap_meep_volume_set_direction_min); scm_c_define_gsubr("meep-volume-set-direction-max", 3, 0, 0, (swig_guile_proc) _wrap_meep_volume_set_direction_max); scm_c_define_gsubr("meep-volume-in-direction-min", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_in_direction_min); scm_c_define_gsubr("meep-volume-in-direction-max", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_in_direction_max); scm_c_define_gsubr("meep-volume-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_in_direction); scm_c_define_gsubr("meep-volume-computational-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_computational_volume); scm_c_define_gsubr("meep-volume-integral-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_integral_volume); scm_c_define_gsubr("meep-volume-full-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_full_volume); scm_c_define_gsubr("meep-volume-center", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_center); scm_c_define_gsubr("meep-volume-diameter", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_diameter); scm_c_define_gsubr("meep-volume-contains", 0, 0, 1, (swig_guile_proc) _wrap_meep_volume_contains); scm_c_define_gsubr("meep-volume-intersect-with", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_intersect_with); scm_c_define_gsubr("meep-volume-round-float", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_round_float); scm_c_define_gsubr("meep-volume-intersects", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_intersects); scm_c_define_gsubr("meep-volume-get-min-corner", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_get_min_corner); scm_c_define_gsubr("meep-volume-get-max-corner", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_get_max_corner); scm_c_define_gsubr("meep-volume-normal-direction", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_normal_direction); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__volume->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_volume; scm_c_define_gsubr("delete-meep-volume", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_volume); scm_c_define_gsubr("meep-volcyl", 3, 0, 0, (swig_guile_proc) _wrap_meep_volcyl); scm_c_define_gsubr("meep-volone", 2, 0, 0, (swig_guile_proc) _wrap_meep_volone); scm_c_define_gsubr("meep-vol1d", 2, 0, 0, (swig_guile_proc) _wrap_meep_vol1d); scm_c_define_gsubr("meep-voltwo", 3, 0, 0, (swig_guile_proc) _wrap_meep_voltwo); scm_c_define_gsubr("meep-vol2d", 3, 0, 0, (swig_guile_proc) _wrap_meep_vol2d); scm_c_define_gsubr("meep-vol3d", 4, 0, 0, (swig_guile_proc) _wrap_meep_vol3d); SWIG_TypeClientData(SWIGTYPE_p_meep__grid_volume, (void *) &_swig_guile_clientdatameep_grid_volume); scm_c_define_gsubr("new-meep-grid-volume", 0, 0, 0, (swig_guile_proc) _wrap_new_meep_grid_volume); scm_c_define_gsubr("meep-grid-volume-dim-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dim_set); scm_c_define_gsubr("meep-grid-volume-dim-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dim_get); scm_c_define_gsubr("meep-grid-volume-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_a_set); scm_c_define_gsubr("meep-grid-volume-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_a_get); scm_c_define_gsubr("meep-grid-volume-inva-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_inva_set); scm_c_define_gsubr("meep-grid-volume-inva-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_inva_get); scm_c_define_gsubr("meep-grid-volume-print", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_print); scm_c_define_gsubr("meep-grid-volume-stride", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_stride); scm_c_define_gsubr("meep-grid-volume-num-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_num_direction); scm_c_define_gsubr("meep-grid-volume-yucky-num", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yucky_num); scm_c_define_gsubr("meep-grid-volume-yucky-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yucky_direction); scm_c_define_gsubr("meep-grid-volume-set-num-direction", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_set_num_direction); scm_c_define_gsubr("meep-grid-volume-nr", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nr); scm_c_define_gsubr("meep-grid-volume-nx", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nx); scm_c_define_gsubr("meep-grid-volume-ny", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ny); scm_c_define_gsubr("meep-grid-volume-nz", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nz); scm_c_define_gsubr("meep-grid-volume-has-field", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_has_field); scm_c_define_gsubr("meep-grid-volume-has-boundary", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_has_boundary); scm_c_define_gsubr("meep-grid-volume-dr", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dr); scm_c_define_gsubr("meep-grid-volume-dx", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dx); scm_c_define_gsubr("meep-grid-volume-dy", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dy); scm_c_define_gsubr("meep-grid-volume-dz", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_dz); scm_c_define_gsubr("meep-grid-volume-ntot", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ntot); scm_c_define_gsubr("meep-grid-volume-nowned-min", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nowned_min); scm_c_define_gsubr("meep-grid-volume-nowned", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_nowned); scm_c_define_gsubr("meep-grid-volume-index", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_index); scm_c_define_gsubr("meep-grid-volume-round-vec", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_round_vec); scm_c_define_gsubr("meep-grid-volume-interpolate", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_interpolate); scm_c_define_gsubr("meep-grid-volume-dV", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_dV); scm_c_define_gsubr("meep-grid-volume-intersect-with", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_intersect_with); scm_c_define_gsubr("meep-grid-volume-rmin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_rmin); scm_c_define_gsubr("meep-grid-volume-rmax", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_rmax); scm_c_define_gsubr("meep-grid-volume-xmin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_xmin); scm_c_define_gsubr("meep-grid-volume-xmax", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_xmax); scm_c_define_gsubr("meep-grid-volume-ymin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ymin); scm_c_define_gsubr("meep-grid-volume-ymax", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ymax); scm_c_define_gsubr("meep-grid-volume-zmin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_zmin); scm_c_define_gsubr("meep-grid-volume-zmax", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_zmax); scm_c_define_gsubr("meep-grid-volume-center", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_center); scm_c_define_gsubr("meep-grid-volume-icenter", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_icenter); scm_c_define_gsubr("meep-grid-volume-loc", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_loc); scm_c_define_gsubr("meep-grid-volume-loc-at-resolution", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_loc_at_resolution); scm_c_define_gsubr("meep-grid-volume-ntot-at-resolution", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_ntot_at_resolution); scm_c_define_gsubr("meep-grid-volume-iloc", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_iloc); scm_c_define_gsubr("meep-grid-volume-yee-index", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yee_index); scm_c_define_gsubr("meep-grid-volume-yee-shift", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yee_shift); scm_c_define_gsubr("meep-grid-volume-eps-component", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_eps_component); scm_c_define_gsubr("meep-grid-volume-yee2cent-offsets", 4, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_yee2cent_offsets); scm_c_define_gsubr("meep-grid-volume-boundary-location", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_boundary_location); scm_c_define_gsubr("meep-grid-volume-big-corner", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_big_corner); scm_c_define_gsubr("meep-grid-volume-little-corner", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_little_corner); scm_c_define_gsubr("meep-grid-volume-corner", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_corner); scm_c_define_gsubr("meep-grid-volume-contains", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_contains); scm_c_define_gsubr("meep-grid-volume-little-owned-corner0", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_little_owned_corner0); scm_c_define_gsubr("meep-grid-volume-little-owned-corner", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_little_owned_corner); scm_c_define_gsubr("meep-grid-volume-owns", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_owns); scm_c_define_gsubr("meep-grid-volume-surroundings", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_surroundings); scm_c_define_gsubr("meep-grid-volume-interior", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_interior); scm_c_define_gsubr("meep-grid-volume-get-boundary-icorners", 5, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_get_boundary_icorners); scm_c_define_gsubr("meep-grid-volume-split", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_split); scm_c_define_gsubr("meep-grid-volume-split-by-effort", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_split_by_effort); scm_c_define_gsubr("meep-grid-volume-split-at-fraction", 3, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_split_at_fraction); scm_c_define_gsubr("meep-grid-volume-halve", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_halve); scm_c_define_gsubr("meep-grid-volume-pad-self", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_pad_self); scm_c_define_gsubr("meep-grid-volume-pad", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_pad); scm_c_define_gsubr("meep-grid-volume-iyee-shift", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_iyee_shift); scm_c_define_gsubr("meep-grid-volume-get-origin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_get_origin); scm_c_define_gsubr("meep-grid-volume-shift-origin", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_shift_origin); scm_c_define_gsubr("meep-grid-volume-set-origin", 0, 0, 1, (swig_guile_proc) _wrap_meep_grid_volume_set_origin); scm_c_define_gsubr("meep-grid-volume-center-origin", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_center_origin); scm_c_define_gsubr("meep-grid-volume-origin-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_in_direction); scm_c_define_gsubr("meep-grid-volume-iorigin-in-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_iorigin_in_direction); scm_c_define_gsubr("meep-grid-volume-origin-r", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_r); scm_c_define_gsubr("meep-grid-volume-origin-x", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_x); scm_c_define_gsubr("meep-grid-volume-origin-y", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_y); scm_c_define_gsubr("meep-grid-volume-origin-z", 1, 0, 0, (swig_guile_proc) _wrap_meep_grid_volume_origin_z); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__grid_volume->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_grid_volume; scm_c_define_gsubr("delete-meep-grid-volume", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_grid_volume); scm_c_define_gsubr("meep-identity", 0, 0, 0, (swig_guile_proc) _wrap_meep_identity); scm_c_define_gsubr("meep-rotate4", 2, 0, 0, (swig_guile_proc) _wrap_meep_rotate4); scm_c_define_gsubr("meep-rotate2", 2, 0, 0, (swig_guile_proc) _wrap_meep_rotate2); scm_c_define_gsubr("meep-mirror", 2, 0, 0, (swig_guile_proc) _wrap_meep_mirror); scm_c_define_gsubr("meep-r-to-minus-r-symmetry", 1, 0, 0, (swig_guile_proc) _wrap_meep_r_to_minus_r_symmetry); SWIG_TypeClientData(SWIGTYPE_p_meep__symmetry, (void *) &_swig_guile_clientdatameep_symmetry); scm_c_define_gsubr("new-meep-symmetry", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_symmetry); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__symmetry->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_symmetry; scm_c_define_gsubr("delete-meep-symmetry", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_symmetry); scm_c_define_gsubr("meep-symmetry-transform-unshifted", 3, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_transform_unshifted); scm_c_define_gsubr("meep-symmetry-transform", 0, 0, 1, (swig_guile_proc) _wrap_meep_symmetry_transform); scm_c_define_gsubr("meep-symmetry-phase-shift", 0, 0, 1, (swig_guile_proc) _wrap_meep_symmetry_phase_shift); scm_c_define_gsubr("meep-symmetry-multiplicity", 1, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_multiplicity); scm_c_define_gsubr("meep-symmetry-is-primitive", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_is_primitive); scm_c_define_gsubr("meep-symmetry-reduce", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_reduce); scm_c_define_gsubr("meep-symmetry-meep-symmetry-add", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_add); scm_c_define_gsubr("meep-symmetry-meep-symmetry-mul", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_mul); scm_c_define_gsubr("meep-symmetry-meep-symmetry-sub", 0, 0, 1, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_sub); scm_c_define_gsubr("meep-symmetry-meep-symmetry-eq", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_eq); scm_c_define_gsubr("meep-symmetry-meep-symmetry-neq", 2, 0, 0, (swig_guile_proc) _wrap_meep_symmetry_meep_symmetry_neq); SWIG_TypeClientData(SWIGTYPE_p_meep__volume_list, (void *) &_swig_guile_clientdatameep_volume_list); scm_c_define_gsubr("new-meep-volume-list", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_volume_list); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__volume_list->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_volume_list; scm_c_define_gsubr("delete-meep-volume-list", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_volume_list); scm_c_define_gsubr("meep-volume-list-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_v_set); scm_c_define_gsubr("meep-volume-list-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_v_get); scm_c_define_gsubr("meep-volume-list-c-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_c_set); scm_c_define_gsubr("meep-volume-list-c-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_c_get); scm_c_define_gsubr("meep-volume-list-weight-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_weight_set); scm_c_define_gsubr("meep-volume-list-weight-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_weight_get); scm_c_define_gsubr("meep-volume-list-next-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_next_set); scm_c_define_gsubr("meep-volume-list-next-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_volume_list_next_get); scm_c_define_gsubr("meep-wall-time", 0, 0, 0, (swig_guile_proc) _wrap_meep_wall_time); SWIG_TypeClientData(SWIGTYPE_p_meep__initialize, (void *) &_swig_guile_clientdatameep_initialize); scm_c_define_gsubr("new-meep-initialize", 2, 0, 0, (swig_guile_proc) _wrap_new_meep_initialize); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__initialize->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_initialize; scm_c_define_gsubr("delete-meep-initialize", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_initialize); scm_c_define_gsubr("meep-initialize-elapsed-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_initialize_elapsed_time); scm_c_define_gsubr("meep-all-wait", 0, 0, 0, (swig_guile_proc) _wrap_meep_all_wait); scm_c_define_gsubr("meep-count-processors", 0, 0, 0, (swig_guile_proc) _wrap_meep_count_processors); scm_c_define_gsubr("meep-my-rank", 0, 0, 0, (swig_guile_proc) _wrap_meep_my_rank); scm_c_define_gsubr("meep-am-really-master", 0, 0, 0, (swig_guile_proc) _wrap_meep_am_really_master); scm_c_define_gsubr("meep-am-master", 0, 0, 0, (swig_guile_proc) _wrap_meep_am_master); scm_c_define_gsubr("meep-send", 0, 0, 1, (swig_guile_proc) _wrap_meep_send); scm_c_define_gsubr("meep-broadcast", 0, 0, 1, (swig_guile_proc) _wrap_meep_broadcast); scm_c_define_gsubr("meep-max-to-master", 1, 0, 0, (swig_guile_proc) _wrap_meep_max_to_master); scm_c_define_gsubr("meep-max-to-all", 0, 0, 1, (swig_guile_proc) _wrap_meep_max_to_all); scm_c_define_gsubr("meep-sum-to-master", 1, 0, 0, (swig_guile_proc) _wrap_meep_sum_to_master); scm_c_define_gsubr("meep-sum-to-all", 0, 0, 1, (swig_guile_proc) _wrap_meep_sum_to_all); scm_c_define_gsubr("meep-partial-sum-to-all", 1, 0, 0, (swig_guile_proc) _wrap_meep_partial_sum_to_all); scm_c_define_gsubr("meep-or-to-all", 0, 0, 1, (swig_guile_proc) _wrap_meep_or_to_all); scm_c_define_gsubr("meep-and-to-all", 0, 0, 1, (swig_guile_proc) _wrap_meep_and_to_all); scm_c_define_gsubr("meep-master-printf", 1, 0, 0, (swig_guile_proc) _wrap_meep_master_printf); scm_c_define_gsubr("meep-debug-printf", 1, 0, 0, (swig_guile_proc) _wrap_meep_debug_printf); scm_c_define_gsubr("meep-master-fprintf", 2, 0, 0, (swig_guile_proc) _wrap_meep_master_fprintf); scm_c_define_gsubr("meep-master-fopen", 2, 0, 0, (swig_guile_proc) _wrap_meep_master_fopen); scm_c_define_gsubr("meep-master-fclose", 1, 0, 0, (swig_guile_proc) _wrap_meep_master_fclose); scm_c_define_gsubr("meep-begin-critical-section", 1, 0, 0, (swig_guile_proc) _wrap_meep_begin_critical_section); scm_c_define_gsubr("meep-end-critical-section", 1, 0, 0, (swig_guile_proc) _wrap_meep_end_critical_section); scm_c_define_gsubr("meep-divide-parallel-processes", 1, 0, 0, (swig_guile_proc) _wrap_meep_divide_parallel_processes); scm_c_define_gsubr("meep-begin-global-communications", 0, 0, 0, (swig_guile_proc) _wrap_meep_begin_global_communications); scm_c_define_gsubr("meep-end-global-communications", 0, 0, 0, (swig_guile_proc) _wrap_meep_end_global_communications); scm_c_define_gsubr("meep-end-divide-parallel", 0, 0, 0, (swig_guile_proc) _wrap_meep_end_divide_parallel); scm_c_define_gsubr("MEEP-SINGLE", 0, 0, 0, (swig_guile_proc) _wrap_MEEP_SINGLE); scm_c_define_gsubr("quiet", 0, 1, 0, (swig_guile_proc) _wrap_quiet); scm_c_define_gsubr("pi", 0, 0, 0, (swig_guile_proc) _wrap_pi); scm_c_define_gsubr("infinity", 0, 0, 0, (swig_guile_proc) _wrap_infinity); scm_c_define_gsubr("nan", 0, 0, 0, (swig_guile_proc) _wrap_nan); SWIG_TypeClientData(SWIGTYPE_p_meep__polarizability_identifier, (void *) &_swig_guile_clientdatameep_polarizability_identifier); scm_c_define_gsubr("meep-polarizability-identifier-ft-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_polarizability_identifier_ft_set); scm_c_define_gsubr("meep-polarizability-identifier-ft-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_polarizability_identifier_ft_get); scm_c_define_gsubr("meep-polarizability-identifier-gamma-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_polarizability_identifier_gamma_set); scm_c_define_gsubr("meep-polarizability-identifier-gamma-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_polarizability_identifier_gamma_get); scm_c_define_gsubr("meep-polarizability-identifier-omeganot-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_polarizability_identifier_omeganot_set); scm_c_define_gsubr("meep-polarizability-identifier-omeganot-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_polarizability_identifier_omeganot_get); scm_c_define_gsubr("new-meep-polarizability-identifier", 0, 0, 0, (swig_guile_proc) _wrap_new_meep_polarizability_identifier); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__polarizability_identifier->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_polarizability_identifier; scm_c_define_gsubr("delete-meep-polarizability-identifier", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_polarizability_identifier); SWIG_TypeClientData(SWIGTYPE_p_meep__h5file, (void *) &_swig_guile_clientdatameep_h5file); scm_c_define_gsubr("meep-h5file-READONLY", 0, 0, 0, (swig_guile_proc) _wrap_meep_h5file_READONLY); scm_c_define_gsubr("meep-h5file-READWRITE", 0, 0, 0, (swig_guile_proc) _wrap_meep_h5file_READWRITE); scm_c_define_gsubr("meep-h5file-WRITE", 0, 0, 0, (swig_guile_proc) _wrap_meep_h5file_WRITE); scm_c_define_gsubr("new-meep-h5file", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_h5file); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__h5file->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_h5file; scm_c_define_gsubr("delete-meep-h5file", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_h5file); scm_c_define_gsubr("meep-h5file-ok", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_ok); scm_c_define_gsubr("meep-h5file-read", 0, 0, 1, (swig_guile_proc) _wrap_meep_h5file_read); scm_c_define_gsubr("meep-h5file-write", 0, 0, 1, (swig_guile_proc) _wrap_meep_h5file_write); scm_c_define_gsubr("meep-h5file-create-data", 0, 0, 1, (swig_guile_proc) _wrap_meep_h5file_create_data); scm_c_define_gsubr("meep-h5file-extend-data", 4, 0, 0, (swig_guile_proc) _wrap_meep_h5file_extend_data); scm_c_define_gsubr("meep-h5file-create-or-extend-data", 6, 0, 0, (swig_guile_proc) _wrap_meep_h5file_create_or_extend_data); scm_c_define_gsubr("meep-h5file-write-chunk", 5, 0, 0, (swig_guile_proc) _wrap_meep_h5file_write_chunk); scm_c_define_gsubr("meep-h5file-done-writing-chunks", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_done_writing_chunks); scm_c_define_gsubr("meep-h5file-read-size", 5, 0, 0, (swig_guile_proc) _wrap_meep_h5file_read_size); scm_c_define_gsubr("meep-h5file-read-chunk", 5, 0, 0, (swig_guile_proc) _wrap_meep_h5file_read_chunk); scm_c_define_gsubr("meep-h5file-remove", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_remove); scm_c_define_gsubr("meep-h5file-remove-data", 2, 0, 0, (swig_guile_proc) _wrap_meep_h5file_remove_data); scm_c_define_gsubr("meep-h5file-file-name", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_file_name); scm_c_define_gsubr("meep-h5file-prevent-deadlock", 1, 0, 0, (swig_guile_proc) _wrap_meep_h5file_prevent_deadlock); scm_c_define_gsubr("DEFAULT-SUBPIXEL-TOL", 0, 0, 0, (swig_guile_proc) _wrap_DEFAULT_SUBPIXEL_TOL); scm_c_define_gsubr("DEFAULT-SUBPIXEL-MAXEVAL", 0, 0, 0, (swig_guile_proc) _wrap_DEFAULT_SUBPIXEL_MAXEVAL); SWIG_TypeClientData(SWIGTYPE_p_meep__material_function, (void *) &_swig_guile_clientdatameep_material_function); scm_c_define_gsubr("new-meep-material-function", 0, 0, 0, (swig_guile_proc) _wrap_new_meep_material_function); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__material_function->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_material_function; scm_c_define_gsubr("delete-meep-material-function", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_material_function); scm_c_define_gsubr("meep-material-function-set-volume", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_set_volume); scm_c_define_gsubr("meep-material-function-unset-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_material_function_unset_volume); scm_c_define_gsubr("meep-material-function-chi1p1", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_chi1p1); scm_c_define_gsubr("meep-material-function-eps", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_eps); scm_c_define_gsubr("meep-material-function-has-mu", 1, 0, 0, (swig_guile_proc) _wrap_meep_material_function_has_mu); scm_c_define_gsubr("meep-material-function-mu", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_mu); scm_c_define_gsubr("meep-material-function-has-conductivity", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_has_conductivity); scm_c_define_gsubr("meep-material-function-conductivity", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_conductivity); scm_c_define_gsubr("meep-material-function-normal-vector", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_normal_vector); scm_c_define_gsubr("meep-material-function-eff-chi1inv-row", 0, 0, 1, (swig_guile_proc) _wrap_meep_material_function_eff_chi1inv_row); scm_c_define_gsubr("meep-material-function-sigma-row", 4, 0, 0, (swig_guile_proc) _wrap_meep_material_function_sigma_row); scm_c_define_gsubr("meep-material-function-set-polarizability", 4, 0, 0, (swig_guile_proc) _wrap_meep_material_function_set_polarizability); scm_c_define_gsubr("meep-material-function-has-chi3", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_has_chi3); scm_c_define_gsubr("meep-material-function-chi3", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_chi3); scm_c_define_gsubr("meep-material-function-has-chi2", 2, 0, 0, (swig_guile_proc) _wrap_meep_material_function_has_chi2); scm_c_define_gsubr("meep-material-function-chi2", 3, 0, 0, (swig_guile_proc) _wrap_meep_material_function_chi2); SWIG_TypeClientData(SWIGTYPE_p_meep__simple_material_function, (void *) &_swig_guile_clientdatameep_simple_material_function); scm_c_define_gsubr("new-meep-simple-material-function", 1, 0, 0, (swig_guile_proc) _wrap_new_meep_simple_material_function); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__simple_material_function->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_simple_material_function; scm_c_define_gsubr("delete-meep-simple-material-function", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_simple_material_function); scm_c_define_gsubr("meep-simple-material-function-chi1p1", 3, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_chi1p1); scm_c_define_gsubr("meep-simple-material-function-eps", 2, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_eps); scm_c_define_gsubr("meep-simple-material-function-mu", 2, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_mu); scm_c_define_gsubr("meep-simple-material-function-conductivity", 3, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_conductivity); scm_c_define_gsubr("meep-simple-material-function-sigma-row", 4, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_sigma_row); scm_c_define_gsubr("meep-simple-material-function-chi3", 3, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_chi3); scm_c_define_gsubr("meep-simple-material-function-chi2", 3, 0, 0, (swig_guile_proc) _wrap_meep_simple_material_function_chi2); SWIG_TypeClientData(SWIGTYPE_p_meep__structure_chunk, (void *) &_swig_guile_clientdatameep_structure_chunk); scm_c_define_gsubr("meep-structure-chunk-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_a_set); scm_c_define_gsubr("meep-structure-chunk-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_a_get); scm_c_define_gsubr("meep-structure-chunk-Courant-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_Courant_set); scm_c_define_gsubr("meep-structure-chunk-Courant-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_Courant_get); scm_c_define_gsubr("meep-structure-chunk-dt-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_dt_set); scm_c_define_gsubr("meep-structure-chunk-dt-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_dt_get); scm_c_define_gsubr("meep-structure-chunk-chi3-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi3_set); scm_c_define_gsubr("meep-structure-chunk-chi3-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi3_get); scm_c_define_gsubr("meep-structure-chunk-chi2-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi2_set); scm_c_define_gsubr("meep-structure-chunk-chi2-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi2_get); scm_c_define_gsubr("meep-structure-chunk-chi1inv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi1inv_set); scm_c_define_gsubr("meep-structure-chunk-chi1inv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_chi1inv_get); scm_c_define_gsubr("meep-structure-chunk-trivial-chi1inv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_trivial_chi1inv_set); scm_c_define_gsubr("meep-structure-chunk-trivial-chi1inv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_trivial_chi1inv_get); scm_c_define_gsubr("meep-structure-chunk-conductivity-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_conductivity_set); scm_c_define_gsubr("meep-structure-chunk-conductivity-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_conductivity_get); scm_c_define_gsubr("meep-structure-chunk-condinv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_condinv_set); scm_c_define_gsubr("meep-structure-chunk-condinv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_condinv_get); scm_c_define_gsubr("meep-structure-chunk-condinv-stale-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_condinv_stale_set); scm_c_define_gsubr("meep-structure-chunk-condinv-stale-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_condinv_stale_get); scm_c_define_gsubr("meep-structure-chunk-sig-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_sig_set); scm_c_define_gsubr("meep-structure-chunk-sig-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_sig_get); scm_c_define_gsubr("meep-structure-chunk-siginv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_siginv_set); scm_c_define_gsubr("meep-structure-chunk-siginv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_siginv_get); scm_c_define_gsubr("meep-structure-chunk-sigsize-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_sigsize_set); scm_c_define_gsubr("meep-structure-chunk-sigsize-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_sigsize_get); scm_c_define_gsubr("meep-structure-chunk-gv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_gv_set); scm_c_define_gsubr("meep-structure-chunk-gv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_gv_get); scm_c_define_gsubr("meep-structure-chunk-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_v_set); scm_c_define_gsubr("meep-structure-chunk-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_v_get); scm_c_define_gsubr("meep-structure-chunk-pb-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_pb_set); scm_c_define_gsubr("meep-structure-chunk-pb-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_pb_get); scm_c_define_gsubr("meep-structure-chunk-refcount-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_refcount_set); scm_c_define_gsubr("meep-structure-chunk-refcount-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_refcount_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__structure_chunk->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_structure_chunk; scm_c_define_gsubr("delete-meep-structure-chunk", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_structure_chunk); scm_c_define_gsubr("new-meep-structure-chunk", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_structure_chunk); scm_c_define_gsubr("meep-structure-chunk-set-chi1inv", 6, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_set_chi1inv); scm_c_define_gsubr("meep-structure-chunk-has-chi1inv", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_has_chi1inv); scm_c_define_gsubr("meep-structure-chunk-set-conductivity", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_set_conductivity); scm_c_define_gsubr("meep-structure-chunk-update-condinv", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_update_condinv); scm_c_define_gsubr("meep-structure-chunk-set-chi3", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_set_chi3); scm_c_define_gsubr("meep-structure-chunk-set-chi2", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_set_chi2); scm_c_define_gsubr("meep-structure-chunk-use-pml", 8, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_use_pml); scm_c_define_gsubr("meep-structure-chunk-add-polarizability", 5, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_add_polarizability); scm_c_define_gsubr("meep-structure-chunk-mix-with", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_mix_with); scm_c_define_gsubr("meep-structure-chunk-n-proc", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_n_proc); scm_c_define_gsubr("meep-structure-chunk-is-mine", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_is_mine); scm_c_define_gsubr("meep-structure-chunk-remove-polarizabilities", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_remove_polarizabilities); scm_c_define_gsubr("meep-structure-chunk-get-chi1inv", 4, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_get_chi1inv); scm_c_define_gsubr("meep-structure-chunk-get-inveps", 4, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_get_inveps); scm_c_define_gsubr("meep-structure-chunk-max-eps", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunk_max_eps); scm_c_define_gsubr("meep-pml-quadratic-profile", 2, 0, 0, (swig_guile_proc) _wrap_meep_pml_quadratic_profile); SWIG_TypeClientData(SWIGTYPE_p_meep__boundary_region, (void *) &_swig_guile_clientdatameep_boundary_region); scm_c_define_gsubr("meep-boundary-region-NOTHING-SPECIAL", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_NOTHING_SPECIAL); scm_c_define_gsubr("meep-boundary-region-PML", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_PML); scm_c_define_gsubr("new-meep-boundary-region", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_boundary_region); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__boundary_region->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_boundary_region; scm_c_define_gsubr("delete-meep-boundary-region", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_boundary_region); scm_c_define_gsubr("meep-boundary-region-meep-boundary-region-add", 2, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_meep_boundary_region_add); scm_c_define_gsubr("meep-boundary-region-meep-boundary-region-mul", 2, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_meep_boundary_region_mul); scm_c_define_gsubr("meep-boundary-region-apply", 0, 0, 1, (swig_guile_proc) _wrap_meep_boundary_region_apply); scm_c_define_gsubr("meep-boundary-region-check-ok", 2, 0, 0, (swig_guile_proc) _wrap_meep_boundary_region_check_ok); scm_c_define_gsubr("meep-pml", 0, 0, 1, (swig_guile_proc) _wrap_meep_pml); SWIG_TypeClientData(SWIGTYPE_p_meep__structure, (void *) &_swig_guile_clientdatameep_structure); scm_c_define_gsubr("meep-structure-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunks_set); scm_c_define_gsubr("meep-structure-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_chunks_get); scm_c_define_gsubr("meep-structure-num-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_num_chunks_set); scm_c_define_gsubr("meep-structure-num-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_num_chunks_get); scm_c_define_gsubr("meep-structure-gv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_gv_set); scm_c_define_gsubr("meep-structure-gv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_gv_get); scm_c_define_gsubr("meep-structure-user-volume-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_user_volume_set); scm_c_define_gsubr("meep-structure-user-volume-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_user_volume_get); scm_c_define_gsubr("meep-structure-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_a_set); scm_c_define_gsubr("meep-structure-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_a_get); scm_c_define_gsubr("meep-structure-Courant-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_Courant_set); scm_c_define_gsubr("meep-structure-Courant-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_Courant_get); scm_c_define_gsubr("meep-structure-dt-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_dt_set); scm_c_define_gsubr("meep-structure-dt-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_dt_get); scm_c_define_gsubr("meep-structure-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_v_set); scm_c_define_gsubr("meep-structure-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_v_get); scm_c_define_gsubr("meep-structure-S-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_S_set); scm_c_define_gsubr("meep-structure-S-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_S_get); scm_c_define_gsubr("meep-structure-outdir-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_outdir_set); scm_c_define_gsubr("meep-structure-outdir-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_outdir_get); scm_c_define_gsubr("meep-structure-effort-volumes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_effort_volumes_set); scm_c_define_gsubr("meep-structure-effort-volumes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_effort_volumes_get); scm_c_define_gsubr("meep-structure-effort-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_effort_set); scm_c_define_gsubr("meep-structure-effort-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_effort_get); scm_c_define_gsubr("meep-structure-num-effort-volumes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_num_effort_volumes_set); scm_c_define_gsubr("meep-structure-num-effort-volumes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_num_effort_volumes_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__structure->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_structure; scm_c_define_gsubr("delete-meep-structure", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_structure); scm_c_define_gsubr("new-meep-structure", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_structure); scm_c_define_gsubr("meep-structure-set-materials", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_materials); scm_c_define_gsubr("meep-structure-set-chi1inv", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_chi1inv); scm_c_define_gsubr("meep-structure-has-chi1inv", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_has_chi1inv); scm_c_define_gsubr("meep-structure-set-epsilon", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_epsilon); scm_c_define_gsubr("meep-structure-set-mu", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_mu); scm_c_define_gsubr("meep-structure-set-conductivity", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_conductivity); scm_c_define_gsubr("meep-structure-set-chi3", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_chi3); scm_c_define_gsubr("meep-structure-set-chi2", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_set_chi2); scm_c_define_gsubr("meep-structure-add-polarizability", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_add_polarizability); scm_c_define_gsubr("meep-structure-remove-polarizabilities", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_remove_polarizabilities); scm_c_define_gsubr("meep-structure-set-output-directory", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_set_output_directory); scm_c_define_gsubr("meep-structure-mix-with", 3, 0, 0, (swig_guile_proc) _wrap_meep_structure_mix_with); scm_c_define_gsubr("meep-structure-equal-layout", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_equal_layout); scm_c_define_gsubr("meep-structure-print-layout", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_print_layout); scm_c_define_gsubr("meep-structure-get-chi1inv", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_get_chi1inv); scm_c_define_gsubr("meep-structure-get-inveps", 0, 0, 1, (swig_guile_proc) _wrap_meep_structure_get_inveps); scm_c_define_gsubr("meep-structure-get-eps", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_get_eps); scm_c_define_gsubr("meep-structure-get-mu", 2, 0, 0, (swig_guile_proc) _wrap_meep_structure_get_mu); scm_c_define_gsubr("meep-structure-max-eps", 1, 0, 0, (swig_guile_proc) _wrap_meep_structure_max_eps); SWIG_TypeClientData(SWIGTYPE_p_meep__src_time, (void *) &_swig_guile_clientdatameep_src_time); scm_c_define_gsubr("meep-src-time-is-integrated-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_time_is_integrated_set); scm_c_define_gsubr("meep-src-time-is-integrated-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_is_integrated_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__src_time->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_src_time; scm_c_define_gsubr("delete-meep-src-time", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_src_time); scm_c_define_gsubr("new-meep-src-time", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_src_time); scm_c_define_gsubr("meep-src-time-update", 3, 0, 0, (swig_guile_proc) _wrap_meep_src_time_update); scm_c_define_gsubr("meep-src-time-current", 0, 0, 1, (swig_guile_proc) _wrap_meep_src_time_current); scm_c_define_gsubr("meep-src-time-last-time-max", 0, 0, 1, (swig_guile_proc) _wrap_meep_src_time_last_time_max); scm_c_define_gsubr("meep-src-time-add-to", 3, 0, 0, (swig_guile_proc) _wrap_meep_src_time_add_to); scm_c_define_gsubr("meep-src-time-next-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_time_next_set); scm_c_define_gsubr("meep-src-time-next-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_next_get); scm_c_define_gsubr("meep-src-time-dipole", 0, 0, 1, (swig_guile_proc) _wrap_meep_src_time_dipole); scm_c_define_gsubr("meep-src-time-last-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_last_time); scm_c_define_gsubr("meep-src-time-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_clone); scm_c_define_gsubr("meep-src-time-is-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_time_is_equal); scm_c_define_gsubr("meep-src-time-frequency", 1, 0, 0, (swig_guile_proc) _wrap_meep_src_time_frequency); scm_c_define_gsubr("meep-src-time-set-frequency", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_time_set_frequency); scm_c_define_gsubr("meep-src-times-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_src_times_equal); SWIG_TypeClientData(SWIGTYPE_p_meep__gaussian_src_time, (void *) &_swig_guile_clientdatameep_gaussian_src_time); scm_c_define_gsubr("new-meep-gaussian-src-time", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_gaussian_src_time); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__gaussian_src_time->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_gaussian_src_time; scm_c_define_gsubr("delete-meep-gaussian-src-time", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_gaussian_src_time); scm_c_define_gsubr("meep-gaussian-src-time-dipole", 2, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_dipole); scm_c_define_gsubr("meep-gaussian-src-time-last-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_last_time); scm_c_define_gsubr("meep-gaussian-src-time-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_clone); scm_c_define_gsubr("meep-gaussian-src-time-is-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_is_equal); scm_c_define_gsubr("meep-gaussian-src-time-frequency", 1, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_frequency); scm_c_define_gsubr("meep-gaussian-src-time-set-frequency", 2, 0, 0, (swig_guile_proc) _wrap_meep_gaussian_src_time_set_frequency); SWIG_TypeClientData(SWIGTYPE_p_meep__continuous_src_time, (void *) &_swig_guile_clientdatameep_continuous_src_time); scm_c_define_gsubr("new-meep-continuous-src-time", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_continuous_src_time); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__continuous_src_time->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_continuous_src_time; scm_c_define_gsubr("delete-meep-continuous-src-time", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_continuous_src_time); scm_c_define_gsubr("meep-continuous-src-time-dipole", 2, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_dipole); scm_c_define_gsubr("meep-continuous-src-time-last-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_last_time); scm_c_define_gsubr("meep-continuous-src-time-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_clone); scm_c_define_gsubr("meep-continuous-src-time-is-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_is_equal); scm_c_define_gsubr("meep-continuous-src-time-frequency", 1, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_frequency); scm_c_define_gsubr("meep-continuous-src-time-set-frequency", 2, 0, 0, (swig_guile_proc) _wrap_meep_continuous_src_time_set_frequency); SWIG_TypeClientData(SWIGTYPE_p_meep__custom_src_time, (void *) &_swig_guile_clientdatameep_custom_src_time); scm_c_define_gsubr("new-meep-custom-src-time", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_custom_src_time); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__custom_src_time->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_custom_src_time; scm_c_define_gsubr("delete-meep-custom-src-time", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_custom_src_time); scm_c_define_gsubr("meep-custom-src-time-current", 3, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_current); scm_c_define_gsubr("meep-custom-src-time-dipole", 2, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_dipole); scm_c_define_gsubr("meep-custom-src-time-last-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_last_time); scm_c_define_gsubr("meep-custom-src-time-clone", 1, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_clone); scm_c_define_gsubr("meep-custom-src-time-is-equal", 2, 0, 0, (swig_guile_proc) _wrap_meep_custom_src_time_is_equal); SWIG_TypeClientData(SWIGTYPE_p_meep__monitor_point, (void *) &_swig_guile_clientdatameep_monitor_point); scm_c_define_gsubr("new-meep-monitor-point", 0, 0, 0, (swig_guile_proc) _wrap_new_meep_monitor_point); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__monitor_point->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_monitor_point; scm_c_define_gsubr("delete-meep-monitor-point", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_monitor_point); scm_c_define_gsubr("meep-monitor-point-loc-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_loc_set); scm_c_define_gsubr("meep-monitor-point-loc-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_loc_get); scm_c_define_gsubr("meep-monitor-point-t-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_t_set); scm_c_define_gsubr("meep-monitor-point-t-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_t_get); scm_c_define_gsubr("meep-monitor-point-f-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_f_set); scm_c_define_gsubr("meep-monitor-point-f-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_f_get); scm_c_define_gsubr("meep-monitor-point-next-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_next_set); scm_c_define_gsubr("meep-monitor-point-next-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_next_get); scm_c_define_gsubr("meep-monitor-point-get-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_get_component); scm_c_define_gsubr("meep-monitor-point-poynting-in-direction", 0, 0, 1, (swig_guile_proc) _wrap_meep_monitor_point_poynting_in_direction); scm_c_define_gsubr("meep-monitor-point-fourier-transform", 0, 0, 1, (swig_guile_proc) _wrap_meep_monitor_point_fourier_transform); scm_c_define_gsubr("meep-monitor-point-harminv", 8, 0, 0, (swig_guile_proc) _wrap_meep_monitor_point_harminv); SWIG_TypeClientData(SWIGTYPE_p_meep__dft_chunk, (void *) &_swig_guile_clientdatameep_dft_chunk); scm_c_define_gsubr("new-meep-dft-chunk", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_dft_chunk_rest); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__dft_chunk->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_dft_chunk; scm_c_define_gsubr("delete-meep-dft-chunk", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_dft_chunk); scm_c_define_gsubr("meep-dft-chunk-update-dft", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_update_dft); scm_c_define_gsubr("meep-dft-chunk-scale-dft", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_scale_dft); scm_c_define_gsubr("meep-dft-chunk-meep-dft-chunk-subeq", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_meep_dft_chunk_subeq); scm_c_define_gsubr("meep-dft-chunk-omega-min-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_omega_min_set); scm_c_define_gsubr("meep-dft-chunk-omega-min-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_omega_min_get); scm_c_define_gsubr("meep-dft-chunk-domega-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_domega_set); scm_c_define_gsubr("meep-dft-chunk-domega-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_domega_get); scm_c_define_gsubr("meep-dft-chunk-Nomega-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_Nomega_set); scm_c_define_gsubr("meep-dft-chunk-Nomega-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_Nomega_get); scm_c_define_gsubr("meep-dft-chunk-c-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_c_set); scm_c_define_gsubr("meep-dft-chunk-c-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_c_get); scm_c_define_gsubr("meep-dft-chunk-N-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_N_set); scm_c_define_gsubr("meep-dft-chunk-N-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_N_get); scm_c_define_gsubr("meep-dft-chunk-dft-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dft_set); scm_c_define_gsubr("meep-dft-chunk-dft-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_dft_get); scm_c_define_gsubr("meep-dft-chunk-next-in-chunk-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_next_in_chunk_set); scm_c_define_gsubr("meep-dft-chunk-next-in-chunk-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_next_in_chunk_get); scm_c_define_gsubr("meep-dft-chunk-next-in-dft-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_next_in_dft_set); scm_c_define_gsubr("meep-dft-chunk-next-in-dft-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_next_in_dft_get); scm_c_define_gsubr("meep-dft-chunk-extra-weight-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_extra_weight_set); scm_c_define_gsubr("meep-dft-chunk-extra-weight-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_chunk_extra_weight_get); scm_c_define_gsubr("meep-save-dft-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_save_dft_hdf5); scm_c_define_gsubr("meep-load-dft-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_load_dft_hdf5); SWIG_TypeClientData(SWIGTYPE_p_meep__dft_flux, (void *) &_swig_guile_clientdatameep_dft_flux); scm_c_define_gsubr("new-meep-dft-flux", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_dft_flux); scm_c_define_gsubr("meep-dft-flux-flux", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_flux); scm_c_define_gsubr("meep-dft-flux-meep-dft-flux-subeq", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_meep_dft_flux_subeq); scm_c_define_gsubr("meep-dft-flux-save-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_flux_save_hdf5); scm_c_define_gsubr("meep-dft-flux-load-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_flux_load_hdf5); scm_c_define_gsubr("meep-dft-flux-scale-dfts", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_scale_dfts); scm_c_define_gsubr("meep-dft-flux-remove", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_remove); scm_c_define_gsubr("meep-dft-flux-freq-min-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_freq_min_set); scm_c_define_gsubr("meep-dft-flux-freq-min-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_freq_min_get); scm_c_define_gsubr("meep-dft-flux-dfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_dfreq_set); scm_c_define_gsubr("meep-dft-flux-dfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_dfreq_get); scm_c_define_gsubr("meep-dft-flux-Nfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_Nfreq_set); scm_c_define_gsubr("meep-dft-flux-Nfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_Nfreq_get); scm_c_define_gsubr("meep-dft-flux-E-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_E_set); scm_c_define_gsubr("meep-dft-flux-E-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_E_get); scm_c_define_gsubr("meep-dft-flux-H-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_H_set); scm_c_define_gsubr("meep-dft-flux-H-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_H_get); scm_c_define_gsubr("meep-dft-flux-cE-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_cE_set); scm_c_define_gsubr("meep-dft-flux-cE-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_cE_get); scm_c_define_gsubr("meep-dft-flux-cH-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_cH_set); scm_c_define_gsubr("meep-dft-flux-cH-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_flux_cH_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__dft_flux->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_dft_flux; scm_c_define_gsubr("delete-meep-dft-flux", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_dft_flux); SWIG_TypeClientData(SWIGTYPE_p_meep__dft_force, (void *) &_swig_guile_clientdatameep_dft_force); scm_c_define_gsubr("new-meep-dft-force", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_dft_force); scm_c_define_gsubr("meep-dft-force-force", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_force); scm_c_define_gsubr("meep-dft-force-save-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_force_save_hdf5); scm_c_define_gsubr("meep-dft-force-load-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_dft_force_load_hdf5); scm_c_define_gsubr("meep-dft-force-scale-dfts", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_scale_dfts); scm_c_define_gsubr("meep-dft-force-remove", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_remove); scm_c_define_gsubr("meep-dft-force-freq-min-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_freq_min_set); scm_c_define_gsubr("meep-dft-force-freq-min-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_freq_min_get); scm_c_define_gsubr("meep-dft-force-dfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_dfreq_set); scm_c_define_gsubr("meep-dft-force-dfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_dfreq_get); scm_c_define_gsubr("meep-dft-force-Nfreq-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_Nfreq_set); scm_c_define_gsubr("meep-dft-force-Nfreq-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_Nfreq_get); scm_c_define_gsubr("meep-dft-force-offdiag1-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_offdiag1_set); scm_c_define_gsubr("meep-dft-force-offdiag1-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_offdiag1_get); scm_c_define_gsubr("meep-dft-force-offdiag2-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_offdiag2_set); scm_c_define_gsubr("meep-dft-force-offdiag2-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_offdiag2_get); scm_c_define_gsubr("meep-dft-force-diag-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_diag_set); scm_c_define_gsubr("meep-dft-force-diag-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_dft_force_diag_get); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__dft_force->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_dft_force; scm_c_define_gsubr("delete-meep-dft-force", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_dft_force); scm_c_define_gsubr("meep-in-or-out-Incoming", 0, 0, 0, (swig_guile_proc) _wrap_meep_in_or_out_Incoming); scm_c_define_gsubr("meep-in-or-out-Outgoing", 0, 0, 0, (swig_guile_proc) _wrap_meep_in_or_out_Outgoing); scm_c_define_gsubr("meep-connect-phase-CONNECT-PHASE", 0, 0, 0, (swig_guile_proc) _wrap_meep_connect_phase_CONNECT_PHASE); scm_c_define_gsubr("meep-connect-phase-CONNECT-NEGATE", 0, 0, 0, (swig_guile_proc) _wrap_meep_connect_phase_CONNECT_NEGATE); scm_c_define_gsubr("meep-connect-phase-CONNECT-COPY", 0, 0, 0, (swig_guile_proc) _wrap_meep_connect_phase_CONNECT_COPY); SWIG_TypeClientData(SWIGTYPE_p_meep__fields_chunk, (void *) &_swig_guile_clientdatameep_fields_chunk); scm_c_define_gsubr("meep-fields-chunk-f-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_set); scm_c_define_gsubr("meep-fields-chunk-f-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_get); scm_c_define_gsubr("meep-fields-chunk-f-u-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_u_set); scm_c_define_gsubr("meep-fields-chunk-f-u-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_u_get); scm_c_define_gsubr("meep-fields-chunk-f-w-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_set); scm_c_define_gsubr("meep-fields-chunk-f-w-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_get); scm_c_define_gsubr("meep-fields-chunk-f-cond-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_cond_set); scm_c_define_gsubr("meep-fields-chunk-f-cond-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_cond_get); scm_c_define_gsubr("meep-fields-chunk-f-backup-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_backup_set); scm_c_define_gsubr("meep-fields-chunk-f-backup-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_backup_get); scm_c_define_gsubr("meep-fields-chunk-f-u-backup-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_u_backup_set); scm_c_define_gsubr("meep-fields-chunk-f-u-backup-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_u_backup_get); scm_c_define_gsubr("meep-fields-chunk-f-w-backup-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_backup_set); scm_c_define_gsubr("meep-fields-chunk-f-w-backup-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_w_backup_get); scm_c_define_gsubr("meep-fields-chunk-f-cond-backup-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_cond_backup_set); scm_c_define_gsubr("meep-fields-chunk-f-cond-backup-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_cond_backup_get); scm_c_define_gsubr("meep-fields-chunk-f-minus-p-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_minus_p_set); scm_c_define_gsubr("meep-fields-chunk-f-minus-p-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_minus_p_get); scm_c_define_gsubr("meep-fields-chunk-f-rderiv-int-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_rderiv_int_set); scm_c_define_gsubr("meep-fields-chunk-f-rderiv-int-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_f_rderiv_int_get); scm_c_define_gsubr("meep-fields-chunk-dft-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_dft_chunks_set); scm_c_define_gsubr("meep-fields-chunk-dft-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_dft_chunks_get); scm_c_define_gsubr("meep-fields-chunk-zeroes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zeroes_set); scm_c_define_gsubr("meep-fields-chunk-zeroes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zeroes_get); scm_c_define_gsubr("meep-fields-chunk-num-zeroes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_num_zeroes_set); scm_c_define_gsubr("meep-fields-chunk-num-zeroes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_num_zeroes_get); scm_c_define_gsubr("meep-fields-chunk-connections-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_connections_set); scm_c_define_gsubr("meep-fields-chunk-connections-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_connections_get); scm_c_define_gsubr("meep-fields-chunk-num-connections-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_num_connections_set); scm_c_define_gsubr("meep-fields-chunk-num-connections-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_num_connections_get); scm_c_define_gsubr("meep-fields-chunk-connection-phases-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_connection_phases_set); scm_c_define_gsubr("meep-fields-chunk-connection-phases-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_connection_phases_get); scm_c_define_gsubr("meep-fields-chunk-pols-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_pols_set); scm_c_define_gsubr("meep-fields-chunk-pols-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_pols_get); scm_c_define_gsubr("meep-fields-chunk-olpols-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_olpols_set); scm_c_define_gsubr("meep-fields-chunk-olpols-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_olpols_get); scm_c_define_gsubr("meep-fields-chunk-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_a_set); scm_c_define_gsubr("meep-fields-chunk-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_a_get); scm_c_define_gsubr("meep-fields-chunk-Courant-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_Courant_set); scm_c_define_gsubr("meep-fields-chunk-Courant-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_Courant_get); scm_c_define_gsubr("meep-fields-chunk-dt-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_dt_set); scm_c_define_gsubr("meep-fields-chunk-dt-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_dt_get); scm_c_define_gsubr("meep-fields-chunk-gv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_gv_set); scm_c_define_gsubr("meep-fields-chunk-gv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_gv_get); scm_c_define_gsubr("meep-fields-chunk-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_v_set); scm_c_define_gsubr("meep-fields-chunk-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_v_get); scm_c_define_gsubr("meep-fields-chunk-m-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_m_set); scm_c_define_gsubr("meep-fields-chunk-m-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_m_get); scm_c_define_gsubr("meep-fields-chunk-zero-fields-near-cylorigin-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zero_fields_near_cylorigin_set); scm_c_define_gsubr("meep-fields-chunk-zero-fields-near-cylorigin-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zero_fields_near_cylorigin_get); scm_c_define_gsubr("meep-fields-chunk-beta-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_beta_set); scm_c_define_gsubr("meep-fields-chunk-beta-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_beta_get); scm_c_define_gsubr("meep-fields-chunk-is-real-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_is_real_set); scm_c_define_gsubr("meep-fields-chunk-is-real-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_is_real_get); scm_c_define_gsubr("meep-fields-chunk-store-pol-energy-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_store_pol_energy_set); scm_c_define_gsubr("meep-fields-chunk-store-pol-energy-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_store_pol_energy_get); scm_c_define_gsubr("meep-fields-chunk-bands-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_bands_set); scm_c_define_gsubr("meep-fields-chunk-bands-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_bands_get); scm_c_define_gsubr("meep-fields-chunk-sources-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_sources_set); scm_c_define_gsubr("meep-fields-chunk-sources-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_sources_get); scm_c_define_gsubr("meep-fields-chunk-new-s-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_new_s_set); scm_c_define_gsubr("meep-fields-chunk-new-s-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_new_s_get); scm_c_define_gsubr("meep-fields-chunk-s-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_s_set); scm_c_define_gsubr("meep-fields-chunk-s-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_s_get); scm_c_define_gsubr("meep-fields-chunk-outdir-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_outdir_set); scm_c_define_gsubr("meep-fields-chunk-outdir-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_outdir_get); scm_c_define_gsubr("new-meep-fields-chunk", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_fields_chunk); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__fields_chunk->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_fields_chunk; scm_c_define_gsubr("delete-meep-fields-chunk", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_fields_chunk); scm_c_define_gsubr("meep-fields-chunk-peek-field", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_peek_field); scm_c_define_gsubr("meep-fields-chunk-use-real-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_use_real_fields); scm_c_define_gsubr("meep-fields-chunk-have-component", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_have_component); scm_c_define_gsubr("meep-fields-chunk-last-source-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_last_source_time); scm_c_define_gsubr("meep-fields-chunk-get-field-gv", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_get_field_gv); scm_c_define_gsubr("meep-fields-chunk-get-field", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_get_field); scm_c_define_gsubr("meep-fields-chunk-get-polarization-energy", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_get_polarization_energy); scm_c_define_gsubr("meep-fields-chunk-my-polarization-energy", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_my_polarization_energy); scm_c_define_gsubr("meep-fields-chunk-get-chi1inv", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_get_chi1inv); scm_c_define_gsubr("meep-fields-chunk-analytic-chi1", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_analytic_chi1); scm_c_define_gsubr("meep-fields-chunk-backup-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_backup_component); scm_c_define_gsubr("meep-fields-chunk-average-with-backup", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_average_with_backup); scm_c_define_gsubr("meep-fields-chunk-restore-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_restore_component); scm_c_define_gsubr("meep-fields-chunk-set-output-directory", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_set_output_directory); scm_c_define_gsubr("meep-fields-chunk-verbose", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_verbose); scm_c_define_gsubr("meep-fields-chunk-count-volume", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_count_volume); scm_c_define_gsubr("meep-fields-chunk-n-proc", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_n_proc); scm_c_define_gsubr("meep-fields-chunk-is-mine", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_is_mine); scm_c_define_gsubr("meep-fields-chunk-zero-metal", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zero_metal); scm_c_define_gsubr("meep-fields-chunk-remove-sources", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_remove_sources); scm_c_define_gsubr("meep-fields-chunk-remove-polarizabilities", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_remove_polarizabilities); scm_c_define_gsubr("meep-fields-chunk-zero-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_zero_fields); scm_c_define_gsubr("meep-fields-chunk-update-eh", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_chunk_update_eh); scm_c_define_gsubr("meep-fields-chunk-alloc-f", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_alloc_f); scm_c_define_gsubr("meep-fields-chunk-figure-out-step-plan", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_figure_out_step_plan); scm_c_define_gsubr("meep-fields-chunk-set-solve-cw-omega", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_set_solve_cw_omega); scm_c_define_gsubr("meep-fields-chunk-unset-solve-cw-omega", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunk_unset_solve_cw_omega); scm_c_define_gsubr("meep-boundary-condition-Periodic", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_condition_Periodic); scm_c_define_gsubr("meep-boundary-condition-Metallic", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_condition_Metallic); scm_c_define_gsubr("meep-boundary-condition-Magnetic", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_condition_Magnetic); scm_c_define_gsubr("meep-boundary-condition-None", 0, 0, 0, (swig_guile_proc) _wrap_meep_boundary_condition_None); scm_c_define_gsubr("meep-time-sink-Connecting", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_Connecting); scm_c_define_gsubr("meep-time-sink-Stepping", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_Stepping); scm_c_define_gsubr("meep-time-sink-Boundaries", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_Boundaries); scm_c_define_gsubr("meep-time-sink-MpiTime", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_MpiTime); scm_c_define_gsubr("meep-time-sink-FieldOutput", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_FieldOutput); scm_c_define_gsubr("meep-time-sink-FourierTransforming", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_FourierTransforming); scm_c_define_gsubr("meep-time-sink-Other", 0, 0, 0, (swig_guile_proc) _wrap_meep_time_sink_Other); scm_c_define_gsubr("meep-derived-component-func", 4, 0, 0, (swig_guile_proc) _wrap_meep_derived_component_func); SWIG_TypeClientData(SWIGTYPE_p_meep__fields, (void *) &_swig_guile_clientdatameep_fields); scm_c_define_gsubr("meep-fields-num-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_num_chunks_set); scm_c_define_gsubr("meep-fields-num-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_num_chunks_get); scm_c_define_gsubr("meep-fields-chunks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunks_set); scm_c_define_gsubr("meep-fields-chunks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_chunks_get); scm_c_define_gsubr("meep-fields-sources-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_sources_set); scm_c_define_gsubr("meep-fields-sources-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_sources_get); scm_c_define_gsubr("meep-fields-fluxes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_fluxes_set); scm_c_define_gsubr("meep-fields-fluxes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_fluxes_get); scm_c_define_gsubr("meep-fields-S-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_S_set); scm_c_define_gsubr("meep-fields-S-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_S_get); scm_c_define_gsubr("meep-fields-comm-blocks-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_blocks_set); scm_c_define_gsubr("meep-fields-comm-blocks-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_blocks_get); scm_c_define_gsubr("meep-fields-comm-sizes-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_sizes_set); scm_c_define_gsubr("meep-fields-comm-sizes-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_sizes_get); scm_c_define_gsubr("meep-fields-comm-size-tot", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_comm_size_tot); scm_c_define_gsubr("meep-fields-a-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_a_set); scm_c_define_gsubr("meep-fields-a-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_a_get); scm_c_define_gsubr("meep-fields-dt-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_dt_set); scm_c_define_gsubr("meep-fields-dt-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_dt_get); scm_c_define_gsubr("meep-fields-gv-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_gv_set); scm_c_define_gsubr("meep-fields-gv-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_gv_get); scm_c_define_gsubr("meep-fields-user-volume-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_user_volume_set); scm_c_define_gsubr("meep-fields-user-volume-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_user_volume_get); scm_c_define_gsubr("meep-fields-v-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_v_set); scm_c_define_gsubr("meep-fields-v-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_v_get); scm_c_define_gsubr("meep-fields-m-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_m_set); scm_c_define_gsubr("meep-fields-m-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_m_get); scm_c_define_gsubr("meep-fields-beta-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_beta_set); scm_c_define_gsubr("meep-fields-beta-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_beta_get); scm_c_define_gsubr("meep-fields-t-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_t_set); scm_c_define_gsubr("meep-fields-t-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_t_get); scm_c_define_gsubr("meep-fields-phasein-time-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_phasein_time_set); scm_c_define_gsubr("meep-fields-phasein-time-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_phasein_time_get); scm_c_define_gsubr("meep-fields-is-real-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_is_real_set); scm_c_define_gsubr("meep-fields-is-real-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_is_real_get); scm_c_define_gsubr("meep-fields-k-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_k_set); scm_c_define_gsubr("meep-fields-k-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_k_get); scm_c_define_gsubr("meep-fields-eikna-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_eikna_set); scm_c_define_gsubr("meep-fields-eikna-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_eikna_get); scm_c_define_gsubr("meep-fields-coskna-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_coskna_set); scm_c_define_gsubr("meep-fields-coskna-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_coskna_get); scm_c_define_gsubr("meep-fields-sinkna-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_sinkna_set); scm_c_define_gsubr("meep-fields-sinkna-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_sinkna_get); scm_c_define_gsubr("meep-fields-boundaries-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_boundaries_set); scm_c_define_gsubr("meep-fields-boundaries-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_boundaries_get); scm_c_define_gsubr("meep-fields-bands-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_bands_set); scm_c_define_gsubr("meep-fields-bands-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_bands_get); scm_c_define_gsubr("meep-fields-outdir-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_outdir_set); scm_c_define_gsubr("meep-fields-outdir-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_outdir_get); scm_c_define_gsubr("new-meep-fields", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_fields); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__fields->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_fields; scm_c_define_gsubr("delete-meep-fields", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_fields); scm_c_define_gsubr("meep-fields-equal-layout", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_equal_layout); scm_c_define_gsubr("meep-fields-use-real-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_use_real_fields); scm_c_define_gsubr("meep-fields-zero-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_zero_fields); scm_c_define_gsubr("meep-fields-remove-sources", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_remove_sources); scm_c_define_gsubr("meep-fields-remove-polarizabilities", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_remove_polarizabilities); scm_c_define_gsubr("meep-fields-remove-fluxes", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_remove_fluxes); scm_c_define_gsubr("meep-fields-reset", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_reset); scm_c_define_gsubr("meep-fields-time-spent-on", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_time_spent_on); scm_c_define_gsubr("meep-fields-print-times", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_print_times); scm_c_define_gsubr("meep-fields-set-boundary", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_set_boundary); scm_c_define_gsubr("meep-fields-use-bloch", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_use_bloch); scm_c_define_gsubr("meep-fields-lattice-vector", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_lattice_vector); scm_c_define_gsubr("meep-fields-update-eh", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_update_eh); scm_c_define_gsubr("meep-fields-total-volume", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_total_volume); scm_c_define_gsubr("meep-fields-output-hdf5", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_output_hdf5); scm_c_define_gsubr("meep-fields-open-h5file", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_open_h5file); scm_c_define_gsubr("meep-fields-h5file-name", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_h5file_name); scm_c_define_gsubr("meep-fields-last-step-output-wall-time-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_step_output_wall_time_set); scm_c_define_gsubr("meep-fields-last-step-output-wall-time-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_step_output_wall_time_get); scm_c_define_gsubr("meep-fields-last-step-output-t-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_step_output_t_set); scm_c_define_gsubr("meep-fields-last-step-output-t-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_step_output_t_get); scm_c_define_gsubr("meep-fields-step", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_step); scm_c_define_gsubr("meep-fields-round-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_round_time); scm_c_define_gsubr("meep-fields-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_time); scm_c_define_gsubr("meep-fields-solve-cw", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_solve_cw); scm_c_define_gsubr("meep-fields-last-source-time", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_last_source_time); scm_c_define_gsubr("meep-fields-add-point-source", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_point_source); scm_c_define_gsubr("meep-fields-add-volume-source", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_volume_source); scm_c_define_gsubr("meep-fields-require-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_require_component); scm_c_define_gsubr("meep-fields-add-eigenmode-source", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_eigenmode_source); scm_c_define_gsubr("meep-fields-initialize-field", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_field); scm_c_define_gsubr("meep-fields-initialize-with-nth-te", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_with_nth_te); scm_c_define_gsubr("meep-fields-initialize-with-nth-tm", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_with_nth_tm); scm_c_define_gsubr("meep-fields-initialize-with-n-te", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_with_n_te); scm_c_define_gsubr("meep-fields-initialize-with-n-tm", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_initialize_with_n_tm); scm_c_define_gsubr("meep-fields-phase-in-material", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_phase_in_material); scm_c_define_gsubr("meep-fields-is-phasing", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_is_phasing); scm_c_define_gsubr("meep-fields-loop-in-chunks", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_loop_in_chunks); scm_c_define_gsubr("meep-fields-integrate", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_integrate); scm_c_define_gsubr("meep-fields-integrate2", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_integrate2); scm_c_define_gsubr("meep-fields-max-abs", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_max_abs); scm_c_define_gsubr("meep-fields-add-dft-pt", 6, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_dft_pt); scm_c_define_gsubr("meep-fields-add-dft", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_dft); scm_c_define_gsubr("meep-fields-update-dfts", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_update_dfts); scm_c_define_gsubr("meep-fields-add-dft-flux-box", 5, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_dft_flux_box); scm_c_define_gsubr("meep-fields-add-dft-flux-plane", 5, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_dft_flux_plane); scm_c_define_gsubr("meep-fields-add-dft-flux", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_dft_flux); scm_c_define_gsubr("meep-fields-add-dft-force", 5, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_dft_force); scm_c_define_gsubr("meep-fields-get-chi1inv", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_get_chi1inv); scm_c_define_gsubr("meep-fields-get-inveps", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_get_inveps); scm_c_define_gsubr("meep-fields-get-eps", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_get_eps); scm_c_define_gsubr("meep-fields-get-mu", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_get_mu); scm_c_define_gsubr("meep-fields-get-point", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_get_point); scm_c_define_gsubr("meep-fields-get-new-point", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_get_new_point); scm_c_define_gsubr("meep-fields-analytic-chi1", 4, 0, 0, (swig_guile_proc) _wrap_meep_fields_analytic_chi1); scm_c_define_gsubr("meep-fields-prepare-for-bands", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_prepare_for_bands); scm_c_define_gsubr("meep-fields-record-bands", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_record_bands); scm_c_define_gsubr("meep-fields-get-band", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_get_band); scm_c_define_gsubr("meep-fields-grace-bands", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_grace_bands); scm_c_define_gsubr("meep-fields-output-bands", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_output_bands); scm_c_define_gsubr("meep-fields-get-field", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_get_field); scm_c_define_gsubr("meep-fields-synchronize-magnetic-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_synchronize_magnetic_fields); scm_c_define_gsubr("meep-fields-restore-magnetic-fields", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_restore_magnetic_fields); scm_c_define_gsubr("meep-fields-energy-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_energy_in_box); scm_c_define_gsubr("meep-fields-electric-energy-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_electric_energy_in_box); scm_c_define_gsubr("meep-fields-magnetic-energy-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_magnetic_energy_in_box); scm_c_define_gsubr("meep-fields-thermo-energy-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_thermo_energy_in_box); scm_c_define_gsubr("meep-fields-total-energy", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_total_energy); scm_c_define_gsubr("meep-fields-field-energy-in-box", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_field_energy_in_box); scm_c_define_gsubr("meep-fields-field-energy", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_field_energy); scm_c_define_gsubr("meep-fields-flux-in-box-wrongH", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_flux_in_box_wrongH); scm_c_define_gsubr("meep-fields-flux-in-box", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_flux_in_box); scm_c_define_gsubr("meep-fields-add-flux-vol", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_add_flux_vol); scm_c_define_gsubr("meep-fields-add-flux-plane", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_add_flux_plane); scm_c_define_gsubr("meep-fields-electric-energy-max-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_electric_energy_max_in_box); scm_c_define_gsubr("meep-fields-modal-volume-in-box", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_modal_volume_in_box); scm_c_define_gsubr("meep-fields-electric-sqr-weighted-integral", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_electric_sqr_weighted_integral); scm_c_define_gsubr("meep-fields-electric-energy-weighted-integral", 3, 0, 0, (swig_guile_proc) _wrap_meep_fields_electric_energy_weighted_integral); scm_c_define_gsubr("meep-fields-set-output-directory", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_set_output_directory); scm_c_define_gsubr("meep-fields-verbose", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_verbose); scm_c_define_gsubr("meep-fields-count-volume", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_count_volume); scm_c_define_gsubr("meep-fields-have-component", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_have_component); scm_c_define_gsubr("meep-fields-max-eps", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_max_eps); scm_c_define_gsubr("meep-fields-step-boundaries", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_step_boundaries); scm_c_define_gsubr("meep-fields-nosize-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_nosize_direction); scm_c_define_gsubr("meep-fields-normal-direction", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_normal_direction); scm_c_define_gsubr("meep-fields-casimir-stress-dct-integral", 0, 0, 1, (swig_guile_proc) _wrap_meep_fields_casimir_stress_dct_integral); scm_c_define_gsubr("meep-fields-set-solve-cw-omega", 2, 0, 0, (swig_guile_proc) _wrap_meep_fields_set_solve_cw_omega); scm_c_define_gsubr("meep-fields-unset-solve-cw-omega", 1, 0, 0, (swig_guile_proc) _wrap_meep_fields_unset_solve_cw_omega); SWIG_TypeClientData(SWIGTYPE_p_meep__flux_vol, (void *) &_swig_guile_clientdatameep_flux_vol); scm_c_define_gsubr("new-meep-flux-vol", 3, 0, 0, (swig_guile_proc) _wrap_new_meep_flux_vol); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__flux_vol->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_flux_vol; scm_c_define_gsubr("delete-meep-flux-vol", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_flux_vol); scm_c_define_gsubr("meep-flux-vol-update-half", 1, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_update_half); scm_c_define_gsubr("meep-flux-vol-update", 1, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_update); scm_c_define_gsubr("meep-flux-vol-flux", 1, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_flux); scm_c_define_gsubr("meep-flux-vol-next-set", 2, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_next_set); scm_c_define_gsubr("meep-flux-vol-next-get", 1, 0, 0, (swig_guile_proc) _wrap_meep_flux_vol_next_get); scm_c_define_gsubr("meep-grace-type-XY", 0, 0, 0, (swig_guile_proc) _wrap_meep_grace_type_XY); scm_c_define_gsubr("meep-grace-type-ERROR-BARS", 0, 0, 0, (swig_guile_proc) _wrap_meep_grace_type_ERROR_BARS); SWIG_TypeClientData(SWIGTYPE_p_meep__grace, (void *) &_swig_guile_clientdatameep_grace); scm_c_define_gsubr("new-meep-grace", 0, 0, 1, (swig_guile_proc) _wrap_new_meep_grace); ((swig_guile_clientdata *)(SWIGTYPE_p_meep__grace->clientdata))->destroy = (guile_destructor) _wrap_delete_meep_grace; scm_c_define_gsubr("delete-meep-grace", 1, 0, 0, (swig_guile_proc) _wrap_delete_meep_grace); scm_c_define_gsubr("meep-grace-new-set", 0, 0, 1, (swig_guile_proc) _wrap_meep_grace_new_set); scm_c_define_gsubr("meep-grace-new-curve", 1, 0, 0, (swig_guile_proc) _wrap_meep_grace_new_curve); scm_c_define_gsubr("meep-grace-set-legend", 2, 0, 0, (swig_guile_proc) _wrap_meep_grace_set_legend); scm_c_define_gsubr("meep-grace-set-range", 5, 0, 0, (swig_guile_proc) _wrap_meep_grace_set_range); scm_c_define_gsubr("meep-grace-output-point", 0, 0, 1, (swig_guile_proc) _wrap_meep_grace_output_point); scm_c_define_gsubr("meep-grace-output-out-of-order", 0, 0, 1, (swig_guile_proc) _wrap_meep_grace_output_out_of_order); scm_c_define_gsubr("meep-make-output-directory", 0, 0, 1, (swig_guile_proc) _wrap_meep_make_output_directory); scm_c_define_gsubr("meep-trash-output-directory", 1, 0, 0, (swig_guile_proc) _wrap_meep_trash_output_directory); scm_c_define_gsubr("meep-create-output-file", 2, 0, 0, (swig_guile_proc) _wrap_meep_create_output_file); scm_c_define_gsubr("meep-deal-with-ctrl-c", 0, 0, 1, (swig_guile_proc) _wrap_meep_deal_with_ctrl_c); scm_c_define_gsubr("interrupt", 0, 1, 0, (swig_guile_proc) _wrap_interrupt); scm_c_define_gsubr("meep-do-harminv", 0, 0, 1, (swig_guile_proc) _wrap_meep_do_harminv); scm_c_define_gsubr("meep-make-casimir-gfunc", 0, 0, 1, (swig_guile_proc) _wrap_meep_make_casimir_gfunc); scm_c_define_gsubr("meep-make-casimir-gfunc-kz", 4, 0, 0, (swig_guile_proc) _wrap_meep_make_casimir_gfunc_kz); scm_c_define_gsubr("MEEP-CTL-SWIG-HPP", 0, 0, 0, (swig_guile_proc) _wrap_MEEP_CTL_SWIG_HPP); scm_c_define_gsubr("vec-to-vector3", 1, 0, 0, (swig_guile_proc) _wrap_vec_to_vector3); scm_c_define_gsubr("vector3-to-vec", 1, 0, 0, (swig_guile_proc) _wrap_vector3_to_vec); scm_c_define_gsubr("set-dimensions", 1, 0, 0, (swig_guile_proc) _wrap_set_dimensions); scm_c_define_gsubr("make-structure", 0, 0, 1, (swig_guile_proc) _wrap_make_structure_rest); scm_c_define_gsubr("do-harminv", 5, 0, 0, (swig_guile_proc) _wrap_do_harminv); scm_c_define_gsubr("dft-flux-flux", 1, 0, 0, (swig_guile_proc) _wrap_dft_flux_flux); scm_c_define_gsubr("dft-force-force", 1, 0, 0, (swig_guile_proc) _wrap_dft_force_force); scm_c_define_gsubr("make-casimir-g", 0, 0, 1, (swig_guile_proc) _wrap_make_casimir_g); scm_c_define_gsubr("make-casimir-g-kz", 4, 0, 0, (swig_guile_proc) _wrap_make_casimir_g_kz); scm_c_define_gsubr("make-volume-list", 4, 0, 0, (swig_guile_proc) _wrap_make_volume_list); } #ifdef __cplusplus } #endif extern "C" { /* Linkage: simple */ } meep-openmpi-1.1.1/libctl/structure.cpp0000644000175200017520000011531711243101206017352 0ustar debiandebian#include "meep-ctl.hpp" #include using namespace ctlio; #define master_printf meep::master_printf #define MTS material_type_struct typedef struct { double m00, m01, m02, m11, m12, m22; } symmetric_matrix; /* rotate A by a unitary (real) rotation matrix R: RAR = transpose(R) * A * R */ void sym_matrix_rotate(symmetric_matrix *RAR, const symmetric_matrix *A_, const double R[3][3]) { int i,j; double A[3][3], AR[3][3]; A[0][0] = A_->m00; A[1][1] = A_->m11; A[2][2] = A_->m22; A[0][1] = A[1][0] = A_->m01; A[0][2] = A[2][0] = A_->m02; A[1][2] = A[2][1] = A_->m12; for (i = 0; i < 3; ++i) for (j = 0; j < 3; ++j) AR[i][j] = A[i][0]*R[0][j] + A[i][1]*R[1][j] + A[i][2]*R[2][j]; for (i = 0; i < 3; ++i) for (j = i; j < 3; ++j) A[i][j] = R[0][i]*AR[0][j] + R[1][i]*AR[1][j] + R[2][i]*AR[2][j]; RAR->m00 = A[0][0]; RAR->m11 = A[1][1]; RAR->m22 = A[2][2]; RAR->m01 = A[0][1]; RAR->m02 = A[0][2]; RAR->m12 = A[1][2]; } /* Set Vinv = inverse of V, where both V and Vinv are real-symmetric matrices.*/ void sym_matrix_invert(symmetric_matrix *Vinv, const symmetric_matrix *V) { double m00 = V->m00, m11 = V->m11, m22 = V->m22; double m01 = V->m01, m02 = V->m02, m12 = V->m12; if (m01 == 0.0 && m02 == 0.0 && m12 == 0.0) { /* optimize common case of a diagonal matrix: */ Vinv->m00 = 1.0 / m00; Vinv->m11 = 1.0 / m11; Vinv->m22 = 1.0 / m22; Vinv->m01 = Vinv->m02 = Vinv->m12 = 0.0; } else { double detinv; /* compute the determinant: */ detinv = m00*m11*m22 - m02*m11*m02 + 2.0 * m01*m12*m02 - m01*m01*m22 - m12*m12*m00; if (detinv == 0.0) meep::abort( "singular 3x3 matrix"); detinv = 1.0/detinv; Vinv->m00 = detinv * (m11*m22 - m12*m12); Vinv->m11 = detinv * (m00*m22 - m02*m02); Vinv->m22 = detinv * (m11*m00 - m01*m01); Vinv->m02 = detinv * (m01*m12 - m11*m02); Vinv->m01 = detinv * (m12*m02 - m01*m22); Vinv->m12 = detinv * (m01*m02 - m00*m12); } } /* Returns whether or not V is positive-definite. */ int sym_matrix_positive_definite(symmetric_matrix *V) { double det2, det3; double m00 = V->m00, m11 = V->m11, m22 = V->m22; #if defined(WITH_HERMITIAN_EPSILON) scalar_complex m01 = V->m01, m02 = V->m02, m12 = V->m12; det2 = m00*m11 - CSCALAR_NORMSQR(m01); det3 = det2*m22 - m11*CSCALAR_NORMSQR(m02) - CSCALAR_NORMSQR(m12)*m00 + 2.0 * ((m01.re * m12.re - m01.im * m12.im) * m02.re + (m01.re * m12.im + m01.im * m12.re) * m02.im); #else /* real matrix */ double m01 = V->m01, m02 = V->m02, m12 = V->m12; det2 = m00*m11 - m01*m01; det3 = det2*m22 - m02*m11*m02 + 2.0 * m01*m12*m02 - m12*m12*m00; #endif /* real matrix */ return (m00 > 0.0 && det2 > 0.0 && det3 > 0.0); } static meep::ndim dim = meep::D3; /***********************************************************************/ void set_dimensions(int dims) { if (dims == CYLINDRICAL) { dimensions = 2; dim = meep::Dcyl; } else { dimensions = dims; dim = meep::ndim(dims - 1); } } vector3 vec_to_vector3(const meep::vec &pt) { vector3 v3; switch (pt.dim) { case meep::D1: v3.x = 0; v3.y = 0; v3.z = pt.z(); break; case meep::D2: v3.x = pt.x(); v3.y = pt.y(); v3.z = 0; break; case meep::D3: v3.x = pt.x(); v3.y = pt.y(); v3.z = pt.z(); break; case meep::Dcyl: v3.x = pt.r(); v3.y = 0; v3.z = pt.z(); break; } return v3; } meep::vec vector3_to_vec(const vector3 v3) { switch (dim) { case meep::D1: return meep::vec(v3.z); case meep::D2: return meep::vec(v3.x, v3.y); case meep::D3: return meep::vec(v3.x, v3.y, v3.z); case meep::Dcyl: return meep::veccyl(v3.x, v3.z); default: meep::abort("unknown dimensionality in vector3_to_vec"); } } static geom_box gv2box(const meep::volume &v) { geom_box box; box.low = vec_to_vector3(v.get_min_corner()); box.high = vec_to_vector3(v.get_max_corner()); return box; } /***********************************************************************/ class geom_epsilon : public meep::material_function { geometric_object_list geometry; geom_box_tree geometry_tree; geom_box_tree restricted_tree; public: geom_epsilon(geometric_object_list g, material_type_list mlist, const meep::volume &v); virtual ~geom_epsilon(); virtual void set_volume(const meep::volume &v); virtual void unset_volume(void); virtual bool has_chi3(meep::component c); virtual double chi3(meep::component c, const meep::vec &r); virtual bool has_chi2(meep::component c); virtual double chi2(meep::component c, const meep::vec &r); virtual bool has_mu(); virtual bool has_conductivity(meep::component c); virtual double conductivity(meep::component c, const meep::vec &r); virtual double chi1p1(meep::field_type ft, const meep::vec &r); virtual void eff_chi1inv_row(meep::component c, double chi1inv_row[3], const meep::volume &v, double tol, int maxeval); void fallback_chi1inv_row(meep::component c, double chi1inv_row[3], const meep::volume &v, double tol, int maxeval); virtual void sigma_row(meep::component c, double sigrow[3], const meep::vec &r); void add_polarizabilities(meep::structure *s); void add_polarizabilities(meep::field_type ft, meep::structure *s); private: bool get_material_pt(material_type &material, const meep::vec &r); material_type_list extra_materials; }; geom_epsilon::geom_epsilon(geometric_object_list g, material_type_list mlist, const meep::volume &v) { geometry = g; // don't bother making a copy, only used in one place extra_materials = mlist; if (meep::am_master()) { for (int i = 0; i < geometry.num_items; ++i) { display_geometric_object_info(5, geometry.items[i]); if (geometry.items[i].material.which_subclass == MTS::MEDIUM) printf("%*sdielectric constant epsilon diagonal = (%g,%g,%g)\n", 5 + 5, "", geometry.items[i].material. subclass.medium_data->epsilon_diag.x, geometry.items[i].material. subclass.medium_data->epsilon_diag.y, geometry.items[i].material. subclass.medium_data->epsilon_diag.z); } } geom_fix_objects0(geometry); geom_box box = gv2box(v); geometry_tree = create_geom_box_tree0(geometry, box); if (verbose && meep::am_master()) { printf("Geometric-object bounding-box tree:\n"); display_geom_box_tree(5, geometry_tree); int tree_depth, tree_nobjects; geom_box_tree_stats(geometry_tree, &tree_depth, &tree_nobjects); master_printf("Geometric object tree has depth %d " "and %d object nodes (vs. %d actual objects)\n", tree_depth, tree_nobjects, geometry.num_items); } restricted_tree = geometry_tree; } geom_epsilon::~geom_epsilon() { unset_volume(); destroy_geom_box_tree(geometry_tree); } void geom_epsilon::unset_volume(void) { if (restricted_tree != geometry_tree) { destroy_geom_box_tree(restricted_tree); restricted_tree = geometry_tree; } } void geom_epsilon::set_volume(const meep::volume &v) { unset_volume(); geom_box box = gv2box(v); restricted_tree = create_geom_box_tree0(geometry, box); } static material_type eval_material_func(function material_func, vector3 p) { SCM pscm = ctl_convert_vector3_to_scm(p); material_type material; SCM mo; mo = gh_call1(material_func, pscm); material_type_input(mo, &material); while (material.which_subclass == MTS::MATERIAL_FUNCTION) { material_type m; mo = gh_call1(material.subclass. material_function_data->material_func, pscm); material_type_input(mo, &m); material_type_destroy(material); material = m; } if (material.which_subclass == MTS::MATERIAL_TYPE_SELF) { material_type_copy(&default_material, &material); } CK(material.which_subclass != MTS::MATERIAL_FUNCTION, "infinite loop in material functions"); return material; } static int variable_material(int which_subclass) { return (which_subclass == MTS::MATERIAL_FUNCTION); } static bool is_metal(meep::field_type ft, const material_type *material) { if (ft == meep::E_stuff) switch (material->which_subclass) { case MTS::MEDIUM: return (material->subclass.medium_data->epsilon_diag.x < 0 || material->subclass.medium_data->epsilon_diag.y < 0 || material->subclass.medium_data->epsilon_diag.z < 0); case MTS::PERFECT_METAL: return true; default: meep::abort("unknown material type"); } else switch (material->which_subclass) { case MTS::MEDIUM: return (material->subclass.medium_data->mu_diag.x < 0 || material->subclass.medium_data->mu_diag.y < 0 || material->subclass.medium_data->mu_diag.z < 0); case MTS::PERFECT_METAL: return false; // is an electric conductor, but not a magnetic conductor default: meep::abort("unknown material type"); } } static void material_epsmu(meep::field_type ft, material_type material, symmetric_matrix *epsmu, symmetric_matrix *epsmu_inv) { if (ft == meep::E_stuff) switch (material.which_subclass) { case MTS::MEDIUM: { epsmu->m00 = material.subclass.medium_data->epsilon_diag.x; epsmu->m11 = material.subclass.medium_data->epsilon_diag.y; epsmu->m22 = material.subclass.medium_data->epsilon_diag.z; epsmu->m01 = material.subclass.medium_data->epsilon_offdiag.x; epsmu->m02 = material.subclass.medium_data->epsilon_offdiag.y; epsmu->m12 = material.subclass.medium_data->epsilon_offdiag.z; sym_matrix_invert(epsmu_inv,epsmu); break; } case MTS::PERFECT_METAL: { epsmu->m00 = -meep::infinity; epsmu->m11 = -meep::infinity; epsmu->m22 = -meep::infinity; epsmu_inv->m00 = -0.0; epsmu_inv->m11 = -0.0; epsmu_inv->m22 = -0.0; epsmu->m01 = epsmu->m02 = epsmu->m12 = 0.0; epsmu_inv->m01 = epsmu_inv->m02 = epsmu_inv->m12 = 0.0; break; } default: meep::abort("unknown material type"); } else switch (material.which_subclass) { case MTS::MEDIUM: { epsmu->m00 = material.subclass.medium_data->mu_diag.x; epsmu->m11 = material.subclass.medium_data->mu_diag.y; epsmu->m22 = material.subclass.medium_data->mu_diag.z; epsmu->m01 = material.subclass.medium_data->mu_offdiag.x; epsmu->m02 = material.subclass.medium_data->mu_offdiag.y; epsmu->m12 = material.subclass.medium_data->mu_offdiag.z; sym_matrix_invert(epsmu_inv,epsmu); break; } case MTS::PERFECT_METAL: { epsmu->m00 = 1.0; epsmu->m11 = 1.0; epsmu->m22 = 1.0; epsmu_inv->m00 = 1.0; epsmu_inv->m11 = 1.0; epsmu_inv->m22 = 1.0; epsmu->m01 = epsmu->m02 = epsmu->m12 = 0.0; epsmu_inv->m01 = epsmu_inv->m02 = epsmu_inv->m12 = 0.0; break; } default: meep::abort("unknown material type"); } } bool geom_epsilon::get_material_pt(material_type &material, const meep::vec &r) { vector3 p = vec_to_vector3(r); boolean inobject; material = material_of_unshifted_point_in_tree_inobject(p, restricted_tree,&inobject); bool destroy_material = false; if (material.which_subclass == MTS::MATERIAL_TYPE_SELF) { material = default_material; } if (material.which_subclass == MTS::MATERIAL_FUNCTION) { material = eval_material_func(material.subclass. material_function_data->material_func, p); destroy_material = true; } return destroy_material; } // returns trace of the tensor diagonal double geom_epsilon::chi1p1(meep::field_type ft, const meep::vec &r) { symmetric_matrix chi1p1, chi1p1_inv; #ifdef DEBUG vector3 p = vec_to_vector3(r); if (p.x < restricted_tree->b.low.x || p.y < restricted_tree->b.low.y || p.z < restricted_tree->b.low.z || p.x > restricted_tree->b.high.x || p.y > restricted_tree->b.high.y || p.z > restricted_tree->b.high.z) meep::abort("invalid point (%g,%g,%g)\n", p.x,p.y,p.z); #endif material_type material; bool destroy_material = get_material_pt(material, r); material_epsmu(ft, material, &chi1p1, &chi1p1_inv); if (destroy_material) material_type_destroy(material); return (chi1p1.m00 + chi1p1.m11 + chi1p1.m22)/3; } /* Find frontmost object in v, along with the constant material behind it. Returns false if material behind the object is not constant. Requires moderately horrifying logic to figure things out properly, stolen from MPB. */ static bool get_front_object(const meep::volume &v, geom_box_tree geometry_tree, vector3 &pcenter, const geometric_object **o_front, vector3 &shiftby_front, material_type &mat_front, material_type &mat_behind) { vector3 p; const geometric_object *o1 = 0, *o2 = 0; vector3 shiftby1 = {0,0,0}, shiftby2 = {0,0,0}; geom_box pixel; material_type mat1, mat2; int id1 = -1, id2 = -1; const int num_neighbors[3] = { 3, 5, 9 }; const int neighbors[3][9][3] = { { {0,0,0}, {0,0,-1}, {0,0,1}, {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0} }, { {0,0,0}, {-1,-1,0}, {1,1,0}, {-1,1,0}, {1,-1,0}, {0,0,0},{0,0,0},{0,0,0},{0,0,0} }, { {0,0,0}, {1,1,1},{1,1,-1},{1,-1,1},{1,-1,-1}, {-1,1,1},{-1,1,-1},{-1,-1,1},{-1,-1,-1} } }; pixel = gv2box(v); pcenter = p = vec_to_vector3(v.center()); double d1, d2, d3; d1 = (pixel.high.x - pixel.low.x) * 0.5; d2 = (pixel.high.y - pixel.low.y) * 0.5; d3 = (pixel.high.z - pixel.low.z) * 0.5; for (int i = 0; i < num_neighbors[dimensions - 1]; ++i) { const geometric_object *o; material_type mat; vector3 q, shiftby; int id; q.x = p.x + neighbors[dimensions - 1][i][0] * d1; q.y = p.y + neighbors[dimensions - 1][i][1] * d2; q.z = p.z + neighbors[dimensions - 1][i][2] * d3; o = object_of_point_in_tree(q, geometry_tree, &shiftby, &id); if ((id == id1 && vector3_equal(shiftby, shiftby1)) || (id == id2 && vector3_equal(shiftby, shiftby2))) continue; mat = (o && o->material.which_subclass != MTS::MATERIAL_TYPE_SELF) ? o->material : default_material; if (id1 == -1) { o1 = o; shiftby1 = shiftby; id1 = id; mat1 = mat; } else if (id2 == -1 || ((id >= id1 && id >= id2) && (id1 == id2 || material_type_equal(&mat1,&mat2)))) { o2 = o; shiftby2 = shiftby; id2 = id; mat2 = mat; } else if (!(id1 < id2 && (id1 == id || material_type_equal(&mat1,&mat))) && !(id2 < id1 && (id2 == id || material_type_equal(&mat2,&mat)))) return false; } // CHECK(id1 > -1, "bug in object_of_point_in_tree?"); if (id2 == -1) { /* only one nearby object/material */ id2 = id1; o2 = o1; mat2 = mat1; shiftby2 = shiftby1; } if ((o1 && variable_material(o1->material.which_subclass)) || (o2 && variable_material(o2->material.which_subclass)) || (variable_material(default_material.which_subclass) && (!o1 || !o2 || o1->material.which_subclass == MTS::MATERIAL_TYPE_SELF || o2->material.which_subclass == MTS::MATERIAL_TYPE_SELF))) return false; if (id1 >= id2) { *o_front = o1; shiftby_front = shiftby1; mat_front = mat1; if (id1 == id2) mat_behind = mat1; else mat_behind = mat2; } if (id2 > id1) { *o_front = o2; shiftby_front = shiftby2; mat_front = mat2; mat_behind = mat1; } return true; } void geom_epsilon::eff_chi1inv_row(meep::component c, double chi1inv_row[3], const meep::volume &v, double tol, int maxeval) { const geometric_object *o; material_type mat, mat_behind; symmetric_matrix meps, meps_inv; vector3 p, shiftby, normal; bool destroy_material = false; if (maxeval == 0 || !get_front_object(v, geometry_tree, p, &o, shiftby, mat, mat_behind)) { noavg: destroy_material = get_material_pt(mat, v.center()); trivial: material_epsmu(meep::type(c), mat, &meps, &meps_inv); switch (component_direction(c)) { case meep::X: case meep::R: chi1inv_row[0] = meps_inv.m00; chi1inv_row[1] = meps_inv.m01; chi1inv_row[2] = meps_inv.m02; break; case meep::Y: case meep::P: chi1inv_row[0] = meps_inv.m01; chi1inv_row[1] = meps_inv.m11; chi1inv_row[2] = meps_inv.m12; break; case meep::Z: chi1inv_row[0] = meps_inv.m02; chi1inv_row[1] = meps_inv.m12; chi1inv_row[2] = meps_inv.m22; break; case meep::NO_DIRECTION: chi1inv_row[0] = chi1inv_row[1] = chi1inv_row[2] = 0; } if (destroy_material) material_type_destroy(mat); return; } // FIXME: reimplement support for fallback integration, without // messing up anisotropic support // if (!get_front_object(v, geometry_tree, // p, &o, shiftby, mat, mat_behind)) { // fallback_chi1inv_row(c, chi1inv_row, v, tol, maxeval); // return; // } /* check for trivial case of only one object/material */ if (material_type_equal(&mat, &mat_behind)) goto trivial; // it doesn't make sense to average metals (electric or magnetic) if (is_metal(meep::type(c), &mat) || is_metal(meep::type(c), &mat_behind)) goto noavg; normal = unit_vector3(normal_to_fixed_object(vector3_minus(p, shiftby), *o)); geom_box pixel = gv2box(v); pixel.low = vector3_minus(pixel.low, shiftby); pixel.high = vector3_minus(pixel.high, shiftby); double fill = box_overlap_with_object(pixel, *o, tol, maxeval); material_epsmu(meep::type(c), mat, &meps, &meps_inv); symmetric_matrix eps2, epsinv2; symmetric_matrix eps1, delta; double Rot[3][3]; material_epsmu(meep::type(c), mat_behind, &eps2, &epsinv2); eps1 = meps; Rot[0][0] = normal.x; Rot[1][0] = normal.y; Rot[2][0] = normal.z; if (fabs(normal.x) > 1e-2 || fabs(normal.y) > 1e-2) { Rot[0][2] = normal.y; Rot[1][2] = -normal.x; Rot[2][2] = 0; } else { /* n is not parallel to z direction, use (x x n) instead */ Rot[0][2] = 0; Rot[1][2] = -normal.z; Rot[2][2] = normal.y; } { /* normalize second column */ double s = Rot[0][2]*Rot[0][2]+Rot[1][2]*Rot[1][2]+Rot[2][2]*Rot[2][2]; s = 1.0 / sqrt(s); Rot[0][2] *= s; Rot[1][2] *= s; Rot[2][2] *= s; } /* 1st column is 2nd column x 0th column */ Rot[0][1] = Rot[1][2] * Rot[2][0] - Rot[2][2] * Rot[1][0]; Rot[1][1] = Rot[2][2] * Rot[0][0] - Rot[0][2] * Rot[2][0]; Rot[2][1] = Rot[0][2] * Rot[1][0] - Rot[1][2] * Rot[0][0]; /* rotate epsilon tensors to surface parallel/perpendicular axes */ sym_matrix_rotate(&eps1, &eps1, Rot); sym_matrix_rotate(&eps2, &eps2, Rot); #define AVG (fill * (EXPR(eps1)) + (1-fill) * (EXPR(eps2))) #define SQR(x) ((x) * (x)) #define EXPR(eps) (-1 / eps.m00) delta.m00 = AVG; #undef EXPR #define EXPR(eps) (eps.m11 - SQR(eps.m01) / eps.m00) delta.m11 = AVG; #undef EXPR #define EXPR(eps) (eps.m22 - SQR(eps.m02) / eps.m00) delta.m22 = AVG; #undef EXPR #define EXPR(eps) (eps.m01 / eps.m00) delta.m01 = AVG; #undef EXPR #define EXPR(eps) (eps.m02 / eps.m00) delta.m02 = AVG; #undef EXPR #define EXPR(eps) (eps.m12 - eps.m02 * eps.m01 / eps.m00) delta.m12 = AVG; #undef EXPR meps.m00 = -1/delta.m00; meps.m11 = delta.m11 - SQR(delta.m01) / delta.m00; meps.m22 = delta.m22 - SQR(delta.m02) / delta.m00; meps.m01 = -delta.m01/delta.m00; meps.m02 = -delta.m02/delta.m00; meps.m12 = delta.m12 - (delta.m02 * delta.m01) / delta.m00; #undef SQR #define SWAP(a,b) { double xxx = a; a = b; b = xxx; } /* invert rotation matrix = transpose */ SWAP(Rot[0][1], Rot[1][0]); SWAP(Rot[0][2], Rot[2][0]); SWAP(Rot[2][1], Rot[1][2]); sym_matrix_rotate(&meps, &meps, Rot); /* rotate back */ #undef SWAP # ifdef DEBUG if(!sym_matrix_positive_definite(&meps)) meep::abort("negative mean epsilon from Kottke algorithm"); # endif sym_matrix_invert(&meps_inv, &meps); switch (component_direction(c)) { case meep::X: case meep::R: chi1inv_row[0] = meps_inv.m00; chi1inv_row[1] = meps_inv.m01; chi1inv_row[2] = meps_inv.m02; break; case meep::Y: case meep::P: chi1inv_row[0] = meps_inv.m01; chi1inv_row[1] = meps_inv.m11; chi1inv_row[2] = meps_inv.m12; break; case meep::Z: chi1inv_row[0] = meps_inv.m02; chi1inv_row[1] = meps_inv.m12; chi1inv_row[2] = meps_inv.m22; break; case meep::NO_DIRECTION: chi1inv_row[0] = chi1inv_row[1] = chi1inv_row[2] = 0; } } static int eps_ever_negative = 0; static meep::field_type func_ft = meep::E_stuff; #ifdef CTL_HAS_COMPLEX_INTEGRATION static cnumber ceps_func(int n, number *x, void *geomeps_) { geom_epsilon *geomeps = (geom_epsilon *) geomeps_; vector3 p = {0,0,0}; p.x = x[0]; p.y = n > 1 ? x[1] : 0; p.z = n > 2 ? x[2] : 0; double s = 1; if (dim == meep::Dcyl) { double py = p.y; p.y = p.z; p.z = py; s = p.x; } cnumber ret; double ep = geomeps->chi1p1(func_ft, vector3_to_vec(p)); if (ep < 0) eps_ever_negative = 1; ret.re = ep * s; ret.im = s / ep; return ret; } #else static number eps_func(int n, number *x, void *geomeps_) { geom_epsilon *geomeps = (geom_epsilon *) geomeps_; vector3 p = {0,0,0}; double s = 1; p.x = x[0]; p.y = n > 1 ? x[1] : 0; p.z = n > 2 ? x[2] : 0; if (dim == meep::Dcyl) { double py = p.y; p.y = p.z; p.z = py; s = p.x; } double ep = geomeps->chi1p1(func_ft, vector3_to_vec(p)); if (ep < 0) eps_ever_negative = 1; return ep * s; } static number inveps_func(int n, number *x, void *geomeps_) { geom_epsilon *geomeps = (geom_epsilon *) geomeps_; vector3 p = {0,0,0}; double s = 1; p.x = x[0]; p.y = n > 1 ? x[1] : 0; p.z = n > 2 ? x[2] : 0; if (dim == meep::Dcyl) { double py = p.y; p.y = p.z; p.z = py; s = p.x; } double ep = geomeps->chi1p1(func_ft, vector3_to_vec(p)); if (ep < 0) eps_ever_negative = 1; return s / ep; } #endif // fallback meaneps using libctl's adaptive cubature routine void geom_epsilon::fallback_chi1inv_row(meep::component c, double chi1inv_row[3], const meep::volume &v, double tol, int maxeval) { symmetric_matrix chi1p1, chi1p1_inv; material_type material; bool destroy_material = get_material_pt(material, v.center()); material_epsmu(meep::type(c), material, &chi1p1, &chi1p1_inv); if (destroy_material) material_type_destroy(material); if (chi1p1.m01 != 0 || chi1p1.m02 != 0 || chi1p1.m12 != 0 || chi1p1.m00 != chi1p1.m11 || chi1p1.m11 != chi1p1.m22 || chi1p1.m00 != chi1p1.m22) { int rownum = meep::component_direction(c) % 3; if (rownum == 0) { chi1inv_row[0] = chi1p1.m00; chi1inv_row[1] = chi1p1.m01; chi1inv_row[2] = chi1p1.m02; } else if (rownum == 1) { chi1inv_row[0] = chi1p1.m01; chi1inv_row[1] = chi1p1.m11; chi1inv_row[2] = chi1p1.m12; } else { chi1inv_row[0] = chi1p1.m02; chi1inv_row[1] = chi1p1.m12; chi1inv_row[2] = chi1p1.m22; } return; } number esterr; integer errflag, n; number xmin[3], xmax[3]; vector3 gvmin, gvmax; gvmin = vec_to_vector3(v.get_min_corner()); gvmax = vec_to_vector3(v.get_max_corner()); xmin[0] = gvmin.x; xmax[0] = gvmax.x; if (dim == meep::Dcyl) { xmin[1] = gvmin.z; xmin[2] = gvmin.y; xmax[1] = gvmax.z; xmax[2] = gvmax.y; } else{ xmin[1] = gvmin.y; xmin[2] = gvmin.z; xmax[1] = gvmax.y; xmax[2] = gvmax.z; } if (xmin[2] == xmax[2]) n = xmin[1] == xmax[1] ? 1 : 2; else n = 3; double vol = 1; for (int i = 0; i < n; ++i) vol *= xmax[i] - xmin[i]; if (dim == meep::Dcyl) vol *= (xmin[0] + xmax[0]) * 0.5; eps_ever_negative = 0; func_ft = meep::type(c); double meps, minveps; #ifdef CTL_HAS_COMPLEX_INTEGRATION cnumber ret = cadaptive_integration(ceps_func, xmin, xmax, n, (void*) this, 0, tol, maxeval, &esterr, &errflag); meps = ret.re / vol; minveps = ret.im / vol; #else meps = adaptive_integration(eps_func, xmin, xmax, n, (void*) this, 0, tol, maxeval, &esterr, &errflag) / vol; minveps = adaptive_integration(inveps_func, xmin, xmax, n, (void*) this, 0, tol, maxeval, &esterr, &errflag) / vol; #endif if (eps_ever_negative) // averaging negative eps causes instability minveps = 1.0 / (meps = eps(v.center())); { meep::vec gradient(normal_vector(meep::type(c), v)); double n[3] = {0,0,0}; double nabsinv = 1.0/meep::abs(gradient); LOOP_OVER_DIRECTIONS(gradient.dim, k) n[k%3] = gradient.in_direction(k) * nabsinv; int rownum = meep::component_direction(c) % 3; for (int i=0; i<3; ++i) chi1inv_row[i] = n[rownum] * n[i] * (minveps - 1/meps); chi1inv_row[rownum] += 1/meps; } } static double get_chi3(meep::component c, const medium *m) { switch (c) { case meep::Er: case meep::Ex: return m->E_chi3_diag.x; case meep::Ep: case meep::Ey: return m->E_chi3_diag.y; case meep::Ez: return m->E_chi3_diag.z; case meep::Hr: case meep::Hx: return m->H_chi3_diag.x; case meep::Hp: case meep::Hy: return m->H_chi3_diag.y; case meep::Hz: return m->H_chi3_diag.z; default: return 0; } } bool geom_epsilon::has_chi3(meep::component c) { for (int i = 0; i < geometry.num_items; ++i) { if (geometry.items[i].material.which_subclass == MTS::MEDIUM) { if (get_chi3(c, geometry.items[i].material.subclass.medium_data) != 0) return true; } } for (int i = 0; i < extra_materials.num_items; ++i) if (extra_materials.items[i].which_subclass == MTS::MEDIUM) if (get_chi3(c, extra_materials.items[i].subclass.medium_data) != 0) return true; return (default_material.which_subclass == MTS::MEDIUM && get_chi3(c, default_material.subclass.medium_data) != 0); } double geom_epsilon::chi3(meep::component c, const meep::vec &r) { material_type material; bool destroy_material = get_material_pt(material, r); double chi3_val; switch (material.which_subclass) { case MTS::MEDIUM: chi3_val = get_chi3(c, material.subclass.medium_data); break; default: chi3_val = 0; } if (destroy_material) material_type_destroy(material); return chi3_val; } static double get_chi2(meep::component c, const medium *m) { switch (c) { case meep::Er: case meep::Ex: return m->E_chi2_diag.x; case meep::Ep: case meep::Ey: return m->E_chi2_diag.y; case meep::Ez: return m->E_chi2_diag.z; case meep::Hr: case meep::Hx: return m->H_chi2_diag.x; case meep::Hp: case meep::Hy: return m->H_chi2_diag.y; case meep::Hz: return m->H_chi2_diag.z; default: return 0; } } bool geom_epsilon::has_chi2(meep::component c) { for (int i = 0; i < geometry.num_items; ++i) { if (geometry.items[i].material.which_subclass == MTS::MEDIUM) { if (get_chi2(c, geometry.items[i].material.subclass.medium_data) != 0) return true; } } for (int i = 0; i < extra_materials.num_items; ++i) if (extra_materials.items[i].which_subclass == MTS::MEDIUM) if (get_chi2(c, extra_materials.items[i].subclass.medium_data) != 0) return true; return (default_material.which_subclass == MTS::MEDIUM && get_chi2(c, default_material.subclass.medium_data) != 0); } double geom_epsilon::chi2(meep::component c, const meep::vec &r) { material_type material; bool destroy_material = get_material_pt(material, r); double chi2_val; switch (material.which_subclass) { case MTS::MEDIUM: chi2_val = get_chi2(c, material.subclass.medium_data); break; default: chi2_val = 0; } if (destroy_material) material_type_destroy(material); return chi2_val; } static bool mu_not_1(material_type &m) { return (m.which_subclass == MTS::MEDIUM && (m.subclass.medium_data->mu_diag.x != 1 || m.subclass.medium_data->mu_diag.y != 1 || m.subclass.medium_data->mu_diag.z != 1 || m.subclass.medium_data->mu_offdiag.x != 0 || m.subclass.medium_data->mu_offdiag.y != 0 || m.subclass.medium_data->mu_offdiag.z != 0)); } bool geom_epsilon::has_mu() { for (int i = 0; i < geometry.num_items; ++i) { if (mu_not_1(geometry.items[i].material)) return true; } for (int i = 0; i < extra_materials.num_items; ++i) if (mu_not_1(extra_materials.items[i])) return true; return (mu_not_1(default_material)); } /* a global scalar conductivity to add to all materials; this is mostly for the convenience of Casimir calculations where the global conductivity corresponds to a rotation to complex frequencies */ static double global_D_conductivity = 0, global_B_conductivity = 0; static double get_cnd(meep::component c, const medium *m) { switch (c) { case meep::Dr: case meep::Dx: return m->D_conductivity_diag.x + global_D_conductivity; case meep::Dp: case meep::Dy: return m->D_conductivity_diag.y + global_D_conductivity; case meep::Dz: return m->D_conductivity_diag.z + global_D_conductivity; case meep::Br: case meep::Bx: return m->B_conductivity_diag.x + global_B_conductivity; case meep::Bp: case meep::By: return m->B_conductivity_diag.y + global_B_conductivity; case meep::Bz: return m->B_conductivity_diag.z + global_B_conductivity; default: return 0; } } bool geom_epsilon::has_conductivity(meep::component c) { for (int i = 0; i < geometry.num_items; ++i) { if (geometry.items[i].material.which_subclass == MTS::MEDIUM) { if (get_cnd(c, geometry.items[i].material.subclass.medium_data) != 0) return true; } } for (int i = 0; i < extra_materials.num_items; ++i) if (extra_materials.items[i].which_subclass == MTS::MEDIUM) if (get_cnd(c, extra_materials.items[i].subclass.medium_data) != 0) return true; return (default_material.which_subclass == MTS::MEDIUM && get_cnd(c, default_material.subclass.medium_data) != 0); } double geom_epsilon::conductivity(meep::component c, const meep::vec &r) { material_type material; bool destroy_material = get_material_pt(material, r); double cond_val; switch (material.which_subclass) { case MTS::MEDIUM: cond_val = get_cnd(c, material.subclass.medium_data); break; default: cond_val = 0; } if (destroy_material) material_type_destroy(material); return cond_val; } void geom_epsilon::sigma_row(meep::component c, double sigrow[3], const meep::vec &r) { vector3 p = vec_to_vector3(r); boolean inobject; material_type material = material_of_unshifted_point_in_tree_inobject(p, restricted_tree, &inobject); int destroy_material = 0; if (material.which_subclass == MTS::MATERIAL_TYPE_SELF) { material = default_material; } if (material.which_subclass == MTS::MATERIAL_FUNCTION) { material = eval_material_func(material.subclass. material_function_data->material_func, p); destroy_material = 1; } sigrow[0] = sigrow[1] = sigrow[2] = 0.0; if (material.which_subclass == MTS::MEDIUM) { polarizability_list plist = pol_ft == meep::E_stuff ? material.subclass.medium_data->E_polarizations : material.subclass.medium_data->H_polarizations; for (int j = 0; j < plist.num_items; ++j) if (plist.items[j].omega == omega && plist.items[j].gamma == gamma) { int ic = meep::component_index(c); sigrow[ic] = (ic == 0 ? plist.items[j].sigma_diag.x : (ic == 1 ? plist.items[j].sigma_diag.y : plist.items[j].sigma_diag.z)); break; } } if (destroy_material) material_type_destroy(material); } struct pol { double omega, gamma; struct pol *next; }; // add a polarization to the list if it is not already there static pol *add_pol(pol *pols, double omega, double gamma) { struct pol *p = pols; while (p && !(p->omega == omega && p->gamma == gamma)) p = p->next; if (!p) { p = new pol; p->omega = omega; p->gamma = gamma; p->next = pols; pols = p; } return pols; } static pol *add_pols(pol *pols, const polarizability_list plist) { for (int j = 0; j < plist.num_items; ++j) { pols = add_pol(pols, plist.items[j].omega, plist.items[j].gamma); } return pols; } void geom_epsilon::add_polarizabilities(meep::structure *s) { add_polarizabilities(meep::E_stuff, s); add_polarizabilities(meep::H_stuff, s); } void geom_epsilon::add_polarizabilities(meep::field_type ft, meep::structure *s) { pol *pols = 0; // construct a list of the unique polarizabilities in the geometry: for (int i = 0; i < geometry.num_items; ++i) { if (geometry.items[i].material.which_subclass == MTS::MEDIUM) pols = add_pols(pols, ft == meep::E_stuff ? geometry.items[i].material .subclass.medium_data->E_polarizations : geometry.items[i].material .subclass.medium_data->H_polarizations); } for (int i = 0; i < extra_materials.num_items; ++i) if (extra_materials.items[i].which_subclass == MTS::MEDIUM) pols = add_pols(pols, ft == meep::E_stuff ? extra_materials.items[i] .subclass.medium_data->E_polarizations : extra_materials.items[i] .subclass.medium_data->H_polarizations); if (default_material.which_subclass == MTS::MEDIUM) pols = add_pols(pols, ft == meep::E_stuff ? default_material.subclass.medium_data->E_polarizations : default_material.subclass.medium_data->H_polarizations); for (struct pol *p = pols; p; p = p->next) { master_printf("polarizability: omega=%g, gamma=%g\n", p->omega, p->gamma); s->add_polarizability(*this, ft, p->omega, p->gamma); } while (pols) { struct pol *p = pols; pols = pols->next; delete p; } } /***********************************************************************/ // wrapper around Scheme function for PML profile static double scm_pml_profile(double u, void *f_) { SCM f = (SCM) f_; return ctl_convert_number_to_c(gh_call1(f, ctl_convert_number_to_scm(u))); } // for passing to multidimensional integration routine static double scm_pml_profile2(int dim, double *u, void *f_) { SCM f = (SCM) f_; (void) dim; return ctl_convert_number_to_c(gh_call1(f, ctl_convert_number_to_scm(*u))); } meep::structure *make_structure(int dims, vector3 size, vector3 center, double resolution, bool enable_averaging, double subpixel_tol, int subpixel_maxeval, bool ensure_periodicity_p, geometric_object_list geometry, material_type_list extra_materials, material_type default_mat, pml_list pml_layers, symmetry_list symmetries, int num_chunks, double Courant, double global_D_conductivity_, double global_B_conductivity_) { master_printf("-----------\nInitializing structure...\n"); // only cartesian lattices are currently allowed geom_initialize(); geometry_center = center; global_D_conductivity = global_D_conductivity_; global_B_conductivity = global_B_conductivity_; number no_size = 2.0 / ctl_get_number("infinity"); if (size.x <= no_size) size.x = 0.0; if (size.y <= no_size) size.y = 0.0; if (size.z <= no_size) size.z = 0.0; set_dimensions(dims); geometry_lattice.size = size; master_printf("Working in %s dimensions.\n", meep::dimension_name(dim)); master_printf("Computational cell is %g x %g x %g with resolution %g\n", size.x, size.y, size.z, resolution); meep::grid_volume gv; switch (dims) { case 0: case 1: gv = meep::vol1d(size.z, resolution); break; case 2: gv = meep::vol2d(size.x, size.y, resolution); break; case 3: gv = meep::vol3d(size.x, size.y, size.z, resolution); break; case CYLINDRICAL: gv = meep::volcyl(size.x, size.z, resolution); break; default: CK(0, "unsupported dimensionality"); } gv.center_origin(); gv.shift_origin(vector3_to_vec(center)); meep::symmetry S; for (int i = 0; i < symmetries.num_items; ++i) switch (symmetries.items[i].which_subclass) { case symmetry::SYMMETRY_SELF: break; // identity case symmetry::MIRROR_SYM: S = S + meep::mirror(meep::direction(symmetries.items[i].direction), gv) * complex(symmetries.items[i].phase.re, symmetries.items[i].phase.im); break; case symmetry::ROTATE2_SYM: S = S + meep::rotate2(meep::direction(symmetries.items[i].direction), gv) * complex(symmetries.items[i].phase.re, symmetries.items[i].phase.im); break; case symmetry::ROTATE4_SYM: S = S + meep::rotate4(meep::direction(symmetries.items[i].direction), gv) * complex(symmetries.items[i].phase.re, symmetries.items[i].phase.im); break; } meep::boundary_region br; for (int i = 0; i < pml_layers.num_items; ++i) { double umin = 0, umax = 1, esterr; int errflag; using namespace meep; if (pml_layers.items[i].direction == -1) { LOOP_OVER_DIRECTIONS(gv.dim, d) { if (pml_layers.items[i].side == -1) { FOR_SIDES(b) br = br + meep::boundary_region (meep::boundary_region::PML, pml_layers.items[i].thickness, pow(pml_layers.items[i].R_asymptotic, pml_layers.items[i].strength), scm_pml_profile, pml_layers.items[i].pml_profile, adaptive_integration(scm_pml_profile2, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), d, b); } else br = br + meep::boundary_region (meep::boundary_region::PML, pml_layers.items[i].thickness, pow(pml_layers.items[i].R_asymptotic, pml_layers.items[i].strength), scm_pml_profile, pml_layers.items[i].pml_profile, adaptive_integration(scm_pml_profile2, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), d, (meep::boundary_side) pml_layers.items[i].side); } } else { if (pml_layers.items[i].side == -1) { FOR_SIDES(b) br = br + meep::boundary_region (meep::boundary_region::PML, pml_layers.items[i].thickness, pow(pml_layers.items[i].R_asymptotic, pml_layers.items[i].strength), scm_pml_profile, pml_layers.items[i].pml_profile, adaptive_integration(scm_pml_profile2, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), (meep::direction) pml_layers.items[i].direction, b); } else br = br + meep::boundary_region (meep::boundary_region::PML, pml_layers.items[i].thickness, pow(pml_layers.items[i].R_asymptotic, pml_layers.items[i].strength), scm_pml_profile, pml_layers.items[i].pml_profile, adaptive_integration(scm_pml_profile2, &umin, &umax, 1, (void*) pml_layers.items[i].pml_profile, 1e-9, 1e-4, 50000, &esterr, &errflag), (meep::direction) pml_layers.items[i].direction, (meep::boundary_side) pml_layers.items[i].side); } } ensure_periodicity = ensure_periodicity_p; default_material = default_mat; geom_epsilon geps(geometry, extra_materials, gv.pad().surroundings()); if (subpixel_maxeval < 0) subpixel_maxeval = 0; // no limit meep::structure *s = new meep::structure(gv, geps, br, S, num_chunks, Courant, enable_averaging, subpixel_tol, subpixel_maxeval); geps.add_polarizabilities(s); master_printf("-----------\n"); return s; } /*************************************************************************/ meep-openmpi-1.1.1/libctl/meep-enums.scm0000644000175200017520000000526611243672542017406 0ustar debiandebian; AUTOMATICALLY GENERATED -- DO NOT EDIT (define Incoming (meep-in-or-out-Incoming)) (define Outgoing (meep-in-or-out-Outgoing)) (define CONNECT-PHASE (meep-connect-phase-CONNECT-PHASE)) (define CONNECT-NEGATE (meep-connect-phase-CONNECT-NEGATE)) (define CONNECT-COPY (meep-connect-phase-CONNECT-COPY)) (define Periodic (meep-boundary-condition-Periodic)) (define Metallic (meep-boundary-condition-Metallic)) (define Magnetic (meep-boundary-condition-Magnetic)) (define None (meep-boundary-condition-None)) (define Connecting (meep-time-sink-Connecting)) (define Stepping (meep-time-sink-Stepping)) (define Boundaries (meep-time-sink-Boundaries)) (define MpiTime (meep-time-sink-MpiTime)) (define FieldOutput (meep-time-sink-FieldOutput)) (define FourierTransforming (meep-time-sink-FourierTransforming)) (define Other (meep-time-sink-Other)) (define XY (meep-grace-type-XY)) (define ERROR-BARS (meep-grace-type-ERROR-BARS)) (define Ex (meep-component-Ex)) (define Ey (meep-component-Ey)) (define Er (meep-component-Er)) (define Ep (meep-component-Ep)) (define Ez (meep-component-Ez)) (define Hx (meep-component-Hx)) (define Hy (meep-component-Hy)) (define Hr (meep-component-Hr)) (define Hp (meep-component-Hp)) (define Hz (meep-component-Hz)) (define Dx (meep-component-Dx)) (define Dy (meep-component-Dy)) (define Dr (meep-component-Dr)) (define Dp (meep-component-Dp)) (define Dz (meep-component-Dz)) (define Bx (meep-component-Bx)) (define By (meep-component-By)) (define Br (meep-component-Br)) (define Bp (meep-component-Bp)) (define Bz (meep-component-Bz)) (define Dielectric (meep-component-Dielectric)) (define Permeability (meep-component-Permeability)) (define Sx (meep-derived-component-Sx)) (define Sy (meep-derived-component-Sy)) (define Sr (meep-derived-component-Sr)) (define Sp (meep-derived-component-Sp)) (define Sz (meep-derived-component-Sz)) (define EnergyDensity (meep-derived-component-EnergyDensity)) (define D-EnergyDensity (meep-derived-component-D-EnergyDensity)) (define H-EnergyDensity (meep-derived-component-H-EnergyDensity)) (define D1 (meep-ndim-D1)) (define D2 (meep-ndim-D2)) (define D3 (meep-ndim-D3)) (define Dcyl (meep-ndim-Dcyl)) (define E-stuff (meep-field-type-E-stuff)) (define H-stuff (meep-field-type-H-stuff)) (define D-stuff (meep-field-type-D-stuff)) (define B-stuff (meep-field-type-B-stuff)) (define PE-stuff (meep-field-type-PE-stuff)) (define PH-stuff (meep-field-type-PH-stuff)) (define High (meep-boundary-side-High)) (define Low (meep-boundary-side-Low)) (define X (meep-direction-X)) (define Y (meep-direction-Y)) (define Z (meep-direction-Z)) (define R (meep-direction-R)) (define P (meep-direction-P)) (define NO-DIRECTION (meep-direction-NO-DIRECTION)) (define Centered Dielectric) meep-openmpi-1.1.1/libctl/meep_swig_bug_workaround.i0000644000175200017520000000052311243155661022055 0ustar debiandebian// AUTOMATICALLY GENERATED -- DO NOT EDIT %ignore identity; %ignore iveccyl; %ignore mirror; %ignore one_ivec; %ignore one_vec; %ignore rotate2; %ignore rotate4; %ignore r_to_minus_r_symmetry; %ignore veccyl; %ignore vol1d; %ignore vol2d; %ignore vol3d; %ignore volcyl; %ignore volone; %ignore voltwo; %ignore zero_ivec; %ignore zero_vec; meep-openmpi-1.1.1/libctl/meep.i0000644000175200017520000001474711224763300015723 0ustar debiandebian// -*- C++ -*- %module meep %{ #include "meep-ctl.hpp" static inline int SwigComplex_Check(SCM o) { return SCM_REALP(o) || SCM_COMPLEXP(o); } static inline int SwigVector3_Check(SCM o) { return SCM_VECTORP(o) && SCM_VECTOR_LENGTH(o) == 3; } /* Unfortunately, this is not re-entrant. Damn dynamic scoping. Hopefully, it should be good enough for our purposes. */ static SCM my_complex_func_scm; static inline complex my_complex_func(meep::vec const &v) { SCM ret = gh_call1(my_complex_func_scm, ctl_convert_vector3_to_scm(vec_to_vector3(v))); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } static inline complex my_complex_func2(double t, void *f) { SCM ret = gh_call1((SCM) f, gh_double2scm(t)); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } typedef struct { SCM func; int nf; } my_field_func_data; static inline complex my_field_func(const complex *fields, const meep::vec &loc, void *data_) { my_field_func_data *data = (my_field_func_data *) data_; int num_items = data->nf; cnumber *items = new cnumber[num_items]; for (int i = 0; i < num_items; ++i) items[i] = make_cnumber(real(fields[i]), imag(fields[i])); SCM ret = gh_apply(data->func, scm_cons(ctl_convert_vector3_to_scm(vec_to_vector3(loc)), make_cnumber_list(num_items, items))); delete[] items; cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } /* Unfortunately, this is not re-entrant. Damn dynamic scoping. Hopefully, it should be good enough for our purposes. */ static SCM my_complex_func3_scm; static inline complex my_complex_func3(complex x) { cnumber cx; cx.re = real(x); cx.im = imag(x); SCM ret = gh_call1(my_complex_func3_scm, ctl_convert_cnumber_to_scm(cx)); cnumber cret = ctl_convert_cnumber_to_c(ret); return std::complex(cret.re, cret.im); } %} %typecheck(SWIG_TYPECHECK_COMPLEX) complex { $1 = SwigComplex_Check($input); } %typemap(guile,out) complex, complex, std::complex { $result = scm_make_rectangular(gh_double2scm($1.real()), gh_double2scm($1.imag())); } %typemap(guile,in) complex, complex, std::complex { cnumber cnum = ctl_convert_cnumber_to_c($input); $1 = std::complex(cnum.re, cnum.im); } %typemap(guile,in) complex(*)(meep::vec const &) { my_complex_func_scm = $input; $1 = my_complex_func; } %typecheck(SWIG_TYPECHECK_POINTER) complex(*)(meep::vec const &) { $1 = SCM_NFALSEP(scm_procedure_p($input)); } %typemap(guile,in) complex(*)(complex) { my_complex_func3_scm = $input; $1 = my_complex_func3; } %typecheck(SWIG_TYPECHECK_POINTER) complex(*)(complex) { $1 = SCM_NFALSEP(scm_procedure_p($input)); } %typemap(guile,in) (complex (*func)(double t, void *), void *data) { $1 = my_complex_func2; $2 = (void *) $input; // input is SCM pointer to Scheme function } %typecheck(SWIG_TYPECHECK_POINTER) (complex (*func)(double t, void *), void *data) { $1 = SCM_NFALSEP(scm_procedure_p($input)); } %typemap(guile,in) meep::vec { $1 = vector3_to_vec(ctl_convert_vector3_to_c($input)); } %typemap(guile,out) meep::vec { $result = ctl_convert_vector3_to_scm(vec_to_vector3($1)); } %typemap(guile,in) meep::vec const & %{ meep::vec vec__$1 = vector3_to_vec(ctl_convert_vector3_to_c($input)); $1 = &vec__$1; %} %typecheck(SWIG_TYPECHECK_COMPLEX) meep::vec, meep::vec const & { $1 = SwigVector3_Check($input); } /* field_function arguments are passed as a cons pair of (components . func) in order to set all four arguments at once. */ %typemap(guile,in) (int num_fields, const meep::component *components, meep::field_function fun, void *fun_data_) (my_field_func_data data) { $1 = list_length(gh_car($input)); $2 = new meep::component[$1]; for (int i = 0; i < $1; ++i) $2[i] = meep::component(integer_list_ref(gh_car($input), i)); data.nf = $1; data.func = gh_cdr($input); $3 = my_field_func; $4 = &data; } %typemap(freearg) (int num_fields, const meep::component *components, meep::field_function fun, void *fun_data_) { if ($2) delete[] $2; } %typecheck(SWIG_TYPECHECK_POINTER) (int num_fields, const meep::component *components, meep::field_function fun, void *fun_data_) { $1 = SCM_NFALSEP(scm_pair_p($input)) && SCM_NFALSEP(scm_list_p(gh_car($input))) && SCM_NFALSEP(scm_procedure_p(gh_cdr($input))); } /* integrate2 arguments are passed as a cons pair of ((components1 . components2) . func) in order to set all six arguments at once. */ %typemap(guile,in) (int num_fields1, const meep::component *components1, int num_fields2, const meep::component *components2, meep::field_function integrand, void *integrand_data_) (my_field_func_data data) { $1 = list_length(gh_car(gh_car($input))); $2 = new meep::component[$1]; for (int i = 0; i < $1; ++i) $2[i] = meep::component(integer_list_ref(gh_car(gh_car($input)), i)); $3 = list_length(gh_cdr(gh_car($input))); $4 = new meep::component[$3]; for (int i = 0; i < $3; ++i) $4[i] = meep::component(integer_list_ref(gh_cdr(gh_car($input)), i)); data.nf = $1 + $3; data.func = gh_cdr($input); $5 = my_field_func; $6 = &data; } %typemap(freearg) (int num_fields1, const meep::component *components1, int num_fields2, const meep::component *components2, meep::field_function integrand, void *integrand_data_) (my_field_func_data data) { if ($2) delete[] $2; if ($4) delete[] $4; } %typecheck(SWIG_TYPECHECK_POINTER) (int num_fields1, const meep::component *components1, int num_fields2, const meep::component *components2, meep::field_function integrand, void *integrand_data_) (my_field_func_data data) { $1 = SCM_NFALSEP(scm_pair_p($input)) && SCM_NFALSEP(scm_pair_p(gh_car($input))) && SCM_NFALSEP(scm_list_p(gh_car(gh_car($input)))) && SCM_NFALSEP(scm_list_p(gh_cdr(gh_car($input)))) && SCM_NFALSEP(scm_procedure_p(gh_cdr($input))); } // Need to tell SWIG about any method that returns a new object // which needs to be garbage-collected. %newobject meep::fields::open_h5file; %newobject *::clone; %newobject meep::dft_flux::flux; %include "meep_renames.i" %include "meep_enum_renames.i" %include "meep_op_renames.i" %include "meep_swig_bug_workaround.i" %include "meep/vec.hpp" %include "meep/mympi.hpp" %include "meep.hpp" %include "ctl-io.i" %{ #include "meep-ctl-swig.hpp" %} %include "meep-ctl-swig.hpp" meep-openmpi-1.1.1/libctl/meep_op_renames.i0000644000175200017520000000120311173421136020113 0ustar debiandebian// operators must be explicitly renamed for SWIG to work %rename(meep_symmetry_add) meep::symmetry::operator+; %rename(meep_symmetry_mul) meep::symmetry::operator*; %rename(meep_symmetry_sub) meep::symmetry::operator-; %rename(meep_symmetry_negate) meep::symmetry::operator-(); %rename(meep_symmetry_eq) meep::symmetry::operator==; %rename(meep_symmetry_neq) meep::symmetry::operator!=; %rename(meep_boundary_region_add) meep::boundary_region::operator+; %rename(meep_boundary_region_mul) meep::boundary_region::operator*; %rename(meep_dft_chunk_subeq) meep::dft_chunk::operator-=; %rename(meep_dft_flux_subeq) meep::dft_flux::operator-=; meep-openmpi-1.1.1/libctl/meep_enum_renames.i0000644000175200017520000000574411243155661020464 0ustar debiandebian// AUTOMATICALLY GENERATED -- DO NOT EDIT %rename(meep_in_or_out_Incoming) meep::Incoming; %rename(meep_in_or_out_Outgoing) meep::Outgoing; %rename(meep_connect_phase_CONNECT_PHASE) meep::CONNECT_PHASE; %rename(meep_connect_phase_CONNECT_NEGATE) meep::CONNECT_NEGATE; %rename(meep_connect_phase_CONNECT_COPY) meep::CONNECT_COPY; %rename(meep_boundary_condition_Periodic) meep::Periodic; %rename(meep_boundary_condition_Metallic) meep::Metallic; %rename(meep_boundary_condition_Magnetic) meep::Magnetic; %rename(meep_boundary_condition_None) meep::None; %rename(meep_time_sink_Connecting) meep::Connecting; %rename(meep_time_sink_Stepping) meep::Stepping; %rename(meep_time_sink_Boundaries) meep::Boundaries; %rename(meep_time_sink_MpiTime) meep::MpiTime; %rename(meep_time_sink_FieldOutput) meep::FieldOutput; %rename(meep_time_sink_FourierTransforming) meep::FourierTransforming; %rename(meep_time_sink_Other) meep::Other; %rename(meep_grace_type_XY) meep::XY; %rename(meep_grace_type_ERROR_BARS) meep::ERROR_BARS; %rename(meep_component_Ex) meep::Ex; %rename(meep_component_Ey) meep::Ey; %rename(meep_component_Er) meep::Er; %rename(meep_component_Ep) meep::Ep; %rename(meep_component_Ez) meep::Ez; %rename(meep_component_Hx) meep::Hx; %rename(meep_component_Hy) meep::Hy; %rename(meep_component_Hr) meep::Hr; %rename(meep_component_Hp) meep::Hp; %rename(meep_component_Hz) meep::Hz; %rename(meep_component_Dx) meep::Dx; %rename(meep_component_Dy) meep::Dy; %rename(meep_component_Dr) meep::Dr; %rename(meep_component_Dp) meep::Dp; %rename(meep_component_Dz) meep::Dz; %rename(meep_component_Bx) meep::Bx; %rename(meep_component_By) meep::By; %rename(meep_component_Br) meep::Br; %rename(meep_component_Bp) meep::Bp; %rename(meep_component_Bz) meep::Bz; %rename(meep_component_Dielectric) meep::Dielectric; %rename(meep_component_Permeability) meep::Permeability; %rename(meep_derived_component_Sx) meep::Sx; %rename(meep_derived_component_Sy) meep::Sy; %rename(meep_derived_component_Sr) meep::Sr; %rename(meep_derived_component_Sp) meep::Sp; %rename(meep_derived_component_Sz) meep::Sz; %rename(meep_derived_component_EnergyDensity) meep::EnergyDensity; %rename(meep_derived_component_D_EnergyDensity) meep::D_EnergyDensity; %rename(meep_derived_component_H_EnergyDensity) meep::H_EnergyDensity; %rename(meep_ndim_D1) meep::D1; %rename(meep_ndim_D2) meep::D2; %rename(meep_ndim_D3) meep::D3; %rename(meep_ndim_Dcyl) meep::Dcyl; %rename(meep_field_type_E_stuff) meep::E_stuff; %rename(meep_field_type_H_stuff) meep::H_stuff; %rename(meep_field_type_D_stuff) meep::D_stuff; %rename(meep_field_type_B_stuff) meep::B_stuff; %rename(meep_field_type_PE_stuff) meep::PE_stuff; %rename(meep_field_type_PH_stuff) meep::PH_stuff; %rename(meep_boundary_side_High) meep::High; %rename(meep_boundary_side_Low) meep::Low; %rename(meep_direction_X) meep::X; %rename(meep_direction_Y) meep::Y; %rename(meep_direction_Z) meep::Z; %rename(meep_direction_R) meep::R; %rename(meep_direction_P) meep::P; %rename(meep_direction_NO_DIRECTION) meep::NO_DIRECTION; meep-openmpi-1.1.1/libctl/Makefile.am0000644000175200017520000001145611243102567016654 0ustar debiandebianbin_PROGRAMS = meep@MEEP_SUFFIX@ EXTRA_DIST = meep.scm.in meep-enums.scm casimir.scm LIBMEEP = $(top_builddir)/src/libmeep@MEEP_SUFFIX@.la HDRS = meep-ctl.hpp meep-ctl-const.hpp meep-ctl-swig.hpp LIBHDRS = $(top_srcdir)/src/meep.hpp $(top_srcdir)/src/meep/vec.hpp $(top_srcdir)/src/meep/mympi.hpp CTLHDRS = $(LIBHDRS) $(srcdir)/meep-ctl.hpp $(top_builddir)/config.h $(srcdir)/meep-ctl-const.hpp ctl-io.h meep@MEEP_SUFFIX@_SOURCES = meep.cpp structure.cpp meep_wrap.cxx $(HDRS) meep.i meep_op_renames.i meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i nodist_meep@MEEP_SUFFIX@_SOURCES = main.cpp geom.cpp ctl-io.cpp ctl-io.h ctl-io.i meep@MEEP_SUFFIX@_LDADD = $(LIBMEEP) @LIBCTL_LIBS@ BUILT_SOURCES = $(nodist_meep_SOURCES) meep_renames.i meep_enum_renames.i meep_swig_bug_workaround.i meep-enums.scm meep_wrap.cxx # manual dependency hack to force the build order in certain cases # ... for some reason automake's automatic dependencies are not working here meep.o: meep.cpp meep-enums.scm $(CTLHDRS) structure.o: structure.cpp $(CTLHDRS) meep_wrap.o: meep_wrap.cxx $(srcdir)/meep-ctl-swig.hpp $(CTLHDRS) if WITH_LIBCTL if MAINTAINER_MODE meep_wrap.cxx: meep.i meep_op_renames.i meep_enum_renames.i meep_renames.i ctl-io.i meep-ctl-swig.hpp meep_swig_bug_workaround.i $(LIBHDRS) swig -I$(top_srcdir)/src -c++ -guile -o $@ meep.i else meep_wrap.cxx: echo "#error need --with-maintainer-mode to generate this file" 1>&2 exit 1 endif else meep_wrap.cxx: echo "#error need --with-libctl to generate this file" > $@ endif # workaround missing namespace prefix in swig meep_renames.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; sed 's/^ *class \+\([A-Za-z_0-9:]*\)\( *\| *:[^{]*\){.*$$/%rename(meep_\1) meep::\1;/' $(LIBHDRS) | grep "%rename" | sort -u; echo; grep -hv typedef $(LIBHDRS) | sed 's/\(inline\|const\|extern\|static\) \+//g' | sed 's/^[A-Za-z_0-9:<>]\+[* ]\+\([A-Za-z_0-9:]*\) *(.*$$/%rename(meep_\1) meep::\1;/' | grep "%rename" | sort -u; ) > $@ # work around bug in swig, where it doesn't prepend namespace to friend funcs meep_swig_bug_workaround.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; grep -h friend $(LIBHDRS) | sed 's/^ *friend \+[A-Za-z_0-9:<>]\+[* ]\+\([A-Za-z_0-9:]*\) *(.*$$/%ignore \1;/' | grep "%ignore" | sort -u;) > $@ meep_enum_renames.i: $(LIBHDRS) (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; for f in $(LIBHDRS); do egrep "^enum" $$f | sed 's/enum \+\([A-Za-z_0-9:]\+\).*$$/\1/g' | while read enum; do cat $$f | tr -d '\n' | sed 's/.*enum \+'$${enum}' *{\([^}]*\)}.*/\1/g' | sed 's/= *[0-9]\+//g' |tr -d ' \t' | tr ',' '\n' | sed 's/^.*$$/'"%rename(meep_$${enum}_\0) meep::\0;/g"; echo; done; done;) > $@ meep-enums.scm: meep_enum_renames.i (sed 's/%rename(\([A-Za-z0-9_]*\)) *\([A-Za-z0-9:_]*\);$$/(define \2 (\1))/' meep_enum_renames.i | sed 's/[A-Za-z0-9:_]*:://g' | sed 's/_/-/g' | sed 's,//,;,'; echo "(define Centered Dielectric)") > $@ ############################################################################## # stuff below is based on example Makefile.in included with libctl ############################################################################## # what is printed out when invoking your program with --version: VERSION_STRING = "Meep @VERSION@, Copyright (C) 2005-2009 Massachusetts Insitute of Technology." MY_DEFS = -DHAVE_CTL_HOOKS=1 -DHAVE_CTL_EXPORT_HOOK=1 PROGRAM_NAME = meep SPECIFICATION_FILE = $(PROGRAM_NAME).scm nodist_pkgdata_DATA = $(SPECIFICATION_FILE) meep-enums.scm casimir.scm ############################################################################## AM_CPPFLAGS = -I$(top_srcdir)/src $(MY_DEFS) $(CTL_DEFS) $(CTL_H_CPPFLAG) # libctl install. dir., e.g. /usr/local/share/libctl LIBCTL_DIR = @LIBCTL_DIR@ # gen-ctl-io program GEN_CTL_IO = @GEN_CTL_IO@ ############################################################################## CTL_DEFS = -DCTL_SCM='"'$(LIBCTL_DIR)/base/ctl.scm'"' \ -DINCLUDE_SCM='"'$(LIBCTL_DIR)/base/include.scm'"' \ -DSPEC_SCM='"'$(pkgdatadir)/$(SPECIFICATION_FILE)'"' \ -DVERSION_STRING='"'$(VERSION_STRING)'"' ############################################################################## ctl-io.cpp: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm ctl-io.h $(GEN_CTL_IO) --cxx --code -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) ctl-io.h: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm $(GEN_CTL_IO) --cxx --header -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) ctl-io.i: $(SPECIFICATION_FILE) $(LIBCTL_DIR)/utils/geom.scm $(GEN_CTL_IO) --cxx --swig -o $@ $(SPECIFICATION_FILE) $(LIBCTL_DIR) main.cpp: $(LIBCTL_DIR)/base/main.c ctl-io.h cp -f $(LIBCTL_DIR)/base/main.c $@ geom.cpp: $(LIBCTL_DIR)/utils/geom.c ctl-io.h cp -f $(LIBCTL_DIR)/utils/geom.c $@ clean-local: rm -f $(nodist_meep_SOURCES) meep-enums.scm ctl-io.* main.* geom.* maintainer-clean-local: rm -f $(BUILT_SOURCES) meep-openmpi-1.1.1/libctl/meep-ctl-swig.hpp0000644000175200017520000000272211243157007020001 0ustar debiandebian// -*- C++ -*- /* These are functions for the libctl front-end which are exported via SWIG. */ #ifndef MEEP_CTL_SWIG_HPP #define MEEP_CTL_SWIG_HPP 1 vector3 vec_to_vector3(const meep::vec &); meep::vec vector3_to_vec(const vector3 v3); void set_dimensions(int dims); meep::structure *make_structure(int dims, vector3 size, vector3 center, double resolution, bool enable_averaging, double subpixel_tol, int subpixel_maxeval, bool ensure_periodicity_p, ctlio::geometric_object_list geometry, ctlio::material_type_list extra_materials, ctlio::material_type default_mat, ctlio::pml_list pml_layers, ctlio::symmetry_list symmetries, int num_chunks, double Courant, double global_D_conductivity_diag_, double global_B_conductivity_diag_); ctlio::cvector3_list do_harminv(ctlio::cnumber_list vals, double dt, double fmin, double fmax, int maxbands); ctlio::number_list dft_flux_flux(meep::dft_flux *f); ctlio::number_list dft_force_force(meep::dft_force *f); ctlio::cnumber_list make_casimir_g(double T, double dt, double sigma, meep::field_type ft, complex (*eps_func)(complex omega) = 0, double Tfft = 0); ctlio::cnumber_list make_casimir_g_kz(double T, double dt, double sigma, meep::field_type ft); // wrapper around constructor to fool SWIG meep::volume_list *make_volume_list(const meep::volume &v, int c, complex weight, meep::volume_list *next); #endif // MEEP_CTL_SWIG_HPP meep-openmpi-1.1.1/libctl/meep-ctl.hpp0000644000175200017520000000057511243101206017024 0ustar debiandebian// -*- C++ -*- #ifndef MEEP_CTL_H #define MEEP_CTL_H #include "meep.hpp" #include "meep-ctl-const.hpp" #include "config.h" #include "ctl-io.h" #include "meep-ctl-swig.hpp" extern int verbose; // in main.c /***************************************************************************/ #define CK(ex, msg) \ (void)((ex) || (meep::abort(msg), 0)) #endif /* MEEP_CTL_H */ meep-openmpi-1.1.1/libctl/meep.cpp0000644000175200017520000000663211243354626016257 0ustar debiandebian#include "meep-ctl.hpp" using namespace meep; /**************************************************************************/ /* The following are hook functions called from main() when starting the program and just before exiting. */ static initialize *meep_init = 0; void ctl_start_hook(int *argc, char ***argv) { meep_init = new initialize(*argc, *argv); } void ctl_stop_hook(void) { delete meep_init; } extern "C" void SWIG_init(); void ctl_export_hook(void) { SWIG_init(); } /**************************************************************************/ ctlio::cvector3_list do_harminv(ctlio::cnumber_list vals, double dt, double fmin, double fmax, int maxbands) { complex *amp = new complex[maxbands]; double *freq_re = new double[maxbands]; double *freq_im = new double[maxbands]; double *freq_err = new double[maxbands]; maxbands = do_harminv(reinterpret_cast*>(vals.items), vals.num_items, dt, fmin, fmax, maxbands, amp, freq_re, freq_im, freq_err); ctlio::cvector3_list res; res.num_items = maxbands; res.items = new cvector3[maxbands]; for (int i = 0; i < maxbands; ++i) { res.items[i].x.re = freq_re[i]; res.items[i].x.im = freq_im[i]; res.items[i].y.re = real(amp[i]); res.items[i].y.im = imag(amp[i]); res.items[i].z.re = freq_err[i]; res.items[i].z.im = 0; } delete[] freq_err; delete[] freq_im; delete[] freq_re; delete[] amp; 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 Scheme. */ volume_list *make_volume_list(const volume &v, int c, complex weight, volume_list *next) { return new volume_list(v, c, weight, next); } /***************************************************************************/ ctlio::number_list dft_flux_flux(dft_flux *f) { ctlio::number_list res; res.num_items = f->Nfreq; res.items = f->flux(); return res; } ctlio::number_list dft_force_force(dft_force *f) { ctlio::number_list res; res.num_items = f->Nfreq; res.items = f->force(); return res; } /***************************************************************************/ ctlio::cnumber_list make_casimir_g(double T, double dt, double sigma, meep::field_type ft, complex (*eps_func)(complex omega), double Tfft) { ctlio::cnumber_list res; res.num_items = int(ceil(T / dt)); res.items = new cnumber[res.num_items]; complex *g = meep::make_casimir_gfunc(T, dt, sigma, ft, eps_func, Tfft); for (int i = 0; i < res.num_items; ++i) { res.items[i].re = real(g[i]); res.items[i].im = imag(g[i]); } delete[] g; return res; } ctlio::cnumber_list make_casimir_g_kz(double T, double dt, double sigma, meep::field_type ft) { ctlio::cnumber_list res; res.num_items = int(ceil(T / dt)); res.items = new cnumber[res.num_items]; complex *g = meep::make_casimir_gfunc_kz(T, dt, sigma, ft); for (int i = 0; i < res.num_items; ++i) { res.items[i].re = real(g[i]); res.items[i].im = imag(g[i]); } delete[] g; return res; } meep-openmpi-1.1.1/libctl/meep-ctl-const.hpp0000644000175200017520000000034711243101206020145 0ustar debiandebian// -*- C++ -*- /* Meep constants which must be the same in C and Scheme */ #define CYLINDRICAL -2 /* should be the same as meep::direction enum */ #define X_DIR 0 #define Y_DIR 1 #define Z_DIR 2 #define R_DIR 4 #define PHI_DIR 5 meep-openmpi-1.1.1/libctl/meep_renames.i0000644000175200017520000001253011243155661017427 0ustar debiandebian// AUTOMATICALLY GENERATED -- DO NOT EDIT %rename(meep_boundary_region) meep::boundary_region; %rename(meep_continuous_src_time) meep::continuous_src_time; %rename(meep_custom_src_time) meep::custom_src_time; %rename(meep_dft_chunk) meep::dft_chunk; %rename(meep_dft_flux) meep::dft_flux; %rename(meep_dft_force) meep::dft_force; %rename(meep_fields_chunk) meep::fields_chunk; %rename(meep_fields) meep::fields; %rename(meep_flux_vol) meep::flux_vol; %rename(meep_gaussian_src_time) meep::gaussian_src_time; %rename(meep_grace) meep::grace; %rename(meep_grid_volume) meep::grid_volume; %rename(meep_h5file) meep::h5file; %rename(meep_initialize) meep::initialize; %rename(meep_ivec) meep::ivec; %rename(meep_material_function) meep::material_function; %rename(meep_monitor_point) meep::monitor_point; %rename(meep_polarizability_identifier) meep::polarizability_identifier; %rename(meep_simple_material_function) meep::simple_material_function; %rename(meep_src_time) meep::src_time; %rename(meep_structure_chunk) meep::structure_chunk; %rename(meep_structure) meep::structure; %rename(meep_symmetry) meep::symmetry; %rename(meep_vec) meep::vec; %rename(meep_volume_list) meep::volume_list; %rename(meep_volume) meep::volume; %rename(meep_abort) meep::abort; %rename(meep_abs) meep::abs; %rename(meep_all_wait) meep::all_wait; %rename(meep_am_master) meep::am_master; %rename(meep_am_really_master) meep::am_really_master; %rename(meep_and_to_all) meep::and_to_all; %rename(meep_begin_critical_section) meep::begin_critical_section; %rename(meep_begin_global_communications) meep::begin_global_communications; %rename(meep_broadcast) meep::broadcast; %rename(meep_clean_vec) meep::clean_vec; %rename(meep_component_direction) meep::component_direction; %rename(meep_component_index) meep::component_index; %rename(meep_component_name) meep::component_name; %rename(meep_coordinate_mismatch) meep::coordinate_mismatch; %rename(meep_count_processors) meep::count_processors; %rename(meep_create_output_file) meep::create_output_file; %rename(meep_cycle_component) meep::cycle_component; %rename(meep_cycle_direction) meep::cycle_direction; %rename(meep_deal_with_ctrl_c) meep::deal_with_ctrl_c; %rename(meep_debug_printf) meep::debug_printf; %rename(meep_derived_component_func) meep::derived_component_func; %rename(meep_dimension_name) meep::dimension_name; %rename(meep_direction_component) meep::direction_component; %rename(meep_direction_name) meep::direction_name; %rename(meep_divide_parallel_processes) meep::divide_parallel_processes; %rename(meep_do_harminv) meep::do_harminv; %rename(meep_end_critical_section) meep::end_critical_section; %rename(meep_end_divide_parallel) meep::end_divide_parallel; %rename(meep_end_global_communications) meep::end_global_communications; %rename(meep_field_type_component) meep::field_type_component; %rename(meep_first_field_component) meep::first_field_component; %rename(meep_flip) meep::flip; %rename(meep_has_direction) meep::has_direction; %rename(meep_has_field_direction) meep::has_field_direction; %rename(meep_identity) meep::identity; %rename(meep_is_B) meep::is_B; %rename(meep_is_derived) meep::is_derived; %rename(meep_is_D) meep::is_D; %rename(meep_is_electric) meep::is_electric; %rename(meep_is_energydensity) meep::is_energydensity; %rename(meep_is_magnetic) meep::is_magnetic; %rename(meep_is_poynting) meep::is_poynting; %rename(meep_is_tm) meep::is_tm; %rename(meep_iveccyl) meep::iveccyl; %rename(meep_load_dft_hdf5) meep::load_dft_hdf5; %rename(meep_make_casimir_gfunc_kz) meep::make_casimir_gfunc_kz; %rename(meep_make_casimir_gfunc) meep::make_casimir_gfunc; %rename(meep_make_output_directory) meep::make_output_directory; %rename(meep_master_fclose) meep::master_fclose; %rename(meep_master_fopen) meep::master_fopen; %rename(meep_master_fprintf) meep::master_fprintf; %rename(meep_master_printf) meep::master_printf; %rename(meep_max) meep::max; %rename(meep_max_to_all) meep::max_to_all; %rename(meep_max_to_master) meep::max_to_master; %rename(meep_min) meep::min; %rename(meep_mirror) meep::mirror; %rename(meep_my_rank) meep::my_rank; %rename(meep_number_of_directions) meep::number_of_directions; %rename(meep_one_ivec) meep::one_ivec; %rename(meep_one_vec) meep::one_vec; %rename(meep_or_to_all) meep::or_to_all; %rename(meep_partial_sum_to_all) meep::partial_sum_to_all; %rename(meep_pml) meep::pml; %rename(meep_pml_quadratic_profile) meep::pml_quadratic_profile; %rename(meep_rotate2) meep::rotate2; %rename(meep_rotate4) meep::rotate4; %rename(meep_r_to_minus_r_symmetry) meep::r_to_minus_r_symmetry; %rename(meep_save_dft_hdf5) meep::save_dft_hdf5; %rename(meep_send) meep::send; %rename(meep_src_times_equal) meep::src_times_equal; %rename(meep_start_at_direction) meep::start_at_direction; %rename(meep_stop_at_direction) meep::stop_at_direction; %rename(meep_sum_to_all) meep::sum_to_all; %rename(meep_sum_to_master) meep::sum_to_master; %rename(meep_trash_output_directory) meep::trash_output_directory; %rename(meep_type) meep::type; %rename(meep_unit_ivec) meep::unit_ivec; %rename(meep_unit_vec) meep::unit_vec; %rename(meep_veccyl) meep::veccyl; %rename(meep_vol1d) meep::vol1d; %rename(meep_vol2d) meep::vol2d; %rename(meep_vol3d) meep::vol3d; %rename(meep_volcyl) meep::volcyl; %rename(meep_volone) meep::volone; %rename(meep_voltwo) meep::voltwo; %rename(meep_wall_time) meep::wall_time; %rename(meep_zero_ivec) meep::zero_ivec; %rename(meep_zero_vec) meep::zero_vec; meep-openmpi-1.1.1/libctl/casimir.scm0000644000175200017520000002600711243546055016755 0ustar debiandebian;given m1 m2, make a composit index n; the inverse is casimir-source-info below ; m1 = r-c, m2 = c => r = m1+m2; n - s = m2 => n = m2 + s; s = (sum_(k=1)^r k) ; => n = m2 + (sum_(k=1)^(m1+m2) k) = m2 + 1/2 (m1+m2) * (m1+m2+1) (define (make-casimir-src-index m1 m2) (+ m2 (* (/ 2) (+ m1 m2) (+ m1 m2 1)))) ; return a list (source-vol mx my mz) ; given the volume integration-vol and n, pick out the appropriate side and mx my mz to use ; sides are ordered by decreasing weight ; weights are w(side, m) = area(side)/total area * 1/(m+1)^4, a rough estimate of the ; contribution to the stress tensor from that side and that m (define (casimir-source-info integration-vol n) (define (get-src-index n) ;given n, extract out the two values of m for 3-d (let* ((s 0) ;sum of diagonals (r 0) ;row intersection (c 0));column intersection (while (< (+ s r) n) (set! r (+ r 1)) (set! s (+ s r))) (set! c (- n s)) (list (- r c) c))) (let* ((min-corner (meep-volume-get-min-corner integration-vol)) (max-corner (meep-volume-get-max-corner integration-vol)) (size-vec (vector3- max-corner min-corner)) (center-vec (vector3+ (vector3-scale 0.5 size-vec) min-corner)) (sx (vector3-x size-vec)) (sy (vector3-y size-vec)) (sz (vector3-z size-vec)) (xshift (vector3 (/ sx 2) 0 0)) (yshift (vector3 0 (/ sy 2) 0)) (zshift (vector3 0 0 (/ sz 2)))) (if (and (> sy 1e-15) (> sz 1e-15)) ;3d cartesian: n = 6*f(m1,m2) + s (let* ((s (modulo n 6)) (nr (/ (- n s) 6)) (ms (get-src-index nr)) ;get (m1 m2) (m1 (first ms)) (m2 (second ms)) (x-const (vector3 0 sy sz)) (y-const (vector3 sx 0 sz)) (z-const (vector3 sx sy 0)) (center-list (list (vector3- center-vec xshift) (vector3+ center-vec xshift) (vector3- center-vec yshift) (vector3+ center-vec yshift) (vector3- center-vec zshift) (vector3+ center-vec zshift))) (m-list (list (vector3 0 m1 m2) (vector3 0 m1 m2) (vector3 m1 0 m2) (vector3 m1 0 m2) (vector3 m1 m2 0) (vector3 m1 m2 0))) (orientation-list (list -1 1 -1 1 -1 1)) (size-list (list x-const x-const y-const y-const z-const z-const)) (surface-vol (volume (center (list-ref center-list s)) (size (list-ref size-list s)))) (surface-m (list-ref m-list s))) (print "Computing in 3d\n") (list surface-vol (vector3-x surface-m) (vector3-y surface-m) (vector3-z surface-m) (list-ref orientation-list s) 1)) (if (= dimensions -2) ;cylindricals - must make sure that the volume has only r >= 0 (let* ((3-sides? (if (<= (vector3-x min-corner) 0) true false)) ;volume passes through the origin (s (if 3-sides? (modulo n 3) (modulo n 4))) (nr (if 3-sides? (/ (- n s) 3) (/ (- n s) 4))) ;reduced index (ms (get-src-index nr)) ;extract out both m-phi and m-dct (m-phi (first ms)) (m-dct (second ms)) (DR (if 3-sides? (/ 1 resolution) 0)) ;cannot include r = 0!! (sr (- (vector3-x max-corner) (+ (max 0 (vector3-x min-corner)) DR))) (r-cen (+ (* 0.5 sr) (max 0 (vector3-x min-corner)) DR)) (new-center-vec (vector3 r-cen 0 (vector3-z center-vec))) (r-shift (vector3 (/ sr 2) 0 0)) (z-shift (vector3 0 0 (/ sz 2))) (r-const-size (vector3 0 0 sz)) (z-const-size (vector3 sr 0 0)) (center-list ;if 3-sides? = true, only first 3 list elements are used (list (vector3- new-center-vec z-shift) (vector3+ new-center-vec z-shift) (vector3+ new-center-vec r-shift) (vector3- new-center-vec r-shift))) (m-list (list (vector3 m-dct m-phi 0) (vector3 m-dct m-phi 0) (vector3 0 m-phi m-dct) (vector3 0 m-phi m-dct))) (orientation-list (list -1 1 1 -1)) (size-list (list z-const-size z-const-size r-const-size r-const-size)) (surface-vol (volume (center (list-ref center-list s)) (size (list-ref size-list s)))) (surface-m (list-ref m-list s))) (print "Computing in Cylindrical coordinates: m-phi = "m-phi", m-dct = "m-dct", 3-sides? = "3-sides?"\n") (list surface-vol (vector3-x surface-m) (vector3-y surface-m) (vector3-z surface-m) (list-ref orientation-list s) (if (or (= s 0) (= s 1)) 1 0))) (let* ((s (modulo n 4)) ;2d or quasi-3d cartesian: n = 4m + s, no ambiguity in m (m (/ (- n s) 4)) (x-const-size (vector3 0 sy )) ;sz may be non-zero for quasi-3d systems (y-const-size (vector3 sx 0 )) (center-list (list (vector3- center-vec xshift) (vector3+ center-vec xshift) (vector3- center-vec yshift) (vector3+ center-vec yshift))) (m-list (list (vector3 0 m 0) (vector3 0 m 0) (vector3 m 0 0) (vector3 m 0 0))) (orientation-list (list -1 1 -1 1)) (size-list (list x-const-size x-const-size y-const-size y-const-size)) (surface-vol (volume (center (list-ref center-list s)) (size (list-ref size-list s)))) (surface-m (list-ref m-list s))) (print "Casimir.scm: working in 2 dimensions\n") (print " Surface center: "(list-ref center-list s)"\n") (print " Surface size: "(list-ref size-list s)"\n") (list surface-vol (vector3-x surface-m) (vector3-y surface-m) (vector3-z surface-m) (list-ref orientation-list s) 1)))))) ;compute the casimir force for a single n and single polarization ;n contains both the side number and the harmonic expansion index (define (casimir-force-contrib force-direction integration-vol n Sigma T source-component gt . step-funcs) (define (cos-func X mx my mz source-vol) (let* ((min-corner (meep-volume-get-min-corner source-vol)) (max-corner (meep-volume-get-max-corner source-vol)) (size-vec (vector3- max-corner min-corner)) (X-start (vector3+ X (vector3-scale 0.5 size-vec))) (sx (vector3-x size-vec)) (sy (vector3-y size-vec)) (sz (vector3-z size-vec)) (x (vector3-x X-start)) (y (vector3-y X-start)) (z (vector3-z X-start)) (kx (if (> sx 1e-15) (/ (* mx pi) sx) 0)) (ky (if (> sy 1e-15) (/ (* my pi) sy) 0)) (kz (if (> sz 1e-15) (/ (* mz pi) sz) 0)) (Nx (if (> sx 1e-15) (/ (if (= mx 0) 1 2) sx) 1)) (Ny (if (> sy 1e-15) (/ (if (= my 0) 1 2) sy) 1)) (Nz (if (> sz 1e-15) (/ (if (= mz 0) 1 2) sz) 1))) (* (sqrt (* Nx Ny Nz)) (cos (* kx x)) (cos (* ky y)) (cos (* kz z))))) (let* ((ft (meep-type source-component)) (source-info (casimir-source-info integration-vol n)) (source-vol (first source-info)) (mx (second source-info)) (my (third source-info)) ;m-phi in cylindrical coordinates (mz (fourth source-info)) (source-orientation (fifth source-info)) (dt (/ Courant resolution))) (if (= ft E-stuff) (begin (set! global-D-conductivity Sigma) (set! global-B-conductivity 0)) (begin (set! global-B-conductivity Sigma) (set! global-D-conductivity 0))) (if (eq? dimensions -2) (begin (print "Cylindricals: m = "my" and (nr nz) = ("mx", "mz")\n") (print " surface center = "(meep-volume-center source-vol)"\n") (print " source size = "(vector3- (meep-volume-get-max-corner source-vol) (meep-volume-get-min-corner source-vol))) (set! m my))) ;set exp(i m phi) field dependence (set! sources (list (make source (src (make custom-src ; delta function pulse (src-func (lambda (t) (/ 1 dt))) (start-time (* -0.25 dt)) (end-time (* 0.75 dt)) (is-integrated? false))) (center (meep-volume-center source-vol)) (size (vector3- (meep-volume-get-max-corner source-vol) (meep-volume-get-min-corner source-vol))) (component source-component) (amp-func (lambda (p) (cos-func p mx my mz source-vol)))))) (reset-meep) (init-fields) (let* ((counter 0) (force-integral 0)) (define (integrate-function) (let* ((f-temp (meep-fields-casimir-stress-dct-integral fields force-direction (meep-component-direction source-component) mx (if (eq? dimensions -2) 0 my) mz ft source-vol))) (set! force-integral (+ force-integral (imag-part (* (list-ref gt counter) dt source-orientation (if (eq? dimensions -2) (* (if (eq? my 0) 1 2) (real-part f-temp)) f-temp))))) (set! counter (+ counter 1)))) (apply run-until (cons (- T 1) (cons integrate-function step-funcs))) force-integral))) ;%%%%%%%%%%%%%%%%%%%%% BLOCH PBCS %%%%%%%%%%%%%%%%%%%%%% ;here the source is specified in ;the form exp(i k x), k = pi/L (m + k_red), ;m = (mx,my,mz) are integers (reciprocal lattice vectors ;k_red = (kx,ky,kz) is in the 1st BZ, m an integer ;source-vol is assumed to occupy one entire plane intersecting ;the computational cell, so we don't need to extract out ;its information - there is only one side to it ;pass the vector (mx my mz) and (kx ky kz) ready-made, since ;this surface consists of only one face (define (casimir-force-contrib-bloch force-direction source-vol k-vec Sigma T source-component gt . step-funcs) ;sources of the form exp(i g x); surface integration in ;casimir.cpp integrates against exp(-i g x) (define (casimir-bloch-func X gx gy gz source-vol) (let* ((min-corner (meep-volume-get-min-corner source-vol)) (max-corner (meep-volume-get-max-corner source-vol)) (size-vec (vector3- max-corner min-corner)) ;crossection of computational cell (sx (vector3-x size-vec)) (sy (vector3-y size-vec)) (sz (vector3-z size-vec)) (x (vector3-x X)) (y (vector3-y X)) (z (vector3-z X)) (Kx (if (> sx 1e-15) (/ (* gx pi) 1) 0)) ;phase winding is independent of unit cell size (Ky (if (> sy 1e-15) (/ (* gy pi) 1) 0)) (Kz (if (> sz 1e-15) (/ (* gz pi) 1) 0)) (Nx (if (> sx 1e-15) (/ sx) 1)) (Ny (if (> sy 1e-15) (/ sy) 1)) (Nz (if (> sz 1e-15) (/ sz) 1))) (* (sqrt (* Nx Ny Nz)) (exp (* (sqrt -1) (+ (* Kx x) (* Ky y) (* Kz z))))))) (let* ((ft (meep-type source-component)) (dt (/ Courant resolution)) ;Bloch phases - exp( i * (2*pi*m + pi*k) x/L) (gx (vector3-x k-vec)) (gy (vector3-y k-vec)) (gz (vector3-z k-vec))) (set! force-complex-fields? true) (set! k-point (vector3-scale 0.5 k-vec)) (if (= ft E-stuff) (begin (set! global-D-conductivity Sigma) (set! global-B-conductivity 0)) (begin (set! global-D-conductivity 0) (set! global-B-conductivity Sigma))) (set! sources (list (make source (src (make custom-src (src-func (lambda (t) (/ 1 dt))) (start-time (* -0.25 dt)) (end-time (* 0.75 dt)) (is-integrated? false))) (center (meep-volume-center source-vol)) (size (vector3- (meep-volume-get-max-corner source-vol) (meep-volume-get-min-corner source-vol))) (component source-component) (amp-func (lambda (p) (casimir-bloch-func p gx gy gz source-vol)))))) (reset-meep) (init-fields) (let* ((counter 0) (force-integral 0)) (define (integrate-function) (set! force-integral (+ force-integral (imag-part (* (list-ref gt counter) dt (meep-fields-casimir-stress-dct-integral fields force-direction (meep-component-direction source-component) gx gy gz ft source-vol 1))))) (set! counter (+ counter 1))) (apply run-until (cons (- T 1) (cons integrate-function step-funcs))) force-integral))) meep-openmpi-1.1.1/libctl/meep.scm.in0000644000175200017520000012367011243346005016656 0ustar debiandebian; Copyright (C) 2005-2009 Massachusetts Institute of Technology ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; **************************************************************** ; Get the number of arguments to a function p. However, some ; older versions of Guile (e.g. 1.2) do not support the 'arity ; property, and procedure-property just returns false. In ; this case, we assume that the procedure returns 1 argument, ; as this is the most useful default for our purposes. Sigh. (define (procedure-num-args p) (let ((arity (procedure-property p 'arity))) (if arity (car arity) 1))) ; **************************************************************** ; Set print-ok? to whether or not we are the MPI master process. ; Also, MPI doesn't support interactive mode. However, don't try this ; if we are running within gen-ctl-io, as it won't work. (if (not (defined? 'output-source)) ; (a function defined by gen-ctl-io) (begin (set-param! print-ok? (zero? (meep-my-rank))) (set-param! interactive? (= 1 (meep-count-processors))))) ; **************************************************************** (define-class material-type no-parent) (define-class polarizability no-parent (define-property omega no-default 'number) (define-property gamma no-default 'number) (define-property sigma-diag no-default 'vector3)) (define (sigma x) (sigma-diag x x x)) (define-class medium material-type (define-property epsilon-diag (vector3 1 1 1) 'vector3) (define-property epsilon-offdiag (vector3 0 0 0) 'vector3) (define-property mu-diag (vector3 1 1 1) 'vector3) (define-property mu-offdiag (vector3 0 0 0) 'vector3) (define-property E-polarizations '() (make-list-type 'polarizability)) (define-property H-polarizations '() (make-list-type 'polarizability)) (define-property E-chi2-diag (vector3 0 0 0) 'vector3) (define-property E-chi3-diag (vector3 0 0 0) 'vector3) (define-property H-chi2-diag (vector3 0 0 0) 'vector3) (define-property H-chi3-diag (vector3 0 0 0) 'vector3) (define-property D-conductivity-diag (vector3 0 0 0) 'vector3) (define-property B-conductivity-diag (vector3 0 0 0) 'vector3) ) (define (epsilon eps) (epsilon-diag eps eps eps)) (define (mu m) (mu-diag m m m)) (define dielectric medium) ; old name for backwards compatibility (define polarizations E-polarizations) ; backwards compatibility ; useful shortcuts for isotropic conductivity (define (D-conductivity c) (D-conductivity-diag c c c)) (define (B-conductivity c) (B-conductivity-diag c c c)) ; shortcuts for isotropic nonlinearities (define (E-chi2 d) (E-chi2-diag d d d)) (define (E-chi3 d) (E-chi3-diag d d d)) (define (H-chi2 d) (H-chi2-diag d d d)) (define (H-chi3 d) (H-chi3-diag d d d)) (define chi2 E-chi2) (define chi3 E-chi3) ; backwards compatibility (define-class perfect-metal material-type) ; arbitrary material(x) (define-class material-function material-type (define-property material-func no-default 'function (lambda (p) (= 1 (procedure-num-args p))))) (define (epsilon-func f) ; convenience wrapper (material-func (lambda (p) (make dielectric (epsilon (f p)))))) (define (index n) (epsilon (* n n))) ; convenient substitute for epsilon ; use the solid geometry classes, variables, etcetera in libgeom: ; (one specifications file can include another specifications file) (include "@LIBCTL_DIR@/utils/geom.scm") (if (defined? 'meep-component-Ex) (include "meep-enums.scm")) (define CYLINDRICAL -2) ; special value of dimensions for cylindrical coords ; **************************************************************** ; Add some predefined variables, for convenience: (define vacuum (make dielectric (epsilon 1.0))) (define air vacuum) (define metal (make perfect-metal)) (define perfect-electric-conductor metal) (define perfect-magnetic-conductor (make medium (mu (/ -0.0)))) ; -infinity (define infinity 1.0e20) ; big number for infinite dimensions of objects (set! default-material vacuum) (define pi (* 4.0 (atan 1.0))) ; **************************************************************** ; some utilities ; round x to dig digits after the decimal place (define (round-dig dig x) (/ (round (* x (expt 10 dig))) (expt 10 dig))) ; display a comma-delimited list of values, prefixed by the data-name ; and the run index, with data a list of values. (define-param run-index 0) (define (display-run-data data-name data) (print data-name run-index ":") (map (lambda (v) (print ", " v)) data) (print "\n")) ; display a list of data arrays (all required to be of same length) ; as comma-separated values, prefixed with name (and the run index). (define (display-csv name . ds) (if (not (null? ds)) (apply map (cons (lambda (. vs) (display-run-data name vs)) ds)))) ; **************************************************************** ; More input variables ; list of extra materials not explicit in the geometry, e.g. those ; used in material-functions, so that Meep doesn't miss them (define-param extra-materials '()) (define structure '()) ; list of sources added by init-fields (below) (define-param sources '()) (define-param m 0) ; angular dependence exp(i m phi) in cylindrical ; If false (default), Meep forces certain field components for |m|>1 to ; be zero for |m| pixels from r=0. This is something of a hack ; which seems to ensure stability for Courant = 0.5 regardless of m, ; at the expense of some accuracy near r=0. If true, in order to ; remain stable, the Courant factor should be ~ min[0.5, 1 / (|m| + 0.5)] ; or so assuming the computational cell includes the r=0 origin. (define-param accurate-fields-near-cylorigin? false) (define-param force-complex-fields? false) (define-param k-point false) ; whether to use the "beta" trick to handle kz in 2d ; -- this is not true by default because its use changes ; the interpretation of the fields somewhat (for real fields), ; and it only works in 2d right now. (define-param special-kz? false) (define fields '()) (define-param subpixel-tol 1e-4) (define-param subpixel-maxeval 100000) (define-param store-polarization-energy? false) ; a "global" conductivity to add to all materials, mostly ; for the convenience of Casimir calculations (define-param global-D-conductivity 0) (define-param global-B-conductivity 0) ; **************************************************************** ; Setting up the structure (define-class symmetry no-parent (define-property direction no-default 'integer) (define-property phase 1.0 'cnumber)) (define-class rotate2-sym symmetry) (define-class rotate4-sym symmetry) (define-class mirror-sym symmetry) (define ALL -1) ; special value for directions, when all values (define-class pml no-parent (define-property thickness no-default 'number) (define-property direction ALL 'integer) (define-property side ALL 'integer) (define-property strength 1.0 'number) ; obsolete: R -> R^strength (define-property R-asymptotic 1e-15 'number positive?) (define-property pml-profile (lambda (u) (* u u)) 'function)) (export-type (make-list-type 'symmetry)) (export-type (make-list-type 'pml)) (export-type (make-list-type 'material-type)) (define-param symmetries '()) (define-param pml-layers '()) (define-param num-chunks 0) (define-param Courant 0.5) (define (infer-dimensions k) (if (and (not (null? k)) (= dimensions 3)) ; infer dimensions (if (and (= (vector3-z (object-property-value geometry-lattice 'size)) no-size) (or (not k) special-kz? (zero? (vector3-z k)))) 2 3) dimensions)) (define (require-dimensions!) (if (null? structure) (set-dimensions (infer-dimensions k-point)))) (define-class volume-class no-parent (define-property center no-default 'vector3) (define-property size (vector3 0 0 0) 'vector3)) (define (volume . args) (require-dimensions!) (let ((v (apply make (cons volume-class args)))) (let ((cen (object-property-value v 'center)) (sz (object-property-value v 'size))) (new-meep-volume (vector3- cen (vector3-scale 0.5 sz)) (vector3+ cen (vector3-scale 0.5 sz)))))) (define-param eps-averaging? true) ; 10% slower, but huge accuracy gains (define (init-structure . k_) (let ((k (if (null? k_) '() (car k_))) (s (object-property-value geometry-lattice 'size))) (set! structure (make-structure (infer-dimensions k) s geometry-center resolution eps-averaging? subpixel-tol subpixel-maxeval (and ensure-periodicity (not (not k))) geometry extra-materials default-material pml-layers symmetries num-chunks Courant global-D-conductivity global-B-conductivity)))) ; **************************************************************** ; Adding sources (define-class src-time no-parent (define-property is-integrated? false 'boolean)) (define-class continuous-src src-time (define-property frequency no-default 'number) (define-property start-time 0 'number) (define-property end-time infinity 'number) (define-property width 0 'number) (define-property cutoff 3.0 'number) (define-derived-property swigval 'SCM (lambda (o) (let ((s (new-meep-continuous-src-time (* 1.0 (object-property-value o 'frequency)) (object-property-value o 'width) (object-property-value o 'start-time) (object-property-value o 'end-time) (object-property-value o 'cutoff)))) (meep-src-time-is-integrated-set s (object-property-value o 'is-integrated?)) s)))) (define-class gaussian-src src-time (define-property frequency no-default 'number) (define-property width no-default 'number) (define-property start-time 0 'number) (define-property cutoff 5.0 'number) (define-derived-property swigval 'SCM (lambda (o) (let ((s (new-meep-gaussian-src-time (* 1.0 (object-property-value o 'frequency)) (object-property-value o 'width) (object-property-value o 'start-time) (+ (object-property-value o 'start-time) (* 2 (object-property-value o 'width) (object-property-value o 'cutoff)))))) (meep-src-time-is-integrated-set s (object-property-value o 'is-integrated?)) s)))) (define-class custom-src src-time (define-property src-func no-default 'function) (define-property start-time (- infinity) 'number) (define-property end-time infinity 'number) (define-derived-property swigval 'SCM (lambda (o) (let ((s (new-meep-custom-src-time (object-property-value o 'src-func) (object-property-value o 'start-time) (object-property-value o 'end-time)))) (meep-src-time-is-integrated-set s (object-property-value o 'is-integrated?)) s)))) (define (fwidth df) (width (/ df))) ; to specify frequency width instead (define (wavelength lam) (frequency (/ lam))) (define (period T) (frequency (/ T))) (define-class source no-parent (define-property src no-default 'src-time) (define-property component no-default 'integer) (define-property center no-default 'vector3) (define-property size (vector3 0 0 0) 'vector3) (define-property amplitude 1.0 'cnumber) (define-property amp-func '() 'SCM)) ; the following definitions are taken from MPB (define NO-PARITY 0) (define EVEN-Z 1) (define ODD-Z 2) (define EVEN-Y 4) (define ODD-Y 8) (define TE EVEN-Z) (define TM ODD-Z) ; special component for eigenmode-source (not defined during gen-ctl-io) (define all-components (if (defined? 'Dielectric) Dielectric 99)) (define-class eigenmode-source source ; the following two properties have special default values -- if we ; detect these values, we will replace the values by those of the ; size and center of the parent class (a bit hackish, but...) (define-property eig-lattice-size (vector3 -1 -1 -1) 'vector3) (define-property eig-lattice-center (vector3 infinity infinity infinity) 'vector3) (define-property component all-components 'integer) ; new default val (define-property eig-band 1 'integer positive?) (define-property eig-kpoint no-default 'vector3) (define-property eig-parity NO-PARITY 'integer) (define-property eig-resolution 0 'integer non-negative?) (define-property eig-tolerance 1e-7 'number positive?)) (define (add-source s f) ; add source s to fields f (define (dflt v v0 vd) (if (vector3= v v0) vd v)) (let ((A (object-property-value s 'amp-func)) (cen (object-property-value s 'center)) (sz (object-property-value s 'size))) (if (object-member? 'eigenmode-source s) (let ((ecen (dflt (object-property-value s 'eig-lattice-center) (vector3 infinity infinity infinity) cen)) (esz (dflt (object-property-value s 'eig-lattice-size) (vector3 -1 -1 -1) sz))) (if (null? A) (meep-fields-add-eigenmode-source f (object-property-value s 'component) (object-property-value (object-property-value s 'src) 'swigval) (volume (center cen) (size sz)) (volume (center ecen) (size esz)) (object-property-value s 'eig-band) (object-property-value s 'eig-kpoint) (object-property-value s 'eig-parity) (object-property-value s 'eig-resolution) (object-property-value s 'eig-tolerance) (object-property-value s 'amplitude)) (meep-fields-add-eigenmode-source f (object-property-value s 'component) (object-property-value (object-property-value s 'src) 'swigval) (volume (center cen) (size sz)) (volume (center ecen) (size esz)) (object-property-value s 'eig-band) (object-property-value s 'eig-kpoint) (object-property-value s 'eig-parity) (object-property-value s 'eig-resolution) (object-property-value s 'eig-tolerance) (object-property-value s 'amplitude) A))) (if (null? A) (meep-fields-add-volume-source f (object-property-value s 'component) (object-property-value (object-property-value s 'src) 'swigval) (volume (center cen) (size sz)) (* 1.0 (object-property-value s 'amplitude))) (meep-fields-add-volume-source f (object-property-value s 'component) (object-property-value (object-property-value s 'src) 'swigval) (volume (center cen) (size sz)) A (* 1.0 (object-property-value s 'amplitude))))))) ; **************************************************************** ; Setting up the fields (define init-fields-hooks '()) ; list of thunks to execute after init-fields (define (init-fields) (if (null? structure) (init-structure k-point)) (set! fields (new-meep-fields structure (if (= dimensions CYLINDRICAL) m 0) store-polarization-energy? (if (and special-kz? k-point) (vector3-z k-point) 0.0) (not accurate-fields-near-cylorigin?))) (if verbose? (meep-fields-verbose fields)) (if (not (or force-complex-fields? (and (= dimensions CYLINDRICAL) (not (zero? m))) (not (for-all? symmetries (lambda (s) (zero? (imag-part (object-property-value s 'phase)))))) (not (or (not k-point) (vector3= k-point (vector3 0)))))) (meep-fields-use-real-fields fields)) (if k-point (meep-fields-use-bloch fields (if special-kz? (vector3 (vector3-x k-point) (vector3-y k-point)) k-point))) (map (lambda (s) (add-source s fields)) sources) (map (lambda (thunk) (thunk)) init-fields-hooks)) (define (meep-time) (if (null? fields) (init-fields)) (meep-fields-time fields)) (define (meep-round-time) (if (null? fields) (init-fields)) (meep-fields-round-time fields)) (define (get-field-point c pt) (meep-fields-get-field fields c pt)) (define (get-epsilon-point pt) (meep-fields-get-eps fields pt)) ; **************************************************************** ; Various ways to restart all or part of the simulation. (define (change-k-point! k) (set! k-point k) (if (not (null? fields)) (if (and (not (or (not k-point) (vector3= k-point (vector3 0)))) (not (zero? (meep-fields-is-real-get fields)))) (begin (delete-meep-fields fields) (set! fields '()) (init-fields)) (if k-point (meep-fields-use-bloch fields k-point))))) (define (change-sources! new-sources) (set! sources new-sources) (if (not (null? fields)) (begin (meep-fields-remove-sources fields) (map (lambda (s) (add-source s fields)) sources)))) (define (reset-meep) (delete-meep-fields fields) (set! fields '()) (delete-meep-structure structure) (set! structure '())) (define (restart-fields) (if (not (null? fields)) (begin (meep-fields-t-set fields 0) (meep-fields-zero-fields fields)) (init-fields))) ; **************************************************************** ; Flux spectra (define AUTOMATIC -1) ; special value for directions, when auto-determined (define-class flux-region no-parent (define-property center no-default 'vector3) (define-property size (vector3 0 0 0) 'vector3) (define-property direction AUTOMATIC 'integer) (define-property weight 1.0 'cnumber)) (define (fields-add-fluxish-stuff add-dft-stuff fields fcen df nfreq stufflist) (define vl '()) ; volume_list of flux regions (map (lambda (f) (let* ((v (volume (center (object-property-value f 'center)) (size (object-property-value f 'size)))) (d0 (object-property-value f 'direction)) (d (if (negative? d0) (meep-fields-normal-direction fields v) d0)) (c (meep-direction-component Sx d))) (set! vl (make-volume-list (volume (center (object-property-value f 'center)) (size (object-property-value f 'size))) c (object-property-value f 'weight) vl)))) stufflist) (let ((stuff (add-dft-stuff fields vl (- fcen (/ df 2)) (+ fcen (/ df 2)) nfreq))) (delete-meep-volume-list vl) stuff)) (define (fields-add-flux fields fcen df nfreq . fluxes) (fields-add-fluxish-stuff meep-fields-add-dft-flux fields fcen df nfreq fluxes)) (define (add-flux fcen df nfreq . fluxes) (if (null? fields) (init-fields)) (apply fields-add-flux (append (list fields fcen df nfreq) fluxes))) (define (scale-flux-fields s f) (meep-dft-flux-scale-dfts f s)) (define (get-flux-freqs f) (arith-sequence (meep-dft-flux-freq-min-get f) (meep-dft-flux-dfreq-get f) (meep-dft-flux-Nfreq-get f))) (export-type (make-list-type 'number)) (define (get-fluxes f) (dft-flux-flux f)) (define (display-fluxes . fluxes) (if (not (null? fluxes)) (apply display-csv (append (list "flux" (get-flux-freqs (car fluxes))) (map get-fluxes fluxes))))) (define (load-flux fname flux) (if (null? fields) (init-fields)) (meep-dft-flux-load-hdf5 flux fields fname "" (get-filename-prefix))) (define (save-flux fname flux) (if (null? fields) (init-fields)) (meep-dft-flux-save-hdf5 flux fields fname "" (get-filename-prefix))) (define (load-minus-flux fname flux) (load-flux fname flux) (meep-dft-flux-scale-dfts flux -1.0)) ; **************************************************************** ; Force spectra (from stress tensor) - very similar interface to flux spectra (define-class force-region no-parent (define-property center no-default 'vector3) (define-property size (vector3 0 0 0) 'vector3) (define-property direction no-default 'integer) (define-property weight 1.0 'cnumber)) (define (fields-add-force fields fcen df nfreq . forcees) (fields-add-fluxish-stuff meep-fields-add-dft-force fields fcen df nfreq forcees)) (define (add-force fcen df nfreq . forcees) (if (null? fields) (init-fields)) (apply fields-add-force (append (list fields fcen df nfreq) forcees))) (define (scale-force-fields s f) (meep-dft-force-scale-dfts f s)) (define (get-force-freqs f) (arith-sequence (meep-dft-force-freq-min-get f) (meep-dft-force-dfreq-get f) (meep-dft-force-Nfreq-get f))) (define (get-forces f) (dft-force-force f)) (define (display-forces . forcees) (if (not (null? forcees)) (apply display-csv (append (list "force" (get-force-freqs (car forcees))) (map get-forces forcees))))) (define (load-force fname force) (if (null? fields) (init-fields)) (meep-dft-force-load-hdf5 force fields fname "" (get-filename-prefix))) (define (save-force fname force) (if (null? fields) (init-fields)) (meep-dft-force-save-hdf5 force fields fname "" (get-filename-prefix))) (define (load-minus-force fname force) (load-force fname force) (meep-dft-force-scale-dfts force -1.0)) ; **************************************************************** ; Generic step functions: these are functions which are called ; (potentially) at every time step. They can either be a thunk ; or they can take one argument, to-do. to-do is either 'step ; or 'finish, where 'step means to output (or whatever) ; normally, and 'finish is passed once at the end of the run ; (and is used to close files, print summary output, etcetera). ; step functions can be either thunks (the common case), or ; can take a "to-do" argument that is currently either 'step ; or 'finish (so that they can clean up at the end of a run). (define (eval-step-func func to-do) (if (= 0 (procedure-num-args func)) (if (eq? to-do 'step) (func)) (func to-do))) ; Some convenient wrappers for step functions passed to run. e.g., these ; can be used to only output at certain times, instead of ata every time step. (define (combine-step-funcs . step-funcs) (lambda (to-do) (map (lambda (f) (eval-step-func f to-do)) step-funcs))) ; generic wrapper (define (when-true-funcs cond? step-funcs) (lambda (to-do) (if (or (eq? to-do 'finish) (cond?)) (map (lambda (f) (eval-step-func f to-do)) step-funcs)))) ; evaluate step-funcs whenever (cond?) is true/false. (define (when-true cond? . step-funcs) (when-true-funcs cond? step-funcs)) (define (when-false cond? . step-funcs) (when-true-funcs (lambda () (not (cond?))) step-funcs)) ; output at an interval of dT (in meep/simulation time). (define (at-every dT . step-funcs) (if (null? fields) (init-fields)) (let ((Tlast (meep-round-time))) (lambda (to-do) (let ((T (meep-round-time))) (if (or (eq? to-do 'finish) (>= T (+ Tlast dT (* -0.5 (meep-fields-dt-get fields))))) (begin (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! Tlast T))))))) (define (after-time T . step-funcs) (if (null? fields) (init-fields)) (let ((T0 (meep-round-time))) (when-true-funcs (lambda () (>= (meep-round-time) (+ T0 T))) step-funcs))) (define (before-time T . step-funcs) (if (null? fields) (init-fields)) (let ((T0 (meep-round-time))) (when-true-funcs (lambda () (< (meep-round-time) (+ T0 T))) step-funcs))) (define (at-time T . step-funcs) (let ((done? false)) (after-time T (lambda (to-do) (if (or (not done?) (eq? to-do 'finish)) (map (lambda (f) (eval-step-func f to-do)) step-funcs)) (set! done? (or done? (eq? to-do 'step))))))) (define (after-sources . step-funcs) (if (null? fields) (init-fields)) (apply after-time (cons (- (meep-fields-last-source-time fields) (meep-round-time)) step-funcs))) ; after sources plus a time T. (define (after-sources+ T . step-funcs) (if (null? fields) (init-fields)) (apply after-time (cons (- (+ (meep-fields-last-source-time fields) T) (meep-round-time)) step-funcs))) (define (during-sources . step-funcs) (if (null? fields) (init-fields)) (apply before-time (cons (- (meep-fields-last-source-time fields) (meep-round-time)) step-funcs))) ; the user could just call functions, but this functions saves the user ; from having to manually call init-fields (define (at-beginning . step-funcs) (let ((done? false)) (lambda (to-do) (if (not done?) (begin (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! done? true)))))) ; for completeness (although the user could just do this after running): (define (at-end . step-funcs) (lambda (to-do) (if (eq? to-do 'finish) (begin (map (lambda (f) (eval-step-func f 'step)) step-funcs) (map (lambda (f) (eval-step-func f 'finish)) step-funcs))))) ; run the step-funcs with the magnetic fields synchronized in time ; with the electric fields (define (synchronized-magnetic . step-funcs) (lambda (to-do) (meep-fields-synchronize-magnetic-fields fields) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (meep-fields-restore-magnetic-fields fields))) ; **************************************************************** ; File output functions (can only be called after init-fields). (define-param filename-prefix "") (define (get-filename-prefix) (if (eq? filename-prefix false) "" (if (and (not (null? include-files)) (string-null? filename-prefix)) (string-append (strip-suffix ".scm" (strip-suffix ".ctl" (cdr (split-pathname (car include-files)))))) filename-prefix))) ; Use output directory instead of outputting in same directory; ; uses init-fields-hooks to handle fields not yet initted. (define (use-output-directory . dname_) (let ((dname (if (null? dname_) (string-append (get-filename-prefix) "-out") (car dname_)))) (let ((hook (let ((trashed? false)) ; only trash output directory once per run (lambda () (print "Meep: using output directory \"" dname "\"\n") (meep-fields-set-output-directory fields dname) (if (not trashed?) (meep-trash-output-directory dname)) (set! trashed? true))))) (set! init-fields-hooks (cons hook init-fields-hooks)) (if (not (null? fields)) (hook)) (set! filename-prefix false) dname))) (define-param output-volume '()) ; region to output; NULL for everywhere (define output-append-h5 '()) ; h5 file to append data to (NULL if none) ; hook function called with the filename after every HDF5 files is created; ; this can be used to convert the file into other formats, etcetera. (define output-h5-hook (lambda (fname) false)) ; default is no-op (define output-single-precision? false) ; output single-prec to save space (define meep-last-eps-filename "") ; most recent epsilon file outputted (define (output-component c . h5file) (if (null? fields) (error "init-fields is required before output-component")) (meep-fields-output-hdf5 fields c (if (null? output-volume) (meep-fields-total-volume fields) output-volume) (if (null? h5file) output-append-h5 (car h5file)) (and (null? h5file) (not (null? output-append-h5))) output-single-precision? (get-filename-prefix)) (if (null? h5file) (let ((nm (meep-fields-h5file-name fields (meep-component-name c) (get-filename-prefix) true))) (if (eq? c Dielectric) (set! meep-last-eps-filename nm)) (output-h5-hook nm)))) ; cs = list of components, and func is function of position & these components (define (output-field-function-helper name cs func real-only? h5file) (if (null? fields) (error "init-fields is required before output-field-function")) (meep-fields-output-hdf5 fields name (cons cs func) (if (null? output-volume) (meep-fields-total-volume fields) output-volume) (if (null? h5file) output-append-h5 (car h5file)) (and (null? h5file) (not (null? output-append-h5))) output-single-precision? (get-filename-prefix) real-only?) (if (null? h5file) (output-h5-hook (meep-fields-h5file-name fields name (get-filename-prefix) true)))) (define (output-field-function name cs func . h5file) (output-field-function-helper name cs func false h5file)) (define (output-real-field-function name cs func . h5file) (output-field-function-helper name cs func true h5file)) (define (output-components fname . cs) (if (null? fields) (error "init-fields is required before output-component")) (let ((f (if (null? output-append-h5) (list (meep-fields-open-h5file fields fname (meep-h5file-WRITE) (get-filename-prefix) true)) '()))) (map (lambda (c) (apply output-component (cons c f)) (if (null? output-append-h5) (meep-h5file-prevent-deadlock (car f)))) cs) (if (null? output-append-h5) (delete-meep-h5file (car f)))) (if (null? output-append-h5) (output-h5-hook (meep-fields-h5file-name fields fname (get-filename-prefix) true)))) ; convenience functions, similar to MPB: (define (output-epsilon) (output-component Dielectric)) (define (output-mu) (output-component Permeability)) (define (output-hpwr) (output-component H-EnergyDensity)) (define (output-dpwr) (output-component D-EnergyDensity)) (define (output-tot-pwr) (output-component EnergyDensity)) (defmacro-public define-output-field (name cp CP) `(begin (define (,(symbol-append 'output- cp)) (output-components ,name ,(symbol-append CP 'x) ,(symbol-append CP 'y) ,(symbol-append CP 'z) ,(symbol-append CP 'r) ,(symbol-append CP 'p))) (define (,(symbol-append 'output- cp '-x)) (output-component ,(symbol-append CP 'x))) (define (,(symbol-append 'output- cp '-y)) (output-component ,(symbol-append CP 'y))) (define (,(symbol-append 'output- cp '-z)) (output-component ,(symbol-append CP 'z))) (define (,(symbol-append 'output- cp '-r)) (output-component ,(symbol-append CP 'r))) (define (,(symbol-append 'output- cp '-p)) (output-component ,(symbol-append CP 'p))))) (define-output-field "h" hfield H) (define-output-field "b" bfield B) (define-output-field "e" efield E) (define-output-field "d" dfield D) (define-output-field "s" poynting S) ; compat. with MPB. (define-output-field "s" sfield S) (define (with-prefix pre . step-funcs) (lambda (to-do) (let ((pre-save filename-prefix)) (set! filename-prefix (string-append pre (get-filename-prefix))) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! filename-prefix pre-save)))) ; change output-volume for a few step-funcs to v (define (in-volume v . step-funcs) (let ((cur-eps "")) ; allow per-volume eps filenames (lambda (to-do) (let ((v-save output-volume) (eps-save meep-last-eps-filename)) (set! output-volume v) (if (not (string-null? cur-eps)) (set! meep-last-eps-filename cur-eps)) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! cur-eps meep-last-eps-filename) (set! output-volume v-save) (if (not (string-null? eps-save)) (set! meep-last-eps-filename eps-save)))))) (define (in-point pt . step-funcs) (apply in-volume (cons (volume (center pt)) step-funcs))) ; Meep supports outputting d+1 dimensional HDF5 files where the last ; dimension is time. (define (to-appended fname . step-funcs) (if (null? fields) (init-fields)) (let ((h5 (meep-fields-open-h5file fields fname (meep-h5file-WRITE) (get-filename-prefix)))) (lambda (to-do) (let ((h5save output-append-h5)) (set! output-append-h5 h5) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (if (eq? to-do 'finish) (begin (delete-meep-h5file h5) (output-h5-hook (meep-fields-h5file-name fields fname (get-filename-prefix))))) (set! output-append-h5 h5save))))) (define (convert-h5 rm? convert-cmd . step-funcs) (define (convert fname) (if (zero? (meep-my-rank)) (if (and (zero? (system (string-append convert-cmd " \"" fname "\""))) rm?) (system (string-append "rm \"" fname "\""))))) (lambda (to-do) (let ((hooksave output-h5-hook)) (set! output-h5-hook convert) (map (lambda (f) (eval-step-func f to-do)) step-funcs) (set! output-h5-hook hooksave)))) (define (h5topng rm? options . step-funcs) (apply convert-h5 (cons rm? (cons (string-append "EPS=\"" meep-last-eps-filename "\"; " "h5topng " options) step-funcs)))) (define (output-png-rm? rm? c options) (let ((maxabs 0.0)) ; keep track of amplitude for image scaling (lambda (to-do) (if (eq? to-do 'step) (begin (set! maxabs (max maxabs (meep-fields-max-abs fields c (if (null? output-volume) (meep-fields-total-volume fields) output-volume)))) ((h5topng rm? (string-append "-M " (number->string maxabs) " " options) (lambda () (output-component c))) to-do)))))) (define (output-png c options) (output-png-rm? true c options)) (define (output-png+h5 c options) (output-png-rm? false c options)) ; **************************************************************** ; harminv functions for extracting bands, etcetera ; for do-harminv (export-type (make-list-type 'cnumber)) (export-type (make-list-type 'cvector3)) ; generic data-collection function (defmacro-public collect-harminv! (data data-dt) `(lambda (c pt) (set! ,data '()) (let ((t0 0)) (lambda () (set! ,data-dt (- (meep-time) t0)) (set! t0 (meep-time)) (set! ,data (cons (get-field-point c pt) ,data)))))) ; do-harminv returns a (freq, amp, err) vector3; define accessor functions: (define harminv-freq vector3-x) (define (harminv-freq-re b) (real-part (vector3-x b))) (define (harminv-freq-im b) (imag-part (vector3-x b))) (define (harminv-Q b) (/ (harminv-freq-re b) (* -2 (harminv-freq-im b)))) (define harminv-amp vector3-y) (define harminv-err vector3-z) (define (analyze-harminv data fcen df maxbands . dt) (display-run-data "harminv" (list "frequency" "imag. freq." "Q" "|amp|" "amplitude" "error")) (let ((bands (do-harminv data (if (null? dt) (meep-fields-dt-get fields) (car dt)) (- fcen (/ df 2)) (+ fcen (/ df 2)) maxbands))) (map (lambda (b) ; b = vector of (freq, amp, error) (display-run-data "harminv" (list (harminv-freq-re b) (harminv-freq-im b) (harminv-Q b) (magnitude (harminv-amp b)) (harminv-amp b) (harminv-err b)))) bands) bands)) (defmacro-public harminv! (data dt results c pt fcen df maxbands) `(let ((data' '()) (dt' 0) (c' ,c) (pt' ,pt) (fcen' ,fcen) (df' ,df) (maxbands' ,maxbands)) (combine-step-funcs (at-end (lambda () (set! ,data (reverse data')) ; put in correct order (set! ,dt dt') (set! ,results (analyze-harminv ,data fcen' df' (if (list? maxbands') (if (null? maxbands') 100 (car maxbands')) (if (zero? maxbands') 100 maxbands')) dt')))) ((collect-harminv! data' dt') c' pt')))) ; collect in harminv-data + analyze and store in harminv-results (define harminv-data '()) (define harminv-data-dt 0) (define harminv-results '()) (define (harminv c pt fcen df . mxbands) (harminv! harminv-data harminv-data-dt harminv-results c pt fcen df mxbands)) ; **************************************************************** ; run functions ; default time interval (seconds) between progress printouts (define-param progress-interval 4) ; display progress from T0 until T, every dt seconds (wall time) (define (display-progress T0 T dt) (let ((t0 (meep-wall-time)) (tlast (meep-wall-time))) (lambda () (let ((t (meep-wall-time))) (if (>= (- t tlast) dt) (begin (print "Meep progress: " (- (meep-time) T0) "/" T " = " (round-dig 1 (/ (- (meep-time) T0) (* 0.01 T))) "% done" " in " (round-dig 1 (- t t0)) "s, " (round-dig 1 ( - (* (- t t0) (/ T (- (meep-time) T0))) (- t t0))) "s to go\n") (set! tlast t))))))) ; run until (cond?) is true or, if cond? is a number, until time cond? ; (in Meep units) has elapsed, calling step-funcs at every time step. (define (run-until cond? . step-funcs) (set! interactive? false) (if (null? fields) (init-fields)) (if (number? cond?) ; cond? is a time to run for (let ((T0 (meep-round-time))) ; current Meep time (apply run-until (cons (lambda () (>= (meep-round-time) (+ T0 cond?))) (cons (display-progress T0 (+ T0 cond?) progress-interval) step-funcs)))) (begin ; otherwise, cond? is a boolean thunk (map (lambda (f) (eval-step-func f 'step)) step-funcs) (if (cond?) (begin (map (lambda (f) (eval-step-func f 'finish)) step-funcs) (print "run " run-index " finished at t = " (meep-time) " (" (meep-fields-t-get fields) " timesteps)\n") (set! run-index (+ run-index 1))) (begin (meep-fields-step fields) (apply run-until (cons cond? step-funcs))))))) ; run until all sources are finished and cond? is true. If cond? is a number ; T, run until all sources are finished + a time T. (define (run-sources+ cond? . step-funcs) (if (null? fields) (init-fields)) (let ((Ts (meep-fields-last-source-time fields))) (apply run-until (cons (if (number? cond?) (+ (- Ts (meep-round-time)) cond?) (lambda () (and (cond?) (>= (meep-round-time) Ts)))) step-funcs)))) ; run until all sources are finished (define (run-sources . step-funcs) (apply run-sources+ (cons 0 step-funcs))) ; condition function, designed to be used in conjunction with run-sources+, ; that returns true when |field|^2 at a given point has decayed more than ; a certain amount, always running for at least steps of dT. (define (stop-when-fields-decayed dT c pt decay-by) (if (null? fields) (init-fields)) (let ((T0 (meep-round-time)) (max-abs (sqr (magnitude (meep-fields-get-field fields c pt)))) (cur-max 0)) (lambda () (let ((fabs (sqr (magnitude (meep-fields-get-field fields c pt))))) (set! cur-max (max cur-max fabs)) (if (<= (meep-round-time) (+ T0 dT)) false ; don't stop yet (let ((old-cur cur-max)) (set! cur-max 0) (set! T0 (meep-round-time)) (set! max-abs (max max-abs old-cur)) (if (not (zero? max-abs)) (print "field decay(t = " (meep-time)"): " old-cur " / " max-abs " = " (/ old-cur max-abs) "\n")) (<= old-cur (* max-abs decay-by)))))))) ; **************************************************************** ; band diagrams (define (run-k-point T k) (define cs (map (lambda (o) (object-property-value o 'component)) sources)) (define pts (map (lambda (o) (object-property-value o 'center)) sources)) (define As (map (lambda (o) (object-property-value o 'amplitude)) sources)) (define fmin (max 0 (apply min (map (lambda (o) (let ((t (object-property-value o 'src))) (if (object-member? 'gaussian-src t) (- (object-property-value t 'frequency) (/ 1 (object-property-value t 'width) 2)) infinity))) sources)))) (define fmax (apply max (map (lambda (o) (let ((t (object-property-value o 'src))) (if (object-member? 'gaussian-src t) (+ (object-property-value t 'frequency) (/ 1 (object-property-value t 'width) 2)) 0))) sources))) (if (or (null? cs) (> fmin fmax)) (error "run-k-point requires a gaussian-src source")) ; TODO: apply harminv to multiple points and only accept freqs ; with correct relative amplitudes? (change-k-point! k) (restart-fields) (run-sources+ T (after-sources (harminv (car cs) (car pts) (* 0.5 (+ fmin fmax)) (- fmax fmin)))) (map harminv-freq harminv-results)) (define (run-k-points T k-points) (define k-index 0) (define all-freqs '()) (map (lambda (k) (set! k-index (+ k-index 1)) (if (= k-index 1) (begin (init-fields) (output-epsilon))) (let ((freqs (run-k-point T k))) (print "freqs:, " k-index ", " (vector3-x k) ", " (vector3-y k) ", " (vector3-z k)) (map (lambda (x) (print ", " x)) (map real-part freqs)) (print "\n") (print "freqs-im:, " k-index ", " (vector3-x k) ", " (vector3-y k) ", " (vector3-z k)) (map (lambda (x) (print ", " x)) (map imag-part freqs)) (print "\n") (set! all-freqs (cons freqs all-freqs)))) k-points) (reverse all-freqs)) ; **************************************************************** ; field integration (define (get-where-and-fields where-and-fields) (let ((f (if (= 2 (length where-and-fields)) (cadr where-and-fields) fields))) (if (null? f) (error "init-fields is required before using field functions")) (let ((where (if (null? where-and-fields) (meep-fields-total-volume f) (car where-and-fields)))) (cons where f)))) (define (integrate-field-function cs func . where-and-fields) (let ((waf (get-where-and-fields where-and-fields))) (meep-fields-integrate (cdr waf) (cons cs func) (car waf)))) (define (integrate2-field-function fields2 cs1 cs2 func . where-and-fields) (let ((waf (get-where-and-fields where-and-fields))) (meep-fields-integrate2 (cdr waf) fields2 (cons (cons cs1 cs2) func) (car waf)))) (define (max-abs-field-function cs func . where-and-fields) (let ((waf (get-where-and-fields where-and-fields))) (meep-fields-max-abs (cdr waf) (cons cs func) (car waf)))) (define (flux-in-box dir box) (if (null? fields) (error "init-fields is required before using flux-in-box")) (meep-fields-flux-in-box fields dir box)) (define (electric-energy-in-box box) (if (null? fields) (error "init-fields is required before using electric-energy-in-box")) (meep-fields-electric-energy-in-box fields box)) (define (magnetic-energy-in-box box) (if (null? fields) (error "init-fields is required before using magnetic-energy-in-box")) (meep-fields-magnetic-energy-in-box fields box)) (define (field-energy-in-box box) (if (null? fields) (error "init-fields is required before using field-energy-in-box")) (meep-fields-field-energy-in-box fields box)) ; **************************************************************** ; Load helper functions for Casimir-force calculations (if (defined? 'meep-component-Ex) (include "casimir.scm")) ; **************************************************************** ; Load GNU Readline support, for easier command-line editing support. ; This is not loaded in by default in Guile 1.3.2+ because readline is ; licensed under the GPL, which would have caused Guile to effectively ; be under the GPL itself. However, since Meep is under the GPL too, ; we can load Readline by default with no problems. @ACTIVATE_READLINE@ ; command to activate readline is determined by configure (set! scm-repl-prompt "meep> ") ; **************************************************************** meep-openmpi-1.1.1/tests/0000755000175200017520000000000011244567007014507 5ustar debiandebianmeep-openmpi-1.1.1/tests/Makefile.in0000644000175200017520000010675311243546263016570 0ustar debiandebian# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = bench$(EXEEXT) bragg_transmission$(EXEEXT) \ convergence_cyl_waveguide$(EXEEXT) cylindrical$(EXEEXT) \ flux$(EXEEXT) harmonics$(EXEEXT) integrate$(EXEEXT) \ known_results$(EXEEXT) one_dimensional$(EXEEXT) \ physical$(EXEEXT) symmetry$(EXEEXT) three_d$(EXEEXT) \ two_dimensional$(EXEEXT) 2D_convergence$(EXEEXT) \ h5test$(EXEEXT) pml$(EXEEXT) TESTS = bench$(EXEEXT) bragg_transmission$(EXEEXT) \ convergence_cyl_waveguide$(EXEEXT) cylindrical$(EXEEXT) \ flux$(EXEEXT) harmonics$(EXEEXT) integrate$(EXEEXT) \ known_results$(EXEEXT) one_dimensional$(EXEEXT) \ physical$(EXEEXT) symmetry$(EXEEXT) three_d$(EXEEXT) \ two_dimensional$(EXEEXT) 2D_convergence$(EXEEXT) \ h5test$(EXEEXT) pml$(EXEEXT) subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_2D_convergence_OBJECTS = 2D_convergence.$(OBJEXT) 2D_convergence_OBJECTS = $(am_2D_convergence_OBJECTS) 2D_convergence_DEPENDENCIES = $(LIBMEEP) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent am_bench_OBJECTS = bench.$(OBJEXT) bench_OBJECTS = $(am_bench_OBJECTS) bench_DEPENDENCIES = $(LIBMEEP) am_bragg_transmission_OBJECTS = bragg_transmission.$(OBJEXT) bragg_transmission_OBJECTS = $(am_bragg_transmission_OBJECTS) bragg_transmission_DEPENDENCIES = $(LIBMEEP) am_convergence_cyl_waveguide_OBJECTS = \ convergence_cyl_waveguide.$(OBJEXT) convergence_cyl_waveguide_OBJECTS = \ $(am_convergence_cyl_waveguide_OBJECTS) convergence_cyl_waveguide_DEPENDENCIES = $(LIBMEEP) am_cylindrical_OBJECTS = cylindrical.$(OBJEXT) cylindrical_OBJECTS = $(am_cylindrical_OBJECTS) cylindrical_DEPENDENCIES = $(LIBMEEP) am_flux_OBJECTS = flux.$(OBJEXT) flux_OBJECTS = $(am_flux_OBJECTS) flux_DEPENDENCIES = $(LIBMEEP) am_h5test_OBJECTS = h5test.$(OBJEXT) h5test_OBJECTS = $(am_h5test_OBJECTS) h5test_DEPENDENCIES = $(LIBMEEP) am_harmonics_OBJECTS = harmonics.$(OBJEXT) harmonics_OBJECTS = $(am_harmonics_OBJECTS) harmonics_DEPENDENCIES = $(LIBMEEP) am_integrate_OBJECTS = integrate.$(OBJEXT) integrate_OBJECTS = $(am_integrate_OBJECTS) integrate_DEPENDENCIES = $(LIBMEEP) am_known_results_OBJECTS = known_results.$(OBJEXT) known_results_OBJECTS = $(am_known_results_OBJECTS) known_results_DEPENDENCIES = $(LIBMEEP) am_one_dimensional_OBJECTS = one_dimensional.$(OBJEXT) one_dimensional_OBJECTS = $(am_one_dimensional_OBJECTS) one_dimensional_DEPENDENCIES = $(LIBMEEP) am_physical_OBJECTS = physical.$(OBJEXT) physical_OBJECTS = $(am_physical_OBJECTS) physical_DEPENDENCIES = $(LIBMEEP) am_pml_OBJECTS = pml.$(OBJEXT) pml_OBJECTS = $(am_pml_OBJECTS) pml_DEPENDENCIES = $(LIBMEEP) am_symmetry_OBJECTS = symmetry.$(OBJEXT) symmetry_OBJECTS = $(am_symmetry_OBJECTS) symmetry_DEPENDENCIES = $(LIBMEEP) am_three_d_OBJECTS = three_d.$(OBJEXT) three_d_OBJECTS = $(am_three_d_OBJECTS) three_d_DEPENDENCIES = $(LIBMEEP) am_two_dimensional_OBJECTS = two_dimensional.$(OBJEXT) two_dimensional_OBJECTS = $(am_two_dimensional_OBJECTS) two_dimensional_DEPENDENCIES = $(LIBMEEP) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_$(V)) am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) am__v_CXX_0 = @echo " CXX " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_$(V)) am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) am__v_CXXLD_0 = @echo " CXXLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(2D_convergence_SOURCES) $(bench_SOURCES) \ $(bragg_transmission_SOURCES) \ $(convergence_cyl_waveguide_SOURCES) $(cylindrical_SOURCES) \ $(flux_SOURCES) $(h5test_SOURCES) $(harmonics_SOURCES) \ $(integrate_SOURCES) $(known_results_SOURCES) \ $(one_dimensional_SOURCES) $(physical_SOURCES) $(pml_SOURCES) \ $(symmetry_SOURCES) $(three_d_SOURCES) \ $(two_dimensional_SOURCES) DIST_SOURCES = $(2D_convergence_SOURCES) $(bench_SOURCES) \ $(bragg_transmission_SOURCES) \ $(convergence_cyl_waveguide_SOURCES) $(cylindrical_SOURCES) \ $(flux_SOURCES) $(h5test_SOURCES) $(harmonics_SOURCES) \ $(integrate_SOURCES) $(known_results_SOURCES) \ $(one_dimensional_SOURCES) $(physical_SOURCES) $(pml_SOURCES) \ $(symmetry_SOURCES) $(three_d_SOURCES) \ $(two_dimensional_SOURCES) ETAGS = etags CTAGS = ctags # If stdout is a non-dumb tty, use colors. If test -t is not supported, # then this fails; a conservative approach. Of course do not redirect # stdout here, just stderr. am__tty_colors = \ red=; grn=; lgn=; blu=; std=; \ test "X$(AM_COLOR_TESTS)" != Xno \ && test "X$$TERM" != Xdumb \ && { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ && { \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ std=''; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' # Restructured Text title and section. am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//' am__rst_section = sed 'p;s/./=/g;p;g' # Put stdin (possibly several lines separated by ". ") in a box. am__text_box = $(AWK) '{ \ n = split($$0, lines, "\\. "); max = 0; \ for (i = 1; i <= n; ++i) \ if (max < length(lines[i])) \ max = length(lines[i]); \ for (i = 0; i < max; ++i) line = line "="; \ print line; \ for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\ print line; \ }' # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL). This contradicts POSIX. Work around the problem # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log, and passes # TESTS_ENVIRONMENT. Save and restore TERM around use of # TESTS_ENVIRONMENT, in case that unsets it. am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ srcdir=$(srcdir); export srcdir; \ rm -f $@-t; \ trap 'st=$$?; rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st' \ 1 2 13 15; \ am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \ $(TESTS_ENVIRONMENT) RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check check-html recheck recheck-html TEST_SUITE_LOG = test-suite.log TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html) TEST_EXTENSIONS = @EXEEXT@ .test LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SRC = bench.cpp bragg_transmission.cpp convergence_cyl_waveguide.cpp \ cylindrical.cpp flux.cpp harmonics.cpp integrate.cpp known_results.cpp \ one_dimensional.cpp physical.cpp symmetry.cpp three_d.cpp \ two_dimensional.cpp 2D_convergence.cpp h5test.cpp pml.cpp EXTRA_DIST = $(SRC) OBJ = $(SRC:.cpp=.o) DAC = $(SRC:.cpp=.dac) DONE = $(SRC:.cpp=.done) LIBMEEP = $(top_builddir)/src/libmeep@MEEP_SUFFIX@.la AM_CPPFLAGS = -I$(top_srcdir)/src .SUFFIXES = .dac .done bench_SOURCES = bench.cpp bench_LDADD = $(LIBMEEP) bragg_transmission_SOURCES = bragg_transmission.cpp bragg_transmission_LDADD = $(LIBMEEP) convergence_cyl_waveguide_SOURCES = convergence_cyl_waveguide.cpp convergence_cyl_waveguide_LDADD = $(LIBMEEP) cylindrical_SOURCES = cylindrical.cpp cylindrical_LDADD = $(LIBMEEP) flux_SOURCES = flux.cpp flux_LDADD = $(LIBMEEP) harmonics_SOURCES = harmonics.cpp harmonics_LDADD = $(LIBMEEP) integrate_SOURCES = integrate.cpp integrate_LDADD = $(LIBMEEP) known_results_SOURCES = known_results.cpp known_results_LDADD = $(LIBMEEP) one_dimensional_SOURCES = one_dimensional.cpp one_dimensional_LDADD = $(LIBMEEP) physical_SOURCES = physical.cpp physical_LDADD = $(LIBMEEP) symmetry_SOURCES = symmetry.cpp symmetry_LDADD = $(LIBMEEP) three_d_SOURCES = three_d.cpp three_d_LDADD = $(LIBMEEP) two_dimensional_SOURCES = two_dimensional.cpp two_dimensional_LDADD = $(LIBMEEP) 2D_convergence_SOURCES = 2D_convergence.cpp 2D_convergence_LDADD = $(LIBMEEP) h5test_SOURCES = h5test.cpp h5test_LDADD = $(LIBMEEP) pml_SOURCES = pml.cpp pml_LDADD = $(LIBMEEP) LOG_COMPILER = $(RUNCODE) all: all-am .SUFFIXES: .SUFFIXES: .cpp .dac .done .html .lo .log .o .obj .test .test$(EXEEXT) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list 2D_convergence$(EXEEXT): $(2D_convergence_OBJECTS) $(2D_convergence_DEPENDENCIES) @rm -f 2D_convergence$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(2D_convergence_OBJECTS) $(2D_convergence_LDADD) $(LIBS) bench$(EXEEXT): $(bench_OBJECTS) $(bench_DEPENDENCIES) @rm -f bench$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(bench_OBJECTS) $(bench_LDADD) $(LIBS) bragg_transmission$(EXEEXT): $(bragg_transmission_OBJECTS) $(bragg_transmission_DEPENDENCIES) @rm -f bragg_transmission$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(bragg_transmission_OBJECTS) $(bragg_transmission_LDADD) $(LIBS) convergence_cyl_waveguide$(EXEEXT): $(convergence_cyl_waveguide_OBJECTS) $(convergence_cyl_waveguide_DEPENDENCIES) @rm -f convergence_cyl_waveguide$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(convergence_cyl_waveguide_OBJECTS) $(convergence_cyl_waveguide_LDADD) $(LIBS) cylindrical$(EXEEXT): $(cylindrical_OBJECTS) $(cylindrical_DEPENDENCIES) @rm -f cylindrical$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(cylindrical_OBJECTS) $(cylindrical_LDADD) $(LIBS) flux$(EXEEXT): $(flux_OBJECTS) $(flux_DEPENDENCIES) @rm -f flux$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(flux_OBJECTS) $(flux_LDADD) $(LIBS) h5test$(EXEEXT): $(h5test_OBJECTS) $(h5test_DEPENDENCIES) @rm -f h5test$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(h5test_OBJECTS) $(h5test_LDADD) $(LIBS) harmonics$(EXEEXT): $(harmonics_OBJECTS) $(harmonics_DEPENDENCIES) @rm -f harmonics$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(harmonics_OBJECTS) $(harmonics_LDADD) $(LIBS) integrate$(EXEEXT): $(integrate_OBJECTS) $(integrate_DEPENDENCIES) @rm -f integrate$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(integrate_OBJECTS) $(integrate_LDADD) $(LIBS) known_results$(EXEEXT): $(known_results_OBJECTS) $(known_results_DEPENDENCIES) @rm -f known_results$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(known_results_OBJECTS) $(known_results_LDADD) $(LIBS) one_dimensional$(EXEEXT): $(one_dimensional_OBJECTS) $(one_dimensional_DEPENDENCIES) @rm -f one_dimensional$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(one_dimensional_OBJECTS) $(one_dimensional_LDADD) $(LIBS) physical$(EXEEXT): $(physical_OBJECTS) $(physical_DEPENDENCIES) @rm -f physical$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(physical_OBJECTS) $(physical_LDADD) $(LIBS) pml$(EXEEXT): $(pml_OBJECTS) $(pml_DEPENDENCIES) @rm -f pml$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pml_OBJECTS) $(pml_LDADD) $(LIBS) symmetry$(EXEEXT): $(symmetry_OBJECTS) $(symmetry_DEPENDENCIES) @rm -f symmetry$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(symmetry_OBJECTS) $(symmetry_LDADD) $(LIBS) three_d$(EXEEXT): $(three_d_OBJECTS) $(three_d_DEPENDENCIES) @rm -f three_d$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(three_d_OBJECTS) $(three_d_LDADD) $(LIBS) two_dimensional$(EXEEXT): $(two_dimensional_OBJECTS) $(two_dimensional_DEPENDENCIES) @rm -f two_dimensional$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(two_dimensional_OBJECTS) $(two_dimensional_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/2D_convergence.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bragg_transmission.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convergence_cyl_waveguide.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cylindrical.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/harmonics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integrate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/known_results.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/one_dimensional.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/physical.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symmetry.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/three_d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/two_dimensional.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # To be appended to the command running the test. Handle the stdout # and stderr redirection, and catch the exit status. am__check_post = \ >$@-t 2>&1; \ estatus=$$?; \ if test -n '$(DISABLE_HARD_ERRORS)' \ && test $$estatus -eq 99; then \ estatus=1; \ fi; \ TERM=$$__SAVED_TERM; export TERM; \ $(am__tty_colors); \ xfailed=PASS; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ xfailed=XFAIL;; \ esac; \ case $$estatus:$$xfailed in \ 0:XFAIL) col=$$red; res=XPASS;; \ 0:*) col=$$grn; res=PASS ;; \ 77:*) col=$$blu; res=SKIP ;; \ 99:*) col=$$red; res=FAIL ;; \ *:XFAIL) col=$$lgn; res=XFAIL;; \ *:*) col=$$red; res=FAIL ;; \ esac; \ echo "$${col}$$res$${std}: $$f"; \ echo "$$res: $$f (exit: $$estatus)" | \ $(am__rst_section) >$@; \ cat $@-t >>$@; \ rm -f $@-t $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__sh_e_setup); \ list='$(TEST_LOGS)'; \ results=`for f in $$list; do \ read line < $$f && echo "$$line" || echo FAIL; \ done`; \ all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \ fail=`echo "$$results" | grep -c '^FAIL'`; \ pass=`echo "$$results" | grep -c '^PASS'`; \ skip=`echo "$$results" | grep -c '^SKIP'`; \ xfail=`echo "$$results" | grep -c '^XFAIL'`; \ xpass=`echo "$$results" | grep -c '^XPASS'`; \ failures=`expr $$fail + $$xpass`; \ all=`expr $$all - $$skip`; \ if test "$$all" -eq 1; then tests=test; All=; \ else tests=tests; All="All "; fi; \ case fail=$$fail:xpass=$$xpass:xfail=$$xfail in \ fail=0:xpass=0:xfail=0) \ msg="$$All$$all $$tests passed. "; \ exit=true;; \ fail=0:xpass=0:xfail=*) \ msg="$$All$$all $$tests behaved as expected"; \ if test "$$xfail" -eq 1; then xfailures=failure; \ else xfailures=failures; fi; \ msg="$$msg ($$xfail expected $$xfailures). "; \ exit=true;; \ fail=*:xpass=0:xfail=*) \ msg="$$fail of $$all $$tests failed. "; \ exit=false;; \ fail=*:xpass=*:xfail=*) \ msg="$$failures of $$all $$tests did not behave as expected"; \ if test "$$xpass" -eq 1; then xpasses=pass; \ else xpasses=passes; fi; \ msg="$$msg ($$xpass unexpected $$xpasses). "; \ exit=false;; \ *) \ echo >&2 "incorrect case"; exit 4;; \ esac; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ msg="$$msg($$skip test was not run). "; \ else \ msg="$$msg($$skip tests were not run). "; \ fi; \ fi; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ echo "$$msg"; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for f in $$list; do \ read line < $$f; \ case $$line in \ PASS:*|XFAIL:*);; \ *) echo; cat $$f;; \ esac; \ done; \ } >$(TEST_SUITE_LOG).tmp; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if test "$$failures" -ne 0; then \ msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ msg="$${msg}Please report to $(PACKAGE_BUGREPORT). "; \ fi; \ fi; \ test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \ $(am__tty_colors); \ if $$exit; then \ echo $(ECHO_N) "$$grn$(ECHO_C)"; \ else \ echo $(ECHO_N) "$$red$(ECHO_C)"; \ fi; \ echo "$$msg" | $(am__text_box); \ echo $(ECHO_N) "$$std$(ECHO_C)"; \ $$exit # Run all the tests. check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set_logs=; if test "X$(TEST_LOGS)" = X.log; then \ set_logs=TEST_LOGS=; \ fi; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs .log.html: @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \ for r2h in $$list; do \ if ($$r2h --version) >/dev/null 2>&1; then \ R2H=$$r2h; \ fi; \ done; \ if test -z "$$R2H"; then \ echo >&2 "cannot find rst2html, cannot create $@"; \ exit 2; \ fi; \ $$R2H $< >$@.tmp @mv $@.tmp $@ # Be sure to run check first, and then to convert the result. # Beware of concurrent executions. Run "check" not "check-TESTS", as # check-SCRIPTS and other dependencies are rebuilt by the former only. # And expect check to fail. check-html: @if $(MAKE) $(AM_MAKEFLAGS) check; then \ rv=0; else rv=$$?; \ fi; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \ exit $$rv recheck recheck-html: @target=`echo $@ | sed 's,^re,,'`; \ list='$(TEST_LOGS)'; \ list=`for f in $$list; do \ test -f $$f || continue; \ if read line < $$f; then \ case $$line in FAIL*|XPASS*) echo $$f;; esac; \ else echo $$f; fi; \ done | tr '\012\015' ' '`; \ $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"' bench.log: bench$(EXEEXT) @p='bench$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) bragg_transmission.log: bragg_transmission$(EXEEXT) @p='bragg_transmission$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) convergence_cyl_waveguide.log: convergence_cyl_waveguide$(EXEEXT) @p='convergence_cyl_waveguide$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) cylindrical.log: cylindrical$(EXEEXT) @p='cylindrical$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) flux.log: flux$(EXEEXT) @p='flux$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) harmonics.log: harmonics$(EXEEXT) @p='harmonics$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) integrate.log: integrate$(EXEEXT) @p='integrate$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) known_results.log: known_results$(EXEEXT) @p='known_results$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) one_dimensional.log: one_dimensional$(EXEEXT) @p='one_dimensional$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) physical.log: physical$(EXEEXT) @p='physical$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) symmetry.log: symmetry$(EXEEXT) @p='symmetry$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) three_d.log: three_d$(EXEEXT) @p='three_d$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) two_dimensional.log: two_dimensional$(EXEEXT) @p='two_dimensional$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) 2D_convergence.log: 2D_convergence$(EXEEXT) @p='2D_convergence$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) h5test.log: h5test$(EXEEXT) @p='h5test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) pml.log: pml$(EXEEXT) @p='pml$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) .test.log: @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP) -test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am check-html install-am install-strip recheck \ recheck-html .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am check-html \ clean clean-checkPROGRAMS clean-generic clean-libtool \ clean-local ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck recheck-html tags uninstall uninstall-am # Note: this requires GNU make .o.dac: $(CXXLINK) $< $(LIBMEEP) $(LIBS) $(DAC): $(LIBMEEP) .dac.done: $(RUNCODE) ./$< touch $@ benchmark: bench $(RUNCODE) ./bench dac: $(DAC) clean-local:: rm -f *.o *.dac debug_out_* *.done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-openmpi-1.1.1/tests/2D_convergence.cpp0000644000175200017520000000731411243101206020023 0ustar debiandebian#include using namespace meep; #include "config.h" const double diameter = 0.8; const double r = diameter*0.5; double holey_2d(const vec &xx) { const grid_volume gv = vol2d(2.0,1.0,100.0); vec p = xx - gv.center(); while (p.x() <-0.5) p += vec(1.0,0); while (p.x() > 0.5) p -= vec(1.0,0); while (p.y() <-0.5) p += vec(0,1.0); while (p.y() > 0.5) p -= vec(0,1.0); if (fabs(p & p) < r*r - 1e-12) return 1.0; return 12.0; } double holey_shifted_2d(const vec &xx) { return holey_2d(xx + vec(pi*0.01, 3 - pi)*0.5); } double get_the_freq(monitor_point *p, component c) { complex *amp, *freqs; int num; p->harminv(c, &, &freqs, &num, 0.15, 0.20, 8); if (!num) return 0.0; double best_amp = abs(amp[0]), best_freq = fabs(real(freqs[0])); for (int i=1;i best_amp && fabs(imag(freqs[i])/real(freqs[i])) < 0.002) { best_amp = abs(amp[i]); best_freq = fabs(real(freqs[i])); } delete[] freqs; delete[] amp; return best_freq; } double freq_at_resolution(double e(const vec &), double a, component c) { const grid_volume gv = vol2d(2.0,1.0,a); structure s(gv, e); s.set_epsilon(e); fields f(&s); f.use_real_fields(); f.use_bloch(vec(0,0)); f.add_point_source(c, 0.18, 2.5, 0.0, 6.0, vec(0.5,0.5), 1.0); f.add_point_source(c, 0.18, 2.5, 0.0, 6.0, vec(1.5,0.5),-1.0); while (f.time() <= f.last_source_time() + 10.0 && !interrupt) f.step(); const double fourier_timesteps = 3000.0; const double ttot = fourier_timesteps/a + f.time(); monitor_point *p = NULL; while (f.time() <= ttot) { f.step(); p = f.get_new_point(vec(0.52,0.97), p); } const double freq = get_the_freq(p, c); delete p; return freq; } void check_convergence(component c, double best_guess) { const double amin = 5.0, amax = 30.0, adelta = 5.0; master_printf("Checking convergence for %s field...\n", component_name(c)); if (best_guess) master_printf("(The correct frequency should be %g.)\n", best_guess); for (double a=amax; a >= amin; a-=adelta) { const double freq = freq_at_resolution(holey_2d, a, c); const double freq_shifted = freq_at_resolution(holey_shifted_2d, a, c); // Initialize best guess at the correct freq. if (!best_guess) { best_guess = freq + 0.5*(freq_shifted - freq); master_printf("The frequency is approximately %g\n", best_guess); } else { master_printf("frequency for a=%g is %g, %g (shifted), %g (mean)\n", a, freq, freq_shifted, 0.5 * (freq + freq_shifted)); master_printf("Unshifted freq error is %g/%g/%g\n", (freq - best_guess)*a*a, a, a); if (fabs(freq - best_guess)*a*a > 0.4) abort("Frequency doesn't converge properly with a.\n"); master_printf("Shifted freq error is %g/%g/%g\n", (freq_shifted - best_guess)*a*a, a, a); if (fabs(freq_shifted - best_guess)*a*a > 0.4) abort("Frequency doesn't converge properly with a.\n"); } // Check frequency difference... master_printf("Frequency difference with a of %g is %g/%g/%g\n", a, (freq - freq_shifted)*a*a, a, a); if (fabs(freq - freq_shifted)*a*a > 0.4) abort("Frequency difference = doesn't converge properly with a.\n"); } master_printf("Passed 2D resolution convergence test for %s!\n", component_name(c)); } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; #ifdef HAVE_HARMINV master_printf("Running holes square-lattice resolution convergence test.\n"); double best_guess = 0.0; check_convergence(Ey, 0.179944); // from MPB; correct to >= 4 decimal places check_convergence(Ez, 0.166998); // from MPB; correct to >= 4 decimal places #endif return 0; } meep-openmpi-1.1.1/tests/cylindrical.cpp0000644000175200017520000003216311243153233017504 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; double one(const vec &) { return 1.0; } int compare(double a, double b, const char *n, double eps=4e-15) { if (sizeof(realnum) == sizeof(float)) eps = sqrt(eps)*10; if (fabs(a-b) > fabs(b)*eps && fabs(b) > 1e-14) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p, double eps=4e-8) { if (sizeof(realnum) == sizeof(float)) eps = sqrt(eps); monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > eps*abs(v2) && abs(v2) > eps*100) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g %g, time %g\n", p.r(), p.z(), f1.time()); all_wait(); return 0; } } } return 1; } int test_simple_periodic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 30.0; grid_volume gv = volcyl(1.5,0.8,a); structure s1(gv, eps, no_pml(), identity(), 0, 0.4); structure s(gv, eps, no_pml(), identity(), splitting, 0.4); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); for (int m=0;m<3;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("Trying with m = %d and a splitting into %d chunks...\n", m, splitting); fields f(&s, m); f.use_bloch(0.0); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); fields f1(&s1, m); f1.use_bloch(0.0); f1.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); if (!compare(f1.count_volume(Ep), f.count_volume(Ep), "grid_volume")) return 0; master_printf("Chunks are %g by %g\n", f.chunks[0]->gv.nr()/a, f.chunks[0]->gv.nz()/a); double total_energy_check_time = 29.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.5, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.46, 0.36))) return 0; if (!compare_point(f, f1, veccyl(1.0, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.01, 0.02))) return 0; if (!compare_point(f, f1, veccyl(0.601, 0.701))) return 0; if (f.time() >= total_energy_check_time) { if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; total_energy_check_time += 5.0; } } } return 1; } int test_simple_metallic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 30.0; grid_volume gv = volcyl(1.5,0.8,a); structure s1(gv, eps, no_pml(), identity(), 0, 0.4); structure s(gv, eps, no_pml(), identity(), splitting, 0.4); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); for (int m=0;m<3;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("Metallic with m = %d and a splitting into %d chunks...\n", m, splitting); fields f(&s, m); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); fields f1(&s1, m); f1.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); if (!compare(f1.count_volume(Ep), f.count_volume(Ep), "grid_volume")) return 0; master_printf("Chunks are %g by %g\n", f.chunks[0]->gv.nr()/a, f.chunks[0]->gv.nz()/a); double total_energy_check_time = 29.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.5, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.46, 0.36))) return 0; if (!compare_point(f, f1, veccyl(1.0, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.01, 0.02))) return 0; if (!compare_point(f, f1, veccyl(0.601, 0.701))) return 0; if (f.time() >= total_energy_check_time) { if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; total_energy_check_time += 5.0; } } } return 1; } int test_r_equals_zero(double eps(const vec &), const char *mydirname) { double a = 10.0; double ttot = 3.0; grid_volume gv = volcyl(1.5,0.8,a); structure s(gv, eps, no_pml(), identity(), 0, 0.4); s.set_output_directory(mydirname); for (int m=0;m<3;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("Checking at r == 0 with m = %d...\n", m); fields f(&s, m); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); while (f.time() < ttot) f.step(); monitor_point p; f.get_point(&p, veccyl(0.0, 0.5)); if (p.get_component(Ez) != 0.0 && (m & 1)) { master_printf("Got non-zero Ez with m == %d\n", m); return 0; } if (p.get_component(Hz) != 0.0 && (m & 1)) { master_printf("Got non-zero Hz with m == %d\n", m); return 0; } if (p.get_component(Er) != 0.0 && !(m & 1)) { master_printf("Got non-zero Er with m == %d\n", m); return 0; } if (p.get_component(Ep) != 0.0 && !(m & 1)) { master_printf("Got non-zero Ep with m == %d\n", m); return 0; } if (p.get_component(Hr) != 0.0 && !(m & 1)) { master_printf("Got non-zero Hr with m == %d\n", m); return 0; } if (p.get_component(Hp) != 0.0 && !(m & 1)) { master_printf("Got non-zero Hp of %g %g with m == %d\n", real(p.get_component(Hp)), imag(p.get_component(Hp)), m); return 0; } } return 1; } int test_pml(double eps(const vec &), int splitting, const char *mydirname) { double a = 8; double ttot = 25.0; grid_volume gv = volcyl(3.5,10.0,a); structure s1(gv, eps, pml(2.0), identity(), 0, 0.4); structure s(gv, eps, pml(2.0), identity(), splitting, 0.4); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); for (int m=0;m<3;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("PML with m = %d and a splitting into %d chunks...\n", m, splitting); fields f(&s, m); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.3, 7.0), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.3, 7.0), 1.0); fields f1(&s1, m); f1.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.3, 7.0), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.3, 7.0), 1.0); if (!compare(f1.count_volume(Ep), f.count_volume(Ep), "grid_volume", 3e-14)) return 0; master_printf("Chunks are %g by %g\n", f.chunks[0]->gv.nr()/a, f.chunks[0]->gv.nz()/a); double total_energy_check_time = 10.0; while (f.time() < ttot) { f.step(); f1.step(); //f.output_real_imaginary_slices("multi"); //f1.output_real_imaginary_slices("single"); if (!compare_point(f, f1, veccyl(0.5, 7.0))) return 0; if (!compare_point(f, f1, veccyl(0.46, 0.36))) return 0; if (!compare_point(f, f1, veccyl(1.0, 0.4))) return 0; if (!compare_point(f, f1, veccyl(0.01, 0.02))) return 0; if (!compare_point(f, f1, veccyl(0.601, 0.701))) return 0; if (f.time() >= total_energy_check_time) { if (!compare(f.total_energy(), f1.total_energy(), "pml total energy", 1e-13)) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy", 1e-13)) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy", 1e-13)) return 0; total_energy_check_time += 10.0; } } } return 1; } complex checkers(const vec &pt) { const double ther = pt.r() + 0.0001; // Just to avoid roundoff issues. const double thez = pt.r() + 0.0001; // Just to avoid roundoff issues. int z = (int) (thez*5.0); int r = (int) (ther*5.0); int zz = (int) (thez*10.0); int rr = (int) (ther*10.0); if ((r & 1) ^ (z & 1)) return cos(thez*ther); if ((rr & 1) ^ (zz & 1)) return 1.0; return 0.0; } int test_pattern(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = volcyl(1.5,0.8,a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); for (int m=0;m<1;m++) { char m_str[10]; snprintf(m_str, 10, "%d", m); master_printf("Trying test pattern with m = %d and %d chunks...\n", m, splitting); fields f(&s, m); f.use_bloch(0.0); fields f1(&s1, m); f1.use_bloch(0.0); if (!compare(f1.count_volume(Ep), f.count_volume(Ep), "grid_volume")) return 0; master_printf("First chunk is %g by %g\n", f.chunks[0]->gv.nr()/a, f.chunks[0]->gv.nz()/a); f1.initialize_field(Hp, checkers); f.initialize_field(Hp, checkers); f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.751, 0.401))) return 0; if (!compare_point(f, f1, veccyl(0.01, 0.02))) return 0; if (!compare_point(f, f1, veccyl(1.0, 0.7))) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; } return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "cylindrical-out"; trash_output_directory(mydirname); master_printf("Testing cylindrical coords under different splittings...\n"); if (!test_r_equals_zero(one, mydirname)) abort("error in test_r_equals_zero"); for (int s=2;s<6;s++) if (!test_pattern(one, s, mydirname)) abort("error in test_pattern\n"); //if (!test_pattern(one, 8, mydirname)) abort("error in crazy test_pattern\n"); //if (!test_pattern(one, 120, mydirname)) abort("error in crazy test_pattern\n"); for (int s=2;s<4;s++) if (!test_simple_periodic(one, s, mydirname)) abort("error in test_simple_periodic\n"); //if (!test_simple_periodic(one, 8, mydirname)) // abort("error in crazy test_simple_periodic\n"); //if (!test_simple_periodic(one, 120, mydirname)) // abort("error in crazy test_simple_periodic\n"); for (int s=2;s<5;s++) if (!test_simple_metallic(one, s, mydirname)) abort("error in test_simple_metallic\n"); //if (!test_simple_metallic(one, 8, mydirname)) // abort("error in crazy test_simple_metallic\n"); //if (!test_simple_metallic(one, 120, mydirname)) // abort("error in crazy test_simple_metallic\n"); for (int s=2;s<6;s++) if (!test_pml(one, s, mydirname)) abort("error in test_pml\n"); return 0; } meep-openmpi-1.1.1/tests/one_dimensional.cpp0000644000175200017520000001325611243101206020345 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; double one(const vec &) { return 1.0; } #if MEEP_SINGLE static const double tol = 1e-3, thresh = 1e-10; #else static const double tol = 1e-11, thresh = 1e-12; #endif int compare(double a, double b, const char *n) { if (fabs(a-b) > fabs(b)*tol && fabs(b) > thresh) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > tol*abs(v2) && abs(v2) > thresh) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g, time %g\n", p.z(), f1.time()); return 0; } } } return 1; } int test_simple_periodic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 170.0; grid_volume gv = volone(6.0,a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Trying splitting into %d chunks...\n", splitting); fields f(&s); f.use_bloch(0.0); f.add_point_source(Hy, 0.7, 2.5, 0.0, 4.0, vec(0.5), 1.0); f.add_point_source(Ex, 0.8, 0.6, 0.0, 4.0, vec(0.401), 1.0); fields f1(&s1); f1.use_bloch(0.0); f1.add_point_source(Hy, 0.7, 2.5, 0.0, 4.0, vec(0.5), 1.0); f1.add_point_source(Ex, 0.8, 0.6, 0.0, 4.0, vec(0.401), 1.0); if (!compare(f1.count_volume(Ex), f.count_volume(Ex), "grid_volume")) return 0; double total_energy_check_time = 29.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 ))) return 0; if (!compare_point(f, f1, vec(0.46 ))) return 0; if (!compare_point(f, f1, vec(1.0 ))) return 0; if (!compare_point(f, f1, vec(0.01 ))) return 0; if (!compare_point(f, f1, vec(0.601))) return 0; if (f.time() >= total_energy_check_time) { if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; total_energy_check_time += 5.0; } } return 1; } complex checkers(const vec &pt) { const double thez = pt.z()+0.00001; int z = (int) (thez*5.0); int zz = (int) (thez*10.0); if (z & 1) return cos(thez); if (zz & 1) return 2.0; return 1.0; } int test_pattern(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = volone(6.0,a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Trying test pattern with %d chunks...\n", splitting); fields f(&s); f.use_bloch(0.0); fields f1(&s1); f1.use_bloch(0.0); if (!compare(f1.count_volume(Ex), f.count_volume(Ex), "grid_volume")) return 0; f1.initialize_field(Hy, checkers); f.initialize_field(Hy, checkers); f.step(); f1.step(); if (!compare_point(f, f1, vec(27.99))) return 0; if (!compare_point(f, f1, vec(42.01))) return 0; if (!compare_point(f, f1, vec(0.751))) return 0; if (!compare_point(f, f1, vec(0.01 ))) return 0; if (!compare_point(f, f1, vec(1.0 ))) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "one_dimensional-out"; master_printf("Testing one dimension under different splittings...\n"); for (int s=2;s<7;s++) if (!test_pattern(one, s, mydirname)) abort("error in test_pattern\n"); for (int s=2;s<7;s++) if (!test_simple_periodic(one, s, mydirname)) abort("error in test_simple_periodic\n"); return 0; } meep-openmpi-1.1.1/tests/convergence_cyl_waveguide.cpp0000644000175200017520000001417711243101206022412 0ustar debiandebian#include #include using namespace meep; #include "config.h" double eps(const vec &pt) { return ((pt.r() < 0.5+1e-6) ? 9.0 : 1.0); } #define MINRES 10 #define MAXRES 25 #define RESSTEP 3 // should be odd int find_exponent(double a_mean, double a_meansqr, double a2_mean, double a2_meansqr, const char *name) { // Verdict on convergence double a_sigma, a2_sigma; a_sigma = sqrt(a_meansqr - a_mean*a_mean); a2_sigma = sqrt(a2_meansqr - a2_mean*a2_mean); master_printf("%s a's: ", name); if (a2_sigma/a2_mean < 0.15) { master_printf("converged as %3.1e / (a*a)\n", a_mean); return 2; } else if (a_sigma/a_mean < 0.15) { master_printf("converged as %3.1e / a\n", a_mean); return 1; } else { master_printf("Not clear if it converges...\n"); return 0; } } void test_convergence_without_averaging() { double w0 = 0.2858964; // exact to last digit int n[2] = {0,0}; double a_mean[2] = {0,0}, a_meansqr[2] = {0,0}, a2_mean[2] = {0,0}, a2_meansqr[2] = {0,0}; for (int a = MINRES; a <= MAXRES; a += RESSTEP) { grid_volume vol = volcyl(1.0,0.0,a); structure s(vol, eps); fields f(&s, 1); f.use_bloch(0.1); f.set_boundary(High, R, Metallic); f.add_point_source(Hr, w0, 2.0, 0.0, 5.0, veccyl(0.2,0.0)); while (f.time() < f.last_source_time()) f.step(); int t_harminv_max = 2500; // try increasing this in case of failure complex *mon_data = new complex[t_harminv_max]; int t = 0; monitor_point mp; while (t < t_harminv_max) { f.step(); f.get_point(&mp, veccyl(0.2,0.0)); mon_data[t] = mp.get_component(Er); t++; } int maxbands = 10, nfreq; complex *amps = new complex[maxbands]; ; double *freq_re = new double[maxbands], *freq_im = new double[maxbands]; double *errors = new double[maxbands]; nfreq = do_harminv(mon_data, t_harminv_max - 1, f.dt, 0.10, 0.50, maxbands, amps, freq_re, freq_im, errors); double w = 0.0; for (int jf = 0; jf < nfreq; jf++) if (abs(freq_re[jf] - w0) < abs(w - w0)) w = freq_re[jf]; double e = -(w-w0)/w0, ea = e*a, ea2=e*a*a; // to check 1/a and 1/(a*a) convergence //master_printf("Using a = %d ...\n", a); //master_printf("a = %3d\tw = %g \t(w-w0)/w0*a = %4.2e \t(w-w0)/w0*a*a = %4.2e\n", a, w, ea, ea2); master_printf("noavg:, %d, %g, %g\n", a, w, fabs(e)); // Statistical analysis int index = (2*(a/2)==a) ? 0 : 1; // even / odd a_mean[index] += ea; a_meansqr[index] += ea*ea; a2_mean[index] += ea2; a2_meansqr[index] += ea2*ea2; n[index]++; } for (int i=0;i<2;i++) a_mean[i] /= n[i]; for (int i=0;i<2;i++) a_meansqr[i] /= n[i]; for (int i=0;i<2;i++) a2_mean[i] /= n[i]; for (int i=0;i<2;i++) a2_meansqr[i] /= n[i]; /* Note: in older versions of Meep, even with "no averaging" there was some funny averaging that happened to give quadratic convergence for the even-resolution cylindrical case here. We no longer do this -- "no averaging" really means no averaging now. */ if (find_exponent(a_mean[0], a_meansqr[0], a2_mean[0], a2_meansqr[0], "Even") != 1) abort("Failed even convergence test with no fancy averaging!\n"); if (find_exponent(a_mean[1], a_meansqr[1], a2_mean[1], a2_meansqr[1], "Odd") != 1) abort("Failed odd convergence test with no fancy averaging!\n"); master_printf("Passed convergence test with no fancy averaging!\n"); } void test_convergence_with_averaging() { double w0 = 0.2858964; // exact to last digit int n[2] = {0,0}; double a_mean[2] = {0,0}, a_meansqr[2] = {0,0}, a2_mean[2] = {0,0}, a2_meansqr[2] = {0,0}; for (int a = MINRES; a <= MAXRES; a += RESSTEP) { grid_volume vol = volcyl(1.0,0.0,a); structure s(vol, eps); s.set_epsilon(eps); fields f(&s, 1); f.use_bloch(0.1); f.set_boundary(High, R, Metallic); f.add_point_source(Hr, w0, 2.0, 0.0, 5.0, veccyl(0.2,0.0)); while (f.time() < f.last_source_time()) f.step(); int t_harminv_max = 2500; // try increasing this in case of failure complex *mon_data = new complex[t_harminv_max]; int t = 0; monitor_point mp; while (t < t_harminv_max) { f.step(); f.get_point(&mp, veccyl(0.2,0.0)); mon_data[t] = mp.get_component(Er); t++; } int maxbands = 10, nfreq; complex *amps = new complex[maxbands]; ; double *freq_re = new double[maxbands], *freq_im = new double[maxbands], *errors = new double[maxbands]; nfreq = do_harminv(mon_data, t_harminv_max - 1, f.dt, 0.10, 0.50, maxbands, amps, freq_re, freq_im, errors); double w = 0.0; for (int jf = 0; jf < nfreq; jf++) if (abs(freq_re[jf] - w0) < abs(w - w0)) w = freq_re[jf]; double e = -(w-w0)/w0, ea = e*a, ea2=e*a*a; // to check 1/a and 1/(a*a) convergence //master_printf("Using a = %d ...\n", a); //master_printf("a = %3d\tw = %g \t(w-w0)/w0*a = %4.2e \t(w-w0)/w0*a*a = %4.2e\n", a, w, ea, ea2); master_printf("avg:, %d, %g, %g\n", a, w, fabs(e)); // Statistical analysis int index = (2*(a/2)==a) ? 0 : 1; // even / odd a_mean[index] += ea; a_meansqr[index] += ea*ea; a2_mean[index] += ea2; a2_meansqr[index] += ea2*ea2; n[index]++; } for (int i=0;i<2;i++) a_mean[i] /= n[i]; for (int i=0;i<2;i++) a_meansqr[i] /= n[i]; for (int i=0;i<2;i++) a2_mean[i] /= n[i]; for (int i=0;i<2;i++) a2_meansqr[i] /= n[i]; if (find_exponent(a_mean[0], a_meansqr[0], a2_mean[0], a2_meansqr[0], "Even") != 2) abort("Failed convergence test with anisotropic dielectric averaging!\n"); if (find_exponent(a_mean[1], a_meansqr[1], a2_mean[1], a2_meansqr[1], "Odd") != 2) abort("Failed convergence test with anisotropic dielectric averaging!\n"); master_printf("Passed convergence test with anisotropic dielectric averaging!\n"); } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; #ifdef HAVE_HARMINV master_printf("Testing convergence of a waveguide mode frequency...\n"); test_convergence_without_averaging(); test_convergence_with_averaging(); #endif return 0; } meep-openmpi-1.1.1/tests/harmonics.cpp0000644000175200017520000001020311243101206017152 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Nonlinear test program checking 2nd and 3rd harmonic generation */ #include using namespace meep; double the_value = 1.0; double value(const vec &) { return the_value; } void harmonics(double freq, double chi2, double chi3, double J, double &A2, double &A3) { const double dpml = 5.0; const double res = 20; const double sz = 100+2*dpml; grid_volume gv = vol1d(sz, res); gv.center_origin(); the_value = 1.0; structure s(gv, value, pml(dpml)); the_value = chi2; s.set_chi2(value); the_value = chi3; s.set_chi3(value); fields f(&s); f.use_real_fields(); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ex, src, vec(-0.5 * sz + dpml), J); vec fpt(0.5 * sz - dpml - 0.5); dft_flux d1 = f.add_dft_flux(Z, volume(fpt), freq, freq, 1); dft_flux d2 = f.add_dft_flux(Z, volume(fpt), 2*freq, 2*freq, 1); dft_flux d3 = f.add_dft_flux(Z, volume(fpt), 3*freq, 3*freq, 1); double emax = 0; while (f.time() < f.last_source_time()) { emax = max(emax, abs(f.get_field(Ex, fpt))); f.step(); } do { double emaxcur = 0; double T = f.time() + 50; while (f.time() < T) { double e = abs(f.get_field(Ex, fpt)); emax = max(emax, e); emaxcur = max(emaxcur, e); f.step(); } if (emaxcur < 1e-6 * emax) break; } while(1); double *d1f = d1.flux(); double *d2f = d2.flux(); double *d3f = d3.flux(); A2 = *d2f / *d1f; A3 = *d3f / *d1f; master_printf("harmonics(%g,%g,%g) = %g, %g\n", chi2, chi3, J, A2, A3); delete[] d1f; delete[] d2f; delete[] d3f; } int different(double a, double a0, double thresh, const char *msg) { if (fabs(a - a0) > thresh * fabs(a0)) { master_printf("error: %s\n --- %g vs. %g (%g error > %g)\n", msg, a, a0, fabs(a - a0)/fabs(a0), thresh); return 1; } else return 0; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const double freq = 1.0 / 3.0; double a2, a3, a2_2, a3_2; double thresh = sizeof(realnum) == sizeof(float) ? 1e-4 : 1e-5; harmonics(freq, 0.27e-4, 1e-4, 1.0, a2, a3); if (different(a2, 9.80298e-07, thresh, "2nd harmonic mismatches known val")) return 1; if (different(a3, 9.97759e-07, thresh, "3rd harmonic mismatches known val")) return 1; harmonics(freq, 0.54e-4, 2e-4, 1.0, a2_2, a3_2); master_printf("doubling chi2, chi3 = %g x 2nd harmonic, %g x 3rd\n", a2_2 / a2, a3_2 / a3); if (different(a2_2 / a2, 4.0, 0.01, "incorrect chi2 scaling")) return 1; if (different(a3_2 / a3, 4.0, 0.01, "incorrect chi3 scaling")) return 1; harmonics(freq, 0.27e-4, 1e-4, 2.0, a2_2, a3_2); master_printf("doubling J = %g x 2nd harmonic, %g x 3rd\n", a2_2 / a2, a3_2 / a3); if (different(a2_2 / a2, 4.0, 0.01, "incorrect J scaling for 2nd harm.")) return 1; if (different(a3_2 / a3, 16.0, 0.01, "incorrect J scaling for 3rd harm.")) return 1; harmonics(freq, 0.27e-4, 0.0, 1.0, a2_2, a3_2); if (different(a2, a2_2, 1e-2, "chi3 has too big effect on 2nd harmonic")) return 1; if (a3_2 / a3 > 1e-4) { master_printf("error: too much 3rd harmonic without chi3\n"); return 1; } harmonics(freq, 0.0, 1e-4, 1.0, a2_2, a3_2); if (different(a3, a3_2, 1e-3, "chi2 has too big effect on 3rd harmonic")) return 1; if (a2_2 / a2 > 1e-5) { master_printf("error: too much 2nd harmonic without chi3\n"); return 1; } return 0; } meep-openmpi-1.1.1/tests/two_dimensional.cpp0000644000175200017520000003202211243101206020365 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; double one(const vec &) { return 1.0; } double targets(const vec &pt) { const double r = sqrt(pt.x()*pt.x() + pt.y()*pt.y()); double dr = r; while (dr > 1) dr -= 1; if (dr > 0.7001) return 12.0; return 1.0; } #if MEEP_SINGLE static const double tol = 1e-3, thresh = 1e-5; #else static const double tol = 1e-11, thresh = 1e-5; #endif int compare(double a, double b, const char *n) { if (fabs(a-b) > fabs(b)*tol && fabs(b) > thresh) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > tol * abs(v2) && abs(v2) > thresh) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g %g, time %g\n", p.x(), p.y(), f1.time()); return 0; } } } return 1; } int test_metal(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = voltwo(3.0, 2.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Metal test using %d chunks...\n", splitting); fields f(&s); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.5), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); fields f1(&s1); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.5), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); double total_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; if (f.time() >= total_energy_check_time) { if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; total_energy_check_time += 5.0; } } return 1; } int test_periodic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = voltwo(3.0, 2.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Periodic test using %d chunks...\n", splitting); fields f(&s); f.use_bloch(vec(0.1,0.7)); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.5), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); fields f1(&s1); f1.use_bloch(vec(0.1,0.7)); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.5), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); double total_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; if (f.time() >= total_energy_check_time) { if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; total_energy_check_time += 5.0; } } return 1; } int test_periodic_tm(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = voltwo(3.0, 2.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Periodic 2D TM test using %d chunks...\n", splitting); fields f(&s); f.use_bloch(vec(0.1,0.7)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); fields f1(&s1); f1.use_bloch(vec(0.1,0.7)); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.401), 1.0); double total_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; if (f.time() >= total_energy_check_time) { if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; total_energy_check_time += 5.0; } } return 1; } int test_pml(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = voltwo(3.0, 2.0, a); structure s1(gv, eps, pml(1.0, X) + pml(1.0, Y, High)); structure s(gv, eps, pml(1.0, X) + pml(1.0, Y, High), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing pml while splitting into %d chunks...\n", splitting); fields f(&s); f.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.5,0.5), 1.0); f.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.299,0.401), 1.0); fields f1(&s1); f1.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.5,0.5), 1.0); f1.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.299,0.401), 1.0); const double deltaT = 100.0; const double ttot = 3.1*deltaT; double total_energy_check_time = deltaT; while (f.time() < f.last_source_time()) f.step(); while (f1.time() < f1.last_source_time()) f1.step(); double last_energy = f.total_energy(); while (f.time() < ttot) { f.step(); f1.step(); if (f.time() >= total_energy_check_time) { if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; const double new_energy = f.total_energy(); if (!compare(new_energy, f1.total_energy(), " total energy")) return 0; if (new_energy > last_energy*1e-6) { master_printf("Energy decaying too slowly: from %g to %g (%g)\n", last_energy, new_energy, new_energy/last_energy); return 0; } else { master_printf("Got newE/oldE of %g\n", new_energy/last_energy); } total_energy_check_time += deltaT; } } return 1; } int test_pml_tm(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = voltwo(3.0, 3.0, a); structure s1(gv, eps, pml(1.0)); structure s(gv, eps, pml(1.0), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing TM pml while splitting into %d chunks...\n", splitting); fields f(&s); f.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.299,1.401), 1.0); fields f1(&s1); f1.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.299,1.401), 1.0); const double deltaT = 100.0; const double ttot = 3.1*deltaT; double total_energy_check_time = deltaT; while (f.time() < f.last_source_time()) f.step(); while (f1.time() < f1.last_source_time()) f1.step(); double last_energy = f.total_energy(); while (f.time() < ttot) { f.step(); f1.step(); if (f.time() >= total_energy_check_time) { if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; const double new_energy = f.total_energy(); if (!compare(new_energy, f1.total_energy(), " total energy")) return 0; if (new_energy > last_energy*4e-6) { master_printf("Energy decaying too slowly: from %g to %g (%g)\n", last_energy, new_energy, new_energy/last_energy); return 0; } else { master_printf("Got newE/oldE of %g\n", new_energy/last_energy); } total_energy_check_time += deltaT; } } return 1; } int test_pml_te(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = voltwo(3.0, 3.0, a); structure s1(gv, eps, pml(1.0)); structure s(gv, eps, pml(1.0), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing TE pml while splitting into %d chunks...\n", splitting); fields f(&s); f.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.5,1.5), 1.0); f.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.37,1.27), 1.0); fields f1(&s1); f1.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.5,1.5), 1.0); f1.add_point_source(Hz, 0.7, 1.5, 0.0, 4.0, vec(1.37,1.27), 1.0); const double deltaT = 100.0; const double ttot = 3.1*deltaT; double total_energy_check_time = deltaT; while (f.time() < f.last_source_time()) f.step(); while (f1.time() < f1.last_source_time()) f1.step(); double last_energy = f.total_energy(); while (f.time() < ttot) { f.step(); f1.step(); if (f.time() >= total_energy_check_time) { if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.0 , 1.0 ))) return 0; const double new_energy = f.total_energy(); if (!compare(new_energy, f1.total_energy(), " total energy")) return 0; if (new_energy > last_energy*1.1e-6) { master_printf("Energy decaying too slowly: from %g to %g (%g)\n", last_energy, new_energy, new_energy/last_energy); return 0; } else { master_printf("Got newE/oldE of %g\n", new_energy/last_energy); } total_energy_check_time += deltaT; } } return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "two_dimensional-out"; trash_output_directory(mydirname); master_printf("Testing 2D...\n"); for (int s=2;s<4;s++) if (!test_pml(one, s, mydirname)) abort("error in test_pml vacuum\n"); for (int s=2;s<4;s++) if (!test_pml_tm(one, s, mydirname)) abort("error in test_pml_tm vacuum\n"); for (int s=2;s<4;s++) if (!test_pml_te(one, s, mydirname)) abort("error in test_pml_te vacuum\n"); for (int s=2;s<4;s++) if (!test_metal(one, s, mydirname)) abort("error in test_metal vacuum\n"); //if (!test_metal(one, 200, mydirname)) abort("error in test_metal vacuum\n"); for (int s=2;s<5;s++) if (!test_metal(targets, s, mydirname)) abort("error in test_metal targets\n"); //if (!test_metal(targets, 60, mydirname)) abort("error in test_metal targets\n"); for (int s=2;s<5;s++) if (!test_periodic(targets, s, mydirname)) abort("error in test_periodic targets\n"); //if (!test_periodic(one, 200, mydirname)) // abort("error in test_periodic targets\n"); for (int s=2;s<4;s++) if (!test_periodic_tm(one, s, mydirname)) abort("error in test_periodic_tm vacuum\n"); return 0; } meep-openmpi-1.1.1/tests/h5test.cpp0000644000175200017520000003624711243101206016423 0ustar debiandebian#include #include #include #include #include #include #include "meep_internals.hpp" #include "config.h" using namespace meep; const double xsize = 2.0; const double ysize = 2.0; const double zsize = 0.6; const double r = 0.5; const double eps_k = 2*pi / 1.0; double funky_eps_2d(const vec &p_) { vec p = p_ - vec(xsize / 2, ysize / 2); if (fabs(p & p) < r * r) return 1.0; return 2.0 + cos(p.x() * eps_k) * cos(p.y() * eps_k); } double funky_eps_3d(const vec &p_) { vec p = p_ - vec(xsize / 2, ysize / 2, zsize / 2); if (fabs(p & p) < r * r) return 1.0; return 2.0 + cos(p.x() * eps_k) * cos(p.y() * eps_k) * cos(p.z() * eps_k); } symmetry make_identity(const grid_volume &gv) { (void) gv; // unused return identity(); } symmetry make_mirrorx(const grid_volume &gv) { return mirror(X, gv); } symmetry make_mirrory(const grid_volume &gv) { return mirror(Y, gv); } symmetry make_mirrorxy(const grid_volume &gv) { return mirror(X, gv) + mirror(Y, gv); } symmetry make_rotate4z(const grid_volume &gv) { return rotate4(Z, gv); } typedef symmetry (*symfunc)(const grid_volume &); const double tol = sizeof(realnum) == sizeof(float) ? 1e-4 : 1e-8; double compare(double a, double b, const char *nam, int i0,int i1,int i2) { if (fabs(a-b) > tol*tol + fabs(b) * tol || b != b) { master_printf("%g vs. %g differs by\t%g\n", a, b, fabs(a-b)); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); abort("Error in %s at (%d,%d,%d)\n", nam, i0,i1,i2); } return fabs(a-b); } double get_reim(complex x, int reim) { return reim ? imag(x) : real(x); } bool check_2d(double eps(const vec &), double a, int splitting, symfunc Sf, double kx, double ky, component src_c, int file_c, volume file_gv, bool real_fields, int expected_rank, const char *name) { const grid_volume gv = vol2d(xsize, ysize, a); structure s(gv, eps, no_pml(), Sf(gv), splitting); fields f(&s); f.use_bloch(X, real_fields ? 0.0 : kx); f.use_bloch(Y, real_fields ? 0.0 : ky); if (real_fields) f.use_real_fields(); f.add_point_source(src_c, 0.3, 2.0, 0.0, 1.0, gv.center(), 1.0, 1); if (file_c >= int(Dielectric)) real_fields = true; while (f.time() <= 3.0 && !interrupt) f.step(); h5file *file = f.open_h5file(name); if (is_derived(file_c)) f.output_hdf5(derived_component(file_c), file_gv, file); else f.output_hdf5(component(file_c), file_gv, file); file->write("stringtest", "Hello, world!\n"); delete file; all_wait(); sync(); file = f.open_h5file(name, h5file::READONLY); char *str = file->read("stringtest"); if (strcmp(str, "Hello, world!\n")) abort("Failed to read back string test from %s...", name); // compute corner coordinate of file data vec loc0(file_gv.get_min_corner()); ivec iloc0(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { iloc0.set_direction(d, 1+2*int(floor(loc0.in_direction(d)*a-.5))); if (file_gv.in_direction(d) == 0.0 && 1. - file_gv.in_direction_min(d)*a + 0.5*iloc0.in_direction(d) <= 1. + file_gv.in_direction_max(d)*a - 0.5*(iloc0.in_direction(d)+2)) iloc0.set_direction(d, iloc0.in_direction(d) + 2); // snap to grid } loc0 = gv[iloc0]; double data_min = meep::infinity, data_max = -meep::infinity; double err_max = 0; for (int reim = 0; reim < (real_fields ? 1 : 2); ++reim) { int rank, dims[2] = {1, 1}; char dataname[256]; snprintf(dataname, 256, "%s%s", component_name(file_c), reim ? ".i" : (real_fields ? "" : ".r")); realnum *h5data = file->read(dataname, &rank, dims, 2); file->prevent_deadlock(); // hackery if (!h5data) abort("failed to read dataset %s:%s\n", name, dataname); if (rank != expected_rank) abort("incorrect rank (%d instead of %d) in %s:%s\n", rank, expected_rank, name, dataname); if (expected_rank == 1 && file_gv.in_direction_min(X) == file_gv.in_direction_max(X)) { dims[1] = dims[0]; dims[0] = 1; } vec loc(loc0.dim); for (int i0 = 0; i0 < dims[0]; ++i0) { for (int i1 = 0; i1 < dims[1]; ++i1) { loc.set_direction(X, loc0.in_direction(X) + i0 * gv.inva); loc.set_direction(Y, loc0.in_direction(Y) + i1 * gv.inva); int idx = i0 * dims[1] + i1; /* Ugh, for rotational symmetries (which mix up components etc.), we can't guarantee that a component is *exactly* the same as its rotated version, and we don't know which one was written to the file. */ int cs = file_c; complex ph = 1.0; double diff = fabs(get_reim(f.get_field(file_c, loc), reim) - h5data[idx]); for (int sn = 1; sn < f.S.multiplicity(); ++sn) { vec loc2(f.S.transform(loc, sn)); int cs2 = f.S.transform(file_c, sn); complex ph2 = f.S.phase_shift(cs2, -sn); double diff2 = fabs(get_reim(f.get_field(cs2, loc2)*ph2, reim) - h5data[idx]); if (diff2 < diff) { loc = loc2; cs = cs2; ph = ph2; diff = diff2; } } double err = compare(h5data[idx], get_reim(f.get_field(cs, loc) * ph, reim), name, i0,i1,0); err_max = max(err, err_max); data_min = min(data_min, h5data[idx]); data_max = max(data_max, h5data[idx]); } } delete[] h5data; } file->remove(); delete file; master_printf("Passed %s (%g..%g), err=%g\n", name, data_min, data_max, err_max / max(fabs(data_min), fabs(data_max))); return true; } bool check_3d(double eps(const vec &), double a, int splitting, symfunc Sf, component src_c, int file_c, volume file_gv, bool real_fields, int expected_rank, const char *name) { const grid_volume gv = vol3d(xsize, ysize, zsize, a); structure s(gv, eps, no_pml(), Sf(gv), splitting); fields f(&s); if (real_fields) f.use_real_fields(); f.add_point_source(src_c, 0.3, 2.0, 0.0, 1.0, gv.center(), 1.0, 1); if (file_c >= Dielectric) real_fields = true; while (f.time() <= 3.0 && !interrupt) f.step(); h5file *file = f.open_h5file(name); if (is_derived(file_c)) f.output_hdf5(derived_component(file_c), file_gv, file); else f.output_hdf5(component(file_c), file_gv, file); file->write("stringtest", "Hello, world!\n"); delete file; all_wait(); sync(); file = f.open_h5file(name, h5file::READONLY); char *str = file->read("stringtest"); if (strcmp(str, "Hello, world!\n")) abort("Failed to read back string test from %s...", name); // compute corner coordinate of file data vec loc0(file_gv.get_min_corner()); ivec iloc0(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { iloc0.set_direction(d, 1+2*int(floor(loc0.in_direction(d)*a-.5))); if (file_gv.in_direction(d) == 0.0 && 1. - file_gv.in_direction_min(d)*a + 0.5*iloc0.in_direction(d) <= 1. + file_gv.in_direction_max(d)*a - 0.5*(iloc0.in_direction(d)+2)) iloc0.set_direction(d, iloc0.in_direction(d) + 2); // snap to grid } loc0 = gv[iloc0]; double data_min = meep::infinity, data_max = -meep::infinity; double err_max = 0; for (int reim = 0; reim < (real_fields ? 1 : 2); ++reim) { int rank, dims[3] = {1, 1, 1}; char dataname[256]; snprintf(dataname, 256, "%s%s", component_name(file_c), reim ? ".i" : (real_fields ? "" : ".r")); realnum *h5data = file->read(dataname, &rank, dims, 3); file->prevent_deadlock(); // hackery if (!h5data) abort("failed to read dataset %s:%s\n", name, dataname); if (rank != expected_rank) abort("incorrect rank (%d instead of %d) in %s:%s\n", rank, expected_rank, name, dataname); vec loc(loc0.dim); for (int i0 = 0; i0 < dims[0]; ++i0) { for (int i1 = 0; i1 < dims[1]; ++i1) { for (int i2 = 0; i2 < dims[2]; ++i2) { loc.set_direction(X, loc0.in_direction(X) + i0 * gv.inva); loc.set_direction(Y, loc0.in_direction(Y) + i1 * gv.inva); loc.set_direction(Z, loc0.in_direction(Z) + i2 * gv.inva); int idx = (i0 * dims[1] + i1) * dims[2] + i2; /* Ugh, for rotational symmetries (which mix up components etc.), we can't guarantee that a component is *exactly* the same as its rotated version, and we don't know which one was written to the file. */ int cs = file_c; complex ph = 1.0; double diff = fabs(get_reim(f.get_field(file_c, loc), reim) - h5data[idx]); for (int sn = 1; sn < f.S.multiplicity(); ++sn) { vec loc2(f.S.transform(loc, sn)); int cs2 = f.S.transform(file_c, sn); complex ph2 = f.S.phase_shift(cs2, -sn); double diff2 = fabs(get_reim(f.get_field(cs2, loc2)*ph2, reim) - h5data[idx]); if (diff2 < diff) { loc = loc2; cs = cs2; ph = ph2; diff = diff2; } } double err = compare(h5data[idx], get_reim(f.get_field(cs, loc)*ph,reim), name, i0,i1,i2); err_max = max(err, err_max); data_min = min(data_min, h5data[idx]); data_max = max(data_max, h5data[idx]); } } } delete[] h5data; } file->remove(); delete file; master_printf("Passed %s (%g..%g), err=%g\n", name, data_min, data_max, err_max / (max(fabs(data_min), fabs(data_max)) + 1e-16)); return 1; } bool check_2d_monitor(double eps(const vec &), double a, int splitting, symfunc Sf, component src_c, int file_c, const vec &pt, bool real_fields, const char *name) { const grid_volume gv = vol2d(xsize, ysize, a); structure s(gv, eps, no_pml(), Sf(gv), splitting); fields f(&s); if (real_fields) f.use_real_fields(); f.add_point_source(src_c, 0.3, 2.0, 0.0, 1.0, gv.center(), 1.0, 1); if (file_c >= Dielectric) real_fields = true; h5file *file = f.open_h5file(name); // compute pt snapped onto dielectric grid ivec iloc0(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { iloc0.set_direction(d, 1+2*int(floor(pt.in_direction(d)*a-.5))); if (1. - pt.in_direction(d)*a + 0.5*iloc0.in_direction(d) <= 1. + pt.in_direction(d)*a - 0.5*(iloc0.in_direction(d)+2)) iloc0.set_direction(d, iloc0.in_direction(d) + 2); // snap to grid } vec pt0(gv[iloc0]); const double T = 3.0; int NT = int(T / f.dt) + 2; complex *mon = new complex[NT]; while (f.time() <= T && !interrupt) { if (is_derived(file_c)) f.output_hdf5(derived_component(file_c), volume(pt, pt), file, true); else f.output_hdf5(component(file_c), volume(pt, pt), file, true); mon[f.t] = f.get_field(file_c, pt0); f.step(); } delete file; all_wait(); sync(); file = f.open_h5file(name, h5file::READONLY); double data_min = meep::infinity, data_max = -meep::infinity; double err_max = 0; for (int reim = 0; reim < (real_fields ? 1 : 2); ++reim) { int rank, dims[1] = {1}; char dataname[256]; snprintf(dataname, 256, "%s%s", component_name(file_c), reim ? ".i" : (real_fields ? "" : ".r")); realnum *h5data = file->read(dataname, &rank, dims, 2); file->prevent_deadlock(); // hackery if (!h5data) abort("failed to read dataset %s:%s\n", file->file_name(), dataname); if (rank != 1) abort("monitor-point data is not one-dimensional"); if (dims[0] != f.t) abort("incorrect size of monitor-point data"); for (int i = 0; i < f.t; ++i) { double err = compare(h5data[i], get_reim(mon[i], reim), name, i,0,0); err_max = max(err, err_max); data_min = min(data_min, h5data[i]); data_max = max(data_max, h5data[i]); } delete[] h5data; } delete[] mon; file->remove(); delete file; master_printf("Passed %s (%g..%g), err=%g\n", name, data_min, data_max, err_max / max(fabs(data_min), fabs(data_max))); return 1; } int main(int argc, char **argv) { const double a = 10.0; initialize mpi(argc, argv); int chances; quiet = true; #ifdef HAVE_HDF5 const double pad1 = 0.314159, pad2 = 0.27183, pad3 = 0.14142; volume gv_2d[4] = { volume(vec(pad1,pad2), vec(xsize-pad2,ysize-pad1)), volume(vec(-pad1,-pad2), vec(2*xsize-pad2,2*ysize-pad1)), volume(vec(pad1,pad2), vec(xsize-pad2,pad2)), volume(vec(pad1,pad2), vec(pad1,pad2)), }; char gv_2d_name[4][20] = {"plane", "plane-supercell", "line", "point"}; int gv_2d_rank[4] = {2,2,1,0}; int tm_c[5] = {Dielectric, Ez, Hy, Sx, D_EnergyDensity}; symfunc Sf2[5] = {make_identity, make_mirrorx, make_mirrory, make_mirrorxy, make_rotate4z}; char Sf2_name[5][32] = {"identity", "mirrorx", "mirrory", "mirrorxy", "rotate4z"}; double Sf2_kx[5] = {0.3, 0, 0.3, 0, 0}; double Sf2_ky[5] = {0.2, 0.2, 0, 0, 0}; #if 0 master_printf("Running initial check...\n"); if (!check_2d(funky_eps_2d, a, 1, Sf2[3], Sf2_kx[3], Sf2_ky[3], Ez, tm_c[3], gv_2d[1], 1, gv_2d_rank[1], "initial check")) return 1; #endif /* this test takes too long, so only do 1/chances of the cases, "randomly" selected */ srand(314159); /* deterministic "rand" */ chances = argc > 1 ? atoi(argv[1]) : 5; for (int iS = 0; iS < 5; ++iS) for (int splitting = 0; splitting < 5; ++splitting) for (int igv = 0; igv < 4; ++igv) for (int ic = 0; ic < 5; ++ic) for (int use_real = 1; use_real >= 0; --use_real) if (broadcast(0, rand()) % chances == 0) { char name[1024]; snprintf(name, 1024, "check_2d_tm_%s_%d_%s_%s%s", Sf2_name[iS], splitting, gv_2d_name[igv], component_name(tm_c[ic]), use_real ? "_r" : ""); master_printf("Checking %s...\n", name); if (!check_2d(funky_eps_2d, a, splitting, Sf2[iS], Sf2_kx[iS], Sf2_ky[iS], Ez, tm_c[ic], gv_2d[igv], use_real, gv_2d_rank[igv], name)) return 1; } for (int iS = 0; iS < 5; ++iS) for (int splitting = 0; splitting < 5; ++splitting) for (int ic = 0; ic < 4; ++ic) for (int use_real = 1; use_real >= 0; --use_real) if (broadcast(0, rand()) % chances == 0) { char name[1024]; snprintf(name, 1024, "check_2d_monitor_tm_%s_%d_%s%s", Sf2_name[iS], splitting, component_name(tm_c[ic]), use_real ? "_r" : ""); master_printf("Checking %s...\n", name); if (!check_2d_monitor(funky_eps_2d, a, splitting, Sf2[iS], Ez, tm_c[ic], vec(pad1,pad2), use_real, name)) return 1; } volume gv_3d[4] = { volume(vec(pad1,pad2,pad3), vec(xsize-pad2,ysize-pad1,zsize-pad3)), volume(vec(pad1,pad2,pad3), vec(xsize-pad2,ysize-pad1,pad3)), volume(vec(pad1,pad2,pad3), vec(xsize-pad2,pad2,pad3)), volume(vec(pad1,pad2,pad3), vec(pad1,pad2,pad3)), }; char gv_3d_name[4][10] = {"volume", "plane", "line", "point"}; int gv_3d_rank[4] = {3,2,1,0}; int c3d[7] = {Ex,Dielectric,Dy,Ez, Sz,H_EnergyDensity,EnergyDensity}; symfunc Sf3[3] = {make_identity, make_mirrorxy, make_rotate4z}; char Sf3_name[3][32] = {"identity", "mirrorxy", "rotate4z"}; for (int iS = 0; iS < 3; ++iS) for (int splitting = 0; splitting < 5; splitting += 3) for (int igv = 0; igv < 4; ++igv) { for (int ic = 0; ic < 1; ++ic) if (broadcast(0, rand()) % chances == 0) { bool use_real = true; char name[1024]; snprintf(name, 1024, "check_3d_ezsrc_%s_%d_%s_%s%s", Sf3_name[iS], splitting, gv_3d_name[igv], component_name(c3d[ic]), use_real ? "_r" : ""); master_printf("Checking %s...\n", name); if (!check_3d(funky_eps_3d, a, splitting, Sf3[iS], Ez, c3d[ic], gv_3d[igv], use_real, gv_3d_rank[igv], name)) return 1; } } #endif /* HAVE_HDF5 */ return 0; } meep-openmpi-1.1.1/tests/known_results.cpp0000644000175200017520000001362711243672446020144 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include using namespace meep; #include "config.h" double one(const vec &) { return 1.0; } double rods(const vec &r) { vec p = r; while (p.x() < -0.5) p.set_direction(X, p.x() + 1.0); while (p.x() > 0.5) p.set_direction(X, p.x() - 1.0); while (p.y() < -0.5) p.set_direction(Y, p.y() + 1.0); while (p.y() > 0.5) p.set_direction(Y, p.y() - 1.0); if (p.x()*p.x() + p.y()*p.y() < 0.3) return 12.0; return 1.0; } void compare(double b, double a, const char *n) { double thresh = sizeof(realnum) == sizeof(float) ? 1e-4 : 1e-5; if (fabs(a-b) > fabs(b)*thresh || b != b) { abort("Failed %s (%g instead of %g, relerr %0.2g)\n", n, a, b, fabs(a-b)/fabs(b)); } else { master_printf("Passed %s\n", n); } } static double dpml = 1.0; double using_pml_ez(const grid_volume &gv, double eps(const vec &)) { const double ttot = 30.0; structure s(gv, eps, pml(dpml)); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double x_periodic_y_pml(const grid_volume &gv, double eps(const vec &)) { const double ttot = 30.0; structure s(gv, eps, pml(dpml, Y)); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); f.use_bloch(X, 0.1); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double x_periodic(const grid_volume &gv, double eps(const vec &)) { const double ttot = 30.0; structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); f.use_bloch(X, 0.1); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double periodic_ez(const grid_volume &gv, double eps(const vec &)) { const double ttot = 30.0; structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); vec k; switch (gv.dim) { case D1: k = vec(0.3); break; case D2: k = vec(0.3,0.4); break; case D3: k = vec(0.3,0.5,0.8); break; case Dcyl: k = veccyl(0.3,0.2); break; } f.use_bloch(k); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double metallic_ez(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ez)); } double sigma(const vec &) { return 7.63; } double polariton_ex(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; structure s(gv, eps); s.add_polarizability(sigma, 0.3, 0.1); fields f(&s); f.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); while (f.round_time() < ttot) f.step(); monitor_point p; f.get_point(&p, gv.center()); return real(p.get_component(Ex)); } double polariton_energy(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; structure s(gv, eps); s.add_polarizability(sigma, 0.3, 0.1); fields f(&s, 0, 1); f.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center(), complex(0,-2*pi*0.2)); while (f.round_time() < ttot) f.step(); return f.total_energy(); } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "known_results-out"; trash_output_directory(mydirname); master_printf("Testing with some known results...\n"); const double a = 10.0; compare(-0.0894851, polariton_ex(volone(1.0, a), one), "1D polariton"); compare(0.32617294, polariton_energy(volone(1.0, a), one), "1D polariton energy"); compare(5.20605, metallic_ez(voltwo(1.0, 1.0, a), one), "1x1 metallic 2D TM"); compare(0.883776, using_pml_ez(voltwo(1.0+2*dpml, 1.0+2*dpml, a), one), "1x1 PML 2D TM"); compare(0.110425, x_periodic(voltwo(1.0, 1.0, a), one), "1x1 X periodic 2D TM"); compare(-4.78767, periodic_ez(voltwo(1.0, 3.0, a), rods), "1x1 fully periodic 2D TM rods"); compare(1.12502, periodic_ez(voltwo(1.0, 3.0, a), one), "1x1 fully periodic 2D TM"); compare(0.608815, x_periodic_y_pml(voltwo(1.0, 1.0+2*dpml, a), one), "1x1 X periodic Y PML 2D TM"); compare(-41.8057, metallic_ez(vol3d(1.0, 1.0, 1.0, a), one), "1x1x1 metallic 3D"); compare(-100.758, x_periodic(vol3d(1.0, 1.0, 1.0, a), one), "1x1x1 X periodic 3D"); compare(-101.398, x_periodic_y_pml(vol3d(1.0, 1.0+2*dpml, 1.0, a), one), "1x1x1 X periodic Y PML 3D"); compare(-103.844, periodic_ez(vol3d(1.0, 1.0, 1.0, a), rods), "1x1x1 fully periodic 3D rods"); compare(-99.1618, periodic_ez(vol3d(1.0, 1.0, 1.0, a), one), "1x1x1 fully periodic 3D"); return 0; } meep-openmpi-1.1.1/tests/Makefile.am0000644000175200017520000000426711205626221016543 0ustar debiandebianSRC = bench.cpp bragg_transmission.cpp convergence_cyl_waveguide.cpp \ cylindrical.cpp flux.cpp harmonics.cpp integrate.cpp known_results.cpp \ one_dimensional.cpp physical.cpp symmetry.cpp three_d.cpp \ two_dimensional.cpp 2D_convergence.cpp h5test.cpp pml.cpp EXTRA_DIST = $(SRC) OBJ = $(SRC:.cpp=.o) DAC = $(SRC:.cpp=.dac) DONE = $(SRC:.cpp=.done) LIBMEEP = $(top_builddir)/src/libmeep@MEEP_SUFFIX@.la AM_CPPFLAGS = -I$(top_srcdir)/src .SUFFIXES = .dac .done check_PROGRAMS = bench bragg_transmission convergence_cyl_waveguide cylindrical flux harmonics integrate known_results one_dimensional physical symmetry three_d two_dimensional 2D_convergence h5test pml bench_SOURCES = bench.cpp bench_LDADD = $(LIBMEEP) bragg_transmission_SOURCES = bragg_transmission.cpp bragg_transmission_LDADD = $(LIBMEEP) convergence_cyl_waveguide_SOURCES = convergence_cyl_waveguide.cpp convergence_cyl_waveguide_LDADD = $(LIBMEEP) cylindrical_SOURCES = cylindrical.cpp cylindrical_LDADD = $(LIBMEEP) flux_SOURCES = flux.cpp flux_LDADD = $(LIBMEEP) harmonics_SOURCES = harmonics.cpp harmonics_LDADD = $(LIBMEEP) integrate_SOURCES = integrate.cpp integrate_LDADD = $(LIBMEEP) known_results_SOURCES = known_results.cpp known_results_LDADD = $(LIBMEEP) one_dimensional_SOURCES = one_dimensional.cpp one_dimensional_LDADD = $(LIBMEEP) physical_SOURCES = physical.cpp physical_LDADD = $(LIBMEEP) symmetry_SOURCES = symmetry.cpp symmetry_LDADD = $(LIBMEEP) three_d_SOURCES = three_d.cpp three_d_LDADD = $(LIBMEEP) two_dimensional_SOURCES = two_dimensional.cpp two_dimensional_LDADD = $(LIBMEEP) 2D_convergence_SOURCES = 2D_convergence.cpp 2D_convergence_LDADD = $(LIBMEEP) h5test_SOURCES = h5test.cpp h5test_LDADD = $(LIBMEEP) pml_SOURCES = pml.cpp pml_LDADD = $(LIBMEEP) TESTS = bench bragg_transmission convergence_cyl_waveguide cylindrical flux harmonics integrate known_results one_dimensional physical symmetry three_d two_dimensional 2D_convergence h5test pml LOG_COMPILER = $(RUNCODE) # Note: this requires GNU make .o.dac: $(CXXLINK) $< $(LIBMEEP) $(LIBS) $(DAC): $(LIBMEEP) .dac.done: $(RUNCODE) ./$< touch $@ benchmark: bench $(RUNCODE) ./bench dac: $(DAC) clean-local:: rm -f *.o *.dac debug_out_* *.done meep-openmpi-1.1.1/tests/physical.cpp0000644000175200017520000000644211243101206017015 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include using namespace meep; double one(const vec &) { return 1.0; } int radiating_2D(const double xmax) { const double a = 10.0; const double ymax = 3.0; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, one, pml(ymax/3)); fields f(&s); double w = 0.30; double dx = 2.0; continuous_src_time src(w); f.add_point_source(Ez, src, vec(xmax/2 - dx, ymax/2)); vec p1(xmax/2 + 0*dx, ymax/2); vec p2(xmax/2 + 1*dx, ymax/2); // let the source reach steady state #if 1 f.solve_cw(1e-6); #else while (f.time() < 400) f.step(); #endif complex amp1 = f.get_field(Ez, p1); complex amp2 = f.get_field(Ez, p2); double ratio = pow(abs(amp1)/abs(amp2), 2.0) ; master_printf("Ratio is %g from (%g %g) and (%g %g)\n", ratio, real(amp1), imag(amp1), real(amp2), imag(amp2)); if (ratio > 2.12 || ratio < 1.88) abort("Failed: amp1 = (%g, %g), amp2 = (%g, %g)\n abs(amp1/amp2)^2 = %g, too far from 2.0\n", real(amp1), imag(amp1), real(amp2), imag(amp2), ratio); return 1; } int radiating_3D(const double xmax) { const double a = 10.0; const double ymax = 3.0; grid_volume gv = vol3d(xmax,ymax,ymax,a); symmetry S = mirror(Y,gv) - mirror(Z,gv); structure s(gv, one, pml(ymax/3)); fields f(&s); double w = 0.30; double dx = 2.0; continuous_src_time src(w); f.add_point_source(Ez, src, vec(xmax/2 - dx, ymax/2, ymax/2)); vec p1(xmax/2 + 0*dx, ymax/2, ymax/2); vec p2(xmax/2 + 1*dx, ymax/2, ymax/2); // let the source reach steady state #if 1 f.solve_cw(1e-3); #else while (f.time() < 400) f.step(); #endif complex amp1 = f.get_field(Ez, p1); complex amp2 = f.get_field(Ez, p2); double ratio = abs(amp1)/abs(amp2) ; master_printf("Ratio is %g from (%g %g) and (%g %g)\n", ratio, real(amp1), imag(amp1), real(amp2), imag(amp2)); if (ratio > 2.12 || ratio < 1.88) abort("Failed: amp1 = (%g, %g), amp2 = (%g, %g)\n abs(amp1/amp2) = %g, too far from 2.0\n", real(amp1), imag(amp1), real(amp2), imag(amp2), ratio); return 1; } void attempt(const char *name, int allright) { if (allright) master_printf("Passed %s\n", name); else abort("Failed %s!\n", name); } int main(int argc, char **argv) { initialize mpi(argc, argv); // quiet = true; master_printf("Trying out some physical tests...\n"); attempt("radiating source should decay spatially as 1/sqrt(r) in 2D.", radiating_2D(8.0)); attempt("radiating source should decay spatially as 1/r in 3D.", radiating_3D(7.0)); return 0; } meep-openmpi-1.1.1/tests/symmetry.cpp0000644000175200017520000011265411243101206017075 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; const char *mydirname = "symmetry-out"; double one(const vec &) { return 1.0; } vec the_center; double rods_2d(const vec &pp) { vec p = pp - the_center; while (p.x() > 0.5) p -= vec(1.0,0); while (p.x() <-0.5) p += vec(1.0,0); while (p.y() > 0.5) p -= vec(0,1.0); while (p.y() <-0.5) p += vec(0,1.0); if (fabs(p.x()) < 0.314) return 12.0; if (fabs(p.y()) < 0.314) return 12.0; return 1.0; } #if MEEP_SINGLE static double eps_compare = 1e-3; static double thresh_compare = 1e-3; #else static double eps_compare = 1e-9; static double thresh_compare = 1e-8; #endif static inline double max(double a, double b) { return a > b ? a : b; } int compare(double a, double b, const char *n) { if (fabs(a-b) > fabs(b)*eps_compare && max(fabs(a),fabs(b)) > thresh_compare) { master_printf("%s = %g differs by %g from %g\n", n, a, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (!compare(real(v1),real(v2),"real part") || !compare(imag(v1),imag(v2),"imaginary part")) { master_printf("%s differs by %g%+gi from %g%+gi\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at "); LOOP_OVER_DIRECTIONS(p.dim,d) master_printf("%s = %g, ", direction_name(d), p.in_direction(d)); master_printf("time %g\n", f1.time()); return 0; } } } return 1; } void check_unequal_layout(const fields &f1, const fields &f2) { if (f1.equal_layout(f2) || !f1.equal_layout(f1) || !f2.equal_layout(f2)) abort("fields::equal_layout did not return expected result"); } int test_cyl_metal_mirror(double eps(const vec &)) { master_printf("Testing Z mirror symmetry in Cylindrical...\n"); double a = 8.0; double ttot = 3.0; const grid_volume gv = volcyl(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); fields f1(&s1); f1.add_point_source(Er, 0.7, 2.5, 0.0, 4.0, veccyl(0.5,0.5)); f1.add_point_source(Ep, 0.8, 0.6, 0.0, 4.0, veccyl(0.401,0.5)); fields f(&s); f.add_point_source(Er, 0.7, 2.5, 0.0, 4.0, veccyl(0.5,0.5)); f.add_point_source(Ep, 0.8, 0.6, 0.0, 4.0, veccyl(0.401,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.01, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.21, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.501, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.33, 0.46 ))) return 0; if (!compare_point(f, f1, veccyl(0.2, 0.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_cyl_metal_mirror_nonlinear(double eps(const vec &)) { master_printf("Testing Z mirror symmetry in Cylindrical...\n"); double a = 16.0; double ttot = 3.0; const grid_volume gv = volcyl(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); s.set_chi3(one); s1.set_chi3(one); fields f1(&s1); f1.add_point_source(Er, 0.7, 2.5, 0.0, 4.0, veccyl(0.5,0.5)); // f1.add_point_source(Ep, 0.8, 0.6, 0.0, 4.0, veccyl(0.401,0.5)); fields f(&s); f.add_point_source(Er, 0.7, 2.5, 0.0, 4.0, veccyl(0.5,0.5)); // f.add_point_source(Ep, 0.8, 0.6, 0.0, 4.0, veccyl(0.401,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, veccyl(0.01, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.21, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.501, 0.5 ))) return 0; if (!compare_point(f, f1, veccyl(0.33, 0.46 ))) return 0; if (!compare_point(f, f1, veccyl(0.2, 0.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_1d_periodic_mirror(double eps(const vec &)) { master_printf("Testing Z mirror symmetry in 1D...\n"); double a = 16.0; double ttot = 3.0; const grid_volume gv = volone(1.0, a); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); fields f1(&s1); f1.use_bloch(0.0); f1.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.5)); fields f(&s); f.use_bloch(0.0); f.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01))) return 0; if (!compare_point(f, f1, vec(0.33))) return 0; if (!compare_point(f, f1, vec(0.50))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_origin_shift(void) { master_printf("Testing origin shift in 2D...\n"); double a = 8.0; double ttot = 3.0; const grid_volume gv = voltwo(1.0, 1.0, a); grid_volume vcentered = gv; vcentered.shift_origin(-gv.center()); structure s(vcentered, one); structure s1(gv, one); fields f1(&s1); fields f(&s); f1.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, gv.center()); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, gv.center()); f.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.0,0.0)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.0,0.0)); check_unequal_layout(f, f1); while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare(f.total_energy(), f1.total_energy(), " total energy")) { master_printf("Time is %g\n", f.time()); return 0; } } return 1; } int test_metal_xmirror(double eps(const vec &)) { master_printf("Testing X mirror symmetry...\n"); double a = 8.0; double ttot = 3.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(X,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); fields f1(&s1); f1.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.401)); fields f(&s); f.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.401)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_3D_metal_xmirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.0, 1.0, 1.0, a); const symmetry S = mirror(X,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing X mirror symmetry in 3D...\n"); fields f1(&s1); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.51,0.55)); f1.add_point_source(Hx, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.401,0.43)); fields f(&s); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.51,0.55)); f.add_point_source(Hx, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.401,0.43)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.5))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_3D_metal_zmirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.1, 0.6, 1.0, a); const symmetry S = mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Z mirror symmetry in 3D...\n"); fields f1(&s1); f1.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.55,0.51,0.5)); f1.add_point_source(Ey, 0.8, 0.6, 0.0, 4.0, vec(0.43,0.401,0.5)); fields f(&s); f.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.55,0.51,0.5)); f.add_point_source(Ey, 0.8, 0.6, 0.0, 4.0, vec(0.43,0.401,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_3D_metal_odd_zmirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.1, 0.6, 1.0, a); const symmetry S = -mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing odd Z mirror symmetry in 3D...\n"); fields f1(&s1); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.55,0.51,0.5)); fields f(&s); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.55,0.51,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_3D_metal_rot4z(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.0, 1.0, 1.0, a); const symmetry S = rotate4(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Z fourfold rotational symmetry in 3D...\n"); fields f1(&s1); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.52)); f1.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5,0.43)); fields f(&s); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.52)); f.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5,0.43)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_3D_metal_rot4z_mirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.0, 1.0, 1.0, a); const symmetry S = rotate4(Z,gv) + mirror(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Z fourfold rotational symmetry in 3D with horizontal mirror...\n"); fields f1(&s1); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.5)); fields f(&s); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_3D_metal_3mirror(double eps(const vec &)) { double a = 8.0; double ttot = 3.0; const grid_volume gv = vol3d(1.0, 1.0, 1.0, a); const symmetry S = mirror(Z,gv) - mirror(Y,gv) - mirror(X,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing three mirror planes in 3D...\n"); fields f1(&s1); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.5)); fields f(&s); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01 , 0.75))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.21 , 0.15))) return 0; if (!compare_point(f, f1, vec(0.5 , 0.501, 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.51))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 , 0.05))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_metal_ymirror(double eps(const vec &)) { double a = 8.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(Y,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Y mirror symmetry...\n"); fields f1(&s1); f1.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.85 ,0.5)); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401,0.5)); fields f(&s); f.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.85 ,0.5)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_yperiodic_ymirror(double eps(const vec &)) { double a = 8.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = mirror(Y,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing Y periodic with mirror symmetry...\n"); fields f1(&s1); f1.use_bloch(vec(0.1*pi/2,0.0)); //f1.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.85 ,0.5)); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401,0.5)); fields f(&s); f.use_bloch(vec(0.1*pi/2,0.0)); //f.add_point_source(Ex, 0.7, 2.5, 0.0, 4.0, vec(0.85 ,0.5)); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.951 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) { return 0; } if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int test_metal_rot2y(double eps(const vec &)) { double a = 16.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = rotate2(Y,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Y twofold rotational symmetry...\n"); fields f1(&s1); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.25, 0.875), 1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.25,0.375), 1.0); f1.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.75, 0.875),-1.0); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.75,0.375),-1.0); fields f(&s); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.25,0.875 ), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.25,0.375), 1.0); f.add_point_source(Hz, 0.7, 2.5, 0.0, 4.0, vec(0.75,0.875 ),-1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.75,0.375),-1.0); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int exact_metal_rot2y(double eps(const vec &)) { double a = 16.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.5, a); the_center = gv.center(); const symmetry S = rotate2(Y,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing exact Y twofold rotational symmetry...\n"); fields f1(&s1); f1.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.5, 0.875)); f1.add_point_source(Hy, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.375)); fields f(&s); f.add_point_source(Ey, 0.7, 2.5, 0.0, 4.0, vec(0.5, 0.875)); f.add_point_source(Hy, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.375)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int pml_twomirrors(double eps(const vec &)) { double a = 16.0; double ttot = 10.0; const grid_volume gv = voltwo(2.0, 2.0, a); the_center = gv.center(); const symmetry S = mirror(X,gv) + mirror(Y,gv); structure s_mm(gv, eps, pml(0.5), S); structure s1(gv, eps, pml(0.5), identity()); master_printf("Testing two mirrors with PML...\n"); fields f_mm(&s_mm); fields f1(&s1); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.0,1.0),-1.5); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.75,0.75)); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.75,1.25)); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.25,0.75)); f_mm.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.25,1.25)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.0,1.0),-1.5); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.75,0.75)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.75,1.25)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.25,0.75)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(1.25,1.25)); check_unequal_layout(f_mm, f1); double total_energy_check_time = 3.0; while (f_mm.round_time() < ttot) { f_mm.step(); f1.step(); if (!compare_point(f1, f_mm, vec(0.01 , 0.5))) return 0; if (!compare_point(f1, f_mm, vec(0.21 , 0.5))) return 0; if (!compare_point(f1, f_mm, vec(0.46 , 0.33))) return 0; if (!compare_point(f1, f_mm, vec(0.2 , 0.2 ))) return 0; if (f_mm.round_time() >= total_energy_check_time) { if (!compare(f_mm.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; total_energy_check_time += 3.0; } } return 1; } int exact_metal_rot4z(double eps(const vec &)) { double a = 8.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = rotate4(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); master_printf("Testing Z fourfold rotational symmetry...\n"); fields f1(&s1); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f1.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5)); fields f(&s); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int exact_metal_rot4z_nonlinear(double eps(const vec &)) { double a = 8.0; double ttot = 5.0; const grid_volume gv = voltwo(1.0, 1.0, a); the_center = gv.center(); const symmetry S = rotate4(Z,gv); structure s(gv, eps, no_pml(), S); structure s1(gv, eps); s.set_chi3(one); s1.set_chi3(one); master_printf("Testing nonlinear Z fourfold rotational symmetry...\n"); fields f1(&s1); //f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f1.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5)); fields f(&s); //f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.5,0.5)); f.add_point_source(Hz, 0.8, 0.6, 0.0, 4.0, vec(0.5,0.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.21 , 0.5))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(0.2 , 0.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } int exact_pml_rot2x_tm(double eps(const vec &)) { double a = 8.0; double ttot = 30.0; const grid_volume gv = voltwo(3.0, 3.0, a); the_center = gv.center(); const symmetry S = rotate2(X,gv); structure s(gv, eps, pml(1.0), S); structure s1(gv, eps, pml(1.0), identity()); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing X twofold rotational symmetry with PML...\n"); fields f1(&s1); f1.add_point_source(Hx, 0.7, 2.5, 0.0, 4.0, vec(1.3,1.5)); fields f(&s); f.add_point_source(Hx, 0.7, 2.5, 0.0, 4.0, vec(1.3,1.5)); check_unequal_layout(f, f1); double total_energy_check_time = 1.0; while (f.round_time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.01 , 1.5))) return 0; if (!compare_point(f, f1, vec(1.21 , 1.5))) return 0; if (!compare_point(f, f1, vec(1.46 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.2 , 1.2 ))) return 0; if (f.round_time() >= total_energy_check_time) { if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; total_energy_check_time += 1.0; } } return 1; } double sigma(const vec &) { return 7.63; } double polariton_ex(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; master_printf("Testing polariton in %s...\n", dimension_name(gv.dim)); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps); structure sS(gv, eps, no_pml(), S); s.add_polarizability(sigma, 0.3, 0.1); sS.add_polarizability(sigma, 0.3, 0.1); fields f(&s); f.use_real_fields(); f.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center()); fields fS(&sS); fS.use_real_fields(); fS.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center()); f.use_bloch(zero_vec(gv.dim)); fS.use_bloch(zero_vec(gv.dim)); check_unequal_layout(f, fS); while (f.round_time() < ttot) { f.step(); fS.step(); if (!compare_point(fS, f, gv.center())) return 0; if (!compare_point(fS, f, zero_vec(gv.dim))) return 0; if (!compare_point(fS, f, gv.center()*0.3)) return 0; } return 1; } double nonlinear_ex(const grid_volume &gv, double eps(const vec &)) { const double ttot = 10.0; master_printf("Testing nonlinear in %s...\n", dimension_name(gv.dim)); the_center = gv.center(); const symmetry S = mirror(Z,gv); structure s(gv, eps); structure sS(gv, eps, no_pml(), S); s.set_chi3(one); sS.set_chi3(one); fields f(&s); f.use_real_fields(); f.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center()); fields fS(&sS); fS.use_real_fields(); fS.add_point_source(Ex, 0.2, 3.0, 0.0, 2.0, gv.center()); f.use_bloch(zero_vec(gv.dim)); fS.use_bloch(zero_vec(gv.dim)); check_unequal_layout(f, fS); while (f.round_time() < ttot) { f.step(); fS.step(); if (!compare_point(fS, f, gv.center())) return 0; if (!compare_point(fS, f, zero_vec(gv.dim))) return 0; if (!compare_point(fS, f, gv.center()*0.3)) return 0; } return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; trash_output_directory(mydirname); master_printf("Testing with various kinds of symmetry...\n"); if (!test_1d_periodic_mirror(one)) abort("error in test_1d_periodic_mirror vacuum\n"); if (!test_cyl_metal_mirror(one)) abort("error in test_cyl_metal_mirror vacuum\n"); if (!test_yperiodic_ymirror(one)) abort("error in test_yperiodic_ymirror vacuum\n"); if (!test_yperiodic_ymirror(rods_2d)) abort("error in test_yperiodic_ymirror rods2d\n"); if (!pml_twomirrors(one)) abort("error in pml_twomirrors vacuum\n"); if (!test_origin_shift()) abort("error in test_origin_shift\n"); if (!exact_pml_rot2x_tm(one)) abort("error in exact_pml_rot2x_tm vacuum\n"); if (!test_metal_xmirror(rods_2d)) abort("error in test_metal_xmirror rods_2d\n"); if (!test_metal_xmirror(one)) abort("error in test_metal_xmirror vacuum\n"); if (!test_metal_ymirror(one)) abort("error in test_metal_ymirror vacuum\n"); if (!test_metal_ymirror(rods_2d)) abort("error in test_metal_ymirror rods_2d\n"); if (!test_metal_rot2y(one)) abort("error in test_metal_rot2y vacuum\n"); if (!test_metal_rot2y(rods_2d)) abort("error in test_metal_rot2y rods_2d\n"); if (!exact_metal_rot2y(one)) abort("error in exact_metal_rot2y vacuum\n"); if (!exact_metal_rot2y(rods_2d)) abort("error in exact_metal_rot2y rods_2d\n"); if (!exact_metal_rot4z(one)) abort("error in exact_metal_rot4z vacuum\n"); if (!exact_metal_rot4z(rods_2d)) abort("error in exact_metal_rot4z rods_2d\n"); if (!test_3D_metal_xmirror(one)) abort("error in test_3D_metal_xmirror vacuum\n"); if (!test_3D_metal_zmirror(one)) abort("error in test_3D_metal_zmirror vacuum\n"); if (!test_3D_metal_odd_zmirror(one)) abort("error in test_3D_metal_odd_zmirror vacuum\n"); if (!test_3D_metal_rot4z(one)) { all_wait(); abort("error in test_3D_metal_rot4z vacuum\n"); } if (!test_3D_metal_rot4z_mirror(one)) abort("error in test_3D_metal_rot4z_mirror vacuum\n"); if (!test_3D_metal_3mirror(one)) abort("error in test_3D_metal_3mirror\n"); /**************************************************************************/ /* For the following tests, we increase the check tolerance slightly. Floating-point errors can cause these tests to have slightly different results with and without symmetry. Note also that symmetry is tricky with nonlinearity, since in general a nonlinear system does *not* conserve the irreducible representation of the symmetry group (i.e. symmetry doesn't work). The simulations here are chosen to preserve the symmetry, however. */ #if !MEEP_SINGLE thresh_compare = 1e-10; #endif if (!nonlinear_ex(vol1d(1.0, 30.0), one)) abort("error in 1D nonlinear vacuum\n"); if (!nonlinear_ex(vol3d(1.0, 1.2, 0.8, 10.0), one)) abort("error in 3D nonlinear vacuum\n"); if (!test_cyl_metal_mirror_nonlinear(one)) abort("error in test_cyl_metal_mirror nonlinear vacuum\n"); if (!exact_metal_rot4z_nonlinear(one)) abort("error in exact_metal_rot4z nonlinear vacuum\n"); if (!exact_metal_rot4z_nonlinear(rods_2d)) abort("error in exact_metal_rot4z nonlinear rods_2d\n"); // I'm not sure why the polariton tests require increased tolerances...? if (!polariton_ex(vol1d(1.0, 30.0), one)) abort("error in 1D polariton vacuum\n"); if (!polariton_ex(vol3d(1.0, 1.2, 0.8, 10.0), one)) abort("error in 3D polariton vacuum\n"); return 0; } meep-openmpi-1.1.1/tests/bragg_transmission.cpp0000644000175200017520000001716011243101206021073 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Compute the transmission spectrum through a 4-layer 1d Bragg mirror, and compare to the result from the analytical transfer matrices. The transmission spectrum is computed via the dft_flux feature, which dynamically updates the DFTs of the fields on the flux plane as we go along. */ #include #include #include #include using namespace meep; const double nhi = 3, nlo = 1; const double wlo = nhi / (nlo + nhi); const int Nperiods = 4; const double zsize = 10; double eps_nlo(const vec &) { return nlo*nlo; } double eps_bragg(const vec &pt) { double z = pt.z() - zsize * 0.5; if (fabs(z)*2 > Nperiods) return nlo*nlo; else { double zi; double zf = modf(z, &zi); if (zf < 0) zf += 1; if (zf < wlo) return (nlo*nlo); else return (nhi*nhi); } } typedef complex matrix2x2[2][2]; /* multiply m by transfer matrix from n1 to n2 */ inline void byT12(matrix2x2 m, double n1, double n2) { complex m00, m01, m10, m11; double td, tod; double n12 = n1 / n2; td = 0.5 * (1 + n12); tod = 0.5 * (1 - n12); m00 = m[0][0]; m01 = m[0][1]; m10 = m[1][0]; m11 = m[1][1]; m[0][0] = m00 * td + m01 * tod; m[0][1] = m00 * tod + m01 * td; m[1][0] = m10 * td + m11 * tod; m[1][1] = m10 * tod + m11 * td; } /* multiply m by propagation matrix through dz of index n, frequency w */ inline void byP(matrix2x2 m, double n, double w, double dz) { complex p, pc; p = exp(complex(0, n * w * dz)); pc = conj(p); m[0][0] *= p; m[0][1] *= pc; m[1][0] *= p; m[1][1] *= pc; } inline double abs2(complex x) { double ax = abs(x); return ax*ax; } void bragg_transmission_analytic(double freq_min, double freq_max, int nfreq, double *T, double *R) { for (int i = 0; i < nfreq; ++i) { double omega = 2*pi * (freq_min + i * (freq_max - freq_min) / (nfreq - 1)); matrix2x2 Tm = { { 1, 0 }, { 0, 1 } }; for (int j = 0; j < Nperiods; ++j) { byT12(Tm, nlo, nhi); byP(Tm, nhi, omega, 1 - wlo); byT12(Tm, nhi, nlo); byP(Tm, nlo, omega, wlo); } complex refl = - Tm[1][0] / Tm[1][1]; T[i] = abs2(Tm[0][0] + refl * Tm[0][1]); R[i] = abs2(refl); } } void bragg_transmission(double a, double freq_min, double freq_max, int nfreq, double *T, double *R, bool use_hdf5) { const grid_volume gv = volone(zsize, a); structure s(gv, eps_bragg, pml(0.5)); fields f(&s); f.use_real_fields(); structure s0(gv, eps_nlo, pml(0.5)); fields f0(&s0); f0.use_real_fields(); vec srcpt(0.1), Tfluxpt(zsize - 0.1), Rfluxpt(0.1); gaussian_src_time src((freq_min + freq_max) * 0.5, 0.5 / fabs(freq_max - freq_min), 0, 5 / fabs(freq_max - freq_min)); f.add_point_source(Ex, src, srcpt); f0.add_point_source(Ex, src, srcpt); dft_flux ft = f.add_dft_flux_plane(Tfluxpt, freq_min, freq_max, nfreq); dft_flux fr = f.add_dft_flux_plane(Rfluxpt, freq_min, freq_max, nfreq); dft_flux ft0 = f0.add_dft_flux_plane(Tfluxpt, freq_min, freq_max, nfreq); dft_flux fr0 = f0.add_dft_flux_plane(Rfluxpt, freq_min, freq_max, nfreq); while (f0.time() < nfreq / fabs(freq_max - freq_min) / 2) f0.step(); /* we want to subtract the fields for the reflection... */ if (use_hdf5) { /* simulate a case where the normalization is done by a separate run and saved to a file */ fr0.save_hdf5(f, "flux", "reflection"); fr.load_hdf5(f, "flux", "reflection"); fr.scale_dfts(-1.0); // clean up after ourselves: delete the file h5file *ff = f.open_h5file("flux", h5file::READONLY); ff->remove(); delete ff; } else fr -= fr0; while (f.time() < nfreq / fabs(freq_max - freq_min) / 2) f.step(); double *flux = ft.flux(); double *flux0 = ft0.flux(); for (int i = 0; i < nfreq; ++i) T[i] = flux[i] / flux0[i]; delete[] flux; flux = fr.flux(); for (int i = 0; i < nfreq; ++i) R[i] = -flux[i] / flux0[i]; delete[] flux; delete[] flux0; } inline double max2(double a, double b) { return (a > b ? a : b); } inline double min2(double a, double b) { return (a < b ? a : b); } inline double max2a(double a, double b) { return max2(abs(a), abs(b)); } inline double sqr(double x) { return x*x; } /* The discretization errors tend to result in a *shift* of the spectral features more than a change in their amplitude. Because these features are very sharp (e.g. at the gap edges), it is more appropriate to compute errors via the distance from a point to the curve, rather than just the difference of the abscissae. That's what this function does. */ double distance_from_curve(int n, double dx, double ys[], double x, double y) { double d = meep::infinity; for (int i = 1; i < n; ++i) { double theta = atan2(ys[i] - ys[i-1], dx); double L = sqrt(sqr(dx) + sqr(ys[i]-ys[i-1])); double x0 = x - (i-1) * dx; double y0 = y - ys[i-1]; double x0p = x0 * cos(theta) + y0 * sin(theta); double y0p = y0 * cos(theta) - x0 * sin(theta); if (x0p < 0) d = min2(sqrt(sqr(x0) + sqr(y0)), d); else if (x0p > L) d = min2(sqrt(sqr(x-i*dx) + sqr(y-ys[i])), d); else d = min2(abs(y0p), d); } return d; } void doit(bool use_hdf5) { const int nfreq = 100; const double freq_min = 0.1, freq_max = 0.5; double *T = new double[nfreq]; double *R = new double[nfreq]; bragg_transmission(40.0, freq_min, freq_max, nfreq, T, R, use_hdf5); double *T0 = new double[nfreq]; double *R0 = new double[nfreq]; bragg_transmission_analytic(freq_min, freq_max, nfreq, T0, R0); double dfreq = (freq_max - freq_min) / (nfreq - 1); if (0) { // output transmission & reflection spectra for debugging master_printf("transmission:, freq (c/a), T, R, T0, R0\n"); for (int i = 0; i < nfreq; ++i) master_printf("transmission:, %g, %g, %g, %g, %g\n", freq_min + i * dfreq, T[i], R[i], T0[i], R0[i]); } double maxerrT = 0, maxerrR = 0; for (int i = 0; i < nfreq; ++i) { double errT = distance_from_curve(nfreq, dfreq, T0, i * dfreq, T[i]); double errR = distance_from_curve(nfreq, dfreq, R0, i * dfreq, R[i]); if (errT > maxerrT) maxerrT = errT; if (errR > maxerrR) maxerrR = errR; if (errT * sqr(freq_min / (freq_min + i*dfreq)) > 0.01) abort("large error %g at freq = %g: T = %g instead of %g\n", errT, freq_min + i*dfreq, T[i], T0[i]); if (errR * sqr(freq_min / (freq_min + i*dfreq)) > 0.01) abort("large error %g at freq = %g: R = %g instead of %g\n", errR, freq_min + i*dfreq, R[i], R0[i]); } master_printf("Done (max. err in T = %e, in R = %e)\n", maxerrT, maxerrR); delete[] R0; delete[] T0; delete[] R; delete[] T; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; #ifdef HAVE_HDF5 doit(true); #endif doit(false); return 0; } meep-openmpi-1.1.1/tests/three_d.cpp0000644000175200017520000002123111243101206016604 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include using namespace meep; double one(const vec &) { return 1.0; } double targets(const vec &pt) { const double r = sqrt(pt.x()*pt.x() + pt.y()*pt.y()); double dr = r; while (dr > 1) dr -= 1; if (dr > 0.7001) return 12.0; return 1.0; } #if MEEP_SINGLE static const double tol = 1e-3, thresh = 1e-3; #else static const double tol = 1e-9, thresh = 1e-15; #endif int compare(double a, double b, const char *n) { if (fabs(a-b) > fabs(b)*tol && fabs(b) > thresh) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { return 1; } } int compare_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > tol*abs(v2) && abs(v2) > thresh) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g %g %g, time %g\n", p.x(), p.y(), p.z(), f1.time()); return 0; } } } return 1; } int approx_point(fields &f1, fields &f2, const vec &p) { monitor_point m1, m_test; f1.get_point(&m_test, p); f2.get_point(&m1, p); for (int i=0;i<10;i++) { component c = (component) i; if (f1.gv.has_field(c)) { complex v1 = m_test.get_component(c), v2 = m1.get_component(c); if (abs(v1 - v2) > tol*abs(v2) && abs(v2) > thresh) { master_printf("%s differs: %g %g out of %g %g\n", component_name(c), real(v2-v1), imag(v2-v1), real(v2), imag(v2)); master_printf("This comes out to a fractional error of %g\n", abs(v1 - v2)/abs(v2)); master_printf("Right now I'm looking at %g %g %g, time %g\n", p.x(), p.y(), p.z(), f1.time()); return 0; } } } return 1; } int test_metal(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = vol3d(1.5, 0.5, 1.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Metal test using %d chunks...\n", splitting); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.299,0.401), 1.0); fields f1(&s1); f1.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(1.299,0.299,0.401), 1.0); double total_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.5 , 0.01))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33 , 0.33))) return 0; if (!compare_point(f, f1, vec(1.301 , 0.301 , 0.399 ))) return 0; if (f.time() >= total_energy_check_time) { if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; total_energy_check_time += 5.0; } } return 1; } int test_periodic(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; double ttot = 17.0; grid_volume gv = vol3d(1.5, 0.5, 1.0, a); structure s1(gv, eps); structure s(gv, eps, no_pml(), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Periodic test using %d chunks...\n", splitting); fields f(&s); f.use_bloch(vec(0.1,0.7,0.3)); f.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.25,0.5), 1.0); fields f1(&s1); f1.use_bloch(vec(0.1,0.7,0.3)); f1.add_point_source(Ez, 0.7, 2.5, 0.0, 4.0, vec(0.3,0.25,0.5), 1.0); double total_energy_check_time = 8.0; while (f.time() < ttot) { f.step(); f1.step(); if (!compare_point(f, f1, vec(0.5 , 0.01, 0.5 ))) return 0; if (!compare_point(f, f1, vec(0.46 , 0.33, 0.2 ))) return 0; if (!compare_point(f, f1, vec(1.0 , 0.25 , 0.301))) return 0; if (f.time() >= total_energy_check_time) { if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; if (!compare(f.electric_energy_in_box(gv.surroundings()), f1.electric_energy_in_box(gv.surroundings()), "electric energy")) return 0; if (!compare(f.magnetic_energy_in_box(gv.surroundings()), f1.magnetic_energy_in_box(gv.surroundings()), "magnetic energy")) return 0; total_energy_check_time += 5.0; } } return 1; } int test_pml(double eps(const vec &), const char *mydirname) { double a = 10.0; grid_volume gv = vol3d(1.5, 1.0, 1.2, a); structure s(gv, eps, pml(0.401)); s.set_output_directory(mydirname); master_printf("Testing pml quality...\n"); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.751,0.5,0.601), 1.0); const double deltaT = 10.0; const double ttot = 3.1*deltaT; double total_energy_check_time = deltaT; while (f.time() < f.last_source_time()) f.step(); double last_energy = f.total_energy(); while (f.time() < ttot) { f.step(); if (f.time() >= total_energy_check_time) { const double new_energy = f.total_energy(); master_printf("Got newE/oldE of %g\n", new_energy/last_energy); if (new_energy > last_energy*4e-3) { master_printf("Energy decaying too slowly: from %g to %g (%g)\n", last_energy, new_energy, new_energy/last_energy); return 0; } total_energy_check_time += deltaT; } } return 1; } int test_pml_splitting(double eps(const vec &), int splitting, const char *mydirname) { double a = 10.0; grid_volume gv = vol3d(1.5, 1.0, 1.2, a); structure s1(gv, eps, pml(0.3)); structure s(gv, eps, pml(0.3), identity(), splitting); s.set_output_directory(mydirname); s1.set_output_directory(mydirname); master_printf("Testing pml while splitting into %d chunks...\n", splitting); fields f(&s); f.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.099,0.499,0.501), 1.0); fields f1(&s1); f1.add_point_source(Ez, 0.8, 1.6, 0.0, 4.0, vec(1.099,0.499,0.501), 1.0); const double ttot = 31.0; double next_energy_time = 10.0; while (f.time() < ttot) { f.step(); f1.step(); if (!approx_point(f, f1, vec(0.5 , 0.01 , 1.0 ))) return 0; if (!approx_point(f, f1, vec(0.46 , 0.33 , 0.33))) return 0; if (!approx_point(f, f1, vec(1.0 , 1.0 , 0.33))) return 0; if (!approx_point(f, f1, vec(1.3 , 0.3 , 0.15))) return 0; if (f.time() > next_energy_time) { if (!compare(f.total_energy(), f1.total_energy(), " total energy")) return 0; next_energy_time += 10.0; } } return 1; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; const char *mydirname = "three_d-out"; trash_output_directory(mydirname); master_printf("Testing 3D...\n"); if (!test_pml(one, mydirname)) abort("error in test_pml vacuum\n"); for (int s=2;s<7;s++) if (!test_periodic(targets, s, mydirname)) abort("error in test_periodic targets\n"); for (int s=2;s<8;s++) if (!test_metal(one, s, mydirname)) abort("error in test_metal vacuum\n"); for (int s=2;s<4;s++) if (!test_pml_splitting(one, s, mydirname)) abort("error in test_pml_splitting vacuum\n"); return 0; } meep-openmpi-1.1.1/tests/flux.cpp0000644000175200017520000002713111243153713016167 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include using namespace meep; double one(const vec &) { return 1.0; } static double width = 20.0; double bump(const vec &pt) { return (fabs(pt.z()-50.0) > width)?1.0:12.0; } double bump2(const vec &pt) { return (fabs(pt.z()-5.0) > 3.0)?1.0:12.0; } double cavity(const vec &pt) { const double zz = fabs(pt.z() - 7.5) + 0.3001; if (zz > 5.0) return 1.0; if (zz < 2.0) return 1.0; double norm = zz; while (norm > 1.0) norm -= 1.0; if (norm > 0.3) return 1.0; return 12.0; } int compare(double a, double b, double eps, double thresh, const char *n) { if (fabs(a-b) > fabs(b)*eps && fabs(b) > thresh) { master_printf("%s differs by\t%g out of\t%g\n", n, a-b, b); master_printf("This gives a fractional error of %g\n", fabs(a-b)/fabs(b)); return 0; } else { if (fabs(a-b) > fabs(b)*eps*1.1 && fabs(b) > thresh) master_printf("%s fractional error is %g, close to %g threshold.\n", n, fabs(a-b)/fabs(b), eps); return 1; } } static inline double min(double a, double b) { return (aflux(); flux_right += f.dt*right->flux(); } delta_energy -= f.energy_in_box(mid.surroundings()); master_printf("Final energy is %g\n", f.energy_in_box(mid.surroundings())); master_printf("Final electric energy is %g\n", f.electric_energy_in_box(mid.surroundings())); const double del = flux_left; const double der = flux_right - delta_energy; master_printf(" Delta E:\t%g\n Flux left:\t%g\n Flux right:\t%g\n Ratio:\t%g\n", delta_energy, del, der, del/der); return compare(del, der, 0.06, 0, "Flux"); } int split_1d(double eps(const vec &), int splitting) { const double boxwidth = 5.0, timewait = 1.0; const double zmax = 15.0, a = 10.0; grid_volume gv = volone(zmax,a); structure s1(gv, eps, pml(2.0)); structure s(gv, eps, pml(2.0), identity(), splitting); fields f1(&s1); fields f(&s); f1.use_real_fields(); f.use_real_fields(); f1.add_point_source(Ex, 0.25, 4.5, 0.0, 8.0, vec(zmax/2+0.3), 1.0e2); f.add_point_source(Ex, 0.25, 4.5, 0.0, 8.0, vec(zmax/2+0.3), 1.0e2); flux_vol *left1 = f1.add_flux_plane(vec(zmax*.5-boxwidth), vec(zmax*.5-boxwidth)); flux_vol *left = f.add_flux_plane(vec(zmax*.5-boxwidth), vec(zmax*.5-boxwidth)); grid_volume mid = volone(2*boxwidth,a); mid.set_origin(vec(zmax*.5-boxwidth-0.25/a)); const double ttot = f.last_source_time() + timewait; const double tol = sizeof(realnum) == sizeof(float) ? 1e-3 : 1e-9; while (f.time() < ttot) { f1.step(); f.step(); if (!compare(f.dt*left1->flux(), f.dt*left->flux(), tol, tol, "Flux")) return 0; } return 1; } int cavity_1d(const double boxwidth, const double timewait, double eps(const vec &)) { const double zmax = 15.0; const double a = 10.0; grid_volume gv = volone(zmax,a); structure s(gv, eps, pml(2.0)); fields f(&s); f.use_real_fields(); f.add_point_source(Ex, 0.25, 4.5, 0.0, 8.0, vec(zmax/2+0.3), 1.0e2); flux_vol *left = f.add_flux_plane(vec(zmax*.5-boxwidth), vec(zmax*.5-boxwidth)); flux_vol *right = f.add_flux_plane(vec(zmax*.5+boxwidth), vec(zmax*.5+boxwidth)); grid_volume mid = volone(2*boxwidth,a); mid.set_origin(vec(zmax*.5-boxwidth-0.25/a)); while (f.time() < f.last_source_time()) f.step(); const double ttot = f.time() + timewait; double flux_left=0.0, flux_right=0.0; const double start_energy = f.energy_in_box(mid.surroundings()); master_printf(" Energy starts at\t%g\n", start_energy); while (f.time() < ttot) { f.step(); flux_left += f.dt*left->flux(); flux_right += f.dt*right->flux(); } const double delta_energy = start_energy - f.energy_in_box(mid.surroundings()); const double defl = flux_right - flux_left; master_printf(" Delta E: \t%g\n Integrated Flux:\t%g\n", delta_energy, defl); master_printf(" Ratio: \t%g\n", delta_energy/defl); master_printf(" Fractional error:\t%g\n", (delta_energy - defl)/start_energy); return compare(start_energy - delta_energy, start_energy - defl, (timewait>50)?0.032:0.004, 0, "Flux"); } int flux_2d(const double xmax, const double ymax, double eps(const vec &)) { const double a = 8.0; master_printf("\nFlux_2d(%g,%g) test...\n", xmax, ymax); grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps, pml(0.5)); fields f(&s); f.use_real_fields(); f.add_point_source(Ez, 0.25, 3.5, 0., 8., vec(xmax/6+0.1, ymax/6+0.3), 1.); // corners of flux planes and energy box: vec lb(vec(xmax/3, ymax/3)), rb(vec(2*xmax/3, ymax/3)); vec lt(vec(xmax/3, 2*ymax/3)), rt(vec(2*xmax/3, 2*ymax/3)); volume box(lb, rt); flux_vol *left = f.add_flux_plane(lb, lt); flux_vol *right = f.add_flux_plane(rb, rt); flux_vol *bottom = f.add_flux_plane(lb, rb); flux_vol *top = f.add_flux_plane(lt, rt); /* measure flux spectra through two concentric flux boxes around the source...should be positive and equal */ volume box1(vec(xmax/6-0.4, ymax/6-0.2), vec(xmax/6+0.6, ymax/6+0.8)); volume box2(vec(xmax/6-0.9, ymax/6-0.7), vec(xmax/6+1.1, ymax/6+1.3)); double fmin = 0.23, fmax = 0.27; int Nfreq = 10; dft_flux flux1 = f.add_dft_flux_box(box1, fmin, fmax, Nfreq); dft_flux flux2 = f.add_dft_flux_box(box2, fmin, fmax, Nfreq); const double ttot = 130; /* first check: integral of flux = change in energy of box */ f.step(); double init_energy = f.energy_in_box(box); master_printf("Initial energy is %g\n", init_energy); long double fluxL = 0; while (f.time() < ttot) { f.step(); fluxL += f.dt * (left->flux() - right->flux() + bottom->flux() - top->flux()); } double flux = fluxL; double del_energy = f.energy_in_box(box) - init_energy; master_printf("Final energy is %g\n", f.energy_in_box(box)); master_printf(" delta E: %g\n net flux: %g\n ratio: %g\n", del_energy, flux, del_energy/flux); if (!compare(del_energy, flux, 0.09, 0, "Flux")) return 0; /* second check: flux spectrum is same for two concentric boxes containing the source. */ while (f.time() < ttot*2) { f.step(); } master_printf(" energy after more time is %g\n", f.energy_in_box(box)); master_printf(" and energy in box2 is %g\n", f.energy_in_box(box2)); double *fl1 = flux1.flux(); double *fl2 = flux2.flux(); for (int i = 0; i < Nfreq; ++i) { master_printf(" flux(%g) = %g vs. %g (rat. = %g)\n", fmin + i * flux1.dfreq, fl1[i],fl2[i], fl1[i] / fl2[i]); if (!compare(fl1[i], fl2[i], 0.09, 0, "Flux spectrum")) return 0; } delete fl2; delete fl1; return 1; } int flux_cyl(const double rmax, const double zmax, double eps(const vec &), int m) { const double a = 8.0; master_printf("\nFlux_cyl(%g,%g) test...\n", rmax, zmax); grid_volume gv = volcyl(rmax,zmax,a); structure s(gv, eps, pml(0.5), identity(), 0, min(0.5, 1 / (abs(m)+0.5))); fields f(&s, m); // f.use_real_fields(); f.add_point_source(Ep, 0.25, 3.5, 0., 8., veccyl(rmax*5/6+0.1, zmax/6+0.3), 1.); // corners of flux planes and energy box: vec lb(veccyl(-rmax/3, zmax/3)), rb(veccyl(2*rmax/3, zmax/3)); vec lt(veccyl(-rmax/3, 2*zmax/3)), rt(veccyl(2*rmax/3, 2*zmax/3)); volume box(lb, rt); /* measure flux spectra through two concentric flux boxes around the source...should be positive and equal */ volume box1(veccyl(rmax*5/6-0.4, zmax/6-0.2), veccyl(rmax*5/6+0.6, zmax/6+0.8)); volume box2(veccyl(rmax*5/6-0.9, zmax/6-0.7), veccyl(rmax*5/6+1.1, zmax/6+1.3)); double fmin = 0.23, fmax = 0.27; int Nfreq = 10; dft_flux flux1 = f.add_dft_flux_box(box1, fmin, fmax, Nfreq); dft_flux flux2 = f.add_dft_flux_box(box2, fmin, fmax, Nfreq); flux_vol *left = f.add_flux_plane(lb, lt); flux_vol *right = f.add_flux_plane(rb, rt); flux_vol *bottom = f.add_flux_plane(lb, rb); flux_vol *top = f.add_flux_plane(lt, rt); const double ttot = 130; f.step(); double init_energy = f.energy_in_box(box); master_printf("Initial energy is %g\n", init_energy); long double fluxL = 0; while (f.time() < ttot) { f.step(); fluxL += f.dt * (left->flux() - right->flux() + bottom->flux() - top->flux()); } double flux = fluxL; double del_energy = f.energy_in_box(box) - init_energy; master_printf("Final energy is %g\n", f.energy_in_box(box)); master_printf(" delta E: %g\n net flux: %g\n ratio: %g\n", del_energy, flux, del_energy/flux); if (!compare(del_energy, flux, 0.08, 0, "Flux")) return 0; while (f.time() < ttot*2) { f.step(); } master_printf(" energy after more time is %g\n", f.energy_in_box(box)); master_printf(" and energy in box2 is %g\n", f.energy_in_box(box2)); double *fl1 = flux1.flux(); double *fl2 = flux2.flux(); for (int i = 0; i < Nfreq; ++i) { master_printf(" flux(%g) = %g vs. %g (rat. = %g)\n", fmin + i * flux1.dfreq, fl1[i],fl2[i], fl1[i] / fl2[i]); if (!compare(fl1[i], fl2[i], 0.08, 0, "Flux spectrum")) return 0; } delete fl2; delete fl1; return 1; } void attempt(const char *name, int allright) { if (allright) master_printf("Passed %s\n", name); else abort("Failed %s!\n", name); } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; master_printf("Trying out the fluxes...\n"); attempt("Split flux plane split by 7...", split_1d(cavity, 7)); attempt("Cavity 1D 1.3 73", cavity_1d(1.3, 73.0, cavity)); attempt("Cavity 1D 5.0 1", cavity_1d(5.0, 1.0, cavity)); attempt("Cavity 1D 3.85 55", cavity_1d(3.85, 55.0, cavity)); width = 20.0; attempt("Flux 1D 20", flux_1d(100.0, bump)); width = 10.0; attempt("Flux 1D 10", flux_1d(100.0, bump)); width = 300.0; attempt("Flux 1D 300", flux_1d(100, bump)); width = 5.0; attempt("Flux 2D 5", flux_2d(10.0, 10.0, bump2)); width = 5.0; attempt("Flux cylindrical 5", flux_cyl(20.0, 10.0, bump2, 1)); return 0; } meep-openmpi-1.1.1/tests/bench.cpp0000644000175200017520000002272411243101206016261 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include using namespace meep; double one(const vec &) { return 1.0; } static double width = 20.0; double bump(const vec &pt) { return (fabs(pt.z()-50.0) > width)?1.0:12.0; } struct bench { double time; // In seconds. double gridsteps; }; bench bench_periodic(const double rmax, const double zmax, double eps(const vec &)) { const double a = 10.0; const double gridpts = (zmax==0.0)?a*rmax:a*a*rmax*zmax; const double ttot = 5.0 + 1e5/gridpts; const int m = 0; grid_volume gv = volcyl(rmax,zmax,a); structure s(gv, eps); fields f(&s, m); f.use_bloch(0.0); f.add_point_source(Ep, 0.7, 2.5, 0.0, 4.0, veccyl(0.5, 0.4), 1.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, veccyl(0.401, 0.301), 1.0); double start = wall_time(); while (f.time() < ttot) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_flux_1d(const double zmax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*zmax; const double ttot = 10.0 + 1e5/zmax; grid_volume gv = volone(zmax,a); structure s(gv, eps, pml(zmax/6)); fields f(&s); f.use_real_fields(); f.add_point_source(Ex, 0.7, 2.5, 0.0, 3.0, vec(zmax/2+0.3), 1.0); flux_vol *left = f.add_flux_plane(vec(zmax/3.0), vec(zmax/3.0)); flux_vol *right = f.add_flux_plane(vec(zmax*2.0/3.0), vec(zmax*2.0/3.0)); while (f.time() <= f.last_source_time()) f.step(); grid_volume mid = volone(zmax/3,a); mid.set_origin(vec(zmax/3)); double flux_energy=0.0; double start = wall_time(); while (f.time() < ttot) { f.step(); flux_energy += f.dt*(right->flux() - left->flux()); } bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_2d(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + 1e5/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); f.add_point_source(Hz, 0.8, 0.7, 0.0, 4.0, vec(0.431, 0.2)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } const double te_tm_2d_time = 2e5; bench bench_2d_tm_nonlinear(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + te_tm_2d_time/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); s.set_chi3(eps); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_2d_tm(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + te_tm_2d_time/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_2d_te(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + te_tm_2d_time/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); fields f(&s); f.add_point_source(Ex, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); f.add_point_source(Hz, 0.6, 0.6, 0.0, 4.0, vec(0.7, 0.5)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_2d_te_nonlinear(const double xmax, const double ymax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*xmax*ymax; const double ttot = 5.0 + te_tm_2d_time/gridpts; grid_volume gv = voltwo(xmax,ymax,a); structure s(gv, eps); s.set_chi3(eps); fields f(&s); f.add_point_source(Ex, 0.8, 0.6, 0.0, 4.0, vec(0.401, 0.301)); f.add_point_source(Hz, 0.6, 0.6, 0.0, 4.0, vec(0.7, 0.5)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } #define showbench(name, bb) { \ bench b = bb; \ master_printf("bench:, %s, %g, %g\n", \ name, b.time, b.time*1e6/b.gridsteps); \ } // 3D benchmarks: inline double max(double a, double b) { return (a>b)?a:b; } bench bench_3d_periodic(const double xmax, const double ymax, const double zmax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*a*max(xmax,1/a)*max(ymax,1/a)*max(zmax,1/a); const double ttot = 5.0 + 1e5/gridpts; grid_volume gv = vol3d(xmax,ymax,zmax,a); structure s(gv, eps); fields f(&s); if (xmax==0) f.use_bloch(X,0.0); if (ymax==0) f.use_bloch(Y,0.0); if (ymax==0) f.use_bloch(Z,0.0); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(xmax*.5, ymax*.5, zmax*.5)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } bench bench_3d(const double xmax, const double ymax, const double zmax, double eps(const vec &)) { const double a = 10.0; const double gridpts = a*a*a*xmax*ymax*zmax; const double ttot = 5.0 + 1e5/gridpts; grid_volume gv = vol3d(xmax,ymax,zmax,a); structure s(gv, eps); fields f(&s); f.add_point_source(Ez, 0.8, 0.6, 0.0, 4.0, vec(xmax*.5, ymax*.5, zmax*.5)); while (f.time() < f.last_source_time()) f.step(); const double tend = f.time() + ttot; double start = wall_time(); while (f.time() < tend) f.step(); bench b; b.time = (wall_time() - start); b.gridsteps = ttot*a*2*gridpts; //f.print_times(); return b; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; master_printf("Benchmarking with %d processor%s...\n", count_processors(), count_processors() > 1 ? "s" : ""); master_printf("bench:, test, total time (s), normalized time (s/Mgs)\n"); showbench("Periodic 6x4 ", bench_periodic(6.0, 4.0, one)); showbench("Periodic 12x1", bench_periodic(12.0, 1.0, one)); showbench("Periodic 1x12", bench_periodic(1.0, 12.0, one)); showbench("Periodic 12x0", bench_periodic(12.0, 0.0, one)); showbench("Periodic 12x12", bench_periodic(12.0, 12.0, one)); width = 20.0; showbench("Flux 1D 100", bench_flux_1d(100.0, bump)); width = 10.0; showbench("Flux 1D 100", bench_flux_1d(100.0, bump)); width = 300.0; showbench("Flux 1D 100", bench_flux_1d(100.0, bump)); showbench("3D 1x1x10", bench_3d(1.0, 1.0, 10.0, one)); showbench("3D 10x1x1", bench_3d(10.0, 1.0, 1.0, one)); showbench("3D 1x1x1 ", bench_3d(1.0, 1.0, 1.0, one)); showbench("3D 3x3x3 ", bench_3d(3.0, 3.0, 3.0, one)); showbench("3D 10x3x0", bench_3d_periodic(10.0, 3.0, 0.0, one)); showbench("3D 0x3x10", bench_3d_periodic(0.0, 3.0, 10.0, one)); showbench("2D 6x4 ", bench_2d(6.0, 4.0, one)); showbench("2D 12x12 ", bench_2d(12.0, 12.0, one)); showbench("2D 12x12 ", bench_2d(12.0, 12.0, one)); showbench("2D TM 6x4 nonlinear ", bench_2d_tm_nonlinear(6.0, 4.0, one)); showbench("2D TM 6x4 ", bench_2d_tm(6.0, 4.0, one)); showbench("2D TM 12x12 ", bench_2d_tm(12.0, 12.0, one)); showbench("2D TE 2x2 nonlinear ", bench_2d_te_nonlinear(2.0, 2.0, one)); showbench("2D TE 2x2 ", bench_2d_te(2.0, 2.0, one)); showbench("2D TE 10x11 nonlinear ", bench_2d_te_nonlinear(10.0, 11.0, one)); showbench("2D TE 10x11 ", bench_2d_te(10.0, 11.0, one)); master_printf("\nnote: 1 Mgs = 1 million grid point time steps\n"); return 0; } meep-openmpi-1.1.1/tests/integrate.cpp0000644000175200017520000003143611243101206017164 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Check of fields::integrate, by giving it random volumes in which to integrate purely linear functions of the coordinates--by construction, we should be able to integrate these exactly. */ #include #include #include #include using namespace meep; double size[3] = {3.0,3.0,2.6}; static double one(const vec &p) { (void) p; return 1.0; } typedef struct { direction dx, dy, dz; double c, ax,ay,az, axy,ayz,axz, axyz; long double sum; } linear_integrand_data; /* integrand for integrating c + ax*x + ay*y + az*z. */ static complex linear_integrand(const complex *fields, const vec &loc, void *data_) { linear_integrand_data *data = (linear_integrand_data *) data_; (void) fields; // unused // clean_vec is only necessary because we reference X/Y/Z for any gv.dim vec locS(clean_vec(loc)); return (data->c + data->ax * locS.in_direction(data->dx) + data->ay * locS.in_direction(data->dy) + data->az * locS.in_direction(data->dz) + data->axy * locS.in_direction(data->dx) * locS.in_direction(data->dy) + data->ayz * locS.in_direction(data->dz) * locS.in_direction(data->dy) + data->axz * locS.in_direction(data->dx) * locS.in_direction(data->dz) + data->axyz * locS.in_direction(data->dx) * locS.in_direction(data->dy) * locS.in_direction(data->dz) ); } /* integrals of 1 and x, respectively, from a to b, or 1 and x if a==b: */ static double integral1(double a, double b, direction d) { if (d == R) return a==b ? 2*pi*a : pi*(b*b-a*a); else return a==b ? 1 : b-a; } static double integralx(double a, double b, direction d) { if (d == R) return a==b ? 2*pi*a*a : 2*pi*(b*b*b-a*a*a)*.3333333333333333333333333; else return a==b ? a : (b*b-a*a)*.5; } static double correct_integral(const volume &v, const linear_integrand_data &data) { direction x = data.dx, y = data.dy, z = data.dz; double x1 = v.in_direction_min(x); double x2 = v.in_direction_max(x); double y1 = v.in_direction_min(y); double y2 = v.in_direction_max(y); double z1 = v.in_direction_min(z); double z2 = v.in_direction_max(z); return (data.c * integral1(x1,x2,x) * integral1(y1,y2,y) * integral1(z1,z2,z) + data.ax * integralx(x1,x2,x) * integral1(y1,y2,y) * integral1(z1,z2,z) + data.ay * integral1(x1,x2,x) * integralx(y1,y2,y) * integral1(z1,z2,z) + data.az * integral1(x1,x2,x) * integral1(y1,y2,y) * integralx(z1,z2,z) + data.axy * integralx(x1,x2,x) * integralx(y1,y2,y) * integral1(z1,z2,z) + data.ayz * integral1(x1,x2,x) * integralx(y1,y2,y) * integralx(z1,z2,z) + data.axz * integralx(x1,x2,x) * integral1(y1,y2,y) * integralx(z1,z2,z) + data.axyz * integralx(x1,x2,x) * integralx(y1,y2,y) * integralx(z1,z2,z) ); } // uniform pseudo-random number in [min,max] static double urand(double min, double max) { return (rand() * ((max - min) / RAND_MAX) + min); } static volume random_gv(ndim dim) { volume v(dim); double s[3] = {0,0,0}; int idim = dim == Dcyl ? 1 : int(dim); switch (rand() % (idim + 2)) { /* dimensionality */ case 0: break; case 1: { int d = rand() % (idim + 1); s[d] = urand(0, size[d]); break; } case 2: { int d1 = rand() % (idim + 1); int d2 = (d1 + 1 + rand() % 2) % 3; s[d1] = urand(0, size[d1]); s[d2] = urand(0, size[d2]); break; } case 3: s[0] = urand(0, size[0]); s[1] = urand(0, size[1]); s[2] = urand(0, size[2]); } switch (dim) { case D1: v.set_direction_min(X, 0); v.set_direction_max(X, 0); v.set_direction_min(Y, 0); v.set_direction_max(Y, 0); v.set_direction_min(Z, urand(-100, 100)); v.set_direction_max(Z, s[0] + v.in_direction_min(Z)); break; case D2: v.set_direction_min(X, urand(-100, 100)); v.set_direction_min(Y, urand(-100, 100)); v.set_direction_max(X, s[0] + v.in_direction_min(X)); v.set_direction_max(Y, s[1] + v.in_direction_min(Y)); v.set_direction_min(Z, 0); v.set_direction_max(Z, 0); break; case Dcyl: v.set_direction_min(X, 0); v.set_direction_max(X, 0); v.set_direction_min(Y, 0); v.set_direction_max(Y, 0); v.set_direction_min(R, 0.1 + urand(0, size[0] - s[0])); v.set_direction_min(Z, urand(-100, 100)); v.set_direction_max(R, s[0] + v.in_direction_min(R)); v.set_direction_max(Z, s[1] + v.in_direction_min(Z)); v.set_direction_min(P, 0); v.set_direction_max(P, 0); break; case D3: v.set_direction_min(X, urand(-100, 100)); v.set_direction_min(Y, urand(-100, 100)); v.set_direction_max(X, s[0] + v.in_direction_min(X)); v.set_direction_max(Y, s[1] + v.in_direction_min(Y)); v.set_direction_min(Z, urand(-100, 100)); v.set_direction_max(Z, s[2] + v.in_direction_min(Z)); break; default: abort("unsupported dimensionality in integrate.cpp"); } return v; } void check_integral(fields &f, linear_integrand_data &d, const volume &v, component cgrid) { double x1 = v.in_direction_min(d.dx); double x2 = v.in_direction_max(d.dx); double y1 = v.in_direction_min(d.dy); double y2 = v.in_direction_max(d.dy); double z1 = v.in_direction_min(d.dz); double z2 = v.in_direction_max(d.dz); master_printf("Check %d-dim. %s integral in %s cell with %s integrand...", (x2 - x1 > 0) + (y2 - y1 > 0) + (z2 - z1 > 0), component_name(cgrid), v.dim == D3 ? "3d" : (v.dim == D2 ? "2d" : (v.dim == Dcyl ? "cylindrical" : "1d")), (d.c == 1.0 && !d.axy && !d.ax && !d.ay && !d.az && !d.axy && !d.ayz && !d.axz) ? "unit" : "linear"); if (0) master_printf("\n... grid_volume (%g,%g,%g) at (%g,%g,%g) with integral (%g, %g,%g,%g, %g,%g,%g, %g)...\n", x2 - x1, y2 - y1, z2 - z1, (x1+x2)/2, (y1+y2)/2, (z1+z2)/2, d.c, d.ax,d.ay,d.az, d.axy,d.ayz,d.axz, d.axyz); double sum = real(f.integrate(0, 0, linear_integrand, (void *) &d, v)); if (fabs(sum - correct_integral(v, d)) > 1e-9 * fabs(sum)) abort("FAILED: %0.16g instead of %0.16g\n", (double) sum, correct_integral(v, d)); master_printf("...PASSED.\n"); } void check_splitsym(const grid_volume &gv, int splitting, const symmetry &S, const char *Sname) { const int num_random_trials = 100; structure s(gv, one, no_pml(), S, splitting); fields f(&s); // periodic boundaries: f.use_bloch(zero_vec(gv.dim)); linear_integrand_data d; if (gv.dim == Dcyl) { d.dx = R; d.dy = P; d.dz = Z; } else { d.dx = X; d.dy = Y; d.dz = Z; } master_printf("\nCHECKS for splitting=%d, symmetry=%s\n...", splitting, Sname); for (int i = 0; i < num_random_trials; ++i) { volume v(random_gv(gv.dim)); component cgrid; do { cgrid = component(rand() % (Dielectric + 1)); } while (coordinate_mismatch(gv.dim, component_direction(cgrid))); // try integral of 1 first (easier to debug, I hope) d.c = 1.0; d.ax = d.ay = d.az = d.axy = d.ayz = d.axz = d.axyz = 0.0; check_integral(f, d, v, cgrid); d.c = urand(-1,1); d.ax = urand(-1,1); d.ay = urand(-1,1); d.az = urand(-1,1); d.axy = urand(-1,1); d.ayz = urand(-1,1); d.axz = urand(-1,1); d.axyz = urand(-1,1); if (gv.dim == Dcyl) // cyl. doesn't integrate linear functions of r exactly d.ax = d.axy = d.axz = d.axyz = 0; check_integral(f, d, v, cgrid); } } // check LOOP_OVER_VOL and LOOP_OVER_VOL_OWNED macros void check_loop_vol(const grid_volume &gv, component c) { int count = 0, min_i = gv.ntot(), max_i = 0, count_owned = 0; master_printf("Checking %s loops for %s grid_volume...\n", component_name(c), dimension_name(gv.dim)); ivec vmin(gv.little_corner() + gv.iyee_shift(c)); ivec vmax(gv.big_corner() + gv.iyee_shift(c)); LOOP_OVER_VOL(gv, c, i) { IVEC_LOOP_ILOC(gv, ihere); IVEC_LOOP_LOC(gv, here); ivec ihere0(gv.iloc(c, i)); vec here0(gv[ihere0]); if (ihere0 != ihere) abort("FAILED: wrong LOOP_OVER_VOL iloc at i=%d\n", i); if (abs(here0 - here) > 1e-13) abort("FAILED: wrong LOOP_OVER_VOL loc (err = %g) at i=%d\n", abs(here0 - here), i); ++count; if (i < min_i) min_i = i; if (i > max_i) max_i = i; if (gv.owns(ihere)) ++count_owned; if (ihere < vmin || ihere > vmax) abort("FAILED: LOOP_OVER_VOL outside V at i=%d\n", i); } if (count != gv.ntot()) abort("FAILED: LOOP_OVER_VOL has %d iterations instead of ntot=%d\n", count, gv.ntot()); if (count_owned != gv.nowned(c)) abort("FAILED: LOOP_OVER_VOL has %d owned points instead of nowned=%d\n", count_owned, gv.nowned(c)); if (min_i != 0) abort("FAILED: LOOP_OVER_VOL has minimum index %d instead of 0\n", min_i); if (max_i != gv.ntot() - 1) abort("FAILED: LOOP_OVER_VOL has max index %d instead of ntot-1\n", max_i); count = 0; LOOP_OVER_VOL_OWNED(gv, c, i) { IVEC_LOOP_ILOC(gv, ihere); IVEC_LOOP_LOC(gv, here); ivec ihere0(gv.iloc(c, i)); vec here0(gv[ihere0]); if (ihere0 != ihere) abort("FAILED: wrong LOOP_OVER_VOL_OWNED iloc at i=%d\n", i); if (abs(here0 - here) > 1e-13) abort("FAILED: wrong LOOP_OVER_VOL_OWNED loc (err = %g) at i=%d\n", abs(here0 - here), i); if (!gv.owns(ihere)) abort("FAILED: LOOP_OVER_VOL_OWNED includes non-owned at i=%d\n", i); ++count; } if (count != count_owned) abort("FAILED: LOOP_OVER_VOL_OWNED has %d iterations instead of %d\n", count, count_owned); count = 0; LOOP_OVER_VOL_NOTOWNED(gv, c, i) { IVEC_LOOP_ILOC(gv, ihere); IVEC_LOOP_LOC(gv, here); ivec ihere0(gv.iloc(c, i)); vec here0(gv[ihere0]); if (ihere0 != ihere) abort("FAILED: wrong LOOP_OVER_VOL_NOTOWNED iloc at i=%d\n", i); if (abs(here0 - here) > 1e-13) abort("FAILED: wrong LOOP_OVER_VOL_NOTOWNED loc (err = %g) at i=%d\n", abs(here0 - here), i); if (gv.owns(ihere)) abort("FAILED: LOOP_OVER_VOL_NOTOWNED includes owned at i=%d\n", i); if (ihere < vmin || ihere > vmax) abort("FAILED: LOOP_OVER_VOL_NOTOWNED outside V at i=%d\n", i); ++count; } if (count != gv.ntot() - count_owned) abort("FAILED: LOOP_OVER_VOL_NOTOWNED has %d iterations instead of %d\n", count, gv.ntot() - count_owned); master_printf("...PASSED.\n"); } int main(int argc, char **argv) { const double a = 10.0; initialize mpi(argc, argv); quiet = true; const grid_volume v3d = vol3d(size[0], size[1], size[2], a); const grid_volume v3d0 = vol3d(size[0], size[1], 0, a); const grid_volume v3d00 = vol3d(size[0], 0, 0, a); const grid_volume v2d = vol2d(size[0], size[1], a); const grid_volume v1d = vol1d(size[0], a); const grid_volume vcyl = volcyl(size[0], size[1], a); for (int ic = Ex; ic <= Dielectric; ++ic) { component c = component(ic); check_loop_vol(v1d, c); check_loop_vol(v2d, c); check_loop_vol(v3d, c); check_loop_vol(vcyl, c); check_loop_vol(v3d0, c); check_loop_vol(v3d00, c); } srand(0); // use fixed random sequence for (int splitting = 0; splitting < 5; ++splitting) { check_splitsym(v3d, splitting, identity(), "identity"); check_splitsym(v3d, splitting, mirror(X,v3d), "mirrorx"); check_splitsym(v3d, splitting, mirror(Y,v3d), "mirrory"); check_splitsym(v3d, splitting, mirror(X,v3d) + mirror(Y,v3d), "mirrorxy"); check_splitsym(v3d, splitting, rotate4(Z,v3d), "rotate4"); } for (int splitting = 0; splitting < 5; ++splitting) { check_splitsym(v2d, splitting, identity(), "identity"); check_splitsym(v2d, splitting, mirror(X,v2d), "mirrorx"); check_splitsym(v2d, splitting, mirror(Y,v2d), "mirrory"); check_splitsym(v2d, splitting, mirror(X,v2d) + mirror(Y,v2d), "mirrorxy"); check_splitsym(v2d, splitting, rotate4(Z,v2d), "rotate4"); } const grid_volume vcyl_pad = volcyl(size[0] + 0.2, size[1], a); for (int splitting = 0; splitting < 5; ++splitting) { check_splitsym(vcyl_pad, splitting, identity(), "identity"); check_splitsym(vcyl_pad, splitting, mirror(Z,vcyl), "mirrorz"); } for (int splitting = 0; splitting < 5; ++splitting) { check_splitsym(v1d, splitting, identity(), "identity"); check_splitsym(v1d, splitting, mirror(Z,v1d), "mirrorz"); } return 0; } meep-openmpi-1.1.1/tests/pml.cpp0000644000175200017520000003025511243142205015774 0ustar debiandebian#include #include #include using namespace meep; // a simple material with xy offdiagonal terms in the tensors, for testing class offdiag_material : public material_function { public: offdiag_material(double offdiag) : offdiag(offdiag) {} virtual bool has_mu() { return true; } virtual void eff_chi1inv_row(component c, double chi1inv_row[3], const volume &v, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL) { // we are returning inv(1+chi1), so we must compute the inverse // inv([1+od od; od 1+od]) = [1+od -od; -od 1+od] / (1+2*o) double detinv = 1.0 / (1 + 2 * offdiag); if (component_direction(c) == X) { chi1inv_row[0] = (1 + offdiag) * detinv; chi1inv_row[1] = -offdiag * detinv; chi1inv_row[2] = 0.0; } else if (component_direction(c) == Y) { chi1inv_row[0] = -offdiag * detinv; chi1inv_row[1] = (1 + offdiag) * detinv; chi1inv_row[2] = 0.0; } else { chi1inv_row[0] = 0.0; chi1inv_row[1] = 0.0; chi1inv_row[2] = 1.0; } } double offdiag; }; static double one(const vec &) { return 1.0; } static double notone_val = 1.0; static double notone(const vec &) { return notone_val; } static complex do_ft(fields &f, component c, const vec &pt, double freq) { complex ft = 0.0; double emax = 0; while (f.time() < f.last_source_time()) { complex fpt = f.get_field(c, pt); ft += fpt * polar(1.0, 2*pi*freq * f.time()); emax = max(emax, abs(fpt)); f.step(); } do { double emaxcur = 0; double T = f.time() + 50; while (f.time() < T) { complex fpt = f.get_field(c, pt); ft += fpt * polar(1.0, 2*pi*freq * f.time()); double e = abs(fpt); emax = max(emax, e); emaxcur = max(emaxcur, e); f.step(); } if (emaxcur < 1e-6 * emax) break; if (T > 500 && emaxcur > 1e-2 * emax) abort("fields do not seem to be decaying"); } while(1); return ft; } int check_pml1d(double eps(const vec &), double conductivity) { double freq = 1.0, dpml = 1.0; double sz = 1.0 + 2*dpml; double sz2 = 1.0 + 2*dpml*2; complex ft = 0.0, ft2 = 0.0; double prev_refl_const = 0.0, refl_const = 0.0; vec fpt(0.5*sz - dpml - 0.1); master_printf("Checking resolution convergence of 1d PML...\n"); if (conductivity != 0) master_printf("...with conductivity %g...\n", conductivity); notone_val = conductivity; for (int i=0; i<8; i++) { double res = 10.0 + 10.0*i; { grid_volume gv = vol1d(sz,res); gv.center_origin(); structure s(gv, eps, pml(dpml)); s.set_conductivity(By, notone); fields f(&s); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ex, src, vec(-0.5*sz+dpml+0.1)); ft = do_ft(f, Ex, fpt, freq); } { grid_volume gv = vol1d(sz2,res); gv.center_origin(); structure s(gv, eps, pml(dpml*2)); s.set_conductivity(By, notone); fields f(&s); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ex, src, vec(-0.5*sz+dpml+0.1)); ft2 = do_ft(f, Ex, fpt, freq); } refl_const = pow(abs(ft - ft2),2.0) / pow(abs(ft2),2.0); master_printf("refl1d:, %g, %g\n", res, refl_const); if (i > 0 && refl_const > prev_refl_const * pow((res - 10)/res,8.0) * 1.1) return 1; prev_refl_const = refl_const; } master_printf("passed 1d PML check.\n"); return 0; } int check_pml2d(double eps(const vec &), component c, double conductivity, bool dispersion, double offdiag) { double freq = 1.0, dpml = 1.0, sigma0 = 1.0, omega0 = 1.0, gamma0 = 0.3; complex ft = 0.0, ft2 = 0.0; double prev_refl_const = 0.0, refl_const = 0.0; double sxy = 4.0 + 2*dpml; double sxy2 = 4.0 + 2*dpml*2; double res_step = 6.0; vec fpt(0.5*sxy - dpml - 0.1,0); if (c != Ez && c != Hz) abort("unimplemented component check"); double symsign = c == Ez ? 1.0 : -1.0; master_printf("Checking resolution convergence of 2d %s PML...\n", c == Ez ? "TM" : "TE"); if (conductivity != 0) master_printf("...with conductivity %g...\n", conductivity); if (dispersion) master_printf("...with dispersion\n"); if (offdiag != 0) master_printf("...with offdiag %g...\n", offdiag); offdiag_material mat(offdiag); for (int i=0; i<4; i++) { double res = 10.0 + res_step*i; { grid_volume gv = vol2d(sxy,sxy,res); gv.center_origin(); const symmetry S = offdiag != 0 ? rotate2(Z,gv) : mirror(X,gv)*symsign + mirror(Y,gv)*symsign; structure s(gv, eps, pml(dpml), S); if (conductivity != 0) { notone_val = conductivity; s.set_conductivity(Bx, notone); s.set_conductivity(By, notone); s.set_conductivity(Bz, notone); s.set_conductivity(Dx, notone); s.set_conductivity(Dy, notone); s.set_conductivity(Dz, notone); } if (dispersion) { notone_val = sigma0; s.add_polarizability(notone, E_stuff, omega0, gamma0); } if (offdiag != 0) s.set_materials(mat, false); fields f(&s); f.use_real_fields(); gaussian_src_time src(freq, freq / 20); f.add_point_source(c, src, gv.center()); ft = do_ft(f, c, fpt, freq); } { grid_volume gv = vol2d(sxy2,sxy2,res); gv.center_origin(); const symmetry S = offdiag != 0 ? rotate2(Z,gv) : mirror(X,gv)*symsign + mirror(Y,gv)*symsign; structure s(gv, eps, pml(dpml*2), S); if (conductivity != 0) { notone_val = conductivity; s.set_conductivity(Bx, notone); s.set_conductivity(By, notone); s.set_conductivity(Bz, notone); s.set_conductivity(Dx, notone); s.set_conductivity(Dy, notone); s.set_conductivity(Dz, notone); } if (dispersion) { notone_val = sigma0; s.add_polarizability(notone, E_stuff, omega0, gamma0); } if (offdiag != 0) s.set_materials(mat, false); fields f(&s); f.use_real_fields(); gaussian_src_time src(freq, freq / 20); f.add_point_source(c, src, gv.center()); ft2 = do_ft(f, c, fpt, freq); } refl_const = pow(abs(ft - ft2),2.0) / pow(abs(ft2),2.0); master_printf("refl2d:, %g, %g\n", res, refl_const); if (i > 0 && refl_const > prev_refl_const * pow((res - res_step)/res, offdiag != 0 ? 6.0 : 8.0) * 1.1) return 1; prev_refl_const = refl_const; } master_printf("passed 2d %s PML check.\n", c == Ez ? "TM" : "TE"); return 0; } /* The cylindrical case actually shouldn't have a reflection that goes to zero with increasing resolution - we implement only a "quasi-PML" for cylindrical coordinates, which is basically the PML for Cartesian coordinates copied over directly to the cylindrical case, rather than doing a proper coordinate stretching of r. This is not a practical issue because, rather than increasing the resolution, in practice you increase the PML thickness to eliminate reflections, and increasing a quasi-PML thickness makes the reflection vanish by the usual adiabatic theorem. Because of that, we don't actually run this check as part of the test suite, but I'll leave the code here for future study of the cylindrical PML. */ int check_pmlcyl(double eps(const vec &)) { double freq = 1.0, dpml = 1.0; complex ft = 0.0, ft2 = 0.0; double prev_refl_const = 0.0, refl_const = 0.0; double sr = 5.0 + dpml, sz = 1.0 + 2*dpml; double sr2 = 5.0 + dpml*2, sz2 = 1.0 + 2*dpml*2; vec fpt = veccyl(sr - dpml - 0.1,0); double res_step = 6.0; master_printf("Checking resolution convergence of cylindrical PML...\n"); for (int i=0; i<5; i++) { double res = 10.0 + res_step*i; master_printf(" checking cylindrical resolution %g...\n", res); { grid_volume gv = volcyl(sr,sz,res); gv.center_origin(); structure s(gv, eps, pml(dpml)); fields f(&s, 0); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ez, src, veccyl(0.1,0.1)); ft = do_ft(f, Ez, fpt, freq); } { grid_volume gv = volcyl(sr2,sz2,res); gv.center_origin(); structure s(gv, eps, pml(dpml*2)); fields f(&s, 0); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ez, src, veccyl(0.1,0.1)); ft2 = do_ft(f, Ez, fpt, freq); } refl_const = pow(abs(ft - ft2),2.0) / pow(abs(ft2),2.0); master_printf("reflcyl:, %g, %g\n", res, refl_const); prev_refl_const = refl_const; } master_printf("passed cylindrical PML check.\n"); return 0; } int pml1d_scaling(double eps(const vec &)) { double res = 20, freq = 1.0, dpml = 0; complex prev_ft = 0.0, ft = 0.0; double refl_const = 0.0, prev_refl_const = 0.0; master_printf("Checking thickness convergence of 1d PML...\n"); for (int i=0; i < (sizeof(realnum)==sizeof(float) ? 5 : 7); i++) { dpml = pow(2.0,(double)i); double sz = 2*dpml + 10.0 + dpml; prev_ft = ft; { grid_volume gv = vol1d(sz,res); structure s(gv, eps, (pml(2*dpml,Z,Low) + pml(dpml,Z,High)) * 1.5); fields f(&s); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ex, src, vec(2*dpml+0.1)); ft = do_ft(f, Ex, vec(sz - dpml - 0.1), freq); } if (i > 0) { refl_const = pow(abs(ft - prev_ft),2.0) / pow(abs(prev_ft),2.0); master_printf("refl1d:, %g, %g\n", dpml, refl_const); if (refl_const > (1e-9)*pow(2/dpml,6.0) || refl_const < (1e-10)*pow(2/dpml, 6.0)) return 1; if (i > 1) { master_printf("ratio R(%g)/R(%g) * 2^6 = %g\n", dpml, dpml/2, (refl_const/prev_refl_const) * 64.0); if ((refl_const/prev_refl_const) * 64.0 > 1.1) return 1; } prev_refl_const = refl_const; } } master_printf("pml scales correctly with length.\n"); return 0; } int pmlcyl_scaling(double eps(const vec &), int m) { double res = 10, freq = 1.0, dpml = 0; complex prev_ft = 0.0, ft = 0.0; double refl_const = 0.0, prev_refl_const = 0.0; master_printf("Checking thickness convergence of cylindrical PML for m=%d...\n", m); for (int i=0; i < 3; i++) { dpml = pow(2.0,(double)i); double sr = 5.0 + dpml, sz = dpml + 5.0 + dpml; prev_ft = ft; { grid_volume gv = volcyl(sr,sz,res); gv.center_origin(); structure s(gv, eps, pml(dpml)); fields f(&s, m); gaussian_src_time src(freq, freq / 20); f.add_point_source(Ez, src, veccyl(0.5 * (sr - dpml), 0.1)); ft = do_ft(f, Ez, veccyl(sr - dpml - 0.1,0), freq); } if (i > 0) { refl_const = pow(abs(ft - prev_ft),2.0) / pow(abs(prev_ft),2.0); master_printf("reflcyl:, %g, %g\n", dpml, refl_const); if (refl_const > (1e-5)*pow(2/dpml,6.0) || refl_const < (1e-8)*pow(2/dpml, 6.0)) return 1; if (i > 1) { master_printf("ratio R(%g)/R(%g) * 2^6 = %g\n", dpml, dpml/2, (refl_const/prev_refl_const) * 64.0); if ((refl_const/prev_refl_const) * 64.0 > 1.1) return 1; } prev_refl_const = refl_const; } } master_printf("pml scales correctly with length.\n"); return 0; } int main(int argc, char **argv) { initialize mpi(argc, argv); quiet = true; master_printf("Running PML tests...\n"); if (check_pml1d(one, 0)) abort("not a pml in 1d."); if (check_pml1d(one, 10.0)) abort("not a pml in 1d + conductivity."); if (check_pml2d(one,Ez,0,false,0)) abort("not a pml in 2d TM."); // if (check_pml2d(one,Ez,1,false,0)) abort("not a pml in 2d TM + conduct."); // if (check_pml2d(one,Hz,0,false,0)) abort("not a pml in 2d TE."); if (check_pml2d(one,Hz,1,false,0)) abort("not a pml in 2d TE + conduct."); // if (check_pml2d(one,Ez,0,true,0)) abort("not a pml in 2d TM + dispersion."); if (check_pml2d(one,Hz,0,true,0)) abort("not a pml in 2d TE + dispersion."); if (check_pml2d(one,Ez,0,false,0.5)) abort("not a pml in 2d TM + offdiag."); if (check_pml2d(one,Hz,0,false,0.5)) abort("not a pml in 2d TE + offdiag."); // if (check_pmlcyl(one)) abort("not a pml in cylincrical co-ordinates."); if (pml1d_scaling(one)) abort("pml doesn't scale properly with length."); if (pmlcyl_scaling(one, 0)) abort("m=0 cylindrical pml doesn't scale properly with length."); if (pmlcyl_scaling(one, 1)) abort("m=1 cylindrical pml doesn't scale properly with length."); if (pmlcyl_scaling(one, 2)) abort("m=2 cylindrical pml doesn't scale properly with length."); return 0; } meep-openmpi-1.1.1/AUTHORS0000644000175200017520000000045111243354676014422 0ustar debiandebianIn roughly chronological order: David Roundy Mihai Ibanescu Peter Bermel Steven G. Johnson Ardavan Farjadpour Oskooi Alejandro Rodriguez Alexander McCauley meep-openmpi-1.1.1/meep-pkgconfig.in0000644000175200017520000000037111173421137016563 0ustar debiandebianprefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: MEEP Description: time-domain electromagnetic simulation Version: @VERSION@ Libs: -L${libdir} -lmeep@MEEP_SUFFIX@ @MEEPLIBS@ Cflags: -I${includedir} @ARCHFLAG@ meep-openmpi-1.1.1/config.guess0000755000175200017520000013226411204551150015661 0ustar debiandebian#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2009-04-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: meep-openmpi-1.1.1/m4/0000755000175200017520000000000011243102063013647 5ustar debiandebianmeep-openmpi-1.1.1/m4/pkg.m40000644000175200017520000000407011173421136014702 0ustar debiandebiandnl Macro from pkg-config: http://www.freedesktop.org/software/pkgconfig/ dnl dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error AC_DEFUN([PKG_CHECK_MODULES], [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(for $2) if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) succeeded=yes AC_MSG_CHECKING($1_CFLAGS) $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` AC_MSG_RESULT($$1_CFLAGS) AC_MSG_CHECKING($1_LIBS) $1_LIBS=`$PKG_CONFIG --libs "$2"` AC_MSG_RESULT($$1_LIBS) else $1_CFLAGS="" $1_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ifelse([$4], ,echo $$1_PKG_ERRORS,) fi AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then ifelse([$3], , :, [$3]) else ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) fi ]) meep-openmpi-1.1.1/m4/ax_compiler_vendor.m40000644000175200017520000000265711173421136020011 0ustar debiandebiandnl @synopsis AX_COMPILER_VENDOR dnl @summary find the vendor (gnu, intel, etc.) of the C/C++ compiler dnl @category C dnl @category C++ dnl dnl Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, dnl sun, hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, dnl microsoft, watcom, etc. The vendor is returned in the cache variable dnl $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++. dnl dnl @version 2005-05-30 dnl @license GPLWithACException dnl @author Steven G. Johnson with Matteo Frigo AC_DEFUN([AX_COMPILER_VENDOR], [ AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown # note: don't check for gcc first since some other compilers define __GNUC__ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")" AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ #if !($vencpp) thisisanerror; #endif ])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break]) done ]) ]) meep-openmpi-1.1.1/m4/ax_gcc_x86_cpuid.m40000644000175200017520000000453111174460437017250 0ustar debiandebiandnl @synopsis AX_GCC_X86_CPUID(OP) dnl @summary run x86 cpuid instruction OP using gcc inline assembler dnl @category Misc dnl dnl On Pentium and later x86 processors, with gcc or a compiler that dnl has a compatible syntax for inline assembly instructions, run dnl a small program that executes the cpuid instruction with dnl input OP. This can be used to detect the CPU type. dnl dnl On output, the values of the eax, ebx, ecx, and edx registers dnl are stored as hexadecimal strings as "eax:ebx:ecx:edx" in dnl the cache variable ax_cv_gcc_x86_cpuid_OP. dnl dnl If the cpuid instruction fails (because you are running a cross-compiler, dnl or because you are not using gcc, or because you are on a processor dnl that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP is set dnl to the string "unknown". dnl dnl This macro mainly exists to be used in AX_GCC_ARCHFLAG. dnl dnl @version 2008-12-06 dnl @license GPLWithACException dnl @author Steven G. Johnson and Matteo Frigo. AC_DEFUN([AX_GCC_X86_CPUID], [AC_REQUIRE([AC_PROG_CC]) AC_LANG_PUSH([C]) AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1, [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], [ int op = $1, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ])], [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid], [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid], [ax_cv_gcc_x86_cpuid_$1=unknown])]) AC_LANG_POP([C]) ]) meep-openmpi-1.1.1/m4/lt~obsolete.m40000644000175200017520000001311311144147434016475 0ustar debiandebian# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) meep-openmpi-1.1.1/m4/ax_cxx_maxopt.m40000644000175200017520000001317111175440324017007 0ustar debiandebiandnl @synopsis AX_CXX_MAXOPT dnl @summary turn on optimization flags for the C++ compiler dnl @category C++ dnl dnl Try to turn on "good" C++ optimization flags for various compilers dnl and architectures, for some definition of "good". Modify as needed dnl based on your benchmarks. dnl dnl The user can override the flags by setting the CXXFLAGS environment dnl variable. The user can also specify --enable-portable-binary in dnl order to disable any optimization flags that might result in dnl a binary that only runs on the host architecture. dnl dnl Note also that the flags assume that ANSI C aliasing rules are dnl followed by the code (e.g. for gcc's -fstrict-aliasing), and that dnl floating-point computations can be re-ordered as needed. dnl dnl Requires macros: AX_CHECK_COMPILER_FLAGS, AX_COMPILER_VENDOR, dnl AX_GCC_ARCHFLAG, AX_GCC_X86_CPUID dnl dnl @version 2005-05-30 dnl @license GPLWithACException dnl @author Steven G. Johnson and Matteo Frigo. AC_DEFUN([AX_CXX_MAXOPT], [ AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_PUSH([C++]) AX_COMPILER_VENDOR AC_ARG_ENABLE(portable-binary, [AC_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])], acx_maxopt_portable=$withval, acx_maxopt_portable=no) # Try to determine "good" native compiler flags if none specified via CXXFLAGS if test "$ac_test_CXXFLAGS" != "set"; then CXXFLAGS="" case $ax_cv_cxx_compiler_vendor in dec) CXXFLAGS="-w0 -O5 -tune host" # -ansi_alias -ansi_args -fp_reorder ? if test "x$acx_maxopt_portable" = xno; then CXXFLAGS="$CXXFLAGS -arch host" fi;; sun) CXXFLAGS="-native -fast -dalign" # -xO5 ? if test "x$acx_maxopt_portable" = xyes; then CXXFLAGS="$CXXFLAGS -xarch=generic" fi;; hp) CXXFLAGS="+Oall +DSnative" # +Optrs_ansi ? if test "x$acx_maxopt_portable" = xyes; then CXXFLAGS="$CXXFLAGS +DAportable" fi;; ibm) if test "x$acx_maxopt_portable" = xno; then xlc_opt="-qarch=auto -qtune=auto" else xlc_opt="-qtune=auto" fi AX_CHECK_COMPILER_FLAGS($xlc_opt, CXXFLAGS="-O3 -qansialias -w $xlc_opt", [CXXFLAGS="-O3 -qansialias -w" echo "******************************************************" echo "* You seem to have the IBM C compiler. It is *" echo "* recommended for best performance that you use: *" echo "* *" echo "* CXXFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *" echo "* ^^^ ^^^ *" echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *" echo "* CPU you have. (Set the CXXFLAGS environment var. *" echo "* and re-run configure.) For more info, man xlC. *" echo "******************************************************"]) ;; intel) CXXFLAGS="-O3" # -ansi_alias ? if test "x$acx_maxopt_portable" = xno; then icc_archflag=unknown icc_flags="" # -xN etcetera are for older versions of icc: case $host_cpu in i686*|x86_64*) # icc accepts gcc assembly syntax, so these should work: AX_GCC_X86_CPUID(0) AX_GCC_X86_CPUID(1) case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG *:756e6547:*:*) # Intel case $ax_cv_gcc_x86_cpuid_1 in *6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";; *f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";; *f??:*:*:*) icc_flags="-xN -xW -xK";; esac ;; esac ;; esac # newer icc versions should support -xHost icc_flags="-xHost $icc_flags" if test "x$icc_flags" != x; then for flag in $icc_flags; do AX_CHECK_COMPILER_FLAGS($flag, [icc_archflag=$flag; break]) done fi AC_MSG_CHECKING([for icc architecture flag]) AC_MSG_RESULT($icc_archflag) if test "x$icc_archflag" != xunknown; then CXXFLAGS="$CXXFLAGS $icc_archflag" fi fi ;; gnu) # default optimization flags for g++ on all systems CXXFLAGS="-O3" # -malign-double for x86 systems AX_CHECK_COMPILER_FLAGS(-malign-double, CXXFLAGS="$CXXFLAGS -malign-double") AX_CHECK_COMPILER_FLAGS(-fstrict-aliasing, CXXFLAGS="$CXXFLAGS -fstrict-aliasing") # note that we enable "unsafe" fp optimization with other compilers, too AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math") AX_GCC_ARCHFLAG($acx_maxopt_portable) ;; esac if test -z "$CXXFLAGS"; then echo "" echo "********************************************************" echo "* WARNING: Don't know the best CXXFLAGS for this system *" echo "* Use ./configure CXXFLAGS=... to specify your own flags *" echo "* (otherwise, a default of CXXFLAGS=-O3 will be used) *" echo "********************************************************" echo "" CXXFLAGS="-O3" fi AX_CHECK_COMPILER_FLAGS($CXXFLAGS, [], [ echo "" echo "********************************************************" echo "* WARNING: The guessed CXXFLAGS don't seem to work with *" echo "* your compiler. *" echo "* Use ./configure CXXFLAGS=... to specify your own flags *" echo "********************************************************" echo "" CXXFLAGS="" ]) fi AC_LANG_POP([C++]) ]) meep-openmpi-1.1.1/m4/ax_gcc_archflag.m40000644000175200017520000001713311174465604017211 0ustar debiandebiandnl @synopsis AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE]) dnl @summary find target architecture name for gcc -march/-mtune flags dnl @category Misc dnl dnl This macro tries to guess the "native" arch corresponding to dnl the target architecture for use with gcc's -march=arch or -mtune=arch dnl flags. If found, the cache variable $ax_cv_gcc_archflag is set to this dnl flag and ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is dnl is set to "unknown" and ACTION-FAILURE is executed. The default dnl ACTION-SUCCESS is to add $ax_cv_gcc_archflag to the end of $CFLAGS. dnl dnl PORTABLE? should be either [yes] (default) or [no]. In the former case, dnl the flag is set to -mtune (or equivalent) so that the architecture dnl is only used for tuning, but the instruction set used is still dnl portable. In the latter case, the flag is set to -march (or equivalent) dnl so that architecture-specific instructions are enabled. dnl dnl The user can specify --with-gcc-arch= in order to override dnl the macro's choice of architecture, or --without-gcc-arch to dnl disable this. dnl dnl When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is dnl called unless the user specified --with-gcc-arch manually. dnl dnl Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID dnl dnl (The main emphasis here is on recent CPUs, on the principle that dnl doing high-performance computing on old hardware is uncommon.) dnl dnl @version 2008-10-29 dnl @license GPLWithACException dnl @author Steven G. Johnson and Matteo Frigo. AC_DEFUN([AX_GCC_ARCHFLAG], [AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=], [use architecture for gcc -march/-mtune, instead of guessing])], ax_gcc_arch=$withval, ax_gcc_arch=yes) AC_MSG_CHECKING([for gcc architecture flag]) AC_MSG_RESULT([]) AC_CACHE_VAL(ax_cv_gcc_archflag, [ ax_cv_gcc_archflag="unknown" if test "$GCC" = yes; then if test "x$ax_gcc_arch" = xyes; then ax_gcc_arch="" if test "$cross_compiling" = no; then case $host_cpu in i[[3456]]86*|x86_64*|amd64*) # use cpuid codes, in part from x86info-1.21 by D. Jones AX_GCC_X86_CPUID(0) AX_GCC_X86_CPUID(1) case $ax_cv_gcc_x86_cpuid_0 in *:756e6547:*:*) # Intel case $ax_cv_gcc_x86_cpuid_1 in *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;; *5??:*:*:*) ax_gcc_arch=pentium ;; *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; *6a?:*[[234]]:*:*) ax_gcc_arch="native pentium3 pentiumpro" ;; *6[[78b]]?:*:*:*) ax_gcc_arch="native pentium3 pentiumpro" ;; *6[[9d]]?:*:*:*) ax_gcc_arch="native pentium-m pentium3 pentiumpro" ;; *6[[e]]?:*:*:*) ax_gcc_arch="native pentium-m pentium3 pentiumpro" ;; # Core Duo *6f?:*:*:*) ax_gcc_arch="core2 native pentium-m pentium3 pentiumpro" ;; *6??:*:*:*) ax_gcc_arch="native pentiumpro" ;; *f3[[347]]:*:*:*|*f4[[1347]]:*:*:*) case $host_cpu in x86_64*|amd64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;; *) ax_gcc_arch="prescott pentium4 pentiumpro" ;; esac ;; *f??:*:*:*) ax_gcc_arch="native pentium4 pentiumpro";; esac ;; *:68747541:*:*) # AMD case $ax_cv_gcc_x86_cpuid_1 in *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;; *5[[8c]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;; *5[[9d]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;; *60?:*:*:*) ax_gcc_arch=k7 ;; *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;; *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;; *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;; *6[[68a]]?:*:*:*) AX_GCC_X86_CPUID(0x80000006) # L2 cache size case $ax_cv_gcc_x86_cpuid_0x80000006 in *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256 ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;; *) ax_gcc_arch="athlon-4 athlon k7" ;; esac ;; *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;; *f5?:*:*:*) ax_gcc_arch="opteron k8" ;; *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;; *f??:*:*:*) ax_gcc_arch="native k8" ;; esac ;; *:746e6543:*:*) # IDT case $ax_cv_gcc_x86_cpuid_1 in *54?:*:*:*) ax_gcc_arch=winchip-c6 ;; *58?:*:*:*) ax_gcc_arch=winchip2 ;; *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;; *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;; esac ;; esac if test x"$ax_gcc_arch" = x; then # fallback case $host_cpu in i586*) ax_gcc_arch="native pentium" ;; i686*) ax_gcc_arch="native pentiumpro" ;; x86_64*|amd64*) ax_gcc_arch="native" ;; esac fi ;; sparc*) AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/]) cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null` cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters` case $cputype in *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;; *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;; *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;; *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;; *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;; *cypress*) ax_gcc_arch=cypress ;; esac ;; alphaev5) ax_gcc_arch=ev5 ;; alphaev56) ax_gcc_arch=ev56 ;; alphapca56) ax_gcc_arch="pca56 ev56" ;; alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;; alphaev6) ax_gcc_arch=ev6 ;; alphaev67) ax_gcc_arch=ev67 ;; alphaev68) ax_gcc_arch="ev68 ev67" ;; alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;; alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;; alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;; powerpc*) cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null` cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'` case $cputype in *750*) ax_gcc_arch="750 G3" ;; *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;; *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;; *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;; *970*) ax_gcc_arch="970 G5 power4";; *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";; *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";; 603ev|8240) ax_gcc_arch="$cputype 603e 603";; *Cell*) ax_gcc_arch="cellppu cell";; *) ax_gcc_arch="$cputype native" ;; esac ax_gcc_arch="$ax_gcc_arch powerpc" ;; esac fi # not cross-compiling fi # guess arch if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then for arch in $ax_gcc_arch; do if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code flags="-mtune=$arch" # -mcpu=$arch and m$arch generate nonportable code on every arch except # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr. case $host_cpu in i*86|x86_64*|amd64*) flags="$flags -mcpu=$arch -m$arch";; esac else flags="-march=$arch -mcpu=$arch -m$arch" fi for flag in $flags; do AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break]) done test "x$ax_cv_gcc_archflag" = xunknown || break done fi fi # $GCC=yes ]) AC_MSG_CHECKING([for gcc architecture flag]) AC_MSG_RESULT($ax_cv_gcc_archflag) if test "x$ax_cv_gcc_archflag" = xunknown; then m4_default([$3],:) else m4_default([$2], [_AC_LANG_PREFIX[]FLAGS="$_AC_LANG_PREFIX[]FLAGS $ax_cv_gcc_archflag"]) fi ]) meep-openmpi-1.1.1/m4/ltoptions.m40000644000175200017520000002724211144147434016166 0ustar debiandebian# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) meep-openmpi-1.1.1/m4/acx_blas.m40000644000175200017520000001167711173421137015711 0ustar debiandebiandnl @synopsis ACX_BLAS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl @summary check for a fast BLAS linear-algebra library dnl @category InstalledPackages dnl dnl This macro looks for a library that implements the BLAS dnl linear-algebra interface (see http://www.netlib.org/blas/). dnl On success, it sets the BLAS_LIBS output variable to dnl hold the requisite library linkages. dnl dnl To link with BLAS, you should link with: dnl $BLAS_LIBS $LIBS $FLIBS dnl in that order. FLIBS is the output variable of the dnl AC_F77_LIBRARY_LDFLAGS macro (called if necessary by ACX_BLAS), dnl and is sometimes necessary in order to link with F77 libraries. dnl Users will also need to use AC_F77_DUMMY_MAIN (see the autoconf dnl manual), for the same reason. dnl dnl Many libraries are searched for, from ATLAS to CXML to ESSL. dnl The user may also use --with-blas= in order to use some dnl specific BLAS library . In order to link successfully, dnl however, be aware that you will probably need to use the same dnl Fortran compiler (which can be set via the F77 env. var.) as dnl was used to compile the BLAS library. dnl dnl ACTION-IF-FOUND is a list of shell commands to run if a BLAS dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, dnl the default action will define HAVE_BLAS. dnl dnl This macro requires autoconf 2.50 or later. dnl dnl @version 2007-08-10 dnl @license GPLWithACException dnl @author Steven G. Johnson AC_DEFUN([ACX_BLAS], [ AC_PREREQ(2.50) AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS]) acx_blas_ok=no AC_ARG_WITH(blas, [AC_HELP_STRING([--with-blas=], [use BLAS library ])]) case $with_blas in yes | "") ;; no) acx_blas_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; *) BLAS_LIBS="-l$with_blas" ;; esac # Get fortran linker names of BLAS functions to check for. AC_F77_FUNC(sgemm) AC_F77_FUNC(dgemm) acx_blas_save_LIBS="$LIBS" LIBS="$LIBS $FLIBS" # First, check BLAS_LIBS environment variable if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" AC_MSG_CHECKING([for $sgemm in $BLAS_LIBS]) AC_TRY_LINK_FUNC($sgemm, [acx_blas_ok=yes], [BLAS_LIBS=""]) AC_MSG_RESULT($acx_blas_ok) LIBS="$save_LIBS" fi fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" AC_CHECK_FUNC($sgemm, [acx_blas_ok=yes]) LIBS="$save_LIBS" fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then AC_CHECK_LIB(atlas, ATL_xerbla, [AC_CHECK_LIB(f77blas, $sgemm, [AC_CHECK_LIB(cblas, cblas_dgemm, [acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas"], [], [-lf77blas -latlas])], [], [-latlas])]) fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then AC_CHECK_LIB(blas, $sgemm, [AC_CHECK_LIB(dgemm, $dgemm, [AC_CHECK_LIB(sgemm, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"], [], [-lblas])], [], [-lblas])]) fi # BLAS in Intel MKL library? if test $acx_blas_ok = no; then AC_CHECK_LIB(mkl, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-lmkl"]) fi # BLAS in Apple vecLib library? if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" AC_CHECK_FUNC($sgemm, [acx_blas_ok=yes;BLAS_LIBS="-framework vecLib"]) LIBS="$save_LIBS" fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then AC_CHECK_LIB(cxml, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-lcxml"]) fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then AC_CHECK_LIB(dxml, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-ldxml"]) fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC AC_CHECK_LIB(sunmath, acosp, [AC_CHECK_LIB(sunperf, $sgemm, [BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes],[],[-lsunmath])]) fi fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then AC_CHECK_LIB(scs, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lscs"]) fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then AC_CHECK_LIB(complib.sgimath, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"]) fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then AC_CHECK_LIB(blas, $sgemm, [AC_CHECK_LIB(essl, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas"], [], [-lblas $FLIBS])]) fi # Generic BLAS library? if test $acx_blas_ok = no; then AC_CHECK_LIB(blas, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lblas"]) fi AC_SUBST(BLAS_LIBS) LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1]) : else acx_blas_ok=no $2 fi ])dnl ACX_BLAS meep-openmpi-1.1.1/m4/ax_check_compiler_flags.m40000644000175200017520000000316711173421136020742 0ustar debiandebiandnl @synopsis AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE]) dnl @summary check whether FLAGS are accepted by the compiler dnl @category Misc dnl dnl Check whether the given compiler FLAGS work with the current language's dnl compiler, or whether they give an error. (Warnings, however, are dnl ignored.) dnl dnl ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on dnl success/failure. dnl dnl @version 2005-05-30 dnl @license GPLWithACException dnl @author Steven G. Johnson and Matteo Frigo. AC_DEFUN([AX_CHECK_COMPILER_FLAGS], [AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1]) dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: AS_LITERAL_IF([$1], [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [ ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes, AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no) _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])], [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes, eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no) _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS]) eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1) AC_MSG_RESULT($ax_check_compiler_flags) if test "x$ax_check_compiler_flags" = xyes; then m4_default([$2], :) else m4_default([$3], :) fi ])dnl AX_CHECK_COMPILER_FLAGS meep-openmpi-1.1.1/m4/acx_lapack.m40000644000175200017520000000610211173421136016205 0ustar debiandebiandnl @synopsis ACX_LAPACK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl dnl This macro looks for a library that implements the LAPACK dnl linear-algebra interface (see http://www.netlib.org/lapack/). dnl On success, it sets the LAPACK_LIBS output variable to dnl hold the requisite library linkages. dnl dnl To link with LAPACK, you should link with: dnl $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS dnl in that order. BLAS_LIBS is the output variable of the ACX_BLAS dnl macro, called automatically. FLIBS is the output variable of the dnl AC_F77_LIBRARY_LDFLAGS macro (called if necessary by ACX_BLAS), dnl and is sometimes necessary in order to link with F77 libraries. dnl Users will also need to use AC_F77_DUMMY_MAIN (see the autoconf dnl manual), for the same reason. dnl dnl The user may also use --with-lapack= in order to use some dnl specific LAPACK library . In order to link successfully, dnl however, be aware that you will probably need to use the same dnl Fortran compiler (which can be set via the F77 env. var.) as dnl was used to compile the LAPACK and BLAS libraries. dnl dnl ACTION-IF-FOUND is a list of shell commands to run if a LAPACK dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, dnl the default action will define HAVE_LAPACK. dnl dnl @version $Id: acx_lapack.m4,v 1.3 2002/02/25 19:05:51 stevenj Exp $ dnl @author Steven G. Johnson AC_DEFUN([ACX_LAPACK], [ AC_REQUIRE([ACX_BLAS]) acx_lapack_ok=no AC_ARG_WITH(lapack, [AC_HELP_STRING([--with-lapack=], [use LAPACK library ])]) case $with_lapack in yes | "") ;; no) acx_lapack_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; *) LAPACK_LIBS="-l$with_lapack" ;; esac # Get fortran linker name of LAPACK function to check for. AC_F77_FUNC(cheev) # We cannot use LAPACK if BLAS is not found if test "x$acx_blas_ok" != xyes; then acx_lapack_ok=noblas fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" AC_MSG_CHECKING([for $cheev in $LAPACK_LIBS]) AC_TRY_LINK_FUNC($cheev, [acx_lapack_ok=yes], [LAPACK_LIBS=""]) AC_MSG_RESULT($acx_lapack_ok) LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" fi fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" AC_CHECK_FUNC($cheev, [acx_lapack_ok=yes]) LIBS="$save_LIBS" fi # Generic LAPACK library? for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" AC_CHECK_LIB($lapack, $cheev, [acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack"], [], [$FLIBS]) LIBS="$save_LIBS" fi done AC_SUBST(LAPACK_LIBS) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_LAPACK,1,[Define if you have LAPACK library.]),[$1]) : else acx_lapack_ok=no $2 fi ])dnl ACX_LAPACK meep-openmpi-1.1.1/m4/ltversion.m40000644000175200017520000000127511144147434016156 0ustar debiandebian# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3012 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6]) m4_define([LT_PACKAGE_REVISION], [1.3012]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6' macro_revision='1.3012' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) meep-openmpi-1.1.1/m4/acx_mpi.m40000644000175200017520000000707211173421136015546 0ustar debiandebiandnl @synopsis ACX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl @summary figure out how to compile/link code with MPI dnl @category InstalledPackages dnl dnl This macro tries to find out how to compile programs that dnl use MPI (Message Passing Interface), a standard API for dnl parallel process communication (see http://www-unix.mcs.anl.gov/mpi/) dnl dnl On success, it sets the MPICC, MPICXX, or MPIF77 output variable to dnl the name of the MPI compiler, depending upon the current language. dnl (This may just be $CC/$CXX/$F77, but is more often something like dnl mpicc/mpiCC/mpif77.) It also sets MPILIBS to any libraries that are dnl needed for linking MPI (e.g. -lmpi, if a special MPICC/MPICXX/MPIF77 dnl was not found). dnl dnl If you want to compile everything with MPI, you should set: dnl dnl CC="$MPICC" #OR# CXX="$MPICXX" #OR# F77="$MPIF77" dnl LIBS="$MPILIBS $LIBS" dnl dnl NOTE: The above assumes that you will use $CC (or whatever) dnl for linking as well as for compiling. (This is the dnl default for automake and most Makefiles.) dnl dnl The user can force a particular library/compiler by setting the dnl MPICC/MPICXX/MPIF77 and/or MPILIBS environment variables. dnl dnl ACTION-IF-FOUND is a list of shell commands to run if an MPI dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, dnl the default action will define HAVE_MPI. dnl dnl @version 2005-09-02 dnl @license GPLWithACException dnl @author Steven G. Johnson AC_DEFUN([ACX_MPI], [ AC_PREREQ(2.50) dnl for AC_LANG_CASE AC_LANG_CASE([C], [ AC_REQUIRE([AC_PROG_CC]) AC_ARG_VAR(MPICC,[MPI C compiler command]) AC_CHECK_PROGS(MPICC, mpicc hcc mpcc mpcc_r mpxlc cmpicc, $CC) acx_mpi_save_CC="$CC" CC="$MPICC" AC_SUBST(MPICC) ], [C++], [ AC_REQUIRE([AC_PROG_CXX]) AC_ARG_VAR(MPICXX,[MPI C++ compiler command]) AC_CHECK_PROGS(MPICXX, mpic++ mpiCC mpicxx mpCC hcp mpxlC mpxlC_r cmpic++, $CXX) acx_mpi_save_CXX="$CXX" CXX="$MPICXX" AC_SUBST(MPICXX) ], [Fortran 77], [ AC_REQUIRE([AC_PROG_F77]) AC_ARG_VAR(MPIF77,[MPI Fortran compiler command]) AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c, $F77) acx_mpi_save_F77="$F77" F77="$MPIF77" AC_SUBST(MPIF77) ]) if test x = x"$MPILIBS"; then AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [Fortran 77], [AC_MSG_CHECKING([for MPI_Init]) AC_TRY_LINK([],[ call MPI_Init], [MPILIBS=" " AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpi, MPI_Init, [MPILIBS="-lmpi"]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"]) fi dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the dnl latter uses $CPP, not $CC (which may be mpicc). AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi], [C++], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi]) AC_LANG_CASE([C], [CC="$acx_mpi_save_CC"], [C++], [CXX="$acx_mpi_save_CXX"], [Fortran 77], [F77="$acx_mpi_save_F77"]) AC_SUBST(MPILIBS) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then $2 : else ifelse([$1],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$1]) : fi ])dnl ACX_MPI meep-openmpi-1.1.1/m4/libtool.m40000644000175200017520000077317611144147434015615 0ustar debiandebian# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) meep-openmpi-1.1.1/m4/ltsugar.m40000644000175200017520000001042411144147434015606 0ustar debiandebian# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) meep-openmpi-1.1.1/install-sh0000755000175200017520000003253711204551150015347 0ustar debiandebian#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: meep-openmpi-1.1.1/COPYING0000644000175200017520000010451311144147411014374 0ustar debiandebian GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . meep-openmpi-1.1.1/Makefile.am0000644000175200017520000000130411243101777015374 0ustar debiandebianif WITH_LIBCTL LIBCTL = libctl else LIBCTL = endif ACLOCAL_AMFLAGS=-I m4 SUBDIRS = src $(LIBCTL) tests examples EXTRA_DIST = COPYRIGHT m4 meep-pkgconfig.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = meep@MEEP_SUFFIX@.pc meep@MEEP_SUFFIX@.pc: meep-pkgconfig cp -f $(top_builddir)/meep-pkgconfig $@ libmeep: cd src && $(MAKE) # Somewhat hackish. The "right" way to do this is by a dist-hook target, # but then darcs check will fail because it doesn't run in the darcs # repository. darcs-dist: distdir darcs changes --summary > $(distdir)/ChangeLog tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) DISTCLEANFILES = meep@MEEP_SUFFIX@.pc meep-openmpi-1.1.1/configure.ac0000644000175200017520000003724511243546232015642 0ustar debiandebian# Process this file with autoconf to produce a configure script. AC_INIT(meep, 1.1.1, meep@ab-initio.mit.edu) AC_CONFIG_SRCDIR(src/step.cpp) # Shared-library version number; indicates api compatibility, and is # not the same as the "public" version number. (Don't worry about this # except for public releases.) Note that any change to a C++ class # definition (in the .hpp file) generally breaks binary compatibility. SHARED_VERSION_INFO="6:1:0" # CURRENT:REVISION:AGE AM_INIT_AUTOMAKE([check-news color-tests parallel-tests silent-rules 1.11]) AM_SILENT_RULES(yes) AM_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR([m4]) AM_MAINTAINER_MODE AC_SUBST(SHARED_VERSION_INFO) AM_ENABLE_SHARED(no) dnl shared libs cause too many headaches to be default MEEP_SUFFIX="" ############################################################################## # Check for mpiCC immediately after getting C++ compiler... AC_PROG_CXX AC_LANG([C++]) # Check for MPI library AC_ARG_WITH(mpi, [AC_HELP_STRING([--with-mpi],[enable MPI parallelization])], with_mpi=$withval, with_mpi=no) if test "x$with_mpi" = "xyes"; then ACX_MPI([],[AC_MSG_ERROR([could not find mpi library for --with-mpi])]) CXX=$MPICXX MEEP_SUFFIX="${MEEP_SUFFIX}_mpi" # Detect stupid MPICH problem with SEEK_SET conflicting between # the mpi.h header file and the stdio.h header file in C++ AC_MSG_CHECKING([for extra flag needed to combine stdio.h and mpi.h]) for flag in none -DMPICH_IGNORE_CXX_SEEK unknown; do if test "x$flag" = xunknown; then break; fi save_CPPFLAGS=$CPPFLAGS if test "x$flag" != xnone; then CPPFLAGS="$CPPFLAGS $flag"; fi AC_TRY_COMPILE([#include #include ], [], [break], []) CPPFLAGS=$save_CPPFLAGS done AC_MSG_RESULT($flag) if test "x$flag" = xunknown; then AC_MSG_CHECKING([if we can combine stdio.h and mpi.h by undef'ing SEEK_*]) AC_TRY_COMPILE([#include #undef SEEK_SET #undef SEEK_END #undef SEEK_CUR #include ], [], [AC_MSG_RESULT(yes) AC_DEFINE([NEED_UNDEF_SEEK_FOR_MPI], 1, [Define if mpi.h needs SEEK macros to be undefined])], [AC_MSG_RESULT(no) AC_MSG_ERROR([can't include stdio.h and mpi.h in same file])]) fi fi ############################################################################## # Compiler flags # Pick "good" compiler flags(?) AX_CXX_MAXOPT AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[compile for debugging])], enable_debug=$enableval, enable_debug=no) if test "$enable_debug" = "yes"; then CFLAGS="-g" CXXFLAGS="-g" FFLAGS="-g" AC_DEFINE(DEBUG,1,[define to enable debugging code]) fi # Add lots of compiler warnings in maintainer mode if we are using gcc: # (The variable $GXX is set to "yes" by AC_PROG_CXX if we are using g++.) if test "$GXX" = "yes" && test "$USE_MAINTAINER_MODE" = yes; then CXXFLAGS="$CXXFLAGS -Wall -W" fi # For some annoying reason, g++ requires you to compile # all code with -march if you compile any code with -march, # otherwise segfaults can occur (observed in g++ 3.3.5). # We also need to be careful about -malign-double. ARCHFLAG="" for flg in $CXXFLAGS; do case $flg in -march=*|-mcpu=*|-malign*) ARCHFLAG="$ARCHFLAG $flg" ;; esac done AC_SUBST(ARCHFLAG) ############################################################################## # More checks AC_PROG_LIBTOOL AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html) if test -z "$LATEX2HTML"; then AC_MSG_WARN([Cannot find latex2html in your path!]) # FIXME: use standard 'missing' script from automake LATEX2HTML='echo not running latex2html...' fi AC_SUBST(LATEX2HTML) AC_CHECK_LIB(m, sin) AC_CHECK_LIB(fftw3, fftw_plan_dft_1d, [], [AC_CHECK_LIB(dfftw, fftw_create_plan, [], [AC_CHECK_LIB(fftw, fftw_create_plan, [], [AC_MSG_WARN([FFTW needed for MPB])])])]) ########################################################################### # Harminv library # First, try pkg-config, if it is installed. Note that, annoyingly, # pkg-config doesn't look in /usr/local by default, so we have to # add this to the path for that common case. It also doesn't give # us a way to print its default path, grr, so we have to assume that this # is /usr/lib/pkgconfig. PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH PKG_CHECK_MODULES(HARMINV, harminv >= 1.1, [CFLAGS="$CFLAGS $HARMINV_CFLAGS"; LIBS="$HARMINV_LIBS $LIBS"; have_harminv=yes], [have_harminv=no]) # As a fallback, check manually for BLAS/LAPACK and harminv libraries: if test $have_harminv = no; then AC_F77_WRAPPERS ACX_BLAS ACX_LAPACK([], [AC_MSG_WARN([BLAS/LAPACK needed for harminv])]) save_CC=$CC CC=$CXX # harminv test must use $CXX since harminv may be a C++ lib # just use lapack/blas in default libs since we always need them AC_CHECK_LIB(harminv, harminv_get_freq_error, [have_harminv=yes; LIBS="-lharminv $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"], [AC_MSG_WARN([harminv support is disabled])], [$LAPACK_LIBS $BLAS_LIBS $FLIBS]) CC=$save_CC fi if test $have_harminv = yes; then AC_DEFINE([HAVE_HARMINV],[1],[Define if you have libharminv]) fi ########################################################################### # MPB library AC_CHECK_HEADER(mpb.h, [have_mpb=maybe], [have_mpb=no]) if test $have_mpb = maybe; then if test "x$acx_lapack_ok" = x -a "$have_harminv" = xno; then AC_F77_WRAPPERS ACX_BLAS ACX_LAPACK([], [AC_MSG_WARN([BLAS/LAPACK needed for MPB])]) fi AC_CHECK_LIB(mpb, maxwell_target_operator1, [have_mpb=yes; LIBS="-lmpb $LIBS"], [AC_CHECK_LIB(mpb, maxwell_target_operator1, [have_mpb=yes; LIBS="-lmpb $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"], [AC_MSG_WARN([MPB support is disabled])], [$LAPACK_LIBS $BLAS_LIBS $FLIBS])]) if test $have_mpb = yes; then AC_DEFINE([HAVE_MPB], [1], [Define if you have libmpb]) fi fi ############################################################################## # GNU Scientific Library AC_CHECK_FUNC(cblas_cgemm, [], [AC_CHECK_LIB(gslcblas, cblas_cgemm)]) AC_CHECK_LIB(gsl, gsl_sf_bessel_Jn, [], [AC_MSG_WARN([Missing GNU GSL library...Bessel-function field initialization will not be supported.])]) ############################################################################## # Check for HDF5 library AC_ARG_WITH(hdf5, [AC_HELP_STRING([--without-hdf5],[do not allow HDF5 output])], ok=$withval, ok=yes) if test "$ok" = "yes"; then AC_CHECK_LIB(z,deflate, [],[AC_MSG_WARN([zlib is required for HDF5!])]) save_CC=$CC if test "x$with_mpi" = "xyes"; then CC=$MPICXX fi save_LIBS_0="$LIBS" # save, to check later if we found any library AC_CHECK_LIB(hdf5, H5Pcreate, [ AC_CHECK_HEADERS(hdf5.h, [LIBS="-lhdf5 $LIBS" AC_DEFINE(HAVE_HDF5,1,[Define if we have & link HDF5])])]) if test x"$save_LIBS_0" = x"$LIBS"; then AC_MSG_WARN([Couldn't find the HDF5 library!! Switching to --without-hdf5.]) fi CC=$save_CC if test "x$with_mpi" = "xyes"; then AC_CHECK_FUNCS(H5Pset_mpi H5Pset_fapl_mpio) fi fi ############################################################################## # Figure out the number of processors so we can quickly build the docs and # run the tests... (FIXME: use more standard autoconf macros) RUNCODE="" if test "x$with_mpi" = "xyes"; then cat > test_num_processors.c < #include #include int main() { long nprocs; nprocs = sysconf(_SC_NPROCESSORS_ONLN); if (nprocs < 1) nprocs = 1; printf ("%ld\n",nprocs); exit (EXIT_SUCCESS); } MYEOF $CC -o test_num_processors test_num_processors.c NUMPROCS=`./test_num_processors` rm -f test_num_processors test_num_processors.c echo Looks like we have got "$NUMPROCS" processors RUNCODE="mpirun -np $NUMPROCS" fi AC_SUBST(RUNCODE) ############################################################################## # Libraries and flags (other than -lmeep) required to link Meep: MEEPLIBS="$LDFLAGS $LIBS" AC_SUBST(MEEPLIBS) ############################################################################## # subsequent libraries are only for libctl front end meep_save_LIBS=$LIBS AC_ARG_WITH(libctl, [AC_HELP_STRING([--with-libctl=],[specify libctl directory])], with_libctl=$withval, with_libctl=yes) if test "x$with_libctl" = "xno"; then : elif test "x$with_libctl" != "xyes"; then LIBCTL_DIR="$with_libctl" fi AM_CONDITIONAL(WITH_LIBCTL, test "x$with_libctl" != xno) ############################################################################## # Check for Guile library and its behavior (for libctl front end): if test "x$with_libctl" != xno; then AC_CHECK_PROG(GUILE_CONFIG, guile-config, guile-config, unknown) if test "x$GUILE_CONFIG" = "xunknown"; then AC_CHECK_LIB(readline, readline) AC_CHECK_LIB(dl, dlopen) AC_CHECK_LIB(guile-ltdl, scm_lt_dlinit, [], [AC_CHECK_LIB(ltdl, dlopen)]) AC_CHECK_LIB(guile, gh_eval_str, [], [AC_MSG_ERROR([linking to guile failed])]) else CPPFLAGS="$CPPFLAGS `$GUILE_CONFIG compile`" LIBS="`$GUILE_CONFIG link` $LIBS" AC_MSG_CHECKING([if linking to guile works]) AC_TRY_LINK_FUNC(gh_enter, AC_MSG_RESULT(yes), [ AC_MSG_RESULT(no) AC_MSG_ERROR(guile-config is broken) ]) fi # Check how smob types work in this Guile version: AC_CHECK_FUNCS(scm_make_smob_type) AC_MSG_CHECKING([for SCM_SMOB_PREDICATE]) AC_TRY_LINK([#include #include ], [int x; SCM_SMOB_PREDICATE(1,x);], ok=yes, ok=no) AC_MSG_RESULT($ok) if test $ok = yes; then AC_DEFINE(HAVE_SCM_SMOB_PREDICATE, 1, [define if we have SCM_SMOB_PREDICATE]) fi AC_MSG_CHECKING([for SCM_SMOB_DATA]) AC_TRY_LINK([#include #include ], [int x; SCM_SMOB_DATA(x);], ok=yes, ok=no) AC_MSG_RESULT($ok) if test $ok = yes; then AC_DEFINE(HAVE_SCM_SMOB_DATA, 1, [define if we have SCM_SMOB_DATA]) fi AC_MSG_CHECKING([for SCM_NEWSMOB]) AC_TRY_LINK([#include #include ], [int x; SCM_NEWSMOB(x,1,0);], ok=yes, ok=no) AC_MSG_RESULT($ok) if test $ok = yes; then AC_DEFINE(HAVE_SCM_NEWSMOB, 1, [define if we have SCM_NEWSMOB]) fi # Check how to activate Guile readline support: ACTIVATE_READLINE="" if test "x$cross_compiling" = xno; then AC_MSG_CHECKING(how to activate readline in Guile) ractivate="(use-modules (readline-activator)) (activate-readline)" if guile -c "$ractivate" > /dev/null 2>&1; then AC_MSG_RESULT(readline-activator) ACTIVATE_READLINE="$ractivate" else ractivate="(use-modules (ice-9 readline)) (activate-readline)" if guile -c "$ractivate" >& /dev/null; then AC_MSG_RESULT(ice-9 readline) ACTIVATE_READLINE="$ractivate" else AC_MSG_RESULT(cannot) ACTIVATE_READLINE="" fi fi fi AC_SUBST(ACTIVATE_READLINE) fi # if with_libctl ############################################################################## # Check for libctl library and files if test "x$with_libctl" != xno; then AC_MSG_CHECKING([for libctl dir]) if test x != x"$LIBCTL_DIR" -a ! -r "$LIBCTL_DIR/base/ctl.scm"; then LIBCTL_DIR="" fi if test x = x"$LIBCTL_DIR" -a -r /usr/local/share/libctl/base/ctl.scm; then LIBCTL_DIR="/usr/local/share/libctl" fi if test x = x"$LIBCTL_DIR" -a -r /usr/share/libctl3/base/ctl.scm; then LIBCTL_DIR="/usr/share/libctl3" fi if test x = x"$LIBCTL_DIR" -a -r /usr/share/libctl/base/ctl.scm; then LIBCTL_DIR="/usr/share/libctl" fi if test x = x"$LIBCTL_DIR"; then AC_MSG_ERROR([could not find libctl files; use --with-libctl=]) fi AC_MSG_RESULT($LIBCTL_DIR) AC_SUBST(LIBCTL_DIR) AC_CHECK_PROGS(GEN_CTL_IO, gen-ctl-io, echo) if test x"$GEN_CTL_IO" = xecho; then AC_MSG_ERROR([could not find gen-ctl-io program; check your PATH]) fi # check for -lctl: AC_CHECK_LIB(ctl, ctl_get_vector3, [], [AC_MSG_ERROR([Couldn't find the required libctl library.])]) # check for ctl.h (Fedora puts it in /usr/include/ctl, grrr) CTL_H_CPPFLAG="" AC_CHECK_HEADER(ctl.h, [CTL_H_CPPFLAG=" "], [ save_CPPFLAGS=$CPPFLAGS AC_MSG_CHECKING([for alternate ctl.h location]) for ctl_h_path in /usr/include/ctl /usr/local/include/ctl; do CPPFLAGS="$save_CPPFLAGS -I$ctl_h_path" AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include ]],[]), [CTL_H_CPPFLAG=-I$ctl_h_path; break]) done AC_MSG_RESULT([$CTL_H_CPPFLAG]) CPPFLAGS=$save_CPPFLAGS]) if test "x$CTL_H_CPPFLAG" = "x"; then AC_MSG_ERROR([Couldn't find the ctl.h header file for libctl.]) fi AC_SUBST(CTL_H_CPPFLAG) # Check libctl version >= LIBCTL_MAJOR.LIBCTL_MINOR.LIBCTL_BUGFIX LIBCTL_MAJOR=3; LIBCTL_MINOR=0; LIBCTL_BUGFIX=3 AC_MSG_CHECKING([whether libctl version is at least ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX}]) AC_EGREP_CPP(yes, [[ #include #if LIBCTL_MAJOR_VERSION > $LIBCTL_MAJOR || (LIBCTL_MAJOR_VERSION == $LIBCTL_MAJOR && (LIBCTL_MINOR_VERSION > $LIBCTL_MINOR || (LIBCTL_MINOR_VERSION == $LIBCTL_MINOR && LIBCTL_BUGFIX_VERSION >= $LIBCTL_BUGFIX))) yes #endif ]], [AC_MSG_RESULT(ok)], [AC_MSG_ERROR([libctl version ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX} or later is required])]) # On IRIX, basename/dirname functions in libctl/main.c require -lgen AC_CHECK_LIB(gen, basename) fi # if with_libctl ############################################################################## LIBCTL_LIBS=$LIBS AC_SUBST(LIBCTL_LIBS) LIBS=$meep_save_LIBS ############################################################################## # The following function is used only for debugging. Note that # we must test for it *after* setting the compiler flags (which # affect whether it is declared, as it is a GNU extension). # We need to #include because that somehow affects whether # the function is declared with older gcc versions. We need # to use AC_TRY_COMPILE because the test in AC_HAVE_DECL seems # to be optimized out. AC_CHECK_FUNCS(feenableexcept) dnl GNU libc fp exception control function AC_MSG_CHECKING([whether feenableexcept declaration is usable]) feenableexcept_decl_ok=yes AC_TRY_COMPILE([#include #define _GNU_SOURCE 1 #include ], [feenableexcept(0);], [AC_DEFINE([HAVE_DECL_FEENABLEEXCEPT],[1],[Define if fenv.h declares this.])], [feenableexcept_decl_ok=no]) AC_MSG_RESULT($feenableexcept_decl_ok) ############################################################################## # See if we need to catch SIGFPE to avoid crashing on underflow exceptions # etcetera, since some stupid operating systems (e.g. Alpha/Tru64) crash on # SIGFPE by default. AC_MSG_CHECKING([whether to catch and ignore SIGFPE signals]) AC_RUN_IFELSE([AC_LANG_PROGRAM([], [volatile double x=1,y=0; return x/y;])], [ignore_sigfpe=no], [ignore_sigfpe=yes], [ignore_sigfpe=no]) AC_MSG_RESULT($ignore_sigfpe) if test $ignore_sigfpe = yes; then AC_DEFINE(IGNORE_SIGFPE, [1], [Define to catch and ignore SIGFPE signals]) fi ############################################################################## # Miscellaneous function and header checks AC_HEADER_TIME AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_FUNCS([BSDgettimeofday gettimeofday cblas_ddot cblas_daxpy]) ############################################################################## # check for restrict keyword in C++ AC_PREREQ(2.58) dnl for ac_c_restrict AC_C_RESTRICT # check for C99 _Pragma support, so that we can emit pragmas in macros AC_TRY_COMPILE([], [_Pragma("ivdep")], [], [AC_DEFINE([_Pragma],[],[define to nothing if C99 _Pragma is not supported])]) ############################################################################## AC_SUBST(MEEP_SUFFIX) program_transform_name="s,_,-,g;$program_transform_name" ############################################################################## AC_CONFIG_FILES([ Makefile meep-pkgconfig src/Makefile tests/Makefile examples/Makefile libctl/Makefile libctl/meep.scm ]) AC_OUTPUT meep-openmpi-1.1.1/depcomp0000755000175200017520000004426711204551150014723 0ustar debiandebian#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: meep-openmpi-1.1.1/aclocal.m40000644000175200017520000011241511243546261015207 0ustar debiandebian# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # (`yes' being less verbose, `no' or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [ --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0')]) case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/acx_blas.m4]) m4_include([m4/acx_lapack.m4]) m4_include([m4/acx_mpi.m4]) m4_include([m4/ax_check_compiler_flags.m4]) m4_include([m4/ax_compiler_vendor.m4]) m4_include([m4/ax_cxx_maxopt.m4]) m4_include([m4/ax_gcc_archflag.m4]) m4_include([m4/ax_gcc_x86_cpuid.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/pkg.m4]) meep-openmpi-1.1.1/missing0000755000175200017520000002623311204551150014736 0ustar debiandebian#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: meep-openmpi-1.1.1/src/0000755000175200017520000000000011244567006014133 5ustar debiandebianmeep-openmpi-1.1.1/src/Makefile.in0000644000175200017520000006377611243546263016224 0ustar debiandebian# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = sphere_quad$(EXEEXT) subdir = src DIST_COMMON = $(include_HEADERS) $(pkginclude_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_blas.m4 \ $(top_srcdir)/m4/acx_lapack.m4 $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_cxx_maxopt.m4 \ $(top_srcdir)/m4/ax_gcc_archflag.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libmeep@MEEP_SUFFIX@_la_LIBADD = am__objects_1 = am__objects_2 = step_generic_stride1.lo am_libmeep@MEEP_SUFFIX@_la_OBJECTS = anisotropic_averaging.lo bands.lo \ boundaries.lo bicgstab.lo casimir.lo control_c.lo cw_fields.lo \ dft.lo energy_and_flux.lo fields.lo loop_in_chunks.lo grace.lo \ h5fields.lo h5file.lo initialize.lo integrate.lo integrate2.lo \ monitor.lo mympi.lo output_directory.lo polarization.lo \ sources.lo step.lo step_db.lo stress.lo structure.lo time.lo \ update_eh.lo mpb.lo update_pols.lo vec.lo step_generic.lo \ $(am__objects_1) $(am__objects_2) libmeep@MEEP_SUFFIX@_la_OBJECTS = \ $(am_libmeep@MEEP_SUFFIX@_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent libmeep@MEEP_SUFFIX@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libmeep@MEEP_SUFFIX@_la_LDFLAGS) \ $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) am_sphere_quad_OBJECTS = sphere-quad.$(OBJEXT) sphere_quad_OBJECTS = $(am_sphere_quad_OBJECTS) sphere_quad_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_$(V)) am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) am__v_CXX_0 = @echo " CXX " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_$(V)) am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmeep@MEEP_SUFFIX@_la_SOURCES) $(sphere_quad_SOURCES) DIST_SOURCES = $(libmeep@MEEP_SUFFIX@_la_SOURCES) \ $(sphere_quad_SOURCES) HEADERS = $(include_HEADERS) $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACTIVATE_READLINE = @ACTIVATE_READLINE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ARCHFLAG = @ARCHFLAG@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BLAS_LIBS = @BLAS_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTL_H_CPPFLAG = @CTL_H_CPPFLAG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FLIBS = @FLIBS@ GEN_CTL_IO = @GEN_CTL_IO@ GREP = @GREP@ GUILE_CONFIG = @GUILE_CONFIG@ HARMINV_CFLAGS = @HARMINV_CFLAGS@ HARMINV_LIBS = @HARMINV_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LAPACK_LIBS = @LAPACK_LIBS@ LATEX2HTML = @LATEX2HTML@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCTL_DIR = @LIBCTL_DIR@ LIBCTL_LIBS = @LIBCTL_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MEEPLIBS = @MEEPLIBS@ MEEP_SUFFIX = @MEEP_SUFFIX@ MKDIR_P = @MKDIR_P@ MPICXX = @MPICXX@ MPILIBS = @MPILIBS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PRTDIAG = @PRTDIAG@ RANLIB = @RANLIB@ RUNCODE = @RUNCODE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libmeep@MEEP_SUFFIX@.la include_HEADERS = meep.hpp pkginclude_HEADERS = meep/mympi.hpp meep/vec.hpp AM_CPPFLAGS = -I$(top_srcdir)/src BUILT_SOURCES = sphere-quad.h step_generic_stride1.cpp HDRS = meep.hpp meep_internals.hpp meep/mympi.hpp meep/vec.hpp \ bicgstab.hpp libmeep@MEEP_SUFFIX@_la_SOURCES = anisotropic_averaging.cpp bands.cpp \ boundaries.cpp bicgstab.cpp casimir.cpp control_c.cpp cw_fields.cpp \ dft.cpp energy_and_flux.cpp fields.cpp loop_in_chunks.cpp grace.cpp \ h5fields.cpp h5file.cpp initialize.cpp integrate.cpp integrate2.cpp \ monitor.cpp mympi.cpp output_directory.cpp polarization.cpp \ sources.cpp step.cpp step_db.cpp stress.cpp structure.cpp time.cpp \ update_eh.cpp mpb.cpp update_pols.cpp vec.cpp step_generic.cpp $(HDRS) \ $(BUILT_SOURCES) libmeep@MEEP_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ PRELUDE = "/* This file was automatically generated --- DO NOT EDIT */" sphere_quad_SOURCES = sphere-quad.cpp SPHERE_QUAD = $(top_builddir)/src/sphere_quad MAINTAINERCLEANFILES = $(BUILT_SOURCES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmeep@MEEP_SUFFIX@.la: $(libmeep@MEEP_SUFFIX@_la_OBJECTS) $(libmeep@MEEP_SUFFIX@_la_DEPENDENCIES) $(AM_V_CXXLD)$(libmeep@MEEP_SUFFIX@_la_LINK) -rpath $(libdir) $(libmeep@MEEP_SUFFIX@_la_OBJECTS) $(libmeep@MEEP_SUFFIX@_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list sphere_quad$(EXEEXT): $(sphere_quad_OBJECTS) $(sphere_quad_DEPENDENCIES) @rm -f sphere_quad$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(sphere_quad_OBJECTS) $(sphere_quad_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anisotropic_averaging.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bands.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bicgstab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boundaries.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/casimir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cw_fields.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/energy_and_flux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fields.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5fields.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initialize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integrate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integrate2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loop_in_chunks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mympi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output_directory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polarization.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sources.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sphere-quad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step_db.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step_generic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step_generic_stride1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stress.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/structure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update_eh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update_pols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vec.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgincludeHEADERS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgincludeHEADERS sphere-quad.h: make sphere_quad (echo $(PRELUDE); echo; $(SPHERE_QUAD)) > $@ step_generic_stride1.cpp: step_generic.cpp (echo $(PRELUDE); echo; sed 's/LOOP_OVER/S1LOOP_OVER/g' $(top_srcdir)/src/step_generic.cpp | sed 's/step_curl/step_curl_stride1/' | sed 's/step_update_EDHB/step_update_EDHB_stride1/' | sed 's/step_beta/step_beta_stride1/') > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: meep-openmpi-1.1.1/src/meep_internals.hpp0000644000175200017520000001771311243101206017643 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "meep.hpp" namespace meep { #define DOCMP for (int cmp=0;cmp<2-is_real;cmp++) #define DOCMP2 for (int cmp=0;cmp<2;cmp++) inline double max(double a, double b) { return (a > b) ? a : b; } inline double min(double a, double b) { return (a < b) ? a : b; } inline int max(int a, int b) { return (a > b) ? a : b; } inline int min(int a, int b) { return (a < b) ? a : b; } static inline int abs(int a) { return a < 0 ? -a : a; } static inline double abs(double a) { return fabs(a); } // note that C99 has a round() function, but I don't want to rely on it static inline int my_round(double x) { return int(floor(fabs(x) + 0.5) * (x < 0 ? -1 : 1)); } inline int small_r_metal(int m) { return m-1; } inline int rmin_bulk(int m) { int r = 1 + small_r_metal(m); if (r < 1) r = 1; return r; } class polarizability { public: grid_volume gv; polarizability(const structure_chunk *, material_function &sig, field_type ft, double om, double ga, double sigscale, bool mine = true); polarizability(const polarizability *); ~polarizability(); field_type ft; double gamma, omeganot; realnum *s[NUM_FIELD_COMPONENTS]; bool is_mine() { return is_it_mine; }; bool is_it_mine; polarizability *next; polarizability_identifier get_identifier() const; }; class polarization { public: polarization(const polarizability *the_pb, int is_real, bool store_enrgy=0); ~polarization(); realnum *(P[NUM_FIELD_COMPONENTS][2]), *(energy[NUM_FIELD_COMPONENTS]), *(s[NUM_FIELD_COMPONENTS]); int is_real; bool store_energy; const polarizability *pb; polarization *next; complex analytic_chi1(component,double freq, const vec &) const; double local_energy(const ivec &); // for total energy, use fields::thermo_energy_in_box static void set_up_polarizations(polarization *pols[NUM_FIELD_TYPES], const structure_chunk *s, int is_real, bool store_enrgy = 0); void use_real_fields(); void zero_fields(); }; class src_vol { public: src_vol(component cc, src_time *st, int n, int *ind, complex *amps); src_vol(const src_vol &sv); ~src_vol() { delete next; delete[] index; delete[] A;} src_time *t; int *index; // list of locations of sources in grid (indices) int npts; // number of points in list component c; // field component the source applies to complex *A; // list of amplitudes complex dipole(int j) { return A[j] * t->dipole(); } complex current(int j) { return A[j] * t->current(); } void update(double time, double dt) { t->update(time, dt); } bool operator==(const src_vol &sv) const { return sv.index[0]==index[0] && sv.index[sv.npts-1]==index[npts-1] && sv.c==c && sv.t==t; } src_vol *add_to(src_vol *others); src_vol *next; }; const int num_bandpts = 32; class bandsdata { public: bandsdata(); ~bandsdata(); complex *f[num_bandpts][NUM_FIELD_COMPONENTS]; // The following is the polarization at just one point, with Pz and Pp // added together (a crude compromize for speed, while still observing the // phonon bands). complex *P; int tstart, tend, index[num_bandpts], maxbands, scale_factor; fields_chunk *chunk[num_bandpts]; double dt, fmin, fmax, qmin, fpmin; int ntime; int verbosity; int get_freqs(complex *data, int n, complex *amps, double *freqs, double *decays); int look_for_more_bands(complex *simple_data, double *reff, double *refd, complex *refa, complex *refdata, int numref); }; symmetry r_to_minus_r_symmetry(int m); #define MIN_OUTPUT_TIME 4.0 // output no more often than this many seconds // functions in step_generic.cpp: void step_curl(realnum *f, component c, const realnum *g1, const realnum *g2, int s1, int s2, // strides for g1/g2 shift const grid_volume &gv, double dtdx, direction dsig, const double *sig, const double *siginv, realnum *fu, direction dsigu, const double *sigu, const double *siginvu, double dt, const realnum *cnd, const realnum *cndinv, realnum *fcnd); void step_update_EDHB(realnum *f, component fc, const grid_volume &gv, const realnum *g, const realnum *g1, const realnum *g2, const realnum *u, const realnum *u1, const realnum *u2, int s, int s1, int s2, const realnum *chi2, const realnum *chi3, realnum *fw, direction dsigw, const double *sigw); void step_beta(realnum *f, component c, const realnum *g, const grid_volume &gv, double betadt, direction dsig, const double *siginv, realnum *fu, direction dsigu, const double *siginvu, const realnum *cndinv, realnum *fcnd); // functions in step_generic_stride1.cpp, generated from step_generic.cpp: void step_curl_stride1(realnum *f, component c, const realnum *g1, const realnum *g2, int s1, int s2, // strides for g1/g2 shift const grid_volume &gv, double dtdx, direction dsig, const double *sig, const double *siginv, realnum *fu, direction dsigu, const double *sigu, const double *siginvu, double dt, const realnum *cnd, const realnum *cndinv, realnum *fcnd); void step_update_EDHB_stride1(realnum *f, component fc, const grid_volume &gv, const realnum *g, const realnum *g1, const realnum *g2, const realnum *u, const realnum *u1, const realnum *u2, int s, int s1, int s2, const realnum *chi2, const realnum *chi3, realnum *fw, direction dsigw, const double *sigw); void step_beta_stride1(realnum *f, component c, const realnum *g, const grid_volume &gv, double betadt, direction dsig, const double *siginv, realnum *fu, direction dsigu, const double *siginvu, const realnum *cndinv, realnum *fcnd); /* macro wrappers around time-stepping functions: for performance reasons, if the inner loop is stride-1 then we use the stride-1 versions, which allow gcc (and possibly other compilers) to do additional optimizations, especially loop vectorization */ #define STEP_CURL(f, c, g1, g2, s1, s2, gv, dtdx, dsig, sig, siginv, fu, dsigu, sigu, siginvu, dt, cnd, cndinv, fcnd) do { \ if (LOOPS_ARE_STRIDE1(gv)) \ step_curl_stride1(f, c, g1, g2, s1, s2, gv, dtdx, dsig, sig, siginv, fu, dsigu, sigu, siginvu, dt, cnd, cndinv, fcnd); \ else \ step_curl(f, c, g1, g2, s1, s2, gv, dtdx, dsig, sig, siginv, fu, dsigu, sigu, siginvu, dt, cnd, cndinv, fcnd); \ } while (0) #define STEP_UPDATE_EDHB(f, fc, gv, g, g1, g2, u, u1, u2, s, s1, s2, chi2, chi3, fw, dsigw, sigw) do { \ if (LOOPS_ARE_STRIDE1(gv)) \ step_update_EDHB_stride1(f, fc, gv, g, g1, g2, u, u1, u2, s, s1, s2, chi2, chi3, fw, dsigw, sigw); \ else \ step_update_EDHB(f, fc, gv, g, g1, g2, u, u1, u2, s, s1, s2, chi2, chi3, fw, dsigw, sigw); \ } while (0) #define STEP_BETA(f, c, g, gv, betadt, dsig, siginv, fu, dsigu, siginvu, cndinv, fcnd) do { \ if (LOOPS_ARE_STRIDE1(gv)) \ step_beta_stride1(f, c,g, gv, betadt, dsig, siginv, fu, dsigu, siginvu, cndinv, fcnd); \ else \ step_beta(f, c,g, gv, betadt, dsig, siginv, fu, dsigu, siginvu, cndinv, fcnd); \ } while (0) } // namespace meep meep-openmpi-1.1.1/src/bands.cpp0000644000175200017520000004301311243101206015710 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #ifdef HAVE_HARMINV # include #endif namespace meep { #define BAND(b,r,t) ((b)[(r)+(t)*nr]) bandsdata::bandsdata() { verbosity = 0; maxbands = -1; tstart = 0; for (int i=0;ilast_time_max()); for (int i=0;iis_mine()) last_time = max(last_time,chunks[i]->last_source_time()); return max_to_all(last_time); } double fields_chunk::last_source_time() { return 0; } void fields::prepare_for_bands(const vec &p, double endtime, double fmax, double qmin, double frac_pow_min) { int last_source = (int)(last_source_time()/dt+0.5); last_source = max(last_source, t + phasein_time); if (!bands) bands = new bandsdata; bands->tstart = last_source+1; if (bands->tstart < t) bands->tstart = t; bands->tend = t + (int)(endtime/dt) - 1; { int ind[8]; double w[8]; int indind = 0; while (bands->index[indind] != -1 && indind < num_bandpts) indind++; for (int h=0;hgv.contains(p)) { chunks[h]->gv.interpolate(chunks[h]->gv.eps_component(), p, ind, w); for (int i=0;i<8&&w[i]&&indindchunk[indind] = chunks[h]; bands->index[indind++] = ind[i]; } break; } } bands->fpmin = frac_pow_min; // Set fmin properly... const double epsmax = max_eps(); double cutoff_freq = 0.0; if (gv.dim == Dcyl) { cutoff_freq = 1.84*a*dt/(2*pi)/gv.nr()/sqrt(epsmax); if (m == 0) cutoff_freq *= 0.5; } bands->fmin = sqrt(cutoff_freq*cutoff_freq + abs(k[Z])*abs(k[Z])*(a*dt)*(a*dt)/epsmax); // FIXME bands->fmin = cutoff_freq/dt; bands->qmin = qmin; // Set fmax and determine how many timesteps to skip over... bands->fmax = fmax; { // for when there are too many data points... double decayconst = bands->fmax*dt/qmin*8.0; double smalltime = 1./(decayconst + bands->fmax*dt); bands->scale_factor = (int)(0.06*smalltime); if (bands->scale_factor < 1) bands->scale_factor = 1; if (verbosity) master_printf("scale_factor is %d (%g,%g)\n", bands->scale_factor, bands->fmax*dt, decayconst); } if (bands->tend <= bands->tstart) { printf("Oi, we don't have any time to take a fourier transform!\n"); abort("FT start is %d and end is %d\n", bands->tstart, bands->tend); } bands->ntime = (1+(bands->tend-bands->tstart)/bands->scale_factor); bands->dt = dt * bands->scale_factor; for (int c=0;c<10;c++) for (int i=0;if[i][c]; bands->f[i][c] = new complex[bands->ntime]; if (bands->f[i][c] == NULL) abort("Unable to allocate bandstructure array!\n"); for (int j=0;jntime;j++) bands->f[i][c][j] = 0.0; } bands->P = new complex[bands->ntime]; for (int i=0;intime;i++) bands->P[i] = 0.0; bands->verbosity = verbosity; for (int h=0;hbands = bands; } void fields::record_bands() { if (!bands) return; if (t > bands->tend || t < bands->tstart) return; if (t % bands->scale_factor != 0) return; for (int i=0;irecord_bands(t); } void fields_chunk::record_bands(int tcount) { int thet = (tcount-bands->tstart)/bands->scale_factor; if (thet >= bands->ntime) return; for (int p=0; pindex[p]!=-1; p++) if (this == bands->chunk[p]) for (int c=0;c<10;c++) if (gv.has_field((component)c)) { complex tmp; if (f[c][0] && f[c][1]) tmp = complex(f[c][0][bands->index[p]], f[c][1][bands->index[p]]); bands->f[p][c][thet] = broadcast(n_proc(), tmp); } } #define HARMOUT(o,n,f) ((o)[(n)+(f)*maxbands]) complex fields::get_band(int nn, int maxbands) { //complex *fad = get_the_bands(maxbands, approx_power); complex *fad = clever_cluster_bands(maxbands); complex thef = fad[nn-1]; delete[] fad; return thef; } void fields::grace_bands(grace *g, int maxbands) { double *approx_power = new double[maxbands]; //complex *fad = get_the_bands(maxbands, approx_power); complex *fad = clever_cluster_bands(maxbands, approx_power); int num_found = 0; for (int i=0;ioutput_out_of_order(i, abs(k[Z]), fabs(real(fad[i])), fabs(imag(fad[i])), approx_power[i]); // FIXME } delete[] fad; delete[] approx_power; } void fields::output_bands(FILE *o, const char *name, int maxbands) { out_bands(o, name, maxbands); } void fields::out_bands(FILE *o, const char *name, int maxbands) { double *approx_power = new double[maxbands]; //complex *fad = get_the_bands(maxbands, approx_power); complex *fad = clever_cluster_bands(maxbands, approx_power); complex *eigen = new complex[maxbands*6]; if (!eigen) abort("Error allocating...\n"); for (int whichf = 0; whichf < 6; whichf++) { for (int n=0;n f[hi+1]-f[hi]) return 1; else return 0; } static inline int am_done(double f[], int fmax, int lo, int hi) { double wid = f[hi]-f[lo] + 0.001; int lodone = lo == 0 || f[lo]-f[lo-1] > wid; int hidone = hi == fmax-1 || f[hi+1]-f[hi] > wid; return lodone && hidone; } static void get_cluster(double f[], int fmax, int maxsize, double maxwid, int *out_lo, int *out_hi) { int lo = get_closest(f,fmax); int hi = lo+1; int minsize = maxsize/2+1; if (minsize < 3) minsize = 3; for (int i=0;i maxwid) break; hi++; } else { if (f[hi]-f[lo-1] > maxwid) break; lo--; } } *out_lo = lo; *out_hi = hi; } int fields::cluster_some_bands_cleverly(double *tf, double *td, complex *ta, int num_freqs, int fields_considered, int maxbands, complex *fad, double *approx_power) { const double total_time = (bands->tend-bands->tstart)*dt; const double deltaf = 1.0/total_time; int freqs_so_far = num_freqs; if (!quiet) master_printf("About to sort by frequency... (%d frequencies)\n", freqs_so_far); // Sort by frequency... for (int i = 1; i < freqs_so_far; i++) { for (int j=i; j>0;j--) { if (tf[j] temp = ta[j]; ta[j] = ta[j-1]; ta[j-1] = temp; } } } if (!quiet) master_printf("Looking for clusters...\n"); int num_found = 0; double totwid = 0.001; while (freqs_so_far >= fields_considered/2 + 1) { int hi, lo; get_cluster(tf,freqs_so_far,fields_considered,deltaf,&lo,&hi); int mid = lo + (hi-lo)/2; if (tf[hi]-tf[lo] < deltaf) { if (!quiet) master_printf("Got a cluster from %g to %g (%d freqs)\n", tf[lo], tf[hi], 1+hi-lo); fad[num_found] = complex(tf[mid],td[mid]); if (approx_power) { approx_power[num_found] = 0; for (int i=lo;i<=hi;i++) { if (abs(ta[i])*abs(ta[i]) > approx_power[num_found]) { approx_power[num_found] = abs(ta[i])*abs(ta[i]); } } } totwid += tf[hi]-tf[lo]; num_found++; if (num_found >= maxbands) num_found--; } else { if (!quiet) master_printf("Rejected a cluster from %g to %g (%d/%d freqs)\n", tf[lo], tf[hi], 1+hi-lo, fields_considered); if (verbosity > 1) master_printf("width is %g vs %g\n", tf[hi] - tf[lo], deltaf); lo = get_closest(tf,freqs_so_far); hi = lo+1; if (verbosity > 1) master_printf("dropping %g and %g\n", tf[hi], tf[lo]); } freqs_so_far -= 1 + hi - lo; for (int i=lo;i 1) master_printf("Have a leftover freq: %g\n", tf[i]); } return num_found; } complex *fields::clever_cluster_bands(int maxbands, double *approx_power) { bands->maxbands = maxbands; const int max_harminvs = 120; const int max_freqs = max_harminvs*maxbands; double *tf = new double[max_freqs]; double *td = new double[max_freqs]; complex *ta = new complex[max_freqs]; const int ntime = bands->ntime; if (!ta) abort("Error allocating...\n"); int num_found = 0; complex *fad = new complex[maxbands]; for (int i=0;iindex[p]!=-1; p++) for (int whichf = 0; whichf < 10; whichf++) if (gv.has_field((component)whichf) && maxbands < max_freqs - freqs_so_far) { if (verbosity>1) master_printf("Looking at field %d\n", whichf); int freqs_here = bands->get_freqs(bands->f[p][whichf], ntime, ta+freqs_so_far, tf+freqs_so_far, td+freqs_so_far); if (freqs_here) { fields_considered++; freqs_so_far += freqs_here; } if (freqs_so_far + maxbands > max_freqs) break; } if (k == 0 && gv.dim == Dcyl && m != 0) fields_considered /= 2; num_found = cluster_some_bands_cleverly(tf, td, ta, freqs_so_far, fields_considered, maxbands, fad, approx_power); delete[] ta; delete[] tf; delete[] td; // Get rid of bands with too little power in them... { double maxp = 0.0; for (int i=0;ifpmin; for (int i=0;i0;j--) { if (real(fad[j]) t1 = fad[j]; fad[j] = fad[j-1]; fad[j-1] = t1; double temp = approx_power[j]; approx_power[j] = approx_power[j-1]; approx_power[j-1] = temp; } } } return fad; } int bandsdata::get_freqs(complex *data, int n, complex *amps, double *freq_re, double *freq_im) { const double total_time = n*dt; const double qminhere = 1.0/(1.0/qmin + 0.25/(fmin*total_time)); return do_harminv(data, n, dt, fmin, fmax, maxbands, amps, freq_re, freq_im, NULL, 1.1, qminhere); } int do_harminv(complex *data, int n, double dt, double fmin, double fmax, int maxbands, complex *amps, double *freq_re, double *freq_im, double *errors, double spectral_density, double Q_thresh, double rel_err_thresh, double err_thresh, double rel_amp_thresh, double amp_thresh) { #ifndef HAVE_HARMINV abort("compiled without Harminv library, required for do_harminv"); return 0; #else int numfreqs = int(fabs(fmax-fmin)*dt*n*spectral_density); // c.f. harminv if (numfreqs > 150) numfreqs = 150; // prevent matrices from getting too big if (numfreqs < 2) numfreqs = 2; if (maxbands > numfreqs) numfreqs = maxbands; // check for all zeros in input // data is a size n array. { int i; for (i = 0; i < n && data[i] == 0.0; i++) ; if (i == n) return 0; } #if 0 // debugging: save data file and arguments for standalone harminv program { FILE *f = fopen("harminv.dat", "w"); fprintf(f, "# -f %d -t %g %g-%g -Q %e -e %e -E %e -a %e -A %e -F\n", numfreqs, dt, fmin, fmax, Q_thresh, rel_err_thresh, err_thresh, rel_amp_thresh, amp_thresh); for (int i = 0; i < n; ++i) fprintf(f, "%g%+gi\n", real(data[i]), imag(data[i])); fclose(f); } #endif harminv_data hd = harminv_data_create(n, data, fmin*dt, fmax*dt, numfreqs); harminv_solve(hd); int nf = harminv_get_num_freqs(hd); if (nf == 0) return 0; int *fsort = new int[nf]; // indices of frequencies, sorted as needed for (int i = 0; i < nf; ++i) fsort[i] = i; for (int i = 0; i < nf; ++i) // sort in increasing order of error for (int j = i + 1; j < nf; ++j) if (harminv_get_freq_error(hd, fsort[i]) > harminv_get_freq_error(hd, fsort[j])) { int k = fsort[i]; fsort[i] = fsort[j]; fsort[j] = k; } double min_err = harminv_get_freq_error(hd, fsort[0]); double max_amp = abs(harminv_get_amplitude(hd, 0)); for (int i = 1; i < nf; ++i) { double amp = abs(harminv_get_amplitude(hd, i)); if (max_amp < amp) max_amp = amp; } { // eliminate modes that fall outside the various thresholds: int j = 0; for (int i = 0; i < nf; ++i) { double f = abs(harminv_get_freq(hd, fsort[i]) / dt); double err = harminv_get_freq_error(hd, fsort[i]); double amp = abs(harminv_get_amplitude(hd, fsort[i])); if (f >= fmin && f <= fmax && abs(harminv_get_Q(hd, fsort[i])) > Q_thresh && err < err_thresh && err < rel_err_thresh * min_err && amp > amp_thresh && amp > rel_amp_thresh * max_amp) { fsort[j++] = fsort[i]; } } nf = j; } { // eliminate positive/negative frequency pairs // set indices to -1 for frequencies to be eliminated for (int i = 0; i < nf; ++i) if (fsort[i] != -1) { // i hasn't been eliminated yet double f = harminv_get_freq(hd, fsort[i]); if (f < 0.0) { double kdiff = -2 * f; int kpos = i; for (int k = 0; k < nf; ++k) // search for closest positive freq. if (fsort[k] != -1) { // k hasn't been eliminated yet double fdiff = abs(harminv_get_freq(hd, fsort[k]) + f); if (fdiff < kdiff) { kpos = k; kdiff = fdiff; } } if (kpos != i && kdiff < 2.0 / n) { // consider them the same // pick the one with the smaller error if (harminv_get_freq_error(hd, fsort[i]) < harminv_get_freq_error(hd, fsort[kpos])) fsort[kpos] = -1; else fsort[i] = -1; } } } int j = 0; for (int i = 0; i < nf; ++i) // remove the eliminated indices if (fsort[i] != -1) fsort[j++] = fsort[i]; nf = j; } if (nf > maxbands) nf = maxbands; // sort again, this time in increasing order of freq: for (int i = 0; i < nf; ++i) // simple O(nf^2) sort for (int j = i + 1; j < nf; ++j) if (abs(harminv_get_freq(hd, fsort[i])) > abs(harminv_get_freq(hd, fsort[j]))) { int k = fsort[i]; fsort[i] = fsort[j]; fsort[j] = k; } for (int i = 0; i < nf; ++i) { complex freq = harminv_get_omega(hd, fsort[i]) / (2*pi*dt); freq_re[i] = abs(real(freq)); freq_im[i] = imag(freq); amps[i] = harminv_get_amplitude(hd, fsort[i]); if (errors) errors[i] = harminv_get_freq_error(hd, fsort[i]); } delete[] fsort; harminv_data_destroy(hd); return nf; #endif } } // namespace meep meep-openmpi-1.1.1/src/update_pols.cpp0000644000175200017520000000423411243101206017142 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" namespace meep { void fields::update_pols(field_type ft) { for (int i=0;iis_mine()) chunks[i]->update_pols(ft); } void fields_chunk::update_pols(field_type ft) { const int ntot = s->gv.ntot(); polarization *pol = pols[ft]; polarization *olpol = olpols[ft]; DOCMP FOR_FT_COMPONENTS(ft, c) if (f[c][cmp]) for (polarization *np=pol,*op=olpol; np; np=np->next,op=op->next) { if (np->pb->ft != ft) abort("bug in update_pols"); const double cn = 2 - op->pb->omeganot*op->pb->omeganot; const double co = 0.5 * op->pb->gamma - 1; const double funinv = 1.0 / (1 + 0.5*op->pb->gamma); const realnum * restrict fE = f_w[c][cmp] ? f_w[c][cmp] : f[c][cmp]; const realnum * restrict npP = np->P[c][cmp], * restrict nps = np->s[c]; realnum * restrict opP = op->P[c][cmp], * restrict npenergy = np->energy[c]; if (npenergy) for (int i = 0; i < ntot; ++i) { npenergy[i] += 0.5 * (npP[i] - opP[i]) * fE[i]; opP[i] = funinv * (cn * npP[i] + co * opP[i] + nps[i] * fE[i]); } else for (int i = 0; i < ntot; ++i) opP[i] = funinv * (cn * npP[i] + co * opP[i] + nps[i] * fE[i]); } /* the old polarization is now the new polarization */ olpols[ft] = pol; pols[ft] = olpol; } } // namespace meep meep-openmpi-1.1.1/src/vec.cpp0000644000175200017520000012641411243101206015405 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep_internals.hpp" namespace meep { ivec grid_volume::round_vec(const vec &p) const { ivec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.set_direction(d, my_round(p.in_direction(d) * 2 * a)); return result; } void grid_volume::set_origin(const ivec &o) { io = o; origin = operator[](io); // adjust origin to match io } void grid_volume::set_origin(direction d, int o) { io.set_direction(d, o); origin = operator[](io); // adjust origin to match io } void grid_volume::set_origin(const vec &o) { set_origin(round_vec(o)); } const char *dimension_name(ndim dim) { switch (dim) { case D1: return "1D"; case D2: return "2D"; case D3: return "3D"; case Dcyl: return "Cylindrical"; } return "Error in dimension_name"; } const char *direction_name(direction d) { switch (d) { case X: return "x"; case Y: return "y"; case Z: return "z"; case R: return "r"; case P: return "phi"; case NO_DIRECTION: return "no_direction"; } return "Error in direction_name"; } const char *component_name(component c) { if (is_derived(int(c))) return component_name(derived_component(c)); switch (c) { case Er: return "er"; case Ep: return "ep"; case Ez: return "ez"; case Hr: return "hr"; case Hp: return "hp"; case Hz: return "hz"; case Ex: return "ex"; case Ey: return "ey"; case Hx: return "hx"; case Hy: return "hy"; case Dx: return "dx"; case Dy: return "dy"; case Dz: return "dz"; case Dr: return "dr"; case Dp: return "dp"; case Bx: return "bx"; case By: return "by"; case Bz: return "bz"; case Br: return "br"; case Bp: return "bp"; case Dielectric: return "eps"; case Permeability: return "mu"; } return "Error in component_name"; } const char *component_name(derived_component c) { if (!is_derived(int(c))) return component_name(component(c)); switch (c) { case Sr: return "sr"; case Sp: return "sp"; case Sz: return "sz"; case Sx: return "sx"; case Sy: return "sy"; case EnergyDensity: return "energy"; case D_EnergyDensity: return "denergy"; case H_EnergyDensity: return "henergy"; } return "Error in component_name"; } const char *component_name(int c) { return (is_derived(c) ? component_name(derived_component(c)) : component_name(component(c))); } component first_field_component(field_type ft) { switch (ft) { case E_stuff: return Ex; case H_stuff: return Hx; case D_stuff: return Dx; case B_stuff: return Bx; default: abort("bug - only E/H/D/B stuff have components"); } } vec min(const vec &vec1, const vec &vec2) { vec m(vec1.dim); LOOP_OVER_DIRECTIONS(vec1.dim, d) m.set_direction(d, min(vec1.in_direction(d), vec2.in_direction(d))); return m; } vec max(const vec &vec1, const vec &vec2) { vec m(vec1.dim); LOOP_OVER_DIRECTIONS(vec1.dim, d) m.set_direction(d, max(vec1.in_direction(d), vec2.in_direction(d))); return m; } ivec min(const ivec &ivec1, const ivec &ivec2) { ivec m(ivec1.dim); LOOP_OVER_DIRECTIONS(ivec1.dim, d) m.set_direction(d, min(ivec1.in_direction(d), ivec2.in_direction(d))); return m; } ivec max(const ivec &ivec1, const ivec &ivec2) { ivec m(ivec1.dim); LOOP_OVER_DIRECTIONS(ivec1.dim, d) m.set_direction(d, max(ivec1.in_direction(d), ivec2.in_direction(d))); return m; } volume::volume(const vec &vec1, const vec &vec2) { min_corner = min(vec1, vec2); max_corner = max(vec1, vec2); dim = vec1.dim; } volume::volume(const vec &pt) { dim = pt.dim; min_corner = pt; max_corner = pt; } double volume::computational_volume() const { double vol = 1.0; LOOP_OVER_DIRECTIONS(dim,d) vol *= in_direction(d); return vol; } double volume::integral_volume() const { double vol = 1.0; LOOP_OVER_DIRECTIONS(dim, d) if (in_direction(d) != 0.0) vol *= in_direction(d); if (dim == Dcyl) vol *= pi * (in_direction_max(R) + in_direction_min(R)); return vol; } double volume::full_volume() const { double vol = computational_volume(); if (dim == Dcyl) vol *= pi * (in_direction_max(R) + in_direction_min(R)); return vol; } double volume::diameter() const { double diam = 0.0; LOOP_OVER_DIRECTIONS(dim,d) { diam = max(diam, in_direction(d)); } return diam; } volume volume::intersect_with(const volume &a) const { if (a.dim != dim) abort("Can't intersect volumes of dissimilar dimensions.\n"); volume result(dim); LOOP_OVER_DIRECTIONS(dim, d) { double minval = max(in_direction_min(d), a.in_direction_min(d)); double maxval = min(in_direction_max(d), a.in_direction_max(d)); if (minval > maxval) return volume(zero_vec(dim), zero_vec(dim)); result.set_direction_min(d, minval); result.set_direction_max(d, maxval); } return result; } bool volume::intersects(const volume &a) const { if (a.dim != dim) abort("Can't intersect volumes of dissimilar dimensions.\n"); LOOP_OVER_DIRECTIONS(dim, d) { double minval = max(in_direction_min(d), a.in_direction_min(d)); double maxval = min(in_direction_max(d), a.in_direction_max(d)); if (minval > maxval) return false; } return true; } // Return normal direction to grid_volume, if the grid_volume is dim-1 dimensional; // otherwise, return NO_DIRECTION. direction volume::normal_direction() const { direction d = NO_DIRECTION; switch (dim) { case D1: d = Z; break; case D2: if (in_direction(X) == 0 && in_direction(Y) > 0) d = X; else if (in_direction(X) > 0 && in_direction(Y) == 0) d = Y; break; case Dcyl: if (in_direction(R) == 0 && in_direction(Z) > 0) d = R; else if (in_direction(R) > 0 && in_direction(Z) == 0) d = Z; break; case D3: { bool zx = in_direction(X) == 0; bool zy = in_direction(Y) == 0; bool zz = in_direction(Z) == 0; if (zx && !zy && !zz) d = X; else if (!zx && zy && !zz) d = Y; else if (!zx && !zy && zz) d = Z; break; } } return d; } /* Used for n=0,1,2 nested loops in macros. We should arrange the ordering so that this gives most efficient traversal of a field array, where n=2 is the innermost loop. */ static direction yucky_dir(ndim dim, int n) { if (dim == Dcyl) switch (n) { case 0: return P; case 1: return R; case 2: return Z; } else if (dim == D2) return (direction) ((n + 2) % 3); /* n = 0,1,2 gives Z, X, Y */ return (direction) n ; } int ivec::yucky_val(int n) const { if (has_direction(dim, yucky_dir(dim, n))) return in_direction(yucky_dir(dim, n)); return 0; } int grid_volume::yucky_num(int n) const { if (has_direction(dim, yucky_dir(dim, n))) return num_direction(yucky_dir(dim, n)); return 1; } direction grid_volume::yucky_direction(int n) const { return yucky_dir(dim, n); } volume grid_volume::surroundings() const { return volume(operator[](little_corner()), operator[](big_corner())); } volume grid_volume::interior() const { return volume(operator[](little_corner()), operator[](big_corner() - one_ivec(dim) * 2)); } void grid_volume::update_ntot() { the_ntot = 1; LOOP_OVER_DIRECTIONS(dim, d) the_ntot *= num[d%3] + 1; } void grid_volume::set_num_direction(direction d, int value) { num[d%3] = value; num_changed(); } grid_volume::grid_volume(ndim td, double ta, int na, int nb, int nc) { dim = td; a = ta; inva = 1.0 / ta; num[0] = na; num[1] = nb; num[2] = nc; num_changed(); set_origin(zero_vec(dim)); } component grid_volume::eps_component() const { switch (dim) { case D1: return Hy; case D2: return Hz; case D3: return Dielectric; case Dcyl: return Hp; } abort("Unsupported dimensionality eps.\n"); return Ex; } vec grid_volume::yee_shift(component c) const { return operator[](iyee_shift(c)); } /* Return array offsets to average with a given array location of c in order to get c on the "centered" grid. Then, to get the centered grid point i, you should average c over the four locations: i, i+offset1, i+offset2, i+offset1+offset2. (offset2, and possibly offset1, may be zero if only 2 or 1 locations need to be averaged). */ void grid_volume::yee2cent_offsets(component c, int &offset1, int &offset2) { offset1 = offset2 = 0; LOOP_OVER_DIRECTIONS(dim,d) { if (!iyee_shift(c).in_direction(d)) { if (offset2) abort("weird yee shift for component %s", component_name(c)); if (offset1) offset2 = stride(d); else offset1 = stride(d); } } } bool volume::contains(const vec &p) const { LOOP_OVER_DIRECTIONS(dim,d) { if (p.in_direction(d) > in_direction_max(d) || p.in_direction(d) < in_direction_min(d)) return false; } return true; } bool volume::contains(const volume &a) const { return contains(a.get_min_corner()) && contains(a.get_max_corner()); } bool grid_volume::contains(const ivec &p) const { // containts returns true if the grid_volume has information about this grid // point. const ivec o = p - io; LOOP_OVER_DIRECTIONS(dim, d) if (o.in_direction(d) < 0 || o.in_direction(d) >= (num_direction(d)+1)*2) return false; return true; } bool grid_volume::contains(const vec &p) const { // containts returns true if the grid_volume has any information in it // relevant to the point p. Basically has is like owns (see below) // except it is more lenient, in that more than one lattice may contain a // given point. const vec o = p - origin; LOOP_OVER_DIRECTIONS(dim, d) if (o.in_direction(d) < -inva || o.in_direction(d) > num_direction(d)*inva+inva) return false; return true; } /* Compute the corners (cs,ce) of the ib-th boundary for component c, returning true if ib is a valid index (ib = 0..#boundaries-1). The boundaries are all the points that are in but not owned by the grid_volume, and are a set of *disjoint* regions. The main purpose of this function is currently to support the LOOP_OVER_NOT_OWNED macro. (In the future, it may be used for other boundary-element-type computations, too.) */ bool grid_volume::get_boundary_icorners(component c, int ib, ivec *cs, ivec *ce) const { ivec cl(little_corner() + iyee_shift(c)); ivec cb(big_corner() + iyee_shift(c)); ivec clo(little_owned_corner(c)); ivec cbo(big_corner() - iyee_shift(c)); *cs = cl; *ce = cb; bool ib_found = false; int jb = 0; LOOP_OVER_DIRECTIONS(dim, d) { if (cl.in_direction(d) < clo.in_direction(d)) { if (jb == ib) { ce->set_direction(d, cs->in_direction(d)); ib_found = true; break; } cs->set_direction(d, clo.in_direction(d)); jb++; } if (cb.in_direction(d) > cbo.in_direction(d)) { if (jb == ib) { cs->set_direction(d, ce->in_direction(d)); ib_found = true; break; } ce->set_direction(d, cbo.in_direction(d)); jb++; } } if (!ib_found) { // yucky interaction here with LOOP_OVER_VOL_NOTOWNED *cs = one_ivec(dim); *ce = -one_ivec(dim); } return ib_found; } // first "owned" point for c in grid_volume (see also grid_volume::owns) ivec grid_volume::little_owned_corner(component c) const { ivec iloc(little_owned_corner0(c)); if (dim == Dcyl && origin.r() == 0.0 && iloc.r() == 2) iloc.set_direction(R, 0); return iloc; } int grid_volume::nowned(component c) const { int n = 1; ivec pt = big_corner() - little_owned_corner(c); LOOP_OVER_DIRECTIONS(dim, d) n *= pt.in_direction(d) / 2 + 1; return n; } bool grid_volume::owns(const ivec &p) const { // owns returns true if the point "owned" by this grid_volume, meaning that it // is the grid_volume that would timestep the point. const ivec o = p - io; if (dim == Dcyl) { if (origin.r() == 0.0 && o.z() > 0 && o.z() <= nz()*2 && o.r() == 0) return true; return o.r() > 0 && o.z() > 0 && o.r() <= nr()*2 && o.z() <= nz()*2; } else if (dim == D3) { return o.x() > 0 && o.x() <= nx()*2 && o.y() > 0 && o.y() <= ny()*2 && o.z() > 0 && o.z() <= nz()*2; } else if (dim == D2) { return o.x() > 0 && o.x() <= nx()*2 && o.y() > 0 && o.y() <= ny()*2; } else if (dim == D1) { return o.z() > 0 && o.z() <= nz()*2; } else { abort("Unsupported dimension in owns.\n"); return false; } } int grid_volume::has_boundary(boundary_side b,direction d) const { switch (dim) { case Dcyl: return d == Z || (d == R && (b == High || get_origin().r() > 0)); case D1: return d == Z; case D2: return d == X || d == Y; case D3: return d == X || d == Y || d == Z; } return 0; // This should never be reached. } int grid_volume::index(component c, const ivec &p) const { const ivec offset = p - io - iyee_shift(c); int idx = 0; LOOP_OVER_DIRECTIONS(dim,d) idx += offset.in_direction(d)/2*stride(d); return idx; } void grid_volume::set_strides() { FOR_DIRECTIONS(d) the_stride[d] = 0; // Yuck yuck yuck. LOOP_OVER_DIRECTIONS(dim,d) switch(d) { case Z: the_stride[d] = 1; break; case R: the_stride[d] = nz()+1; break; case X: the_stride[d] = (nz()+1)*(ny() + 1); break; case Y: the_stride[d] = nz() + 1; break; case P: break; // There is no phi stride... case NO_DIRECTION: break; // no stride here, either } } static inline void stupidsort(int *ind, double *w, int l) { while (l) { if (fabs(w[0]) < 2e-15) { w[0] = w[l-1]; ind[0] = ind[l-1]; w[l-1] = 0.0; ind[l-1] = 0; } else { w += 1; ind += 1; } l -= 1; } } static inline void stupidsort(ivec *locs, double *w, int l) { while (l) { if (fabs(w[0]) < 2e-15) { w[0] = w[l-1]; locs[0] = locs[l-1]; w[l-1] = 0.0; locs[l-1] = 0; } else { w += 1; locs += 1; } l -= 1; } } void grid_volume::interpolate(component c, const vec &p, int indices[8], double weights[8]) const { ivec locs[8]; interpolate(c, p, locs, weights); for (int i=0;i<8&&weights[i];i++) if (!owns(locs[i])) weights[i] = 0.0; stupidsort(locs, weights, 8); for (int i=0;i<8&&weights[i];i++) indices[i] = index(c, locs[i]); if (!contains(p) && weights[0]) { printf("Error at point %g %g\n", p.r(), p.z()); printf("Interpolated to point %d %d\n", locs[0].r(), locs[0].z()); printf("Or in other words... %g %g\n", operator[](locs[0]).r(), operator[](locs[0]).z()); printf("I %s own the interpolated point.\n", owns(locs[0])?"actually":"don't"); print(); abort("Error made in interpolation of %s--fix this bug!!!\n", component_name(c)); } // Throw out out of range indices: for (int i=0;i<8&&weights[i];i++) if (indices[0] < 0 || indices[0] >= ntot()) weights[i] = 0.0; // Stupid very crude code to compactify arrays: stupidsort(indices, weights, 8); if (!contains(p) && weights[0]) { printf("Error at point %g %g\n", p.r(), p.z()); printf("Interpolated to point %d %d\n", locs[0].r(), locs[0].z()); print(); abort("Error made in interpolation of %s--fix this bug!!!\n", component_name(c)); } } void grid_volume::interpolate(component c, const vec &pc, ivec locs[8], double weights[8]) const { const double SMALL = 1e-13; const vec p = (pc - yee_shift(c))*a; ivec middle(dim); LOOP_OVER_DIRECTIONS(dim,d) middle.set_direction(d, ((int) floor(p.in_direction(d)))*2+1); middle += iyee_shift(c); const vec midv = operator[](middle); const vec dv = (pc - midv)*(2*a); int already_have = 1; for (int i=0;i<8;i++) { locs[i] = round_vec(midv); weights[i] = 1.0; } LOOP_OVER_DIRECTIONS(dim,d) { for (int i=0;i= SMALL * 1e5) abort("large negative interpolation weight[%d] = %e\n", i, weights[i]); weights[i] = 0.0; } else if (weights[i] < SMALL) weights[i] = 0.0; } stupidsort(locs, weights, already_have); // The rest of this code is a crude hack to get the weights right when we // are exactly between a few grid points. i.e. to eliminate roundoff // error. bool all_same = true; for (int i=0;i<8&&weights[i];i++) if (weights[i] != weights[0]) all_same = false; if (all_same) { int num_weights = 0; for (int i=0;i<8&&weights[i];i++) num_weights++; for (int i=0;i<8&&weights[i];i++) weights[i] = 1.0/num_weights; } } volume empty_volume(ndim dim) { volume out(dim); LOOP_OVER_DIRECTIONS(dim,d) { out.set_direction_max(d,0.0); out.set_direction_min(d,0.0); } return out; } volume grid_volume::dV(const ivec &here, double diameter) const { const double hinva = 0.5*inva * diameter; const grid_volume &gv = *this; const vec h = gv[here]; volume out(dim); LOOP_OVER_DIRECTIONS(dim,d) { out.set_direction_max(d,h.in_direction(d)+hinva); out.set_direction_min(d,h.in_direction(d)-hinva); } if (dim == Dcyl && here.r() == 0) { out.set_direction_min(R,0.0); } return out; } volume grid_volume::dV(component c, int ind) const { if (!owns(iloc(c, ind))) return empty_volume(dim); return dV(iloc(c,ind)); } double grid_volume::xmax() const { const double qinva = 0.25*inva; return origin.x() + nx()*inva + qinva; } double grid_volume::xmin() const { const double qinva = 0.25*inva; return origin.x() + qinva; } double grid_volume::ymax() const { const double qinva = 0.25*inva; return origin.y() + ny()*inva + qinva; } double grid_volume::ymin() const { const double qinva = 0.25*inva; return origin.y() + qinva; } double grid_volume::zmax() const { const double qinva = 0.25*inva; return origin.z() + nz()*inva + qinva; } double grid_volume::zmin() const { const double qinva = 0.25*inva; return origin.z() + qinva; } double grid_volume::rmax() const { const double qinva = 0.25*inva; if (dim == Dcyl) return origin.r() + nr()*inva + qinva; abort("No rmax in these dimensions.\n"); return 0.0; // This is never reached. } double grid_volume::rmin() const { const double qinva = 0.25*inva; if (dim == Dcyl) { if (origin.r() == 0.0) { return 0.0; } else { return origin.r() + qinva; } } abort("No rmin in these dimensions.\n"); return 0.0; // This is never reached. } double vec::project_to_boundary(direction d, double boundary_loc) { return fabs(boundary_loc - in_direction(d)); } double grid_volume::boundary_location(boundary_side b, direction d) const { // Returns the location of metallic walls... if (b == High) switch (d) { case X: return loc(Ez,ntot()-1).x(); case Y: return loc(Ez,ntot()-1).y(); case R: return loc(Ep,ntot()-1).r(); case Z: if (dim == Dcyl) return loc(Ep,ntot()-1).z(); else return loc(Ex,ntot()-1).z(); case P: abort("P has no boundary!\n"); case NO_DIRECTION: abort("NO_DIRECTION has no boundary!\n"); } else switch (d) { case X: return loc(Ez,0).x(); case Y: return loc(Ez,0).y(); case R: return loc(Ep,0).r(); case Z: if (dim == Dcyl) return loc(Ep,0).z(); else return loc(Ex,0).z(); case P: abort("P has no boundary!\n"); case NO_DIRECTION: abort("NO_DIRECTION has no boundary!\n"); } return 0.0; } ivec grid_volume::big_corner() const { switch (dim) { case D1: return io + ivec(nz())*2; case D2: return io + ivec(nx(),ny())*2; case D3: return io + ivec(nx(),ny(),nz())*2; case Dcyl: return io + iveccyl(nr(),nz())*2; } return ivec(0); // This is never reached. } vec grid_volume::corner(boundary_side b) const { if (b == Low) return origin; // Low corner vec tmp = origin; LOOP_OVER_DIRECTIONS(dim, d) tmp.set_direction(d, tmp.in_direction(d) + num_direction(d) * inva); return tmp; // High corner } void grid_volume::print() const { LOOP_OVER_DIRECTIONS(dim, d) printf("%s =%5g - %5g (%5g) \t", direction_name(d), origin.in_direction(d), origin.in_direction(d)+num_direction(d)/a, num_direction(d)/a); printf("\n"); } bool grid_volume::intersect_with(const grid_volume &vol_in, grid_volume *intersection, grid_volume *others, int *num_others) const { int temp_num[3] = {0,0,0}; ivec new_io(dim); LOOP_OVER_DIRECTIONS(dim, d) { int minval = max(little_corner().in_direction(d), vol_in.little_corner().in_direction(d)); int maxval = min(big_corner().in_direction(d), vol_in.big_corner().in_direction(d)); if (minval >= maxval) return false; temp_num[d%3] = (maxval - minval)/2; new_io.set_direction(d, minval); } if (intersection != NULL) { *intersection = grid_volume(dim, a, temp_num[0], temp_num[1], temp_num[2]); // fix me : ugly, need new constructor intersection->set_origin(new_io); } if (others != NULL) { int counter = 0; grid_volume vol_containing = *this; LOOP_OVER_DIRECTIONS(dim, d) { if (vol_containing.little_corner().in_direction(d) < vol_in.little_corner().in_direction(d)) { // shave off lower slice from vol_containing and add it to others grid_volume other = vol_containing; const int thick = (vol_in.little_corner().in_direction(d) - vol_containing.little_corner().in_direction(d))/2; other.set_num_direction(d, thick); others[counter] = other; counter++; vol_containing.shift_origin(d, thick*2); vol_containing.set_num_direction(d, vol_containing.num_direction(d) - thick); if (vol_containing.little_corner().in_direction(d) < vol_in.little_corner().in_direction(d)) abort("intersect_with: little corners differ by odd integer?"); } if (vol_containing.big_corner().in_direction(d) > vol_in.big_corner().in_direction(d)) { // shave off upper slice from vol_containing and add it to others grid_volume other = vol_containing; const int thick = (vol_containing.big_corner().in_direction(d) - vol_in.big_corner().in_direction(d))/2; other.set_num_direction(d, thick); other.shift_origin(d, (vol_containing.num_direction(d) - thick)*2); others[counter] = other; counter++; vol_containing.set_num_direction(d, vol_containing.num_direction(d) - thick); if (vol_containing.big_corner().in_direction(d) < vol_in.big_corner().in_direction(d)) abort("intersect_with: big corners differ by odd integer?"); } } *num_others = counter; int initial_points = 1; LOOP_OVER_DIRECTIONS(dim, d) initial_points *= num_direction(d); int final_points , temp = 1; LOOP_OVER_DIRECTIONS(dim, d) temp *= intersection->num_direction(d); final_points = temp; for (int j=0; j<*num_others; j++) { temp = 1; LOOP_OVER_DIRECTIONS(dim, d) temp *= others[j].num_direction(d); final_points += temp; } if (initial_points != final_points) abort("intersect_with: initial_points != final_points, %d, %d\n", initial_points, final_points); } return true; } vec grid_volume::loc_at_resolution(int index, double res) const { vec where = origin; for (int dd=X;dd<=R;dd++) { const direction d = (direction) dd; if (has_boundary(High,d)) { const double dist = boundary_location(High,d)-boundary_location(Low,d); const int nhere = max(1,(int)floor(dist*res+0.5)); where.set_direction(d,origin.in_direction(d) + ((index % nhere)+0.5)*(1.0/res)); index /= nhere; } } return where; } int grid_volume::ntot_at_resolution(double res) const { int mytot = 1; for (int d=X;d<=R;d++) if (has_boundary(High,(direction)d)) { const double dist = boundary_location(High,(direction)d) - boundary_location(Low,(direction)d); mytot *= max(1,(int)(dist*res+0.5)); } return mytot; } vec grid_volume::loc(component c, int ind) const { return operator[](iloc(c,ind)); } ivec grid_volume::iloc(component c, int ind) const { ivec out(dim); LOOP_OVER_DIRECTIONS(dim,d) { int ind_over_stride = ind/stride(d); while (ind_over_stride < 0) ind_over_stride += num_direction(d)+1; out.set_direction(d, 2*(ind_over_stride%(num_direction(d)+1))); } return out + iyee_shift(c) + io; } vec grid_volume::dr() const { switch (dim) { case Dcyl: return veccyl(inva, 0.0); case D1: case D2: case D3: abort("Error in dr\n"); } return vec(0); // This is never reached. } vec grid_volume::dx() const { switch (dim) { case D3: return vec(inva,0,0); case D2: return vec(inva,0); case D1: case Dcyl: abort("Error in dx.\n"); } return vec(0); // This is never reached. } vec grid_volume::dy() const { switch (dim) { case D3: return vec(0,inva,0); case D2: return vec(0,inva); case D1: case Dcyl: abort("Error in dy.\n"); } return vec(0); // This is never reached. } vec grid_volume::dz() const { switch (dim) { case Dcyl: return veccyl(0.0,inva); case D3: return vec(0,0,inva); case D1: return vec(inva); case D2: abort("dz doesn't exist in 2D\n"); } return vec(0); // This is never reached. } grid_volume volone(double zsize, double a) { return grid_volume(D1, a, 0, 0, (int) (zsize*a + 0.5)); } grid_volume voltwo(double xsize, double ysize, double a) { return grid_volume(D2, a, (xsize==0)?1:(int) (xsize*a + 0.5), (ysize==0)?1:(int) (ysize*a + 0.5),0); } grid_volume vol1d(double zsize, double a) { return volone(zsize, a); } grid_volume vol2d(double xsize, double ysize, double a) { return voltwo(xsize, ysize, a); } grid_volume vol3d(double xsize, double ysize, double zsize, double a) { return grid_volume(D3, a,(xsize==0)?1:(int) (xsize*a + 0.5), (ysize==0)?1:(int) (ysize*a + 0.5), (zsize==0)?1:(int) (zsize*a + 0.5)); } grid_volume volcyl(double rsize, double zsize, double a) { if (zsize == 0.0) return grid_volume(Dcyl, a, (int) (rsize*a + 0.5), 0, 1); else return grid_volume(Dcyl, a, (int) (rsize*a + 0.5), 0, (int) (zsize*a + 0.5)); } grid_volume grid_volume::split(int n, int which) const { if (n > nowned_min()) abort("Cannot split %d grid points into %d parts\n", nowned_min(), n); if (n == 1) return *this; // Try to get as close as we can... int biglen = 0; for (int i=0;i<3;i++) if (num[i] > biglen) biglen = num[i]; const int split_point = (int)(biglen*(n/2)/(double)n + 0.5); const int num_low = (int)(split_point*n/(double)biglen + 0.5); if (which < num_low) return split_at_fraction(false, split_point).split(num_low,which); else return split_at_fraction(true, split_point).split(n-num_low,which-num_low); } grid_volume grid_volume::split_by_effort(int n, int which, int Ngv, const grid_volume *v, double *effort) const { const int grid_points_owned = nowned_min(); if (n > grid_points_owned) abort("Cannot split %d grid points into %d parts\n", nowned_min(), n); if (n == 1) return *this; int biglen = 0; direction splitdir = NO_DIRECTION; LOOP_OVER_DIRECTIONS(dim, d) if (num_direction(d) > biglen) { biglen = num_direction(d); splitdir = d; } double best_split_measure = 1e20, left_effort_fraction = 0; int best_split_point = 0; vec corner = zero_vec(dim); LOOP_OVER_DIRECTIONS(dim, d) corner.set_direction(d, origin.in_direction(d) + num_direction(d)/a); for (int split_point = 1; split_point < biglen; split_point+=1) { grid_volume v_left = *this; v_left.set_num_direction(splitdir, split_point); grid_volume v_right = *this; v_right.set_num_direction(splitdir, num_direction(splitdir) - split_point); v_right.shift_origin(splitdir, split_point*2); double total_left_effort = 0, total_right_effort = 0; grid_volume vol; if (Ngv == 0) { total_left_effort = v_left.ntot(); total_right_effort = v_right.ntot(); } else { for (int j = 0; j best_split_point*(grid_points_owned/biglen) || (n-num_low) > (grid_points_owned - best_split_point*(grid_points_owned/biglen))) return split(n, which); if (which < num_low) return split_at_fraction(false, split_point).split_by_effort(num_low,which, Ngv,v,effort); else return split_at_fraction(true, split_point).split_by_effort(n-num_low,which-num_low, Ngv,v,effort); } grid_volume grid_volume::split_at_fraction(bool want_high, int numer) const { int bestd = -1, bestlen = 1; for (int i=0;i<3;i++) if (num[i] > bestlen) { bestd = i; bestlen = num[i]; } if (bestd == -1) { for (int i=0;i<3;i++) master_printf("num[%d] = %d\n", i, num[i]); abort("Crazy weird splitting error.\n"); } grid_volume retval(dim, a, 1,1,1); for (int i=0;i<3;i++) retval.num[i] = num[i]; if (numer >= num[bestd]) abort("Aaack bad bug in split_at_fraction.\n"); direction d = (direction) bestd; if (dim == Dcyl && d == X) d = R; retval.set_origin(io); if (want_high) retval.shift_origin(d,numer*2); if (want_high) retval.num[bestd] -= numer; else retval.num[bestd] = numer; retval.num_changed(); return retval; } // Halve the grid_volume for symmetry exploitation...must contain icenter! grid_volume grid_volume::halve(direction d) const { grid_volume retval(*this); // note that icenter-io is always even by construction of grid_volume::icenter retval.set_num_direction(d, (icenter().in_direction(d) - io.in_direction(d)) / 2); return retval; } grid_volume grid_volume::pad(direction d) const { grid_volume gv(*this); gv.pad_self(d); return gv; } void grid_volume::pad_self(direction d) { num[d%3]+=2; // Pad in both directions by one grid point. num_changed(); shift_origin(d, -2); } ivec grid_volume::icenter() const { /* Find the center of the user's cell. This will be used as the symmetry point, and therefore icenter-io must be *even* in all components in order that rotations preserve the Yee lattice. */ switch (dim) { case D1: return io + ivec(nz()).round_up_to_even(); case D2: return io + ivec(nx(), ny()).round_up_to_even(); case D3: return io + ivec(nx(), ny(), nz()).round_up_to_even(); case Dcyl: return io + iveccyl(0, nz()).round_up_to_even(); } abort("Can't do symmetry with these dimensions.\n"); return ivec(0); // This is never reached. } vec grid_volume::center() const { return operator[](icenter()); } symmetry rotate4(direction axis, const grid_volume &gv) { symmetry s = identity(); if (axis > 2) abort("Can only rotate4 in 2D or 3D.\n"); s.g = 4; FOR_DIRECTIONS(d) { s.S[d].d = d; s.S[d].flipped = false; } s.S[(axis+1)%3].d = (direction)((axis+2)%3); s.S[(axis+1)%3].flipped = true; s.S[(axis+2)%3].d = (direction)((axis+1)%3); s.symmetry_point = gv.center(); s.i_symmetry_point = gv.icenter(); return s; } symmetry rotate2(direction axis, const grid_volume &gv) { symmetry s = identity(); if (axis > 2) abort("Can only rotate2 in 2D or 3D.\n"); s.g = 2; s.S[(axis+1)%3].flipped = true; s.S[(axis+2)%3].flipped = true; s.symmetry_point = gv.center(); s.i_symmetry_point = gv.icenter(); return s; } symmetry mirror(direction axis, const grid_volume &gv) { symmetry s = identity(); s.g = 2; s.S[axis].flipped = true; s.symmetry_point = gv.center(); s.i_symmetry_point = gv.icenter(); return s; } symmetry r_to_minus_r_symmetry(double m) { symmetry s = identity(); s.g = 2; s.S[R].flipped = true; s.S[P].flipped = true; s.symmetry_point = zero_vec(Dcyl); s.i_symmetry_point = zero_ivec(Dcyl); if (m == int(m)) // phase is purely real (+/- 1) when m an integer s.ph = (int(m) & 1) ? -1.0 : 1.0; else s.ph = polar(1.0, m * pi); // general case return s; } symmetry identity() { return symmetry(); } symmetry::symmetry() { g = 1; ph = 1.0; FOR_DIRECTIONS(d) { S[d].d = d; S[d].flipped = false; } next = NULL; } symmetry::symmetry(const symmetry &s) { g = s.g; FOR_DIRECTIONS(d) { S[d].d = s.S[d].d; S[d].flipped = s.S[d].flipped; } ph = s.ph; symmetry_point = s.symmetry_point; i_symmetry_point = s.i_symmetry_point; if (s.next) next = new symmetry(*s.next); else next = NULL; } void symmetry::operator=(const symmetry &s) { g = s.g; FOR_DIRECTIONS(d) { S[d].d = s.S[d].d; S[d].flipped = s.S[d].flipped; } ph = s.ph; symmetry_point = s.symmetry_point; i_symmetry_point = s.i_symmetry_point; if (s.next) next = new symmetry(*s.next); else next = NULL; } bool symmetry::operator==(const symmetry &sym) const { int gtot = multiplicity(); if (gtot != sym.multiplicity()) return false; for (int sn = 1; sn < gtot; ++sn) FOR_DIRECTIONS(d) if (transform(d, sn) != sym.transform(d, sn)) return false; return true; } symmetry::~symmetry() { delete next; } int symmetry::multiplicity() const { if (next) return g*next->multiplicity(); else return g; } symmetry symmetry::operator+(const symmetry &b) const { // The following optimization ignores identity when adding symmetries // together. This is important because identity has an undefined // symmetry point. if (multiplicity() == 1) return b; else if (b.multiplicity() == 1) return *this; symmetry s = *this; symmetry *sn = &s; for (; sn->next; sn = sn->next) ; sn->next = new symmetry(b); return s; } symmetry symmetry::operator*(complex p) const { symmetry s = *this; s.ph *= p; return s; } signed_direction signed_direction::operator*(complex p) { signed_direction sd = *this; sd.phase *= p; return sd; } signed_direction symmetry::transform(direction d, int n) const { // Returns transformed direction + phase/flip; -n indicates inverse transform if (n == 0 || d == NO_DIRECTION) return signed_direction(d); int nme, nrest; if (n < 0) { nme = (g - (-n) % g) % g; nrest = -((-n) / g); } else { nme = n % g; nrest = n / g; } if (nme == 0) { if (nrest == 0) return signed_direction(d); else return next->transform(d,nrest); } else { signed_direction sd; if (nme == 1) sd = S[d]; if (S[d].flipped) sd = flip(transform(S[d].d, nme-1)); else sd = transform(S[d].d, nme-1); if (next && nrest) { if (sd.flipped) return flip(next->transform(sd.d, nrest))*ph; else return next->transform(sd.d, nrest)*ph; } else { return sd*ph; } } } ivec symmetry::transform(const ivec &ov, int n) const { if (n == 0) return ov; ivec out = ov; LOOP_OVER_DIRECTIONS(ov.dim, d) { const signed_direction s = transform(d,n); const int sp_d = i_symmetry_point.in_direction(d); const int sp_sd = i_symmetry_point.in_direction(s.d); const int delta = ov.in_direction(d) - sp_d; if (s.flipped) out.set_direction(s.d, sp_sd - delta); else out.set_direction(s.d, sp_sd + delta); } return out; } ivec symmetry::transform_unshifted(const ivec &ov, int n) const { if (n == 0) return ov; ivec out(ov.dim); LOOP_OVER_DIRECTIONS(ov.dim, d) { const signed_direction s = transform(d,n); if (s.flipped) out.set_direction(s.d, -ov.in_direction(d)); else out.set_direction(s.d, ov.in_direction(d)); } return out; } vec symmetry::transform(const vec &ov, int n) const { if (n == 0) return ov; vec delta = ov; LOOP_OVER_DIRECTIONS(ov.dim, d) { const signed_direction s = transform(d,n); double deltad = ov.in_direction(d) - symmetry_point.in_direction(d); if (s.flipped) delta.set_direction(s.d, -deltad); else delta.set_direction(s.d, deltad); } return symmetry_point + delta; } volume symmetry::transform(const volume &v, int n) const { return volume(transform(v.get_min_corner(),n), transform(v.get_max_corner(),n)); } component symmetry::transform(component c, int n) const { return direction_component(c,transform(component_direction(c),n).d); } derived_component symmetry::transform(derived_component c, int n) const { return direction_component(c,transform(component_direction(c),n).d); } int symmetry::transform(int c, int n) const { return (is_derived(c) ? int(transform(derived_component(c), n)) : int(transform(component(c), n))); } complex symmetry::phase_shift(component c, int n) const { if (c == Dielectric || c == Permeability) return 1.0; complex phase = transform(component_direction(c),n).phase; // flip tells us if we need to flip the sign. For vectors (E), it is // just this simple: bool flip = transform(component_direction(c),n).flipped; if (is_magnetic(c) || is_B(c)) { // Because H is a pseudovector, here we have to figure out if the // transformation changes the handedness of the basis. bool have_one = false, have_two = false; FOR_DIRECTIONS(d) { if (transform(d,n).flipped) flip = !flip; int shift = (transform(d,n).d - d + 6) % 3; if (shift == 1) have_one = true; if (shift == 2) have_two = true; } if (have_one && have_two) flip = !flip; } if (flip) return -phase; else return phase; } complex symmetry::phase_shift(derived_component c, int n) const { if (is_poynting(c)) { signed_direction ds = transform(component_direction(c),n); complex ph = conj(ds.phase) * ds.phase; // E x H gets |phase|^2 return (ds.flipped ? -ph : ph); } else /* energy density */ return 1.0; } complex symmetry::phase_shift(int c, int n) const { return (is_derived(c) ? phase_shift(derived_component(c), n) : phase_shift(component(c), n)); } bool symmetry::is_primitive(const ivec &p) const { // This is only correct if p is somewhere on the yee lattice. if (multiplicity() == 1) return true; for (int i=1;i p.x() && pp.y() <= pp.x()) return false; break; case D3: if (pp.x()+pp.y()+pp.z() < p.x()+p.y()+p.z()) return false; if (pp.x()+pp.y()+pp.z() == p.x()+p.y()+p.z() && pp.x()+pp.y()-pp.z() < p.x()+p.y()-p.z()) return false; if (pp.x()+pp.y()+pp.z() == p.x()+p.y()+p.z() && pp.x()+pp.y()-pp.z() == p.x()+p.y()-p.z() && pp.x()-pp.y()-pp.z() < p.x()-p.y()-p.z()) return false; break; case D1: case Dcyl: if (pp.z() < p.z()) return false; break; } } return true; } /* given a list of geometric volumes, produce a new list with appropriate weights that is minimized according to the symmetry. */ volume_list *symmetry::reduce(const volume_list *gl) const { volume_list *glnew = 0; for (const volume_list *g = gl; g; g = g->next) { int sn; for (sn = 0; sn < multiplicity(); ++sn) { volume gS(transform(g->v, sn)); int cS = transform(g->c, sn); volume_list *gn; for (gn = glnew; gn; gn = gn->next) if (gn->c == cS && gn->v.round_float() == gS.round_float()) break; if (gn) { // found a match gn->weight += g->weight * phase_shift(g->c, sn); break; } } if (sn == multiplicity() && g->weight != 0.0) { // no match, add to glnew volume_list *gn = new volume_list(g->v, g->c, g->weight, glnew); glnew = gn; } } // reduce v's redundant with themselves & delete elements with zero weight: volume_list *gprev = 0, *g = glnew; while (g) { // first, see if g->v is redundant with itself bool halve[5] = {false,false,false,false,false}; complex weight = g->weight; for (int sn = 1; sn < multiplicity(); ++sn) if (g->c == transform(g->c, sn) && g->v.round_float() == transform(g->v, sn).round_float()) { LOOP_OVER_DIRECTIONS(g->v.dim, d) if (transform(d,sn).flipped) { halve[d] = true; break; } g->weight += weight * phase_shift(g->c, sn); } LOOP_OVER_DIRECTIONS(g->v.dim, d) if (halve[d]) g->v.set_direction_max(d, g->v.in_direction_min(d) + 0.5 * g->v.in_direction(d)); // now, delete it if it has zero weight if (g->weight == 0.0) { if (gprev) gprev->next = g->next; else // g == glnew glnew = g->next; g->next = 0; // necessary so that g->next is not deleted recursively delete g; g = gprev ? gprev->next : glnew; } else g = (gprev = g)->next; } return glnew; } /***************************************************************************/ static double poynting_fun(const complex *fields, const vec &loc, void *data_) { (void) loc; // unused (void) data_; // unused return (real(conj(fields[0]) * fields[1]) - real(conj(fields[2])*fields[3])); } static double energy_fun(const complex *fields, const vec &loc, void *data_) { (void) loc; // unused int nfields = *((int *) data_) / 2; double sum = 0; for (int k = 0; k < nfields; ++k) sum += real(conj(fields[2*k]) * fields[2*k+1]); return sum * 0.5; } field_rfunction derived_component_func(derived_component c, const grid_volume &gv, int &nfields, component cs[12]) { switch (c) { case Sx: case Sy: case Sz: case Sr: case Sp: switch (c) { case Sx: cs[0] = Ey; cs[1] = Hz; break; case Sy: cs[0] = Ez; cs[1] = Hx; break; case Sz: cs[0] = Ex; cs[1] = Hy; break; case Sr: cs[0] = Ep; cs[1] = Hz; break; case Sp: cs[0] = Ez; cs[1] = Hr; break; default: break; // never reached } nfields = 4; cs[2] = direction_component(Ex, component_direction(cs[1])); cs[3] = direction_component(Hx, component_direction(cs[0])); return poynting_fun; case EnergyDensity: case D_EnergyDensity: case H_EnergyDensity: nfields = 0; if (c != H_EnergyDensity) FOR_ELECTRIC_COMPONENTS(c0) if (gv.has_field(c0)) { cs[nfields++] = c0; cs[nfields++] = direction_component(Dx, component_direction(c0)); } if (c != D_EnergyDensity) FOR_MAGNETIC_COMPONENTS(c0) if (gv.has_field(c0)) { cs[nfields++] = c0; cs[nfields++] = direction_component(Bx, component_direction(c0)); } if (nfields > 12) abort("too many field components"); return energy_fun; default: abort("unknown derived_component in derived_component_func"); } return 0; } /***************************************************************************/ } // namespace meep meep-openmpi-1.1.1/src/update_eh.cpp0000644000175200017520000001636011243101206016564 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "meep.hpp" #include "meep_internals.hpp" namespace meep { void fields::update_eh(field_type ft, bool skip_w_components) { if (ft != E_stuff && ft != H_stuff) abort("update_eh only works with E/H"); for (int i=0;iis_mine()) if (chunks[i]->update_eh(ft, skip_w_components)) chunk_connections_valid = false; // E/H allocated - reconnect chunks /* synchronize to avoid deadlocks if one process decides it needs to allocate E or H ... */ chunk_connections_valid = and_to_all(chunk_connections_valid); } bool fields_chunk::update_eh(field_type ft, bool skip_w_components) { field_type ft2 = ft == E_stuff ? D_stuff : B_stuff; // for sources etc. bool allocated_eh = false; bool have_int_sources = false; if (!doing_solve_cw) { for (src_vol *sv = sources[ft2]; sv; sv = sv->next) if (sv->t->is_integrated) { have_int_sources = true; break; } } FOR_FT_COMPONENTS(ft2, dc) DOCMP { if (f[dc][cmp] && (pols[ft] || have_int_sources)) { if (!f_minus_p[dc][cmp]) f_minus_p[dc][cmp] = new realnum[gv.ntot()]; } else if (f_minus_p[dc][cmp]) { // remove unneeded f_minus_p delete[] f_minus_p[dc][cmp]; f_minus_p[dc][cmp] = 0; } } bool have_f_minus_p = false; FOR_FT_COMPONENTS(ft2, dc) if (f_minus_p[dc][0]) { have_f_minus_p = true; break; } const int ntot = s->gv.ntot(); if (have_f_minus_p && doing_solve_cw) abort("dispersive materials are not yet implemented for solve_cw"); ////////////////////////////////////////////////////////////////////////// // First, initialize f_minus_p to D - P, if necessary if (have_f_minus_p) { if (pols[ft]) { FOR_FT_COMPONENTS(ft, ec) if (f[ec][0]) { for (polarization *np=pols[ft],*op=olpols[ft]; np; np=np->next, op=op->next) { if (np->energy[ec] && op->energy[ec]) { if (is_real) for (int i = 0; i < ntot; ++i) { np->energy[ec][i] = op->energy[ec][i] + (0.5)*(np->P[ec][0][i] - op->P[ec][0][i]) * f[ec][0][i]; } else for (int i = 0; i < ntot; ++i) { np->energy[ec][i] = op->energy[ec][i] + (0.5)*(np->P[ec][0][i] - op->P[ec][0][i]) * f[ec][0][i] + (0.5)*(np->P[ec][1][i] - op->P[ec][1][i]) * f[ec][1][i]; } } } component dc = direction_component(first_field_component(ft2), component_direction(ec)); DOCMP { realnum * fmp = f_minus_p[dc][cmp]; memcpy(fmp, f[dc][cmp], sizeof(realnum) * ntot); for (polarization *p = pols[ft]; p; p = p->next) { const realnum * P = p->P[ec][cmp]; for (int i=0;inext) { if (sv->t->is_integrated && f[sv->c][0] && ft == type(sv->c)) { component c = field_type_component(ft2, sv->c); for (int j = 0; j < sv->npts; ++j) { const complex A = sv->dipole(j); DOCMP { f_minus_p[c][cmp][sv->index[j]] -= (cmp) ? imag(A) : real(A); } } } } } ////////////////////////////////////////////////////////////////////////// // Finally, compute E = chi1inv * D realnum *dmp[NUM_FIELD_COMPONENTS][2]; if (have_f_minus_p) { FOR_FT_COMPONENTS(ft2,dc) DOCMP2 dmp[dc][cmp] = f_minus_p[dc][cmp]; } else { FOR_FT_COMPONENTS(ft2,dc) DOCMP2 dmp[dc][cmp] = f[dc][cmp]; } DOCMP FOR_FT_COMPONENTS(ft,ec) if (f[ec][cmp]) { if (type(ec) != ft) abort("bug in FOR_FT_COMPONENTS"); component dc = field_type_component(ft2, ec); const direction d_ec = component_direction(ec); const int s_ec = gv.stride(d_ec) * (ft == H_stuff ? -1 : +1); const direction d_1 = cycle_direction(gv.dim, d_ec, 1); const component dc_1 = direction_component(dc,d_1); const int s_1 = gv.stride(d_1) * (ft == H_stuff ? -1 : +1); const direction d_2 = cycle_direction(gv.dim, d_ec, 2); const component dc_2 = direction_component(dc,d_2); const int s_2 = gv.stride(d_2) * (ft == H_stuff ? -1 : +1); direction dsigw0 = d_ec; direction dsigw = s->sigsize[dsigw0] > 1 ? dsigw0 : NO_DIRECTION; // lazily allocate any E/H fields that are needed (H==B initially) if (f[ec][cmp] == f[dc][cmp] && (s->chi1inv[ec][d_ec] || have_f_minus_p || dsigw != NO_DIRECTION)) { f[ec][cmp] = new realnum[gv.ntot()]; memcpy(f[ec][cmp], f[dc][cmp], gv.ntot() * sizeof(realnum)); allocated_eh = true; } // lazily allocate W auxiliary field if (!f_w[ec][cmp] && dsigw != NO_DIRECTION) { f_w[ec][cmp] = new realnum[gv.ntot()]; memcpy(f_w[ec][cmp], f[ec][cmp], gv.ntot() * sizeof(realnum)); } // for solve_cw, when W exists we get W and E from special variables if (f_w[ec][cmp] && skip_w_components) continue; if (f[ec][cmp] != f[dc][cmp]) STEP_UPDATE_EDHB(f[ec][cmp], ec, gv, dmp[dc][cmp], dmp[dc_1][cmp], dmp[dc_2][cmp], s->chi1inv[ec][d_ec], dmp[dc_1][cmp]?s->chi1inv[ec][d_1]:NULL, dmp[dc_2][cmp]?s->chi1inv[ec][d_2]:NULL, s_ec, s_1, s_2, s->chi2[ec], s->chi3[ec], f_w[ec][cmp], dsigw, s->sig[dsigw]); } /* Do annoying special cases for r=0 in cylindrical coords. Note that this only really matters for field output; the Ez and Ep components at r=0 don't usually affect the fields elsewhere because of the form of Maxwell's equations in cylindrical coords. */ // (FIXME: handle Kerr case? Do we care about auxiliary PML fields here?) if (gv.dim == Dcyl && gv.origin_r() == 0.0) DOCMP FOR_FT_COMPONENTS(ft,ec) if (f[ec][cmp] && (ec == Ep || ec == Ez || ec == Hr)) { component dc = field_type_component(ft2, ec); if (f[ec][cmp] == f[dc][cmp]) continue; const int yee_idx = gv.yee_index(ec); const int d_ec = component_direction(ec); const int sR = gv.stride(R), nZ = gv.num_direction(Z); realnum *E = f[ec][cmp]; const realnum *D = have_f_minus_p ? f_minus_p[dc][cmp] : f[dc][cmp]; const realnum *chi1inv = s->chi1inv[ec][d_ec]; if (chi1inv) for (int iZ=0; iZ #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #if defined(HAVE_LIBFFTW3) # include #elif defined(HAVE_LIBDFFTW) # include #elif defined(HAVE_LIBFFTW) # include #endif #define HAVE_SOME_FFTW (defined(HAVE_LIBFFTW3) || defined(HAVE_LIBFFTW) || defined(HAVE_LIBDFFTW)) /* Below are the monitor point routines. */ namespace meep { monitor_point::monitor_point() { next = NULL; } monitor_point::~monitor_point() { if (next) delete next; } inline complex getcm(const realnum * const f[2], int i) { return complex(f[0][i],f[1][i]); } static void dumbsort(complex val[8]) { for (int i=0;i<7;i++) { int lowest = i; for (int j=i+1;j<8;j++) if (abs(val[j]) < abs(val[lowest])) lowest = j; complex tmp = val[i]; val[i] = val[lowest]; val[lowest] = tmp; } } static void dumbsort(double val[8]) { for (int i=0;i<7;i++) { int lowest = i; for (int j=i+1;j<8;j++) if (abs(val[j]) < abs(val[lowest])) lowest = j; double tmp = val[i]; val[i] = val[lowest]; val[lowest] = tmp; } } void fields::get_point(monitor_point *pt, const vec &loc) const { if (pt == NULL) abort("Error: get_point passed a null pointer!\n"); for (int i=0;i<10;i++) pt->f[i] = 0.0; pt->loc = loc; pt->t = time(); FOR_COMPONENTS(c) if (gv.has_field(c)) pt->f[c] = get_field(c,loc); } complex fields::get_field(int c, const vec &loc) const { return (is_derived(c) ? get_field(derived_component(c), loc) : get_field(component(c), loc)); } double fields::get_field(derived_component c, const vec &loc) const { component c1 = Ex, c2 = Ex; double sum = 0; switch (c) { case Sx: case Sy: case Sz: case Sr: case Sp: switch (c) { case Sx: c1 = Ey; c2 = Hz; break; case Sy: c1 = Ez; c2 = Hx; break; case Sz: c1 = Ex; c2 = Hy; break; case Sr: c1 = Ep; c2 = Hz; break; case Sp: c1 = Ez; c2 = Hr; break; default: break; // never } sum += real(conj(get_field(c1, loc)) * get_field(c2, loc)); sum -= real(conj(get_field(direction_component(Ex, component_direction(c2)), loc)) * get_field(direction_component(Hx, component_direction(c1)), loc)); return sum; case EnergyDensity: case D_EnergyDensity: case H_EnergyDensity: if (c != H_EnergyDensity) FOR_ELECTRIC_COMPONENTS(c1) if (gv.has_field(c1)) { c2 = direction_component(Dx, component_direction(c1)); sum += real(conj(get_field(c1, loc)) * get_field(c2, loc)); } if (c != D_EnergyDensity) FOR_MAGNETIC_COMPONENTS(c1) if (gv.has_field(c1)) { complex f = get_field(c1, loc); sum += real(conj(f) * f); } return sum * 0.5; default: abort("unknown derived_component in get_field"); } } complex fields::get_field(component c, const vec &loc) const { switch (c) { case Dielectric: return get_eps(loc); case Permeability: return get_mu(loc); default: ivec ilocs[8]; double w[8]; complex val[8]; for (int i=0;i<8;i++) val[i] = 0.0; gv.interpolate(c, loc, ilocs, w); for (int argh=0;argh<8&&w[argh];argh++) val[argh] = w[argh]*get_field(c,ilocs[argh]); dumbsort(val); complex res = 0.0; for (int i=0;i<8;i++) res += val[i]; return res; } } complex fields::get_field(component c, const ivec &origloc) const { ivec iloc = origloc; complex kphase = 1.0; locate_point_in_user_volume(&iloc, &kphase); for (int sn=0;sngv.contains(S.transform(iloc,sn))) return S.phase_shift(c,sn)*kphase* chunks[i]->get_field(S.transform(c,sn),S.transform(iloc,sn)); return 0.0; } complex fields_chunk::get_field(component c, const ivec &iloc) const { complex res = 0.0; if (f[c][0] && f[c][1]) res = getcm(f[c], gv.index(c, iloc)); else if (f[c][0]) res = f[c][0][gv.index(c,iloc)]; return broadcast(n_proc(), res); } /* Bounding box for zero-communication get_field, below. This is the largest box in which you can interpolate the fields without communication. It is *not* necessarily non-overlapping with other chunks. */ volume fields_chunk::get_field_gv(component c) const { switch (c) { case Dielectric: case Permeability: c = gv.eps_component(); default: return volume(gv.loc(c, 0), gv.loc(c, gv.ntot() - 1)); } } /* Non-collective, zero-communication get_field... loc *must* be in get_field_gv(c). */ complex fields_chunk::get_field(component c, const vec &loc) const { ivec ilocs[8]; double w[8]; switch (c) { case Permeability: abort("non-collective get_field(mu) unimplemented"); case Dielectric: abort("non-collective get_field(eps) unimplemented"); default: { gv.interpolate(c, loc, ilocs, w); complex res = 0.0; for (int i = 0; i < 8 && w[i] != 0.0; ++i) { if (!gv.contains(ilocs[i])) abort("invalid loc in chunk get_field, weight = %g", w[i]); if (f[c][0] && f[c][1]) res += getcm(f[c], gv.index(c, ilocs[i])) * w[i]; else if (f[c][0]) res += f[c][0][gv.index(c,ilocs[i])] * w[i]; } return res; } } } double fields::get_polarization_energy(const vec &loc) const { ivec ilocs[8]; double w[8], val[8]; for (int i=0;i<8;i++) val[i] = 0.0; gv.interpolate(gv.eps_component(), loc, ilocs, w); for (int argh=0;argh<8&&w[argh];argh++) val[argh] = w[argh]*get_polarization_energy(ilocs[argh]); dumbsort(val); double res = 0.0; for (int i=0;i<8;i++) res += val[i]; return res; } double fields::get_polarization_energy(const ivec &origloc) const { ivec iloc = origloc; complex aaack = 1.0; locate_point_in_user_volume(&iloc, &aaack); for (int sn=0;sngv.contains(S.transform(iloc,sn))) return chunks[i]->get_polarization_energy(S.transform(iloc,sn)); return 0.0; } double fields_chunk::get_polarization_energy(const ivec &iloc) const { double res = 0.0; FOR_FIELD_TYPES(ft) { polarization *p = pols[ft]; while (is_mine() && p) { res += p->local_energy(iloc); p = p->next; } } return broadcast(n_proc(), res); } double fields_chunk::my_polarization_energy(const ivec &iloc) const { if (!is_mine()) abort("Can't call my_polarization_energy on someone else's chunk!\n"); double res = 0.0; FOR_FIELD_TYPES(ft) { polarization *p = pols[ft]; while (p) { res += p->local_energy(iloc); p = p->next; } } return res; } double fields::get_polarization_energy(const polarizability_identifier &p, const vec &loc) const { ivec ilocs[8]; double w[8], val[8]; for (int i=0;i<8;i++) val[i] = 0.0; gv.interpolate(gv.eps_component(), loc, ilocs, w); for (int argh=0;argh<8&&w[argh];argh++) val[argh] = w[argh]*get_polarization_energy(p, ilocs[argh]); dumbsort(val); double res = 0.0; for (int i=0;i<8;i++) res += val[i]; return res; } double fields::get_polarization_energy(const polarizability_identifier &p, const ivec &origloc) const { ivec iloc = origloc; complex aaack = 1.0; locate_point_in_user_volume(&iloc, &aaack); for (int sn=0;sngv.contains(S.transform(iloc,sn))) return chunks[i]->get_polarization_energy(p, S.transform(iloc,sn)); return 0.0; } double fields_chunk::get_polarization_energy(const polarizability_identifier &pi, const ivec &iloc) const { double res = 0.0; FOR_FIELD_TYPES(ft) { polarization *p = pols[ft]; while (is_mine() && p) { if (p->pb->get_identifier() == pi) res += p->local_energy(iloc); p = p->next; } } return broadcast(n_proc(), res); } double fields_chunk::my_polarization_energy(const polarizability_identifier &pi, const ivec &iloc) const { if (!is_mine()) abort("Can't call my_polarization_energy on someone else's chunk!\n"); double res = 0.0; FOR_FIELD_TYPES(ft) { polarization *p = pols[ft]; while (p) { if (p->pb->get_identifier() == pi) res += p->local_energy(iloc); p = p->next; } } return res; } double fields::get_chi1inv(component c, direction d, const ivec &origloc) const { ivec iloc = origloc; complex aaack = 1.0; locate_point_in_user_volume(&iloc, &aaack); for (int sn=0;sngv.contains(S.transform(iloc,sn))) { signed_direction ds = S.transform(d,sn); return chunks[i]->get_chi1inv(S.transform(c,sn), ds.d, S.transform(iloc,sn)) * (ds.flipped ^ S.transform(component_direction(c),sn).flipped ? -1 : 1); } return 0.0; } double fields_chunk::get_chi1inv(component c, direction d, const ivec &iloc) const { double res = 0.0; if (is_mine()) res = s->chi1inv[c][d] ? s->chi1inv[c][d][gv.index(c, iloc)] : (d == component_direction(c) ? 1.0 : 0); return broadcast(n_proc(), res); } double fields::get_chi1inv(component c, direction d, const vec &loc) const { ivec ilocs[8]; double w[8]; double val[8]; for (int i=0;i<8;i++) val[i] = 0.0; gv.interpolate(c, loc, ilocs, w); for (int argh=0;argh<8&&w[argh];argh++) val[argh] = w[argh]*get_chi1inv(c,d,ilocs[argh]); dumbsort(val); double res = 0.0; for (int i=0;i<8;i++) res += val[i]; return res; } double fields::get_eps(const vec &loc) const { double tr = 0; int nc = 0; FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { tr += get_chi1inv(c, component_direction(c), loc); ++nc; } return nc / tr; } double fields::get_mu(const vec &loc) const { double tr = 0; int nc = 0; FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { tr += get_chi1inv(c, component_direction(c), loc); ++nc; } return nc / tr; } double structure::get_chi1inv(component c, direction d, const ivec &origloc) const { ivec iloc = origloc; for (int sn=0;sngv.contains(S.transform(iloc,sn))) { signed_direction ds = S.transform(d,sn); return chunks[i]->get_chi1inv(S.transform(c,sn), ds.d, S.transform(iloc,sn)) * (ds.flipped ^ S.transform(component_direction(c),sn).flipped ? -1 : 1); } return 0.0; } double structure_chunk::get_chi1inv(component c, direction d, const ivec &iloc) const { double res = 0.0; if (is_mine()) res = chi1inv[c][d] ? chi1inv[c][d][gv.index(c, iloc)] : (d == component_direction(c) ? 1.0 : 0); return broadcast(n_proc(), res); } double structure::get_chi1inv(component c, direction d, const vec &loc) const { ivec ilocs[8]; double w[8]; double val[8]; for (int i=0;i<8;i++) val[i] = 0.0; gv.interpolate(c, loc, ilocs, w); for (int argh=0;argh<8&&w[argh];argh++) val[argh] = w[argh]*get_chi1inv(c,d,ilocs[argh]); dumbsort(val); double res = 0.0; for (int i=0;i<8;i++) res += val[i]; return res; } double structure::get_eps(const vec &loc) const { double tr = 0; int nc = 0; FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { tr += get_chi1inv(c, component_direction(c), loc); ++nc; } return nc / tr; } double structure::get_mu(const vec &loc) const { double tr = 0; int nc = 0; FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { tr += get_chi1inv(c, component_direction(c), loc); ++nc; } return nc / tr; } monitor_point *fields::get_new_point(const vec &loc, monitor_point *the_list) const { monitor_point *p = new monitor_point(); get_point(p, loc); p->next = the_list; return p; } complex monitor_point::get_component(component w) { return f[w]; } double monitor_point::poynting_in_direction(direction d) { direction d1 = cycle_direction(loc.dim, d, 1); direction d2 = cycle_direction(loc.dim, d, 2); // below Ex and Hx are used just to say that we want electric or magnetic component complex E1 = get_component(direction_component(Ex, d1)); complex E2 = get_component(direction_component(Ex, d2)); complex H1 = get_component(direction_component(Hx, d1)); complex H2 = get_component(direction_component(Hx, d2)); return (real(E1)*real(H2) - real(E2)*real(H1)) + (imag(E1)*imag(H2) - imag(E2)*imag(H1)); } double monitor_point::poynting_in_direction(vec dir) { if (dir.dim != loc.dim) abort("poynting_in_direction: dir.dim != loc.dim\n"); dir = dir / abs(dir); double result = 0.0; LOOP_OVER_DIRECTIONS(dir.dim, d) result += dir.in_direction(d) * poynting_in_direction(d); return result; } void monitor_point::fourier_transform(component w, complex **a, complex **f, int *numout, double fmin, double fmax, int maxbands) { int n = 1; monitor_point *p = next; double tmax = t, tmin = t; while (p) { n++; if (p->t > tmax) tmax = p->t; if (p->t < tmin) tmin = p->t; p = p->next; } p = this; complex *d = new complex[n]; for (int i=0;inext) { d[i] = p->get_component(w); } if (fmin > 0.0) { // Get rid of any static fields_chunk! complex mean = 0.0; for (int i=0;i 0.0 || fmax > 0.0) && maxbands > 0) { #else if ((fmin <= 0.0 && fmax <= 0.0) || maxbands <= 0) { maxbands = n; fmin = 0; fmax = (n-1)*(1.0/(tmax-tmin)); } #endif *a = new complex[maxbands]; *f = new complex[maxbands]; *numout = maxbands; delete[] d; for (int i = 0;it; (*a)[i] += p->get_component(w)*complex(cos(inside),sin(inside)); p = p->next; } (*a)[i] /= (tmax-tmin); } #if HAVE_SOME_FFTW } else { *numout = n; *a = new complex[n]; *f = d; fftw_complex *in = (fftw_complex *) d, *out = (fftw_complex *) *a; fftw_plan p; #ifdef HAVE_LIBFFTW3 p = fftw_plan_dft_1d(n, in, out, FFTW_FORWARD, FFTW_ESTIMATE); fftw_execute(p); fftw_destroy_plan(p); #else p = fftw_create_plan(n, FFTW_FORWARD, FFTW_ESTIMATE); fftw_one(p, in, out); fftw_destroy_plan(p); #endif for (int i=0;i 0.5*n/(tmax-tmin)) (*f)[i] -= n/(tmax-tmin); (*a)[i] *= (tmax-tmin)/n; } } #endif } void monitor_point::harminv(component w, complex **a, complex **f, int *numout, double fmin, double fmax, int maxbands) { int n = 1; monitor_point *p = next; double tmax = t, tmin = t; while (p) { n++; if (p->t > tmax) tmax = p->t; if (p->t < tmin) tmin = p->t; p = p->next; } p = this; complex *d = new complex[n]; for (int i=0;inext) { d[i] = p->get_component(w); } *a = new complex[n]; double *f_re = new double[n]; double *f_im = new double[n]; *numout = do_harminv(d, n, (tmax-tmin)/(n-1), fmin, fmax, maxbands, *a, f_re, f_im, NULL); *f = new complex[*numout]; for (int i=0;i<*numout;i++) (*f)[i] = complex(f_re[i],f_im[i]); delete[] f_re; delete[] f_im; delete[] d; } } // namespace meep meep-openmpi-1.1.1/src/casimir.cpp0000644000175200017520000002667711243354533016306 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Functions to speed up Casimir-force calculations using FDTD. It is possible to use the unmodified Meep, but if you do this from Scheme it is rather slow to perform the stress-tensor integration, and also the FFT to compute g(t) is moderately painful in Scheme. Of course, you could just use Meep's C++ interface, but to make it more user-friendly we implement the following functions to speed up a Scheme front-end implementation of the Casimir calculation. */ #include #include #include "meep.hpp" #include "config.h" #if defined(HAVE_LIBFFTW) # include #elif defined(HAVE_LIBFFTW3) # include #endif namespace meep { typedef complex C; /* Return an array of values of the g(t) function, for times [0,T] with steps dt, for a given Casimir conductivity sigma. If there is any additional frequency dependence of the dielectric function, eps_func(omega) should equal eps(omega)/eps(infinity); note that the omega argument will be complex. If Tfft is passed, it is a time (should be > T) giving extra resolution for the Fourier transform. If ft is E_stuff or D_stuff, g(t) is evaluated at n*dt timesteps corresponding to the electric field; if ft is H_stuff or B_stuff we evaluate at (n-0.5)*dt timesteps corresponding to the magnetic field. */ complex *make_casimir_gfunc(double T, double dt, double sigma, field_type ft, complex (*eps_func)(complex omega), double Tfft) { double tshift = (ft == E_stuff || ft == D_stuff) ? 0.0 : -0.5*dt; T += 5 * dt; // allocate a few extra timesteps just in case // set some reasonable defaults if (Tfft <= T) Tfft = T * 100; // * 10 is not enough if (Tfft <= 1000) Tfft = 1000; int Nfft = int(ceil(Tfft / dt)); C *dg = new C[Nfft]; C eps0(1.0,0); for (int i = 0; i < Nfft; ++i) dg[i] = 0; for (int i = 1; i < Nfft/2; ++i) { double xi = 2*pi*i / (Nfft * dt); dg[i] = C(0,-xi) * sqrt(C(1.0, sigma/xi)) * C(1.0, 0.5*sigma/xi); } dg[0] = -sigma; if (eps_func){ eps0 = eps_func(0.0); // != 1 in general for (int i = 1; i < Nfft/2 ; ++i) { double xi = 2*pi*i / (Nfft * dt); dg[i] = dg[i] * eps_func(xi * sqrt(C(1.0, sigma/xi))); } } for (int i = 1; i < Nfft/2; ++i) { double xi = 2*pi*i / (Nfft * dt); dg[i] = dg[i] - (C(sigma, -xi) + 0.5 * eps0 * sqrt(C(0.0, (sigma*sigma*sigma) / xi))); } if (tshift != 0.0){ // time shift: for (int i = 1; i < Nfft/2 ; ++i) { double xi = 2*pi*i / (Nfft * dt); dg[i] = dg[i] * polar(1.0, xi * tshift); } } #if defined(HAVE_LIBFFTW) fftw_plan p; p = fftw_create_plan(Nfft, FFTW_BACKWARD, FFTW_ESTIMATE | FFTW_IN_PLACE); fftw_one(p, reinterpret_cast(dg), NULL); fftw_destroy_plan(p); #elif defined(HAVE_LIBFFTW3) fftw_plan p; p = fftw_plan_dft_1d(Nfft, reinterpret_cast(dg), reinterpret_cast(dg), FFTW_BACKWARD, FFTW_ESTIMATE); fftw_execute(p); fftw_destroy_plan(p); #else abort("make_casimir_g requires some version of FFTW"); #endif int N = int(ceil(T / dt)); C *g = new C[N]; g[0] = 0; double dxi = 1.0 / (Nfft * dt); for (int i = 1; i < N; ++i) { double t = i * dt + tshift; g[i] = 2.0 * (dg[i] * dxi + (C(0.0,1.0) * ((1/(t*t) + sigma/t) / (2*pi) + 0.25 * eps0 * sqrt(sigma*sigma*sigma/(t*pi))))); } delete[] dg; return g; } typedef struct { double kx, ky, kz; double x0, y0, z0; direction xd, yd, zd; complex sum; double dV; } stress_data; /* chunkloop for the low-level loop_in_chunks routine, to do the Casimir stress-tensor integration. We use this rather than fields::integrate because we need to *omit* the 2*pi*r Jacobian factor in cylindrical coordinates (which is cancelled by the delta-function normalization in the overall Casimir expression). */ static void stress_chunkloop(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { (void) ichunk; (void) dV0; (void) dV1; // unused stress_data *d = (stress_data *) data_; complex sum = 0.0; complex ph; double dV = d->dV; ph = shift_phase * S.phase_shift(cgrid, sn); if (!fc->f[cgrid][0]) return; vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; double fre, fim; fre = fc->f[cgrid][0][idx]; fim = fc->f[cgrid][1] ? fc->f[cgrid][1][idx] : 0.0; complex fval = complex(fre, fim) * ph; sum += fval * (cos(d->kx * (loc.in_direction(d->xd) - d->x0)) * cos(d->ky * (loc.in_direction(d->yd) - d->y0)) * cos(d->kz * (loc.in_direction(d->zd) - d->z0)) * IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV)); } d->sum += sum; } // Identical to stress_chunkloop above, except that we use bloch functions // exp(i k x) instead of cosine functions static void stress_chunkloop_bloch(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { (void) ichunk; (void) dV0; (void) dV1; // unused stress_data *d = (stress_data *) data_; complex sum = 0.0; complex ph; double dV = d->dV; ph = shift_phase * S.phase_shift(cgrid, sn); if (!fc->f[cgrid][0]) return; vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; double fre, fim; fre = fc->f[cgrid][0][idx]; fim = fc->f[cgrid][1] ? fc->f[cgrid][1][idx] : 0.0; complex fval = complex(fre, fim) * ph; // coordinate origin is taken to be the center of the unit cell sum += fval * polar(1.0, - d->kx * (loc.in_direction(d->xd) - d->x0) - d->ky * (loc.in_direction(d->yd) - d->y0) - d->kz * (loc.in_direction(d->zd) - d->z0)) * IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV); } d->sum += sum; } complex fields::casimir_stress_dct_integral(direction dforce, direction dsource, double mx, double my, double mz, field_type ft, volume where, bool is_bloch) { direction dnormal = normal_direction(where); direction dcomponent = NO_DIRECTION; // relevant component of field to integrate over double coefficient = 1.0; if (where.dim != gv.dim) abort("invalid dimesionality in casimir_stress_dct_integral"); if (coordinate_mismatch(gv.dim,dforce) || coordinate_mismatch(gv.dim,dsource)) abort("invalid directions in casimir_stress_dct_integral"); if (dnormal == NO_DIRECTION) abort("invalid integration surface in casimir_stress_dct_integral"); if (ft != E_stuff && ft != H_stuff) abort("invalid field type in casimir_stress_dct_integral"); if (dforce != dnormal && dsource != dnormal) return 0.0; else if (dforce != dnormal && dsource == dnormal) { // force-source offdiagonal term dcomponent = dforce; } else if (dforce == dnormal && dsource == dnormal) { // +source-source/2 diagonal term dcomponent = dsource; coefficient = +0.5; } else /* if (dforce == dnormal && dsource != dnormal) */ { // -source-source/2 diagonal term dcomponent = dsource; coefficient = -0.5; } component c = direction_component(first_field_component(ft), dcomponent); stress_data data; data.zd = Z; if (gv.dim == Dcyl) { data.xd = R; data.yd = P; } else { data.xd = X; data.yd = Y; } if (has_direction(gv.dim, data.xd) && where.in_direction(data.xd) > 0) { data.x0 = !is_bloch ? where.in_direction_min(data.xd) : (0.5 * (where.in_direction_min(data.xd) + where.in_direction_max(data.xd))); data.kx = mx * pi / (!is_bloch ? where.in_direction(data.xd) : 1.0); coefficient *= sqrt((mx == 0 || is_bloch ? 1.0 : 2.0) / where.in_direction(data.xd)); } else { data.xd = start_at_direction(gv.dim); // a dir we are guaranteed to have data.x0 = data.kx = 0; // innocuous values: ignore this dir } if (has_direction(gv.dim, data.yd) && where.in_direction(data.yd) > 0) { data.y0 = !is_bloch ? where.in_direction_min(data.yd) : (0.5 * (where.in_direction_min(data.yd) + where.in_direction_max(data.yd))); data.ky = my * pi / (!is_bloch ? where.in_direction(data.yd) : 1.0); coefficient *= sqrt((my == 0 || is_bloch ? 1.0 : 2.0) / where.in_direction(data.yd)); } else { data.yd = start_at_direction(gv.dim); // a dir we are guaranteed to have data.y0 = data.ky = 0; // innocuous values: ignore this dir } if (has_direction(gv.dim, data.zd) && where.in_direction(data.zd) > 0) { data.z0 = !is_bloch ? where.in_direction_min(data.zd) : (0.5 * (where.in_direction_min(data.zd) + where.in_direction_max(data.zd))); data.kz = mz * pi / (!is_bloch ? where.in_direction(data.zd) : 1.0); coefficient *= sqrt((mz == 0 || is_bloch ? 1.0 : 2.0) / where.in_direction(data.zd)); } else { data.zd = start_at_direction(gv.dim); // a dir we are guaranteed to have data.z0 = data.kz = 0; // innocuous values: ignore this dir } coefficient *= (ft==E_stuff ? get_eps(where.center()) : get_mu(where.center())); data.sum = 0.0; data.dV = 1.0; LOOP_OVER_DIRECTIONS(gv.dim, d) if (where.in_direction(d) > 0.0) data.dV *= gv.inva; if (is_bloch) //complex exponentials exp(i m x) loop_in_chunks(stress_chunkloop_bloch, &data, where, c); else //cosine functions for closed surfaces loop_in_chunks(stress_chunkloop, &data, where, c); data.sum = sum_to_all(data.sum); return coefficient * complex(real(data.sum), imag(data.sum)); } /* Similar to make_g above, but now air/metal systems translation-invariant in one direction. In this case, the kz-integral turns into a multiplication by -i/4*w(xi), and we simply solve the (lower-dimensional) kz = 0 system and multiply the the g(t) obtained from this result, rather than the usual g(t). This function has the nice property that we can do the integral analytically. */ complex *make_casimir_gfunc_kz(double T, double dt, double sigma, field_type ft) { double tshift = (ft == E_stuff || ft == D_stuff) ? 0.0 : dt; T += 5 * dt; // allocate a few extra timesteps just in case int N = int(ceil(T / dt)); C *g = new C[N]; for (int i = 1; i < N; ++i) { double t = i * dt + tshift; g[i] = C(0,1.0)/(1.0*pi) * 0.5 * (2.0/(t*t*t) + 3.0*sigma/(2.0*t*t) + sigma*sigma/(2.0*t)); } return g; } } // namespace meep meep-openmpi-1.1.1/src/structure.cpp0000644000175200017520000006723011243145102016673 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" namespace meep { structure::structure() : Courant(0.5), v(D1) // Aaack, this is very hokey. { num_chunks = 0; num_effort_volumes = 0; effort_volumes = NULL; effort = NULL; outdir = "."; S = identity(); a = 1; dt = Courant/a; } typedef structure_chunk *structure_chunk_ptr; structure::structure(const grid_volume &thegv, material_function &eps, const boundary_region &br, const symmetry &s, int num, double Courant, bool use_anisotropic_averaging, double tol, int maxeval) : Courant(Courant), v(D1) // Aaack, this is very hokey. { outdir = "."; if (!br.check_ok(thegv)) abort("invalid boundary absorbers for this grid_volume"); choose_chunkdivision(thegv, num, br, s); set_materials(eps, use_anisotropic_averaging, tol, maxeval); } structure::structure(const grid_volume &thegv, double eps(const vec &), const boundary_region &br, const symmetry &s, int num, double Courant, bool use_anisotropic_averaging, double tol, int maxeval) : Courant(Courant), v(D1) // Aaack, this is very hokey. { outdir = "."; if (!br.check_ok(thegv)) abort("invalid boundary absorbers for this grid_volume"); choose_chunkdivision(thegv, num, br, s); simple_material_function epsilon(eps); set_materials(epsilon, use_anisotropic_averaging, tol, maxeval); } void structure::choose_chunkdivision(const grid_volume &thegv, int desired_num_chunks, const boundary_region &br, const symmetry &s) { user_volume = thegv; if (desired_num_chunks == 0) desired_num_chunks = count_processors(); if (thegv.dim == Dcyl && thegv.get_origin().r() < 0) abort("r < 0 origins are not supported"); gv = thegv; v = gv.surroundings(); S = s; a = gv.a; dt = Courant/a; // First, reduce overall grid_volume gv by symmetries: if (S.multiplicity() > 1) { bool break_this[3]; for (int dd=0;dd<3;dd++) { const direction d = (direction) dd; break_this[dd] = false; for (int n=0;ngv.dim, d) && s->user_volume.has_boundary(side, d) && s->user_volume.num_direction(d) > 1) { switch (kind) { case NOTHING_SPECIAL: break; case PML: s->use_pml(d, side, thickness); break; default: abort("unknown boundary region kind"); } } if (next) next->apply(s); } void boundary_region::apply(const structure *s, structure_chunk *sc) const { if (has_direction(s->gv.dim, d) && s->user_volume.has_boundary(side, d) && s->user_volume.num_direction(d) > 1) { switch (kind) { case NOTHING_SPECIAL: break; case PML: sc->use_pml(d, thickness, s->user_volume.boundary_location(side, d), Rasymptotic, pml_profile, pml_profile_data, pml_profile_integral); break; default: abort("unknown boundary region kind"); } } if (next) next->apply(s, sc); } bool boundary_region::check_ok(const grid_volume &gv) const { double thick[5][2]; FOR_DIRECTIONS(d) FOR_SIDES(s) thick[d][s] = 0; for (const boundary_region *r = this; r; r = r->next) { if (r->kind != NOTHING_SPECIAL && gv.num_direction(r->d) > 1 && has_direction(gv.dim, r->d) && gv.has_boundary(r->side, r->d)) { if (r->thickness < 0 || thick[r->d][r->side] > 0) return false; thick[r->d][r->side] = r->thickness; } } LOOP_OVER_DIRECTIONS(gv.dim,d) if (thick[d][High] + thick[d][Low] > gv.interior().in_direction(d)) return false; return true; } double pml_quadratic_profile(double u, void *d) { (void)d; return u * u; } boundary_region pml(double thickness, direction d, boundary_side side) { return boundary_region(boundary_region::PML, thickness, 1e-15, pml_quadratic_profile, NULL, 1./3., d, side, NULL); } boundary_region pml(double thickness, direction d) { return (pml(thickness, d, Low) + pml(thickness, d, High)); } boundary_region pml(double thickness) { boundary_region r; for (int id = 0; id < 5; ++id) r = r + pml(thickness, (direction) id); return r; } // First check that the chunk volumes do not intersect and that they add // up to the total grid_volume void structure::check_chunks() { grid_volume vol_intersection; for (int i=0; igv.intersect_with(chunks[j]->gv, &vol_intersection)) abort("chunks[%d] intersects with chunks[%d]\n", i, j); // FIXME: should use 'long long' else will fail if grid > 2e9 points int sum = 0; for (int i=0; igv.dim, d) grid_points *= chunks[i]->gv.num_direction(d); sum += grid_points; } int v_grid_points = 1; LOOP_OVER_DIRECTIONS(gv.dim, d) v_grid_points *= gv.num_direction(d); if (sum != v_grid_points) abort("v_grid_points = %d, sum(chunks) = %d\n", v_grid_points, sum); } void structure::add_to_effort_volumes(const grid_volume &new_effort_volume, double extra_effort) { grid_volume *temp_volumes = new grid_volume[(2*number_of_directions(gv.dim)+1)*num_effort_volumes]; double *temp_effort = new double[(2*number_of_directions(gv.dim)+1)*num_effort_volumes]; // Intersect previous mat_volumes with this new_effort_volume int counter = 0; for (int j=0; j 1) { printf("effort_volumes[%d] ", j); effort_volumes[j].print(); printf("new_effort_volume "); new_effort_volume.print(); // NOTE: this may not be a bug if this function is used for // something other than PML. abort("Did not expect num_others > 1 in add_to_effort_volumes\n"); } temp_effort[counter] = extra_effort + effort[j]; temp_volumes[counter] = intersection; counter++; for (int k = 0; kv) { num_chunks = s->num_chunks; outdir = s->outdir; gv = s->gv; S = s->S; user_volume = s->user_volume; chunks = new structure_chunk_ptr[num_chunks]; for (int i=0;ichunks[i]); num_effort_volumes = s->num_effort_volumes; effort_volumes = new grid_volume[num_effort_volumes]; effort = new double[num_effort_volumes]; for (int i=0;ieffort_volumes[i]; effort[i] = s->effort[i]; } a = s->a; Courant = s->Courant; dt = s->dt; } structure::structure(const structure &s) : v(s.v) { num_chunks = s.num_chunks; outdir = s.outdir; gv = s.gv; S = s.S; user_volume = s.user_volume; chunks = new structure_chunk_ptr[num_chunks]; for (int i=0;irefcount-- <= 1) delete chunks[i]; chunks[i] = NULL; // Just to be sure... } delete[] chunks; delete[] effort_volumes; delete[] effort; } /* To save memory, the structure chunks are shared with the fields_chunk objects instead of making a copy. However, to preserve the illusion that the structure and fields are independent objects, we implement copy-on-write semantics. */ void structure::changing_chunks() { // call this whenever chunks are modified for (int i=0; irefcount > 1) { // this chunk is shared, so make a copy chunks[i]->refcount--; chunks[i] = new structure_chunk(chunks[i]); } } void structure::set_materials(material_function &mat, bool use_anisotropic_averaging, double tol, int maxeval) { set_epsilon(mat, use_anisotropic_averaging, tol, maxeval); if (mat.has_mu()) set_mu(mat, use_anisotropic_averaging, tol, maxeval); FOR_D_AND_B(c) if (mat.has_conductivity(c)) set_conductivity(c, mat); FOR_E_AND_H(c) if (mat.has_chi3(c)) set_chi3(c, mat); FOR_E_AND_H(c) if (mat.has_chi2(c)) set_chi2(c, mat); } void structure::set_chi1inv(component c, material_function &eps, bool use_anisotropic_averaging, double tol, int maxeval) { changing_chunks(); for (int i=0;iis_mine()) chunks[i]->set_chi1inv(c, eps, use_anisotropic_averaging, tol, maxeval); } void structure::set_epsilon(material_function &eps, bool use_anisotropic_averaging, double tol, int maxeval) { double tstart = wall_time(); FOR_ELECTRIC_COMPONENTS(c) set_chi1inv(c, eps, use_anisotropic_averaging, tol, maxeval); if (!quiet) master_printf("time for set_epsilon = %g s\n", wall_time() - tstart); } void structure::set_epsilon(double eps(const vec &), bool use_anisotropic_averaging, double tol, int maxeval) { simple_material_function epsilon(eps); set_epsilon(epsilon, use_anisotropic_averaging, tol, maxeval); } void structure::set_mu(material_function &m, bool use_anisotropic_averaging, double tol, int maxeval) { double tstart = wall_time(); FOR_MAGNETIC_COMPONENTS(c) set_chi1inv(c, m, use_anisotropic_averaging, tol, maxeval); if (!quiet) master_printf("time for set_mu = %g s\n", wall_time() - tstart); } void structure::set_mu(double mufunc(const vec &), bool use_anisotropic_averaging, double tol, int maxeval) { simple_material_function mu(mufunc); set_mu(mu, use_anisotropic_averaging, tol, maxeval); } void structure::set_conductivity(component c, material_function &C) { if (!gv.has_field(c)) return; double tstart = wall_time(); changing_chunks(); for (int i=0;iis_mine()) chunks[i]->set_conductivity(c, C); if (!quiet) master_printf("time for set_conductivity = %g s\n", wall_time() - tstart); } void structure::set_conductivity(component c, double Cfunc(const vec &)) { simple_material_function conductivity(Cfunc); set_conductivity(c, conductivity); } void structure::set_chi3(component c, material_function &eps) { if (!gv.has_field(c)) return; changing_chunks(); for (int i=0;iis_mine()) chunks[i]->set_chi3(c, eps); } void structure::set_chi3(material_function &eps) { FOR_ELECTRIC_COMPONENTS(c) set_chi3(c, eps); } void structure::set_chi3(double eps(const vec &)) { simple_material_function epsilon(eps); set_chi3(epsilon); } void structure::set_chi2(component c, material_function &eps) { changing_chunks(); for (int i=0;iis_mine()) chunks[i]->set_chi2(c, eps); } void structure::set_chi2(material_function &eps) { FOR_ELECTRIC_COMPONENTS(c) set_chi2(c, eps); } void structure::set_chi2(double eps(const vec &)) { simple_material_function epsilon(eps); set_chi2(epsilon); } void structure::use_pml(direction d, boundary_side b, double dx) { if (dx <= 0.0) return; grid_volume pml_volume = gv; pml_volume.set_num_direction(d, int(dx*user_volume.a + 1 + 0.5)); //FIXME: exact value? if (b == High) pml_volume.set_origin(d, user_volume.big_corner().in_direction(d) - pml_volume.num_direction(d) * 2); const int v_to_user_shift = (user_volume.little_corner().in_direction(d) - gv.little_corner().in_direction(d)) / 2; if (b == Low && v_to_user_shift != 0) pml_volume.set_num_direction(d, pml_volume.num_direction(d) + v_to_user_shift); add_to_effort_volumes(pml_volume, 0.60); // FIXME: manual value for pml effort } bool structure::has_chi1inv(component c, direction d) const { int i; for (i = 0; i < num_chunks && !chunks[i]->has_chi1inv(c, d); i++) ; return or_to_all(i < num_chunks); } bool structure_chunk::has_chi1inv(component c, direction d) const { return is_mine() && chi1inv[c][d] && !trivial_chi1inv[c][d]; } void structure::mix_with(const structure *oth, double f) { if (num_chunks != oth->num_chunks) abort("You can't phase materials with different chunk topologies...\n"); changing_chunks(); for (int i=0;iis_mine()) chunks[i]->mix_with(oth->chunks[i], f); } structure_chunk::~structure_chunk() { FOR_COMPONENTS(c) { FOR_DIRECTIONS(d) { delete[] chi1inv[c][d]; delete[] conductivity[c][d]; delete[] condinv[c][d]; } delete[] chi2[c]; delete[] chi3[c]; } FOR_DIRECTIONS(d) { delete[] sig[d]; delete[] siginv[d]; } if (pb) delete pb; } void structure_chunk::mix_with(const structure_chunk *n, double f) { FOR_COMPONENTS(c) FOR_DIRECTIONS(d) { if (!chi1inv[c][d] && n->chi1inv[c][d]) { chi1inv[c][d] = new realnum[gv.ntot()]; trivial_chi1inv[c][d] = n->trivial_chi1inv[c][d]; if (component_direction(c) == d) // diagonal components = 1 by default for (int i=0;iconductivity[c][d]) { conductivity[c][d] = new realnum[gv.ntot()]; for (int i=0;itrivial_chi1inv[c][d]; if (n->chi1inv[c][d]) for (int i=0;ichi1inv[c][d][i] - chi1inv[c][d][i]); else { double nval = component_direction(c) == d ? 1.0 : 0.0; // default for (int i=0;iconductivity[c][d]) for (int i=0;iconductivity[c][d][i] - conductivity[c][d][i]); else for (int i=0;ipb; while (po && pn) { FOR_COMPONENTS(c) if (po->s[c] && pn->s[c]) for (int i=0;is[c][i] += f*(pn->s[c][i] - po->s[c][i]); po->gamma += f*(pn->gamma - po->gamma); po->omeganot += f*(pn->omeganot - po->omeganot); po = po->next; pn = pn->next; } } static inline double pml_x(int i, double dx, double bloc, double a) { double here = i * 0.5/a; return (0.5/a*((int)(dx*(2*a)+0.5) - (int)(fabs(bloc-here)*(2*a)+0.5))); } void structure_chunk::use_pml(direction d, double dx, double bloc, double Rasymptotic, pml_profile_func pml_profile, void *pml_profile_data, double pml_profile_integral) { if (dx <= 0.0) return; const double prefac = (-log(Rasymptotic))/(4*dx*pml_profile_integral); // Don't bother with PML if we don't even overlap with the PML region // ...note that we should calculate overlap in exactly the same // way that "x > 0" is computed below. bool found_pml = false; for (int i=gv.little_corner().in_direction(d); i<=gv.big_corner().in_direction(d)+1;++i) if (pml_x(i, dx, bloc, a) > 0) { found_pml = true; break; } if (!found_pml) return; if (is_mine()) { if (sig[d]) { delete[] sig[d]; delete[] siginv[d]; sig[d] = NULL; siginv[d] = NULL; } LOOP_OVER_FIELD_DIRECTIONS(gv.dim, dd) { if (!sig[dd]) { int spml = (dd==d)?(2*gv.num_direction(d)+2):1; sigsize[dd] = spml; sig[dd] = new double[spml]; siginv[dd] = new double[spml]; for (int i=0;i 0) { sig[d][idx]=0.5*dt*prefac*pml_profile(x/dx, pml_profile_data); siginv[d][idx] = 1/(1+sig[d][idx]); } } } condinv_stale = true; } void structure_chunk::update_condinv() { if (!condinv_stale || !is_mine()) return; FOR_COMPONENTS(c) { direction d = component_direction(c); if (conductivity[c][d]) { if (!condinv[c][d]) condinv[c][d] = new realnum[gv.ntot()]; LOOP_OVER_VOL(gv, c, i) condinv[c][d][i] = 1 / (1 + conductivity[c][d][i] * dt * 0.5); } else if (condinv[c][d]) { // condinv not needed delete[] condinv[c][d]; condinv[c][d] = NULL; } } condinv_stale = false; } structure_chunk::structure_chunk(const structure_chunk *o) : v(o->v) { refcount = 1; if (o->pb) pb = new polarizability(o->pb); else pb = NULL; a = o->a; Courant = o->Courant; dt = o->dt; gv = o->gv; the_proc = o->the_proc; the_is_mine = my_rank() == n_proc(); FOR_COMPONENTS(c) { if (is_mine() && o->chi3[c]) { chi3[c] = new realnum[gv.ntot()]; if (chi3[c] == NULL) abort("Out of memory!\n"); for (int i=0;ichi3[c][i]; } else { chi3[c] = NULL; } if (is_mine() && o->chi2[c]) { chi2[c] = new realnum[gv.ntot()]; if (chi2[c] == NULL) abort("Out of memory!\n"); for (int i=0;ichi2[c][i]; } else { chi2[c] = NULL; } } FOR_COMPONENTS(c) FOR_DIRECTIONS(d) trivial_chi1inv[c][d] = true; FOR_COMPONENTS(c) FOR_DIRECTIONS(d) if (is_mine()) { trivial_chi1inv[c][d] = o->trivial_chi1inv[c][d]; if (o->chi1inv[c][d]) { chi1inv[c][d] = new realnum[gv.ntot()]; memcpy(chi1inv[c][d], o->chi1inv[c][d], gv.ntot()*sizeof(realnum)); } else chi1inv[c][d] = NULL; if (o->conductivity[c][d]) { conductivity[c][d] = new realnum[gv.ntot()]; memcpy(conductivity[c][d], o->conductivity[c][d], gv.ntot()*sizeof(realnum)); condinv[c][d] = new realnum[gv.ntot()]; memcpy(condinv[c][d], o->condinv[c][d], gv.ntot()*sizeof(realnum)); } else conductivity[c][d] = condinv[c][d] = NULL; } condinv_stale = o->condinv_stale; // Allocate the PML conductivity arrays: FOR_DIRECTIONS(d) { sig[d] = NULL; siginv[d] = NULL; sigsize[d] = 0; } for (int i=0;i<5;++i) sigsize[i] = 0; // Copy over the PML conductivity arrays: if (is_mine()) FOR_DIRECTIONS(d) if (o->sig[d]) { sig[d] = new double[2*gv.num_direction(d)+1]; siginv[d] = new double[2*gv.num_direction(d)+1]; sigsize[d] = o->sigsize[d]; for (int i=0;i<2*gv.num_direction(d)+1;i++) { sig[d][i] = o->sig[d][i]; siginv[d][i] = o->sig[d][i]; } } } void structure_chunk::set_chi3(component c, material_function &epsilon) { if (!is_mine() || !gv.has_field(c)) return; if (!is_electric(c) && !is_magnetic(c)) abort("only E or H can have chi3"); epsilon.set_volume(gv.pad().surroundings()); if (!chi1inv[c][component_direction(c)]) { // require chi1 if we have chi3 chi1inv[c][component_direction(c)] = new realnum[gv.ntot()]; for (int i = 0; i < gv.ntot(); ++i) chi1inv[c][component_direction(c)][i] = 1.0; } if (!chi3[c]) chi3[c] = new realnum[gv.ntot()]; bool trivial = true; LOOP_OVER_VOL(gv, c, i) { IVEC_LOOP_LOC(gv, here); chi3[c][i] = epsilon.chi3(c, here); trivial = trivial && (chi3[c][i] == 0.0); } /* currently, our update_e_from_d routine requires that chi2 be present if chi3 is, and vice versa */ if (!chi2[c]) { if (!trivial) { chi2[c] = new realnum[gv.ntot()]; memset(chi2[c], 0, gv.ntot() * sizeof(realnum)); // chi2 = 0 } else { // no chi3, and chi2 is trivial (== 0), so delete delete[] chi3[c]; chi3[c] = NULL; } } } void structure_chunk::set_chi2(component c, material_function &epsilon) { if (!is_mine() || !gv.has_field(c)) return; if (!is_electric(c) && !is_magnetic(c)) abort("only E or H can have chi2"); epsilon.set_volume(gv.pad().surroundings()); if (!chi1inv[c][component_direction(c)]) { // require chi1 if we have chi2 chi1inv[c][component_direction(c)] = new realnum[gv.ntot()]; for (int i = 0; i < gv.ntot(); ++i) chi1inv[c][component_direction(c)][i] = 1.0; } if (!chi2[c]) chi2[c] = new realnum[gv.ntot()]; bool trivial = true; LOOP_OVER_VOL(gv, c, i) { IVEC_LOOP_LOC(gv, here); chi2[c][i] = epsilon.chi2(c, here); trivial = trivial && (chi2[c][i] == 0.0); } /* currently, our update_e_from_d routine requires that chi3 be present if chi2 is, and vice versa */ if (!chi3[c]) { if (!trivial) { chi3[c] = new realnum[gv.ntot()]; memset(chi3[c], 0, gv.ntot() * sizeof(realnum)); // chi3 = 0 } else { // no chi2, and chi3 is trivial (== 0), so delete delete[] chi2[c]; chi2[c] = NULL; } } } void structure_chunk::set_conductivity(component c, material_function &C) { if (!is_mine() || !gv.has_field(c)) return; C.set_volume(gv.pad().surroundings()); if (!is_electric(c) && !is_magnetic(c) && !is_D(c) && !is_B(c)) abort("invalid component for conductivity"); direction c_d = component_direction(c); component c_C = is_electric(c) ? direction_component(Dx, c_d) : (is_magnetic(c) ? direction_component(Bx, c_d) : c); realnum *multby = is_electric(c) || is_magnetic(c) ? chi1inv[c][c_d] : 0; if (!conductivity[c_C][c_d]) conductivity[c_C][c_d] = new realnum[gv.ntot()]; if (!conductivity[c_C][c_d]) abort("Memory allocation error.\n"); bool trivial = true; realnum *cnd = conductivity[c_C][c_d]; if (multby) { LOOP_OVER_VOL(gv, c_C, i) { IVEC_LOOP_LOC(gv, here); cnd[i] = C.conductivity(c, here) * multby[i]; trivial = trivial && (cnd[i] == 0.0); } } else { LOOP_OVER_VOL(gv, c_C, i) { IVEC_LOOP_LOC(gv, here); cnd[i] = C.conductivity(c, here); trivial = trivial && (cnd[i] == 0.0); } } if (trivial) { // skip conductivity computations if conductivity == 0 delete[] conductivity[c_C][c_d]; conductivity[c_C][c_d] = NULL; } condinv_stale = true; } structure_chunk::structure_chunk(const grid_volume &thegv, const volume &vol_limit, double Courant, int pr) : Courant(Courant), v(thegv.surroundings() & vol_limit) { refcount = 1; pml_fmin = 0.2; pb = NULL; gv = thegv; a = thegv.a; dt = Courant/a; the_proc = pr; the_is_mine = n_proc() == my_rank(); // initialize materials arrays to NULL FOR_COMPONENTS(c) chi3[c] = NULL; FOR_COMPONENTS(c) chi2[c] = NULL; FOR_COMPONENTS(c) FOR_DIRECTIONS(d) { trivial_chi1inv[c][d] = true; chi1inv[c][d] = NULL; conductivity[c][d] = NULL; condinv[c][d] = NULL; } condinv_stale = false; FOR_DIRECTIONS(d) { sig[d] = NULL; siginv[d] = NULL; sigsize[d] = 0; } } double structure::max_eps() const { double themax = 0.0; for (int i=0;iis_mine()) themax = max(themax,chunks[i]->max_eps()); return max_to_all(themax); } double fields::max_eps() const { double themax = 0.0; for (int i=0;iis_mine()) themax = max(themax,chunks[i]->s->max_eps()); return max_to_all(themax); } double structure_chunk::max_eps() const { double themax = 0.0; FOR_COMPONENTS(c) { direction d = component_direction(c); if (chi1inv[c][d]) for (int i=0;ia != s.chunks[i]->a || chunks[i]->v != s.chunks[i]->v) return false; return true; } void structure_chunk::remove_polarizabilities() { delete pb; pb = NULL; } void structure::remove_polarizabilities() { changing_chunks(); for (int i=0;iremove_polarizabilities(); } // for debugging, display the chunk layout void structure::print_layout(void) const { direction d0 = gv.yucky_direction(0); direction d1 = gv.yucky_direction(1); direction d2 = gv.yucky_direction(2); for (int i = 0; i < num_chunks; ++i) { master_printf("chunk[%d] on process %d, resolution %g (%s,%s,%s):" " (%d,%d,%d) - (%d,%d,%d)\n", i, chunks[i]->n_proc(), chunks[i]->a, direction_name(d0),direction_name(d1),direction_name(d2), chunks[i]->gv.little_corner().yucky_val(0), chunks[i]->gv.little_corner().yucky_val(1), chunks[i]->gv.little_corner().yucky_val(2), chunks[i]->gv.big_corner().yucky_val(0), chunks[i]->gv.big_corner().yucky_val(1), chunks[i]->gv.big_corner().yucky_val(2)); } } } // namespace meep meep-openmpi-1.1.1/src/bicgstab.hpp0000644000175200017520000000241111243101206016401 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef BICGSTAB_H #define BICGSTAB_H #include "meep.hpp" namespace meep { typedef void (*bicgstab_op)(const realnum *x, realnum *y, void *data); int bicgstabL(const int L, const int n, realnum *x, bicgstab_op A, void *Adata, const realnum *b, const double tol, int *iters, // input *iters = max iters, output = actual iters realnum *work, // if you pass work=NULL, bicgstab returns nwork const bool quiet); } // namespace meep #endif /* BICGSTAB_H */ meep-openmpi-1.1.1/src/mpb.cpp0000644000175200017520000002472411243101206015407 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include "meep.hpp" #include "config.h" #ifdef HAVE_MPB # include # ifndef SCALAR_COMPLEX # error Meep requires complex version of MPB # endif #endif namespace meep { #ifdef HAVE_MPB typedef struct { const double *s, *o; ndim dim; const fields *f; } meep_mpb_eps_data; static void meep_mpb_eps(symmetric_matrix *eps, symmetric_matrix *eps_inv, const mpb_real r[3], void *eps_data_) { meep_mpb_eps_data *eps_data = (meep_mpb_eps_data *) eps_data_; const double *s = eps_data->s; const double *o = eps_data->o; vec p(eps_data->dim == D3 ? vec(o[0] + r[0] * s[0], o[1] + r[1] * s[1], o[1] + r[1] * s[1]) : (eps_data->dim == D2 ? vec(o[0] + r[0] * s[0], o[1] + r[1] * s[1]) : /* D1 */ vec(o[2] + r[2] * s[2]))); const fields *f = eps_data->f; eps_inv->m00 = f->get_chi1inv(Ex, X, p); eps_inv->m11 = f->get_chi1inv(Ey, Y, p); eps_inv->m22 = f->get_chi1inv(Ez, Z, p); // master_printf("eps_zz(%g,%g) = %g\n", p.x(), p.y(), 1/eps_inv->m00); ASSIGN_ESCALAR(eps_inv->m01, f->get_chi1inv(Ex, Y, p), 0); ASSIGN_ESCALAR(eps_inv->m02, f->get_chi1inv(Ex, Z, p), 0); ASSIGN_ESCALAR(eps_inv->m12, f->get_chi1inv(Ey, Z, p), 0); maxwell_sym_matrix_invert(eps, eps_inv); } static const complex *meep_mpb_A_data = 0; static const int *meep_mpb_A_n = 0; static const double *meep_mpb_A_s = 0; static component foo_component = Ez; static int meep_mpb_A_component = 0; static vec meep_mpb_A_center; static complex one(const vec &pt) {(void) pt; return 1.0;} static complex (*meep_mpb_A_A)(const vec &) = 0; static complex meep_mpb_A(const vec &p) { const complex *data = meep_mpb_A_data + meep_mpb_A_component; int nx = meep_mpb_A_n[0]; int ny = meep_mpb_A_n[1]; int nz = meep_mpb_A_n[2]; const double *s = meep_mpb_A_s; double r[3] = {0,0,0}; vec p0(p - meep_mpb_A_center); LOOP_OVER_DIRECTIONS(p.dim, d) r[d%3] = p0.in_direction(d) / s[d%3] + 0.5; double rx = r[0], ry = r[1], rz = r[2]; /* linearly interpolate the amplitude from MPB at point p */ int x, y, z, x2, y2, z2; double dx, dy, dz; /* get the point corresponding to r in the epsilon array grid: */ x = int(rx * nx); y = int(ry * ny); z = int(rz * nz); /* get the difference between (x,y,z) and the actual point */ dx = rx * nx - x; dy = ry * ny - y; dz = rz * nz - z; /* get the other closest point in the grid, with periodic boundaries: */ x2 = (nx + (dx >= 0.0 ? x + 1 : x - 1)) % nx; y2 = (ny + (dy >= 0.0 ? y + 1 : y - 1)) % ny; z2 = (nz + (dz >= 0.0 ? z + 1 : z - 1)) % nz; /* take abs(d{xyz}) to get weights for {xyz} and {xyz}2: */ dx = fabs(dx); dy = fabs(dy); dz = fabs(dz); /* define a macro to give us data(x,y,z) on the grid, in row-major order (the order used by MPB): */ #define D(x,y,z) (data[(((x)*ny + (y))*nz + (z)) * 3]) complex ret; ret = (((D(x,y,z)*(1.0-dx) + D(x2,y,z)*dx) * (1.0-dy) + (D(x,y2,z)*(1.0-dx) + D(x2,y2,z)*dx) * dy) * (1.0-dz) + ((D(x,y,z2)*(1.0-dx) + D(x2,y,z2)*dx) * (1.0-dy) + (D(x,y2,z2)*(1.0-dx) + D(x2,y2,z2)*dx) * dy) * dz); #undef D // master_printf("A_%s(%g,%g) = %g%+gi\n", component_name(foo_component), p.x(), p.y(), real(ret), imag(ret)); return (complex(double(real(ret)), double(imag(ret))) * meep_mpb_A_A(p)); } #endif /* HAVE_MPB */ void fields::add_eigenmode_source(component c0, const src_time &src, const volume &where, const volume &eig_vol, int band_num, const vec &kpoint, int parity, double resolution, double eigensolver_tol, complex amp, complex A(const vec &)) { #ifdef HAVE_MPB if (resolution <= 0) resolution = 2 * gv.a; // default to twice resolution int n[3], local_N, N_start, alloc_N, mesh_size[3] = {1,1,1}; mpb_real k[3] = {0,0,0}; double s[3] = {0,0,0}, o[3] = {0,0,0}; mpb_real R[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; mpb_real G[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; if (!eig_vol.contains(where)) abort("invalid grid_volume in add_eigenmode_source (WHERE must be in EIG_VOL)"); switch (gv.dim) { case D3: o[0] = eig_vol.in_direction_min(X); o[1] = eig_vol.in_direction_min(Y); o[2] = eig_vol.in_direction_min(Z); s[0] = eig_vol.in_direction(X); s[1] = eig_vol.in_direction(Y); s[2] = eig_vol.in_direction(Z); k[0] = kpoint.in_direction(X); k[1] = kpoint.in_direction(Y); k[2] = kpoint.in_direction(Z); break; case D2: o[0] = eig_vol.in_direction_min(X); o[1] = eig_vol.in_direction_min(Y); s[0] = eig_vol.in_direction(X); s[1] = eig_vol.in_direction(Y); k[0] = kpoint.in_direction(X); k[1] = kpoint.in_direction(Y); break; case D1: o[2] = eig_vol.in_direction_min(Z); s[2] = eig_vol.in_direction(Z); k[2] = kpoint.in_direction(Z); break; default: abort("unsupported dimensionality in add_mpb_source"); } for (int i = 0; i < 3; ++i) { n[i] = int(resolution * s[i] + 0.5); if (n[i] == 0) n[i] = 1; R[i][i] = s[i] = s[i] == 0 ? 1 : s[i]; G[i][i] = 1 / R[i][i]; // recip. latt. vectors / 2 pi } maxwell_data *mdata = create_maxwell_data(n[0], n[1], n[2], &local_N, &N_start, &alloc_N, band_num, band_num); if (local_N != n[0] * n[1] * n[2]) abort("MPI version of MPB library not supported"); set_maxwell_data_parity(mdata, parity); update_maxwell_data_k(mdata, k, G[0], G[1], G[2]); if (k[0] == 0 && k[1] == 0 && k[2] == 0) { evectmatrix H; H.p = band_num; H.c = 2; band_num -= maxwell_zero_k_num_const_bands(H, mdata); if (band_num == 0) abort("zero-frequency bands at k=0 are ill-defined"); } meep_mpb_eps_data eps_data; eps_data.s = s; eps_data.o = o; eps_data.dim = gv.dim; eps_data.f = this; set_maxwell_dielectric(mdata, mesh_size, R, G, meep_mpb_eps,NULL, &eps_data); if (check_maxwell_dielectric(mdata, 0)) abort("invalid dielectric function for MPB"); evectmatrix H = create_evectmatrix(n[0] * n[1] * n[2], 2, band_num, local_N, N_start, alloc_N); for (int i = 0; i < H.n * H.p; ++i) { ASSIGN_SCALAR(H.data[i], rand() * 1.0/RAND_MAX, rand() * 1.0/RAND_MAX); } mpb_real *eigvals = new mpb_real[band_num]; int num_iters; evectmatrix W[3]; for (int i = 0; i < 3; ++i) W[i] = create_evectmatrix(n[0] * n[1] * n[2], 2, band_num, local_N, N_start, alloc_N); evectconstraint_chain *constraints = NULL; constraints = evect_add_constraint(constraints, maxwell_parity_constraint, (void *) mdata); if (k[0] == 0 && k[1] == 0 && k[2] == 0) constraints = evect_add_constraint(constraints, maxwell_zero_k_constraint, (void *) mdata); eigensolver(H, eigvals, maxwell_operator, (void *) mdata, maxwell_preconditioner2, (void *) mdata, evectconstraint_chain_func, (void *) constraints, W, 3, eigensolver_tol, &num_iters, EIGS_DEFAULT_FLAGS | (am_master() && !quiet ? EIGS_VERBOSE : 0)); if (!quiet) master_printf("MPB solved for omega_%d(%g,%g,%g) = %g after %d iters\n", band_num, k[0],k[1],k[2], eigvals[band_num-1], num_iters); evect_destroy_constraints(constraints); for (int i = 0; i < 3; ++i) destroy_evectmatrix(W[i]); src_time *src_mpb = src.clone(); src_mpb->set_frequency(sqrt(eigvals[band_num - 1])); complex *cdata = (complex *) mdata->fft_data; meep_mpb_A_s = s; meep_mpb_A_n = n; meep_mpb_A_data = cdata; meep_mpb_A_center = eig_vol.center() - where.center(); meep_mpb_A_A = A ? A : one; maxwell_compute_h_from_H(mdata, H, (scalar_complex*)cdata, band_num - 1, 1); /* choose deterministic phase, maximizing power in real part; see fix_field_phase routine in MPB.*/ { int i, N = mdata->fft_output_size * 3; double sq_sum0 = 0, sq_sum1 = 0, maxabs = 0.0; double theta; for (i = 0; i < N; ++i) { double a = real(cdata[i]), b = imag(cdata[i]); sq_sum0 += a*a - b*b; sq_sum1 += 2*a*b; } theta = 0.5 * atan2(-sq_sum1, sq_sum0); complex phase(cos(theta), sin(theta)); for (i = 0; i < N; ++i) { double r = fabs(real(cdata[i] * phase)); if (r > maxabs) maxabs = r; } for (i = N-1; i >= 0 && fabs(real(cdata[i] * phase)) < 0.5 * maxabs; --i) ; if (real(cdata[i] * phase) < 0) phase = -phase; for (i = 0; i < N; ++i) cdata[i] *= phase; complex *hdata = (complex *) H.data; for (i = 0; i < H.n; ++i) hdata[i*H.p + (band_num-1)] *= phase; } if (is_D(c0)) c0 = direction_component(Ex, component_direction(c0)); if (is_B(c0)) c0 = direction_component(Hx, component_direction(c0)); FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c) && (c0 == Centered || c0 == c) && (gv.dim != D2 || !(parity & (EVEN_Z_PARITY | ODD_Z_PARITY)) || ((parity & EVEN_Z_PARITY) && !is_tm(c)) || ((parity & ODD_Z_PARITY) && is_tm(c)))) { foo_component = c; meep_mpb_A_component = component_direction(c) % 3; add_volume_source(c, *src_mpb, where, meep_mpb_A, amp); } maxwell_compute_d_from_H(mdata, H, (scalar_complex*)cdata, band_num - 1, 1); maxwell_compute_e_from_d(mdata, (scalar_complex*)cdata, 1); FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c) && (c0 == Centered || c0 == c) && (gv.dim != D2 || !(parity & (EVEN_Z_PARITY | ODD_Z_PARITY)) || ((parity & EVEN_Z_PARITY) && !is_tm(c)) || ((parity & ODD_Z_PARITY) && is_tm(c)))) { foo_component = c; meep_mpb_A_component = component_direction(c) % 3; add_volume_source(c, *src_mpb, where, meep_mpb_A, amp); } delete src_mpb; destroy_evectmatrix(H); delete[] eigvals; destroy_maxwell_data(mdata); #else /* !defined(HAVE_MPB) */ abort("Meep must be configured/compiled with MPB for add_mpb_source"); #endif } } // namespace meep meep-openmpi-1.1.1/src/control_c.cpp0000644000175200017520000000272711243101206016612 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" namespace meep { int interrupt = 0; static int kill_time = 2; static void handle_control_c(int i) { (void) i; // unused: should equal SIGINT interrupt++; if (interrupt >= kill_time) { abort("interrupted"); } else if (interrupt + 1 == kill_time) { printf("Be patient... hit ctrl-C one more time to kill me.\n"); } else { printf("Be patient... hit ctrl-C %d more times to kill me.\n", kill_time - interrupt); } } void deal_with_ctrl_c(int stop_now) { kill_time = stop_now; if (signal(SIGINT, handle_control_c) == SIG_IGN) signal(SIGINT, SIG_IGN); // ignore if parent process was ignoring } } // namespace meep meep-openmpi-1.1.1/src/sources.cpp0000644000175200017520000002534311243101206016312 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" namespace meep { /*********************************************************************/ // this function is necessary to make equality commutative ... ugh bool src_times_equal(const src_time &t1, const src_time &t2) { return t1.is_equal(t2) && t2.is_equal(t1); } src_time *src_time::add_to(src_time *others, src_time **added) const { if (others) { if (src_times_equal(*this, *others)) *added = others; else others->next = add_to(others->next, added); return others; } else { src_time *t = clone(); t->next = others; *added = t; return t; } } double src_time::last_time_max(double after) { after = max(last_time(), after); if (next) return next->last_time_max(after); else return after; } gaussian_src_time::gaussian_src_time(double f, double fwidth, double s) { freq = f; width = 1.0 / fwidth; peak_time = width * s; cutoff = width * s * 2; // this is to make last_source_time as small as possible while (exp(-cutoff*cutoff / (2*width*width)) < 1e-100) cutoff *= 0.9; cutoff = float(cutoff); // don't make cutoff sensitive to roundoff error } gaussian_src_time::gaussian_src_time(double f, double w, double st, double et) { freq = f; width = w; peak_time = 0.5 * (st + et); cutoff = (et - st) * 0.5; // this is to make last_source_time as small as possible while (exp(-cutoff*cutoff / (2*width*width)) < 1e-100) cutoff *= 0.9; cutoff = float(cutoff); // don't make cutoff sensitive to roundoff error } complex gaussian_src_time::dipole(double time) const { double tt = time - peak_time; if (float(fabs(tt)) > cutoff) return 0.0; // correction factor so that current amplitude (= d(dipole)/dt) is // ~ 1 near the peak of the Gaussian. complex amp = 1.0 / complex(0,-2*pi*freq); return exp(-tt*tt / (2*width*width)) * polar(1.0, -2*pi*freq*tt) * amp; } bool gaussian_src_time::is_equal(const src_time &t) const { const gaussian_src_time *tp = dynamic_cast(&t); if (tp) return(tp->freq == freq && tp->width == width && tp->peak_time == peak_time && tp->cutoff == cutoff); else return 0; } complex continuous_src_time::dipole(double time) const { float rtime = float(time); if (rtime < start_time || rtime > end_time) return 0.0; // correction factor so that current amplitude (= d(dipole)/dt) is 1. complex amp = 1.0 / (complex(0,-1.0) * (2*pi)*freq); if (width == 0.0) return exp(complex(0,-1.0) * (2*pi)*freq*time) * amp; else { double ts = (time - start_time) / width - slowness; double te = (end_time - time) / width - slowness; return exp(complex(0,-1.0) * (2*pi)*freq*time) * amp * (1.0 + tanh(ts)) // goes from 0 to 2 * (1.0 + tanh(te)) // goes from 2 to 0 * 0.25; } } bool continuous_src_time::is_equal(const src_time &t) const { const continuous_src_time *tp = dynamic_cast(&t); if (tp) return(tp->freq == freq && tp->width == width && tp->start_time == start_time && tp->end_time == end_time && tp->slowness == slowness); else return 0; } bool custom_src_time::is_equal(const src_time &t) const { const custom_src_time *tp = dynamic_cast(&t); if (tp) return(tp->start_time == start_time && tp->end_time == end_time && tp->func == func && tp->data == data); else return 0; } /*********************************************************************/ src_vol::src_vol(component cc, src_time *st, int n, int *ind, complex *amps) { c = cc; if (is_D(c)) c = direction_component(Ex, component_direction(c)); if (is_B(c)) c = direction_component(Hx, component_direction(c)); t = st; next = NULL; npts = n; index = ind; A = amps; } src_vol::src_vol(const src_vol &sv) { c = sv.c; t = sv.t; npts = sv.npts; index = new int[npts]; A = new complex[npts]; for (int j=0; jnpts) abort("Cannot add grid_volume sources with different number of points\n"); /* Compare all of the indices...if this ever becomes too slow, we can just compare the first and last indices. */ for (int j=0; jindex[j] != index[j]) abort("Different indices\n"); others->A[j] += A[j]; } } else others->next = add_to(others->next); return others; } else { next = others; return this; } } /*********************************************************************/ // THIS VARIANT IS FOR BACKWARDS COMPATIBILITY, and is DEPRECATED: void fields::add_point_source(component c, double freq, double width, double peaktime, double cutoff, const vec &p, complex amp, int is_c) { width /= freq; if (is_c) { // TODO: don't ignore peaktime? continuous_src_time src(freq, width, time(), infinity, cutoff); if (is_magnetic(c)) src.is_integrated = false; add_point_source(c, src, p, amp); } else { cutoff = gv.inva + cutoff * width; if (peaktime <= 0.0) peaktime = time() + cutoff; // backward compatibility (slight phase shift in old Meep version) peaktime += is_magnetic(c) ? -dt*0.5 : dt; gaussian_src_time src(freq, width, peaktime - cutoff, peaktime + cutoff); if (is_magnetic(c)) src.is_integrated = false; add_point_source(c, src, p, amp); } } void fields::add_point_source(component c, const src_time &src, const vec &p, complex amp) { add_volume_source(c, src, volume(p, p), amp); } static complex one(const vec &pt) {(void) pt; return 1.0;} void fields::add_volume_source(component c, const src_time &src, const volume &where, complex amp) { add_volume_source(c, src, where, one, amp); } struct src_vol_chunkloop_data { complex (*A)(const vec &); complex amp; src_time *src; vec center; }; /* Adding source volumes can be treated as a kind of "integration" problem, since we need to loop over all the chunks that intersect the source grid_volume, with appropriate interpolation weights at the boundaries so that the integral of the current is fixed regardless of resolution. Unlike most uses of fields::loop_in_chunks, however, we set use_symmetry=false: we only find the intersection of the grid_volume with the untransformed chunks (since the transformed versions are implicit). */ static void src_vol_chunkloop(fields_chunk *fc, int ichunk, component c, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { src_vol_chunkloop_data *data = (src_vol_chunkloop_data *) data_; (void) S; (void) sn; // these should be the identity (void) dV0; (void) dV1; // grid_volume weighting is included in data->amp (void) ichunk; int npts = 1; LOOP_OVER_DIRECTIONS(is.dim, d) npts *= (ie.in_direction(d) - is.in_direction(d)) / 2 + 1; int *index_array = new int[npts]; complex *amps_array = new complex[npts]; complex amp = data->amp * conj(shift_phase); direction cd = component_direction(c); double inva = fc->gv.inva; int idx_vol = 0; LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc += shift * (0.5*inva) - data->center; amps_array[idx_vol] = IVEC_LOOP_WEIGHT(s0,s1,e0,e1,1) * amp * data->A(loc); /* for "D" sources, multiply by epsilon. FIXME: this is not quite right because it doesn't handle non-diagonal chi1inv! similarly, for "B" sources, multiply by mu. */ if (is_D(c) && fc->s->chi1inv[c-Dx+Ex][cd]) amps_array[idx_vol] /= fc->s->chi1inv[c-Dx+Ex][cd][idx]; if (is_B(c) && fc->s->chi1inv[c-Bx+Hx][cd]) amps_array[idx_vol] /= fc->s->chi1inv[c-Bx+Hx][cd][idx]; index_array[idx_vol++] = idx; } if (idx_vol != npts) abort("add_volume_source: computed wrong npts (%d vs. %d)", npts, idx_vol); src_vol *tmp = new src_vol(c, data->src, npts, index_array, amps_array); field_type ft = is_magnetic(c) ? B_stuff : D_stuff; fc->sources[ft] = tmp->add_to(fc->sources[ft]); } void fields::add_volume_source(component c, const src_time &src, const volume &where_, complex A(const vec &), complex amp) { volume where(where_); // make a copy to adjust size if necessary if (gv.dim != where.dim) abort("incorrect source grid_volume dimensionality in add_volume_source"); LOOP_OVER_DIRECTIONS(gv.dim, d) { double w = user_volume.boundary_location(High, d) - user_volume.boundary_location(Low, d); if (where.in_direction(d) > w + gv.inva) abort("Source width > cell width in %s direction!\n", direction_name(d)); else if (where.in_direction(d) > w) { // difference is less than 1 pixel double dw = where.in_direction(d) - w; where.set_direction_min(d, where.in_direction_min(d) - dw * 0.5); where.set_direction_max(d, where.in_direction_min(d) + w); } } src_vol_chunkloop_data data; data.A = A ? A : one; data.amp = amp; LOOP_OVER_DIRECTIONS(gv.dim, d) if (where.in_direction(d) == 0.0 && !nosize_direction(d)) // delta-fun data.amp *= gv.a; // correct units for J delta-function amplitude sources = src.add_to(sources, &data.src); data.center = (where.get_min_corner() + where.get_max_corner()) * 0.5; loop_in_chunks(src_vol_chunkloop, (void *) &data, where, c, false); require_component(c); } } // namespace meep meep-openmpi-1.1.1/src/integrate2.cpp0000644000175200017520000002355511243101206016676 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "meep.hpp" #include "meep_internals.hpp" /* integration routine similar to those in integrate.cpp, but integrating a combination of two fields from two different simulations (assumed to have identical grids etcetera), based on fields::loop_in_chunk */ namespace meep { struct integrate_data { int num_fvals; const component *components; const fields *fields2; int num_fvals2; const component *components2; component *cS; complex *ph; complex *fvals; int *offsets; int ninveps; component inveps_cs[3]; direction inveps_ds[3]; int ninvmu; component invmu_cs[3]; direction invmu_ds[3]; complex sum; double maxabs; field_function integrand; void *integrand_data_; }; static void integrate_chunkloop(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { (void) ichunk; // unused integrate_data *data = (integrate_data *) data_; int *off = data->offsets; component *cS = data->cS; complex *fvals = data->fvals, *ph = data->ph; complex sum = 0.0; double maxabs = 0; const component *iecs = data->inveps_cs; const direction *ieds = data->inveps_ds; int ieos[6]; const component *imcs = data->invmu_cs; const direction *imds = data->invmu_ds; int num_fvals1 = data->num_fvals; int num_fvals2 = data->num_fvals2; int imos[6]; const fields_chunk *fc2 = data->fields2->chunks[ichunk]; for (int i = 0; i < num_fvals1; ++i) { cS[i] = S.transform(data->components[i], -sn); if (cS[i] == Dielectric || cS[i] == Permeability) ph[i] = 1.0; else { if (cgrid == Centered) fc->gv.yee2cent_offsets(cS[i], off[2*i], off[2*i+1]); ph[i] = shift_phase * S.phase_shift(cS[i], sn); } } for (int i = 0; i < num_fvals2; ++i) { int j = i + num_fvals1; cS[j] = S.transform(data->components2[i], -sn); if (cS[j] == Dielectric || cS[j] == Permeability) ph[j] = 1.0; else { if (cgrid == Centered) fc->gv.yee2cent_offsets(cS[j], off[2*j], off[2*j+1]); ph[j] = shift_phase * S.phase_shift(cS[j], sn); } } for (int k = 0; k < data->ninveps; ++k) fc->gv.yee2cent_offsets(iecs[k], ieos[2*k], ieos[2*k+1]); for (int k = 0; k < data->ninvmu; ++k) fc->gv.yee2cent_offsets(imcs[k], imos[2*k], imos[2*k+1]); vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; for (int i = 0; i < data->num_fvals; ++i) { if (cS[i] == Dielectric) { double tr = 0.0; for (int k = 0; k < data->ninveps; ++k) { const realnum *ie = fc->s->chi1inv[iecs[k]][ieds[k]]; if (ie) tr += (ie[idx] + ie[idx+ieos[2*k]] + ie[idx+ieos[1+2*k]] + ie[idx+ieos[2*k]+ieos[1+2*k]]); else tr += 4; // default inveps == 1 } fvals[i] = (4 * data->ninveps) / tr; } else if (cS[i] == Permeability) { double tr = 0.0; for (int k = 0; k < data->ninvmu; ++k) { const realnum *im = fc->s->chi1inv[imcs[k]][imds[k]]; if (im) tr += (im[idx] + im[idx+imos[2*k]] + im[idx+imos[1+2*k]] + im[idx+imos[2*k]+imos[1+2*k]]); else tr += 4; // default invmu == 1 } fvals[i] = (4 * data->ninvmu) / tr; } else { double f[2]; for (int k = 0; k < 2; ++k) if (fc->f[cS[i]][k]) f[k] = 0.25 * (fc->f[cS[i]][k][idx] + fc->f[cS[i]][k][idx+off[2*i]] + fc->f[cS[i]][k][idx+off[2*i+1]] + fc->f[cS[i]][k][idx+off[2*i]+off[2*i+1]]); else f[k] = 0; fvals[i] = complex(f[0], f[1]) * ph[i]; } } for (int j = 0; j < num_fvals2; ++j) { int i = j + num_fvals1; if (cS[i] == Dielectric) { double tr = 0.0; for (int k = 0; k < data->ninveps; ++k) { const realnum *ie = fc2->s->chi1inv[iecs[k]][ieds[k]]; if (ie) tr += (ie[idx] + ie[idx+ieos[2*k]] + ie[idx+ieos[1+2*k]] + ie[idx+ieos[2*k]+ieos[1+2*k]]); else tr += 4; // default inveps == 1 } fvals[i] = (4 * data->ninveps) / tr; } else if (cS[i] == Permeability) { double tr = 0.0; for (int k = 0; k < data->ninvmu; ++k) { const realnum *im = fc2->s->chi1inv[imcs[k]][imds[k]]; if (im) tr += (im[idx] + im[idx+imos[2*k]] + im[idx+imos[1+2*k]] + im[idx+imos[2*k]+imos[1+2*k]]); else tr += 4; // default invmu == 1 } fvals[i] = (4 * data->ninvmu) / tr; } else { double f[2]; for (int k = 0; k < 2; ++k) if (fc2->f[cS[i]][k]) f[k] = 0.25 * (fc2->f[cS[i]][k][idx] + fc2->f[cS[i]][k][idx+off[2*i]] + fc2->f[cS[i]][k][idx+off[2*i+1]] + fc2->f[cS[i]][k][idx+off[2*i]+off[2*i+1]]); else f[k] = 0; fvals[i] = complex(f[0], f[1]) * ph[i]; } } complex integrand = data->integrand(fvals, loc, data->integrand_data_); maxabs = max(maxabs, abs(integrand)); sum += integrand * IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV0 + dV1 * loop_i2); } data->maxabs = max(data->maxabs, maxabs); data->sum += sum; } complex fields::integrate2(const fields &fields2, int num_fvals1, const component *components1, int num_fvals2, const component *components2, field_function integrand, void *integrand_data_, const volume &where, double *maxabs) { if (!equal_layout(fields2)) abort("invalid call to integrate2: fields must have equal grid layout"); if (num_fvals2 == 0) return integrate(num_fvals1, components1, integrand, integrand_data_, where, maxabs); if (num_fvals1 == 0) return const_cast(fields2).integrate(num_fvals2, components2, integrand, integrand_data_, where, maxabs); // check if components are all on the same grid: bool same_grid = true; for (int i = 1; i < num_fvals1; ++i) if (gv.iyee_shift(components1[i]) != gv.iyee_shift(components1[0])) { same_grid = false; break; } if (same_grid) for (int i = 0; i < num_fvals2; ++i) if (gv.iyee_shift(components2[i]) != gv.iyee_shift(components1[0])) { same_grid = false; break; } component cgrid = Centered; if (same_grid) cgrid = components1[0]; integrate_data data; data.num_fvals = num_fvals1; data.components = components1; data.fields2 = &fields2; data.num_fvals2 = num_fvals2; data.components2 = components2; data.cS = new component[num_fvals1 + num_fvals2]; data.ph = new complex[num_fvals1 + num_fvals2]; data.fvals = new complex[num_fvals1 + num_fvals2]; data.sum = 0; data.maxabs = 0; data.integrand = integrand; data.integrand_data_ = integrand_data_; /* compute inverse-epsilon directions for computing Dielectric fields */ data.ninveps = 0; bool needs_dielectric = false; for (int i = 0; i < num_fvals1; ++i) if (components1[i] == Dielectric) { needs_dielectric = true; break; } if (!needs_dielectric) for (int i = 0; i < num_fvals2; ++i) if (components2[i] == Dielectric) { needs_dielectric = true; break; } if (needs_dielectric) FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninveps == 3) abort("more than 3 field components??"); data.inveps_cs[data.ninveps] = c; data.inveps_ds[data.ninveps] = component_direction(c); ++data.ninveps; } /* compute inverse-mu directions for computing Permeability fields */ data.ninvmu = 0; bool needs_permeability = false; for (int i = 0; i < num_fvals1; ++i) if (components1[i] == Permeability) { needs_permeability = true; break; } if (!needs_permeability) for (int i = 0; i < num_fvals2; ++i) if (components2[i] == Permeability) { needs_permeability = true; break; } if (needs_permeability) FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninvmu == 3) abort("more than 3 field components??"); data.invmu_cs[data.ninvmu] = c; data.invmu_ds[data.ninvmu] = component_direction(c); ++data.ninvmu; } data.offsets = new int[2 * (num_fvals1 + num_fvals2)]; for (int i = 0; i < 2 * (num_fvals1 + num_fvals2); ++i) data.offsets[i] = 0; loop_in_chunks(integrate_chunkloop, (void *) &data, where, cgrid); delete[] data.offsets; delete[] data.fvals; delete[] data.ph; delete[] data.cS; if (maxabs) *maxabs = max_to_all(data.maxabs); data.sum = sum_to_all(data.sum); return complex(real(data.sum), imag(data.sum)); } typedef struct { field_rfunction integrand; void *integrand_data; } rfun_wrap_data; static complex rfun_wrap(const complex *fields, const vec &loc, void *data_) { rfun_wrap_data *data = (rfun_wrap_data *) data_; return data->integrand(fields, loc, data->integrand_data); } double fields::integrate2(const fields &fields2, int num_fvals1, const component *components1, int num_fvals2, const component *components2, field_rfunction integrand, void *integrand_data_, const volume &where, double *maxabs) { rfun_wrap_data data; data.integrand = integrand; data.integrand_data = integrand_data_; return real(integrate2(fields2, num_fvals1, components1, num_fvals2, components2, rfun_wrap, &data, where, maxabs)); } } // namespace meep meep-openmpi-1.1.1/src/boundaries.cpp0000644000175200017520000004176611243101206016771 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include "meep.hpp" #include "meep_internals.hpp" #define UNUSED(x) (void) x // silence compiler warnings namespace meep { void fields::set_boundary(boundary_side b,direction d,boundary_condition cond){ if (boundaries[b][d] != cond) { boundaries[b][d] = cond; chunk_connections_valid = false; } } void fields::use_bloch(direction d, complex kk) { k[d] = kk; for (int b=0;b<2;b++) set_boundary(boundary_side(b), d, Periodic); if (real(kk) * gv.num_direction(d) == 0.5 * a) // check b.z. edge exactly eikna[d] = -exp(-imag(kk) * ((2*pi/a)*gv.num_direction(d))); else { const complex I = complex(0.0,1.0); eikna[d] = exp(I*kk*((2*pi/a)*gv.num_direction(d))); } coskna[d] = real(eikna[d]); sinkna[d] = imag(eikna[d]); if (is_real && kk != 0.0) // FIXME: allow real phases (c.f. CONNECT_PHASE) abort("Can't use real fields with bloch boundary conditions!\n"); chunk_connections_valid = false; // FIXME: we don't always need to invalidate } void fields::use_bloch(const vec &k) { // Note that I allow a 1D k input when in cylindrical, since in that case // it is unambiguous. if (k.dim != gv.dim && !(k.dim == D1 && gv.dim == Dcyl)) abort("Aaaack, k has wrong dimensions!\n"); LOOP_OVER_DIRECTIONS(gv.dim, d) if (gv.has_boundary(Low,d) && d != R) use_bloch(d, k.in_direction(d)); } ivec fields::ilattice_vector(direction d) const { switch (user_volume.dim) { case D1: return ivec(2*user_volume.nz()); case Dcyl: return iveccyl(0,2*user_volume.nz()); // Only Z direction here case D2: switch (d) { case X: return ivec(user_volume.nx()*2,0); case Y: return ivec(0,user_volume.ny()*2); case Z: case R: case P: case NO_DIRECTION: break; } case D3: switch (d) { case X: return ivec(user_volume.nx()*2,0,0); case Y: return ivec(0,user_volume.ny()*2,0); case Z: return ivec(0,0,user_volume.nz()*2); case R: case P: case NO_DIRECTION: break; } } abort("Aaack in ilattice_vector.\n"); return ivec(0); } vec fields::lattice_vector(direction d) const { return gv[ilattice_vector(d)]; } void fields::disconnect_chunks() { chunk_connections_valid = false; for (int i=0;iconnections[f][ip][io]; chunks[i]->connections[f][ip][io] = NULL; } } FOR_FIELD_TYPES(f) { delete[] chunks[i]->connection_phases[f]; chunks[i]->connection_phases[f] = NULL; for (int ip=0;ip<3;++ip) for (int io=0;io<2;io++) chunks[i]->num_connections[f][ip][io] = 0; } } FOR_FIELD_TYPES(ft) for (int i=0;i *phase) const { // Check if a translational symmetry is needed to bring the point in... if (!user_volume.owns(*there)) FOR_DIRECTIONS(d) { if (boundaries[High][d] == Periodic && there->in_direction(d) <= user_volume.little_corner().in_direction(d)) { while (there->in_direction(d) <= user_volume.little_corner().in_direction(d)) { *there += ilattice_vector(d); *phase *= conj(eikna[d]); } } else if (boundaries[High][d] == Periodic && there->in_direction(d)-ilattice_vector(d).in_direction(d) > user_volume.little_corner().in_direction(d)) { while (there->in_direction(d)-ilattice_vector(d).in_direction(d) > user_volume.little_corner().in_direction(d)) { *there -= ilattice_vector(d); *phase *= eikna[d]; } } } return user_volume.owns(*there); } void fields::locate_volume_source_in_user_volume(const vec p1, const vec p2, vec newp1[8], vec newp2[8], complex kphase[8], int &ncopies) const { // For periodic boundary conditions, // this function locates up to 8 translated copies of the initial grid_volume specified by (p1,p2) // First bring center of grid_volume inside ncopies = 1; newp1[0] = p1; newp2[0] = p2; kphase[0] = 1; vec cen = (newp1[0] + newp2[0]) * 0.5; LOOP_OVER_DIRECTIONS(gv.dim, d) if (boundaries[High][d] == Periodic) { while (cen.in_direction(d) < gv.boundary_location(Low, d)) { newp1[0] += lattice_vector(d); newp2[0] += lattice_vector(d); kphase[0] *= conj(eikna[d]); cen = (newp1[0] + newp2[0]) * 0.5; } while (cen.in_direction(d) > gv.boundary_location(High, d)) { newp1[0] -= lattice_vector(d); newp2[0] -= lattice_vector(d); kphase[0] *= eikna[d]; cen = (newp1[0] + newp2[0]) * 0.5; } } // if grid_volume extends outside user_volume in any direction, we need to duplicate already existing copies LOOP_OVER_DIRECTIONS(gv.dim, d) if (boundaries[High][d] == Periodic) { if (newp1[0].in_direction(d) < gv.boundary_location(Low, d) || newp2[0].in_direction(d) < gv.boundary_location(Low, d)) { for (int j=0; j gv.boundary_location(High, d) || newp2[0].in_direction(d) > gv.boundary_location(High, d)) { for (int j=0; j *phase) const { // returns true if this point and component exist in the user_volume. If // that is the case, on return *c and *there store the component and // location of where the point actually is, and *phase determines holds // the phase needed to get the true field. If the point is not located, // *c and *there will hold undefined values. // Check if nothing tricky is needed... *phase = 1.0; if (!locate_point_in_user_volume(there, phase)) return false; // Check if a rotation or inversion brings the point in... if (user_volume.owns(*there)) for (int sn=0;snis_mine()) { const grid_volume vi = chunks[i]->gv; FOR_FIELD_TYPES(ft) { delete[] chunks[i]->zeroes[ft]; // First electric components... chunks[i]->num_zeroes[ft] = 0; DOCMP FOR_COMPONENTS(c) if (type(c) == ft && chunks[i]->f[c][cmp]) LOOP_OVER_VOL_OWNED(vi, c, n) if (IVEC_LOOP_AT_BOUNDARY) { // todo: just loop over boundaries IVEC_LOOP_ILOC(vi, here); if (on_metal_boundary(here)) chunks[i]->num_zeroes[ft]++; } typedef realnum *realnum_ptr; chunks[i]->zeroes[ft] = new realnum_ptr[chunks[i]->num_zeroes[ft]]; int num = 0; DOCMP FOR_COMPONENTS(c) if (type(c) == ft && chunks[i]->f[c][cmp]) LOOP_OVER_VOL_OWNED(vi, c, n) if (IVEC_LOOP_AT_BOUNDARY) { // todo: just loop over boundaries IVEC_LOOP_ILOC(vi, here); if (on_metal_boundary(here)) chunks[i]->zeroes[ft][num++] = chunks[i]->f[c][cmp] + n; } } } } void fields::connect_the_chunks() { int *nc[NUM_FIELD_TYPES][3][2]; FOR_FIELD_TYPES(f) for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) { nc[f][ip][io] = new int[num_chunks]; for (int i=0;if[hc][0] == chunks[i]->f[bc][0]; and_to_all(B_redundant + 5*num_chunks, B_redundant, 5*num_chunks); for (int i=0;igv; FOR_FIELD_TYPES(ft) for (int ip=0;ip<3;ip++) for (int j=0;j thephase; if (locate_component_point(&c,&here,&thephase) && !on_metal_boundary(here)) for (int j=0;jis_mine() || chunks[j]->is_mine()) && chunks[j]->gv.owns(here) && !(is_B(corig) && is_B(c) && B_redundant[5*i+corig-Bx] && B_redundant[5*j+c-Bx])) { const int pair = j+i*num_chunks; const connect_phase ip = thephase == 1.0 ? CONNECT_COPY : (thephase == -1.0 ? CONNECT_NEGATE : CONNECT_PHASE); { const int nn = is_real?1:2; nc[type(corig)][ip][Incoming][i] += nn; nc[type(c)][ip][Outgoing][j] += nn; comm_sizes[type(c)][ip][pair] += nn; } if (is_electric(corig) || is_magnetic(corig)) { field_type ft = type(corig); field_type f = is_electric(corig) ? PE_stuff : PH_stuff; int common_pols = 0; for (polarization *pi=chunks[i]->pols[ft]; pi; pi=pi->next) for (polarization *pj=chunks[j]->pols[ft]; pj; pj=pj->next) if (pi->pb->get_identifier() == pj->pb->get_identifier()) common_pols += 1; const int nn = (is_real?1:2) * common_pols * 2; nc[f][ip][Incoming][i] += nn; nc[f][ip][Outgoing][j] += nn; comm_sizes[f][ip][pair] += nn; // Note above that the factor of two in 2*nn comes from // the fact that we have two polarization arrays, pol and // olpol. TODO: do we really need to copy olpol? } } // if is_mine and owns... } // loop over j chunks } // LOOP_OVER_VOL_NOTOWNED } // FOR_COMPONENTS // Allocating comm blocks as we go... FOR_FIELD_TYPES(ft) for (int j=0;jalloc_extra_connections(field_type(f), connect_phase(ip), in_or_out(io), nc[f][ip][io][i]); delete[] nc[f][ip][io]; wh[f][ip][io] = new int[num_chunks]; } for (int i=0;igv; // initialize wh[f][ip][Incoming][j] to sum of comm_sizes for jj < j FOR_FIELD_TYPES(f) for (int ip=0;ip<3;ip++) { wh[f][ip][Incoming][0] = 0; for (int j = 1; j < num_chunks; ++j) wh[f][ip][Incoming][j] = wh[f][ip][Incoming][j-1] + comm_sizes[f][ip][(j-1)+i*num_chunks]; } FOR_COMPONENTS(corig) if (have_component(corig)) LOOP_OVER_VOL_NOTOWNED(vi, corig, n) { IVEC_LOOP_ILOC(vi, here); component c = corig; // We're looking at a border element... complex thephase; if (locate_component_point(&c,&here,&thephase) && !on_metal_boundary(here)) for (int j=0;jis_mine() || chunks[j]->is_mine()) && chunks[j]->gv.owns(here) && !(is_B(corig) && is_B(c) && B_redundant[5*i+corig-Bx] && B_redundant[5*j+c-Bx])) { const connect_phase ip = thephase == 1.0 ? CONNECT_COPY : (thephase == -1.0 ? CONNECT_NEGATE : CONNECT_PHASE); const int m = chunks[j]->gv.index(c, here); const int f = type(c); if (ip == CONNECT_PHASE) chunks[i]->connection_phases[f][wh[f][ip][Incoming][j]/2] = thephase; DOCMP { chunks[i]->connections[f][ip][Incoming] [wh[f][ip][Incoming][j]++] = chunks[i]->f[corig][cmp] + n; chunks[j]->connections[f][ip][Outgoing] [wh[f][ip][Outgoing][j]++] = chunks[j]->f[c][cmp] + m; } if (is_electric(corig) || is_magnetic(corig)) { field_type ft = type(corig); field_type f = is_electric(corig) ? PE_stuff : PH_stuff; for (int ipol = 0; ipol < 2; ++ipol) // pol then olpol for (polarization *pi = ipol ? chunks[i]->olpols[ft] : chunks[i]->pols[ft]; pi; pi = pi->next) for (polarization *pj = ipol ? chunks[j]->olpols[ft] :chunks[j]->pols[ft]; pj; pj = pj->next) if (pi->pb->get_identifier() == pj->pb->get_identifier()) { if (ip == CONNECT_PHASE) chunks[i]->connection_phases[f] [wh[f][ip][Incoming][j]/2] = thephase; DOCMP { chunks[i]->connections[f][ip][Incoming] [wh[f][ip][Incoming][j]++] = pi->P[corig][cmp]+n; chunks[j]->connections[f][ip][Outgoing] [wh[f][ip][Outgoing][j]++] = pj->P[c][cmp]+m; } } } // is_electric(corig) } // if is_mine and owns... } // loop over j chunks } // LOOP_OVER_VOL_NOTOWNED } // loop over i chunks FOR_FIELD_TYPES(f) for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) delete[] wh[f][ip][io]; delete[] B_redundant; } void fields_chunk::alloc_extra_connections(field_type f, connect_phase ip, in_or_out io, int num) { if (num == 0) return; // No need to go to any bother... const int tot = num_connections[f][ip][io] + num; if (io == Incoming && ip == CONNECT_PHASE) { delete[] connection_phases[f]; connection_phases[f] = new complex[tot]; } typedef realnum *realnum_ptr; realnum **conn = new realnum_ptr[tot]; if (!conn) abort("Out of memory!\n"); delete[] connections[f][ip][io]; connections[f][ip][io] = conn; num_connections[f][ip][io] = tot; } } // namespace meep meep-openmpi-1.1.1/src/grace.cpp0000644000175200017520000001064511243101206015707 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" namespace meep { /* Below are some routines to output to a grace file. */ const char grace_header[] = "# Grace project file\ #\ @page size 792, 612\ @default symbol size 0.330000\ @g0 on\ @with g0\ "; class grace_point { public: int n; double x, y, dy, extra; grace_point *next; }; grace::grace(const char *fname, const char *dirname) { fn = new char[strlen(fname)+1]; strcpy(fn, fname); dn = new char[strlen(dirname)+1]; strcpy(dn, dirname); char buf[300]; snprintf(buf,300,"%s/%s", dirname, fname); if (!strcmp(fname+strlen(fname)-4,".eps") && !strcmp(dirname,".")) { snprintf(buf,300,"%s", fn); buf[strlen(buf)-4] = 0; fn[strlen(fn)-4] = 0; } f = master_fopen(buf, "w"); if (!f) abort("Unable to open file %s\n", buf); set_num = -1; sn = -1; pts = NULL; master_fprintf(f,"%s", grace_header); } grace::~grace() { flush_pts(); master_fclose(f); char gracecmd[500]; snprintf(gracecmd, 500, "gracebat -hdevice EPS -printfile %s/%s.eps -hardcopy %s/%s", dn, fn, dn, fn); if (my_rank() == 0) system(gracecmd); delete[] dn; delete[] fn; all_wait(); } void grace::new_set(grace_type pt) { flush_pts(); set_num++; sn++; if (!am_master()) return; fprintf(f, "@ s%d line color %d\n", sn, set_num+1); fprintf(f, "@ s%d symbol color %d\n", sn, set_num+1); fprintf(f, "@ s%d errorbar color %d\n", sn, set_num+1); fprintf(f, "@ target G0.S%d\n", sn); if (pt == ERROR_BARS) fprintf(f, "@ type xydy\n"); else fprintf(f, "@ type xy\n"); } void grace::set_range(double xmin, double xmax, double ymin, double ymax) { if (!am_master()) return; fprintf(f, "@ version 1\n"); // Stupid nasty hack to make grace recognize the range. fprintf(f, "@ world xmin %g\n", xmin); fprintf(f, "@ world xmax %g\n", xmax); fprintf(f, "@ world ymin %g\n", ymin); fprintf(f, "@ world ymax %g\n", ymax); fprintf(f, "@ view xmin 0.15\n"); fprintf(f, "@ view xmax 0.95\n"); fprintf(f, "@ view ymin 0.15\n"); fprintf(f, "@ view ymax 0.85\n"); } void grace::set_legend(const char *l) { if (!am_master()) return; fprintf(f, "@ s%d legend \"%s\"\n", sn, l); } void grace::new_curve() { if (set_num == -1) new_set(); else sn++; if (!am_master()) return; fprintf(f, "@ s%d line color %d\n", sn, set_num+1); fprintf(f, "@ s%d symbol color %d\n", sn, set_num+1); fprintf(f, "@ s%d errorbar color %d\n", sn, set_num+1); fprintf(f, "\n"); } void grace::output_point(double x, double y, double dy, double extra) { if (!am_master()) return; if (dy >= 0 && extra != -1) { fprintf(f, "%g\t%g\t%g\t%g\n", x, y, dy, extra); } else if (dy >= 0) { fprintf(f, "%g\t%g\t%g\n", x, y, dy); } else { fprintf(f, "%g\t%g\n", x, y); } } void grace::output_out_of_order(int n, double x, double y, double dy, double extra) { if (set_num == -1) new_set(); grace_point *gp = new grace_point; gp->n = n; gp->x = x; gp->y = y; gp->dy = dy; gp->extra = extra; gp->next = pts; pts = gp; } void grace::flush_pts() { int first_time = 1; while (pts) { grace_point *p = pts; int num_seen = 0; while (p) { if (p->n <= 0) num_seen++; p = p->next; } if (num_seen && !first_time) new_curve(); first_time = 0; p = pts; grace_point **last = &pts; while (p) { if (p->n <= 0) { *last = p->next; output_point(p->x,p->y,p->dy,p->extra); delete p; p = *last; } else { p->n -= 1; last = &p->next; p = p->next; } } } } } // namespace meep meep-openmpi-1.1.1/src/anisotropic_averaging.cpp0000644000175200017520000002015011243101206021173 0ustar debiandebian#include #include "meep_internals.hpp" /* This file contains routines to compute the "average" or "effective" dielectric constant for a pixel, using an anisotropic averaging procedure described in an upcoming paper (similar to the one in MPB). */ namespace meep { //////////////////////////////////////////////////////////////////////////// #include "sphere-quad.h" static vec sphere_pt(const vec ¢, double R, int n, double &weight) { switch (cent.dim) { case D1: { weight = sphere_quad[0][n][3]; vec pt(sphere_quad[0][n][2]); return cent + pt * R; } case D2: { weight = sphere_quad[1][n][3]; vec pt(sphere_quad[1][n][0], sphere_quad[1][n][1]); return cent + pt * R; } case D3: { weight = sphere_quad[2][n][3]; vec pt(sphere_quad[2][n][0], sphere_quad[2][n][1], sphere_quad[2][n][2]); return cent + pt * R; } case Dcyl: { weight = sphere_quad[1][n][3]; return cent + veccyl(sphere_quad[1][n][0], sphere_quad[1][n][1]) * R; } default: abort("unknown dimensions in sphere_pt\n"); } } //////////////////////////////////////////////////////////////////////////// vec material_function::normal_vector(field_type ft, const volume &v) { vec gradient(zero_vec(v.dim)); vec p(v.center()); double R = v.diameter(); for (int i = 0; i < num_sphere_quad[number_of_directions(v.dim)-1]; ++i) { double weight; vec pt = sphere_pt(p, R, i, weight); gradient += (pt - p) * (weight * chi1p1(ft,pt)); } return gradient; } /* default: simple numerical integration of surfaces/cubes, relative tolerance 'tol'. This is superseded by the routines in the libctl interface, which either use a semi-analytical average or can use a proper adaptive cubature. */ void material_function::eff_chi1inv_row(component c, double chi1inv_row[3], const volume &v, double tol, int maxeval) { field_type ft = type(c); if (!maxeval) { trivial: chi1inv_row[0] = chi1inv_row[1] = chi1inv_row[2] = 0.0; chi1inv_row[component_direction(c) % 3] = 1/chi1p1(ft,v.center()); return; } vec gradient(normal_vector(ft, v)); if (abs(gradient) < 1e-8) goto trivial; double meps=1, minveps=1; vec d = v.get_max_corner() - v.get_min_corner(); int ms = 10; double old_meps=0, old_minveps=0; int iter = 0; switch(v.dim) { case D3: while ((fabs(meps - old_meps) > tol*fabs(old_meps)) && (fabs(minveps - old_minveps) > tol*fabs(old_minveps))) { old_meps=meps; old_minveps=minveps; meps = minveps = 0; for (int k=0; k < ms; k++) for (int j=0; j < ms; j++) for (int i=0; i < ms; i++) { double ep = chi1p1(ft,v.get_min_corner() + vec(i*d.x()/ms, j*d.y()/ms, k*d.z()/ms)); if (ep < 0) goto trivial; meps += ep; minveps += 1/ep; } meps /= ms*ms*ms; minveps /= ms*ms*ms; ms *= 2; if (maxeval && (iter += ms*ms*ms) >= maxeval) goto done; } break; case D2: while ((fabs(meps-old_meps) > tol*old_meps) && (fabs(minveps-old_minveps) > tol*old_minveps)) { old_meps=meps; old_minveps=minveps; meps = minveps = 0; for (int j=0; j < ms; j++) for (int i=0; i < ms; i++) { double ep = chi1p1(ft,v.get_min_corner() + vec(i*d.x()/ms, j*d.y()/ms)); if (ep < 0) goto trivial; meps += ep; minveps += 1/ep; } meps /= ms*ms; minveps /= ms*ms; ms *= 2; if (maxeval && (iter += ms*ms) >= maxeval) goto done; } break; case Dcyl: while ((fabs(meps-old_meps) > tol*old_meps) && (fabs(minveps-old_minveps) > tol*old_minveps)) { old_meps=meps; old_minveps=minveps; meps = minveps = 0; double sumvol = 0; for (int j=0; j < ms; j++) for (int i=0; i < ms; i++) { double r = v.get_min_corner().r() + i*d.r()/ms; double ep = chi1p1(ft,v.get_min_corner() + veccyl(i*d.r()/ms, j*d.z()/ms)); if (ep < 0) goto trivial; sumvol += r; meps += ep * r; minveps += r/ep; } meps /= sumvol; minveps /= sumvol; ms *= 2; if (maxeval && (iter += ms*ms) >= maxeval) goto done; } break; case D1: while ((fabs(meps-old_meps) > tol*old_meps) && (fabs(minveps-old_minveps) > tol*old_minveps)) { old_meps=meps; old_minveps=minveps; meps = minveps = 0; for (int i=0; i < ms; i++) { double ep = chi1p1(ft,v.get_min_corner() + vec(i*d.z()/ms)); if (ep < 0) { meps = chi1p1(ft,v.center()); minveps = 1/meps; goto done; } meps += ep; minveps += 1/ep; } meps /= ms; minveps /= ms; ms *= 2; if (maxeval && (iter += ms*ms) >= maxeval) goto done; } break; } done: { double n[3] = {0,0,0}; double nabsinv = 1.0/abs(gradient); LOOP_OVER_DIRECTIONS(gradient.dim, k) n[k%3] = gradient.in_direction(k) * nabsinv; /* get rownum'th row of effective tensor P * minveps + (I-P) * 1/meps = P * (minveps-1/meps) + I * 1/meps where I is the identity and P is the projection matrix P_{ij} = n[i] * n[j]. */ int rownum = component_direction(c) % 3; for (int i=0; i<3; ++i) chi1inv_row[i] = n[rownum] * n[i] * (minveps - 1/meps); chi1inv_row[rownum] += 1/meps; } } void structure_chunk::set_chi1inv(component c, material_function &medium, bool use_anisotropic_averaging, double tol, int maxeval) { if (!is_mine() || !gv.has_field(c)) return; field_type ft = type(c); if (ft != E_stuff && ft != H_stuff) abort("only E or H can have chi"); medium.set_volume(gv.pad().surroundings()); if (!use_anisotropic_averaging) maxeval = 0; const double smoothing_diameter = 1.0; // FIXME: make user-changable? // may take a long time in 3d, so prepare to print status messages int npixels = 0, ipixel = 0; int loop_npixels = 0; LOOP_OVER_VOL(gv, c, i) { loop_npixels = loop_n1 * loop_n2 * loop_n3; goto breakout; // hack to use loop-size computation from LOOP_OVER_VOL } breakout: npixels += loop_npixels; double last_output_time = wall_time(); FOR_FT_COMPONENTS(ft,c2) if (gv.has_field(c2)) { direction d = component_direction(c2); if (!chi1inv[c][d]) chi1inv[c][d] = new realnum[gv.ntot()]; if (!chi1inv[c][d]) abort("Memory allocation error.\n"); } direction dc = component_direction(c); direction d0 = X, d1 = Y, d2 = Z; if (gv.dim == Dcyl) { d0 = R; d1 = P; } int idiag = component_index(c); bool trivial[3] = {true,true,true}; double trivial_val[3] = {0,0,0}; trivial_val[idiag] = 1.0; ivec shift1(unit_ivec(gv.dim,component_direction(c)) * (ft == E_stuff ? 1 : -1)); LOOP_OVER_VOL(gv, c, i) { double chi1invrow[3], chi1invrow_offdiag[3]; IVEC_LOOP_ILOC(gv, here); medium.eff_chi1inv_row(c, chi1invrow, gv.dV(here, smoothing_diameter), tol,maxeval); medium.eff_chi1inv_row(c, chi1invrow_offdiag, gv.dV(here-shift1, smoothing_diameter), tol,maxeval); if (chi1inv[c][d0]) { chi1inv[c][d0][i] = (d0 == dc) ? chi1invrow[0] : chi1invrow_offdiag[0]; trivial[0] = trivial[0] && (chi1inv[c][d0][i] == trivial_val[0]); } if (chi1inv[c][d1]) { chi1inv[c][d1][i] = (d1 == dc) ? chi1invrow[1] : chi1invrow_offdiag[1]; trivial[1] = trivial[1] && (chi1inv[c][d1][i] == trivial_val[1]); } if (chi1inv[c][d2]) { chi1inv[c][d2][i] = (d2 == dc) ? chi1invrow[2] : chi1invrow_offdiag[2]; trivial[2] = trivial[2] && (chi1inv[c][d2][i] == trivial_val[2]); } if (!quiet && (ipixel+1) % 1000 == 0 && wall_time() > last_output_time + MIN_OUTPUT_TIME) { master_printf("subpixel-averaging is %g%% done, %g s remaining\n", ipixel * 100.0 / npixels, (npixels - ipixel) * (wall_time() - last_output_time) / ipixel); last_output_time = wall_time(); } ++ipixel; } trivial_chi1inv[c][d0] = trivial[0]; trivial_chi1inv[c][d1] = trivial[1]; trivial_chi1inv[c][d2] = trivial[2]; if (trivial[(idiag+1)%3] && trivial[(idiag+2)%3]) { FOR_FT_COMPONENTS(ft,c2) if (gv.has_field(c2)) { direction d = component_direction(c2); if (d != dc) { delete[] chi1inv[c][d]; chi1inv[c][d] = 0; } } if (trivial[idiag]) { delete[] chi1inv[c][dc]; chi1inv[c][dc] = 0; } } } } // namespace meep meep-openmpi-1.1.1/src/stress.cpp0000644000175200017520000001352311243101206016147 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Computation of the force spectrum via integration of the Maxwell stress tensor of the Fourier-transformed fields */ #include namespace meep { dft_force::dft_force(dft_chunk *offdiag1_, dft_chunk *offdiag2_, dft_chunk *diag_, double fmin, double fmax, int Nf) { if (Nf <= 1) fmin = fmax = (fmin + fmax) * 0.5; freq_min = fmin; Nfreq = Nf; dfreq = Nf <= 1 ? 0.0 : (fmax - fmin) / (Nf - 1); offdiag1 = offdiag1_; offdiag2 = offdiag2_; diag = diag_; } dft_force::dft_force(const dft_force &f) { freq_min = f.freq_min; Nfreq = f.Nfreq; dfreq = f.dfreq; offdiag1 = f.offdiag1; offdiag2 = f.offdiag2; diag = f.diag; } void dft_force::remove() { while (offdiag1) { dft_chunk *nxt = offdiag1->next_in_dft; delete offdiag1; offdiag1 = nxt; } while (offdiag2) { dft_chunk *nxt = offdiag2->next_in_dft; delete offdiag2; offdiag2 = nxt; } while (diag) { dft_chunk *nxt = diag->next_in_dft; delete diag; diag = nxt; } } void dft_force::operator-=(const dft_force &st) { if (offdiag1 && st.offdiag1) *offdiag1 -= *st.offdiag1; if (offdiag2 && st.offdiag2) *offdiag2 -= *st.offdiag2; if (diag && st.diag) *diag -= *st.diag; } static void stress_sum(int Nfreq, double *F, const dft_chunk *F1, const dft_chunk *F2) { for (const dft_chunk *curF1 = F1, *curF2 = F2; curF1 && curF2; curF1 = curF1->next_in_dft, curF2 = curF2->next_in_dft) for (int k = 0; k < curF1->N; ++k) for (int i = 0; i < Nfreq; ++i) F[i] += real(curF1->extra_weight * curF1->dft[k*Nfreq + i] * conj(curF2->dft[k*Nfreq + i])); } double *dft_force::force() { double *F = new double[Nfreq]; for (int i = 0; i < Nfreq; ++i) F[i] = 0; stress_sum(Nfreq, F, offdiag1, offdiag2); stress_sum(Nfreq, F, diag, diag); double *Fsum = new double[Nfreq]; sum_to_all(F, Fsum, Nfreq); delete[] F; return Fsum; } void dft_force::save_hdf5(h5file *file, const char *dprefix) { save_dft_hdf5(offdiag1, "offdiag1", file, dprefix); file->prevent_deadlock(); // hackery save_dft_hdf5(offdiag2, "offdiag2", file, dprefix); file->prevent_deadlock(); // hackery save_dft_hdf5(diag, "diag", file, dprefix); } void dft_force::load_hdf5(h5file *file, const char *dprefix) { load_dft_hdf5(offdiag1, "offdiag1", file, dprefix); file->prevent_deadlock(); // hackery load_dft_hdf5(offdiag2, "offdiag2", file, dprefix); file->prevent_deadlock(); // hackery load_dft_hdf5(diag, "diag", file, dprefix); } void dft_force::save_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::WRITE, prefix); save_hdf5(ff, dprefix); delete ff; } void dft_force::load_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::READONLY, prefix); load_hdf5(ff, dprefix); delete ff; } void dft_force::scale_dfts(complex scale) { if (offdiag1) offdiag1->scale_dft(scale); if (offdiag2) offdiag2->scale_dft(scale); if (diag) diag->scale_dft(scale); } /* note that the components where->c indicate the direction of the force to be computed, so they should be vector components (such as Ex, Ey, ... or Sx, ...) rather than pseudovectors (like Hx, ...). */ dft_force fields::add_dft_force(const volume_list *where_, double freq_min, double freq_max, int Nfreq){ dft_chunk *offdiag1 = 0, *offdiag2 = 0, *diag = 0; direction field_d[3]; for (int p = 0; p < 3; ++p) field_d[p] = gv.yucky_direction(p); volume_list *where = S.reduce(where_); volume_list *where_save = where; for (; where; where = where->next) { direction nd = normal_direction(where->v); if (nd == NO_DIRECTION) abort("cannot determine dft_force normal"); direction fd = component_direction(where->c); // force direction if (fd == NO_DIRECTION) abort("NO_DIRECTION dft_force is invalid"); if (coordinate_mismatch(gv.dim, fd)) abort("coordinate-type mismatch in add_dft_force"); if (fd != nd) { // off-diagaonal stress-tensor terms offdiag1 = add_dft(direction_component(Ex, fd), where->v, freq_min, freq_max, Nfreq, true, where->weight, offdiag1); offdiag2 = add_dft(direction_component(Ex, nd), where->v, freq_min, freq_max, Nfreq, false, 1.0, offdiag2); offdiag1 = add_dft(direction_component(Hx, fd), where->v, freq_min, freq_max, Nfreq, true, where->weight, offdiag1); offdiag2 = add_dft(direction_component(Hx, nd), where->v, freq_min, freq_max, Nfreq, false, 1.0, offdiag2); } else // diagonal stress-tensor terms LOOP_OVER_FIELD_DIRECTIONS(gv.dim, d) { complex weight1 = where->weight * (d == fd ? +0.5 : -0.5); diag = add_dft(direction_component(Ex, d), where->v, freq_min, freq_max, Nfreq, true, 1.0, diag, true, weight1, false); diag = add_dft(direction_component(Hx, d), where->v, freq_min, freq_max, Nfreq, true, 1.0, diag, true, weight1, false); } } delete where_save; return dft_force(offdiag1, offdiag2, diag, freq_min, freq_max, Nfreq); } } // namespace meep meep-openmpi-1.1.1/src/fields.cpp0000644000175200017520000004423411243155101016100 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" namespace meep { fields::fields(structure *s, double m, bool store_pol_energy, double beta, bool zero_fields_near_cylorigin) : S(s->S), gv(s->gv), user_volume(s->user_volume), v(s->v), m(m), beta(beta) { verbosity = 0; synchronized_magnetic_fields = 0; outdir = new char[strlen(s->outdir) + 1]; strcpy(outdir, s->outdir); if (gv.dim == Dcyl) S = S + r_to_minus_r_symmetry(m); phasein_time = 0; bands = NULL; for (int d=0;d<5;d++) k[d] = 0.0; is_real = 0; a = gv.a; dt = s->dt; t = 0; sources = NULL; fluxes = NULL; // Time stuff: was_working_on = working_on = Other; for (int i=0;i<=Other;i++) times_spent[i] = 0.0; last_wall_time = last_step_output_wall_time = -1; am_now_working_on(Other); num_chunks = s->num_chunks; typedef fields_chunk *fields_chunk_ptr; chunks = new fields_chunk_ptr[num_chunks]; for (int i=0;ichunks[i], outdir, m, store_pol_energy, beta, zero_fields_near_cylorigin); FOR_FIELD_TYPES(ft) { for (int ip=0;ip<3;ip++) { comm_sizes[ft][ip] = new int[num_chunks*num_chunks]; for (int i=0;iuser_volume.num_direction(d) == 1) use_bloch(d, 0.0); } fields::fields(const fields &thef) : S(thef.S), gv(thef.gv), user_volume(thef.user_volume), v(thef.v) { verbosity = 0; synchronized_magnetic_fields = thef.synchronized_magnetic_fields; outdir = new char[strlen(thef.outdir) + 1]; strcpy(outdir, thef.outdir); m = thef.m; beta = thef.beta; phasein_time = thef.phasein_time; bands = NULL; for (int d=0;d<5;d++) k[d] = thef.k[d]; is_real = thef.is_real; a = thef.a; dt = thef.dt; t = thef.t; sources = NULL; fluxes = NULL; // Time stuff: was_working_on = working_on = Other; for (int i=0;i<=Other;i++) times_spent[i] = 0.0; last_wall_time = -1; am_now_working_on(Other); num_chunks = thef.num_chunks; typedef fields_chunk *fields_chunk_ptr; chunks = new fields_chunk_ptr[num_chunks]; for (int i=0;iverbose(gv); } void fields::use_real_fields() { LOOP_OVER_DIRECTIONS(gv.dim, d) if (boundaries[High][d] == Periodic && k[d] != 0.0) abort("Can't use real fields with bloch boundary conditions!\n"); is_real = 1; for (int i=0;iuse_real_fields(); chunk_connections_valid = false; } bool fields::have_component(component c) { for (int i=0;if[c][0]) return true; return false; } fields_chunk::~fields_chunk() { if (s->refcount-- <= 1) delete s; // delete if not shared if (new_s && new_s->refcount-- <= 1) delete new_s; // delete if not shared is_real = 0; // So that we can make sure to delete everything... // for mu=1 non-PML regions, H==B to save space/time - don't delete twice! DOCMP2 FOR_H_AND_B(hc,bc) if (f[hc][cmp] == f[bc][cmp]) f[bc][cmp] = NULL; DOCMP2 FOR_COMPONENTS(c) { delete[] f[c][cmp]; delete[] f_u[c][cmp]; delete[] f_w[c][cmp]; delete[] f_cond[c][cmp]; delete[] f_minus_p[c][cmp]; delete[] f_backup[c][cmp]; delete[] f_u_backup[c][cmp]; delete[] f_w_backup[c][cmp]; delete[] f_cond_backup[c][cmp]; } delete[] f_rderiv_int; FOR_FIELD_TYPES(ft) for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) delete[] connections[ft][ip][io]; FOR_FIELD_TYPES(ft) delete[] connection_phases[ft]; while (dft_chunks) { dft_chunk *nxt = dft_chunks->next_in_chunk; delete dft_chunks; dft_chunks = nxt; } FOR_FIELD_TYPES(ft) delete sources[ft]; FOR_FIELD_TYPES(ft) { delete pols[ft]; delete olpols[ft]; delete[] zeroes[ft]; } } fields_chunk::fields_chunk(structure_chunk *the_s, const char *od, double m, bool store_pol_energy, double beta, bool zero_fields_near_cylorigin) : gv(the_s->gv), v(the_s->v), m(m), beta(beta), store_pol_energy(store_pol_energy), zero_fields_near_cylorigin(zero_fields_near_cylorigin) { s = the_s; s->refcount++; verbosity = 0; outdir = od; new_s = NULL; bands = NULL; is_real = 0; a = s->a; Courant = s->Courant; dt = s->dt; dft_chunks = NULL; doing_solve_cw = false; solve_cw_omega = 0.0; FOR_FIELD_TYPES(ft) pols[ft] = olpols[ft] = NULL; polarization::set_up_polarizations(pols, s, is_real, store_pol_energy); polarization::set_up_polarizations(olpols, s, is_real, store_pol_energy); FOR_FIELD_TYPES(ft) sources[ft] = NULL; FOR_COMPONENTS(c) DOCMP2 { f[c][cmp] = NULL; f_u[c][cmp] = NULL; f_w[c][cmp] = NULL; f_cond[c][cmp] = NULL; f_minus_p[c][cmp] = NULL; f_backup[c][cmp] = NULL; f_u_backup[c][cmp] = NULL; f_w_backup[c][cmp] = NULL; f_cond_backup[c][cmp] = NULL; } f_rderiv_int = NULL; FOR_FIELD_TYPES(ft) { for (int ip=0;ip<3;ip++) num_connections[ft][ip][Incoming] = num_connections[ft][ip][Outgoing] = 0; connection_phases[ft] = 0; for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) connections[ft][ip][io] = NULL; zeroes[ft] = NULL; num_zeroes[ft] = 0; } figure_out_step_plan(); } fields_chunk::fields_chunk(const fields_chunk &thef) : gv(thef.gv), v(thef.v) { s = thef.s; s->refcount++; verbosity = thef.verbosity; outdir = thef.outdir; m = thef.m; zero_fields_near_cylorigin = thef.zero_fields_near_cylorigin; beta = thef.beta; store_pol_energy = thef.store_pol_energy; new_s = thef.new_s; new_s->refcount++; bands = NULL; is_real = thef.is_real; a = thef.a; Courant = thef.Courant; dt = thef.dt; dft_chunks = NULL; doing_solve_cw = thef.doing_solve_cw; solve_cw_omega = thef.solve_cw_omega; FOR_FIELD_TYPES(ft) pols[ft] = olpols[ft] = NULL; polarization::set_up_polarizations(pols, s, is_real, store_pol_energy); polarization::set_up_polarizations(olpols, s, is_real, store_pol_energy); FOR_FIELD_TYPES(ft) sources[ft] = NULL; FOR_COMPONENTS(c) DOCMP2 { f[c][cmp] = NULL; f_u[c][cmp] = NULL; f_w[c][cmp] = NULL; f_cond[c][cmp] = NULL; f_backup[c][cmp] = NULL; f_u_backup[c][cmp] = NULL; f_w_backup[c][cmp] = NULL; f_cond_backup[c][cmp] = NULL; } FOR_COMPONENTS(c) DOCMP { if (!is_magnetic(c) && thef.f[c][cmp]) { f[c][cmp] = new realnum[gv.ntot()]; memcpy(f[c][cmp], thef.f[c][cmp], sizeof(realnum) * gv.ntot()); } if (thef.f_u[c][cmp]) { f_u[c][cmp] = new realnum[gv.ntot()]; memcpy(f_u[c][cmp], thef.f_u[c][cmp], sizeof(realnum) * gv.ntot()); } if (thef.f_w[c][cmp]) { f_w[c][cmp] = new realnum[gv.ntot()]; memcpy(f_w[c][cmp], thef.f_w[c][cmp], sizeof(realnum) * gv.ntot()); } if (thef.f_cond[c][cmp]) { f_cond[c][cmp] = new realnum[gv.ntot()]; memcpy(f_cond[c][cmp], thef.f_cond[c][cmp], sizeof(realnum) * gv.ntot()); } } FOR_MAGNETIC_COMPONENTS(c) DOCMP { if (thef.f[c][cmp] == thef.f[c-Hx+Bx][cmp]) f[c][cmp] = f[c-Hx+Bx][cmp]; else if (thef.f[c][cmp]) { f[c][cmp] = new realnum[gv.ntot()]; memcpy(f[c][cmp], thef.f[c][cmp], sizeof(realnum) * gv.ntot()); } } FOR_FIELD_TYPES(ft) { for (int ip=0;ip<3;ip++) num_connections[ft][ip][Incoming] = num_connections[ft][ip][Outgoing] = 0; connection_phases[ft] = 0; for (int ip=0;ip<3;ip++) for (int io=0;io<2;io++) connections[ft][ip][io] = NULL; zeroes[ft] = NULL; num_zeroes[ft] = 0; } FOR_COMPONENTS(c) DOCMP2 if (thef.f_minus_p[c][cmp]) { f_minus_p[c][cmp] = new realnum[gv.ntot()]; memcpy(f_minus_p[c][cmp], thef.f_minus_p[c][cmp], sizeof(realnum) * gv.ntot()); } f_rderiv_int = NULL; figure_out_step_plan(); } static inline bool cross_negative(direction a, direction b) { if (a >= R) a = direction(a - 3); if (b >= R) b = direction(b - 3); return ((3+b-a)%3) == 2; } static inline direction cross(direction a, direction b) { if (a == b) abort("bug - cross expects different directions"); bool dcyl = a >= R || b >= R; if (a >= R) a = direction(a - 3); if (b >= R) b = direction(b - 3); direction c = direction((3+2*a-b)%3); if (dcyl && c < Z) return direction(c + 3); return c; } /* Call this whenever we modify the structure_chunk (fields_chunk::s) to implement copy-on-write semantics. See also structure::changing_chunks. */ void fields_chunk::changing_structure() { if (s->refcount > 1) { // this chunk is shared, so make a copy s->refcount--; s = new structure_chunk(s); } } void fields::figure_out_step_plan() { for (int i = 0; i < num_chunks; ++i) if (chunks[i]->is_mine()) chunks[i]->figure_out_step_plan(); } void fields_chunk::figure_out_step_plan() { FOR_COMPONENTS(cc) have_minus_deriv[cc] = have_plus_deriv[cc] = false; FOR_COMPONENTS(c1) if (f[c1][0]) { const direction dc1 = component_direction(c1); // Figure out which field components contribute. FOR_COMPONENTS(c2) if ((is_electric(c1) && is_magnetic(c2)) || (is_D(c1) && is_magnetic(c2)) || (is_magnetic(c1) && is_electric(c2)) || (is_B(c1) && is_electric(c2))) { const direction dc2 = component_direction(c2); if (dc1 != dc2 && gv.has_field(c2) && gv.has_field(c1) && (has_direction(gv.dim,cross(dc1,dc2)) || (gv.dim == Dcyl && has_field_direction(gv.dim,cross(dc1,dc2))))) { direction d_deriv = cross(dc1,dc2); if (cross_negative(dc2, dc1)) { minus_component[c1] = c2; have_minus_deriv[c1] = true; minus_deriv_direction[c1] = d_deriv; } else { plus_component[c1] = c2; have_plus_deriv[c1] = true; plus_deriv_direction[c1] = d_deriv; } } } } } bool is_tm(component c) { switch (c) { case Hx: case Hy: case Bx: case By: case Ez: case Dz: return true; default: return false; } return false; } static bool is_like(ndim d, component c1, component c2) { if (d != D2) return true; return !(is_tm(c1) ^ is_tm(c2)); } // this function should ordinarily not be called directly; // instead it should be called via require_component, // since only require_component knows what other field components // need to be allocated in addition to c bool fields_chunk::alloc_f(component c) { bool changed = false; if (is_mine()) DOCMP { if (!f[c][cmp]) { changed = true; if (is_magnetic(c)) { /* initially, we just set H == B ... later on, we lazily allocate H fields if needed (if mu != 1 or in PML) in update_eh */ component bc = direction_component(Bx, component_direction(c)); if (!f[bc][cmp]) { f[bc][cmp] = new realnum[gv.ntot()]; for (int i=0;is->has_chi1inv(Ex, Z) || chunks[i]->s->has_chi1inv(Ey, Z) || chunks[i]->s->has_chi1inv(Ez, X) || chunks[i]->s->has_chi1inv(Ez, Y) || chunks[i]->s->has_chi1inv(Hx, Z) || chunks[i]->s->has_chi1inv(Hy, Z) || chunks[i]->s->has_chi1inv(Hz, X) || chunks[i]->s->has_chi1inv(Hz, Y)) break; aniso2d = or_to_all(i < num_chunks); } if (aniso2d && beta != 0 && is_real) abort("Nonzero beta need complex fields when mu/epsilon couple TE and TM"); aniso2d = aniso2d || (beta != 0); // beta couples TE/TM // allocate fields if they haven't been allocated yet for this component int need_to_reconnect = 0; FOR_COMPONENTS(c_alloc) if (gv.has_field(c_alloc) && (is_like(gv.dim, c, c_alloc) || aniso2d)) for (int i = 0; i < num_chunks; ++i) if (chunks[i]->alloc_f(c_alloc)) need_to_reconnect++; if (need_to_reconnect) figure_out_step_plan(); if (sum_to_all(need_to_reconnect)) chunk_connections_valid = false; } void fields_chunk::remove_sources() { FOR_FIELD_TYPES(ft) { delete sources[ft]; sources[ft] = NULL; } } void fields::remove_sources() { delete sources; sources = NULL; for (int i=0;iremove_sources(); } void fields_chunk::remove_polarizabilities() { FOR_FIELD_TYPES(ft) { delete pols[ft]; pols[ft] = NULL; delete olpols[ft]; olpols[ft] = NULL; } changing_structure(); s->remove_polarizabilities(); } void fields::remove_polarizabilities() { for (int i=0;iremove_polarizabilities(); } void fields::remove_fluxes() { delete fluxes; fluxes = NULL; } void fields_chunk::zero_fields() { FOR_COMPONENTS(c) DOCMP { #define ZERO(array) if (array) memset(array, 0, sizeof(realnum) * gv.ntot()) ZERO(f[c][cmp]); ZERO(f_u[c][cmp]); ZERO(f_w[c][cmp]); ZERO(f_cond[c][cmp]); ZERO(f_backup[c][cmp]); ZERO(f_u_backup[c][cmp]); ZERO(f_w_backup[c][cmp]); ZERO(f_cond_backup[c][cmp]); #undef ZERO } if (is_mine()) FOR_FIELD_TYPES(ft) { if (pols[ft]) pols[ft]->zero_fields(); if (olpols[ft]) olpols[ft]->zero_fields(); } } void fields::zero_fields() { for (int i=0;izero_fields(); } void fields::reset() { remove_sources(); remove_fluxes(); zero_fields(); t = 0; } void fields_chunk::use_real_fields() { is_real = 1; // for mu=1 non-PML regions, H==B to save space/time - don't delete twice! FOR_H_AND_B(hc,bc) if (f[hc][1] == f[bc][1]) f[bc][1] = NULL; FOR_COMPONENTS(c) if (f[c][1]) { delete[] f[c][1]; f[c][1] = 0; } if (is_mine()) FOR_FIELD_TYPES(ft) { if (pols[ft]) pols[ft]->use_real_fields(); if (olpols[ft]) olpols[ft]->use_real_fields(); } } int fields::phase_in_material(const structure *snew, double time) { if (snew->num_chunks != num_chunks) abort("Can only phase in similar sets of chunks: %d vs %d\n", snew->num_chunks, num_chunks); for (int i=0;iis_mine()) chunks[i]->phase_in_material(snew->chunks[i]); phasein_time = (int) (time/dt); return phasein_time; } void fields_chunk::phase_in_material(structure_chunk *snew) { new_s = snew; new_s->refcount++; } int fields::is_phasing() { return phasein_time > 0; } bool fields::equal_layout(const fields &f) const { if (a != f.a || num_chunks != f.num_chunks || v != f.v || S != f.S) return false; for (int d=0;d<5;d++) if (k[d] != f.k[d]) return false; for (int i = 0; i < num_chunks; ++i) if (chunks[i]->a != f.chunks[i]->a || chunks[i]->v != f.chunks[i]->v) return false; return true; } // total computational grid_volume, including regions redundant by symmetry volume fields::total_volume(void) const { volume gv0 = gv.interior(); volume v = gv0; for (int n = 1; n < S.multiplicity(); ++n) v = v | S.transform(gv0, n); if (v.dim == Dcyl && v.in_direction_min(R) < 0) v.set_direction_min(R, 0); return v; } /* One-pixel periodic dimensions are used almost exclusively to emulate lower-dimensional computations, so if the user passes an empty size in that direction, they probably really intended to specify that whole dimension. This function detects that case. */ bool fields::nosize_direction(direction d) const { return (gv.has_boundary(Low, d) && gv.has_boundary(High, d) && boundaries[Low][d] == Periodic && boundaries[High][d] == Periodic && gv.num_direction(d) == 1); } void fields::set_solve_cw_omega(complex omega) { for (int i = 0; i < num_chunks; ++i) chunks[i]->set_solve_cw_omega(omega); } void fields::unset_solve_cw_omega() { for (int i = 0; i < num_chunks; ++i) chunks[i]->unset_solve_cw_omega(); } } // namespace meep meep-openmpi-1.1.1/src/step.cpp0000644000175200017520000002012711243101206015575 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #define RESTRICT namespace meep { void fields::step() { // however many times the fields have been synched, we want to restore now int save_synchronized_magnetic_fields = synchronized_magnetic_fields; if (synchronized_magnetic_fields) { synchronized_magnetic_fields = 1; // reset synchronization count restore_magnetic_fields(); } am_now_working_on(Stepping); if (!t) { last_step_output_wall_time = wall_time(); last_step_output_t = t; } if (!quiet && wall_time() > last_step_output_wall_time + MIN_OUTPUT_TIME) { master_printf("on time step %d (time=%g), %g s/step\n", t, time(), (wall_time() - last_step_output_wall_time) / (t - last_step_output_t)); if (save_synchronized_magnetic_fields) master_printf(" (doing expensive timestepping of synched fields)\n"); last_step_output_wall_time = wall_time(); last_step_output_t = t; } phase_material(); // update cached conductivity-inverse array, if needed for (int i=0;is->update_condinv(); calc_sources(time()); // for B sources step_db(B_stuff); step_source(B_stuff); step_boundaries(B_stuff); calc_sources(time() + 0.5*dt); // for integrated H sources update_eh(H_stuff); step_boundaries(H_stuff); // because step_boundaries overruns the timing stack... am_now_working_on(Stepping); update_pols(H_stuff); step_boundaries(PH_stuff); // because step_boundaries overruns the timing stack... am_now_working_on(Stepping); if (fluxes) fluxes->update_half(); calc_sources(time() + 0.5*dt); // for D sources step_db(D_stuff); step_source(D_stuff); step_boundaries(D_stuff); calc_sources(time() + dt); // for integrated E sources update_eh(E_stuff); step_boundaries(E_stuff); // because step_boundaries overruns the timing stack... am_now_working_on(Stepping); update_pols(E_stuff); step_boundaries(PE_stuff); // because step_boundaries overruns the timing stack... am_now_working_on(Stepping); if (fluxes) fluxes->update(); t += 1; update_dfts(); finished_working(); // re-synch magnetic fields if they were previously synchronized if (save_synchronized_magnetic_fields) { synchronize_magnetic_fields(); synchronized_magnetic_fields = save_synchronized_magnetic_fields; } } double fields_chunk::peek_field(component c, const vec &where) { double w[8]; ivec ilocs[8]; gv.interpolate(c,where, ilocs, w); if (gv.contains(ilocs[0]) && f[c][0]) { double hello = 0.0; if (is_mine()) hello = f[c][0][gv.index(c,ilocs[0])]; broadcast(n_proc(), &hello, 1); return hello; } //abort("Got no such %s field at %g %g!\n", // component_name(c), gv[ilocs[0]].x(), gv[ilocs[0]].y()); return 0.0; } void fields::phase_material() { bool changed = false; if (is_phasing()) { for (int i=0;iis_mine()) { chunks[i]->phase_material(phasein_time); changed = changed || chunks[i]->new_s; } phasein_time--; } if (or_to_all(changed)) { calc_sources(time() + 0.5*dt); // for integrated H sources update_eh(H_stuff); // ensure H = 1/mu * B step_boundaries(H_stuff); calc_sources(time() + dt); // for integrated E sources update_eh(E_stuff); // ensure E = 1/eps * D step_boundaries(E_stuff); } } void fields_chunk::phase_material(int phasein_time) { if (new_s && phasein_time > 0) { changing_structure(); s->mix_with(new_s, 1.0/phasein_time); } } void fields::step_boundaries(field_type ft) { connect_chunks(); // re-connect if !chunk_connections_valid am_now_working_on(MpiTime); // Do the metals first! for (int i=0;iis_mine()) chunks[i]->zero_metal(ft); /* Note that the copying of data to/from buffers is order-sensitive, and must be kept consistent with the code in boundaries.cpp. In particular, we require that boundaries.cpp set up the connections array so that all of the connections for process i come before all of the connections for process i' for i < i' */ // First copy outgoing data to buffers... for (int j=0;jis_mine()) { int wh[3] = {0,0,0}; for (int i=0;iconnections[ft][ip][Outgoing][wh[ip]++]); n0 += comm_sizes[ft][ip][pair]; } } } boundary_communications(ft); // Finally, copy incoming data to the fields themselves, multiplying phases: for (int i=0;iis_mine()) { int wh[3] = {0,0,0}; for (int j=0;jconnection_phases[ft][wh[ip]/2]); const double phi = imag(chunks[i]->connection_phases[ft][wh[ip]/2]); *(chunks[i]->connections[ft][ip][Incoming][wh[ip]]) = phr*comm_blocks[ft][pair][n] - phi*comm_blocks[ft][pair][n+1]; *(chunks[i]->connections[ft][ip][Incoming][wh[ip]+1]) = phr*comm_blocks[ft][pair][n+1] + phi*comm_blocks[ft][pair][n]; } int n0 = comm_sizes[ft][ip][pair]; ip = CONNECT_NEGATE; for (int n = 0; n < comm_sizes[ft][ip][pair]; ++n) *(chunks[i]->connections[ft][ip][Incoming][wh[ip]++]) = -comm_blocks[ft][pair][n0 + n]; n0 += comm_sizes[ft][ip][pair]; ip = CONNECT_COPY; for (int n = 0; n < comm_sizes[ft][ip][pair]; ++n) *(chunks[i]->connections[ft][ip][Incoming][wh[ip]++]) = comm_blocks[ft][pair][n0 + n]; } } finished_working(); } void fields::step_source(field_type ft, bool including_integrated) { if (ft != D_stuff && ft != B_stuff) abort("only step_source(D/B) is okay"); for (int i=0;iis_mine()) chunks[i]->step_source(ft, including_integrated); } void fields_chunk::step_source(field_type ft, bool including_integrated) { if (doing_solve_cw && !including_integrated) return; for (src_vol *sv = sources[ft]; sv; sv = sv->next) { component c = direction_component(first_field_component(ft), component_direction(sv->c)); const realnum *cndinv = s->condinv[c][component_direction(sv->c)]; if ((including_integrated || !sv->t->is_integrated) && f[c][0] && ((ft == D_stuff && is_electric(sv->c)) || (ft == B_stuff && is_magnetic(sv->c)))) { if (cndinv) for (int j=0; jnpts; j++) { const int i = sv->index[j]; const complex A = sv->current(j) * dt * double(cndinv[i]); f[c][0][i] -= real(A); if (!is_real) f[c][1][i] -= imag(A); } else for (int j=0; jnpts; j++) { const complex A = sv->current(j) * dt; const int i = sv->index[j]; f[c][0][i] -= real(A); if (!is_real) f[c][1][i] -= imag(A); } } } } void fields::calc_sources(double tim) { for (src_time *s = sources; s; s = s->next) s->update(tim, dt); for (int i=0;iis_mine()) chunks[i]->calc_sources(tim); } void fields_chunk::calc_sources(double time) { (void) time; // unused; } } // namespace meep meep-openmpi-1.1.1/src/cw_fields.cpp0000644000175200017520000001612311243101206016562 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "meep_internals.hpp" #include "bicgstab.hpp" namespace meep { static void fields_to_array(const fields &f, complex *x) { int ix = 0; for (int i=0;iis_mine()) FOR_COMPONENTS(c) if (is_D(c) || is_B(c)) { realnum *fr, *fi; #define COPY_FROM_FIELD(fld) \ if ((fr = f.chunks[i]->fld[0]) && \ (fi = f.chunks[i]->fld[1])) \ LOOP_OVER_VOL_OWNED(f.chunks[i]->gv, c, idx) \ x[ix++] = complex(fr[idx], fi[idx]); COPY_FROM_FIELD(f[c]); COPY_FROM_FIELD(f_u[c]); COPY_FROM_FIELD(f_cond[c]); component c2 = field_type_component(is_D(c) ? E_stuff : H_stuff, c); COPY_FROM_FIELD(f_w[c2]); if (f.chunks[i]->f_w[c2][0]) COPY_FROM_FIELD(f[c2]); #undef COPY_FROM_FIELD } } static void array_to_fields(const complex *x, fields &f) { int ix = 0; for (int i=0;iis_mine()) FOR_COMPONENTS(c) if (is_D(c) || is_B(c)) { realnum *fr, *fi; #define COPY_TO_FIELD(fld) \ if ((fr = f.chunks[i]->fld[0]) && \ (fi = f.chunks[i]->fld[1])) \ LOOP_OVER_VOL_OWNED(f.chunks[i]->gv, c, idx) { \ fr[idx] = real(x[ix]); \ fi[idx] = imag(x[ix++]); \ } COPY_TO_FIELD(f[c]); COPY_TO_FIELD(f_u[c]); COPY_TO_FIELD(f_cond[c]); component c2 = field_type_component(is_D(c) ? E_stuff : H_stuff, c); COPY_TO_FIELD(f_w[c2]); if (f.chunks[i]->f_w[c2][0]) COPY_TO_FIELD(f[c2]); #undef COPY_TO_FIELD } f.step_boundaries(D_stuff); f.update_eh(E_stuff, true); f.step_boundaries(E_stuff); /* done in f.step before updating D: f.step_boundaries(B_stuff); f.update_eh(H_stuff); f.step_boundaries(H_stuff); */ } typedef struct { int n; fields *f; complex iomega; int iters; } fieldop_data; static void fieldop(const realnum *xr, realnum *yr, void *data_) { const complex *x = reinterpret_cast*>(xr); complex *y = reinterpret_cast*>(yr); fieldop_data *data = (fieldop_data *) data_; array_to_fields(x, *data->f); data->f->step(); fields_to_array(*data->f, y); int n = data->n; realnum dt_inv = 1.0 / data->f->dt; complex iomega = complex(real(data->iomega), imag(data->iomega)); for (int i = 0; i < n; ++i) y[i] = (y[i] - x[i]) * dt_inv + iomega * x[i]; data->iters++; } /* Solve for the CW (constant frequency) field response at the given frequency to the sources (with amplitude given by the current sources at the current time). The solver halts at a fractional convergence of tol, or when maxiters is reached, or when convergence fails; returns true if convergence succeeds and false if it fails. The parameter L determines the order of the iterative algorithm that is used. L should always be positive and should normally be >= 2. Larger values of L will often lead to faster convergence, at the expense of more memory and more work per iteration. */ bool fields::solve_cw(double tol, int maxiters, complex frequency, int L) { if (is_real) abort("solve_cw is incompatible with use_real_fields()"); if (L < 1) abort("solve_cw called with L = %d < 1", L); set_solve_cw_omega(2*pi*frequency); step(); // step once to make sure everything is allocated int N = 0; // size of linear system (on this processor, at least) for (int i=0;iis_mine()) { FOR_COMPONENTS(c) if (chunks[i]->f[c][0] && (is_D(c) || is_B(c))) { component c2 = field_type_component(is_D(c) ? E_stuff : H_stuff, c); /* unknowns are just D and B in non-PML regions, but in PML regions the E, U, W, and C fields are also unknowns (in principle, we might be able to compute these extra fields in frequency domain via scalinb by the appropriate s factors, rather than storing them, but I had some problems getting that working) */ N += 2 * chunks[i]->gv.nowned(c) * (1 + (chunks[i]->f_u[c][0] != NULL) + (chunks[i]->f_w[c2][0] != NULL) * 2 + (chunks[i]->f_cond[c][0] != NULL)); } } int nwork = bicgstabL(L, N, 0, 0, 0, 0, tol, &maxiters, 0, true); realnum *work = new realnum[nwork + 2*N]; complex *x = reinterpret_cast*>(work + nwork); complex *b = reinterpret_cast*>(work + nwork + N); int tsave = t; // save time (gets incremented by iterations) fields_to_array(*this, x); // initial guess = initial fields // get J amplitudes from current time step zero_fields(); // note that we've saved the fields in x above calc_sources(time()); step_source(B_stuff, true); step_boundaries(B_stuff); update_eh(H_stuff); calc_sources(time() + 0.5*dt); step_source(D_stuff, true); step_boundaries(D_stuff); update_eh(E_stuff); fields_to_array(*this, b); double mdt_inv = -1.0 / dt; for (int i = 0; i < N/2; ++i) b[i] *= mdt_inv; { double bmax = 0; for (int i = 0; i < N/2; ++i) { double babs = abs(b[i]); if (babs > bmax) bmax = babs; } if (max_to_all(bmax) == 0.0) abort("zero current amplitudes in solve_cw"); } fieldop_data data; data.f = this; data.n = N / 2; data.iomega = ((1.0 - exp(complex(0.,-1.) * (2*pi*frequency) * dt)) * (1.0 / dt)); data.iters = 0; int ierr = bicgstabL(L, N, reinterpret_cast(x), fieldop, &data, reinterpret_cast(b), tol, &maxiters, work, quiet); if (!quiet) { master_printf("Finished solve_cw after %d steps and %d CG iters.\n", data.iters, maxiters); if (ierr) master_printf(" -- CONVERGENCE FAILURE (%d) in solve_cw!\n", ierr); } array_to_fields(x, *this); step(); // ensure H/B are updated and synced with E/D delete[] work; t = tsave; unset_solve_cw_omega(); return !ierr; } /* as solve_cw, but infers frequency from sources */ bool fields::solve_cw(double tol, int maxiters, int L) { complex freq = 0.0; for (src_time *s = sources; s; s = s->next) { complex sf = s->frequency(); if (sf != freq && freq != 0.0 && sf != 0.0) abort("must pass frequency to solve_cw if sources do not agree"); if (sf != 0.0) freq = sf; } if (freq == 0.0) abort("must pass frequency to solve_cw if sources do not specify one"); return solve_cw(tol, maxiters, freq, L); } } // namespace meep meep-openmpi-1.1.1/src/meep/0000755000175200017520000000000011244567006015061 5ustar debiandebianmeep-openmpi-1.1.1/src/meep/mympi.hpp0000644000175200017520000000610011243101206016703 0ustar debiandebian// -*- C++ -*- /* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef MEEP_MY_MPI_H #define MEEP_MY_MPI_H #include using namespace std; namespace meep { // MPI helper routines! double wall_time(void); class initialize { public: initialize(int &argc, char** &argv); ~initialize(); double elapsed_time() { return wall_time() - t_start; } private: double t_start; }; #ifdef __GNUC__ # define NORETURN_ATTR __attribute__((noreturn)) # define PRINTF_ATTR(f,a) __attribute__((format(printf, f, a))) #else # define NORETURN_ATTR # define PRINTF_ATTR(f,a) #endif void abort(const char *fmt, ...) NORETURN_ATTR PRINTF_ATTR(1,2); void all_wait(); int count_processors(); int my_rank(); bool am_really_master(); inline int am_master() { return my_rank() == 0; } void send(int from, int to, double *data, int size=1); void broadcast(int from, double *data, int size); void broadcast(int from, char *data, int size); void broadcast(int from, int *data, int size); void broadcast(int from, complex *data, int size); complex broadcast(int from, complex data); double broadcast(int from, double data); int broadcast(int from, int data); bool broadcast(int from, bool); double max_to_master(double); // Only returns the correct value to proc 0. double max_to_all(double); int max_to_all(int); double sum_to_master(double); // Only returns the correct value to proc 0. double sum_to_all(double); void sum_to_all(const double *in, double *out, int size); long double sum_to_all(long double); complex sum_to_all(complex in); complex sum_to_all(complex in); int sum_to_all(int); int partial_sum_to_all(int in); bool or_to_all(bool in); void or_to_all(const int *in, int *out, int size); bool and_to_all(bool in); void and_to_all(const int *in, int *out, int size); // IO routines: void master_printf(const char *fmt, ...) PRINTF_ATTR(1,2); void debug_printf(const char *fmt, ...) PRINTF_ATTR(1,2); void master_fprintf(FILE *f, const char *fmt, ...) PRINTF_ATTR(2,3); FILE *master_fopen(const char *name, const char *mode); void master_fclose(FILE *f); void begin_critical_section(int tag); void end_critical_section(int tag); int divide_parallel_processes(int numgroups); void begin_global_communications(void); void end_global_communications(void); void end_divide_parallel(void); } /* namespace meep */ #endif /* MEEP_MY_MPI_H */ meep-openmpi-1.1.1/src/meep/vec.hpp0000644000175200017520000010103211243101206016325 0ustar debiandebian// -*- C++ -*- /* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef MEEP_VEC_H #define MEEP_VEC_H #include using namespace std; namespace meep { const int NUM_FIELD_COMPONENTS = 20; const int NUM_FIELD_TYPES = 6; enum component { Ex=0, Ey, Er, Ep, Ez, Hx, Hy, Hr, Hp, Hz, Dx, Dy, Dr, Dp, Dz, Bx, By, Br, Bp, Bz, Dielectric, Permeability }; #define Centered Dielectric // better name for centered "dielectric" grid enum derived_component { Sx=100, Sy, Sr, Sp, Sz, EnergyDensity, D_EnergyDensity, H_EnergyDensity }; enum ndim { D1=0, D2, D3, Dcyl }; enum field_type { E_stuff=0, H_stuff=1, D_stuff=2, B_stuff=3, PE_stuff=4, PH_stuff=5 }; enum boundary_side { High=0, Low }; enum direction { X=0,Y,Z,R,P, NO_DIRECTION }; struct signed_direction { signed_direction(direction dd=X,bool f=false, complex ph=1.0) { d = dd; flipped = f; phase = ph; }; signed_direction(const signed_direction &sd) { d = sd.d; flipped = sd.flipped; phase = sd.phase; } signed_direction operator*(complex ph); bool operator==(const signed_direction &sd) const { return (d == sd.d && flipped == sd.flipped && phase == sd.phase); } bool operator!=(const signed_direction &sd) const { return !(*this == sd); } direction d; bool flipped; complex phase; }; inline int number_of_directions(ndim dim) { return (int) (dim + 1 - 2 * (dim == Dcyl)); } inline direction start_at_direction(ndim dim) { return (direction) (((dim == D1) || (dim == Dcyl)) ? 2 : 0); } inline direction stop_at_direction(ndim dim) { return (direction) (dim + 1 + 2 * (dim == D1)); } component first_field_component(field_type ft); #define FOR_FIELD_TYPES(ft) for (field_type ft = E_stuff; \ ft <= PH_stuff; ft = (field_type) (ft+1)) #define FOR_ELECTRIC_COMPONENTS(c) for (component c = Ex; \ c < Hx; c = (component) (c+1)) #define FOR_MAGNETIC_COMPONENTS(c) for (component c = Hz; \ c > Ez; c = (component) (c-1)) #define FOR_B_COMPONENTS(c) for (component c = Bz; \ c > Dz; c = (component) (c-1)) #define FOR_H_AND_B(h,b) for (component h=Hx, b=Bx; \ h <= Hz; h = (component) (h+1), b = (component) (b+1)) #define FOR_D_COMPONENTS(c) for (component c = Dz; \ c > Hz; c = (component) (c-1)) #define FOR_E_AND_D(e,d) for (component e = Ex, d = Dx; \ e <= Ez; e = (component) (e+1), d = (component) (d+1)) #define FOR_E_AND_H(c) for (component c = Ex; c < Dx; c = (component) (c+1)) #define FOR_D_AND_B(c) for (component c = Dx; c < Dielectric; c = (component) (c+1)) #define FOR_FT_COMPONENTS(ft,c) for (component c = first_field_component(ft), loop_cstop = component(first_field_component(ft) + 5); c < loop_cstop; c = component(c+1)) #define FOR_COMPONENTS(c) for (component c = Ex,loop_stop_co=Ey; \ c != loop_stop_co; \ c = (component)((c+1)%NUM_FIELD_COMPONENTS), \ loop_stop_co = Ex) #define FOR_DIRECTIONS(d) for (direction d = X,loop_stop_di=Y; \ d != loop_stop_di; \ d = (direction)((d+1)%5), \ loop_stop_di = X) #define FOR_SIDES(s) for (boundary_side s = High, loop_stop_bi=Low; \ s != loop_stop_bi; \ s = (boundary_side) ((s+1) % 2), \ loop_stop_bi = High) // only loop over directions where we have coordinates #define LOOP_OVER_DIRECTIONS(dim, d) for (meep::direction d = meep::start_at_direction(dim), \ loop_stop_directi = meep::stop_at_direction(dim); \ d < loop_stop_directi; d = (meep::direction) (d+1)) // loop over all directions in which we might have fields #define LOOP_OVER_FIELD_DIRECTIONS(dim, d) for (direction d = dim == Dcyl ? Z : X; d < (dim == Dcyl ? NO_DIRECTION : R); d = direction(d+1)) // loop over indices idx from is to ie (inclusive) in gv #define LOOP_OVER_IVECS(gv, is, ie, idx) \ for (int loop_is1 = (is).yucky_val(0), \ loop_is2 = (is).yucky_val(1), \ loop_is3 = (is).yucky_val(2), \ loop_n1 = ((ie).yucky_val(0) - loop_is1) / 2 + 1, \ loop_n2 = ((ie).yucky_val(1) - loop_is2) / 2 + 1, \ loop_n3 = ((ie).yucky_val(2) - loop_is3) / 2 + 1, \ loop_d1 = (gv).yucky_direction(0), \ loop_d2 = (gv).yucky_direction(1), \ loop_d3 = (gv).yucky_direction(2), \ loop_s1 = (gv).stride((direction) loop_d1), \ loop_s2 = (gv).stride((direction) loop_d2), \ loop_s3 = (gv).stride((direction) loop_d3), \ idx0 = (is - (gv).little_corner()).yucky_val(0) / 2 * loop_s1 \ + (is - (gv).little_corner()).yucky_val(1) / 2 * loop_s2 \ + (is - (gv).little_corner()).yucky_val(2) / 2 * loop_s3,\ loop_i1 = 0; loop_i1 < loop_n1; loop_i1++) \ for (int loop_i2 = 0; loop_i2 < loop_n2; loop_i2++) \ for (int idx = idx0 + loop_i1*loop_s1 + loop_i2*loop_s2, \ loop_i3 = 0; loop_i3 < loop_n3; loop_i3++, idx+=loop_s3) #define LOOP_OVER_VOL(gv, c, idx) \ LOOP_OVER_IVECS(gv, (gv).little_corner() + (gv).iyee_shift(c), (gv).big_corner() + (gv).iyee_shift(c), idx) #define LOOP_OVER_VOL_OWNED(gv, c, idx) \ LOOP_OVER_IVECS(gv, (gv).little_owned_corner(c), (gv).big_corner(), idx) #define LOOP_OVER_VOL_OWNED0(gv, c, idx) \ LOOP_OVER_IVECS(gv, (gv).little_owned_corner0(c), (gv).big_corner(), idx) #define LOOP_OVER_VOL_NOTOWNED(gv, c, idx) \ for (ivec loop_notowned_is((gv).dim,0), loop_notowned_ie((gv).dim,0); \ loop_notowned_is == zero_ivec((gv).dim);) \ for (int loop_ibound = 0; (gv).get_boundary_icorners(c, loop_ibound, \ &loop_notowned_is, \ &loop_notowned_ie); \ loop_ibound++) \ LOOP_OVER_IVECS(gv, loop_notowned_is, loop_notowned_ie, idx) #define LOOPS_ARE_STRIDE1(gv) ((gv).stride((gv).yucky_direction(2)) == 1) // The following work identically to the LOOP_* macros above, // but assume that the inner loop is stride-1: LOOPS_ARE_STRIDE1(gv) *must* // be true. These are useful in allowing gcc to auto-vectorize the inner // loop, since gcc's vectorizer requires the array stride to be known at // compile time. Note that stride-1 loops are the most common case in Meep. // Note that we also specify _Pragma("ivdep"), which is a hint to // compilers like icc (and hopefully gcc at some point) that the loop // iterations don't have data dependencies. This means that you // should only use these macros where that is true! (Basically, // all of this is here to support performance hacks of step_generic.) // loop over indices idx from is to ie (inclusive) in gv #define S1LOOP_OVER_IVECS(gv, is, ie, idx) \ for (int loop_is1 = (is).yucky_val(0), \ loop_is2 = (is).yucky_val(1), \ loop_is3 = (is).yucky_val(2), \ loop_n1 = ((ie).yucky_val(0) - loop_is1) / 2 + 1, \ loop_n2 = ((ie).yucky_val(1) - loop_is2) / 2 + 1, \ loop_n3 = ((ie).yucky_val(2) - loop_is3) / 2 + 1, \ loop_d1 = (gv).yucky_direction(0), \ loop_d2 = (gv).yucky_direction(1), \ loop_s1 = (gv).stride((direction) loop_d1), \ loop_s2 = (gv).stride((direction) loop_d2), \ loop_s3 = 1, \ idx0 = (is - (gv).little_corner()).yucky_val(0) / 2 * loop_s1 \ + (is - (gv).little_corner()).yucky_val(1) / 2 * loop_s2 \ + (is - (gv).little_corner()).yucky_val(2) / 2 * loop_s3,\ loop_i1 = 0; loop_i1 < loop_n1; loop_i1++) \ for (int loop_i2 = 0; loop_i2 < loop_n2; loop_i2++) _Pragma("ivdep") \ for (int idx = idx0 + loop_i1*loop_s1 + loop_i2*loop_s2, \ loop_i3 = 0; loop_i3 < loop_n3; loop_i3++, idx++) #define S1LOOP_OVER_VOL(gv, c, idx) \ S1LOOP_OVER_IVECS(gv, (gv).little_corner() + (gv).iyee_shift(c), (gv).big_corner() + (gv).iyee_shift(c), idx) #define S1LOOP_OVER_VOL_OWNED(gv, c, idx) \ S1LOOP_OVER_IVECS(gv, (gv).little_owned_corner(c), (gv).big_corner(), idx) #define S1LOOP_OVER_VOL_OWNED0(gv, c, idx) \ S1LOOP_OVER_IVECS(gv, (gv).little_owned_corner0(c), (gv).big_corner(), idx) #define S1LOOP_OVER_VOL_NOTOWNED(gv, c, idx) \ for (ivec loop_notowned_is((gv).dim,0), loop_notowned_ie((gv).dim,0); \ loop_notowned_is == zero_ivec((gv).dim);) \ for (int loop_ibound = 0; (gv).get_boundary_icorners(c, loop_ibound, \ &loop_notowned_is, \ &loop_notowned_ie); \ loop_ibound++) \ S1LOOP_OVER_IVECS(gv, loop_notowned_is, loop_notowned_ie, idx) #define IVEC_LOOP_AT_BOUNDARY \ ((loop_s1 != 0 && (loop_i1 == 0 || loop_i1 == loop_n1-1)) || \ (loop_s2 != 0 && (loop_i2 == 0 || loop_i2 == loop_n2-1)) || \ (loop_s3 != 0 && (loop_i3 == 0 || loop_i3 == loop_n3-1))) #define IVEC_LOOP_ILOC(gv, iloc) \ ivec iloc((gv).dim); \ iloc.set_direction(direction(loop_d1), loop_is1 + 2*loop_i1); \ iloc.set_direction(direction(loop_d2), loop_is2 + 2*loop_i2); \ iloc.set_direction(direction(loop_d3), loop_is3 + 2*loop_i3) #define IVEC_LOOP_LOC(gv, loc) \ vec loc((gv).dim); \ loc.set_direction(direction(loop_d1), (0.5*loop_is1 + loop_i1) * (gv).inva); \ loc.set_direction(direction(loop_d2), (0.5*loop_is2 + loop_i2) * (gv).inva); \ loc.set_direction(direction(loop_d3), (0.5*loop_is3 + loop_i3) * (gv).inva) // integration weight for using LOOP_OVER_IVECS with field::integrate #define IVEC_LOOP_WEIGHT1x(s0, s1, e0, e1, i, n, dir) ((i > 1 && i < n - 2) ? 1.0 : (i == 0 ? (s0).in_direction(direction(dir)) : (i == 1 ? (s1).in_direction(direction(dir)) : i == n - 1 ? (e0).in_direction(direction(dir)) : (i == n - 2 ? (e1).in_direction(direction(dir)) : 1.0)))) #define IVEC_LOOP_WEIGHT1(s0, s1, e0, e1, k) IVEC_LOOP_WEIGHT1x(s0, s1, e0, e1, loop_i##k,loop_n##k,loop_d##k) #define IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV) (IVEC_LOOP_WEIGHT1(s0, s1, e0, e1, 3) * (IVEC_LOOP_WEIGHT1(s0, s1, e0, e1, 2) * ((dV) * IVEC_LOOP_WEIGHT1(s0, s1, e0, e1, 1)))) inline signed_direction flip(signed_direction d) { signed_direction d2 = d; d2.flipped = !d.flipped; return d2; } inline bool has_direction(ndim dim, direction d) { LOOP_OVER_DIRECTIONS(dim, dd) if (dd == d) return true; return false; } inline bool has_field_direction(ndim dim, direction d) { LOOP_OVER_FIELD_DIRECTIONS(dim, dd) if (dd == d) return true; return false; } // true if d is polar while dim is cartesian, or vice versa inline bool coordinate_mismatch(ndim dim, direction d) { return (d != NO_DIRECTION && ((dim >= D1 && dim <= D3 && d != X && d != Y && d != Z) || (dim == Dcyl && d != R && d != P && d != Z))); } bool is_tm(component c); extern void abort(const char *, ...); // mympi.cpp inline bool is_electric(component c) { return c < Hx; } inline bool is_magnetic(component c) { return c >= Hx && c < Dx; } inline bool is_D(component c) { return c >= Dx && c < Bx; } inline bool is_B(component c) { return c >= Bx && c < Dielectric; } inline bool is_derived(int c) { return c >= Sx; } inline bool is_poynting(derived_component c) { return c < EnergyDensity; } inline bool is_energydensity(derived_component c) { return c>=EnergyDensity; } inline field_type type(component c) { if (is_electric(c)) return E_stuff; else if (is_magnetic(c)) return H_stuff; else if (is_D(c)) return D_stuff; else if (is_B(c)) return B_stuff; abort("Invalid field in type.\n"); return E_stuff; // This is never reached. } const char *component_name(component c); const char *component_name(derived_component c); const char *component_name(int c); const char *direction_name(direction); const char *dimension_name(ndim); inline int component_index(component c) { switch (c) { case Ex: case Hx: case Dx: case Bx: return 0; case Ey: case Hy: case Dy: case By: return 1; case Ez: case Hz: case Dz: case Bz: return 2; case Er: case Hr: case Dr: case Br: return 0; case Ep: case Hp: case Dp: case Bp: return 1; case Dielectric: return -1; case Permeability: return -1; } return -2; // This code is never reached... } direction component_direction(int c); int direction_component(int c, direction d); inline direction component_direction(component c) { switch (c) { case Ex: case Hx: case Dx: case Bx: return X; case Ey: case Hy: case Dy: case By: return Y; case Ez: case Hz: case Dz: case Bz: return Z; case Er: case Hr: case Dr: case Br: return R; case Ep: case Hp: case Dp: case Bp: return P; case Dielectric: return NO_DIRECTION; case Permeability: return NO_DIRECTION; } return X; // This code is never reached... } inline direction component_direction(derived_component c) { switch (c) { case Sx: return X; case Sy: return Y; case Sz: return Z; case Sr: return R; case Sp: return P; case EnergyDensity: case D_EnergyDensity: case H_EnergyDensity: return NO_DIRECTION; } return X; // This code is never reached... } inline direction component_direction(int c) { if (is_derived(c)) return component_direction(derived_component(c)); else return component_direction(component(c)); } inline component direction_component(component c, direction d) { component start_point; if (is_electric(c)) start_point = Ex; else if (is_magnetic(c)) start_point = Hx; else if (is_D(c)) start_point = Dx; else if (is_B(c)) start_point = Bx; else if (c == Dielectric && d == NO_DIRECTION) return Dielectric; else if (c == Permeability && d == NO_DIRECTION) return Permeability; else abort("unknown field component %d", c); switch (d) { case X: return start_point; case Y: return (component) (start_point + 1); case Z: return (component) (start_point + 4); case R: return (component) (start_point + 2); case P: return (component) (start_point + 3); case NO_DIRECTION: abort("vector %d component in NO_DIRECTION", c); } return Ex; // This is never reached. } inline derived_component direction_component(derived_component c, direction d) { derived_component start_point; if (is_poynting(c)) start_point = Sx; else if (is_energydensity(c) && d == NO_DIRECTION) return c; else abort("unknown field component %d", c); switch (d) { case X: return start_point; case Y: return (derived_component) (start_point + 1); case Z: return (derived_component) (start_point + 4); case R: return (derived_component) (start_point + 2); case P: return (derived_component) (start_point + 3); case NO_DIRECTION: abort("vector %d derived_component in NO_DIRECTION", c); } return Sx; // This is never reached. } inline int direction_component(int c, direction d) { if (is_derived(c)) return int(direction_component(derived_component(c), d)); else return int(direction_component(component(c), d)); } inline component field_type_component(field_type ft, component c) { return direction_component(first_field_component(ft), component_direction(c)); } inline bool coordinate_mismatch(ndim dim, component c) { return coordinate_mismatch(dim, component_direction(c)); } inline bool coordinate_mismatch(ndim dim, derived_component c) { return coordinate_mismatch(dim, component_direction(c)); } // cyclically shift a direction d or a component c by shift // assumes: shift >= -99, {d, component_direction(c)} != NO_DIRECTION, // and has_direction(dim, {d, component_direction(c)}) inline direction cycle_direction(ndim dim, direction d, int shift) { int start = dim == Dcyl ? 2 : 0; return direction((d - start + shift + 99) % 3 + start); } inline component cycle_component(ndim dim, component c, int shift) { return direction_component(c, cycle_direction(dim, component_direction(c), shift)); } class vec; vec veccyl(double rr, double zz); vec zero_vec(ndim); class vec { public: vec() {}; vec(ndim di) { dim = di; }; vec(ndim di, double val) { dim = di; t[0]=t[1]=t[2]=t[3]=t[4]=val; }; vec(double zz) { dim = D1; t[Z] = zz; }; vec(double xx, double yy) { dim = D2; t[X] = xx; t[Y] = yy; }; vec(double xx, double yy, double zz) { dim = D3; t[X] = xx; t[Y] = yy; t[Z] = zz; }; friend vec veccyl(double rr, double zz); ~vec() {}; vec operator+(const vec &a) const { vec result = a; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] += t[d]; return result; }; vec operator+=(const vec &a) { LOOP_OVER_DIRECTIONS(dim, d) t[d] += a.t[d]; return *this; }; vec operator-(const vec &a) const { vec result = a; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = t[d] - result.t[d]; return result; }; vec operator-(void) const { vec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = -t[d]; return result; }; vec operator-=(const vec &a) { LOOP_OVER_DIRECTIONS(dim, d) t[d] -= a.t[d]; return *this; }; bool operator!=(const vec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] != a.t[d]) return true; return false; }; bool operator==(const vec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] != a.t[d]) return false; return true; }; vec round_float(void) const { vec result = *this; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = float(result.t[d]); return result; } vec operator*(double s) const { vec result = *this; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] *= s; return result; }; vec operator/(double s) const { vec result = *this; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] *= (1.0/s); return result; }; // I use & as a dot product. double operator&(const vec &a) const { double result = 0.0; LOOP_OVER_DIRECTIONS(dim, d) result += t[d] * a.t[d]; return result; }; ndim dim; double r() const { return t[R]; }; double x() const { return t[X]; }; double y() const { return t[Y]; }; double z() const { return t[Z]; }; double in_direction(direction d) const { return t[d]; }; void set_direction(direction d, double val) { t[d] = val; }; double project_to_boundary(direction, double boundary_loc); friend vec zero_vec(ndim); friend vec one_vec(ndim); private: double t[5]; }; inline double abs(const vec &pt) { return sqrt(pt & pt); } inline vec zero_vec(ndim di) { vec pt(di); LOOP_OVER_DIRECTIONS(di, d) pt.set_direction(d, 0.0); return pt; } inline vec one_vec(ndim di) { vec pt(di); LOOP_OVER_DIRECTIONS(di, d) pt.set_direction(d, 1.0); return pt; } inline vec unit_vec(ndim di, direction d) { vec pt(zero_vec(di)); pt.set_direction(d, 1.0); return pt; } inline vec clean_vec(const vec &pt, double val_unused = 0.0) { vec ptc(pt.dim, val_unused); LOOP_OVER_DIRECTIONS(pt.dim, d) ptc.set_direction(d, pt.in_direction(d)); return ptc; } inline vec veccyl(double rr, double zz) { vec pt(Dcyl); pt.t[R] = rr; pt.t[Z] = zz; return pt; } class ivec; ivec iveccyl(int xx, int yy); ivec zero_ivec(ndim); ivec one_ivec(ndim); class ivec { public: ivec() { dim = D2; t[X] = t[Y] = 0; }; ivec(ndim di) { dim = di; }; ivec(ndim di, int val) { dim = di; t[0]=t[1]=t[2]=t[3]=t[4]=val; }; ivec(int zz) { dim = D1; t[Z] = zz; }; ivec(int xx, int yy) { dim = D2; t[X] = xx; t[Y] = yy; }; ivec(int xx, int yy, int zz) { dim = D3; t[X] = xx; t[Y] = yy; t[Z] = zz; }; friend ivec iveccyl(int xx, int yy); ~ivec() {}; // Only an idiot (or a macro) would use a yucky function. Don't be an // idiot. int yucky_val(int) const; ivec operator+(const ivec &a) const { ivec result = a; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] += t[d]; return result; }; ivec operator+=(const ivec &a) { LOOP_OVER_DIRECTIONS(dim, d) t[d] += a.t[d]; return *this; }; ivec operator-(const ivec &a) const { ivec result = a; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = t[d] - result.t[d]; return result; }; ivec operator-(void) const { ivec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = -t[d]; return result; }; ivec operator-=(const ivec &a) { LOOP_OVER_DIRECTIONS(dim, d) t[d] -= a.t[d]; return *this; }; bool operator!=(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] != a.t[d]) return true; return false; }; bool operator==(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] != a.t[d]) return false; return true; }; bool operator<=(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] > a.t[d]) return false; return true; }; bool operator>=(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] < a.t[d]) return false; return true; }; bool operator<(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] >= a.t[d]) return false; return true; }; bool operator>(const ivec &a) const { LOOP_OVER_DIRECTIONS(dim, d) if (t[d] <= a.t[d]) return false; return true; }; ivec operator*(int s) const { ivec result = *this; LOOP_OVER_DIRECTIONS(dim, d) result.t[d] *= s; return result; }; vec operator*(double s) const { vec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.set_direction(d, t[d] * s); return result; }; ndim dim; int r() const { return t[R]; }; int x() const { return t[X]; }; int y() const { return t[Y]; }; int z() const { return t[Z]; }; int in_direction(direction d) const { return t[d]; }; void set_direction(direction d, int val) { t[d] = val; }; ivec round_up_to_even(void) const { ivec result(dim); LOOP_OVER_DIRECTIONS(dim, d) result.t[d] = t[d] + (t[d] >= 0 ? t[d] : -t[d]) % 2; return result; } friend ivec zero_ivec(ndim); friend ivec one_ivec(ndim); private: int t[5]; }; inline ivec zero_ivec(ndim di) { ivec pt; pt.dim = di; LOOP_OVER_DIRECTIONS(di, d) pt.set_direction(d, 0); return pt; } inline ivec one_ivec(ndim di) { ivec pt; pt.dim = di; LOOP_OVER_DIRECTIONS(di, d) pt.set_direction(d, 1); return pt; } inline ivec unit_ivec(ndim di, direction d) { ivec pt(zero_ivec(di)); pt.set_direction(d, 1); return pt; } inline ivec iveccyl(int rr, int zz) { ivec pt(Dcyl); pt.t[R] = rr; pt.t[Z] = zz; return pt; } vec max(const vec &vec1, const vec &vec2); vec min(const vec &vec1, const vec &vec2); ivec max(const ivec &ivec1, const ivec &ivec2); ivec min(const ivec &ivec1, const ivec &ivec2); ivec max_to_all(const ivec &); // in mympi.cpp class volume { public: ndim dim; volume(ndim di) { dim = di; min_corner.dim = di; max_corner.dim = di; }; volume(const vec &vec1, const vec &vec2); volume(const vec &pt); void set_direction_min(direction d, double val) { min_corner.set_direction(d, val); }; void set_direction_max(direction d, double val) { max_corner.set_direction(d, val); }; double in_direction_min(direction d) const { return min_corner.in_direction(d); }; double in_direction_max(direction d) const { return max_corner.in_direction(d); }; double in_direction(direction d) const { return in_direction_max(d) - in_direction_min(d); } double computational_volume() const; double integral_volume() const; double full_volume() const; vec center() const { return (min_corner + max_corner) * 0.5; } double diameter() const; bool contains(const vec &h) const; bool contains(const volume &a) const; volume intersect_with(const volume &a) const; volume operator&(const volume &a) const { return intersect_with(a); }; volume operator|(const volume &a) const { return volume(min(min_corner, a.min_corner), max(max_corner, a.max_corner)); }; volume operator+(const vec &a) const { return volume(min_corner + a, max_corner + a); } volume operator+=(const vec &a) { min_corner += a; max_corner += a; return *this; } volume operator-(const vec &a) const { return volume(min_corner - a, max_corner - a); } volume operator-=(const vec &a) { min_corner -= a; max_corner -= a; return *this; } bool operator==(const volume &a) const { return (min_corner == a.min_corner && max_corner == a.max_corner); } bool operator!=(const volume &a) const { return !(*this == a); }; volume round_float(void) const { return volume(min_corner.round_float(),max_corner.round_float()); } bool intersects(const volume &a) const; bool operator&&(const volume &a) const { return intersects(a); }; vec get_min_corner() const { return min_corner; }; vec get_max_corner() const { return max_corner; }; direction normal_direction() const; private: vec min_corner, max_corner; }; class grid_volume; grid_volume volcyl(double rsize, double zsize, double a); grid_volume volone(double zsize, double a); grid_volume vol1d(double zsize, double a); grid_volume voltwo(double xsize, double ysize, double a); grid_volume vol2d(double xsize, double ysize, double a); grid_volume vol3d(double xsize, double ysize, double zsize, double a); class grid_volume { public: grid_volume() {}; ndim dim; double a, inva /* = 1/a */; void print() const; int stride(direction d) const { return the_stride[d]; }; int num_direction(direction d) const { return num[((int) d) % 3]; }; // Only an idiot (or a macro) would use a yucky function. Don't be an // idiot. int yucky_num(int) const; direction yucky_direction(int) const; void set_num_direction(direction d, int value); int nr() const { return num_direction(R); } int nx() const { return num_direction(X); } int ny() const { return num_direction(Y); } int nz() const { return num_direction(Z); } bool has_field(component c) const { if (dim == D1) return c == Ex || c == Hy || c == Dx || c == By; return (dim == Dcyl)?component_direction(c)>Y:component_direction(c) phase_shift(component, int n) const; derived_component transform(derived_component, int n) const; complex phase_shift(derived_component, int n) const; int transform(int, int n) const; complex phase_shift(int, int n) const; int multiplicity() const; bool is_primitive(const ivec &) const; volume_list *reduce(const volume_list *gl) const; symmetry operator+(const symmetry &) const; symmetry operator*(complex) const; symmetry operator-(const symmetry &b) const { return *this + b * (-1.0); } symmetry operator-(void) const { return *this * (-1.0); } void operator=(const symmetry &); bool operator==(const symmetry &) const; bool operator!=(const symmetry &S) const { return !(*this == S); }; private: signed_direction S[5]; complex ph; vec symmetry_point; ivec i_symmetry_point; int g; // g is the multiplicity of the symmetry. symmetry *next; friend symmetry r_to_minus_r_symmetry(double m); }; class volume_list { public: volume_list(const volume &v, int c, complex weight = 1.0, volume_list *next = 0) : v(v), c(c), weight(weight), next(next) {} ~volume_list() { delete next; } volume v; int c; // component or derived component associated with v (e.g. for flux) complex weight; volume_list *next; }; } /* namespace meep */ #endif /* MEEP_VEC_H */ meep-openmpi-1.1.1/src/time.cpp0000644000175200017520000000374211243101206015564 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "meep.hpp" namespace meep { void fields::finished_working() { double now = wall_time(); if (last_wall_time >= 0) times_spent[working_on] += now - last_wall_time; last_wall_time = now; working_on = was_working_on; was_working_on = Other; } void fields::am_now_working_on(time_sink s) { double now = wall_time(); if (last_wall_time >= 0) times_spent[working_on] += now - last_wall_time; last_wall_time = now; was_working_on = working_on; working_on = s; } double fields::time_spent_on(time_sink s) { return times_spent[s]; } static const char *ts2n(time_sink s) { switch (s) { case Stepping: return "time stepping"; case Connecting: return "connnecting chunks"; case Boundaries: return "copying borders"; case MpiTime: return "communicating"; case FieldOutput: return "outputting fields"; case FourierTransforming: return "Fourier transforming"; case Other: break; } return "everything else"; } static void pt(double ts[], time_sink s) { if (ts[s]) master_printf(" %18s: %g s\n", ts2n(s), ts[s]); } void fields::print_times() { master_printf("\nField time usage:\n"); for (int i=0;i<=Other;i++) pt(times_spent, (time_sink) i); master_printf("\n"); } } // namespace meep meep-openmpi-1.1.1/src/Makefile.am0000644000175200017520000000264511243043527016172 0ustar debiandebianlib_LTLIBRARIES = libmeep@MEEP_SUFFIX@.la include_HEADERS = meep.hpp pkginclude_HEADERS = meep/mympi.hpp meep/vec.hpp AM_CPPFLAGS = -I$(top_srcdir)/src BUILT_SOURCES = sphere-quad.h step_generic_stride1.cpp HDRS = meep.hpp meep_internals.hpp meep/mympi.hpp meep/vec.hpp \ bicgstab.hpp libmeep@MEEP_SUFFIX@_la_SOURCES = anisotropic_averaging.cpp bands.cpp \ boundaries.cpp bicgstab.cpp casimir.cpp control_c.cpp cw_fields.cpp \ dft.cpp energy_and_flux.cpp fields.cpp loop_in_chunks.cpp grace.cpp \ h5fields.cpp h5file.cpp initialize.cpp integrate.cpp integrate2.cpp \ monitor.cpp mympi.cpp output_directory.cpp polarization.cpp \ sources.cpp step.cpp step_db.cpp stress.cpp structure.cpp time.cpp \ update_eh.cpp mpb.cpp update_pols.cpp vec.cpp step_generic.cpp $(HDRS) \ $(BUILT_SOURCES) libmeep@MEEP_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ PRELUDE = "/* This file was automatically generated --- DO NOT EDIT */" noinst_PROGRAMS = sphere_quad sphere_quad_SOURCES = sphere-quad.cpp SPHERE_QUAD = $(top_builddir)/src/sphere_quad sphere-quad.h: make sphere_quad (echo $(PRELUDE); echo; $(SPHERE_QUAD)) > $@ step_generic_stride1.cpp: step_generic.cpp (echo $(PRELUDE); echo; sed 's/LOOP_OVER/S1LOOP_OVER/g' $(top_srcdir)/src/step_generic.cpp | sed 's/step_curl/step_curl_stride1/' | sed 's/step_update_EDHB/step_update_EDHB_stride1/' | sed 's/step_beta/step_beta_stride1/') > $@ MAINTAINERCLEANFILES = $(BUILT_SOURCES) meep-openmpi-1.1.1/src/step_db.cpp0000644000175200017520000003757611243155227016276 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #define RESTRICT namespace meep { void fields::step_db(field_type ft) { for (int i=0;iis_mine()) if (chunks[i]->step_db(ft)) chunk_connections_valid = false; /* synchronize to avoid deadlocks in connect_the_chunks */ chunk_connections_valid = and_to_all(chunk_connections_valid); } bool fields_chunk::step_db(field_type ft) { bool allocated_u = false; if (ft != B_stuff && ft != D_stuff) abort("bug - step_db should only be called for B or D"); DOCMP FOR_FT_COMPONENTS(ft, cc) if (f[cc][cmp]) { const component c_p=plus_component[cc], c_m=minus_component[cc]; const direction d_deriv_p = plus_deriv_direction[cc]; const direction d_deriv_m = minus_deriv_direction[cc]; const direction d_c = component_direction(cc); const bool have_p = have_plus_deriv[cc]; const bool have_m = have_minus_deriv[cc]; const direction dsig0 = cycle_direction(gv.dim,d_c,1); const direction dsig = s->sigsize[dsig0] > 1 ? dsig0 : NO_DIRECTION; const direction dsigu0 = cycle_direction(gv.dim,d_c,2); const direction dsigu = s->sigsize[dsigu0] > 1 ? dsigu0 : NO_DIRECTION; int stride_p = have_p?gv.stride(d_deriv_p):0; int stride_m = have_m?gv.stride(d_deriv_m):0; realnum *f_p = have_p?f[c_p][cmp]:NULL; realnum *f_m = have_m?f[c_m][cmp]:NULL; realnum *the_f = f[cc][cmp]; if (dsig != NO_DIRECTION && s->conductivity[cc][d_c] && !f_cond[cc][cmp]) { f_cond[cc][cmp] = new realnum[gv.ntot()]; memset(f_cond[cc][cmp], 0, sizeof(realnum) * gv.ntot()); } if (dsigu != NO_DIRECTION && !f_u[cc][cmp]) { f_u[cc][cmp] = new realnum[gv.ntot()]; memcpy(f_u[cc][cmp], the_f, gv.ntot() * sizeof(realnum)); allocated_u = true; } if (ft == D_stuff) { // strides are opposite sign for H curl stride_p = -stride_p; stride_m = -stride_m; } if (gv.dim == Dcyl) switch (d_c) { case R: f_p = NULL; // im/r Fz term will be handled separately break; case P: break; // curl works normally for phi component case Z: { f_m = NULL; // im/r Fr term will be handled separately /* Here we do a somewhat cool hack: the update of the z component gives a 1/r d(r Fp)/dr term, rather than just the derivative dg/dr expected in step_curl. Rather than duplicating all of step_curl to handle this bloody derivative, however, we define a new array f_rderiv_int which is the integral of 1/r d(r Fp)/dr, so that we can pass it to the unmodified step_curl and get the correct derivative. (More precisely, the derivative and integral are replaced by differences and sums, but you get the idea). */ if (!f_rderiv_int) f_rderiv_int = new realnum[gv.ntot()]; double ir0 = gv.origin_r() * gv.a + 0.5 * gv.iyee_shift(c_p).in_direction(R); for (int iz = 0; iz <= gv.nz(); ++iz) f_rderiv_int[iz] = 0; int sr = gv.nz() + 1; for (int ir = 1; ir <= gv.nr(); ++ir) { double rinv = 1.0 / ((ir+ir0)-0.5); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; f_rderiv_int[idx] = f_rderiv_int[idx - sr] + rinv * (f_p[idx] * (ir+ir0) - f_p[idx - sr] * ((ir-1)+ir0)); } } f_p = f_rderiv_int; break; } default: abort("bug - non-cylindrical field component in Dcyl"); } STEP_CURL(the_f, cc, f_p, f_m, stride_p, stride_m, gv, Courant, dsig, s->sig[dsig], s->siginv[dsig], f_u[cc][cmp], dsigu, s->sig[dsigu], s->siginv[dsigu], dt, s->conductivity[cc][d_c], s->condinv[cc][d_c],f_cond[cc][cmp]); } /* In 2d with beta != 0, add beta terms. This is a trick to model an exp(i beta z) z-dependence but without requiring a "3d" calculation and without requiring complex fields. Looking at the z=0 2d cross-section, the exp(i beta z) term adds an i \beta \hat{z} \times cross-product to the curls, which couples the TE and TM polarizations. However, to avoid complex fields, in the case of real fields we implicitly store i*(TM fields) rather than the TM fields, in which case the i's cancel in the update equations. (Mathematically, this is equivalent to looking at the superposition of the fields at beta and the timereversed fields at -beta.) The nice thing about this is that most calculations of flux, energy, etcetera, are insensitive to this implicit "i" factor. For complex fields, we implement i*beta directly. */ if (gv.dim == D2 && beta != 0) DOCMP for (direction d_c=X; d_c <= Y; d_c = direction(d_c + 1)) { component cc = direction_component(first_field_component(ft), d_c); component c_g = direction_component(ft == D_stuff ? Hx : Ex, d_c == X ? Y : X); realnum *the_f = f[cc][cmp]; const realnum *g = f[c_g][1-cmp] ? f[c_g][1-cmp] : f[c_g][cmp]; const direction dsig0 = cycle_direction(gv.dim,d_c,1); const direction dsig = s->sigsize[dsig0] > 1 ? dsig0 : NO_DIRECTION; const direction dsigu0 = cycle_direction(gv.dim,d_c,2); const direction dsigu = s->sigsize[dsigu0] > 1 ? dsigu0 : NO_DIRECTION; const double betadt = 2 * pi * beta * dt * (d_c == X ? +1 : -1) * (f[c_g][1-cmp] ? (ft == D_stuff ? -1 : +1) * (2*cmp-1) : 1); STEP_BETA(the_f, cc, g, gv, betadt, dsig, s->siginv[dsig], f_u[cc][cmp], dsigu, s->siginv[dsigu], s->condinv[cc][d_c], f_cond[cc][cmp]); } // in cylindrical coordinates, we now have to add the i*m/r terms... */ if (gv.dim == Dcyl && m != 0) DOCMP FOR_FT_COMPONENTS(ft, cc) { const direction d_c = component_direction(cc); if (f[cc][cmp] && (d_c == R || d_c == Z)) { const component c_g = d_c==R ? plus_component[cc] : minus_component[cc]; const realnum *g = f[c_g][1-cmp]; realnum *the_f = f[cc][cmp]; const realnum *cndinv = s->condinv[cc][d_c]; realnum *fcnd = f_cond[cc][cmp]; realnum *fu = f_u[cc][cmp]; const direction dsig = cycle_direction(gv.dim,d_c,1); const double *siginv = s->sigsize[dsig] > 1 ? s->siginv[dsig] : 0; const int dk = gv.iyee_shift(cc).in_direction(dsig); const direction dsigu = cycle_direction(gv.dim,d_c,2); const double *siginvu = s->sigsize[dsigu] > 1 ? s->siginv[dsigu] : 0; const int dku = gv.iyee_shift(cc).in_direction(dsigu); const double the_m = m * (1-2*cmp) * (1-2*(ft==B_stuff)) * (1-2*(d_c==R)) * Courant; const double ir0 = gv.origin_r() * gv.a + 0.5 * gv.iyee_shift(cc).in_direction(R); int sr = gv.nz() + 1; // 8 special cases of the same loop (sigh): if (siginv) { // PML in f update if (siginvu) { // PML + fu if (cndinv) // PML + fu + conductivity //////////////////// MOST GENERAL CASE ////////////////////// for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int k = dk + 2*(dsig==Z ? iz : ir); int ku = dku + 2*(dsigu==Z ? iz : ir); double df, dfcnd = rinv * g[idx] * cndinv[idx]; fcnd[idx] += dfcnd; fu[idx] += (df = dfcnd * siginv[k]); the_f[idx] += siginvu[ku] * df; } } ///////////////////////////////////////////////////////////// else // PML + fu - conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int k = dk + 2*(dsig==Z ? iz : ir); int ku = dku + 2*(dsigu==Z ? iz : ir); double df, dfcnd = rinv * g[idx]; fu[idx] += (df = dfcnd * siginv[k]); the_f[idx] += siginvu[ku] * df; } } } else { // PML - fu if (cndinv) // PML - fu + conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int k = dk + 2*(dsig==Z ? iz : ir); double dfcnd = rinv * g[idx] * cndinv[idx]; fcnd[idx] += dfcnd; the_f[idx] += dfcnd * siginv[k]; } } else // PML - fu - conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int k = dk + 2*(dsig==Z ? iz : ir); double dfcnd = rinv * g[idx]; the_f[idx] += dfcnd * siginv[k]; } } } } else { // no PML in f update if (siginvu) { // no PML + fu if (cndinv) // no PML + fu + conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int ku = dku + 2*(dsigu==Z ? iz : ir); double df = rinv * g[idx] * cndinv[idx]; fu[idx] += df; the_f[idx] += siginvu[ku] * df; } } else // no PML + fu - conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; int ku = dku + 2*(dsigu==Z ? iz : ir); double df = rinv * g[idx]; fu[idx] += df; the_f[idx] += siginvu[ku] * df; } } } else { // no PML - fu if (cndinv) // no PML - fu + conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; the_f[idx] += rinv * g[idx] * cndinv[idx]; } } else // no PML - fu - conductivity for (int ir = ir0 == 0; ir <= gv.nr(); ++ir) { double rinv = the_m / (ir+ir0); for (int iz = 0; iz <= gv.nz(); ++iz) { int idx = ir*sr + iz; the_f[idx] += rinv * g[idx]; } } } } } } #define ZERO_Z(array) memset(array, 0, sizeof(realnum)*(nz+1)); // deal with annoying r=0 boundary conditions for m=0 and m=1 if (gv.dim == Dcyl && gv.origin_r() == 0.0) DOCMP { const int nz = gv.nz(); if (m == 0 && ft == D_stuff && f[Dz][cmp]) { // d(Dz)/dt = (1/r) * d(r*Hp)/dr const realnum *g = f[Hp][cmp]; const realnum *cndinv = s->condinv[Dz][Z]; realnum *fcnd = f_cond[Dz][cmp]; const direction dsig = cycle_direction(gv.dim,Z,1); const double *siginv = s->sigsize[dsig] > 1 ? s->siginv[dsig] : 0; const int dk = gv.iyee_shift(Dz).in_direction(dsig); const direction dsigu = cycle_direction(gv.dim,Z,2); const double *siginvu = s->sigsize[dsigu] > 1 ? s->siginv[dsigu] : 0; const int dku = gv.iyee_shift(Dz).in_direction(dsigu); realnum *fu = siginvu && f_u[Dz][cmp] ? f[Dz][cmp] : 0; realnum *the_f = fu ? f_u[Dz][cmp] : f[Dz][cmp]; for (int iz = 0; iz < nz; ++iz) { // Note: old code (prior to Meep 0.2) was missing factor of 4?? double df, dfcnd = g[iz] * (Courant * 4) * (cndinv ? cndinv[iz] : 1); if (fcnd) fcnd[iz] += dfcnd; the_f[iz] += (df = dfcnd * (siginv ? siginv[dk + 2*(dsig==Z)*iz] : 1)); if (fu) fu[iz] += siginvu[dku + 2*(dsigu==Z)*iz] * df; } ZERO_Z(f[Dp][cmp]); if (f_cond[Dp][cmp]) ZERO_Z(f_cond[Dp][cmp]); if (f_u[Dp][cmp]) ZERO_Z(f_u[Dp][cmp]); } else if (m == 0 && ft == B_stuff && f[Br][cmp]) { ZERO_Z(f[Br][cmp]); if (f_cond[Br][cmp]) ZERO_Z(f_cond[Br][cmp]); if (f_u[Br][cmp]) ZERO_Z(f_u[Br][cmp]); } else if (fabs(m) == 1) { // D_stuff: d(Dp)/dt = d(Hr)/dz - d(Hz)/dr // B_stuff: d(Br)/dt = d(Ep)/dz - i*m*Ez/r component cc = ft == D_stuff ? Dp : Br; direction d_c = component_direction(cc); if (!f[cc][cmp]) continue; const realnum *f_p = f[ft == D_stuff ? Hr : Ep][cmp]; const realnum *f_m = ft == D_stuff ? f[Hz][cmp] : (f[Ez][1-cmp] + (nz+1)); const realnum *cndinv = s->condinv[cc][d_c]; realnum *fcnd = f_cond[cc][cmp]; const direction dsig = cycle_direction(gv.dim,d_c,1); const double *siginv = s->sigsize[dsig] > 1 ? s->siginv[dsig] : 0; const int dk = gv.iyee_shift(cc).in_direction(dsig); const direction dsigu = cycle_direction(gv.dim,d_c,2); const double *siginvu = s->sigsize[dsigu] > 1 ? s->siginv[dsigu] : 0; const int dku = gv.iyee_shift(cc).in_direction(dsigu); realnum *fu = siginvu && f_u[cc][cmp] ? f[cc][cmp] : 0; realnum *the_f = fu ? f_u[cc][cmp] : f[cc][cmp]; int sd = ft == D_stuff ? +1 : -1; double f_m_mult = ft == D_stuff ? 2 : (1-2*cmp); for (int iz = (ft == D_stuff); iz < nz + (ft == D_stuff); ++iz) { double df; double dfcnd = (sd*Courant) * (f_p[iz]-f_p[iz-sd] - f_m_mult*f_m[iz]) * (cndinv ? cndinv[iz] : 1); if (fcnd) fcnd[iz] += dfcnd; the_f[iz] += (df = dfcnd * (siginv ? siginv[dk + 2*(dsig==Z)*iz] : 1)); if (fu) fu[iz] += siginvu[dku + 2*(dsigu==Z)*iz] * df; } if (ft == D_stuff) { ZERO_Z(f[Dz][cmp]); if (f_cond[Dz][cmp]) ZERO_Z(f_cond[Dz][cmp]); if (f_u[Dz][cmp]) ZERO_Z(f_u[Dz][cmp]); } } else if (m != 0) { // m != {0,+1,-1} if (zero_fields_near_cylorigin) { /* default behavior */ /* I seem to recall David telling me that this was for numerical stability of some sort - the larger m is, the farther from the origin we need to be before we can use nonzero fields ... note that this is a fixed number of pixels for a given m, so it should still converge. Still, this is weird... Update: experimentally, this seems to indeed be important for stability. Setting these fields to zero, it seems to be stable with a Courant number < 0.62 or so for all m. Without this, it becomes unstable unless we set the Courant number to about 1 / (|m| + 0.5) or less. Cons: setting fields near the origin to identically zero is somewhat unexpected for users, and probably spoils 2nd-order accuracy, and may not fix all stability issues anyway (based on anecdotal evidence from Alex M. of having to reduce Courant for large m). */ double rmax = fabs(m) - int(gv.origin_r()*gv.a+0.5); if (ft == D_stuff) for (int r = 0; r <= gv.nr() && r < rmax; r++) { const int ir = r*(nz+1); ZERO_Z(f[Dp][cmp]+ir); ZERO_Z(f[Dz][cmp]+ir); if (f_cond[Dp][cmp]) ZERO_Z(f_cond[Dp][cmp]+ir); if (f_cond[Dz][cmp]) ZERO_Z(f_cond[Dz][cmp]+ir); if (f_u[Dp][cmp]) ZERO_Z(f_u[Dp][cmp]+ir); if (f_u[Dz][cmp]) ZERO_Z(f_u[Dz][cmp]+ir); } else for (int r = 0; r <= gv.nr() && r < rmax; r++) { const int ir = r*(nz+1); ZERO_Z(f[Br][cmp]+ir); if (f_cond[Br][cmp]) ZERO_Z(f_cond[Br][cmp]+ir); if (f_u[Br][cmp]) ZERO_Z(f_u[Br][cmp]+ir); } } else { /* Without David's hack: just set boundary conditions at r=0. This seems to be unstable unless we make the Courant number around 1 / (|m| + 0.5) or smaller. Pros: probably maintains 2nd-order accuracy, is more sane for r near zero. Cons: 1/(|m|+0.5) is purely empirical (no theory yet), and I'm not sure how universal it is. Makes higher m's more expensive. */ if (ft == D_stuff) { ZERO_Z(f[Dp][cmp]); ZERO_Z(f[Dz][cmp]); if (f_cond[Dp][cmp]) ZERO_Z(f_cond[Dp][cmp]); if (f_cond[Dz][cmp]) ZERO_Z(f_cond[Dz][cmp]); if (f_u[Dp][cmp]) ZERO_Z(f_u[Dp][cmp]); if (f_u[Dz][cmp]) ZERO_Z(f_u[Dz][cmp]); } else { ZERO_Z(f[Br][cmp]); if (f_cond[Br][cmp]) ZERO_Z(f_cond[Br][cmp]); if (f_u[Br][cmp]) ZERO_Z(f_u[Br][cmp]); } } } } return allocated_u; } } // namespace meep meep-openmpi-1.1.1/src/bicgstab.cpp0000644000175200017520000001515111243101206016401 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include "meep/mympi.hpp" #include "bicgstab.hpp" #include "config.h" /* bicgstab() implements an iterative solver for non-symmetric linear operators, using the algorithm described in: Gerard L. G. Sleijpen and Diederik R. Fokkema, "BiCGSTAB(L) for linear equations involving unsymmetric matrices with complex spectrum," Electronic Trans. on Numerical Analysis 1, 11-32 (1993). and also: Gerard L.G. Sleijpen, Henk A. van der Vorst, and Diederik R. Fokkema, " BiCGstab(L) and other Hybrid Bi-CG Methods," Numerical Algorithms 7, 75-109 (1994). This is a generalization of the stabilized biconjugate-gradient (BiCGSTAB) algorithm proposed by van der Vorst (and described in the book _Templates for the Solution of Linear Systems_ by Barrett et al.) BiCGSTAB(1) is equivalent to BiCGSTAB, and BiCGSTAB(2) is a slightly more efficient version of the BiCGSTAB2 algorithm by Gutknecht, while BiCGSTAB(L>2) is a further generalization. The reason that we use this generalization of BiCGSTAB is that the BiCGSTAB(1) algorithm was observed by Sleijpen and Fokkema to have poor (or even failing) convergence when the linear operator has near-pure imaginary eigenvalues. This is precisely the case for our problem (the eigenvalues of the timestep operator are i*omega), and we observed precisely such stagnation of convergence. The BiCGSTAB(2) algorithm was reported to fix most such convergence problems, and indeed L > 1 seems to converge well for us. */ /* Other variations to explore: G. L. G. Sleijpen and H. A. van der Vorst, "Reliable updated residuals in hybrid Bi-CG methods," Computing 56 (2), 141-163 (1996). G. L. G. Sleijpen and H. A. van der Vorst, "Maintaining convergence properties of BiCGstab methods in finite precision arithmetic," Numerical Algorithms 10, 203-223 (1995). See also code on Sleijpen's web page: http://www.math.uu.nl/people/sleijpen/ */ namespace meep { static double dot(int n, const realnum *x, const realnum *y) { double sum = 0; for (int i = 0; i < n; ++i) sum += x[i] * y[i]; return sum_to_all(sum); } static double norm2(int n, const realnum *x) { return sqrt(dot(n, x, x)); } static void xpay(int n, realnum *x, double a, const realnum *y) { for (int m = 0; m < n; ++m) x[m] += a * y[m]; } #define MIN_OUTPUT_TIME 4.0 // output no more often than this many seconds typedef realnum *prealnum; // grr, ISO C++ forbids new (double*)[...] /* BiCGSTAB(L) algorithm for the n-by-n problem Ax = b */ int bicgstabL(const int L, const int n, realnum *x, bicgstab_op A, void *Adata, const realnum *b, const double tol, int *iters, realnum *work, const bool quiet) { if (!work) return (2*L+3)*n; // required workspace prealnum *r = new prealnum[L+1]; prealnum *u = new prealnum[L+1]; for (int i = 0; i <= L; ++i) { r[i] = work + i * n; u[i] = work + (L+1 + i) * n; } double bnrm = norm2(n, b); if (bnrm == 0.0) bnrm = 1.0; int iter = 0; double last_output_wall_time = wall_time(); double *gamma = new double[L + 1]; double *gamma_p = new double[L + 1]; double *gamma_pp = new double[L + 1]; double *tau = new double[L * L]; double *sigma = new double[L + 1]; int ierr = 0; // error code to return, if any const double breaktol = 1e-30; /**** FIXME: check for breakdown conditions(?) during iteration ****/ // rtilde = r[0] = b - Ax realnum *rtilde = work + (2*L+2) * n; A(x, r[0], Adata); for (int m = 0; m < n; ++m) rtilde[m] = r[0][m] = b[m] - r[0][m]; { /* Sleipjen normalizes rtilde in his code; it seems to help slightly */ double s = 1.0 / norm2(n, rtilde); for (int m = 0; m < n; ++m) rtilde[m] *= s; } memset(u[0], 0, sizeof(realnum) * n); // u[0] = 0 double rho = 1.0, alpha = 0, omega = 1; double resid; while ((resid = norm2(n, r[0])) > tol * bnrm) { ++iter; if (!quiet && wall_time() > last_output_wall_time + MIN_OUTPUT_TIME) { master_printf("residual[%d] = %g\n", iter, resid / bnrm); last_output_wall_time = wall_time(); } rho = -omega * rho; for (int j = 0; j < L; ++j) { if (fabs(rho) < breaktol) { ierr = -1; goto finish; } double rho1 = dot(n, r[j], rtilde); double beta = alpha * rho1 / rho; rho = rho1; for (int i = 0; i <= j; ++i) for (int m = 0; m < n; ++m) u[i][m] = r[i][m] - beta * u[i][m]; A(u[j], u[j+1], Adata); alpha = rho / dot(n, u[j+1], rtilde); for (int i = 0; i <= j; ++i) xpay(n, r[i], -alpha, u[i+1]); A(r[j], r[j+1], Adata); xpay(n, x, alpha, u[0]); } for (int j = 1; j <= L; ++j) { for (int i = 1; i < j; ++i) { int ij = (j-1)*L + (i-1); tau[ij] = dot(n, r[j], r[i]) / sigma[i]; xpay(n, r[j], -tau[ij], r[i]); } sigma[j] = dot(n, r[j],r[j]); gamma_p[j] = dot(n, r[0], r[j]) / sigma[j]; } omega = gamma[L] = gamma_p[L]; for (int j = L-1; j >= 1; --j) { gamma[j] = gamma_p[j]; for (int i = j+1; i <= L; ++i) gamma[j] -= tau[(i-1)*L + (j-1)] * gamma[i]; } for (int j = 1; j < L; ++j) { gamma_pp[j] = gamma[j+1]; for (int i = j+1; i < L; ++i) gamma_pp[j] += tau[(i-1)*L + (j-1)] * gamma[i+1]; } xpay(n, x, gamma[1], r[0]); xpay(n, r[0], -gamma_p[L], r[L]); xpay(n, u[0], -gamma[L], u[L]); for (int j = 1; j < L; ++j) { /* TODO: use blas DGEMV (for L > 2) */ xpay(n, x, gamma_pp[j], r[j]); xpay(n, r[0], -gamma_p[j], r[j]); xpay(n, u[0], -gamma[j], u[j]); } if (iter == *iters) { ierr = 1; break; } } if (!quiet) master_printf("final residual = %g\n", norm2(n, r[0]) / bnrm); finish: delete[] sigma; delete[] tau; delete[] gamma_pp; delete[] gamma_p; delete[] gamma; delete[] u; delete[] r; *iters = iter; return ierr; } } // namespace meep meep-openmpi-1.1.1/src/dft.cpp0000644000175200017520000003523311243101224015403 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" namespace meep { struct dft_chunk_data { // for passing to field::loop_in_chunks as void* double omega_min, domega; int Nomega; component c; complex weight, extra_weight; bool include_dV_and_interp_weights; bool sqrt_dV_and_interp_weights; dft_chunk *dft_chunks; }; dft_chunk::dft_chunk(fields_chunk *fc_, ivec is_, ivec ie_, vec s0_, vec s1_, vec e0_, vec e1_, double dV0_, double dV1_, complex extra_weight_, complex scale_, component c_, bool use_centered_grid, const void *data_) { dft_chunk_data *data = (dft_chunk_data *) data_; if (!fc_->f[c_][0]) abort("invalid fields_chunk/component combination in dft_chunk"); fc = fc_; is = is_; ie = ie_; s0 = s0_; s1 = s1_; e0 = e0_; e1 = e1_; if (data->include_dV_and_interp_weights) { dV0 = dV0_; dV1 = dV1_; } else { /* this is for e.g. computing E x H, where we don't want to multiply by the interpolation weights or the grid_volume twice. */ dV0 = 1; dV1 = 0; LOOP_OVER_DIRECTIONS(fc->gv.dim, d) { s0.set_direction(d, 1.0); s1.set_direction(d, 1.0); e0.set_direction(d, 1.0); e1.set_direction(d, 1.0); } } /* an alternative way to avoid multipling by interpolation weights twice: multiply by square root of the weights */ sqrt_dV_and_interp_weights = data->sqrt_dV_and_interp_weights; scale = scale_ * data->weight; extra_weight = extra_weight_; c = c_; if (use_centered_grid) fc->gv.yee2cent_offsets(c, avg1, avg2); else avg1 = avg2 = 0; omega_min = data->omega_min; domega = data->domega; Nomega = data->Nomega; dft_phase = new complex[Nomega]; N = 1; LOOP_OVER_DIRECTIONS(is.dim, d) N *= (ie.in_direction(d) - is.in_direction(d)) / 2 + 1; dft = new complex[N * Nomega]; for (int i = 0; i < N * Nomega; ++i) dft[i] = 0.0; next_in_chunk = fc->dft_chunks; fc->dft_chunks = this; next_in_dft = data->dft_chunks; } dft_chunk::~dft_chunk() { delete[] dft; delete[] dft_phase; // delete from fields_chunk list dft_chunk *cur = fc->dft_chunks; if (cur == this) fc->dft_chunks = next_in_chunk; else { while (cur && cur->next_in_chunk && cur->next_in_chunk != this) cur = cur->next_in_chunk; if (cur && cur->next_in_chunk == this) cur->next_in_chunk = next_in_chunk; } } void dft_flux::remove() { while (E) { dft_chunk *nxt = E->next_in_dft; delete E; E = nxt; } while (H) { dft_chunk *nxt = H->next_in_dft; delete H; H = nxt; } } static void add_dft_chunkloop(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *chunkloop_data) { dft_chunk_data *data = (dft_chunk_data *) chunkloop_data; (void) shift; (void) ichunk; // unused component c = S.transform(data->c, -sn); if (c >= NUM_FIELD_COMPONENTS || !fc->f[c][0]) return; // this chunk doesn't have component c data->dft_chunks = new dft_chunk(fc,is,ie,s0,s1,e0,e1,dV0,dV1, data->extra_weight, shift_phase * S.phase_shift(c, sn), c, cgrid == Centered, chunkloop_data); } dft_chunk *fields::add_dft(component c, const volume &where, double freq_min, double freq_max, int Nfreq, bool include_dV_and_interp_weights, complex weight, dft_chunk *chunk_next, bool sqrt_dV_and_interp_weights, complex extra_weight, bool use_centered_grid) { if (coordinate_mismatch(gv.dim, c)) return NULL; dft_chunk_data data; data.c = c; if (Nfreq <= 1) freq_min = freq_max = (freq_min + freq_max) * 0.5; data.omega_min = freq_min * 2*pi; data.domega = Nfreq <= 1 ? 0.0 : (freq_max * 2*pi - data.omega_min) / (Nfreq - 1); data.Nomega = Nfreq; data.include_dV_and_interp_weights = include_dV_and_interp_weights; data.sqrt_dV_and_interp_weights = sqrt_dV_and_interp_weights; data.dft_chunks = chunk_next; data.weight = weight * (dt/sqrt(2*pi)); data.extra_weight = extra_weight; loop_in_chunks(add_dft_chunkloop, (void *) &data, where, use_centered_grid ? Centered : c); return data.dft_chunks; } dft_chunk *fields::add_dft(const volume_list *where, double freq_min, double freq_max, int Nfreq, bool include_dV_and_interp_weights) { dft_chunk *chunks = 0; while (where) { if (is_derived(where->c)) abort("derived_component invalid for dft"); chunks = add_dft(component(where->c), where->v, freq_min, freq_max, Nfreq, include_dV_and_interp_weights, where->weight, chunks); where = where->next; } return chunks; } dft_chunk *fields::add_dft_pt(component c, const vec &where, double freq_min, double freq_max, int Nfreq) { return add_dft(c, where, freq_min, freq_max, Nfreq, false); } void fields::update_dfts() { am_now_working_on(FourierTransforming); for (int i = 0; i < num_chunks; i++) if (chunks[i]->is_mine()) chunks[i]->update_dfts(time(), time() - 0.5 * dt); finished_working(); } void fields_chunk::update_dfts(double timeE, double timeH) { for (dft_chunk *cur = dft_chunks; cur; cur = cur->next_in_chunk) { cur->update_dft(is_magnetic(cur->c) ? timeH : timeE); } } void dft_chunk::update_dft(double time) { if (!fc->f[c][0]) return; for (int i = 0; i < Nomega; ++i) dft_phase[i] = polar(1.0, (omega_min + i*domega)*time) * scale; int numcmp = fc->f[c][1] ? 2 : 1; int idx_dft = 0; LOOP_OVER_IVECS(fc->gv, is, ie, idx) { double w = IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV0 + dV1 * loop_i2); if (sqrt_dV_and_interp_weights) w = sqrt(w); double f[2]; // real/imag field value at epsilon point if (avg2) for (int cmp=0; cmp < numcmp; ++cmp) f[cmp] = (w * 0.25) * (fc->f[c][cmp][idx] + fc->f[c][cmp][idx+avg1] + fc->f[c][cmp][idx+avg2] + fc->f[c][cmp][idx+(avg1+avg2)]); else if (avg1) for (int cmp=0; cmp < numcmp; ++cmp) f[cmp] = (w * 0.5) * (fc->f[c][cmp][idx] + fc->f[c][cmp][idx+avg1]); else for (int cmp=0; cmp < numcmp; ++cmp) f[cmp] = w * fc->f[c][cmp][idx]; if (numcmp == 2) { complex fc(f[0], f[1]); for (int i = 0; i < Nomega; ++i) dft[Nomega * idx_dft + i] += dft_phase[i] * fc; } else { realnum fr = f[0]; for (int i = 0; i < Nomega; ++i) dft[Nomega * idx_dft + i] += dft_phase[i] * fr; } idx_dft++; } } void dft_chunk::scale_dft(complex scale) { for (int i = 0; i < N * Nomega; ++i) dft[i] *= scale; if (next_in_dft) next_in_dft->scale_dft(scale); } void dft_chunk::operator-=(const dft_chunk &chunk) { if (c != chunk.c || N * Nomega != chunk.N * chunk.Nomega) abort("Mismatched chunks in dft_chunk::operator-="); for (int i = 0; i < N * Nomega; ++i) dft[i] -= chunk.dft[i]; if (next_in_dft) { if (!chunk.next_in_dft) abort("Mismatched chunk lists in dft_chunk::operator-="); *next_in_dft -= *chunk.next_in_dft; } } static int dft_chunks_Ntotal(dft_chunk *dft_chunks, int *my_start) { int n = 0; for (dft_chunk *cur = dft_chunks; cur; cur = cur->next_in_dft) n += cur->N * cur->Nomega * 2; *my_start = partial_sum_to_all(n) - n; // sum(n) for processes before this return sum_to_all(n); } // Note: the file must have been created in parallel mode, typically via fields::open_h5file. void save_dft_hdf5(dft_chunk *dft_chunks, const char *name, h5file *file, const char *dprefix) { int istart; int n = dft_chunks_Ntotal(dft_chunks, &istart); char dataname[1024]; snprintf(dataname, 1024, "%s%s" "%s_dft", dprefix ? dprefix : "", dprefix && dprefix[0] ? "_" : "", name); file->create_data(dataname, 1, &n); for (dft_chunk *cur = dft_chunks; cur; cur = cur->next_in_dft) { int Nchunk = cur->N * cur->Nomega * 2; file->write_chunk(1, &istart, &Nchunk, (realnum *) cur->dft); istart += Nchunk; } file->done_writing_chunks(); } void save_dft_hdf5(dft_chunk *dft_chunks, component c, h5file *file, const char *dprefix) { save_dft_hdf5(dft_chunks, component_name(c), file, dprefix); } void load_dft_hdf5(dft_chunk *dft_chunks, const char *name, h5file *file, const char *dprefix) { int istart; int n = dft_chunks_Ntotal(dft_chunks, &istart); char dataname[1024]; snprintf(dataname, 1024, "%s%s" "%s_dft", dprefix ? dprefix : "", dprefix && dprefix[0] ? "_" : "", name); int file_rank, file_dims; file->read_size(dataname, &file_rank, &file_dims, 1); if (file_rank != 1 || file_dims != n) abort("incorrect dataset size (%d vs. %d) in load_dft_hdf5 %s:%s", file_dims, n, file->file_name(), dataname); for (dft_chunk *cur = dft_chunks; cur; cur = cur->next_in_dft) { int Nchunk = cur->N * cur->Nomega * 2; file->read_chunk(1, &istart, &Nchunk, (realnum *) cur->dft); istart += Nchunk; } } void load_dft_hdf5(dft_chunk *dft_chunks, component c, h5file *file, const char *dprefix) { load_dft_hdf5(dft_chunks, component_name(c), file, dprefix); } dft_flux::dft_flux(const component cE_, const component cH_, dft_chunk *E_, dft_chunk *H_, double fmin, double fmax, int Nf) { if (Nf <= 1) fmin = fmax = (fmin + fmax) * 0.5; freq_min = fmin; Nfreq = Nf; dfreq = Nf <= 1 ? 0.0 : (fmax - fmin) / (Nf - 1); E = E_; H = H_; cE = cE_; cH = cH_; } dft_flux::dft_flux(const dft_flux &f) { freq_min = f.freq_min; Nfreq = f.Nfreq; dfreq = f.dfreq; E = f.E; H = f.H; cE = f.cE; cH = f.cH; } double *dft_flux::flux() { double *F = new double[Nfreq]; for (int i = 0; i < Nfreq; ++i) F[i] = 0; for (dft_chunk *curE = E, *curH = H; curE && curH; curE = curE->next_in_dft, curH = curH->next_in_dft) for (int k = 0; k < curE->N; ++k) for (int i = 0; i < Nfreq; ++i) F[i] += real(curE->dft[k*Nfreq + i] * conj(curH->dft[k*Nfreq + i])); double *Fsum = new double[Nfreq]; sum_to_all(F, Fsum, Nfreq); delete[] F; return Fsum; } void dft_flux::save_hdf5(h5file *file, const char *dprefix) { save_dft_hdf5(E, cE, file, dprefix); file->prevent_deadlock(); // hackery save_dft_hdf5(H, cH, file, dprefix); } void dft_flux::load_hdf5(h5file *file, const char *dprefix) { load_dft_hdf5(E, cE, file, dprefix); file->prevent_deadlock(); // hackery load_dft_hdf5(H, cH, file, dprefix); } void dft_flux::save_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::WRITE, prefix); save_hdf5(ff, dprefix); delete ff; } void dft_flux::load_hdf5(fields &f, const char *fname, const char *dprefix, const char *prefix) { h5file *ff = f.open_h5file(fname, h5file::READONLY, prefix); load_hdf5(ff, dprefix); delete ff; } void dft_flux::scale_dfts(complex scale) { if (E) E->scale_dft(scale); if (H) H->scale_dft(scale); } dft_flux fields::add_dft_flux(const volume_list *where_, double freq_min, double freq_max, int Nfreq) { dft_chunk *E = 0, *H = 0; component cE[2] = {Ex,Ey}, cH[2] = {Hy,Hx}; volume_list *where = S.reduce(where_); volume_list *where_save = where; while (where) { derived_component c = derived_component(where->c); if (coordinate_mismatch(gv.dim, component_direction(c))) abort("coordinate-type mismatch in add_dft_flux"); switch (c) { case Sx: cE[0] = Ey, cE[1] = Ez, cH[0] = Hz, cH[1] = Hy; break; case Sy: cE[0] = Ez, cE[1] = Ex, cH[0] = Hx, cH[1] = Hz; break; case Sr: cE[0] = Ep, cE[1] = Ez, cH[0] = Hz, cH[1] = Hp; break; case Sp: cE[0] = Ez, cE[1] = Er, cH[0] = Hr, cH[1] = Hz; break; case Sz: if (gv.dim == Dcyl) cE[0] = Er, cE[1] = Ep, cH[0] = Hp, cH[1] = Hr; else cE[0] = Ex, cE[1] = Ey, cH[0] = Hy, cH[1] = Hx; break; default: abort("invalid flux component!"); } for (int i = 0; i < 2; ++i) { E = add_dft(cE[i], where->v, freq_min, freq_max, Nfreq, true, where->weight * double(1 - 2*i), E); H = add_dft(cH[i], where->v, freq_min, freq_max, Nfreq, false, 1.0, H); } where = where->next; } delete where_save; return dft_flux(cE[0], cH[0], E, H, freq_min, freq_max, Nfreq); } direction fields::normal_direction(const volume &where) const { direction d = where.normal_direction(); if (d == NO_DIRECTION) { /* hack so that we still infer the normal direction correctly for volumes with empty dimensions */ volume where_pad(where); LOOP_OVER_DIRECTIONS(where.dim, d1) if (nosize_direction(d1) && where.in_direction(d1) == 0.0) where_pad.set_direction_max(d1, where.in_direction_min(d1) + 0.1); d = where_pad.normal_direction(); if (d == NO_DIRECTION) abort("Could not determine normal direction for given grid_volume."); } return d; } dft_flux fields::add_dft_flux(direction d, const volume &where, double freq_min, double freq_max, int Nfreq) { if (d == NO_DIRECTION) d = normal_direction(where); volume_list vl(where, direction_component(Sx, d)); return add_dft_flux(&vl, freq_min, freq_max, Nfreq); } dft_flux fields::add_dft_flux_box(const volume &where, double freq_min, double freq_max, int Nfreq){ volume_list *faces = 0; LOOP_OVER_DIRECTIONS(where.dim, d) if (where.in_direction(d) > 0) { volume face(where); derived_component c = direction_component(Sx, d); face.set_direction_min(d, where.in_direction_max(d)); faces = new volume_list(face, c, +1, faces); face.set_direction_min(d, where.in_direction_min(d)); face.set_direction_max(d, where.in_direction_min(d)); faces = new volume_list(face, c, -1, faces); } dft_flux flux = add_dft_flux(faces, freq_min, freq_max, Nfreq); delete faces; return flux; } dft_flux fields::add_dft_flux_plane(const volume &where, double freq_min, double freq_max, int Nfreq) { return add_dft_flux(NO_DIRECTION, where, freq_min, freq_max, Nfreq); } } // namespace meep meep-openmpi-1.1.1/src/loop_in_chunks.cpp0000644000175200017520000004451211243101353017643 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "meep.hpp" #include "meep_internals.hpp" /* This file contains a generic function for looping over all of the points in all of the chunks that intersect some given grid_volume. This is used for everything from HDF5 output to applying source volumes to integrating energy and flux. It's fairly tricky because of the parallelization, arbitrary chunk divisions, symmetries, and periodic boundary conditions, but at least all of the trickiness is in one place. It is designed so that the inner loops over the actual grid points can be tight and fast (using the LOOP_OVER_IVECS macro). Many of the loops over chunks involve some sort of integration-like computation, and so we also perform the additional task of calculating the integration weights for each point -- mainly, this involves weighting the boundary points appropriately so that the sum approximates (via linear interpolation) a continuous integral over the supplied grid_volume. */ /**************************************************************************** Integration Weights We want the integral from a to b, assuming linear interpolation of fn (function values on grid points n). Most interior points have weight 1, but the points just inside and outside the boundaries have different weights. Call the weights for the points just *outside* the starting and ending boundaries s0 and e0, respectively, and weights for the points just *inside* the boundaries s1 and e1. Then we have to handle the following cases: 1) a and b separated by at least 2 grid points, e.g.: x | x x x | x 0 a 1 2 3 b 4 first segment: f(x) = f0 (1 - x) + f1 x -- \int_a^1 f(x) dx = f0 (1 - a)^2/2 + f1 (1 - a^2) / 2 last segment: f(x) = f3 (4 - x) + f4 (x - 3) -- \int_3^b f(x) dx = f3 [1 - (4-b)^2] / 2 + f4 (b - 3)^2 / 2 integral = f0 (1 - a)^2/2 <---- f0 s0 + f1 (1 - a^2/2) <---- f1 s1 + f2 + f3 (1 - (4-b)^2 / 2) <---- f3 e1 + f4 (b - 3)^2 / 2 <---- f4 e0 In terms of starting and ending weights: w0 = 1 - a w1 = b - 3 s0 = w0^2 / 2 s1 = 1 - (1 - w0)^2 / 2 e0 = w1^2 / 2 e1 = 1 - (1 - w1)^2 / 2 2) one grid point between a and b. x | x | x 0 a 1 b 2 integral = f0 (1 - a)^2 / 2 + f1 [(1 - a^2) + 1 - (2 - b)^2] / 2 + f3 (b - 1)^2 / 2 s0 = w0^2 / 2 e0 = w1^2 / 2 s1 = e1 = 1 - (1 - w0)^2 / 2 - (1 - w1)^2 / 2 3) no grid points between a and b. x | | x 0 a b 1 integral = f0 [ (1-a)^2 - (1-b)^2 ] / 2 + f1 [ b^2 - a^2 ] / 2 = f0 [ w0^2 - (1-w1)^2 ] / 2 + f1 [ w1^2 - (1-w0)^2 ] / 2 s0 = e1 = w0^2/2 - (1-w1)^2/2 e0 = s1 = w1^2/2 - (1-w0)^2/2 4) as (3), but a = b: interpolation, not integration: -- want: f0 * w0 + f1 * w1 s0 = w0 e0 = w1 = 1 - w0 -------------- Integration Weights in Cylindrical Coordinates FIXME: implement this below? Ideally, we should have different weights for the R direction of cylindrical coordinates, i.e. for integrating f(r) r dr, because again we want to perfectly integrate any linear f(r). Thus, the integration weights will depend upon r. Note, however, that we also have an r in the dV, so we will have to divide the weights by this factor. 1) a and b separated by at least 2 grid points, e.g.: x | x x x | x i a i+1 i+2 i+3 b i+4 (where r = i * inva). linear interpolation in [i,i+1): f(x) = f_i (i+1 - x) + f_{i+1} (x-i) want: \int_a^b f(x) x dx in terms of starting and ending weights: w0 = (i+1) - a w1 = b - (i+3) integral = f_i [-w0^3 / 3 + (i+1) w0^2 / 2] <- s0 i + f_{j=i+1} [w0^3 / 3 - (j+1) w0^2 / 2 + j w0 + j/2 + 1/6] <- s1 (i+1) + f_{j=i+2} j <- 1 (i+2) + f_{j=i+3} [-w1^3 / 3 - (j-1) w1^2 / 2 + j w1 + j/2 - 1/6] <- e1 (i+3) + f_{j=i+4} [w1^3 / 3 + (j-1) w1^2 / 2] <- e0 (i+4) (thanks to Maple for doing the annoying algebra) (yes, I have tested that it correctly integrates linear f(r)) Note that the coefficients need to be divided by i, i+1, etcetera to get s0, s1, etcetera; this gives an interior-point weight of 1 as before. For i->infinity, this should converge to the weights from before. Avoiding division by zero is more tricky, because the weight at j=0 is not necessarily zero, due to the interpolation. It might be better to pre-include the dV in the weight for edge elements, with appropriate logic in the IVEC_LOOP_WEIGHT macro. Tricky. The above is also not correct for integrals that cross x=0, because it should really be the integral of f(x) |x|. Even interior points probably need special handling in that case. For sanity, we would just divide the integration region into positive and negative r and integrate them separately somehow. Grrr. 2) one grid point between a and b. x | x | x i a i+1 b i+2 integral = f_i [-w0^3 / 3 + (i+1) w0^2 / 2] <- s0 i + f_{j=i+1} [w0^3 / 3 - (j+1) w0^2 / 2 + j w0 + -w1^3 / 3 - (j-1) w1^2 / 2 + j w1] <- {s1,e1} (i+1) + f_{j=i+2} [w1^3 / 3 + (j-1) w1^2 / 2] <- e0 (i+2) 3) no grid points between a and b. x | | x i a b i+1 integral = f_i [-w0^3/3 + (i+1) w0^2/2 + -w1^3/3 - (i-1) w1^2/2 + i w1 - i/2 - 1/6] <- s0 i + f_{j=i+1} [ w0^3/3 - (j+1) w0^2/2 + j w0 + w1^3/3 + (j-1) w1^2/2 - j/2 + 1/6] <- e0 (i+1) 4) as (3), but a = b: interpolation, not integration: same as above ****************************************************************************/ namespace meep { /* The following two functions convert a vec to the nearest ivec in the dielectric (odd-coordinate) grid, either rounding down (floor) or up (ceil). In the special case where a component of the vec is *exactly* on a component of the ivec, we add the corresponding component of equal_shift (which should be either -2, 0, or +2). (equal_shift is there to prevent us from counting edge points twice.) */ static ivec vec2diel_floor(const vec &pt, double a, const ivec &equal_shift) { ivec ipt(pt.dim); LOOP_OVER_DIRECTIONS(pt.dim, d) { ipt.set_direction(d, 1+2*int(floor(pt.in_direction(d)*a-.5))); if (ipt.in_direction(d) == pt.in_direction(d)) ipt.set_direction(d, ipt.in_direction(d) + equal_shift.in_direction(d)); } return ipt; } static ivec vec2diel_ceil(const vec &pt, double a, const ivec &equal_shift) { ivec ipt(pt.dim); LOOP_OVER_DIRECTIONS(pt.dim, d) { ipt.set_direction(d, 1+2*int(ceil(pt.in_direction(d)*a-.5))); if (ipt.in_direction(d) == pt.in_direction(d)) ipt.set_direction(d, ipt.in_direction(d) + equal_shift.in_direction(d)); } return ipt; } static inline int iabs(int i) { return (i < 0 ? -i : i); } /* Generic function for computing loops within the chunks, often integral-like things, over a grid_volume WHERE. The job of this function is to call CHUNKLOOP() for each chunk that intersects WHERE, passing it the chunk, the range of integer coordinates to loop over, the integration weights for the boundary points, and the bloch phase shift, translational shift, and symmetry operation to transform the chunk to the actual integration location. (N.B. we apply the symmetry first to the chunk, *then* the shift.) We also pass CHUNKLOOP() dV0 and dV1, such that the integration "grid_volume" dV is dV0 + dV1 * iloopR, where iloopR is the loop variable (starting from 0 at the starting integer coord and incrementing by 1) corresponding to the direction R. Note that, in the LOOP_OVER_IVECS macro, iloopR corresponds to the loop variable loop_i2 in Dcyl (cylindrical coordinates). In other coordinates, dV1 is 0. Note also that by "grid_volume" dV we mean the integration unit corresponding to the dimensionality of WHERE (e.g. an area if WHERE is 2d, etc.) In particular, the loop's point coordinates are calculated on the Yee grid for component cgrid. cgrid == Centered is a good choice if you want to work with a combination of multiple field components, because all of the field components can be interpolated onto this grid without communication between chunks. The integration weights are chosen to correspond to integrating the linear interpolation of the function values from these grid points. For a simple example of an chunkloop routine, see the tests/integrate.cpp file. The parameters USE_SYMMETRY (default = true) and SNAP_EMPTY_DIMS (default = false) are for use with not-quite-integration-like operations. If use_symmetry is false, then we do *not* loop over all possible symmetry transformations of the chunks to see if they intersect WHERE; we only use chunks that, untransformed, already intersect the grid_volume. If SNAP_EMPTY_DIMS is true, then for empty (min = max) dimensions of WHERE, instead of interpolating, we "snap" them to the nearest grid point. */ void fields::loop_in_chunks(field_chunkloop chunkloop, void *chunkloop_data, const volume &where, component cgrid, bool use_symmetry, bool snap_empty_dims) { if (coordinate_mismatch(gv.dim, cgrid)) abort("Invalid fields::loop_in_chunks grid type %s for dimensions %s\n", component_name(cgrid), dimension_name(gv.dim)); if (where.dim != gv.dim) abort("Invalid dimensions %d for WHERE in fields::loop_in_chunks", where.dim); if (cgrid == Permeability) cgrid = Centered; /* We handle looping on an arbitrary component grid by shifting to the centered grid and then shifting back. The looping coordinates are internally calculated on the odd-indexed "centered grid", which has the virtue that it is disjoint for each chunk and each chunk has enough information to interpolate all of its field components onto this grid without communication. Another virtue of this grid is that it is invariant under all of our symmetry transformations, so we can uniquely decide which transformed chunk gets to loop_in_chunks which grid point. */ vec yee_c(gv.yee_shift(Centered) - gv.yee_shift(cgrid)); ivec iyee_c(gv.iyee_shift(Centered) - gv.iyee_shift(cgrid)); volume wherec(where + yee_c); /* Find the corners (is and ie) of the smallest bounding box for wherec, on the grid of odd-coordinate ivecs (i.e. the "epsilon grid"). */ ivec is(vec2diel_floor(wherec.get_min_corner(), gv.a, zero_ivec(gv.dim))); ivec ie(vec2diel_ceil(wherec.get_max_corner(), gv.a, zero_ivec(gv.dim))); /* Integration weights at boundaries (c.f. long comment at top). */ vec s0(gv.dim), e0(gv.dim), s1(gv.dim), e1(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { double w0, w1; w0 = 1. - wherec.in_direction_min(d)*gv.a + 0.5*is.in_direction(d); w1 = 1. + wherec.in_direction_max(d)*gv.a - 0.5*ie.in_direction(d); if (ie.in_direction(d) >= is.in_direction(d) + 3*2) { s0.set_direction(d, w0*w0 / 2); s1.set_direction(d, 1 - (1-w0)*(1-w0) / 2); e0.set_direction(d, w1*w1 / 2); e1.set_direction(d, 1 - (1-w1)*(1-w1) / 2); } else if (ie.in_direction(d) == is.in_direction(d) + 2*2) { s0.set_direction(d, w0*w0 / 2); s1.set_direction(d, 1 - (1-w0)*(1-w0) / 2 - (1-w1)*(1-w1) / 2); e0.set_direction(d, w1*w1 / 2); e1.set_direction(d, s1.in_direction(d)); } else if (wherec.in_direction_min(d) == wherec.in_direction_max(d)) { if (snap_empty_dims) { if (w0 > w1) ie.set_direction(d, is.in_direction(d)); else is.set_direction(d, ie.in_direction(d)); wherec.set_direction_min(d, is.in_direction(d) * (0.5*gv.inva)); wherec.set_direction_max(d, is.in_direction(d) * (0.5*gv.inva)); w0 = w1 = 1.0; } s0.set_direction(d, w0); s1.set_direction(d, w1); e0.set_direction(d, w1); e1.set_direction(d, w0); } else if (ie.in_direction(d) == is.in_direction(d) + 1*2) { s0.set_direction(d, w0*w0 / 2 - (1-w1)*(1-w1) / 2); e0.set_direction(d, w1*w1 / 2 - (1-w0)*(1-w0) / 2); s1.set_direction(d, e0.in_direction(d)); e1.set_direction(d, s0.in_direction(d)); } else abort("bug: impossible(?) looping boundaries"); } // loop over symmetry transformations of the chunks: for (int sn = 0; sn < (use_symmetry ? S.multiplicity() : 1); ++sn) { component cS = S.transform(cgrid, -sn); ivec iyee_cS(S.transform_unshifted(iyee_c, -sn)); volume gvS = S.transform(gv.surroundings(), sn); vec L(gv.dim); ivec iL(gv.dim); // n.b. we can't just S.transform(lattice_vector,sn), 'cause of signs LOOP_OVER_DIRECTIONS(gv.dim, d) { direction dS = S.transform(d, -sn).d; L.set_direction(d, fabs(lattice_vector(dS).in_direction(dS))); iL.set_direction(d, iabs(ilattice_vector(dS).in_direction(dS))); } // figure out range of lattice shifts for which gvS intersects wherec: ivec min_ishift(gv.dim), max_ishift(gv.dim); LOOP_OVER_DIRECTIONS(gv.dim, d) { if (boundaries[High][S.transform(d, -sn).d] == Periodic) { min_ishift.set_direction(d, int(floor((wherec.in_direction_min(d) - gvS.in_direction_max(d)) / L.in_direction(d)))); max_ishift.set_direction(d, int(ceil((wherec.in_direction_max(d) - gvS.in_direction_min(d)) / L.in_direction(d)))); } else { min_ishift.set_direction(d, 0); max_ishift.set_direction(d, 0); } } // loop over lattice shifts ivec ishift(min_ishift); do { complex ph = 1.0; vec shift(gv.dim, 0.0); ivec shifti(gv.dim, 0); LOOP_OVER_DIRECTIONS(gv.dim, d) { shift.set_direction(d, L.in_direction(d) * ishift.in_direction(d)); shifti.set_direction(d, iL.in_direction(d) * ishift.in_direction(d)); ph *= pow(eikna[d], ishift.in_direction(d)); } for (int i = 0; i < num_chunks; ++i) { if (!chunks[i]->is_mine()) continue; // Chunk looping boundaries: volume vS(gv.dim); if (use_symmetry) vS = S.transform(chunks[i]->v, sn); else { /* If we're not using symmetry, it's because (as in src_vol) we don't care about correctly counting the points in the grid_volume. Rather, we just want to make sure to get *all* of the chunk points that intersect where. Hence, add a little padding to make sure we don't miss any points due to rounding. */ vec pad(one_ivec(gv.dim) * gv.inva * 1e-3); vS = volume(chunks[i]->gv.loc(Centered,0) - pad, chunks[i]->gv.loc(Centered, chunks[i]->gv.ntot()-1) +pad); } ivec iscS(max(is-shifti, vec2diel_ceil(vS.get_min_corner(), gv.a, one_ivec(gv.dim) * 2))); ivec iecS(min(ie-shifti, vec2diel_floor(vS.get_max_corner(), gv.a, zero_ivec(gv.dim)))); if (iscS <= iecS) { // Determine weights at chunk looping boundaries: ivec isc(S.transform(iscS, -sn)), iec(S.transform(iecS, -sn)); vec s0c(gv.dim,1.0), s1c(gv.dim,1.0), e0c(gv.dim,1.0), e1c(gv.dim,1.0); iscS += shifti; iecS += shifti; LOOP_OVER_DIRECTIONS(gv.dim, d) { direction dS = S.transform(d, sn).d; if (iscS.in_direction(dS) == is.in_direction(dS)) { s0c.set_direction(d, s0.in_direction(dS)); s1c.set_direction(d, s1.in_direction(dS)); } else if (iscS.in_direction(dS) == is.in_direction(dS) + 2) { s0c.set_direction(d, s1.in_direction(dS)); } if (iecS.in_direction(dS) == ie.in_direction(dS)) { e0c.set_direction(d, e0.in_direction(dS)); e1c.set_direction(d, e1.in_direction(dS)); } else if (iecS.in_direction(dS) == ie.in_direction(dS) - 2) { e0c.set_direction(d, e1.in_direction(dS)); } if (iecS.in_direction(dS) == iscS.in_direction(dS)) { double w = min(s0c.in_direction(d), e0c.in_direction(d)); s0c.set_direction(d, w); e0c.set_direction(d, w); s1c.set_direction(d, w); e1c.set_direction(d, w); } else if (iecS.in_direction(dS) == iscS.in_direction(dS) + 1*2) { double w = min(s0c.in_direction(d), e1c.in_direction(d)); s0c.set_direction(d, w); e1c.set_direction(d, w); w = min(s1c.in_direction(d), e0c.in_direction(d)); s1c.set_direction(d, w); e0c.set_direction(d, w); } else if (iecS.in_direction(dS) == iscS.in_direction(dS) + 2*2) { double w = min(s1c.in_direction(d), e1c.in_direction(d)); s1c.set_direction(d, w); e1c.set_direction(d, w); } // swap endpoints/weights if in wrong order due to S.transform if (isc.in_direction(d) > iec.in_direction(d)) { int iswap = isc.in_direction(d); isc.set_direction(d, iec.in_direction(d)); iec.set_direction(d, iswap); double swap = s0c.in_direction(d); s0c.set_direction(d, e0c.in_direction(d)); e0c.set_direction(d, swap); swap = s1c.in_direction(d); s1c.set_direction(d, e1c.in_direction(d)); e1c.set_direction(d, swap); } } // Determine integration "volumes" dV0 and dV1; double dV0 = 1.0, dV1 = 0.0; LOOP_OVER_DIRECTIONS(gv.dim, d) if (wherec.in_direction(d) > 0.0) dV0 *= gv.inva; if (gv.dim == Dcyl) { dV1 = dV0 * 2*pi * gv.inva; dV0 *= 2*pi * fabs((S.transform(chunks[i]->gv[isc], sn) + shift - yee_c).in_direction(R)); } chunkloop(chunks[i], i, cS, isc - iyee_cS, iec - iyee_cS, s0c, s1c, e0c, e1c, dV0, dV1, shifti, ph, S, sn, chunkloop_data); } } LOOP_OVER_DIRECTIONS(gv.dim, d) { if (ishift.in_direction(d) + 1 <= max_ishift.in_direction(d)) { ishift.set_direction(d, ishift.in_direction(d) + 1); break; } ishift.set_direction(d, min_ishift.in_direction(d)); } } while (ishift != min_ishift); } } } // namespace meep meep-openmpi-1.1.1/src/step_generic.cpp0000644000175200017520000004331211243355200017277 0ustar debiandebian#include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #define DPR double * restrict #define RPR realnum * restrict /* These macros get into the guts of the LOOP_OVER_VOL loops to efficiently construct the index k into a PML sigma array. Basically, k needs to increment by 2 for each increment of one of LOOP's for-loops, starting at the appropriate corner of the grid_volume, and these macros define the relevant strides etc. for each loop. KSTRIDE_DEF defines the relevant strides etc. and goes outside the LOOP, wheras KDEF defines the k index and goes inside the LOOP. */ #define KSTRIDE_DEF(dsig, k, corner) \ const int k##0 = corner.in_direction(dsig) \ - gv.little_corner().in_direction(dsig); \ const int s##k##1 = gv.yucky_direction(0) == dsig ? 2 : 0; \ const int s##k##2 = gv.yucky_direction(1) == dsig ? 2 : 0; \ const int s##k##3 = gv.yucky_direction(2) == dsig ? 2 : 0 #define KDEF(k,dsig) const int k = ((k##0 + s##k##1*loop_i1) + s##k##2*loop_i2) + s##k##3*loop_i3 #define DEF_k KDEF(k,dsig) #define DEF_ku KDEF(ku,dsigu) #define DEF_kw KDEF(kw,dsigw) namespace meep { #define SWAP(t,a,b) { t xxxx = a; a = b; b = xxxx; } /* update step for df/dt = curl g, i.e. f += dt curl g = dt/dx (dg1 - dg2) where dgk = gk[i] - gk[i+sk]. g = (g1,g2), where g1 or g2 may be NULL. Note that dt/dx and/or s1 and s2 may be negative to flip signs of derivatives. PML: sig[k] = sigma[k]*dt/2, siginv[k] = 1 / (1 + sigma[k]*dt/2). Here, k is the index in the dsig direction. if dsig == NO_DIRECTION, then PML is not used. (dsig is the sigma direction.) if non-NULL, then cnd is an array of conductivity values, changing the underlying PDE to: df/dt = curl g - cnd f which is updated as: f = [ dt * curl g + (1 - dt cnd/2) f ] / (1 + dt cnd/2) cndinv should be an array of 1 / (1 + dt cnd/2). In the case of PML, cndinv should contain 1 / (1 + dt (cnd + sigma)/2). fcnd is an auxiliary field used ONLY when we simultaneously have PML (dsig != NO_DIR) and conductivity, in which case fcnd solves dfcnd/dt = curl g - cnd*fcnd and f satisfies df/dt = dfcnd/dt - sigma*f. fu is another auxiliary field used only in PML (dsigu != NO_DIR), in which case f solves: df/dt = dfu/dt - sigma_u * f and fu replaces f in the equations above (fu += dt curl g etcetera). */ void step_curl(RPR f, component c, const RPR g1, const RPR g2, int s1, int s2, // strides for g1/g2 shift const grid_volume &gv, double dtdx, direction dsig, const DPR sig, const DPR siginv, RPR fu, direction dsigu, const DPR sigu, const DPR siginvu, double dt, const RPR cnd, const RPR cndinv, RPR fcnd) { if (!g1) { // swap g1 and g2 SWAP(const RPR, g1, g2); SWAP(int, s1, s2); dtdx = -dtdx; // need to flip derivative sign } /* The following are a bunch of special cases of the "MOST GENERAL CASE" loop below. We make copies of the loop for each special case in order to keep the innermost loop efficient. This is especially important because the non-PML cases are actually more common. (The "right" way to do this is by partial evaluation of the most general case, but that would require a code generator.) */ if (dsig == NO_DIRECTION) { // no PML in f update if (dsigu == NO_DIRECTION) { // no fu update if (cnd) { double dt2 = dt * 0.5; if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] = ((1 - dt2 * cnd[i]) * f[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * cndinv[i]; } else { LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] = ((1 - dt2 * cnd[i]) * f[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; } } else { // no conductivity if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] -= dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2]); } else { LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] -= dtdx * (g1[i+s1] - g1[i]); } } } else { // fu update, no PML in f update KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cnd) { double dt2 = dt * 0.5; if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] = ((1 - dt2 * cnd[i]) * fprev - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * cndinv[i]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] = ((1 - dt2 * cnd[i]) * fprev - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } } else { // no conductivity if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] -= dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2]); f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] -= dtdx * (g1[i+s1] - g1[i]); f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } } } } else { /* PML in f update */ KSTRIDE_DEF(dsig, k, gv.little_owned_corner0(c)); if (dsigu == NO_DIRECTION) { // no fu update if (cnd) { double dt2 = dt * 0.5; if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1]-g1[i] + g2[i]-g2[i+s2])) * cndinv[i]; f[i] = ((1 - sig[k]) * f[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; f[i] = ((1 - sig[k]) * f[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; } } } else { // no conductivity (other than PML conductivity) if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] = ((1 - sig[k]) * f[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * siginv[k]; } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] = ((1 - sig[k]) * f[i] - dtdx * (g1[i+s1]-g1[i])) * siginv[k]; } } } } else { // fu update + PML in f update KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cnd) { double dt2 = dt * 0.5; if (g2) { //////////////////// MOST GENERAL CASE ////////////////////// LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1]-g1[i] + g2[i]-g2[i+s2])) * cndinv[i]; fu[i] = ((1 - sig[k]) * fu[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } ///////////////////////////////////////////////////////////// } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; fu[i] = ((1 - sig[k]) * fu[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } } else { // no conductivity (other than PML conductivity) if (g2) { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; fu[i] = ((1 - sig[k]) * fu[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * siginv[k]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } else { LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; fu[i] = ((1 - sig[k]) * fu[i] - dtdx * (g1[i+s1]-g1[i])) * siginv[k]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } } } } } /* field-update equation f += betadt * g (plus variants for conductivity and/or PML). This is used in 2d calculations to add an exp(i beta z) time dependence, which gives an additional i \beta \hat{z} \times cross-product in the curl equations. */ void step_beta(RPR f, component c, const RPR g, const grid_volume &gv, double betadt, direction dsig, const DPR siginv, RPR fu, direction dsigu, const DPR siginvu, const RPR cndinv, RPR fcnd) { if (!g) return; if (dsig != NO_DIRECTION) { // PML in f update KSTRIDE_DEF(dsig, k, gv.little_owned_corner0(c)); if (dsigu != NO_DIRECTION) { // PML in f + fu KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cndinv) { // conductivity + PML //////////////////// MOST GENERAL CASE ////////////////////// LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double df; double dfcnd = betadt * g[i] * cndinv[i]; fcnd[i] += dfcnd; fu[i] += (df = dfcnd * siginv[k]); f[i] += siginvu[ku] * df; } ///////////////////////////////////////////////////////////// } else { // PML only LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double df; fu[i] += (df = betadt * g[i] * siginv[k]); f[i] += siginvu[ku] * df; } } } else { // PML in f, no fu if (cndinv) { // conductivity + PML LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; double dfcnd = betadt * g[i] * cndinv[i]; fcnd[i] += dfcnd; f[i] += dfcnd * siginv[k]; } } else { // PML only LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] += betadt * g[i] * siginv[k]; } } } } else { // no PML in f update if (dsigu != NO_DIRECTION) { // fu, no PML in f KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cndinv) { // conductivity, no PML LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double df; fu[i] += (df = betadt * g[i] * cndinv[i]); f[i] += siginvu[ku] * df; } } else { // no conductivity or PML LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double df; fu[i] += (df = betadt * g[i]); f[i] += siginvu[ku] * df; } } } else { // no PML, no fu if (cndinv) { // conductivity, no PML LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] += betadt * g[i] * cndinv[i]; } else { // no conductivity or PML LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] += betadt * g[i]; } } } } /* Given Dsqr = |D|^2 and Di = component of D, compute the factor f so that Ei = chi1inv * f * Di. In principle, this would involve solving a cubic equation, but instead we use a Pade approximant that is accurate to several orders. This is inaccurate if the nonlinear index change is large, of course, but in that case the chi2/chi3 power-series expansion isn't accurate anyway, so the cubic isn't physical there either. */ inline double calc_nonlinear_u(const double Dsqr, const double Di, const double chi1inv, const double chi2, const double chi3) { double c2 = Di*chi2*(chi1inv*chi1inv); double c3 = Dsqr*chi3*(chi1inv*chi1inv*chi1inv); return (1 + c2 + 2*c3)/(1 + 2*c2 + 3*c3); } /* Update E from D using epsilon and PML, *or* update H from B using mu and PML. To be generic, here we set f = u * g, where u may be a tensor, and we also have a nonlinear susceptibility chi. Here, g = (g,g1,g2) where g1 and g2 are the off-diagonal components, if any (g2 may be NULL). In PML (dsigw != NO_DIR), we have an additional auxiliary field fw, which is updated by the equations: fw = u * g df/dt = dfw/dt - sigmaw * fw That is, fw is updated like the non-PML f, and f is updated from fw by a little ODE. Here, sigw[k] = sigmaw[k]*dt/2. */ void step_update_EDHB(RPR f, component fc, const grid_volume &gv, const RPR g, const RPR g1, const RPR g2, const RPR u, const RPR u1, const RPR u2, int s, int s1, int s2, const RPR chi2, const RPR chi3, RPR fw, direction dsigw, const DPR sigw) { if (!f) return; if ((!g1 && g2) || (g1 && g2 && !u1 && u2)) { /* swap g1 and g2 */ SWAP(const RPR, g1, g2); SWAP(const RPR, u1, u2); SWAP(int, s1, s2); } // stable averaging of offdiagonal components #define OFFDIAG(u,g,sx) (0.25 * ((g[i]+g[i-sx])*u[i] \ + (g[i+s]+g[(i+s)-sx])*u[i+s])) /* As with step_curl, these loops are all essentially copies of the "MOST GENERAL CASE" loop with various terms thrown out. */ if (dsigw != NO_DIRECTION) { //////// PML case (with fw) ///////////// KSTRIDE_DEF(dsigw, kw, gv.little_owned_corner0(fc)); if (u1 && u2) { // 3x3 off-diagonal u if (chi3) { //////////////////// MOST GENERAL CASE ////////////////////// LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s + g2s*g2s), gs, us, chi2[i], chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } ///////////////////////////////////////////////////////////// } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } } else if (u1) { // 2x2 off-diagonal u if (chi3) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s), gs, us, chi2[i], chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1)); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } } else if (u2) { // 2x2 off-diagonal u abort("bug - didn't swap off-diagonal terms!?"); } else { // diagonal u if (chi3) { if (g1 && g2) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs+0.0625*(g1s*g1s+g2s*g2s), gs, us, chi2[i], chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } else if (g1) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs + 0.0625*(g1s*g1s), gs, us, chi2[i], chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } else if (g2) { abort("bug - didn't swap off-diagonal terms!?"); } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs, gs,us, chi2[i],chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } } else if (u) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = g[i]; f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } } } else { /////////////// no PML (no fw) /////////////////// if (u1 && u2) { // 3x3 off-diagonal u if (chi3) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s + g2s*g2s), gs, us, chi2[i], chi3[i]); } } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)); } } } else if (u1) { // 2x2 off-diagonal u if (chi3) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s), gs, us, chi2[i], chi3[i]); } } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1)); } } } else if (u2) { // 2x2 off-diagonal u abort("bug - didn't swap off-diagonal terms!?"); } else { // diagonal u if (chi3) { if (g1 && g2) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs+0.0625*(g1s*g1s+g2s*g2s), gs, us, chi2[i], chi3[i]); } } else if (g1) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs + 0.0625*(g1s*g1s), gs, us, chi2[i], chi3[i]); } } else if (g2) { abort("bug - didn't swap off-diagonal terms!?"); } else { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs, gs,us, chi2[i],chi3[i]); } } } else if (u) { LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us); } } else LOOP_OVER_VOL_OWNED(gv, fc, i) f[i] = g[i]; } } } } // namespace meep meep-openmpi-1.1.1/src/output_directory.cpp0000644000175200017520000000772511243101206020257 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include "meep.hpp" namespace meep { const char symlink_name[] = "latest_output"; void structure::set_output_directory(const char *name) { char buf[300]; outdir = name; if (!quiet) master_printf("Using output directory %s/\n", name); if (readlink(symlink_name, buf, 300) > 0) { // Link already exists. unlink(symlink_name); } symlink(name, symlink_name); outdir = name; } void fields::set_output_directory(const char *name) { delete[] outdir; outdir = new char[strlen(name) + 1]; strcpy(outdir, name); for (int i=0;iset_output_directory(outdir); } void fields_chunk::set_output_directory(const char *name) { outdir = name; } static void cp(const char *a, const char *b) { FILE *fa = fopen(a,"r"); FILE *fb = fopen(b,"w"); if (!fa || !fb) return; int ca; while (1) { ca = getc(fa); if (ca == EOF) break; putc(ca,fb); } fclose(fa); fclose(fb); } static bool is_ok_dir(const char *dirname) { DIR *dir; bool direxists; if (am_master()) { direxists = (dir = opendir(dirname)) != NULL; if (direxists) closedir(dir); else mkdir(dirname, 00777); } direxists = broadcast(0, direxists); return !direxists; } FILE *create_output_file(const char *dirname, const char *fname) { const int buflen = 300; char n[buflen]; snprintf(n, buflen, "%s/%s", dirname, fname); FILE *o = master_fopen(n, "w"); if (!o) abort("Unable to create file %s!\n", n); return o; } const char *make_output_directory(const char *exename, const char *jobname) { const int buflen = 300; char basename[buflen]; const char * const evil_suffs[] = { ".dac", ".cpp", ".cc", ".cxx", ".C" }; char stripped_name[buflen]; const char *bnp = exename; // stripped_name holds the actual name of the executable (dirs removed). const char *t; for (t=exename;*t;t++) { if (*t == '/') bnp = t+1; } snprintf(stripped_name, buflen, "%s", bnp); for (int i = 0; i < (int)(sizeof(evil_suffs) / sizeof(evil_suffs[0])); ++i) { int sufflen = strlen(evil_suffs[i]); if (strcmp(stripped_name + strlen(stripped_name) - sufflen, evil_suffs[i]) == 0 && strlen(stripped_name) > size_t(sufflen)) { stripped_name[strlen(stripped_name) - sufflen] = (char)0; break; } } char sourcename[buflen]; // Holds the "example.cpp" filename. snprintf(sourcename, buflen, "%s.cpp", stripped_name); if (jobname != NULL) { snprintf(basename, buflen, "%s", jobname); } else { snprintf(basename, buflen, "%s", stripped_name); } static char outdirname[buflen]; snprintf(outdirname, buflen, "%s-out", basename); { int i = 0; while (!is_ok_dir(outdirname)) { if (!quiet) master_printf("Output directory %s already exists!\n", outdirname); snprintf(outdirname, buflen, "%s-out-%d", basename, i++); } } char outsrcname[buflen]; snprintf(outsrcname, buflen, "%s/%s", outdirname, sourcename); cp(sourcename, outsrcname); return outdirname; } void trash_output_directory(const char *dirname) { if (am_master()) mkdir(dirname, 00777); } } // namespace meep meep-openmpi-1.1.1/src/h5file.cpp0000644000175200017520000005652711243101206016013 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include "meep.hpp" #define CHECK(condition, message) do { \ if (!(condition)) { \ abort("error on line %d of " __FILE__ ": " \ message "\n", __LINE__); \ } \ } while (0) #include "config.h" #ifdef HAVE_HDF5 /* don't use new HDF5 1.8 API (which isn't even fully documented yet, grrr) */ # define H5_USE_16_API 1 # include /* HDF5 changed this datatype in their interfaces starting in version 1.6.4 */ # if H5_VERS_MAJOR > 1 \ || (H5_VERS_MAJOR == 1 && H5_VERS_MINOR > 6) \ || (H5_VERS_MAJOR == 1 && H5_VERS_MINOR == 6 && H5_VERS_RELEASE > 3) typedef hsize_t start_t; # else typedef hssize_t start_t; # endif #else typedef int hid_t; #endif #define HID(x) (*((hid_t *) (x))) /*****************************************************************************/ /* If we have the H5Pset_fapl_mpio function (which is available if HDF5 was compiled for MPI), then we can perform collective file i/o operations (e.g. all processes call H5Fcreate at the same time to create one file). If we don't, however, then we deal with it by having one process work with the file at a time: "exclusive" access. The following macro helps us select different bits of code depending upon whether this is the case. */ #ifdef HAVE_H5PSET_MPI /* old name for this routine */ # define H5Pset_fapl_mpio H5Pset_mpi # ifndef HAVE_H5PSET_FAPL_MPIO # define HAVE_H5PSET_FAPL_MPIO 1 # endif #endif #if defined(HAVE_H5PSET_FAPL_MPIO) || !defined(HAVE_MPI) # define IF_EXCLUSIVE(yes,no) no #else # define IF_EXCLUSIVE(yes,no) yes static int h5io_critical_section_tag = 0; #endif /*****************************************************************************/ /* Normally, HDF5 prints out all sorts of error messages, e.g. if a dataset can't be found, in addition to returning an error code. The following macro can be wrapped around code to temporarily suppress error messages. */ #define SUPPRESS_HDF5_ERRORS(statements) { \ H5E_auto_t xxxxx_err_func; \ void *xxxxx_err_func_data; \ H5Eget_auto(&xxxxx_err_func, &xxxxx_err_func_data); \ H5Eset_auto(NULL, NULL); \ { statements; } \ H5Eset_auto(xxxxx_err_func, xxxxx_err_func_data); \ } /*****************************************************************************/ #ifdef HAVE_HDF5 static bool dataset_exists(hid_t id, const char *name) { hid_t data_id; SUPPRESS_HDF5_ERRORS(data_id = H5Dopen(id, name)); if (data_id >= 0) H5Dclose(data_id); return (data_id >= 0); } #endif /*****************************************************************************/ namespace meep { // lazy file creation & locking void *h5file::get_id() { if (HID(id) < 0) { if (parallel) all_wait(); #ifdef HAVE_HDF5 hid_t access_props = H5Pcreate (H5P_FILE_ACCESS); # ifdef HAVE_MPI # ifdef HAVE_H5PSET_FAPL_MPIO if (parallel) H5Pset_fapl_mpio(access_props, MPI_COMM_WORLD, MPI_INFO_NULL); # else if (parallel) begin_critical_section(h5io_critical_section_tag); # endif # endif if (mode != WRITE || IF_EXCLUSIVE(parallel && !am_master(), 0)) HID(id) = H5Fopen(filename, mode == READONLY ? H5F_ACC_RDONLY : H5F_ACC_RDWR, access_props); else HID(id) = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, access_props); H5Pclose(access_props); #endif } return id; } // hackery: in some circumstances, for the exclusive-access mode // we must close the id (i.e. the file) in order to prevent deadlock. void h5file::prevent_deadlock() { IF_EXCLUSIVE(if (parallel) close_id(), (void) 0); } void h5file::close_id() { unset_cur(); if (HID(id) >= 0) if (mode == WRITE) mode = READWRITE; // don't re-create on re-open #ifdef HAVE_HDF5 if (HID(id) >= 0) { H5Fclose(HID(id)); IF_EXCLUSIVE(if (parallel) end_critical_section(h5io_critical_section_tag++), (void) 0); } #endif HID(id) = -1; } /* note: if parallel is true, then *all* processes must call this, and all processes will use I/O. */ h5file::h5file(const char *filename_, access_mode m, bool parallel_) { cur_dataname = NULL; id = (void*) malloc(sizeof(hid_t)); cur_id = (void*) malloc(sizeof(hid_t)); HID(id) = -1; HID(cur_id) = -1; extending = 0; filename = new char[strlen(filename_) + 1]; strcpy(filename, filename_); mode = m; parallel = parallel_; } h5file::~h5file() { close_id(); if (cur_dataname) free(cur_dataname); // allocated with realloc for (h5file::extending_s *cur = extending; cur; ) { h5file::extending_s *next = cur->next; delete[] cur->dataname; delete cur; cur = next; } delete[] filename; free(cur_id); free(id); } bool h5file::ok() { return (HID(get_id()) >= 0); } void h5file::remove() { close_id(); if (mode == READWRITE) mode = WRITE; // now need to re-create file for (h5file::extending_s *cur = extending; cur; ) { h5file::extending_s *next = cur->next; delete[] cur->dataname; delete cur; cur = next; } extending = 0; IF_EXCLUSIVE(if (parallel) all_wait(), (void) 0); if (am_master() && std::remove(filename)) abort("error removing file %s", filename); } h5file::extending_s *h5file::get_extending(const char *dataname) const { for (extending_s *cur = extending; cur; cur = cur->next) if (!strcmp(dataname, cur->dataname)) return cur; return NULL; } bool h5file::is_cur(const char *dataname) { return cur_dataname && !strcmp(cur_dataname, dataname); } void h5file::unset_cur() { #ifdef HAVE_HDF5 if (HID(cur_id) >= 0) H5Dclose(HID(cur_id)); #endif HID(cur_id) = -1; if (cur_dataname) cur_dataname[0] = 0; } void h5file::set_cur(const char *dataname, void *data_id) { #ifdef HAVE_HDF5 if (HID(cur_id) >= 0 && HID(cur_id) != HID(data_id)) H5Dclose(HID(cur_id)); #endif HID(cur_id) = HID(data_id); if (!is_cur(dataname)) { if (!cur_dataname || strlen(dataname) < strlen(cur_dataname)) cur_dataname = (char *) realloc(cur_dataname, strlen(dataname) + 1); strcpy(cur_dataname, dataname); } } void h5file::read_size(const char *dataname, int *rank, int *dims, int maxrank) { #ifdef HAVE_HDF5 if (parallel || am_master()) { hid_t file_id = HID(get_id()), space_id, data_id; CHECK(file_id >= 0, "error opening HDF5 input file"); if (is_cur(dataname)) data_id = HID(cur_id); else { CHECK(dataset_exists(file_id, dataname), "missing dataset in HDF5 file"); data_id = H5Dopen(file_id, dataname); set_cur(dataname, &data_id); } space_id = H5Dget_space(data_id); *rank = H5Sget_simple_extent_ndims(space_id); CHECK(*rank <= maxrank, "input array rank is too big"); hsize_t *dims_copy = new hsize_t[*rank]; hsize_t *maxdims = new hsize_t[*rank]; H5Sget_simple_extent_dims(space_id, dims_copy, maxdims); for (int i = 0; i < *rank; ++i) dims[i] = dims_copy[i]; delete[] maxdims; delete[] dims_copy; H5Sclose(space_id); } if (!parallel) { *rank = broadcast(0, *rank); broadcast(0, dims, *rank); if (*rank == 1 && dims[0] == 1) *rank = 0; } #endif } #define REALNUM_H5T (sizeof(realnum) == sizeof(double) ? H5T_NATIVE_DOUBLE : H5T_NATIVE_FLOAT) realnum *h5file::read(const char *dataname, int *rank, int *dims, int maxrank) { #ifdef HAVE_HDF5 realnum *data = 0; if (parallel || am_master()) { int i, N; hid_t file_id = HID(get_id()), space_id, data_id; CHECK(file_id >= 0, "error opening HDF5 input file"); if (is_cur(dataname)) data_id = HID(cur_id); else { CHECK(dataset_exists(file_id, dataname), "missing dataset in HDF5 file"); data_id = H5Dopen(file_id, dataname); } space_id = H5Dget_space(data_id); *rank = H5Sget_simple_extent_ndims(space_id); CHECK(*rank <= maxrank, "input array rank is too big"); hsize_t *dims_copy = new hsize_t[*rank]; hsize_t *maxdims = new hsize_t[*rank]; H5Sget_simple_extent_dims(space_id, dims_copy, maxdims); delete[] maxdims; for (N = 1, i = 0; i < *rank; ++i) N *= (dims[i] = dims_copy[i]); delete[] dims_copy; H5Sclose(space_id); data = new realnum[N]; H5Dread(data_id, REALNUM_H5T, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *) data); if (!is_cur(dataname)) H5Dclose(data_id); } if (!parallel) { *rank = broadcast(0, *rank); broadcast(0, dims, *rank); int N = 1; for (int i = 0; i < *rank; ++i) N *= dims[i]; if (!am_master()) data = new realnum[N]; broadcast(0, data, N); } if (*rank == 1 && dims[0] == 1) *rank = 0; return data; #else return NULL; #endif } char *h5file::read(const char *dataname) { #ifdef HAVE_HDF5 char *data = 0; int len = 0; if (parallel || am_master()) { hid_t file_id = HID(get_id()), space_id, data_id, type_id; CHECK(file_id >= 0, "error opening HDF5 input file"); if (is_cur(dataname)) unset_cur(); CHECK(dataset_exists(file_id, dataname), "missing dataset in HDF5 file"); data_id = H5Dopen(file_id, dataname); space_id = H5Dget_space(data_id); type_id = H5Dget_type(data_id); CHECK(H5Sget_simple_extent_npoints(space_id) == 1, "expected single string in HDF5 file, but didn't get one"); len = H5Tget_size(type_id); H5Tclose(type_id); type_id = H5Tcopy(H5T_C_S1); H5Tset_size(type_id, len); data = new char[len]; H5Dread(data_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *) data); H5Tclose(type_id); H5Sclose(space_id); H5Dclose(data_id); } if (!parallel) { len = broadcast(0, len); if (!am_master()) data = new char[len]; broadcast(0, data, len); } return data; #else return NULL; #endif } /*****************************************************************************/ /* Delete a dataset, if it exists. In parallel mode, should be called by all processors. */ void h5file::remove_data(const char *dataname) { #ifdef HAVE_HDF5 hid_t file_id = HID(get_id()); if (is_cur(dataname)) unset_cur(); if (get_extending(dataname)) { // delete dataname from extending list extending_s *prev = 0, *cur = extending; for (; cur && strcmp(cur->dataname, dataname); cur = (prev = cur)->next) ; if (!cur) abort("bug in remove_data: inconsistent get_extending"); if (prev) prev->next = cur->next; else extending = cur->next; delete[] cur->dataname; delete cur; } if (dataset_exists(file_id, dataname)) { /* this is hackish ...need to pester HDF5 developers to make H5Gunlink a collective operation for parallel mode */ if (!parallel || am_master()) { H5Gunlink(file_id, dataname); /* delete it */ H5Fflush(file_id, H5F_SCOPE_GLOBAL); } IF_EXCLUSIVE((void) 0, if (parallel) all_wait()); } #endif } /* Create a dataset, for writing chunks etc. Note that, in parallel mode, this should be called by *all* processors, even those not writing any data. */ void h5file::create_data(const char *dataname, int rank, const int *dims, bool append_data, bool single_precision) { #ifdef HAVE_HDF5 int i; hid_t file_id = HID(get_id()), space_id, data_id; int rank1; CHECK(rank >= 0, "negative rank"); // stupid HDF5 has problems with rank 0 rank1 = (rank == 0 && !append_data) ? 1 : rank; CHECK(file_id >= 0, "error opening HDF5 output file"); unset_cur(); remove_data(dataname); // HDF5 gives error if we H5Dcreate existing dataset if (IF_EXCLUSIVE(!parallel || am_master(), 1)) { hsize_t *dims_copy = new hsize_t[rank1 + append_data]; hsize_t *maxdims = new hsize_t[rank1 + append_data]; hsize_t N = 1; for (i = 0; i < rank; ++i) N *= (maxdims[i] = dims_copy[i] = dims[i]); if (!rank) maxdims[0] = dims_copy[0] = 1; if (append_data) { dims_copy[rank1] = 1; maxdims[rank1] = H5S_UNLIMITED; } space_id = H5Screate_simple(rank1 + append_data, dims_copy, maxdims); delete[] maxdims; /* For unlimited datasets, we need to specify the size of the "chunks" in which the file data is allocated. */ hid_t prop_id = H5Pcreate(H5P_DATASET_CREATE); if (append_data) { const int blocksize = 128; // make a chunk at least blocksize elements for efficiency dims_copy[rank1] = (blocksize + (N - 1)) / N; H5Pset_chunk(prop_id, rank1 + 1, dims_copy); dims_copy[rank1] = 1; } delete[] dims_copy; hid_t type_id = single_precision ? H5T_NATIVE_FLOAT : REALNUM_H5T; data_id = H5Dcreate(file_id, dataname, type_id, space_id, prop_id); if (data_id < 0) abort("Error creating dataset"); H5Pclose(prop_id); } else { data_id = H5Dopen(file_id, dataname); CHECK(data_id >= 0, "missing dataset for subsequent processor"); space_id = H5Dget_space(data_id); CHECK(rank1 + append_data == H5Sget_simple_extent_ndims(space_id), "file data is inconsistent rank for subsequent processor"); hsize_t *dims_copy = new hsize_t[rank1 + append_data]; hsize_t *maxdims = new hsize_t[rank1 + append_data]; H5Sget_simple_extent_dims(space_id, dims_copy, maxdims); CHECK(!append_data || maxdims[rank1] == H5S_UNLIMITED, "file data is missing unlimited dimension for append_data"); delete[] maxdims; for (i = 0; i < rank; ++i) CHECK(dims[i] == (int) dims_copy[i], "file data is inconsistent size for subsequent processor"); if (rank < rank1) CHECK(dims_copy[0] == 1, "rank-0 data is incorrect size"); delete[] dims_copy; } set_cur(dataname, &data_id); H5Sclose(space_id); if (append_data) { extending_s *cur = new extending_s; cur->dataname = new char[strlen(dataname) + 1]; strcpy(cur->dataname, dataname); cur->dindex = 0; cur->next = extending; extending = cur; } #else abort("not compiled with HDF5, required for HDF5 output"); #endif } /* Assumed data already created with append_data == true, and is already open; extends it and increments cur_dindex. Like create_data, this is a collective operation and must be called from all processes. */ void h5file::extend_data(const char *dataname, int rank, const int *dims) { #ifdef HAVE_HDF5 extending_s *cur = get_extending(dataname); CHECK(cur, "extend_data can only be called on extensible data"); hid_t file_id = HID(get_id()), data_id; if (is_cur(dataname)) data_id = HID(cur_id); else { data_id = H5Dopen(file_id, dataname); set_cur(dataname, &data_id); } hid_t space_id = H5Dget_space(data_id); CHECK(rank + 1 == H5Sget_simple_extent_ndims(space_id), "file data is inconsistent rank for subsequent extend_data"); hsize_t *dims_copy = new hsize_t[rank + 1]; hsize_t *maxdims = new hsize_t[rank + 1]; H5Sget_simple_extent_dims(space_id, dims_copy, maxdims); CHECK(maxdims[rank] == H5S_UNLIMITED, "file data is missing unlimited dimension for extend_data"); delete[] maxdims; for (int i = 0; i < rank; ++i) CHECK(dims[i] == (int) dims_copy[i], "file data is inconsistent size for subsequent extend_data"); H5Sclose(space_id); // Allocate more space along unlimited direction cur->dindex++; dims_copy[rank] = cur->dindex + 1; H5Dextend(data_id, dims_copy); delete[] dims_copy; #else abort("not compiled with HDF5, required for HDF5 output"); #endif } /* If append_data is true, dataname is the current dataset, and is extensible, then as extend_data; otherwise as create_data. */ void h5file::create_or_extend_data(const char *dataname, int rank, const int *dims, bool append_data, bool single_precision) { if (get_extending(dataname)) extend_data(dataname, rank, dims); else create_data(dataname, rank, dims, append_data, single_precision); } /*****************************************************************************/ /* Write a chunk of data to dataset in HDF5 file. The dataset has dimension dims[rank], and we are writing a chunk stored at (row-major order) of size chunk_dims[rank], starting at chunk_start[rank]. You *must* have already called create_data for the same dimensions (and extend_data, if necessary). In the special case of rank == 0 (writing a single datum), chunk_dims[0] should still be initialized to 1 (if the given process is writing data) or 0 (if it is not). This function does *not* need to be called on all CPUs (e.g. those that have no data can be skipped). */ void h5file::write_chunk(int rank, const int *chunk_start, const int *chunk_dims, realnum *data) { #ifdef HAVE_HDF5 int i; bool do_write = true; hid_t space_id, mem_space_id, data_id = HID(cur_id); int rank1; extending_s *cur = get_extending(cur_dataname); bool append_data = cur != NULL; int dindex = cur ? cur->dindex : 0; CHECK(data_id >= 0, "create_data must be called before write_chunk"); CHECK(rank >= 0, "negative rank"); CHECK(rank > 0 || chunk_dims[0] == 0 || chunk_dims[0] == 1, "invalid chunk_dims[0] for rank 0"); // stupid HDF5 has problems with rank 0 rank1 = (rank == 0 && !append_data) ? 1 : rank; space_id = H5Dget_space(data_id); /*******************************************************************/ /* Before we can write the data to the data set, we must define the dimensions and "selections" of the arrays to be read & written: */ start_t *start = new start_t[rank1 + append_data]; hsize_t *count = new hsize_t[rank1 + append_data]; int count_prod = 1; for (i = 0; i < rank; ++i) { start[i] = chunk_start[i]; count[i] = chunk_dims[i]; count_prod *= count[i]; } if (!rank) { start[0] = 0; count[0] = chunk_dims[0]; // see comment at top count_prod *= count[0]; } if (append_data) { start[rank1] = dindex; count[rank1] = 1; } if (count_prod > 0) { H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL); mem_space_id = H5Screate_simple(!rank1 ? 1 : rank1, count, NULL); H5Sselect_all(mem_space_id); } else { /* this can happen on leftover processes in MPI */ H5Sselect_none(space_id); mem_space_id = H5Scopy(space_id); /* can't create an empty space */ H5Sselect_none(mem_space_id); do_write = false; /* HDF5 complains about empty dataspaces */ } delete[] start; delete[] count; /*******************************************************************/ /* Write the data, then free all the stuff we've allocated. */ if (do_write) H5Dwrite(data_id, REALNUM_H5T, mem_space_id, space_id, H5P_DEFAULT, (void *) data); H5Sclose(mem_space_id); H5Sclose(space_id); #else abort("not compiled with HDF5, required for HDF5 output"); #endif } // collective call after completing all write_chunk calls void h5file::done_writing_chunks() { /* hackery: in order to not deadlock when writing extensible datasets with a non-parallel version of HDF5, we need to close the file and release the lock after writing extensible chunks ...here, I'm assuming(?) that non-extensible datasets will use different files, etcetera, for different timesteps. All of this hackery goes away if we just use an MPI-compiled version of HDF5. */ if (parallel && cur_dataname && get_extending(cur_dataname)) prevent_deadlock(); // closes id } void h5file::write(const char *dataname, int rank, const int *dims, realnum *data, bool single_precision) { if (parallel || am_master()) { int *start = new int[rank + 1]; for (int i = 0; i < rank; i++) start[i] = 0; create_data(dataname, rank, dims, false, single_precision); if (am_master()) write_chunk(rank, start, dims, data); done_writing_chunks(); unset_cur(); delete[] start; } } void h5file::write(const char *dataname, const char *data) { #ifdef HAVE_HDF5 if (IF_EXCLUSIVE(am_master(), parallel || am_master())) { hid_t file_id = HID(get_id()), type_id, data_id, space_id; CHECK(file_id >= 0, "error opening HDF5 output file"); remove_data(dataname); // HDF5 gives error if we H5Dcreate existing dataset type_id = H5Tcopy(H5T_C_S1);; H5Tset_size(type_id, strlen(data) + 1); space_id = H5Screate(H5S_SCALAR); data_id = H5Dcreate(file_id, dataname, type_id, space_id, H5P_DEFAULT); if (am_master()) H5Dwrite(data_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); H5Sclose(space_id); H5Tclose(type_id); H5Dclose(data_id); } #else abort("not compiled with HDF5, required for HDF5 output"); #endif } /*****************************************************************************/ /* Inverse of write_chunk, above. The caller must first get the total dataset's rank and dims first by calling read_size, above, (which also opens the dataset for reading). */ void h5file::read_chunk(int rank, const int *chunk_start, const int *chunk_dims, realnum *data) { #ifdef HAVE_HDF5 bool do_read = true; int rank1; hid_t space_id, mem_space_id, data_id = HID(cur_id); CHECK(data_id >= 0, "read_size must be called before read_chunk"); CHECK(rank >= 0, "negative rank"); CHECK(rank > 0 || chunk_dims[0] == 0 || chunk_dims[0] == 1, "invalid chunk_dims[0] for rank 0"); // stupid HDF5 has problems with rank 0 rank1 = rank == 0 ? 1 : rank; space_id = H5Dget_space(data_id); /*******************************************************************/ /* Before we can read the data from the data set, we must define the dimensions and "selections" of the arrays to be read & written: */ start_t *start = new start_t[rank1]; hsize_t *count = new hsize_t[rank1]; int count_prod = 1; for (int i = 0; i < rank; ++i) { start[i] = chunk_start[i]; count[i] = chunk_dims[i]; count_prod *= count[i]; } if (!rank) { start[0] = 0; count[0] = chunk_dims[0]; // see comment at top count_prod *= count[0]; } if (count_prod > 0) { H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, NULL, count, NULL); mem_space_id = H5Screate_simple(rank1, count, NULL); H5Sselect_all(mem_space_id); } else { /* this can happen on leftover processes in MPI */ H5Sselect_none(space_id); mem_space_id = H5Scopy(space_id); /* can't create an empty space */ H5Sselect_none(mem_space_id); do_read = false; /* HDF5 complains about empty dataspaces */ } delete[] count; delete[] start; /*******************************************************************/ /* Read the data, then free all the stuff we've allocated. */ if (do_read) H5Dread(data_id, REALNUM_H5T, mem_space_id, space_id, H5P_DEFAULT, (void *) data); H5Sclose(mem_space_id); H5Sclose(space_id); #else abort("not compiled with HDF5, required for HDF5 input"); #endif } } // namespace meep meep-openmpi-1.1.1/src/h5fields.cpp0000644000175200017520000003617311243101206016335 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* HDF5 output of fields and arbitrary functions thereof. Works very similarly to integrate.cpp (using fields::loop_in_chunks). */ #include #include #include #include "meep_internals.hpp" namespace meep { /***************************************************************************/ typedef struct { // information related to the HDF5 dataset (its size, etcetera) h5file *file; ivec min_corner, max_corner; int num_chunks; realnum *buf; int bufsz; int rank; direction ds[3]; int reim; // whether to output the real or imaginary part // the function to output and related info (offsets for averaging, etc.) int num_fields; const component *components; component *cS; complex *ph; complex *fields; int *offsets; int ninveps; component inveps_cs[3]; direction inveps_ds[3]; int ninvmu; component invmu_cs[3]; direction invmu_ds[3]; field_function fun; void *fun_data_; } h5_output_data; #define UNUSED(x) (void) x // silence compiler warnings static void h5_findsize_chunkloop(fields_chunk *fc, int ichnk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { UNUSED(ichnk);UNUSED(cgrid);UNUSED(s0);UNUSED(s1);UNUSED(e0);UNUSED(e1); UNUSED(dV0);UNUSED(dV1);UNUSED(shift_phase); h5_output_data *data = (h5_output_data *) data_; ivec isS = S.transform(is, sn) + shift; ivec ieS = S.transform(ie, sn) + shift; data->min_corner = min(data->min_corner, min(isS, ieS)); data->max_corner = max(data->max_corner, max(isS, ieS)); data->num_chunks++; int bufsz = 1; LOOP_OVER_DIRECTIONS(fc->gv.dim, d) bufsz *= (ie.in_direction(d) - is.in_direction(d)) / 2 + 1; data->bufsz = max(data->bufsz, bufsz); } static void h5_output_chunkloop(fields_chunk *fc, int ichnk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { UNUSED(ichnk);UNUSED(cgrid);UNUSED(s0);UNUSED(s1);UNUSED(e0);UNUSED(e1); UNUSED(dV0);UNUSED(dV1); h5_output_data *data = (h5_output_data *) data_; //-----------------------------------------------------------------------// // Find output chunk dimensions and strides, etc. int start[3]={0,0,0}, count[3]={1,1,1}; int offset[3]={0,0,0}, stride[3]={1,1,1}; ivec isS = S.transform(is, sn) + shift; ivec ieS = S.transform(ie, sn) + shift; // figure out what yucky_directions (in LOOP_OVER_IVECS) // correspond to what directions in the transformed vectors (in output). ivec permute(zero_ivec(fc->gv.dim)); for (int i = 0; i < 3; ++i) permute.set_direction(fc->gv.yucky_direction(i), i); permute = S.transform_unshifted(permute, sn); LOOP_OVER_DIRECTIONS(permute.dim, d) permute.set_direction(d, abs(permute.in_direction(d))); // compute the size of the chunk to output, and its strides etc. for (int i = 0; i < data->rank; ++i) { direction d = data->ds[i]; int isd = isS.in_direction(d), ied = ieS.in_direction(d); start[i] = (min(isd, ied) - data->min_corner.in_direction(d)) / 2; count[i] = abs(ied - isd) / 2 + 1; if (ied < isd) offset[permute.in_direction(d)] = count[i] - 1; } for (int i = 0; i < data->rank; ++i) { direction d = data->ds[i]; int j = permute.in_direction(d); for (int k = i + 1; k < data->rank; ++k) stride[j] *= count[k]; offset[j] *= stride[j]; if (offset[j]) stride[j] *= -1; } //-----------------------------------------------------------------------// // Compute the function to output, exactly as in fields::integrate, // except that here we store its values in a buffer instead of integrating. int *off = data->offsets; component *cS = data->cS; complex *fields = data->fields, *ph = data->ph; const component *iecs = data->inveps_cs; const direction *ieds = data->inveps_ds; int ieos[6]; const component *imcs = data->invmu_cs; const direction *imds = data->invmu_ds; int imos[6]; for (int i = 0; i < data->num_fields; ++i) { cS[i] = S.transform(data->components[i], -sn); if (cS[i] == Dielectric || cS[i] == Permeability) ph[i] = 1.0; else { fc->gv.yee2cent_offsets(cS[i], off[2*i], off[2*i+1]); ph[i] = shift_phase * S.phase_shift(cS[i], sn); } } for (int k = 0; k < data->ninveps; ++k) fc->gv.yee2cent_offsets(iecs[k], ieos[2*k], ieos[2*k+1]); for (int k = 0; k < data->ninvmu; ++k) fc->gv.yee2cent_offsets(imcs[k], imos[2*k], imos[2*k+1]); vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; for (int i = 0; i < data->num_fields; ++i) { if (cS[i] == Dielectric) { double tr = 0.0; for (int k = 0; k < data->ninveps; ++k) { const realnum *ie = fc->s->chi1inv[iecs[k]][ieds[k]]; if (ie) tr += (ie[idx] + ie[idx+ieos[2*k]] + ie[idx+ieos[1+2*k]] + ie[idx+ieos[2*k]+ieos[1+2*k]]); else tr += 4; // default inveps == 1 } fields[i] = (4 * data->ninveps) / tr; } else if (cS[i] == Permeability) { double tr = 0.0; for (int k = 0; k < data->ninvmu; ++k) { const realnum *im = fc->s->chi1inv[imcs[k]][imds[k]]; if (im) tr += (im[idx] + im[idx+imos[2*k]] + im[idx+imos[1+2*k]] + im[idx+imos[2*k]+imos[1+2*k]]); else tr += 4; // default invmu == 1 } fields[i] = (4 * data->ninvmu) / tr; } else { double f[2]; for (int k = 0; k < 2; ++k) if (fc->f[cS[i]][k]) f[k] = 0.25 * (fc->f[cS[i]][k][idx] + fc->f[cS[i]][k][idx+off[2*i]] + fc->f[cS[i]][k][idx+off[2*i+1]] + fc->f[cS[i]][k][idx+off[2*i]+off[2*i+1]]); else f[k] = 0; fields[i] = complex(f[0], f[1]) * ph[i]; } } complex fun = data->fun(fields, loc, data->fun_data_); int idx2 = ((((offset[0] + offset[1] + offset[2]) + loop_i1 * stride[0]) + loop_i2 * stride[1]) + loop_i3 * stride[2]); data->buf[idx2] = data->reim ? imag(fun) : real(fun); } //-----------------------------------------------------------------------// data->file->write_chunk(data->rank, start, count, data->buf); } void fields::output_hdf5(h5file *file, const char *dataname, int num_fields, const component *components, field_function fun, void *fun_data_, int reim, const volume &where, bool append_data, bool single_precision) { am_now_working_on(FieldOutput); h5_output_data data; data.file = file; data.min_corner = gv.round_vec(where.get_max_corner()) + one_ivec(gv.dim); data.max_corner = gv.round_vec(where.get_min_corner()) - one_ivec(gv.dim); data.num_chunks = 0; data.bufsz = 0; data.reim = reim; loop_in_chunks(h5_findsize_chunkloop, (void *) &data, where, Centered, true, true); file->prevent_deadlock(); // can't hold a lock since *_to_all is collective data.max_corner = max_to_all(data.max_corner); data.min_corner = -max_to_all(-data.min_corner); // i.e., min_to_all data.num_chunks = sum_to_all(data.num_chunks); if (data.num_chunks == 0 || !(data.min_corner <= data.max_corner)) return; // no data to write; int rank = 0, dims[3]; LOOP_OVER_DIRECTIONS(gv.dim, d) { if (rank >= 3) abort("too many dimensions in output_hdf5"); int n = (data.max_corner.in_direction(d) - data.min_corner.in_direction(d)) / 2 + 1; if (n > 1) { data.ds[rank] = d; dims[rank++] = n; } } data.rank = rank; file->create_or_extend_data(dataname, rank, dims, append_data, single_precision); data.buf = new realnum[data.bufsz]; data.num_fields = num_fields; data.components = components; data.cS = new component[num_fields]; data.ph = new complex[num_fields]; data.fields = new complex[num_fields]; data.fun = fun; data.fun_data_ = fun_data_; /* compute inverse-epsilon directions for computing Dielectric fields */ data.ninveps = 0; bool needs_dielectric = false; for (int i = 0; i < num_fields; ++i) if (components[i] == Dielectric) { needs_dielectric = true; break; } if (needs_dielectric) FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninveps == 3) abort("more than 3 field components??"); data.inveps_cs[data.ninveps] = c; data.inveps_ds[data.ninveps] = component_direction(c); ++data.ninveps; } /* compute inverse-mu directions for computing Permeability fields */ data.ninvmu = 0; bool needs_permeability = false; for (int i = 0; i < num_fields; ++i) if (components[i] == Permeability) { needs_permeability = true; break; } if (needs_permeability) FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninvmu == 3) abort("more than 3 field components??"); data.invmu_cs[data.ninvmu] = c; data.invmu_ds[data.ninvmu] = component_direction(c); ++data.ninvmu; } data.offsets = new int[2 * num_fields]; for (int i = 0; i < 2 * num_fields; ++i) data.offsets[i] = 0; loop_in_chunks(h5_output_chunkloop, (void *) &data, where, Centered, true, true); delete[] data.offsets; delete[] data.fields; delete[] data.ph; delete[] data.cS; delete[] data.buf; file->done_writing_chunks(); finished_working(); } /***************************************************************************/ void fields::output_hdf5(const char *dataname, int num_fields, const component *components, field_function fun, void *fun_data_, const volume &where, h5file *file, bool append_data, bool single_precision, const char *prefix, bool real_part_only) { bool delete_file; if ((delete_file = !file)) file = open_h5file(dataname, h5file::WRITE, prefix, true); if (real_part_only) { output_hdf5(file, dataname, num_fields, components, fun, fun_data_, 0, where, append_data, single_precision); } else { int len = strlen(dataname) + 5; char *dataname2 = new char[len]; snprintf(dataname2, len, "%s%s", dataname, ".r"); output_hdf5(file, dataname2, num_fields, components, fun, fun_data_, 0, where, append_data, single_precision); snprintf(dataname2, len, "%s%s", dataname, ".i"); output_hdf5(file, dataname2, num_fields, components, fun, fun_data_, 1, where, append_data, single_precision); delete[] dataname2; } if (delete_file) delete file; } /***************************************************************************/ typedef struct { field_rfunction fun; void *fun_data_; } rintegrand_data; static complex rintegrand_fun(const complex *fields, const vec &loc, void *data_) { rintegrand_data *data = (rintegrand_data *) data_; return data->fun(fields, loc, data->fun_data_); } void fields::output_hdf5(const char *dataname, int num_fields, const component *components, field_rfunction fun, void *fun_data_, const volume &where, h5file *file, bool append_data, bool single_precision, const char *prefix) { bool delete_file; if ((delete_file = !file)) file = open_h5file(dataname, h5file::WRITE, prefix, true); rintegrand_data data; data.fun = fun; data.fun_data_ = fun_data_; output_hdf5(file, dataname, num_fields, components, rintegrand_fun, (void *) &data, 0, where, append_data, single_precision); if (delete_file) delete file; } /***************************************************************************/ static complex component_fun(const complex *fields, const vec &loc, void *data_) { (void) loc; // unused (void) data_; // unused return fields[0]; } void fields::output_hdf5(component c, const volume &where, h5file *file, bool append_data, bool single_precision, const char *prefix) { if (is_derived(int(c))) { output_hdf5(derived_component(c), where, file, append_data, single_precision, prefix); return; } if (coordinate_mismatch(gv.dim, c)) return; char dataname[256]; bool has_imag = !is_real && c != Dielectric && c != Permeability; bool delete_file; if ((delete_file = !file)) file = open_h5file(component_name(c), h5file::WRITE, prefix, true); snprintf(dataname, 256, "%s%s", component_name(c), has_imag ? ".r" : ""); output_hdf5(file, dataname, 1, &c, component_fun, 0, 0, where, append_data, single_precision); if (has_imag) { snprintf(dataname, 256, "%s.i", component_name(c)); output_hdf5(file, dataname, 1, &c, component_fun, 0, 1, where, append_data, single_precision); } if (delete_file) delete file; } /***************************************************************************/ void fields::output_hdf5(derived_component c, const volume &where, h5file *file, bool append_data, bool single_precision, const char *prefix) { if (!is_derived(int(c))) { output_hdf5(component(c), where, file, append_data, single_precision, prefix); return; } if (coordinate_mismatch(gv.dim, c)) return; int nfields; component cs[12]; field_rfunction fun = derived_component_func(c, gv, nfields, cs); output_hdf5(component_name(c), nfields, cs, fun, &nfields, where, file, append_data, single_precision, prefix); } /***************************************************************************/ const char *fields::h5file_name(const char *name, const char *prefix, bool timestamp) { const int buflen = 1024; static char filename[buflen]; char time_step_string[32] = ""; if (timestamp) { if (dt >= 0.01 && dt < 10) snprintf(time_step_string, 32, "-%09.2f", time()); else snprintf(time_step_string, 32, "-%09d", t); } snprintf(filename, buflen, "%s/" "%s%s" "%s" "%s" ".h5", outdir, prefix ? prefix : "", prefix && prefix[0] ? "-" : "", name, time_step_string); return filename; } h5file *fields::open_h5file(const char *name, h5file::access_mode mode, const char *prefix, bool timestamp) { const char *filename = h5file_name(name, prefix, timestamp); if (!quiet && mode == h5file::WRITE) master_printf("creating output file \"%s\"...\n", filename); return new h5file(filename, mode, true); } } // namespace meep meep-openmpi-1.1.1/src/initialize.cpp0000644000175200017520000000745411243101206016773 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" // Cylindrical coordinates: #ifdef HAVE_LIBGSL # include #endif namespace meep { static double J(int m, double kr) { #ifdef HAVE_LIBGSL return gsl_sf_bessel_Jn(m, kr); #else abort("not compiled with GSL, required for Bessel functions"); return 0; #endif } static double Jprime(int m, double kr) { if (m) return 0.5*(J(m-1,kr)-J(m+1,kr)); else return -J(1,kr); } static double Jroot(int m, int n) { #ifdef HAVE_LIBGSL return gsl_sf_bessel_zero_Jnu(m, n+1); #else abort("not compiled with GSL, required for Bessel functions"); return 0; #endif } static double Jmax(int m, int n) { double rlow, rhigh = Jroot(m,n), rtry; if (n == 0) rlow = 0; else rlow = Jroot(m, n-1); double jplow = Jprime(m,rlow), jptry; do { rtry = rlow + (rhigh - rlow)*0.5; jptry = Jprime(m,rtry); if (jplow*jptry < 0) rhigh = rtry; else rlow = rtry; } while (rhigh - rlow > rhigh*1e-15); return rtry; } static double ktrans, kax; static int m_for_J; static complex JJ(const vec &pt) { return polar(J(m_for_J, ktrans*pt.r()),kax*pt.r()); } static complex JP(const vec &pt) { return polar(Jprime(m_for_J, ktrans*pt.r()),kax*pt.r()); } void fields::initialize_with_nth_te(int np0) { require_component(Hz); for (int i=0;iinitialize_with_nth_te(np0, real(k[Z])); } void fields_chunk::initialize_with_nth_te(int np0, double kz) { const int im = int(m); const int n = (im==0) ? np0 - 0 : np0 - 1; const double rmax = Jmax(im,n); ktrans = rmax*a/gv.nr(); kax = kz*2*pi/a; m_for_J = im; initialize_field(Hz, JJ); } void fields::initialize_with_nth_tm(int np0) { require_component(Ez); require_component(Hp); for (int i=0;iinitialize_with_nth_tm(np0, real(k[Z])); } void fields_chunk::initialize_with_nth_tm(int np1, double kz) { const int im = int(m); const int n = np1 - 1; const double rroot = Jroot(im,n); ktrans = rroot*a/gv.nr(); kax = kz*2*pi/a; m_for_J = im; initialize_field(Ez, JJ); initialize_field(Hp, JP); } void fields::initialize_with_n_te(int ntot) { for (int n=0;n func(const vec &)) { require_component(c); for (int i=0;iinitialize_field(c, func); step_boundaries(type(c)); if (is_D(c)) { update_eh(E_stuff); step_boundaries(E_stuff); } if (is_B(c)) { update_eh(H_stuff); step_boundaries(H_stuff); } } void fields_chunk::initialize_field(component c, complex func(const vec &)) { if (f[c][0]) { LOOP_OVER_VOL(gv, c, i) { IVEC_LOOP_LOC(gv, here); complex val = func(here); f[c][0][i] += real(val); if (!is_real) f[c][1][i] += imag(val); } } } } // namespace meep meep-openmpi-1.1.1/src/step_generic_stride1.cpp0000644000175200017520000004357511243355204020751 0ustar debiandebian/* This file was automatically generated --- DO NOT EDIT */ #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" #define DPR double * restrict #define RPR realnum * restrict /* These macros get into the guts of the S1LOOP_OVER_VOL loops to efficiently construct the index k into a PML sigma array. Basically, k needs to increment by 2 for each increment of one of LOOP's for-loops, starting at the appropriate corner of the grid_volume, and these macros define the relevant strides etc. for each loop. KSTRIDE_DEF defines the relevant strides etc. and goes outside the LOOP, wheras KDEF defines the k index and goes inside the LOOP. */ #define KSTRIDE_DEF(dsig, k, corner) \ const int k##0 = corner.in_direction(dsig) \ - gv.little_corner().in_direction(dsig); \ const int s##k##1 = gv.yucky_direction(0) == dsig ? 2 : 0; \ const int s##k##2 = gv.yucky_direction(1) == dsig ? 2 : 0; \ const int s##k##3 = gv.yucky_direction(2) == dsig ? 2 : 0 #define KDEF(k,dsig) const int k = ((k##0 + s##k##1*loop_i1) + s##k##2*loop_i2) + s##k##3*loop_i3 #define DEF_k KDEF(k,dsig) #define DEF_ku KDEF(ku,dsigu) #define DEF_kw KDEF(kw,dsigw) namespace meep { #define SWAP(t,a,b) { t xxxx = a; a = b; b = xxxx; } /* update step for df/dt = curl g, i.e. f += dt curl g = dt/dx (dg1 - dg2) where dgk = gk[i] - gk[i+sk]. g = (g1,g2), where g1 or g2 may be NULL. Note that dt/dx and/or s1 and s2 may be negative to flip signs of derivatives. PML: sig[k] = sigma[k]*dt/2, siginv[k] = 1 / (1 + sigma[k]*dt/2). Here, k is the index in the dsig direction. if dsig == NO_DIRECTION, then PML is not used. (dsig is the sigma direction.) if non-NULL, then cnd is an array of conductivity values, changing the underlying PDE to: df/dt = curl g - cnd f which is updated as: f = [ dt * curl g + (1 - dt cnd/2) f ] / (1 + dt cnd/2) cndinv should be an array of 1 / (1 + dt cnd/2). In the case of PML, cndinv should contain 1 / (1 + dt (cnd + sigma)/2). fcnd is an auxiliary field used ONLY when we simultaneously have PML (dsig != NO_DIR) and conductivity, in which case fcnd solves dfcnd/dt = curl g - cnd*fcnd and f satisfies df/dt = dfcnd/dt - sigma*f. fu is another auxiliary field used only in PML (dsigu != NO_DIR), in which case f solves: df/dt = dfu/dt - sigma_u * f and fu replaces f in the equations above (fu += dt curl g etcetera). */ void step_curl_stride1(RPR f, component c, const RPR g1, const RPR g2, int s1, int s2, // strides for g1/g2 shift const grid_volume &gv, double dtdx, direction dsig, const DPR sig, const DPR siginv, RPR fu, direction dsigu, const DPR sigu, const DPR siginvu, double dt, const RPR cnd, const RPR cndinv, RPR fcnd) { if (!g1) { // swap g1 and g2 SWAP(const RPR, g1, g2); SWAP(int, s1, s2); dtdx = -dtdx; // need to flip derivative sign } /* The following are a bunch of special cases of the "MOST GENERAL CASE" loop below. We make copies of the loop for each special case in order to keep the innermost loop efficient. This is especially important because the non-PML cases are actually more common. (The "right" way to do this is by partial evaluation of the most general case, but that would require a code generator.) */ if (dsig == NO_DIRECTION) { // no PML in f update if (dsigu == NO_DIRECTION) { // no fu update if (cnd) { double dt2 = dt * 0.5; if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] = ((1 - dt2 * cnd[i]) * f[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * cndinv[i]; } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] = ((1 - dt2 * cnd[i]) * f[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; } } else { // no conductivity if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] -= dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2]); } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] -= dtdx * (g1[i+s1] - g1[i]); } } } else { // fu update, no PML in f update KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cnd) { double dt2 = dt * 0.5; if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] = ((1 - dt2 * cnd[i]) * fprev - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * cndinv[i]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] = ((1 - dt2 * cnd[i]) * fprev - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } } else { // no conductivity if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] -= dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2]); f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double fprev = fu[i]; fu[i] -= dtdx * (g1[i+s1] - g1[i]); f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } } } } else { /* PML in f update */ KSTRIDE_DEF(dsig, k, gv.little_owned_corner0(c)); if (dsigu == NO_DIRECTION) { // no fu update if (cnd) { double dt2 = dt * 0.5; if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1]-g1[i] + g2[i]-g2[i+s2])) * cndinv[i]; f[i] = ((1 - sig[k]) * f[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; f[i] = ((1 - sig[k]) * f[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; } } } else { // no conductivity (other than PML conductivity) if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] = ((1 - sig[k]) * f[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * siginv[k]; } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] = ((1 - sig[k]) * f[i] - dtdx * (g1[i+s1]-g1[i])) * siginv[k]; } } } } else { // fu update + PML in f update KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cnd) { double dt2 = dt * 0.5; if (g2) { //////////////////// MOST GENERAL CASE ////////////////////// S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1]-g1[i] + g2[i]-g2[i+s2])) * cndinv[i]; fu[i] = ((1 - sig[k]) * fu[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } ///////////////////////////////////////////////////////////// } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; realnum fcnd_prev = fcnd[i]; fcnd[i] = ((1 - dt2 * cnd[i]) * fcnd[i] - dtdx * (g1[i+s1] - g1[i])) * cndinv[i]; fu[i] = ((1 - sig[k]) * fu[i] + (fcnd[i] - fcnd_prev)) * siginv[k]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } } else { // no conductivity (other than PML conductivity) if (g2) { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; fu[i] = ((1 - sig[k]) * fu[i] - dtdx * (g1[i+s1] - g1[i] + g2[i] - g2[i+s2])) * siginv[k]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } else { S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double fprev = fu[i]; fu[i] = ((1 - sig[k]) * fu[i] - dtdx * (g1[i+s1]-g1[i])) * siginv[k]; f[i] = siginvu[ku] * ((1 - sigu[ku]) * f[i] + fu[i] - fprev); } } } } } } /* field-update equation f += betadt * g (plus variants for conductivity and/or PML). This is used in 2d calculations to add an exp(i beta z) time dependence, which gives an additional i \beta \hat{z} \times cross-product in the curl equations. */ void step_beta_stride1(RPR f, component c, const RPR g, const grid_volume &gv, double betadt, direction dsig, const DPR siginv, RPR fu, direction dsigu, const DPR siginvu, const RPR cndinv, RPR fcnd) { if (!g) return; if (dsig != NO_DIRECTION) { // PML in f update KSTRIDE_DEF(dsig, k, gv.little_owned_corner0(c)); if (dsigu != NO_DIRECTION) { // PML in f + fu KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cndinv) { // conductivity + PML //////////////////// MOST GENERAL CASE ////////////////////// S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double df; double dfcnd = betadt * g[i] * cndinv[i]; fcnd[i] += dfcnd; fu[i] += (df = dfcnd * siginv[k]); f[i] += siginvu[ku] * df; } ///////////////////////////////////////////////////////////// } else { // PML only S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; DEF_ku; double df; fu[i] += (df = betadt * g[i] * siginv[k]); f[i] += siginvu[ku] * df; } } } else { // PML in f, no fu if (cndinv) { // conductivity + PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; double dfcnd = betadt * g[i] * cndinv[i]; fcnd[i] += dfcnd; f[i] += dfcnd * siginv[k]; } } else { // PML only S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_k; f[i] += betadt * g[i] * siginv[k]; } } } } else { // no PML in f update if (dsigu != NO_DIRECTION) { // fu, no PML in f KSTRIDE_DEF(dsigu, ku, gv.little_owned_corner0(c)); if (cndinv) { // conductivity, no PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double df; fu[i] += (df = betadt * g[i] * cndinv[i]); f[i] += siginvu[ku] * df; } } else { // no conductivity or PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) { DEF_ku; double df; fu[i] += (df = betadt * g[i]); f[i] += siginvu[ku] * df; } } } else { // no PML, no fu if (cndinv) { // conductivity, no PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] += betadt * g[i] * cndinv[i]; } else { // no conductivity or PML S1LOOP_OVER_VOL_OWNED0(gv, c, i) f[i] += betadt * g[i]; } } } } /* Given Dsqr = |D|^2 and Di = component of D, compute the factor f so that Ei = chi1inv * f * Di. In principle, this would involve solving a cubic equation, but instead we use a Pade approximant that is accurate to several orders. This is inaccurate if the nonlinear index change is large, of course, but in that case the chi2/chi3 power-series expansion isn't accurate anyway, so the cubic isn't physical there either. */ inline double calc_nonlinear_u(const double Dsqr, const double Di, const double chi1inv, const double chi2, const double chi3) { double c2 = Di*chi2*(chi1inv*chi1inv); double c3 = Dsqr*chi3*(chi1inv*chi1inv*chi1inv); return (1 + c2 + 2*c3)/(1 + 2*c2 + 3*c3); } /* Update E from D using epsilon and PML, *or* update H from B using mu and PML. To be generic, here we set f = u * g, where u may be a tensor, and we also have a nonlinear susceptibility chi. Here, g = (g,g1,g2) where g1 and g2 are the off-diagonal components, if any (g2 may be NULL). In PML (dsigw != NO_DIR), we have an additional auxiliary field fw, which is updated by the equations: fw = u * g df/dt = dfw/dt - sigmaw * fw That is, fw is updated like the non-PML f, and f is updated from fw by a little ODE. Here, sigw[k] = sigmaw[k]*dt/2. */ void step_update_EDHB_stride1(RPR f, component fc, const grid_volume &gv, const RPR g, const RPR g1, const RPR g2, const RPR u, const RPR u1, const RPR u2, int s, int s1, int s2, const RPR chi2, const RPR chi3, RPR fw, direction dsigw, const DPR sigw) { if (!f) return; if ((!g1 && g2) || (g1 && g2 && !u1 && u2)) { /* swap g1 and g2 */ SWAP(const RPR, g1, g2); SWAP(const RPR, u1, u2); SWAP(int, s1, s2); } // stable averaging of offdiagonal components #define OFFDIAG(u,g,sx) (0.25 * ((g[i]+g[i-sx])*u[i] \ + (g[i+s]+g[(i+s)-sx])*u[i+s])) /* As with step_curl_stride1, these loops are all essentially copies of the "MOST GENERAL CASE" loop with various terms thrown out. */ if (dsigw != NO_DIRECTION) { //////// PML case (with fw) ///////////// KSTRIDE_DEF(dsigw, kw, gv.little_owned_corner0(fc)); if (u1 && u2) { // 3x3 off-diagonal u if (chi3) { //////////////////// MOST GENERAL CASE ////////////////////// S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s + g2s*g2s), gs, us, chi2[i], chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } ///////////////////////////////////////////////////////////// } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } } else if (u1) { // 2x2 off-diagonal u if (chi3) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s), gs, us, chi2[i], chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us + OFFDIAG(u1,g1,s1)); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } } else if (u2) { // 2x2 off-diagonal u abort("bug - didn't swap off-diagonal terms!?"); } else { // diagonal u if (chi3) { if (g1 && g2) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs+0.0625*(g1s*g1s+g2s*g2s), gs, us, chi2[i], chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } else if (g1) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs + 0.0625*(g1s*g1s), gs, us, chi2[i], chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } else if (g2) { abort("bug - didn't swap off-diagonal terms!?"); } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs*us)*calc_nonlinear_u(gs*gs, gs,us, chi2[i],chi3[i]); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } } else if (u) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = (gs * us); f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { DEF_kw; double fwprev = fw[i], sigwkw = sigw[kw]; fw[i] = g[i]; f[i] += (1 + sigwkw) * fw[i] - (1 - sigwkw) * fwprev; } } } } else { /////////////// no PML (no fw) /////////////////// if (u1 && u2) { // 3x3 off-diagonal u if (chi3) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s + g2s*g2s), gs, us, chi2[i], chi3[i]); } } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1) + OFFDIAG(u2,g2,s2)); } } } else if (u1) { // 2x2 off-diagonal u if (chi3) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1)) * calc_nonlinear_u(gs * gs + 0.0625 * (g1s*g1s), gs, us, chi2[i], chi3[i]); } } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us + OFFDIAG(u1,g1,s1)); } } } else if (u2) { // 2x2 off-diagonal u abort("bug - didn't swap off-diagonal terms!?"); } else { // diagonal u if (chi3) { if (g1 && g2) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double g2s = g2[i]+g2[i+s]+g2[i-s2]+g2[i+(s-s2)]; double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs+0.0625*(g1s*g1s+g2s*g2s), gs, us, chi2[i], chi3[i]); } } else if (g1) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double g1s = g1[i]+g1[i+s]+g1[i-s1]+g1[i+(s-s1)]; double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs + 0.0625*(g1s*g1s), gs, us, chi2[i], chi3[i]); } } else if (g2) { abort("bug - didn't swap off-diagonal terms!?"); } else { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs*us)*calc_nonlinear_u(gs*gs, gs,us, chi2[i],chi3[i]); } } } else if (u) { S1LOOP_OVER_VOL_OWNED(gv, fc, i) { double gs = g[i]; double us = u[i]; f[i] = (gs * us); } } else S1LOOP_OVER_VOL_OWNED(gv, fc, i) f[i] = g[i]; } } } } // namespace meep meep-openmpi-1.1.1/src/sphere-quad.cpp0000644000175200017520000002012711243101206017040 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* This file is compiled into a program sphere_quad that is used to generate the file sphere-quad.h, which is a table of quadrature points and weights for integrating on spheres in 1d/2d/3d. */ #include #include #include #define SHIFT3(x,y,z) {double SHIFT3_dummy = z; z = y; y = x; x = SHIFT3_dummy;} #define CHECK(condition, message) do { \ if (!(condition)) { \ fprintf(stderr, "CHECK failure on line %d of " __FILE__ ": " \ message "\n", __LINE__); exit(EXIT_FAILURE); \ } \ } while (0) /* Compute quadrature points and weights for integrating on the unit sphere. x, y, z, and weight should be arrays of num_sq_pts values to hold the coordinates and weights of the quadrature points on output. Currently, num_sq_pts = 12, 50, and 72 are supported. */ void spherical_quadrature_points(double *x, double *y, double *z, double *weight, int num_sq_pts) { int i,j,k,l, n = 0; double x0, y0, z0, w; if (num_sq_pts == 50) { /* Computes quadrature points and weights for 50-point 11th degree integration formula on a unit sphere. This particular quadrature formula has the advantage, for our purposes, of preserving the symmetry group of an octahedron (i.e. simple cubic symmetry, with respect to the Cartesian xyz axes). References: A. D. McLaren, "Optimal Numerical Integration on a Sphere," Math. Comp. 17, pp. 361-383 (1963). Also in: Arthur H. Stroud, "Approximate Calculation of Multiple Integrals" (Prentice Hall, 1971) (formula number U3:11-1). This code was written with the help of example code by John Burkardt: http://www.psc.edu/~burkardt/src_pt/stroud/stroud.html */ x0 = 1; y0 = z0 = 0; w = 9216 / 725760.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 3; ++j) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } x0 = y0 = sqrt(0.5); z0 = 0; w = 16384 / 725760.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 2; ++j) { y0 = -y0; for (k = 0; k < 3; ++k) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } x0 = y0 = z0 = sqrt(1.0 / 3.0); w = 15309 / 725760.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 2; ++j) { y0 = -y0; for (k = 0; k < 2; ++k) { z0 = -z0; x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } x0 = y0 = sqrt(1.0 / 11.0); z0 = 3 * x0; w = 14641 / 725760.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 2; ++j) { y0 = -y0; for (k = 0; k < 2; ++k) { z0 = -z0; for (l = 0; l < 3; ++l) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } } } else if (num_sq_pts == 72 || num_sq_pts == 12) { /* As above (same references), but with a 72-point 14th degree formula, this time with the symmetry group of an icosohedron. (Stroud formula number U3:14-1.) Alternatively, just use the 12-point 5th degree formula consisting of the vertices of a regular icosohedron. */ /* first, the vertices of an icosohedron: */ x0 = sqrt(0.5 - sqrt(0.05)); y0 = sqrt(0.5 + sqrt(0.05)); z0 = 0; if (num_sq_pts == 72) w = 125 / 10080.0; else w = 1 / 12.0; for (i = 0; i < 2; ++i) { x0 = -x0; for (j = 0; j < 2; ++j) { y0 = -y0; for (k = 0; k < 3; ++k) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } if (num_sq_pts == 72) { /* it would be nice, for completeness, to have more digits here: */ double coords[3][5] = { { -0.151108275, 0.315838353, 0.346307112, -0.101808787, -0.409228403 }, { 0.155240600, 0.257049387, 0.666277790, 0.817386065, 0.501547712 }, { 0.976251323, 0.913330032, 0.660412970, 0.567022920, 0.762221757 } }; w = 143 / 10080.0; for (l = 0; l < 5; ++l) { x0 = coords[0][l]; y0 = coords[1][l]; z0 = coords[2][l]; for (i = 0; i < 3; ++i) { double dummy = x0; x0 = z0; z0 = -y0; y0 = -dummy; for (j = 0; j < 3; ++j) { SHIFT3(x0,y0,z0); x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } y0 = -y0; z0 = -z0; x[n] = x0; y[n] = y0; z[n] = z0; weight[n++] = w; } } } } else CHECK(0, "spherical_quadrature_points: passed unknown # points!"); CHECK(n == num_sq_pts, "bug in spherical_quadrature_points: wrong number of points!"); } #define NQUAD3 50 /* use 50-point quadrature formula by default */ /**********************************************************************/ #define K_PI 3.141592653589793238462643383279502884197 #define NQUAD2 12 /**********************************************************************/ double sqr(double x) { return x * x; } double dist2(double x1, double y1, double z1, double x2, double y2, double z2) { return sqr(x1-x2) + sqr(y1-y2) + sqr(z1-z2); } double min2(double a, double b) { return a < b ? a : b; } /* sort the array to maximize the spacing of each point with the previous points */ void sort_by_distance(int n, double x[], double y[], double z[], double w[]) { for (int i = 1; i < n; ++i) { double d2max = 0; double d2maxsum = 0; int jmax = i; for (int j = i; j < n; ++j) { double d2min = 1e20, d2sum = 0; for (int k = 0; k < i; ++k) { double d2 = float(dist2(x[k],y[k],z[k], x[j],y[j],z[j])); d2min = min2(d2min, d2); d2sum += d2; } if (d2min > d2max || (d2min == d2max && d2sum > d2maxsum)) { d2max = d2min; d2maxsum = d2sum; jmax = j; } } double xi = x[i], yi = y[i], zi = z[i], wi = w[i]; x[i] = x[jmax]; y[i] = y[jmax]; z[i] = z[jmax]; w[i] = w[jmax]; x[jmax] = xi; y[jmax] = yi; z[jmax] = zi; w[jmax] = wi; } } int main(void) { int i; double x2[NQUAD2], y2[NQUAD2], z2[NQUAD2], w2[NQUAD2]; double x3[NQUAD3], y3[NQUAD3], z3[NQUAD3], w3[NQUAD3]; printf( "/* For 1d, 2d, and 3d, quadrature points and weights on a unit sphere.\n" " There are num_sphere_quad[dim-1] points i, with the i-th point at\n" " (x,y,z) = (sphere_quad[dim-1][i][ 0, 1, 2 ]), and with a quadrature\n" " weight sphere_quad[dim-1][i][3]. */\n\n"); printf("static const int num_sphere_quad[3] = { %d, %d, %d };\n\n", 2, NQUAD2, NQUAD3); printf("static const double sphere_quad[3][%d][4] = {\n", NQUAD3); printf(" { {0,0,1,0.5}, {0,0,-1,0.5} },\n"); for (i = 0; i < NQUAD2; ++i) { x2[i] = cos(2*i * K_PI / NQUAD2); y2[i] = sin(2*i * K_PI / NQUAD2); z2[i] = 0.0; w2[i] = 1.0 / NQUAD2; } sort_by_distance(NQUAD2,x2,y2,z2,w2); printf(" {\n"); for (i = 0; i < NQUAD2; ++i) { printf(" { %0.20g, %0.20g, %0.20g, %0.20g },\n", x2[i], y2[i], z2[i], w2[i]); } printf(" },\n"); printf(" {\n"); spherical_quadrature_points(x3,y3,z3, w3, NQUAD3); sort_by_distance(NQUAD3,x3,y3,z3,w3); for (i = 0; i < NQUAD3; ++i) { printf(" { %0.20g, %0.20g, %0.20g, %0.20g },\n", x3[i], y3[i], z3[i], w3[i]); } printf(" }\n"); printf("};\n"); return 0; } meep-openmpi-1.1.1/src/polarization.cpp0000644000175200017520000001526211243101206017341 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" #include "config.h" namespace meep { void polarization::set_up_polarizations(polarization *pols[NUM_FIELD_TYPES], const structure_chunk *sc, int is_r, bool store_enrgy) { if (sc->is_mine()) FOR_FIELD_TYPES(ft) { const polarizability *pb = sc->pb; while (pb && pb->ft != ft) pb = pb->next; if (pb) { pols[ft] = new polarization(pb, is_r, store_enrgy); polarization *pol = pols[ft]; for (pb = pb->next; pb; pb = pb->next) if (pb->ft == ft) pol = (pol->next = new polarization(pb, is_r, store_enrgy)); } } } void polarization::use_real_fields() { is_real = 1; FOR_COMPONENTS(c) { delete[] P[c][1]; P[c][1] = NULL; } if (next) next->use_real_fields(); } void polarization::zero_fields() { const grid_volume &gv = pb->gv; DOCMP FOR_COMPONENTS(c) if (P[c][cmp]) for (int i=0;izero_fields(); } polarization::polarization(const polarizability *the_pb, int is_r, bool store_enrgy) { const grid_volume &gv = the_pb->gv; is_real = is_r; store_energy = store_enrgy; DOCMP2 FOR_COMPONENTS(c) P[c][cmp] = NULL; DOCMP FOR_FT_COMPONENTS(the_pb->ft, c) if (gv.has_field(c)) P[c][cmp] = new realnum[gv.ntot()]; FOR_COMPONENTS(c) energy[c] = NULL; FOR_FT_COMPONENTS(the_pb->ft, c) if (gv.has_field(c) && store_energy) energy[c] = new realnum[gv.ntot()]; pb = the_pb; FOR_COMPONENTS(c) s[c] = pb->s[c]; next = NULL; zero_fields(); } polarization::~polarization() { DOCMP FOR_COMPONENTS(c) delete[] P[c][cmp]; FOR_COMPONENTS(c) delete[] energy[c]; if (next) delete next; } double polarization::local_energy(const ivec &iloc) { if (pb->gv.dim != D1) abort("Can't do local_energy in these dims.\n"); double res = 0.0; FOR_COMPONENTS(c) if (energy[c]) res += energy[c][pb->gv.index(c,iloc)]; return res; } polarizability::polarizability(const polarizability *pb) { omeganot = pb->omeganot; gamma = pb->gamma; gv = pb->gv; ft = pb->ft; is_it_mine = pb->is_it_mine; FOR_COMPONENTS(c) s[c] = NULL; if (is_mine()) { FOR_COMPONENTS(c) if (gv.has_field(c) && pb->s[c]) { s[c] = new realnum[gv.ntot()]; for (int i=0;is[c][i]; } } if (pb->next) next = new polarizability(pb->next); else next = NULL; } polarizability::polarizability(const structure_chunk *sc, material_function &sig, field_type ft_, double om, double ga, double sigscale, bool mine) { gv = sc->gv; is_it_mine = mine; ft = ft_; omeganot = om; gamma = ga; next = NULL; sig.set_volume(sc->gv.pad().surroundings()); FOR_COMPONENTS(c) s[c] = NULL; if (is_mine()) { FOR_FT_COMPONENTS(ft,c) if (gv.has_field(c)) s[c] = new realnum[gv.ntot()]; FOR_COMPONENTS(c) if (s[c]) for (int i=0;i polarization::analytic_chi1(component c, double freq, const vec &p) const { const complex I = complex(0,1); double w[8]; int in[8]; pb->gv.interpolate(c, p, in, w); complex epsi = 0.0; if (pb->s[c]) for (int i=0;i<8 && w[i];i++) epsi += w[i]*pb->s[c][in[i]]/ (pb->omeganot*pb->omeganot - freq*freq - freq*pb->gamma*I); if (next) epsi += next->analytic_chi1(c, freq, p); return epsi; } complex fields::analytic_chi1(component c, double f, const vec &p) const { for (int i=0;igv.contains(p)) return chunks[i]->analytic_chi1(c,f,p) + get_eps(p); return 0.0; } complex fields_chunk::analytic_chi1(component c, double f, const vec &p) const { complex epsi = 0.0; if (is_mine() && pols[type(c)]) epsi += pols[type(c)]->analytic_chi1(c, f * (2*pi*dt), p); return broadcast(n_proc(), epsi); } polarizability_identifier structure::add_polarizability(material_function &sigma, field_type ft, double omega, double gamma) { changing_chunks(); for (int i=0;iadd_polarizability(sigma, ft,omega, gamma); return chunks[0]->pb->get_identifier(); } polarizability_identifier structure::add_polarizability( double sigma(const vec &), field_type ft, double omega, double gamma) { simple_material_function sig(sigma); return add_polarizability(sig, ft, omega, gamma); } polarizability_identifier polarizability::get_identifier() const { polarizability_identifier pi; pi.ft = ft; pi.gamma = gamma; pi.omeganot = omeganot; return pi; } bool polarizability_identifier::operator==(const polarizability_identifier &a) { return ft == a.ft && gamma == a.gamma && omeganot == a.omeganot; } void structure_chunk::add_polarizability(material_function &sigma, field_type ft, double omega, double gamma) { sigma.set_polarizability(ft, omega, gamma); const double freq_conversion = 2*pi*dt; double sigma_scale = freq_conversion*freq_conversion*omega*omega; polarizability *npb = new polarizability(this, sigma, ft, freq_conversion*omega, freq_conversion*gamma, sigma_scale, is_mine()); npb->next = pb; pb = npb; } } // namespace meep meep-openmpi-1.1.1/src/integrate.cpp0000644000175200017520000002051011243101206016600 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "meep.hpp" #include "meep_internals.hpp" /* generic integration and related routines, based fields::loop_in_chunk */ namespace meep { struct integrate_data { int num_fvals; const component *components; component *cS; complex *ph; complex *fvals; int *offsets; int ninveps; component inveps_cs[3]; direction inveps_ds[3]; int ninvmu; component invmu_cs[3]; direction invmu_ds[3]; complex sum; double maxabs; field_function integrand; void *integrand_data_; }; static void integrate_chunkloop(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *data_) { (void) ichunk; // unused integrate_data *data = (integrate_data *) data_; int *off = data->offsets; component *cS = data->cS; complex *fvals = data->fvals, *ph = data->ph; complex sum = 0.0; double maxabs = 0; const component *iecs = data->inveps_cs; const direction *ieds = data->inveps_ds; int ieos[6]; const component *imcs = data->invmu_cs; const direction *imds = data->invmu_ds; int imos[6]; for (int i = 0; i < data->num_fvals; ++i) { cS[i] = S.transform(data->components[i], -sn); if (cS[i] == Dielectric || cS[i] == Permeability) ph[i] = 1.0; else { if (cgrid == Centered) fc->gv.yee2cent_offsets(cS[i], off[2*i], off[2*i+1]); ph[i] = shift_phase * S.phase_shift(cS[i], sn); } } for (int k = 0; k < data->ninveps; ++k) fc->gv.yee2cent_offsets(iecs[k], ieos[2*k], ieos[2*k+1]); for (int k = 0; k < data->ninvmu; ++k) fc->gv.yee2cent_offsets(imcs[k], imos[2*k], imos[2*k+1]); vec rshift(shift * (0.5*fc->gv.inva)); LOOP_OVER_IVECS(fc->gv, is, ie, idx) { IVEC_LOOP_LOC(fc->gv, loc); loc = S.transform(loc, sn) + rshift; for (int i = 0; i < data->num_fvals; ++i) { if (cS[i] == Dielectric) { double tr = 0.0; for (int k = 0; k < data->ninveps; ++k) { const realnum *ie = fc->s->chi1inv[iecs[k]][ieds[k]]; if (ie) tr += (ie[idx] + ie[idx+ieos[2*k]] + ie[idx+ieos[1+2*k]] + ie[idx+ieos[2*k]+ieos[1+2*k]]); else tr += 4; // default inveps == 1 } fvals[i] = (4 * data->ninveps) / tr; } else if (cS[i] == Permeability) { double tr = 0.0; for (int k = 0; k < data->ninvmu; ++k) { const realnum *im = fc->s->chi1inv[imcs[k]][imds[k]]; if (im) tr += (im[idx] + im[idx+imos[2*k]] + im[idx+imos[1+2*k]] + im[idx+imos[2*k]+imos[1+2*k]]); else tr += 4; // default invmu == 1 } fvals[i] = (4 * data->ninvmu) / tr; } else { double f[2]; for (int k = 0; k < 2; ++k) if (fc->f[cS[i]][k]) f[k] = 0.25 * (fc->f[cS[i]][k][idx] + fc->f[cS[i]][k][idx+off[2*i]] + fc->f[cS[i]][k][idx+off[2*i+1]] + fc->f[cS[i]][k][idx+off[2*i]+off[2*i+1]]); else f[k] = 0; fvals[i] = complex(f[0], f[1]) * ph[i]; } } complex integrand = data->integrand(fvals, loc, data->integrand_data_); maxabs = max(maxabs, abs(integrand)); sum += integrand * IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV0 + dV1 * loop_i2); } data->maxabs = max(data->maxabs, maxabs); data->sum += sum; } complex fields::integrate(int num_fvals, const component *components, field_function integrand, void *integrand_data_, const volume &where, double *maxabs) { // check if components are all on the same grid: bool same_grid = true; for (int i = 1; i < num_fvals; ++i) if (gv.iyee_shift(components[i]) != gv.iyee_shift(components[0])) { same_grid = false; break; } component cgrid = Centered; if (same_grid && num_fvals > 0) cgrid = components[0]; integrate_data data; data.num_fvals = num_fvals; data.components = components; data.cS = new component[num_fvals]; data.ph = new complex[num_fvals]; data.fvals = new complex[num_fvals]; data.sum = 0; data.maxabs = 0; data.integrand = integrand; data.integrand_data_ = integrand_data_; /* compute inverse-epsilon directions for computing Dielectric fields */ data.ninveps = 0; bool needs_dielectric = false; for (int i = 0; i < num_fvals; ++i) if (components[i] == Dielectric) { needs_dielectric = true; break; } if (needs_dielectric) FOR_ELECTRIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninveps == 3) abort("more than 3 field components??"); data.inveps_cs[data.ninveps] = c; data.inveps_ds[data.ninveps] = component_direction(c); ++data.ninveps; } /* compute inverse-mu directions for computing Permeability fields */ data.ninvmu = 0; bool needs_permeability = false; for (int i = 0; i < num_fvals; ++i) if (components[i] == Permeability) { needs_permeability = true; break; } if (needs_permeability) FOR_MAGNETIC_COMPONENTS(c) if (gv.has_field(c)) { if (data.ninvmu == 3) abort("more than 3 field components??"); data.invmu_cs[data.ninvmu] = c; data.invmu_ds[data.ninvmu] = component_direction(c); ++data.ninvmu; } data.offsets = new int[2 * num_fvals]; for (int i = 0; i < 2 * num_fvals; ++i) data.offsets[i] = 0; loop_in_chunks(integrate_chunkloop, (void *) &data, where, cgrid); delete[] data.offsets; delete[] data.fvals; delete[] data.ph; delete[] data.cS; if (maxabs) *maxabs = max_to_all(data.maxabs); data.sum = sum_to_all(data.sum); return complex(real(data.sum), imag(data.sum)); } typedef struct { field_rfunction integrand; void *integrand_data; } rfun_wrap_data; static complex rfun_wrap(const complex *fvals, const vec &loc, void *data_) { rfun_wrap_data *data = (rfun_wrap_data *) data_; return data->integrand(fvals, loc, data->integrand_data); } double fields::integrate(int num_fvals, const component *components, field_rfunction integrand, void *integrand_data_, const volume &where, double *maxabs) { rfun_wrap_data data; data.integrand = integrand; data.integrand_data = integrand_data_; return real(integrate(num_fvals, components, rfun_wrap, &data, where, maxabs)); } double fields::max_abs(int num_fvals, const component *components, field_function integrand, void *integrand_data_, const volume &where) { double maxabs; integrate(num_fvals, components, integrand, integrand_data_, where, &maxabs); return maxabs; } double fields::max_abs(int num_fvals, const component *components, field_rfunction integrand, void *integrand_data_, const volume &where) { rfun_wrap_data data; data.integrand = integrand; data.integrand_data = integrand_data_; return max_abs(num_fvals, components, rfun_wrap, &data, where); } static complex return_the_field(const complex *fields, const vec &loc, void *integrand_data_) { (void) integrand_data_; (void) loc; // unused return fields[0]; } double fields::max_abs(int c, const volume &where) { if (is_derived(c)) return max_abs(derived_component(c), where); else return max_abs(component(c), where); } double fields::max_abs(component c, const volume &where) { if (is_derived(int(c))) return max_abs(derived_component(c), where); return max_abs(1, &c, return_the_field, 0, where); } double fields::max_abs(derived_component c, const volume &where) { if (!is_derived(int(c))) return max_abs(component(c), where); int nfields; component cs[12]; field_rfunction fun = derived_component_func(c, gv, nfields, cs); return max_abs(nfields, cs, fun, &nfields, where); } } // namespace meep meep-openmpi-1.1.1/src/meep.hpp0000644000175200017520000013741411243154740015600 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef MEEP_H #define MEEP_H #include #include #include "meep/vec.hpp" #include "meep/mympi.hpp" namespace meep { /* We use the type realnum for large arrays, e.g. the fields. For local variables and small arrays, we use double precision, but for things like the fields we can often get away with single precision (since the errors are not dominated by roundoff). However, we will default to using double-precision for large arrays, as the factor of two in memory and the moderate increase in speed currently don't seem worth the loss of precision. */ #define MEEP_SINGLE 0 // 1 for single precision, 0 for double #if MEEP_SINGLE typedef float realnum; #else typedef double realnum; #endif extern bool quiet; // if true, suppress all non-error messages from Meep const double pi = 3.141592653589793238462643383276; const double infinity = HUGE_VAL; #ifdef NAN const double nan = NAN; #else const double nan = -7.0415659787563146e103; // ideally, a value never encountered in practice #endif class polarizability_identifier { public: field_type ft; double gamma, omeganot; bool operator==(const polarizability_identifier &); }; class polarizability; class polarization; class grace; // h5file.cpp: HDF5 file I/O. Most users, if they use this // class at all, will only use the constructor to open the file, and // will otherwise use the fields::output_hdf5 functions. class h5file { public: typedef enum { READONLY, READWRITE, WRITE } access_mode; h5file(const char *filename_, access_mode m=READWRITE, bool parallel_=true); ~h5file(); // closes the files (and any open dataset) bool ok(); realnum *read(const char *dataname, int *rank, int *dims, int maxrank); void write(const char *dataname, int rank, const int *dims, realnum *data, bool single_precision = true); char *read(const char *dataname); void write(const char *dataname, const char *data); void create_data(const char *dataname, int rank, const int *dims, bool append_data = false, bool single_precision = true); void extend_data(const char *dataname, int rank, const int *dims); void create_or_extend_data(const char *dataname, int rank, const int *dims, bool append_data, bool single_precision); void write_chunk(int rank, const int *chunk_start, const int *chunk_dims, realnum *data); void done_writing_chunks(); void read_size(const char *dataname, int *rank, int *dims, int maxrank); void read_chunk(int rank, const int *chunk_start, const int *chunk_dims, realnum *data); void remove(); void remove_data(const char *dataname); const char *file_name() const { return filename; } void prevent_deadlock(); // hackery for exclusive mode private: access_mode mode; char *filename; bool parallel; bool is_cur(const char *dataname); void unset_cur(); void set_cur(const char *dataname, void *data_id); char *cur_dataname; bool cur_append_data; /* linked list to keep track of which datasets we are extending... this is necessary so that create_or_extend_data can know whether to create (overwrite) a dataset or extend it. */ struct extending_s { int dindex; char *dataname; struct extending_s *next; } *extending; extending_s *get_extending(const char *dataname) const; /* store hid_t values as hid_t* cast to void*, so that files including meep.h don't need hdf5.h */ void *id; /* file */ void *cur_id; /* dataset, if any */ void *get_id(); // get current (file) id, opening/creating file if needed void close_id(); }; typedef double (*pml_profile_func)(double u, void *func_data); #define DEFAULT_SUBPIXEL_TOL 1e-4 #define DEFAULT_SUBPIXEL_MAXEVAL 100000 /* This class is used to compute position-dependent material properties like the dielectric function, permeability (mu), polarizability sigma, nonlinearities, et cetera. Simple cases of stateless functions are handled by canned subclasses below, but more complicated cases can be handled by creating a user-defined subclass of material_function. It is useful to group different properties into one class because it is likely that complicated implementations will share state between properties. */ class material_function { material_function(const material_function &ef) {(void)ef;} // prevent copying public: material_function() : omega(nan), gamma(nan) {} virtual ~material_function() {} /* Specify a restricted grid_volume: all subsequent eps/sigma/etc calls will be for points inside v, until the next set_volume. */ virtual void set_volume(const volume &v) {(void)v;} virtual void unset_volume(void) {} // unrestrict the grid_volume virtual double chi1p1(field_type ft, const vec &r) { (void)ft; (void)r; return 1.0; } /* scalar dielectric function */ virtual double eps(const vec &r) { return chi1p1(E_stuff, r); } /* scalar permeability function */ virtual bool has_mu() { return false; } /* true if mu != 1 */ virtual double mu(const vec &r) { return chi1p1(H_stuff, r); } /* scalar conductivity function */ virtual bool has_conductivity(component c) { (void)c; return false; } virtual double conductivity(component c, const vec &r) { (void) c; (void)r; return 0.0; } // fallback routine based on spherical quadrature vec normal_vector(field_type ft, const volume &v); /* Return c'th row of effective 1/(1+chi1) tensor in the given grid_volume v ... virtual so that e.g. libctl can override with more-efficient libctlgeom-based routines. maxeval == 0 if no averaging desired. */ virtual void eff_chi1inv_row(component c, double chi1inv_row[3], const volume &v, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); /* polarizability sigma function: return c'th row of tensor */ virtual void sigma_row(component c, double sigrow[3], const vec &r) { (void) c; (void) r; sigrow[0] = sigrow[1] = sigrow[2] = 0.0; } /* specify polarizability used for subsequent calls to sigma(r) */ virtual void set_polarizability(field_type ft, double omega_, double gamma_){ pol_ft=ft; omega=omega_; gamma=gamma_; } // Nonlinear susceptibilities virtual bool has_chi3(component c) { (void)c; return false; } virtual double chi3(component c, const vec &r) { (void)c; (void)r; return 0.0; } virtual bool has_chi2(component c) { (void)c; return false; } virtual double chi2(component c, const vec &r) { (void)c; (void)r; return 0.0; } // TODO: dielectric tensor, ... protected: // current polarizability for calls to sigma(r): field_type pol_ft; double omega, gamma; }; class simple_material_function : public material_function { double (*f)(const vec &); public: simple_material_function(double (*func)(const vec &)) { f = func; } virtual ~simple_material_function() {} virtual double chi1p1(field_type ft, const vec &r) { (void)ft; return f(r); } virtual double eps(const vec &r) { return f(r); } virtual double mu(const vec &r) { return f(r); } virtual double conductivity(component c, const vec &r) { (void)c; return f(r); } virtual void sigma_row(component c, double sigrow[3], const vec &r) { sigrow[0] = sigrow[1] = sigrow[2] = 0.0; sigrow[component_index(c)] = f(r); } virtual double chi3(component c, const vec &r) { (void)c; return f(r); } virtual double chi2(component c, const vec &r) { (void)c; return f(r); } }; class structure; class structure_chunk { public: double a, Courant, dt; // res. a, Courant num., and timestep dt=Courant/a realnum *chi3[NUM_FIELD_COMPONENTS], *chi2[NUM_FIELD_COMPONENTS]; realnum *chi1inv[NUM_FIELD_COMPONENTS][5]; bool trivial_chi1inv[NUM_FIELD_COMPONENTS][5]; realnum *conductivity[NUM_FIELD_COMPONENTS][5]; realnum *condinv[NUM_FIELD_COMPONENTS][5]; // cache of 1/(1+conduct*dt/2) bool condinv_stale; // true if condinv needs to be recomputed double *sig[5], *siginv[5]; // conductivity array for uPML int sigsize[5]; // conductivity array size grid_volume gv; // integer grid_volume that could be bigger than non-overlapping v below volume v; polarizability *pb; int refcount; // reference count of objects using this structure_chunk ~structure_chunk(); structure_chunk(const grid_volume &gv, const volume &vol_limit, double Courant, int proc_num); structure_chunk(const structure_chunk *); void set_chi1inv(component c, material_function &eps, bool use_anisotropic_averaging, double tol, int maxeval); bool has_chi1inv(component c, direction d) const; void set_conductivity(component c, material_function &eps); void update_condinv(); void set_chi3(component c, material_function &eps); void set_chi2(component c, material_function &eps); void use_pml(direction, double dx, double boundary_loc, double Rasymptotic, pml_profile_func pml_profile, void *pml_profile_data, double pml_profile_integral); void add_polarizability(material_function &sigma, field_type ft, double omega, double gamma); void mix_with(const structure_chunk *, double); int n_proc() const { return the_proc; } // Says which proc owns me! int is_mine() const { return the_is_mine; } void remove_polarizabilities(); // monitor.cpp double get_chi1inv(component, direction, const ivec &iloc) const; double get_inveps(component c, direction d, const ivec &iloc) const { return get_chi1inv(c, d, iloc); } double max_eps() const; private: double pml_fmin; int the_proc; int the_is_mine; }; double pml_quadratic_profile(double, void*); // linked list of descriptors for boundary regions (currently just for PML) class boundary_region { public: typedef enum { NOTHING_SPECIAL, PML } boundary_region_kind; boundary_region() : kind(NOTHING_SPECIAL), thickness(0.0), Rasymptotic(1e-16), pml_profile(NULL), pml_profile_data(NULL), pml_profile_integral(1.0), d(NO_DIRECTION), side(Low), next(0) {} boundary_region(boundary_region_kind kind, double thickness, double Rasymptotic, pml_profile_func pml_profile, void* pml_profile_data, double pml_profile_integral, direction d, boundary_side side, boundary_region *next = 0) : kind(kind), thickness(thickness), Rasymptotic(Rasymptotic), pml_profile(pml_profile), pml_profile_data(pml_profile_data), pml_profile_integral(pml_profile_integral), d(d), side(side), next(next) {} boundary_region(const boundary_region &r) : kind(r.kind), thickness(r.thickness), Rasymptotic(r.Rasymptotic), pml_profile(r.pml_profile), pml_profile_data(r.pml_profile_data), pml_profile_integral(r.pml_profile_integral), d(r.d), side(r.side) { next = r.next ? new boundary_region(*r.next) : 0; } ~boundary_region() { if (next) delete next; } void operator=(const boundary_region &r) { kind = r.kind; thickness = r.thickness; Rasymptotic = r.Rasymptotic; pml_profile = r.pml_profile; pml_profile_data = r.pml_profile_data; pml_profile_integral = r.pml_profile_integral; d = r.d; side = r.side; if (next) delete next; next = r.next ? new boundary_region(*r.next) : 0; } boundary_region operator+(const boundary_region &r0) const { boundary_region r(*this), *cur = &r; while (cur->next) cur = cur->next; cur->next = new boundary_region(r0); return r; } boundary_region operator*(double strength_mult) const { boundary_region r(*this), *cur = &r; while (cur) { cur->Rasymptotic = pow(cur->Rasymptotic, strength_mult); cur = cur->next; } return r; } void apply(structure *s) const; void apply(const structure *s, structure_chunk *sc) const; bool check_ok(const grid_volume &gv) const; private: boundary_region_kind kind; double thickness, Rasymptotic; pml_profile_func pml_profile; void *pml_profile_data; double pml_profile_integral; direction d; boundary_side side; boundary_region *next; }; boundary_region pml(double thickness, direction d, boundary_side side); boundary_region pml(double thickness, direction d); boundary_region pml(double thickness); #define no_pml() boundary_region() class structure { public: structure_chunk **chunks; int num_chunks; grid_volume gv, user_volume; double a, Courant, dt; // res. a, Courant num., and timestep dt=Courant/a volume v; symmetry S; const char *outdir; grid_volume *effort_volumes; double *effort; int num_effort_volumes; ~structure(); structure(); structure(const grid_volume &gv, material_function &eps, const boundary_region &br = boundary_region(), const symmetry &s = meep::identity(), int num_chunks = 0, double Courant = 0.5, bool use_anisotropic_averaging=false, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); structure(const grid_volume &gv, double eps(const vec &), const boundary_region &br = boundary_region(), const symmetry &s = meep::identity(), int num_chunks = 0, double Courant = 0.5, bool use_anisotropic_averaging=false, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); structure(const structure *); structure(const structure &); void set_materials(material_function &mat, bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_chi1inv(component c, material_function &eps, bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); bool has_chi1inv(component c, direction d) const; void set_epsilon(material_function &eps, bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_epsilon(double eps(const vec &), bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_mu(material_function &eps, bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_mu(double mu(const vec &), bool use_anisotropic_averaging=true, double tol=DEFAULT_SUBPIXEL_TOL, int maxeval=DEFAULT_SUBPIXEL_MAXEVAL); void set_conductivity(component c, material_function &conductivity); void set_conductivity(component C, double conductivity(const vec &)); void set_chi3(component c, material_function &eps); void set_chi3(material_function &eps); void set_chi3(double eps(const vec &)); void set_chi2(component c, material_function &eps); void set_chi2(material_function &eps); void set_chi2(double eps(const vec &)); polarizability_identifier add_polarizability(double sigma(const vec &), field_type ft, double omega, double gamma); polarizability_identifier add_polarizability(material_function &sigma, field_type ft, double omega, double gamma); polarizability_identifier add_polarizability(double sigma(const vec &), double omega, double gamma) { return add_polarizability(sigma, E_stuff, omega, gamma); } polarizability_identifier add_polarizability(material_function &sigma, double omega, double gamma) { return add_polarizability(sigma, E_stuff, omega, gamma); } void remove_polarizabilities(); void set_output_directory(const char *name); void mix_with(const structure *, double); bool equal_layout(const structure &) const; void print_layout(void) const; // monitor.cpp double get_chi1inv(component, direction, const ivec &origloc) const; double get_chi1inv(component, direction, const vec &loc) const; double get_inveps(component c, direction d, const ivec &origloc) const { return get_chi1inv(c, d, origloc); } double get_inveps(component c, direction d, const vec &loc) const { return get_chi1inv(c, d, loc); } double get_eps(const vec &loc) const; double get_mu(const vec &loc) const; double max_eps() const; friend class boundary_region; private: void use_pml(direction d, boundary_side b, double dx); void add_to_effort_volumes(const grid_volume &new_effort_volume, double extra_effort); void choose_chunkdivision(const grid_volume &gv, int num_chunks, const boundary_region &br, const symmetry &s); void check_chunks(); void changing_chunks(); }; class src_vol; class bandsdata; class fields; class fields_chunk; class flux_vol; // Time-dependence of a current source, intended to be overridden by // subclasses. current() and dipole() are be related by // current = d(dipole)/dt (or rather, the finite-difference equivalent). class src_time { public: // the following variable specifies whether the current // source is specified as a current or as an integrated // current (a dipole moment), if possible. In the original Meep, // by default electric sources are integrated and magnetic // sources are not, but this may change. bool is_integrated; src_time() { is_integrated = true; current_time = nan; current_current = 0.0; next = NULL; } virtual ~src_time() { delete next; } src_time(const src_time &t) { is_integrated = t.is_integrated; current_time = t.current_time; current_current = t.current_current; current_dipole = t.current_dipole; if (t.next) next = t.next->clone(); else next = NULL; } complex dipole() const { return current_dipole; } complex current() const { return current_current; } void update(double time, double dt) { if (time != current_time) { current_dipole = dipole(time); current_current = current(time, dt); current_time = time; } } // subclasses *can* override this method in order to specify the // current directly rather than as the derivative of dipole. // in that case you would probably ignore the dt argument. virtual complex current(double time, double dt) const { return ((dipole(time + dt) - dipole(time)) / dt); } double last_time_max() { return last_time_max(0.0); } double last_time_max(double after); src_time *add_to(src_time *others, src_time **added) const; src_time *next; // subclasses should override these methods: virtual complex dipole(double time) const { (void)time; return 0; } virtual double last_time() const { return 0.0; } virtual src_time *clone() const { return new src_time(*this); } virtual bool is_equal(const src_time &t) const { (void)t; return 1; } virtual complex frequency() const { return 0.0; } virtual void set_frequency(complex f) { (void) f; } private: double current_time; complex current_dipole, current_current; }; bool src_times_equal(const src_time &t1, const src_time &t2); // Gaussian-envelope source with given frequency, width, peak-time, cutoff class gaussian_src_time : public src_time { public: gaussian_src_time(double f, double fwidth, double s = 5.0); gaussian_src_time(double f, double w, double start_time, double end_time); virtual ~gaussian_src_time() {} virtual complex dipole(double time) const; virtual double last_time() const { return float(peak_time + cutoff); }; virtual src_time *clone() const { return new gaussian_src_time(*this); } virtual bool is_equal(const src_time &t) const; virtual complex frequency() const { return freq; } virtual void set_frequency(complex f) { freq = real(f); } private: double freq, width, peak_time, cutoff; }; // Continuous (CW) source with (optional) slow turn-on and/or turn-off. class continuous_src_time : public src_time { public: continuous_src_time(complex f, double w = 0.0, double st = 0.0, double et = infinity, double s = 3.0) : freq(f), width(w), start_time(float(st)), end_time(float(et)), slowness(s) {} virtual ~continuous_src_time() {} virtual complex dipole(double time) const; virtual double last_time() const { return end_time; }; virtual src_time *clone() const { return new continuous_src_time(*this); } virtual bool is_equal(const src_time &t) const; virtual complex frequency() const { return freq; } virtual void set_frequency(complex f) { freq = f; } private: complex freq; double width, start_time, end_time, slowness; }; // user-specified source function with start and end times class custom_src_time : public src_time { public: custom_src_time(complex (*func)(double t, void *), void *data, double st = -infinity, double et = infinity) : func(func), data(data), start_time(float(st)), end_time(float(et)) {} virtual ~custom_src_time() {} virtual complex current(double time, double dt) const { if (is_integrated) return src_time::current(time,dt); else return dipole(time); } virtual complex dipole(double time) const { float rtime = float(time); if (rtime >= start_time && rtime <= end_time) return func(time,data); else return 0.0; } virtual double last_time() const { return end_time; }; virtual src_time *clone() const { return new custom_src_time(*this); } virtual bool is_equal(const src_time &t) const; private: complex (*func)(double t, void *); void *data; double start_time, end_time; }; class monitor_point { public: monitor_point(); ~monitor_point(); vec loc; double t; complex f[NUM_FIELD_COMPONENTS]; monitor_point *next; complex get_component(component); double poynting_in_direction(direction d); double poynting_in_direction(vec direction_v); // When called with only its first four arguments, fourier_transform // performs an FFT on its monitor points, putting the frequencies in f // and the amplitudes in a. Yes, the frequencies are trivial and // redundant, but this saves you the risk of making a mistake in // converting your units. Note also, that in this case f is always a // real number, although it's stored in a complex. // // Note that in either case, fourier_transform assumes that the monitor // points are all equally spaced in time. void fourier_transform(component w, complex **a, complex **f, int *numout, double fmin=0.0, double fmax=0.0, int maxbands=100); // harminv works much like fourier_transform, except that it is not yet // implemented. void harminv(component w, complex **a, complex **f, int *numout, double fmin, double fmax, int maxbands); }; // dft.cpp // this should normally only be created with fields::add_dft class dft_chunk { public: dft_chunk(fields_chunk *fc_, ivec is_, ivec ie_, vec s0_, vec s1_, vec e0_, vec e1_, double dV0_, double dV1_, complex scale_, complex extra_weight_, component c_, bool use_centered_grid, const void *data_); ~dft_chunk(); void update_dft(double time); void scale_dft(complex scale); void operator-=(const dft_chunk &chunk); // the frequencies to loop_in_chunks double omega_min, domega; int Nomega; component c; // component to DFT (possibly transformed by symmetry) int N; // number of spatial points (on epsilon grid) complex *dft; // N x Nomega array of DFT values. struct dft_chunk *next_in_chunk; // per-fields_chunk list of DFT chunks struct dft_chunk *next_in_dft; // next for this particular DFT vol./component /* When computing things like -0.5*|E|^2 for the stress tensor, we cannot incorporate the minus sign into the scale factor because we only ever compute |scale|^2. Thus, it is necessary to store an additional weight factor with the dft_chunk to record any additional negative or complex weight factor to be used in computations involving the fourier-transformed fields. Because it is used in computations involving dft[...], it needs to be public. */ complex extra_weight; private: // parameters passed from field_integrate: fields_chunk *fc; ivec is, ie; vec s0, s1, e0, e1; double dV0, dV1; bool sqrt_dV_and_interp_weights; complex scale; // scale factor * phase from shift and symmetry // cache of exp(iwt) * scale, of length Nomega complex *dft_phase; int avg1, avg2; // index offsets for average to get epsilon grid }; void save_dft_hdf5(dft_chunk *dft_chunks, component c, h5file *file, const char *dprefix = 0); void load_dft_hdf5(dft_chunk *dft_chunks, component c, h5file *file, const char *dprefix = 0); void save_dft_hdf5(dft_chunk *dft_chunks, const char *name, h5file *file, const char *dprefix = 0); void load_dft_hdf5(dft_chunk *dft_chunks, const char *name, h5file *file, const char *dprefix = 0); // dft.cpp (normally created with fields::add_dft_flux) class dft_flux { public: dft_flux(const component cE_, const component cH_, dft_chunk *E_, dft_chunk *H_, double fmin, double fmax, int Nf); dft_flux(const dft_flux &f); double *flux(); void save_hdf5(h5file *file, const char *dprefix = 0); void load_hdf5(h5file *file, const char *dprefix = 0); void operator-=(const dft_flux &fl) { if (E && fl.E) *E -= *fl.E; if (H && fl.H) *H -= *fl.H; } void save_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void load_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void scale_dfts(complex scale); void remove(); double freq_min, dfreq; int Nfreq; dft_chunk *E, *H; component cE, cH; }; // stress.cpp (normally created with fields::add_dft_force) class dft_force { public: dft_force(dft_chunk *offdiag1_, dft_chunk *offdiag2_, dft_chunk *diag_, double fmin, double fmax, int Nf); dft_force(const dft_force &f); double *force(); void save_hdf5(h5file *file, const char *dprefix = 0); void load_hdf5(h5file *file, const char *dprefix = 0); void operator-=(const dft_force &fl); void save_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void load_hdf5(fields &f, const char *fname, const char *dprefix = 0, const char *prefix = 0); void scale_dfts(complex scale); void remove(); double freq_min, dfreq; int Nfreq; dft_chunk *offdiag1, *offdiag2, *diag; }; enum in_or_out { Incoming=0, Outgoing }; enum connect_phase { CONNECT_PHASE = 0, CONNECT_NEGATE=1, CONNECT_COPY=2 }; class fields_chunk { public: realnum *f[NUM_FIELD_COMPONENTS][2]; // fields at current time // auxiliary fields needed for PML (at least in some components) realnum *f_u[NUM_FIELD_COMPONENTS][2]; // integrated from D/B realnum *f_w[NUM_FIELD_COMPONENTS][2]; // E/H integrated from these realnum *f_cond[NUM_FIELD_COMPONENTS][2]; // aux field for PML+conductivity /* sometimes, to synchronize the E and H fields, e.g. for computing flux at a given time, we need to timestep H by 1/2; in this case we save backup copies of (some of) the fields to resume timestepping */ realnum *f_backup[NUM_FIELD_COMPONENTS][2]; realnum *f_u_backup[NUM_FIELD_COMPONENTS][2]; realnum *f_w_backup[NUM_FIELD_COMPONENTS][2]; realnum *f_cond_backup[NUM_FIELD_COMPONENTS][2]; // used to store D-P and B-P, e.g. when P implements dispersive media realnum *f_minus_p[NUM_FIELD_COMPONENTS][2]; realnum *f_rderiv_int; // cache of helper field for 1/r d(rf)/dr derivative dft_chunk *dft_chunks; realnum **zeroes[NUM_FIELD_TYPES]; // Holds pointers to metal points. int num_zeroes[NUM_FIELD_TYPES]; realnum **connections[NUM_FIELD_TYPES][CONNECT_COPY+1][Outgoing+1]; int num_connections[NUM_FIELD_TYPES][CONNECT_COPY+1][Outgoing+1]; complex *connection_phases[NUM_FIELD_TYPES]; polarization *pols[NUM_FIELD_TYPES], *olpols[NUM_FIELD_TYPES]; double a, Courant, dt; // res. a, Courant num., and timestep dt=Courant/a grid_volume gv; volume v; double m; // angular dependence in cyl. coords bool zero_fields_near_cylorigin; // fields=0 m pixels near r=0 for stability double beta; int is_real, store_pol_energy; bandsdata *bands; src_vol *sources[NUM_FIELD_TYPES]; structure_chunk *new_s; structure_chunk *s; const char *outdir; fields_chunk(structure_chunk *, const char *outdir, double m, bool store_pol_energy, double beta, bool zero_fields_near_cylorigin); fields_chunk(const fields_chunk &); ~fields_chunk(); // step.cpp double peek_field(component, const vec &); void use_real_fields(); bool have_component(component c, bool is_complex = false) { switch (c) { case Dielectric: case Permeability: return !is_complex; default: return (f[c][0] && f[c][is_complex]); } } double last_source_time(); // monitor.cpp complex get_field(component, const ivec &) const; // for non-collective interpolation: volume get_field_gv(component) const; complex get_field(component, const vec &) const; double get_polarization_energy(const ivec &) const; double my_polarization_energy(const ivec &) const; double get_polarization_energy(const polarizability_identifier &, const ivec &) const; double my_polarization_energy(const polarizability_identifier &, const ivec &) const; double get_chi1inv(component, direction, const ivec &iloc) const; complex analytic_chi1(component c, double freq, const vec &) const; void backup_component(component c); void average_with_backup(component c); void restore_component(component c); void set_output_directory(const char *name); void verbose(int gv=1) { verbosity = gv; } double count_volume(component); friend class fields; int n_proc() const { return s->n_proc(); }; int is_mine() const { return s->is_mine(); }; // boundaries.cpp void zero_metal(field_type); // fields.cpp void remove_sources(); void remove_polarizabilities(); void zero_fields(); bool update_eh(field_type ft, bool skip_w_components = false); bool alloc_f(component c); void figure_out_step_plan(); void set_solve_cw_omega(complex omega) { doing_solve_cw = true; solve_cw_omega = omega; } void unset_solve_cw_omega() { doing_solve_cw = false; solve_cw_omega = 0.0; } private: // we set a flag during cw_solve to replace some // time-dependent stuff with the analogous frequency-domain operation bool doing_solve_cw; // true when inside solve_cw complex solve_cw_omega; // current omega for solve_cw int verbosity; // Turn on verbosity for debugging purposes... // fields.cpp bool have_plus_deriv[NUM_FIELD_COMPONENTS], have_minus_deriv[NUM_FIELD_COMPONENTS]; component plus_component[NUM_FIELD_COMPONENTS], minus_component[NUM_FIELD_COMPONENTS]; direction plus_deriv_direction[NUM_FIELD_COMPONENTS], minus_deriv_direction[NUM_FIELD_COMPONENTS]; // bands.cpp void record_bands(int tcount); // step.cpp void phase_in_material(structure_chunk *s); void phase_material(int phasein_time); bool step_db(field_type ft); void step_source(field_type ft, bool including_integrated); void update_pols(field_type ft); void calc_sources(double time); // initialize.cpp void initialize_field(component, complex f(const vec &)); void initialize_with_nth_te(int n, double kz); void initialize_with_nth_tm(int n, double kz); // boundaries.cpp void alloc_extra_connections(field_type, connect_phase, in_or_out, int); // dft.cpp void update_dfts(double timeE, double timeH); void changing_structure(); }; enum boundary_condition { Periodic=0, Metallic, Magnetic, None }; enum time_sink { Connecting, Stepping, Boundaries, MpiTime, FieldOutput, FourierTransforming, Other }; typedef void (*field_chunkloop)(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *chunkloop_data); typedef complex (*field_function)(const complex *fields, const vec &loc, void *integrand_data_); typedef double (*field_rfunction)(const complex *fields, const vec &loc, void *integrand_data_); field_rfunction derived_component_func(derived_component c, const grid_volume &gv, int &nfields, component cs[12]); class fields { public: int num_chunks; fields_chunk **chunks; src_time *sources; flux_vol *fluxes; symmetry S; // The following is an array that is num_chunks by num_chunks. Actually // it is two arrays, one for the imaginary and one for the real part. realnum **comm_blocks[NUM_FIELD_TYPES]; // This is the same size as each comm_blocks array, and store the sizes // of the comm blocks themselves for each connection-phase type int *comm_sizes[NUM_FIELD_TYPES][CONNECT_COPY+1]; int comm_size_tot(int f, int pair) const { int sum = 0; for (int ip=0; ip<3; ++ip) sum+=comm_sizes[f][ip][pair]; return sum; } double a, dt; // The resolution a and timestep dt=Courant/a grid_volume gv, user_volume; volume v; double m; double beta; int t, phasein_time, is_real; complex k[5], eikna[5]; double coskna[5], sinkna[5]; boundary_condition boundaries[2][5]; bandsdata *bands; char *outdir; // fields.cpp methods: fields(structure *, double m=0, bool store_pol_energy=0, double beta=0, bool zero_fields_near_cylorigin=true); fields(const fields &); ~fields(); bool equal_layout(const fields &f) const; void use_real_fields(); void zero_fields(); void remove_sources(); void remove_polarizabilities(); void remove_fluxes(); void reset(); // time.cpp double time_spent_on(time_sink); void print_times(); // boundaries.cpp void set_boundary(boundary_side,direction,boundary_condition); void use_bloch(direction d, double k) { use_bloch(d, (complex) k); } void use_bloch(direction, complex kz); void use_bloch(const vec &k); vec lattice_vector(direction) const; // update_eh.cpp void update_eh(field_type ft, bool skip_w_components = false); volume total_volume(void) const; // h5fields.cpp: // low-level function: void output_hdf5(h5file *file, const char *dataname, int num_fields, const component *components, field_function fun, void *fun_data_, int reim, const volume &where, bool append_data = false, bool single_precision = false); // higher-level functions void output_hdf5(const char *dataname, // OUTPUT COMPLEX-VALUED FUNCTION int num_fields, const component *components, field_function fun, void *fun_data_, const volume &where, h5file *file = 0, bool append_data = false, bool single_precision = false, const char *prefix = 0, bool real_part_only = false); void output_hdf5(const char *dataname, // OUTPUT REAL-VALUED FUNCTION int num_fields, const component *components, field_rfunction fun, void *fun_data_, const volume &where, h5file *file = 0, bool append_data = false, bool single_precision = false, const char *prefix = 0); void output_hdf5(component c, // OUTPUT FIELD COMPONENT (or Dielectric) const volume &where, h5file *file = 0, bool append_data = false, bool single_precision = false, const char *prefix = 0); void output_hdf5(derived_component c, // OUTPUT DERIVED FIELD COMPONENT const volume &where, h5file *file = 0, bool append_data = false, bool single_precision = false, const char *prefix = 0); h5file *open_h5file(const char *name, h5file::access_mode mode = h5file::WRITE, const char *prefix = NULL, bool timestamp = false); const char *h5file_name(const char *name, const char *prefix = NULL, bool timestamp = false); // step.cpp methods: double last_step_output_wall_time; int last_step_output_t; void step(); // when comparing times, e.g. for source cutoffs, it // is useful to round to float to avoid gratuitous sensitivity // to floating-point roundoff error inline double round_time() const { return float(t*dt); }; inline double time() const { return t*dt; }; // cw_fields.cpp: bool solve_cw(double tol, int maxiters, complex frequency, int L=2); bool solve_cw(double tol = 1e-8, int maxiters = 10000, int L=2); // sources.cpp: double last_source_time(); void add_point_source(component c, double freq, double width, double peaktime, double cutoff, const vec &, complex amp = 1.0, int is_continuous = 0); void add_point_source(component c, const src_time &src, const vec &, complex amp = 1.0); void add_volume_source(component c, const src_time &src, const volume &, complex A(const vec &), complex amp = 1.0); void add_volume_source(component c, const src_time &src, const volume &, complex amp = 1.0); void require_component(component c); // mpb.cpp void add_eigenmode_source(component c, const src_time &src, const volume &where, const volume &eig_vol, int band_num, const vec &kpoint, int parity, double eig_resolution, double eigensolver_tol, complex amp, complex A(const vec &) = 0); // initialize.cpp: void initialize_field(component, complex f(const vec &)); void initialize_with_nth_te(int n); void initialize_with_nth_tm(int n); void initialize_with_n_te(int n); void initialize_with_n_tm(int n); int phase_in_material(const structure *s, double time); int is_phasing(); // loop_in_chunks.cpp void loop_in_chunks(field_chunkloop chunkloop, void *chunkloop_data, const volume &where, component cgrid = Centered, bool use_symmetry = true, bool snap_unit_dims = false); // integrate.cpp complex integrate(int num_fields, const component *components, field_function fun, void *fun_data_, const volume &where, double *maxabs = 0); double integrate(int num_fields, const component *components, field_rfunction fun, void *fun_data_, const volume &where, double *maxabs = 0); complex integrate2(const fields &fields2, int num_fields1, const component *components1, int num_fields2, const component *components2, field_function integrand, void *integrand_data_, const volume &where, double *maxabs = 0); double integrate2(const fields &fields2, int num_fields1, const component *components1, int num_fields2, const component *components2, field_rfunction integrand, void *integrand_data_, const volume &where, double *maxabs = 0); double max_abs(int num_fields, const component *components, field_function fun, void *fun_data_, const volume &where); double max_abs(int num_fields, const component *components, field_rfunction fun, void *fun_data_, const volume &where); double max_abs(int c, const volume &where); double max_abs(component c, const volume &where); double max_abs(derived_component c, const volume &where); // dft.cpp dft_chunk *add_dft(component c, const volume &where, double freq_min, double freq_max, int Nfreq, bool include_dV_and_interp_weights = true, complex weight = 1.0, dft_chunk *chunk_next = 0, bool sqrt_dV_and_interp_weights = false, complex extra_weight = 1.0, bool use_centered_grid = true); dft_chunk *add_dft_pt(component c, const vec &where, double freq_min, double freq_max, int Nfreq); dft_chunk *add_dft(const volume_list *where, double freq_min, double freq_max, int Nfreq, bool include_dV = true); void update_dfts(); dft_flux add_dft_flux(direction d, const volume &where, double freq_min, double freq_max, int Nfreq); dft_flux add_dft_flux_box(const volume &where, double freq_min, double freq_max, int Nfreq); dft_flux add_dft_flux_plane(const volume &where, double freq_min, double freq_max, int Nfreq); dft_flux add_dft_flux(const volume_list *where, double freq_min, double freq_max, int Nfreq); // stress.cpp dft_force add_dft_force(const volume_list *where, double freq_min, double freq_max, int Nfreq); // monitor.cpp double get_chi1inv(component, direction, const vec &loc) const; double get_inveps(component c, direction d, const vec &loc) const { return get_chi1inv(c, d, loc); } double get_eps(const vec &loc) const; double get_mu(const vec &loc) const; void get_point(monitor_point *p, const vec &) const; monitor_point *get_new_point(const vec &, monitor_point *p=NULL) const; complex analytic_chi1(component,double freq, const vec &) const; void prepare_for_bands(const vec &, double end_time, double fmax=0, double qmin=1e300, double frac_pow_min=0.0); void record_bands(); complex get_band(int n, int maxbands=100); void grace_bands(grace *, int maxbands=100); void output_bands(FILE *, const char *, int maxbands=100); complex get_field(int c, const vec &loc) const; complex get_field(component c, const vec &loc) const; double get_field(derived_component c, const vec &loc) const; // energy_and_flux.cpp void synchronize_magnetic_fields(); void restore_magnetic_fields(); double energy_in_box(const volume &); double electric_energy_in_box(const volume &); double magnetic_energy_in_box(const volume &); double thermo_energy_in_box(const volume &); double total_energy(); double field_energy_in_box(const volume &); double field_energy_in_box(component c, const volume &); double field_energy(); double flux_in_box_wrongH(direction d, const volume &); double flux_in_box(direction d, const volume &); flux_vol *add_flux_vol(direction d, const volume &where); flux_vol *add_flux_plane(const volume &where); flux_vol *add_flux_plane(const vec &p1, const vec &p2); double electric_energy_max_in_box(const volume &where); double modal_volume_in_box(const volume &where); double electric_sqr_weighted_integral(double (*deps)(const vec &), const volume &where); double electric_energy_weighted_integral(double (*f)(const vec &), const volume &where); void set_output_directory(const char *name); void verbose(int gv=1); double count_volume(component); // fields.cpp bool have_component(component); // material.cpp double max_eps() const; // step.cpp void step_boundaries(field_type); bool nosize_direction(direction d) const; direction normal_direction(const volume &where) const; // casimir.cpp complex casimir_stress_dct_integral(direction dforce, direction dsource, double mx, double my, double mz, field_type ft, volume where, bool is_bloch = false); void set_solve_cw_omega(complex omega); void unset_solve_cw_omega(); private: int verbosity; // Turn on verbosity for debugging purposes... int synchronized_magnetic_fields; // count number of nested synchs double last_wall_time; time_sink working_on, was_working_on; double times_spent[Other+1]; // fields.cpp void figure_out_step_plan(); // time.cpp void am_now_working_on(time_sink); void finished_working(); // boundaries.cpp bool chunk_connections_valid; void find_metals(); void disconnect_chunks(); void connect_chunks(); void connect_the_chunks(); // Intended to be ultra-private... bool on_metal_boundary(const ivec &); ivec ilattice_vector(direction) const; bool locate_component_point(component *, ivec *, complex *) const; bool locate_point_in_user_volume(ivec *, complex *phase) const; void locate_volume_source_in_user_volume(const vec p1, const vec p2, vec newp1[8], vec newp2[8], complex kphase[8], int &ncopies) const; // mympi.cpp void boundary_communications(field_type); // step.cpp void phase_material(); void step_db(field_type ft); void step_source(field_type ft, bool including_integrated = false); void update_pols(field_type ft); void calc_sources(double tim); int cluster_some_bands_cleverly(double *tf, double *td, complex *ta, int num_freqs, int fields_considered, int maxbands, complex *fad, double *approx_power); void out_bands(FILE *, const char *, int maxbands); complex *clever_cluster_bands(int maxbands, double *approx_power = NULL); // monitor.cpp complex get_field(component c, const ivec &iloc) const; double get_polarization_energy(const ivec &) const; double get_polarization_energy(const vec &) const; double get_polarization_energy(const polarizability_identifier &, const ivec &) const; double get_polarization_energy(const polarizability_identifier &, const vec &) const; double get_chi1inv(component, direction, const ivec &iloc) const; }; class flux_vol { public: flux_vol(fields *f_, direction d_, const volume &where_) : where(where_) { f = f_; d = d_; cur_flux = cur_flux_half = 0; next = f->fluxes; f->fluxes = this; } ~flux_vol() { delete next; } void update_half() { cur_flux_half = flux_wrongE(); if (next) next->update_half(); } void update() { cur_flux = (flux_wrongE() + cur_flux_half) * 0.5; if (next) next->update(); } double flux() { return cur_flux; } flux_vol *next; private: double flux_wrongE() { return f->flux_in_box_wrongH(d, where); } fields *f; direction d; volume where; double cur_flux, cur_flux_half; }; class grace_point; enum grace_type { XY, ERROR_BARS }; class grace { public: grace(const char *fname, const char *dirname = "."); ~grace(); void new_set(grace_type t = XY); void new_curve(); void set_legend(const char *); void set_range(double xmin, double xmax, double ymin, double ymax); void output_point(double x, double y, double dy = -1.0, double extra = -1.0); void output_out_of_order(int n, double x, double y, double dy = -1.0, double extra= -1.0); private: void flush_pts(); FILE *f; char *fn, *dn; grace_point *pts; int set_num,sn; }; // The following is a utility function to parse the executable name use it // to come up with a directory name, avoiding overwriting any existing // directory, unless the source file hasn't changed. const char *make_output_directory(const char *exename, const char *jobname = NULL); void trash_output_directory(const char *dirname); FILE *create_output_file(const char *dirname, const char *fname); // The following allows you to hit ctrl-C to tell your calculation to stop // and clean up. void deal_with_ctrl_c(int stop_now = 2); // When a ctrl_c is called, the following variable (which starts with a // zero value) is incremented. extern int interrupt; int do_harminv(complex *data, int n, double dt, double fmin, double fmax, int maxbands, complex *amps, double *freq_re, double *freq_im, double *errors = NULL, double spectral_density = 1.1, double Q_thresh = 50, double rel_err_thresh = 1e20, double err_thresh = 0.01, double rel_amp_thresh = -1, double amp_thresh = -1); complex *make_casimir_gfunc(double T, double dt, double sigma, field_type ft, complex (*eps_func)(complex omega) = 0, double Tfft = 0); complex *make_casimir_gfunc_kz(double T, double dt, double sigma, field_type ft); #if MEEP_SINGLE // in mympi.cpp ... must be here in order to use realnum type void broadcast(int from, realnum *data, int size); #endif } /* namespace meep */ #endif /* MEEP_H */ meep-openmpi-1.1.1/src/energy_and_flux.cpp0000644000175200017520000002575611243101206020010 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include "meep.hpp" #include "meep_internals.hpp" namespace meep { /* Energy calculation */ double fields::count_volume(component c) { double vol = 0; for (int i=0;iis_mine()) vol += chunks[i]->count_volume(c); return sum_to_all(vol); } double fields_chunk::count_volume(component c) { double vol = 0; for (int i=0;i dot_integrand(const complex *fields, const vec &loc, void *data_) { (void) loc; (void) data_; // unused; return real(conj(fields[0]) * fields[1]); } double fields::field_energy_in_box(component c, const volume &where) { if (coordinate_mismatch(gv.dim, c)) return 0.0; component cs[2]; if (is_electric(c) || is_D(c)) { cs[0] = direction_component(Ex, component_direction(c)); cs[1] = direction_component(Dx, component_direction(c)); } else if (is_magnetic(c) || is_B(c)) { cs[0] = direction_component(Hx, component_direction(c)); cs[1] = direction_component(Bx, component_direction(c)); } else abort("invalid field component in field_energy_in_box"); return real(integrate(2, cs, dot_integrand, 0, where)) * 0.5; } double fields::electric_energy_in_box(const volume &where) { long double sum = 0.0; FOR_ELECTRIC_COMPONENTS(c) sum += field_energy_in_box(c, where); return sum; } double fields::magnetic_energy_in_box(const volume &where) { long double sum = 0.0; FOR_MAGNETIC_COMPONENTS(c) sum += field_energy_in_box(c, where); return sum; } void fields_chunk::backup_component(component c) { DOCMP { if (c < NUM_FIELD_COMPONENTS && f[c][cmp] && // in mu=1 regions where H==B, don't bother to backup H !(is_magnetic(c) && f[c][cmp] == f[direction_component(Bx, component_direction(c))][cmp])) { #define BACKUP(f) if (f[c][cmp]) { \ if (!f##_backup[c][cmp]) \ f##_backup[c][cmp] = new realnum[gv.ntot()]; \ memcpy(f##_backup[c][cmp], f[c][cmp], gv.ntot()*sizeof(realnum)); } BACKUP(f); BACKUP(f_u); BACKUP(f_w); BACKUP(f_cond); #undef BACKUP } } } void fields_chunk::restore_component(component c) { DOCMP if (f_backup[c][cmp]) { #define RESTORE(f) \ if (f[c][cmp]) \ memcpy(f[c][cmp], f##_backup[c][cmp], gv.ntot()*sizeof(realnum)); RESTORE(f); RESTORE(f_u); RESTORE(f_w); RESTORE(f_cond); #undef RESTORE } } void fields_chunk::average_with_backup(component c) { DOCMP { realnum *fc = f[c][cmp]; realnum *backup = f_backup[c][cmp]; if (fc && backup) for (int i = 0; i < gv.ntot(); i++) fc[i] = 0.5 * (fc[i] + backup[i]); } } void fields::synchronize_magnetic_fields() { if (synchronized_magnetic_fields++) return; // already synched for (int i=0;iis_mine()) { FOR_B_COMPONENTS(c) chunks[i]->backup_component(c); FOR_MAGNETIC_COMPONENTS(c) chunks[i]->backup_component(c); } am_now_working_on(Stepping); calc_sources(time()); // for B sources step_db(B_stuff); step_source(B_stuff); step_boundaries(B_stuff); calc_sources(time() + 0.5*dt); // for integrated H sources update_eh(H_stuff); step_boundaries(H_stuff); finished_working(); for (int i=0;iis_mine()) { FOR_B_COMPONENTS(c) chunks[i]->average_with_backup(c); FOR_MAGNETIC_COMPONENTS(c) chunks[i]->average_with_backup(c); } } void fields::restore_magnetic_fields() { if (!synchronized_magnetic_fields // already restored || --synchronized_magnetic_fields) // not ready to restore yet return; for (int i=0;iis_mine()) { FOR_B_COMPONENTS(c) chunks[i]->restore_component(c); FOR_MAGNETIC_COMPONENTS(c) chunks[i]->restore_component(c); } } static void thermo_chunkloop(fields_chunk *fc, int ichunk, component cgrid, ivec is, ivec ie, vec s0, vec s1, vec e0, vec e1, double dV0, double dV1, ivec shift, complex shift_phase, const symmetry &S, int sn, void *sum_) { long double *sum = (long double *) sum_; (void)shift; (void)shift_phase; (void)S; (void)sn; (void)ichunk; // unused for (polarization *pol = fc->pols[type(cgrid)]; pol; pol = pol->next) if (pol->energy[cgrid]) LOOP_OVER_IVECS(fc->gv, is, ie, idx) *sum += IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV0 + dV1 * loop_i2) * pol->energy[cgrid][idx]; } double fields::thermo_energy_in_box(const volume &where) { long double sum = 0.0; FOR_COMPONENTS(c) if (!coordinate_mismatch(gv.dim, c)) loop_in_chunks(thermo_chunkloop, (void *) &sum, where, c); return sum_to_all(sum); } /* Compute ExH integral in box using current fields, ignoring fact that this E and H correspond to different times. */ double fields::flux_in_box_wrongH(direction d, const volume &where) { if (coordinate_mismatch(gv.dim, d)) return 0.0; component cE[2], cH[2]; switch (d) { case X: cE[0] = Ey, cE[1] = Ez, cH[0] = Hz, cH[1] = Hy; break; case Y: cE[0] = Ez, cE[1] = Ex, cH[0] = Hx, cH[1] = Hz; break; case R: cE[0] = Ep, cE[1] = Ez, cH[0] = Hz, cH[1] = Hp; break; case P: cE[0] = Ez, cE[1] = Er, cH[0] = Hr, cH[1] = Hz; break; case Z: if (gv.dim == Dcyl) cE[0] = Er, cE[1] = Ep, cH[0] = Hp, cH[1] = Hr; else cE[0] = Ex, cE[1] = Ey, cH[0] = Hy, cH[1] = Hx; break; case NO_DIRECTION: abort("cannot get flux in NO_DIRECTION"); } long double sum = 0.0; for (int i = 0; i < 2; ++i) { component cs[2]; cs[0] = cE[i]; cs[1] = cH[i]; sum += real(integrate(2, cs, dot_integrand, 0, where)) * (1 - 2*i); } return sum; } double fields::flux_in_box(direction d, const volume &where) { synchronize_magnetic_fields(); double cur_step_flux = flux_in_box_wrongH(d, where); restore_magnetic_fields(); return cur_step_flux; } flux_vol *fields::add_flux_vol(direction d, const volume &where) { if (where.dim != gv.dim) abort("invalid dimensionality in add_flux_vol"); if (d == NO_DIRECTION || coordinate_mismatch(gv.dim, d)) abort("invalid direction in add_flux_vol"); return new flux_vol(this, d, where); } // As add_flux_vol, but infer direction from where (if possible) flux_vol *fields::add_flux_plane(const volume &where) { return add_flux_vol(where.normal_direction(), where); } flux_vol *fields::add_flux_plane(const vec &p1, const vec &p2) { return add_flux_plane(volume(p1, p2)); } /************************************************************************/ /* Note that computation of modal grid_volume by this definition is somewhat problematic computationally, because we need to compute max|D*E|, which requires averaging discontinuous functions. Hence, except for the special case of 2d TM polarization, the computed value tends to have a large error bar if the maximum lies on a dielectric boundary as it commonly does. A better method would be to average only continuous quantities in order to compute the fields on the Centered grid, but this is more expensive and requires us to know the boundary orientation, and does not seem worth the trouble at this point. */ static complex dot3_max_integrand(const complex *fields, const vec &loc, void *data_) { (void) loc; (void) data_; // unused; return (real(conj(fields[0]) * fields[3]) + real(conj(fields[1]) * fields[4]) + real(conj(fields[2]) * fields[5])); } double fields::electric_energy_max_in_box(const volume &where) { component cs[6]; if (gv.dim == Dcyl) { cs[0] = Er; cs[1] = Ep; cs[2] = Ez; cs[3+0] = Dr; cs[3+1] = Dp; cs[3+2] = Dz; } else { cs[0] = Ex; cs[1] = Ey; cs[2] = Ez; cs[3+0] = Dx; cs[3+1] = Dy; cs[3+2] = Dz; } return max_abs(6, cs, dot3_max_integrand, 0, where) * 0.5; } /* "modal" grid_volume according to definition in: E. M. Purcell, Phys. Rev. B 69, 681 (1946). (based on spontaneous emission enhancement). */ double fields::modal_volume_in_box(const volume &where) { return electric_energy_in_box(where) / electric_energy_max_in_box(where); } /************************************************************************/ /* compute integral f(x) * Re[conj(f1)*f2] * 0.5, which is useful for perturbation theory, etcetera, where f1 and f2 are two field components on the same Yee lattice (e.g. Hx and Hx or Ex and Dx). */ typedef double (*fx_func)(const vec &); static complex dot_fx_integrand(const complex *fields, const vec &loc, void *data_) { fx_func fx = (fx_func) data_; return (real(conj(fields[0]) * fields[1]) * fx(loc)); } /* computes integral of f(x) * |E|^2 / integral epsilon*|E|^2 */ double fields::electric_sqr_weighted_integral(double (*f)(const vec &), const volume &where) { double sum = 0.0; FOR_ELECTRIC_COMPONENTS(c) if (!coordinate_mismatch(gv.dim, component_direction(c))) { component cs[2]; cs[0] = cs[1] = direction_component(Ex, component_direction(c)); sum += real(integrate(2, cs, dot_fx_integrand, (void *) f, where)); } return sum * 0.5 / electric_energy_in_box(where); } /* computes integral of f(x) * epsilon*|E|^2 / integral epsilon*|E|^2 */ double fields::electric_energy_weighted_integral(double (*f)(const vec &), const volume &where) { double sum = 0.0; FOR_ELECTRIC_COMPONENTS(c) if (!coordinate_mismatch(gv.dim, component_direction(c))) { component cs[2]; cs[0] = direction_component(Ex, component_direction(c)); cs[1] = direction_component(Dx, component_direction(c)); sum += real(integrate(2, cs, dot_fx_integrand, (void *) f, where)); } return sum * 0.5 / electric_energy_in_box(where); } } // namespace meep meep-openmpi-1.1.1/src/sphere-quad.h0000644000175200017520000001427111205642337016525 0ustar debiandebian/* This file was automatically generated --- DO NOT EDIT */ /* For 1d, 2d, and 3d, quadrature points and weights on a unit sphere. There are num_sphere_quad[dim-1] points i, with the i-th point at (x,y,z) = (sphere_quad[dim-1][i][ 0, 1, 2 ]), and with a quadrature weight sphere_quad[dim-1][i][3]. */ static const int num_sphere_quad[3] = { 2, 12, 50 }; static const double sphere_quad[3][50][4] = { { {0,0,1,0.5}, {0,0,-1,0.5} }, { { 1, 0, 0, 0.083333333333333328707 }, { -1, 1.2246467991473532072e-16, 0, 0.083333333333333328707 }, { 6.1232339957367660359e-17, 1, 0, 0.083333333333333328707 }, { -1.8369701987210296875e-16, -1, 0, 0.083333333333333328707 }, { -0.49999999999999977796, 0.86602540378443870761, 0, 0.083333333333333328707 }, { 0.50000000000000011102, -0.86602540378443859659, 0, 0.083333333333333328707 }, { -0.86602540378443870761, 0.49999999999999994449, 0, 0.083333333333333328707 }, { 0.86602540378443837454, -0.50000000000000044409, 0, 0.083333333333333328707 }, { -0.50000000000000044409, -0.86602540378443837454, 0, 0.083333333333333328707 }, { 0.50000000000000011102, 0.86602540378443859659, 0, 0.083333333333333328707 }, { 0.86602540378443870761, 0.49999999999999994449, 0, 0.083333333333333328707 }, { -0.86602540378443881863, -0.49999999999999972244, 0, 0.083333333333333328707 }, }, { { 0, -1, 0, 0.012698412698412698402 }, { 0, 1, 0, 0.012698412698412698402 }, { -1, 0, 0, 0.012698412698412698402 }, { 1, 0, 0, 0.012698412698412698402 }, { 0, 0, 1, 0.012698412698412698402 }, { 0, 0, -1, 0.012698412698412698402 }, { -0.57735026918962573106, -0.57735026918962573106, -0.57735026918962573106, 0.021093750000000001388 }, { 0.57735026918962573106, 0.57735026918962573106, 0.57735026918962573106, 0.021093750000000001388 }, { -0.57735026918962573106, -0.57735026918962573106, 0.57735026918962573106, 0.021093750000000001388 }, { 0.57735026918962573106, 0.57735026918962573106, -0.57735026918962573106, 0.021093750000000001388 }, { -0.57735026918962573106, 0.57735026918962573106, -0.57735026918962573106, 0.021093750000000001388 }, { 0.57735026918962573106, -0.57735026918962573106, 0.57735026918962573106, 0.021093750000000001388 }, { -0.57735026918962573106, 0.57735026918962573106, 0.57735026918962573106, 0.021093750000000001388 }, { 0.57735026918962573106, -0.57735026918962573106, -0.57735026918962573106, 0.021093750000000001388 }, { 0.70710678118654757274, -0.70710678118654757274, 0, 0.022574955908289243145 }, { -0.70710678118654757274, 0.70710678118654757274, 0, 0.022574955908289243145 }, { 0.70710678118654757274, 0, 0.70710678118654757274, 0.022574955908289243145 }, { -0.70710678118654757274, 0, -0.70710678118654757274, 0.022574955908289243145 }, { 0, -0.70710678118654757274, -0.70710678118654757274, 0.022574955908289243145 }, { 0, 0.70710678118654757274, 0.70710678118654757274, 0.022574955908289243145 }, { 0.70710678118654757274, 0, -0.70710678118654757274, 0.022574955908289243145 }, { -0.70710678118654757274, 0, 0.70710678118654757274, 0.022574955908289243145 }, { 0, 0.70710678118654757274, -0.70710678118654757274, 0.022574955908289243145 }, { 0, -0.70710678118654757274, 0.70710678118654757274, 0.022574955908289243145 }, { -0.70710678118654757274, -0.70710678118654757274, 0, 0.022574955908289243145 }, { 0.70710678118654757274, 0.70710678118654757274, 0, 0.022574955908289243145 }, { -0.90453403373329088755, -0.30151134457776362918, -0.30151134457776362918, 0.020173335537918869742 }, { 0.90453403373329088755, 0.30151134457776362918, 0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, 0.90453403373329088755, -0.30151134457776362918, 0.020173335537918869742 }, { 0.30151134457776362918, -0.90453403373329088755, 0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, -0.30151134457776362918, 0.90453403373329088755, 0.020173335537918869742 }, { 0.30151134457776362918, 0.30151134457776362918, -0.90453403373329088755, 0.020173335537918869742 }, { 0.30151134457776362918, -0.90453403373329088755, -0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, 0.90453403373329088755, 0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, 0.30151134457776362918, -0.90453403373329088755, 0.020173335537918869742 }, { 0.30151134457776362918, -0.30151134457776362918, 0.90453403373329088755, 0.020173335537918869742 }, { 0.90453403373329088755, 0.30151134457776362918, -0.30151134457776362918, 0.020173335537918869742 }, { -0.90453403373329088755, -0.30151134457776362918, 0.30151134457776362918, 0.020173335537918869742 }, { 0.30151134457776362918, -0.30151134457776362918, -0.90453403373329088755, 0.020173335537918869742 }, { -0.30151134457776362918, 0.30151134457776362918, 0.90453403373329088755, 0.020173335537918869742 }, { -0.30151134457776362918, -0.30151134457776362918, -0.90453403373329088755, 0.020173335537918869742 }, { 0.30151134457776362918, 0.30151134457776362918, 0.90453403373329088755, 0.020173335537918869742 }, { -0.30151134457776362918, -0.90453403373329088755, 0.30151134457776362918, 0.020173335537918869742 }, { 0.30151134457776362918, 0.90453403373329088755, -0.30151134457776362918, 0.020173335537918869742 }, { -0.90453403373329088755, 0.30151134457776362918, 0.30151134457776362918, 0.020173335537918869742 }, { 0.90453403373329088755, -0.30151134457776362918, -0.30151134457776362918, 0.020173335537918869742 }, { -0.90453403373329088755, 0.30151134457776362918, -0.30151134457776362918, 0.020173335537918869742 }, { 0.90453403373329088755, -0.30151134457776362918, 0.30151134457776362918, 0.020173335537918869742 }, { 0.30151134457776362918, 0.90453403373329088755, 0.30151134457776362918, 0.020173335537918869742 }, { -0.30151134457776362918, -0.90453403373329088755, -0.30151134457776362918, 0.020173335537918869742 }, } }; meep-openmpi-1.1.1/src/mympi.cpp0000644000175200017520000003417511243307724016002 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software Foundation, % Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include "meep.hpp" #include "config.h" #ifdef HAVE_MPI # ifdef NEED_UNDEF_SEEK_FOR_MPI // undef'ing SEEK_* is needed for MPICH, possibly other MPI versions # undef SEEK_SET # undef SEEK_END # undef SEEK_CUR # endif # include #endif #ifdef IGNORE_SIGFPE # include #endif #if defined(DEBUG) && defined(HAVE_FEENABLEEXCEPT) # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 # endif # include # if !HAVE_DECL_FEENABLEEXCEPT extern "C" int feenableexcept (int EXCEPTS); # endif #endif #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #ifdef HAVE_BSDGETTIMEOFDAY # ifndef HAVE_GETTIMEOFDAY # define gettimeofday BSDgettimeofday # define HAVE_GETTIMEOFDAY 1 # endif #endif #define UNUSED(x) (void) x // silence compiler warnings #define MPI_REALNUM (sizeof(realnum) == sizeof(double) ? MPI_DOUBLE:MPI_FLOAT) namespace meep { #ifdef HAVE_MPI static MPI_Comm mycomm = MPI_COMM_WORLD; #endif bool quiet = false; // defined in meep.h initialize::initialize(int &argc, char** &argv) { #ifdef HAVE_MPI MPI_Init(&argc, &argv); int major, minor; MPI_Get_version(&major, &minor); if (!quiet) master_printf("Using MPI version %d.%d, %d processes\n", major, minor, count_processors()); #else UNUSED(argc); UNUSED(argv); #endif #if defined(DEBUG_FP) && defined(HAVE_FEENABLEEXCEPT) feenableexcept(FE_INVALID | FE_OVERFLOW); //crash if NaN created, or overflow #endif #ifdef IGNORE_SIGFPE signal(SIGFPE, SIG_IGN); #endif t_start = wall_time(); } initialize::~initialize() { if (!quiet) master_printf("\nElapsed run time = %g s\n", elapsed_time()); #ifdef HAVE_MPI end_divide_parallel(); MPI_Finalize(); #endif } double wall_time(void) { #ifdef HAVE_MPI return MPI_Wtime(); #elif HAVE_GETTIMEOFDAY struct timeval tv; gettimeofday(&tv, 0); return(tv.tv_sec + tv.tv_usec * 1e-6); #else return (clock() * 1.0 / CLOCKS_PER_SECOND); #endif } void abort(const char *fmt, ...) { va_list ap; va_start(ap, fmt); fprintf(stderr, "meep: "); vfprintf(stderr, fmt, ap); va_end(ap); if (fmt[strlen(fmt) - 1] != '\n') fputc('\n', stderr); // force newline #ifdef HAVE_MPI MPI_Abort(MPI_COMM_WORLD, 1); #endif exit(1); } void send(int from, int to, double *data, int size) { #ifdef HAVE_MPI if (from == to) return; if (size == 0) return; const int me = my_rank(); if (from == me) MPI_Send(data, size, MPI_DOUBLE, to, 1, mycomm); MPI_Status stat; if (to == me) MPI_Recv(data, size, MPI_DOUBLE, from, 1, mycomm, &stat); #else UNUSED(from); UNUSED(to); UNUSED(data); UNUSED(size); #endif } #if MEEP_SINGLE void broadcast(int from, realnum *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, size, MPI_FLOAT, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } #endif void broadcast(int from, double *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, size, MPI_DOUBLE, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } void broadcast(int from, char *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, size, MPI_CHAR, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } void broadcast(int from, complex *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, 2*size, MPI_DOUBLE, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } void broadcast(int from, int *data, int size) { #ifdef HAVE_MPI if (size == 0) return; MPI_Bcast(data, size, MPI_INT, from, mycomm); #else UNUSED(from); UNUSED(data); UNUSED(size); #endif } complex broadcast(int from, complex data) { #ifdef HAVE_MPI MPI_Bcast(&data, 2, MPI_DOUBLE, from, mycomm); #else UNUSED(from); #endif return data; } double broadcast(int from, double data) { #ifdef HAVE_MPI MPI_Bcast(&data, 1, MPI_DOUBLE, from, mycomm); #else UNUSED(from); #endif return data; } int broadcast(int from, int data) { #ifdef HAVE_MPI MPI_Bcast(&data, 1, MPI_INT, from, mycomm); #else UNUSED(from); #endif return data; } bool broadcast(int from, bool b) { return broadcast(from, (int) b); } double max_to_master(double in) { double out = in; #ifdef HAVE_MPI MPI_Reduce(&in,&out,1,MPI_DOUBLE,MPI_MAX,0,mycomm); #endif return out; } double max_to_all(double in) { double out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,1,MPI_DOUBLE,MPI_MAX,mycomm); #endif return out; } int max_to_all(int in) { int out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,1,MPI_INT,MPI_MAX,mycomm); #endif return out; } ivec max_to_all(const ivec &pt) { int in[5], out[5]; for (int i=0; i<5; ++i) in[i] = out[i] = pt.in_direction(direction(i)); #ifdef HAVE_MPI MPI_Allreduce(&in,&out,5,MPI_INT,MPI_MAX,mycomm); #endif ivec ptout(pt.dim); for (int i=0; i<5; ++i) ptout.set_direction(direction(i), out[i]); return ptout; } double sum_to_master(double in) { double out = in; #ifdef HAVE_MPI MPI_Reduce(&in,&out,1,MPI_DOUBLE,MPI_SUM,0,mycomm); #endif return out; } double sum_to_all(double in) { double out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,1,MPI_DOUBLE,MPI_SUM,mycomm); #endif return out; } void sum_to_all(const double *in, double *out, int size) { #ifdef HAVE_MPI MPI_Allreduce((void*) in, out, size, MPI_DOUBLE,MPI_SUM,mycomm); #else memcpy(out, in, sizeof(double) * size); #endif } long double sum_to_all(long double in) { long double out = in; #ifdef HAVE_MPI if (MPI_LONG_DOUBLE == MPI_DATATYPE_NULL) out = sum_to_all(double(in)); else MPI_Allreduce(&in,&out,1,MPI_LONG_DOUBLE,MPI_SUM,mycomm); #endif return out; } int sum_to_all(int in) { int out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,1,MPI_INT,MPI_SUM,mycomm); #endif return out; } int partial_sum_to_all(int in) { int out = in; #ifdef HAVE_MPI MPI_Scan(&in,&out,1,MPI_INT,MPI_SUM,mycomm); #endif return out; } complex sum_to_all(complex in) { complex out = in; #ifdef HAVE_MPI MPI_Allreduce(&in,&out,2,MPI_DOUBLE,MPI_SUM,mycomm); #endif return out; } complex sum_to_all(complex in) { complex out = in; #ifdef HAVE_MPI if (MPI_LONG_DOUBLE == MPI_DATATYPE_NULL) { complex dout; dout = sum_to_all(complex(double(in.real()), double(in.imag()))); out = complex(dout.real(), dout.imag()); } else MPI_Allreduce(&in,&out,2,MPI_LONG_DOUBLE,MPI_SUM,mycomm); #endif return out; } bool or_to_all(bool in) { int in2 = in, out; #ifdef HAVE_MPI MPI_Allreduce(&in2,&out,1,MPI_INT,MPI_LOR,mycomm); #else out = in2; #endif return (bool) out; } void or_to_all(const int *in, int *out, int size) { #ifdef HAVE_MPI MPI_Allreduce((void*) in, out, size, MPI_INT,MPI_LOR,mycomm); #else memcpy(out, in, sizeof(int) * size); #endif } bool and_to_all(bool in) { int in2 = in, out; #ifdef HAVE_MPI MPI_Allreduce(&in2,&out,1,MPI_INT,MPI_LAND,mycomm); #else out = in2; #endif return (bool) out; } void and_to_all(const int *in, int *out, int size) { #ifdef HAVE_MPI MPI_Allreduce((void*) in, out, size, MPI_INT,MPI_LAND,mycomm); #else memcpy(out, in, sizeof(int) * size); #endif } void all_wait() { #ifdef HAVE_MPI MPI_Barrier(mycomm); #endif } int my_rank() { #ifdef HAVE_MPI int rank; MPI_Comm_rank(mycomm, &rank); return rank; #else return 0; #endif } int count_processors() { #ifdef HAVE_MPI int n; MPI_Comm_size(mycomm, &n); return n; #else return 1; #endif } void fields::boundary_communications(field_type ft) { // Communicate the data around! #if 0 // This is the blocking version, which should always be safe! for (int noti=0;notin_proc(), chunks[i]->n_proc(), comm_blocks[ft][pair], comm_size_tot(ft,pair)); } } #endif #ifdef HAVE_MPI const int maxreq = num_chunks*num_chunks; MPI_Request *reqs = new MPI_Request[maxreq]; MPI_Status *stats = new MPI_Status[maxreq]; int reqnum = 0; int *tagto = new int[count_processors()]; for (int i=0;i 0) { if (chunks[j]->is_mine() && !chunks[i]->is_mine()) MPI_Isend(comm_blocks[ft][pair], comm_size, MPI_REALNUM, chunks[i]->n_proc(), tagto[chunks[i]->n_proc()]++, mycomm, &reqs[reqnum++]); if (chunks[i]->is_mine() && !chunks[j]->is_mine()) MPI_Irecv(comm_blocks[ft][pair], comm_size, MPI_REALNUM, chunks[j]->n_proc(), tagto[chunks[j]->n_proc()]++, mycomm, &reqs[reqnum++]); } } delete[] tagto; if (reqnum > maxreq) abort("Too many requests!!!\n"); if (reqnum > 0) MPI_Waitall(reqnum, reqs, stats); delete[] reqs; delete[] stats; #else (void) ft; // unused #endif } // IO Routines... bool am_really_master() { #ifdef HAVE_MPI int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); return (rank == 0); #else return true; #endif } void master_printf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (am_really_master()) { vprintf(fmt, ap); fflush(stdout); } va_end(ap); } static FILE *debf = NULL; void debug_printf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (debf == NULL) { char temp[50]; snprintf(temp, 50, "debug_out_%d", my_rank()); debf = fopen(temp,"w"); if (!debf) abort("Unable to open debug output %s\n", temp); } vfprintf(debf, fmt, ap); fflush(debf); va_end(ap); } void master_fprintf(FILE *f, const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (am_master()) { vfprintf(f, fmt, ap); fflush(f); } va_end(ap); } FILE *master_fopen(const char *name, const char *mode) { FILE *f = am_master() ? fopen(name, mode) : 0; /* other processes need to know if fopen returned zero, in order to abort if fopen failed. If fopen was successfully, just return a random non-zero pointer (which is never used except to compare to zero) on non-master processes */ if (broadcast(0, bool(f != 0)) && !am_master()) f = (FILE *) name; return f; } void master_fclose(FILE *f) { if (am_master()) fclose(f); } /* The following functions bracket a "critical section," a region of code that should be executed by only one process at a time. They work by having each process wait for a message from the previous process before starting. Each critical section is passed an integer "tag"...ideally, this should be a unique identifier for each critical section so that messages from different critical sections don't get mixed up somehow. */ void begin_critical_section(int tag) { #ifdef HAVE_MPI int process_rank; MPI_Comm_rank(mycomm, &process_rank); if (process_rank > 0) { /* wait for a message before continuing */ MPI_Status status; int recv_tag = tag - 1; /* initialize to wrong value */ MPI_Recv(&recv_tag, 1, MPI_INT, process_rank - 1, tag, mycomm, &status); if (recv_tag != tag) abort("invalid tag received in begin_critical_section"); } #else UNUSED(tag); #endif } void end_critical_section(int tag) { #ifdef HAVE_MPI int process_rank, num_procs; MPI_Comm_rank(mycomm, &process_rank); MPI_Comm_size(mycomm, &num_procs); if (process_rank != num_procs - 1) { /* send a message to next process */ MPI_Send(&tag, 1, MPI_INT, process_rank + 1, tag, mycomm); } #else UNUSED(tag); #endif } /* Simple, somewhat hackish API to allow user to run multiple simulations in parallel in the same MPI job. The user calls mygroup = divide_parallel_processes(numgroups); to divide all of the MPI processes into numgroups equal groups, and to return the index (from 0 to numgroups-1) of the current group. From this point on, all fields etc. that you create and all calls from mympi.cpp will only communicate within your group of processes. However, there are two calls that you can use to switch back to globally communication among all processes: begin_global_communications(); ....do stuff.... end_global_communications(); It is important not to mix the two types; e.g. you cannot timestep a field created in the local group in global mode, or vice versa. */ int divide_parallel_processes(int numgroups) { #ifdef HAVE_MPI end_divide_parallel(); if (numgroups > count_processors()) abort("numgroups > count_processors"); int mygroup = (my_rank() * numgroups) / count_processors(); MPI_Comm_split(MPI_COMM_WORLD, mygroup, my_rank(), &mycomm); return mygroup; #else if (numgroups != 1) abort("cannot divide processes in non-MPI mode"); return 0; #endif } #ifdef HAVE_MPI static MPI_Comm mycomm_save = MPI_COMM_WORLD; #endif void begin_global_communications(void) { #ifdef HAVE_MPI mycomm_save = mycomm; mycomm = MPI_COMM_WORLD; #endif } void end_global_communications(void) { #ifdef HAVE_MPI mycomm = mycomm_save; #endif } void end_divide_parallel(void) { #ifdef HAVE_MPI if (mycomm != MPI_COMM_WORLD) MPI_Comm_free(&mycomm); if (mycomm_save != MPI_COMM_WORLD) MPI_Comm_free(&mycomm_save); mycomm = mycomm_save = MPI_COMM_WORLD; #endif } } // namespace meep meep-openmpi-1.1.1/INSTALL0000644000175200017520000002713611204551150014373 0ustar debiandebianInstallation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 6. Often, you can also type `make uninstall' to remove the installed files again. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *Note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. meep-openmpi-1.1.1/TODO0000644000175200017520000000271111175745614014043 0ustar debiandebianSupport 3d (r,phi,z) cell, where m is "Bloch wavenumber" -- gives 6-fold (and n-fold) symmetry as side effect -- allows computation of bended photonic-crystal waveguides Implement transparent boundary conditions to back PML layers, so that glancing-angle waves can be absorbed. Re-entrant functions: foo(vec&) arguments should be foo(vec&, void*) where the second argument can be used to pass state (instead of global vars). User proper PML for dispersive media and cylindrical. Use more-stable algorithm for dispersive media. Field dump/load (i.e. restarting)? Make sure epsilon and other material properties respect symmetry, periodic boundaries, etc.? Remove monitor point class (redundant with HDF5 output, DFT volumes?). Integrated support for calling MPB mode solver for current distributions. rename fields::initialize to fields::add_to_fields or something like that, and allow specifying a geometric_volume. Dump field Fourier transforms in a readable, documented format. Support Pade approximates (libpadespectrum) for Fourier and modal analysis. Check sensitivity to rounding error and if there is a better way to handle: structure.cpp:555 (PML region boundaries) vec.cpp:560 (interpolation weights) anisotropic_averaging: 79 (magnitude of normal vector) ------------------- LIBCTL FRONT-END: Epsilon from file support. Need a way to reset epsilon when restarting, and also phasing support. Support arbitrary-shaped sources. meep-openmpi-1.1.1/configure0000755000175200017520000347671611243546264015305 0ustar debiandebian#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for meep 1.1.1. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='meep' PACKAGE_TARNAME='meep' PACKAGE_VERSION='1.1.1' PACKAGE_STRING='meep 1.1.1' PACKAGE_BUGREPORT='meep@ab-initio.mit.edu' ac_unique_file="src/step.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS MEEP_SUFFIX LIBCTL_LIBS CTL_H_CPPFLAG GEN_CTL_IO LIBCTL_DIR ACTIVATE_READLINE GUILE_CONFIG WITH_LIBCTL_FALSE WITH_LIBCTL_TRUE MEEPLIBS RUNCODE LAPACK_LIBS BLAS_LIBS FLIBS ac_ct_F77 FFLAGS F77 HARMINV_LIBS HARMINV_CFLAGS PKG_CONFIG LATEX2HTML CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL ARCHFLAG PRTDIAG am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build MPILIBS MPICXX am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX SHARED_VERSION_INFO MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_shared enable_dependency_tracking with_mpi enable_portable_binary with_gcc_arch enable_debug enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock with_blas with_lapack with_hdf5 with_libctl ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC MPICXX CC CFLAGS CPP CXXCPP F77 FFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures meep 1.1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/meep] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of meep 1.1.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=no] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-portable-binary disable compiler optimizations that would produce unportable binaries --enable-debug compile for debugging --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-mpi enable MPI parallelization --with-gcc-arch= use architecture for gcc -march/-mtune, instead of guessing --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-blas= use BLAS library --with-lapack= use LAPACK library --without-hdf5 do not allow HDF5 output --with-libctl= specify libctl directory Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory MPICXX MPI C++ compiler command CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF meep configure 1.1.1 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by meep $as_me 1.1.1, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Shared-library version number; indicates api compatibility, and is # not the same as the "public" version number. (Don't worry about this # except for public releases.) Note that any change to a C++ class # definition (in the .hpp file) generally breaks binary compatibility. SHARED_VERSION_INFO="6:1:0" # CURRENT:REVISION:AGE am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then enableval=$enable_silent_rules; fi case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='meep' VERSION='1.1.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then enableval=$enable_silent_rules; fi case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac AM_BACKSLASH='\' ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=no fi MEEP_SUFFIX="" ############################################################################## # Check for mpiCC immediately after getting C++ compiler... ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C++ compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C++ compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Check for MPI library # Check whether --with-mpi was given. if test "${with_mpi+set}" = set; then withval=$with_mpi; with_mpi=$withval else with_mpi=no fi if test "x$with_mpi" = "xyes"; then for ac_prog in mpic++ mpiCC mpicxx mpCC hcp mpxlC mpxlC_r cmpic++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MPICXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$MPICXX"; then ac_cv_prog_MPICXX="$MPICXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MPICXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MPICXX=$ac_cv_prog_MPICXX if test -n "$MPICXX"; then { $as_echo "$as_me:$LINENO: result: $MPICXX" >&5 $as_echo "$MPICXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$MPICXX" && break done test -n "$MPICXX" || MPICXX="$CXX" acx_mpi_save_CXX="$CXX" CXX="$MPICXX" if test x = x"$MPILIBS"; then { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 $as_echo_n "checking for MPI_Init... " >&6; } if test "${ac_cv_func_MPI_Init+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define MPI_Init to an innocuous variant, in case declares MPI_Init. For example, HP-UX 11i declares gettimeofday. */ #define MPI_Init innocuous_MPI_Init /* System header to define __stub macros and hopefully few prototypes, which can conflict with char MPI_Init (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef MPI_Init /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_MPI_Init || defined __stub___MPI_Init choke me #endif int main () { return MPI_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_MPI_Init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_MPI_Init=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5 $as_echo "$ac_cv_func_MPI_Init" >&6; } if test "x$ac_cv_func_MPI_Init" = x""yes; then MPILIBS=" " fi fi if test x = x"$MPILIBS"; then { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; } if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_mpi_MPI_Init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpi_MPI_Init=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; } if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_mpich_MPI_Init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpich_MPI_Init=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then { $as_echo "$as_me:$LINENO: checking for mpi.h" >&5 $as_echo_n "checking for mpi.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 MPILIBS="" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CXX="$acx_mpi_save_CXX" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then { { $as_echo "$as_me:$LINENO: error: could not find mpi library for --with-mpi" >&5 $as_echo "$as_me: error: could not find mpi library for --with-mpi" >&2;} { (exit 1); exit 1; }; } : else cat >>confdefs.h <<\_ACEOF #define HAVE_MPI 1 _ACEOF : fi CXX=$MPICXX MEEP_SUFFIX="${MEEP_SUFFIX}_mpi" # Detect stupid MPICH problem with SEEK_SET conflicting between # the mpi.h header file and the stdio.h header file in C++ { $as_echo "$as_me:$LINENO: checking for extra flag needed to combine stdio.h and mpi.h" >&5 $as_echo_n "checking for extra flag needed to combine stdio.h and mpi.h... " >&6; } for flag in none -DMPICH_IGNORE_CXX_SEEK unknown; do if test "x$flag" = xunknown; then break; fi save_CPPFLAGS=$CPPFLAGS if test "x$flag" != xnone; then CPPFLAGS="$CPPFLAGS $flag"; fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS=$save_CPPFLAGS done { $as_echo "$as_me:$LINENO: result: $flag" >&5 $as_echo "$flag" >&6; } if test "x$flag" = xunknown; then { $as_echo "$as_me:$LINENO: checking if we can combine stdio.h and mpi.h by undef'ing SEEK_*" >&5 $as_echo_n "checking if we can combine stdio.h and mpi.h by undef'ing SEEK_*... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #undef SEEK_SET #undef SEEK_END #undef SEEK_CUR #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define NEED_UNDEF_SEEK_FOR_MPI 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:$LINENO: error: can't include stdio.h and mpi.h in same file" >&5 $as_echo "$as_me: error: can't include stdio.h and mpi.h in same file" >&2;} { (exit 1); exit 1; }; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi ############################################################################## # Compiler flags # Pick "good" compiler flags(?) # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:$LINENO: checking for C++ compiler vendor" >&5 $as_echo_n "checking for C++ compiler vendor... " >&6; } if test "${ax_cv_cxx_compiler_vendor+set}" = set; then $as_echo_n "(cached) " >&6 else ax_cv_cxx_compiler_vendor=unknown # note: don't check for gcc first since some other compilers define __GNUC__ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #if !($vencpp) thisisanerror; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ax_cv_cxx_compiler_vendor=`echo $ventest | cut -d: -f1`; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done fi { $as_echo "$as_me:$LINENO: result: $ax_cv_cxx_compiler_vendor" >&5 $as_echo "$ax_cv_cxx_compiler_vendor" >&6; } # Check whether --enable-portable-binary was given. if test "${enable_portable_binary+set}" = set; then enableval=$enable_portable_binary; acx_maxopt_portable=$withval else acx_maxopt_portable=no fi # Try to determine "good" native compiler flags if none specified via CXXFLAGS if test "$ac_test_CXXFLAGS" != "set"; then CXXFLAGS="" case $ax_cv_cxx_compiler_vendor in dec) CXXFLAGS="-w0 -O5 -tune host" # -ansi_alias -ansi_args -fp_reorder ? if test "x$acx_maxopt_portable" = xno; then CXXFLAGS="$CXXFLAGS -arch host" fi;; sun) CXXFLAGS="-native -fast -dalign" # -xO5 ? if test "x$acx_maxopt_portable" = xyes; then CXXFLAGS="$CXXFLAGS -xarch=generic" fi;; hp) CXXFLAGS="+Oall +DSnative" # +Optrs_ansi ? if test "x$acx_maxopt_portable" = xyes; then CXXFLAGS="$CXXFLAGS +DAportable" fi;; ibm) if test "x$acx_maxopt_portable" = xno; then xlc_opt="-qarch=auto -qtune=auto" else xlc_opt="-qtune=auto" fi { $as_echo "$as_me:$LINENO: checking whether C++ compiler accepts $xlc_opt" >&5 $as_echo_n "checking whether C++ compiler accepts $xlc_opt... " >&6; } ax_save_FLAGS=$CXXFLAGS CXXFLAGS="$xlc_opt" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval `$as_echo "ax_cv_cxx_flags_$xlc_opt" | $as_tr_sh`=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval `$as_echo "ax_cv_cxx_flags_$xlc_opt" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_cxx_flags_$xlc_opt" | $as_tr_sh` { $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then CXXFLAGS="-O3 -qansialias -w $xlc_opt" else CXXFLAGS="-O3 -qansialias -w" echo "******************************************************" echo "* You seem to have the IBM C compiler. It is *" echo "* recommended for best performance that you use: *" echo "* *" echo "* CXXFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *" echo "* ^^^ ^^^ *" echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *" echo "* CPU you have. (Set the CXXFLAGS environment var. *" echo "* and re-run configure.) For more info, man xlC. *" echo "******************************************************" fi ;; intel) CXXFLAGS="-O3" # -ansi_alias ? if test "x$acx_maxopt_portable" = xno; then icc_archflag=unknown icc_flags="" # -xN etcetera are for older versions of icc: case $host_cpu in i686*|x86_64*) # icc accepts gcc assembly syntax, so these should work: ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for x86 cpuid 0 output" >&5 $as_echo_n "checking for x86 cpuid 0 output... " >&6; } if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ax_cv_gcc_x86_cpuid_0=unknown else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int op = 0, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_0" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for x86 cpuid 1 output" >&5 $as_echo_n "checking for x86 cpuid 1 output... " >&6; } if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ax_cv_gcc_x86_cpuid_1=unknown else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int op = 1, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_1" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG *:756e6547:*:*) # Intel case $ax_cv_gcc_x86_cpuid_1 in *6a?:*[234]:*:*|*6[789b]?:*:*:*) icc_flags="-xK";; *f3[347]:*:*:*|*f41347:*:*:*) icc_flags="-xP -xN -xW -xK";; *f??:*:*:*) icc_flags="-xN -xW -xK";; esac ;; esac ;; esac # newer icc versions should support -xHost icc_flags="-xHost $icc_flags" if test "x$icc_flags" != x; then for flag in $icc_flags; do { $as_echo "$as_me:$LINENO: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } ax_save_FLAGS=$CXXFLAGS CXXFLAGS="$flag" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval `$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh`=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval `$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh` { $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then icc_archflag=$flag; break else : fi done fi { $as_echo "$as_me:$LINENO: checking for icc architecture flag" >&5 $as_echo_n "checking for icc architecture flag... " >&6; } { $as_echo "$as_me:$LINENO: result: $icc_archflag" >&5 $as_echo "$icc_archflag" >&6; } if test "x$icc_archflag" != xunknown; then CXXFLAGS="$CXXFLAGS $icc_archflag" fi fi ;; gnu) # default optimization flags for g++ on all systems CXXFLAGS="-O3" # -malign-double for x86 systems { $as_echo "$as_me:$LINENO: checking whether C++ compiler accepts -malign-double" >&5 $as_echo_n "checking whether C++ compiler accepts -malign-double... " >&6; } if test "${ax_cv_cxx_flags__malign_double+set}" = set; then $as_echo_n "(cached) " >&6 else ax_save_FLAGS=$CXXFLAGS CXXFLAGS="-malign-double" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ax_cv_cxx_flags__malign_double=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ax_cv_cxx_flags__malign_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS fi eval ax_check_compiler_flags=$ax_cv_cxx_flags__malign_double { $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then CXXFLAGS="$CXXFLAGS -malign-double" else : fi { $as_echo "$as_me:$LINENO: checking whether C++ compiler accepts -fstrict-aliasing" >&5 $as_echo_n "checking whether C++ compiler accepts -fstrict-aliasing... " >&6; } if test "${ax_cv_cxx_flags__fstrict_aliasing+set}" = set; then $as_echo_n "(cached) " >&6 else ax_save_FLAGS=$CXXFLAGS CXXFLAGS="-fstrict-aliasing" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ax_cv_cxx_flags__fstrict_aliasing=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ax_cv_cxx_flags__fstrict_aliasing=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS fi eval ax_check_compiler_flags=$ax_cv_cxx_flags__fstrict_aliasing { $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then CXXFLAGS="$CXXFLAGS -fstrict-aliasing" else : fi # note that we enable "unsafe" fp optimization with other compilers, too { $as_echo "$as_me:$LINENO: checking whether C++ compiler accepts -ffast-math" >&5 $as_echo_n "checking whether C++ compiler accepts -ffast-math... " >&6; } if test "${ax_cv_cxx_flags__ffast_math+set}" = set; then $as_echo_n "(cached) " >&6 else ax_save_FLAGS=$CXXFLAGS CXXFLAGS="-ffast-math" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ax_cv_cxx_flags__ffast_math=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ax_cv_cxx_flags__ffast_math=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS fi eval ax_check_compiler_flags=$ax_cv_cxx_flags__ffast_math { $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then CFLAGS="$CFLAGS -ffast-math" else : fi # Check whether --with-gcc-arch was given. if test "${with_gcc_arch+set}" = set; then withval=$with_gcc_arch; ax_gcc_arch=$withval else ax_gcc_arch=yes fi { $as_echo "$as_me:$LINENO: checking for gcc architecture flag" >&5 $as_echo_n "checking for gcc architecture flag... " >&6; } { $as_echo "$as_me:$LINENO: result: " >&5 $as_echo "" >&6; } if test "${ax_cv_gcc_archflag+set}" = set; then $as_echo_n "(cached) " >&6 else ax_cv_gcc_archflag="unknown" if test "$GCC" = yes; then if test "x$ax_gcc_arch" = xyes; then ax_gcc_arch="" if test "$cross_compiling" = no; then case $host_cpu in i[3456]86*|x86_64*|amd64*) # use cpuid codes, in part from x86info-1.21 by D. Jones ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for x86 cpuid 0 output" >&5 $as_echo_n "checking for x86 cpuid 0 output... " >&6; } if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ax_cv_gcc_x86_cpuid_0=unknown else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int op = 0, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_0" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for x86 cpuid 1 output" >&5 $as_echo_n "checking for x86 cpuid 1 output... " >&6; } if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ax_cv_gcc_x86_cpuid_1=unknown else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int op = 1, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_1" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu case $ax_cv_gcc_x86_cpuid_0 in *:756e6547:*:*) # Intel case $ax_cv_gcc_x86_cpuid_1 in *5[48]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;; *5??:*:*:*) ax_gcc_arch=pentium ;; *6[3456]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; *6a?:*[01]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; *6a?:*[234]:*:*) ax_gcc_arch="native pentium3 pentiumpro" ;; *6[78b]?:*:*:*) ax_gcc_arch="native pentium3 pentiumpro" ;; *6[9d]?:*:*:*) ax_gcc_arch="native pentium-m pentium3 pentiumpro" ;; *6[e]?:*:*:*) ax_gcc_arch="native pentium-m pentium3 pentiumpro" ;; # Core Duo *6f?:*:*:*) ax_gcc_arch="core2 native pentium-m pentium3 pentiumpro" ;; *6??:*:*:*) ax_gcc_arch="native pentiumpro" ;; *f3[347]:*:*:*|*f4[1347]:*:*:*) case $host_cpu in x86_64*|amd64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;; *) ax_gcc_arch="prescott pentium4 pentiumpro" ;; esac ;; *f??:*:*:*) ax_gcc_arch="native pentium4 pentiumpro";; esac ;; *:68747541:*:*) # AMD case $ax_cv_gcc_x86_cpuid_1 in *5[67]?:*:*:*) ax_gcc_arch=k6 ;; *5[8c]?:*:*:*) ax_gcc_arch="k6-2 k6" ;; *5[9d]?:*:*:*) ax_gcc_arch="k6-3 k6" ;; *60?:*:*:*) ax_gcc_arch=k7 ;; *6[12]?:*:*:*) ax_gcc_arch="athlon k7" ;; *6[34]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;; *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;; *6[68a]?:*:*:*) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for x86 cpuid 0x80000006 output" >&5 $as_echo_n "checking for x86 cpuid 0x80000006 output... " >&6; } if test "${ax_cv_gcc_x86_cpuid_0x80000006+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ax_cv_gcc_x86_cpuid_0x80000006=unknown else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int op = 0x80000006, eax, ebx, ecx, edx; FILE *f; #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) __asm__("push %%rbx\n\t" "cpuid\n\t" "pop %%rbx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%rbx\n\t" "cpuid\n\t" "mov %%rbx, %%rax\n\t" "pop %%rbx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #else __asm__("push %%ebx\n\t" "cpuid\n\t" "pop %%ebx" : "=a" (eax), "=c" (ecx), "=d" (edx) : "a" (op)); __asm__("push %%ebx\n\t" "cpuid\n\t" "mov %%ebx, %%eax\n\t" "pop %%ebx" : "=a" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); #endif f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ax_cv_gcc_x86_cpuid_0x80000006=`cat conftest_cpuid`; rm -f conftest_cpuid else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ax_cv_gcc_x86_cpuid_0x80000006=unknown; rm -f conftest_cpuid fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_0x80000006" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_0x80000006" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # L2 cache size case $ax_cv_gcc_x86_cpuid_0x80000006 in *:*:*[1-9a-f]??????:*) # (L2 = ecx >> 16) >= 256 ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;; *) ax_gcc_arch="athlon-4 athlon k7" ;; esac ;; *f[4cef8b]?:*:*:*) ax_gcc_arch="athlon64 k8" ;; *f5?:*:*:*) ax_gcc_arch="opteron k8" ;; *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;; *f??:*:*:*) ax_gcc_arch="native k8" ;; esac ;; *:746e6543:*:*) # IDT case $ax_cv_gcc_x86_cpuid_1 in *54?:*:*:*) ax_gcc_arch=winchip-c6 ;; *58?:*:*:*) ax_gcc_arch=winchip2 ;; *6[78]?:*:*:*) ax_gcc_arch=c3 ;; *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;; esac ;; esac if test x"$ax_gcc_arch" = x; then # fallback case $host_cpu in i586*) ax_gcc_arch="native pentium" ;; i686*) ax_gcc_arch="native pentiumpro" ;; x86_64*|amd64*) ax_gcc_arch="native" ;; esac fi ;; sparc*) # Extract the first word of "prtdiag", so it can be a program name with args. set dummy prtdiag; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PRTDIAG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PRTDIAG in [\\/]* | ?:[\\/]*) ac_cv_path_PRTDIAG="$PRTDIAG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PRTDIAG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PRTDIAG" && ac_cv_path_PRTDIAG="prtdiag" ;; esac fi PRTDIAG=$ac_cv_path_PRTDIAG if test -n "$PRTDIAG"; then { $as_echo "$as_me:$LINENO: result: $PRTDIAG" >&5 $as_echo "$PRTDIAG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null` cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters` case $cputype in *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;; *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;; *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;; *supersparc*|*tms390z5[05]*) ax_gcc_arch="supersparc v8" ;; *hypersparc*|*rt62[056]*) ax_gcc_arch="hypersparc v8" ;; *cypress*) ax_gcc_arch=cypress ;; esac ;; alphaev5) ax_gcc_arch=ev5 ;; alphaev56) ax_gcc_arch=ev56 ;; alphapca56) ax_gcc_arch="pca56 ev56" ;; alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;; alphaev6) ax_gcc_arch=ev6 ;; alphaev67) ax_gcc_arch=ev67 ;; alphaev68) ax_gcc_arch="ev68 ev67" ;; alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;; alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;; alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;; powerpc*) cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null` cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'` case $cputype in *750*) ax_gcc_arch="750 G3" ;; *740[0-9]*) ax_gcc_arch="$cputype 7400 G4" ;; *74[4-5][0-9]*) ax_gcc_arch="$cputype 7450 G4" ;; *74[0-9][0-9]*) ax_gcc_arch="$cputype G4" ;; *970*) ax_gcc_arch="970 G5 power4";; *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";; *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";; 603ev|8240) ax_gcc_arch="$cputype 603e 603";; *Cell*) ax_gcc_arch="cellppu cell";; *) ax_gcc_arch="$cputype native" ;; esac ax_gcc_arch="$ax_gcc_arch powerpc" ;; esac fi # not cross-compiling fi # guess arch if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then for arch in $ax_gcc_arch; do if test "x$acx_maxopt_portable" = xyes; then # if we require portable code flags="-mtune=$arch" # -mcpu=$arch and m$arch generate nonportable code on every arch except # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr. case $host_cpu in i*86|x86_64*|amd64*) flags="$flags -mcpu=$arch -m$arch";; esac else flags="-march=$arch -mcpu=$arch -m$arch" fi for flag in $flags; do { $as_echo "$as_me:$LINENO: checking whether C++ compiler accepts $flag" >&5 $as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } ax_save_FLAGS=$CXXFLAGS CXXFLAGS="$flag" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval `$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh`=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval `$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_cxx_flags_$flag" | $as_tr_sh` { $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then ax_cv_gcc_archflag=$flag; break else : fi done test "x$ax_cv_gcc_archflag" = xunknown || break done fi fi # $GCC=yes fi { $as_echo "$as_me:$LINENO: checking for gcc architecture flag" >&5 $as_echo_n "checking for gcc architecture flag... " >&6; } { $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_archflag" >&5 $as_echo "$ax_cv_gcc_archflag" >&6; } if test "x$ax_cv_gcc_archflag" = xunknown; then : else CXXFLAGS="$CXXFLAGS $ax_cv_gcc_archflag" fi ;; esac if test -z "$CXXFLAGS"; then echo "" echo "********************************************************" echo "* WARNING: Don't know the best CXXFLAGS for this system *" echo "* Use ./configure CXXFLAGS=... to specify your own flags *" echo "* (otherwise, a default of CXXFLAGS=-O3 will be used) *" echo "********************************************************" echo "" CXXFLAGS="-O3" fi { $as_echo "$as_me:$LINENO: checking whether C++ compiler accepts $CXXFLAGS" >&5 $as_echo_n "checking whether C++ compiler accepts $CXXFLAGS... " >&6; } ax_save_FLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval `$as_echo "ax_cv_cxx_flags_$CXXFLAGS" | $as_tr_sh`=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval `$as_echo "ax_cv_cxx_flags_$CXXFLAGS" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_cxx_flags_$CXXFLAGS" | $as_tr_sh` { $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then : else echo "" echo "********************************************************" echo "* WARNING: The guessed CXXFLAGS don't seem to work with *" echo "* your compiler. *" echo "* Use ./configure CXXFLAGS=... to specify your own flags *" echo "********************************************************" echo "" CXXFLAGS="" fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; enable_debug=$enableval else enable_debug=no fi if test "$enable_debug" = "yes"; then CFLAGS="-g" CXXFLAGS="-g" FFLAGS="-g" cat >>confdefs.h <<\_ACEOF #define DEBUG 1 _ACEOF fi # Add lots of compiler warnings in maintainer mode if we are using gcc: # (The variable $GXX is set to "yes" by AC_PROG_CXX if we are using g++.) if test "$GXX" = "yes" && test "$USE_MAINTAINER_MODE" = yes; then CXXFLAGS="$CXXFLAGS -Wall -W" fi # For some annoying reason, g++ requires you to compile # all code with -march if you compile any code with -march, # otherwise segfaults can occur (observed in g++ 3.3.5). # We also need to be careful about -malign-double. ARCHFLAG="" for flg in $CXXFLAGS; do case $flg in -march=*|-mcpu=*|-malign*) ARCHFLAG="$ARCHFLAG $flg" ;; esac done ############################################################################## # More checks case `pwd` in *\ * | *\ *) { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6' macro_revision='1.3012' ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed $as_unset ac_script || ac_script= if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:6920: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:6923: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:6926: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$LINENO: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 8131 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} _lt_caught_CXX_error=yes; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else _lt_caught_CXX_error=yes fi # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:10695: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:10699: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11034: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11038: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11139: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11143: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11194: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11198: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 13994 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 14090 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5]* | *pgcpp\ [1-5]*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16110: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16114: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16209: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16213: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16261: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16265: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Extract the first word of "latex2html", so it can be a program name with args. set dummy latex2html; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LATEX2HTML+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LATEX2HTML"; then ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LATEX2HTML="latex2html" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LATEX2HTML=$ac_cv_prog_LATEX2HTML if test -n "$LATEX2HTML"; then { $as_echo "$as_me:$LINENO: result: $LATEX2HTML" >&5 $as_echo "$LATEX2HTML" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$LATEX2HTML"; then { $as_echo "$as_me:$LINENO: WARNING: Cannot find latex2html in your path!" >&5 $as_echo "$as_me: WARNING: Cannot find latex2html in your path!" >&2;} # FIXME: use standard 'missing' script from automake LATEX2HTML='echo not running latex2html...' fi { $as_echo "$as_me:$LINENO: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if test "${ac_cv_lib_m_sin+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_sin=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sin=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:$LINENO: checking for fftw_plan_dft_1d in -lfftw3" >&5 $as_echo_n "checking for fftw_plan_dft_1d in -lfftw3... " >&6; } if test "${ac_cv_lib_fftw3_fftw_plan_dft_1d+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfftw3 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fftw_plan_dft_1d (); int main () { return fftw_plan_dft_1d (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_fftw3_fftw_plan_dft_1d=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fftw3_fftw_plan_dft_1d=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fftw3_fftw_plan_dft_1d" >&5 $as_echo "$ac_cv_lib_fftw3_fftw_plan_dft_1d" >&6; } if test "x$ac_cv_lib_fftw3_fftw_plan_dft_1d" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBFFTW3 1 _ACEOF LIBS="-lfftw3 $LIBS" else { $as_echo "$as_me:$LINENO: checking for fftw_create_plan in -ldfftw" >&5 $as_echo_n "checking for fftw_create_plan in -ldfftw... " >&6; } if test "${ac_cv_lib_dfftw_fftw_create_plan+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldfftw $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fftw_create_plan (); int main () { return fftw_create_plan (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dfftw_fftw_create_plan=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dfftw_fftw_create_plan=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dfftw_fftw_create_plan" >&5 $as_echo "$ac_cv_lib_dfftw_fftw_create_plan" >&6; } if test "x$ac_cv_lib_dfftw_fftw_create_plan" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDFFTW 1 _ACEOF LIBS="-ldfftw $LIBS" else { $as_echo "$as_me:$LINENO: checking for fftw_create_plan in -lfftw" >&5 $as_echo_n "checking for fftw_create_plan in -lfftw... " >&6; } if test "${ac_cv_lib_fftw_fftw_create_plan+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfftw $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fftw_create_plan (); int main () { return fftw_create_plan (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_fftw_fftw_create_plan=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fftw_fftw_create_plan=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fftw_fftw_create_plan" >&5 $as_echo "$ac_cv_lib_fftw_fftw_create_plan" >&6; } if test "x$ac_cv_lib_fftw_fftw_create_plan" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBFFTW 1 _ACEOF LIBS="-lfftw $LIBS" else { $as_echo "$as_me:$LINENO: WARNING: FFTW needed for MPB" >&5 $as_echo "$as_me: WARNING: FFTW needed for MPB" >&2;} fi fi fi ########################################################################### # Harminv library # First, try pkg-config, if it is installed. Note that, annoyingly, # pkg-config doesn't look in /usr/local by default, so we have to # add this to the path for that common case. It also doesn't give # us a way to print its default path, grr, so we have to assume that this # is /usr/lib/pkgconfig. PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then { $as_echo "$as_me:$LINENO: checking for harminv >= 1.1" >&5 $as_echo_n "checking for harminv >= 1.1... " >&6; } if $PKG_CONFIG --exists "harminv >= 1.1" ; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes { $as_echo "$as_me:$LINENO: checking HARMINV_CFLAGS" >&5 $as_echo_n "checking HARMINV_CFLAGS... " >&6; } HARMINV_CFLAGS=`$PKG_CONFIG --cflags "harminv >= 1.1"` { $as_echo "$as_me:$LINENO: result: $HARMINV_CFLAGS" >&5 $as_echo "$HARMINV_CFLAGS" >&6; } { $as_echo "$as_me:$LINENO: checking HARMINV_LIBS" >&5 $as_echo_n "checking HARMINV_LIBS... " >&6; } HARMINV_LIBS=`$PKG_CONFIG --libs "harminv >= 1.1"` { $as_echo "$as_me:$LINENO: result: $HARMINV_LIBS" >&5 $as_echo "$HARMINV_LIBS" >&6; } else HARMINV_CFLAGS="" HARMINV_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. HARMINV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "harminv >= 1.1"` fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then CFLAGS="$CFLAGS $HARMINV_CFLAGS"; LIBS="$HARMINV_LIBS $LIBS"; have_harminv=yes else have_harminv=no fi # As a fallback, check manually for BLAS/LAPACK and harminv libraries: if test $have_harminv = no; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_F77+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:$LINENO: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then $as_echo_n "(cached) " >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_F77+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:$LINENO: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then $as_echo_n "(cached) " >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_direct_absolute_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no inherit_rpath_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` GCC=$G77 if test -n "$compiler"; then { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_F77='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_F77='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fPIC' lt_prog_compiler_static_F77='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='--shared' lt_prog_compiler_static_F77='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-qpic' lt_prog_compiler_static_F77='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_F77='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 $as_echo "$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:18693: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:18697: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:18792: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:18796: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:18844: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:18848: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_F77= always_export_symbols_F77=no archive_cmds_F77= archive_expsym_cmds_F77= compiler_needs_object_F77=no enable_shared_with_static_runtimes_F77=no export_dynamic_flag_spec_F77= export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic_F77=no hardcode_direct_F77=no hardcode_direct_absolute_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported inherit_rpath_F77=no link_all_deplibs_F77=unknown module_cmds_F77= module_expsym_cmds_F77= old_archive_from_new_cmds_F77= old_archive_from_expsyms_cmds_F77= thread_safe_flag_spec_F77= whole_archive_flag_spec_F77= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='' ;; m68k) archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec_F77= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_F77=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' archive_cmds_F77='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_direct_absolute_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes file_list_spec_F77='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_F77='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='' ;; m68k) archive_cmds_F77='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes allow_undefined_flag_F77="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs_F77=no fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes hardcode_direct_absolute_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes hardcode_direct_absolute_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: inherit_rpath_F77=yes link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no hardcode_direct_absolute_F77=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi archive_cmds_need_lc_F77='no' hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds_F77='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-R,$libdir' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec_F77='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 $as_echo "$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no with_gnu_ld_F77=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 $as_echo "$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || test -n "$runpath_var_F77" || test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 $as_echo "$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink || test "$inherit_rpath_F77" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 $as_echo_n "checking how to get verbose linking output from $F77... " >&6; } if test "${ac_cv_prog_f77_v+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get # "verbose" output that we can then parse for the Fortran linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift $as_echo "$as_me:$LINENO: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="` $as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented # and (ugh) tested at some point. case $ac_f77_v_output in # If we are using xlf then replace all the commas with spaces. *xlfentry*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted # $LIBS confuse us, and the libraries appear later in the output anyway). *mGLOB_options_string*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; # Portland Group compiler has singly- or doubly-quoted -cmdline argument # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". *-cmdline\ * | *-ignore\ * | *-def\ *) ac_f77_v_output=`echo $ac_f77_v_output | sed "\ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; # If we are using Cray Fortran then delete quotes. *cft90*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; esac # look for -l* and *.a constructs in the output for ac_arg in $ac_f77_v_output; do case $ac_arg in [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) ac_cv_prog_f77_v=$ac_verb break 2 ;; esac done done if test -z "$ac_cv_prog_f77_v"; then { $as_echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 $as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: WARNING: compilation failed" >&5 $as_echo "$as_me: WARNING: compilation failed" >&2;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 $as_echo "$ac_cv_prog_f77_v" >&6; } { $as_echo "$as_me:$LINENO: checking for Fortran 77 libraries of $F77" >&5 $as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } if test "${ac_cv_f77_libs+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get # "verbose" output that we can then parse for the Fortran linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift $as_echo "$as_me:$LINENO: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="` $as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented # and (ugh) tested at some point. case $ac_f77_v_output in # If we are using xlf then replace all the commas with spaces. *xlfentry*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted # $LIBS confuse us, and the libraries appear later in the output anyway). *mGLOB_options_string*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; # Portland Group compiler has singly- or doubly-quoted -cmdline argument # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". *-cmdline\ * | *-ignore\ * | *-def\ *) ac_f77_v_output=`echo $ac_f77_v_output | sed "\ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; # If we are using Cray Fortran then delete quotes. *cft90*) ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; esac ac_cv_f77_libs= # Save positional arguments (if any) ac_save_positional="$@" set X $ac_f77_v_output while test $# != 1; do shift ac_arg=$1 case $ac_arg in [\\/]*.a | ?:[\\/]*.a) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -bI:*) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi fi ;; # Ignore these flags. -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -LANG:=* | -LIST:* | -LNO:*) ;; -lkernel32) test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; -[LRuYz]) # These flags, when seen by themselves, take an argument. # We remove the space between option and argument and re-iterate # unless we find an empty arg or a new option (starting with -) case $2 in "" | -*);; *) ac_arg="$ac_arg$2" shift; shift set X $ac_arg "$@" ;; esac ;; -YP,*) for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi done ;; -[lLR]*) ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; # Ignore everything else. esac done # restore positional arguments set X $ac_save_positional; shift # We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, # then we insist that the "run path" must be an absolute path (i.e. it # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) ac_ld_run_path=`$as_echo "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_ld_run_path; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done else ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path" fi ;; esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi { $as_echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5 $as_echo "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:$LINENO: checking for dummy main to link with Fortran 77 libraries" >&5 $as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } if test "${ac_cv_f77_dummy_main+set}" = set; then $as_echo_n "(cached) " >&6 else ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # First, try linking without a dummy main: cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_fortran_dummy_main=none else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_fortran_dummy_main=unknown fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define $ac_fortran_dm_var $ac_func #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_fortran_dummy_main=$ac_func; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main rm -rf conftest* LIBS=$ac_f77_dm_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5 $as_echo "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main if test "$F77_DUMMY_MAIN" != unknown; then if test $F77_DUMMY_MAIN != none; then cat >>confdefs.h <<_ACEOF #define F77_DUMMY_MAIN $F77_DUMMY_MAIN _ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then cat >>confdefs.h <<\_ACEOF #define FC_DUMMY_MAIN_EQ_F77 1 _ACEOF fi fi else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails See \`config.log' for more details." >&5 $as_echo "$as_me: error: linking to Fortran libraries from C fails See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu { $as_echo "$as_me:$LINENO: checking for Fortran 77 name-mangling scheme" >&5 $as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } if test "${ac_cv_f77_mangling+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF subroutine foobar() return end subroutine foo_bar() return end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS LIBS="cfortran_test.$ac_objext $LIBS $FLIBS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_success=no for ac_foobar in foobar FOOBAR; do for ac_underscore in "" "_"; do ac_func="$ac_foobar$ac_underscore" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_success=yes; break 2 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done done ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$ac_success" = "yes"; then case $ac_foobar in foobar) ac_case=lower ac_foo_bar=foo_bar ;; FOOBAR) ac_case=upper ac_foo_bar=FOO_BAR ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_success_extra=no for ac_extra in "" "_"; do ac_func="$ac_foo_bar$ac_underscore$ac_extra" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_success_extra=yes; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "$ac_success_extra" = "yes"; then ac_cv_f77_mangling="$ac_case case" if test -z "$ac_underscore"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore" fi if test -z "$ac_extra"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore" fi else ac_cv_f77_mangling="unknown" fi else ac_cv_f77_mangling="unknown" fi LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compile a simple Fortran program See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compile a simple Fortran program See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5 $as_echo "$ac_cv_f77_mangling" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name _ACEOF ;; "lower case, no underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name ## _ _ACEOF ;; "lower case, underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name ## _ _ACEOF ;; "lower case, underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name ## __ _ACEOF ;; "upper case, no underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME _ACEOF ;; "upper case, no underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME ## _ _ACEOF ;; "upper case, underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME ## _ _ACEOF ;; "upper case, underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME ## __ _ACEOF ;; *) { $as_echo "$as_me:$LINENO: WARNING: unknown Fortran name-mangling scheme" >&5 $as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu acx_blas_ok=no # Check whether --with-blas was given. if test "${with_blas+set}" = set; then withval=$with_blas; fi case $with_blas in yes | "") ;; no) acx_blas_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; *) BLAS_LIBS="-l$with_blas" ;; esac # Get fortran linker names of BLAS functions to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="SGEMM" ;; lower*) ac_val="sgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac sgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DGEMM" ;; lower*) ac_val="dgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac dgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu acx_blas_save_LIBS="$LIBS" LIBS="$LIBS $FLIBS" # First, check BLAS_LIBS environment variable if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" { $as_echo "$as_me:$LINENO: checking for $sgemm in $BLAS_LIBS" >&5 $as_echo_n "checking for $sgemm in $BLAS_LIBS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then acx_blas_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 BLAS_LIBS="" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $acx_blas_ok" >&5 $as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm" >&5 $as_echo_n "checking for $sgemm... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $sgemm to an innocuous variant, in case declares $sgemm. For example, HP-UX 11i declares gettimeofday. */ #define $sgemm innocuous_$sgemm /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $sgemm (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $sgemm /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$sgemm || defined __stub___$sgemm choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes fi LIBS="$save_LIBS" fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then { $as_echo "$as_me:$LINENO: checking for ATL_xerbla in -latlas" >&5 $as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } if test "${ac_cv_lib_atlas_ATL_xerbla+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ATL_xerbla (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return ATL_xerbla (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_atlas_ATL_xerbla=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_atlas_ATL_xerbla=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 $as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } if test "x$ac_cv_lib_atlas_ATL_xerbla" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lf77blas" >&5 $as_echo_n "checking for $sgemm in -lf77blas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return cblas_dgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_cblas_cblas_dgemm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cblas_cblas_dgemm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi fi fi fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_dgemm_$dgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $dgemm in -ldgemm" >&5 $as_echo_n "checking for $dgemm in -ldgemm... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldgemm -lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $dgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_sgemm_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lsgemm" >&5 $as_echo_n "checking for $sgemm in -lsgemm... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsgemm -lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas" fi fi fi fi # BLAS in Intel MKL library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_mkl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lmkl" >&5 $as_echo_n "checking for $sgemm in -lmkl... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-lmkl" fi fi # BLAS in Apple vecLib library? if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm" >&5 $as_echo_n "checking for $sgemm... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $sgemm to an innocuous variant, in case declares $sgemm. For example, HP-UX 11i declares gettimeofday. */ #define $sgemm innocuous_$sgemm /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $sgemm (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $sgemm /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$sgemm || defined __stub___$sgemm choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-framework vecLib" fi LIBS="$save_LIBS" fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lcxml" >&5 $as_echo_n "checking for $sgemm in -lcxml... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -ldxml" >&5 $as_echo_n "checking for $sgemm in -ldxml... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC { $as_echo "$as_me:$LINENO: checking for acosp in -lsunmath" >&5 $as_echo_n "checking for acosp in -lsunmath... " >&6; } if test "${ac_cv_lib_sunmath_acosp+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char acosp (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return acosp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_sunmath_acosp=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_sunmath_acosp=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_acosp" >&5 $as_echo "$ac_cv_lib_sunmath_acosp" >&6; } if test "x$ac_cv_lib_sunmath_acosp" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lsunperf" >&5 $as_echo_n "checking for $sgemm in -lsunperf... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi fi fi fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_scs_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lscs" >&5 $as_echo_n "checking for $sgemm in -lscs... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lscs" fi fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lcomplib.sgimath" >&5 $as_echo_n "checking for $sgemm in -lcomplib.sgimath... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_essl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lessl" >&5 $as_echo_n "checking for $sgemm in -lessl... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi fi fi # Generic BLAS library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lblas" fi fi LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_BLAS 1 _ACEOF : else acx_blas_ok=no fi acx_lapack_ok=no # Check whether --with-lapack was given. if test "${with_lapack+set}" = set; then withval=$with_lapack; fi case $with_lapack in yes | "") ;; no) acx_lapack_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; *) LAPACK_LIBS="-l$with_lapack" ;; esac # Get fortran linker name of LAPACK function to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="CHEEV" ;; lower*) ac_val="cheev" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cheev="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # We cannot use LAPACK if BLAS is not found if test "x$acx_blas_ok" != xyes; then acx_lapack_ok=noblas fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" { $as_echo "$as_me:$LINENO: checking for $cheev in $LAPACK_LIBS" >&5 $as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then acx_lapack_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LAPACK_LIBS="" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $acx_lapack_ok" >&5 $as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" fi fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $cheev" >&5 $as_echo_n "checking for $cheev... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $cheev to an innocuous variant, in case declares $cheev. For example, HP-UX 11i declares gettimeofday. */ #define $cheev innocuous_$cheev /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $cheev (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $cheev /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$cheev || defined __stub___$cheev choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_lapack_ok=yes fi LIBS="$save_LIBS" fi # Generic LAPACK library? for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $cheev in -l$lapack" >&5 $as_echo_n "checking for $cheev in -l$lapack... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi LIBS="$save_LIBS" fi done # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LAPACK 1 _ACEOF : else acx_lapack_ok=no { $as_echo "$as_me:$LINENO: WARNING: BLAS/LAPACK needed for harminv" >&5 $as_echo "$as_me: WARNING: BLAS/LAPACK needed for harminv" >&2;} fi save_CC=$CC CC=$CXX # harminv test must use $CXX since harminv may be a C++ lib # just use lapack/blas in default libs since we always need them { $as_echo "$as_me:$LINENO: checking for harminv_get_freq_error in -lharminv" >&5 $as_echo_n "checking for harminv_get_freq_error in -lharminv... " >&6; } if test "${ac_cv_lib_harminv_harminv_get_freq_error+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lharminv $LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char harminv_get_freq_error (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return harminv_get_freq_error (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_harminv_harminv_get_freq_error=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_harminv_harminv_get_freq_error=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_harminv_harminv_get_freq_error" >&5 $as_echo "$ac_cv_lib_harminv_harminv_get_freq_error" >&6; } if test "x$ac_cv_lib_harminv_harminv_get_freq_error" = x""yes; then have_harminv=yes; LIBS="-lharminv $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" else { $as_echo "$as_me:$LINENO: WARNING: harminv support is disabled" >&5 $as_echo "$as_me: WARNING: harminv support is disabled" >&2;} fi CC=$save_CC fi if test $have_harminv = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_HARMINV 1 _ACEOF fi ########################################################################### # MPB library if test "${ac_cv_header_mpb_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for mpb.h" >&5 $as_echo_n "checking for mpb.h... " >&6; } if test "${ac_cv_header_mpb_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_mpb_h" >&5 $as_echo "$ac_cv_header_mpb_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking mpb.h usability" >&5 $as_echo_n "checking mpb.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking mpb.h presence" >&5 $as_echo_n "checking mpb.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: mpb.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: mpb.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: mpb.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: mpb.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: mpb.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: mpb.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: mpb.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: mpb.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: mpb.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: mpb.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: mpb.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: mpb.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: mpb.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: mpb.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: mpb.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: mpb.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to meep@ab-initio.mit.edu ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for mpb.h" >&5 $as_echo_n "checking for mpb.h... " >&6; } if test "${ac_cv_header_mpb_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_mpb_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_mpb_h" >&5 $as_echo "$ac_cv_header_mpb_h" >&6; } fi if test "x$ac_cv_header_mpb_h" = x""yes; then have_mpb=maybe else have_mpb=no fi if test $have_mpb = maybe; then if test "x$acx_lapack_ok" = x -a "$have_harminv" = xno; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name _ACEOF ;; "lower case, no underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name ## _ _ACEOF ;; "lower case, underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name ## _ _ACEOF ;; "lower case, underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name ## __ _ACEOF ;; "upper case, no underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME _ACEOF ;; "upper case, no underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME ## _ _ACEOF ;; "upper case, underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME ## _ _ACEOF ;; "upper case, underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME ## __ _ACEOF ;; *) { $as_echo "$as_me:$LINENO: WARNING: unknown Fortran name-mangling scheme" >&5 $as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu acx_blas_ok=no # Check whether --with-blas was given. if test "${with_blas+set}" = set; then withval=$with_blas; fi case $with_blas in yes | "") ;; no) acx_blas_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; *) BLAS_LIBS="-l$with_blas" ;; esac # Get fortran linker names of BLAS functions to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="SGEMM" ;; lower*) ac_val="sgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac sgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="DGEMM" ;; lower*) ac_val="dgemm" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac dgemm="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu acx_blas_save_LIBS="$LIBS" LIBS="$LIBS $FLIBS" # First, check BLAS_LIBS environment variable if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" { $as_echo "$as_me:$LINENO: checking for $sgemm in $BLAS_LIBS" >&5 $as_echo_n "checking for $sgemm in $BLAS_LIBS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then acx_blas_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 BLAS_LIBS="" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $acx_blas_ok" >&5 $as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm" >&5 $as_echo_n "checking for $sgemm... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $sgemm to an innocuous variant, in case declares $sgemm. For example, HP-UX 11i declares gettimeofday. */ #define $sgemm innocuous_$sgemm /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $sgemm (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $sgemm /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$sgemm || defined __stub___$sgemm choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes fi LIBS="$save_LIBS" fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then { $as_echo "$as_me:$LINENO: checking for ATL_xerbla in -latlas" >&5 $as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } if test "${ac_cv_lib_atlas_ATL_xerbla+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ATL_xerbla (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return ATL_xerbla (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_atlas_ATL_xerbla=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_atlas_ATL_xerbla=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 $as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } if test "x$ac_cv_lib_atlas_ATL_xerbla" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lf77blas" >&5 $as_echo_n "checking for $sgemm in -lf77blas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return cblas_dgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_cblas_cblas_dgemm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cblas_cblas_dgemm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi fi fi fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_dgemm_$dgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $dgemm in -ldgemm" >&5 $as_echo_n "checking for $dgemm in -ldgemm... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldgemm -lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $dgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $dgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_sgemm_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lsgemm" >&5 $as_echo_n "checking for $sgemm in -lsgemm... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsgemm -lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas" fi fi fi fi # BLAS in Intel MKL library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_mkl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lmkl" >&5 $as_echo_n "checking for $sgemm in -lmkl... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-lmkl" fi fi # BLAS in Apple vecLib library? if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" as_ac_var=`$as_echo "ac_cv_func_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm" >&5 $as_echo_n "checking for $sgemm... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $sgemm to an innocuous variant, in case declares $sgemm. For example, HP-UX 11i declares gettimeofday. */ #define $sgemm innocuous_$sgemm /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $sgemm (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $sgemm /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$sgemm || defined __stub___$sgemm choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-framework vecLib" fi LIBS="$save_LIBS" fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lcxml" >&5 $as_echo_n "checking for $sgemm in -lcxml... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -ldxml" >&5 $as_echo_n "checking for $sgemm in -ldxml... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC { $as_echo "$as_me:$LINENO: checking for acosp in -lsunmath" >&5 $as_echo_n "checking for acosp in -lsunmath... " >&6; } if test "${ac_cv_lib_sunmath_acosp+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char acosp (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return acosp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_sunmath_acosp=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_sunmath_acosp=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_acosp" >&5 $as_echo "$ac_cv_lib_sunmath_acosp" >&6; } if test "x$ac_cv_lib_sunmath_acosp" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lsunperf" >&5 $as_echo_n "checking for $sgemm in -lsunperf... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi fi fi fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_scs_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lscs" >&5 $as_echo_n "checking for $sgemm in -lscs... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lscs" fi fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lcomplib.sgimath" >&5 $as_echo_n "checking for $sgemm in -lcomplib.sgimath... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then as_ac_Lib=`$as_echo "ac_cv_lib_essl_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lessl" >&5 $as_echo_n "checking for $sgemm in -lessl... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi fi fi # Generic BLAS library? if test $acx_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $sgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $sgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lblas" fi fi LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_BLAS 1 _ACEOF : else acx_blas_ok=no fi acx_lapack_ok=no # Check whether --with-lapack was given. if test "${with_lapack+set}" = set; then withval=$with_lapack; fi case $with_lapack in yes | "") ;; no) acx_lapack_ok=disable ;; -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; *) LAPACK_LIBS="-l$with_lapack" ;; esac # Get fortran linker name of LAPACK function to check for. ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in upper*) ac_val="CHEEV" ;; lower*) ac_val="cheev" ;; *) ac_val="unknown" ;; esac case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac cheev="$ac_val" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # We cannot use LAPACK if BLAS is not found if test "x$acx_blas_ok" != xyes; then acx_lapack_ok=noblas fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" { $as_echo "$as_me:$LINENO: checking for $cheev in $LAPACK_LIBS" >&5 $as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then acx_lapack_ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LAPACK_LIBS="" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $acx_lapack_ok" >&5 $as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" fi fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $cheev" >&5 $as_echo_n "checking for $cheev... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $cheev to an innocuous variant, in case declares $cheev. For example, HP-UX 11i declares gettimeofday. */ #define $cheev innocuous_$cheev /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $cheev (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $cheev /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$cheev || defined __stub___$cheev choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_lapack_ok=yes fi LIBS="$save_LIBS" fi # Generic LAPACK library? for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $cheev in -l$lapack" >&5 $as_echo_n "checking for $cheev in -l$lapack... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $cheev (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $cheev (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi LIBS="$save_LIBS" fi done # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LAPACK 1 _ACEOF : else acx_lapack_ok=no { $as_echo "$as_me:$LINENO: WARNING: BLAS/LAPACK needed for MPB" >&5 $as_echo "$as_me: WARNING: BLAS/LAPACK needed for MPB" >&2;} fi fi { $as_echo "$as_me:$LINENO: checking for maxwell_target_operator1 in -lmpb" >&5 $as_echo_n "checking for maxwell_target_operator1 in -lmpb... " >&6; } if test "${ac_cv_lib_mpb_maxwell_target_operator1+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpb $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char maxwell_target_operator1 (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return maxwell_target_operator1 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_mpb_maxwell_target_operator1=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpb_maxwell_target_operator1=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpb_maxwell_target_operator1" >&5 $as_echo "$ac_cv_lib_mpb_maxwell_target_operator1" >&6; } if test "x$ac_cv_lib_mpb_maxwell_target_operator1" = x""yes; then have_mpb=yes; LIBS="-lmpb $LIBS" else { $as_echo "$as_me:$LINENO: checking for maxwell_target_operator1 in -lmpb" >&5 $as_echo_n "checking for maxwell_target_operator1 in -lmpb... " >&6; } if test "${ac_cv_lib_mpb_maxwell_target_operator1+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpb $LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char maxwell_target_operator1 (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return maxwell_target_operator1 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_mpb_maxwell_target_operator1=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpb_maxwell_target_operator1=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpb_maxwell_target_operator1" >&5 $as_echo "$ac_cv_lib_mpb_maxwell_target_operator1" >&6; } if test "x$ac_cv_lib_mpb_maxwell_target_operator1" = x""yes; then have_mpb=yes; LIBS="-lmpb $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" else { $as_echo "$as_me:$LINENO: WARNING: MPB support is disabled" >&5 $as_echo "$as_me: WARNING: MPB support is disabled" >&2;} fi fi if test $have_mpb = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MPB 1 _ACEOF fi fi ############################################################################## # GNU Scientific Library { $as_echo "$as_me:$LINENO: checking for cblas_cgemm" >&5 $as_echo_n "checking for cblas_cgemm... " >&6; } if test "${ac_cv_func_cblas_cgemm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define cblas_cgemm to an innocuous variant, in case declares cblas_cgemm. For example, HP-UX 11i declares gettimeofday. */ #define cblas_cgemm innocuous_cblas_cgemm /* System header to define __stub macros and hopefully few prototypes, which can conflict with char cblas_cgemm (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef cblas_cgemm /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_cgemm (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_cblas_cgemm || defined __stub___cblas_cgemm choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return cblas_cgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_cblas_cgemm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_cblas_cgemm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_cblas_cgemm" >&5 $as_echo "$ac_cv_func_cblas_cgemm" >&6; } if test "x$ac_cv_func_cblas_cgemm" = x""yes; then : else { $as_echo "$as_me:$LINENO: checking for cblas_cgemm in -lgslcblas" >&5 $as_echo_n "checking for cblas_cgemm in -lgslcblas... " >&6; } if test "${ac_cv_lib_gslcblas_cblas_cgemm+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgslcblas $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_cgemm (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return cblas_cgemm (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gslcblas_cblas_cgemm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gslcblas_cblas_cgemm=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gslcblas_cblas_cgemm" >&5 $as_echo "$ac_cv_lib_gslcblas_cblas_cgemm" >&6; } if test "x$ac_cv_lib_gslcblas_cblas_cgemm" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSLCBLAS 1 _ACEOF LIBS="-lgslcblas $LIBS" fi fi { $as_echo "$as_me:$LINENO: checking for gsl_sf_bessel_Jn in -lgsl" >&5 $as_echo_n "checking for gsl_sf_bessel_Jn in -lgsl... " >&6; } if test "${ac_cv_lib_gsl_gsl_sf_bessel_Jn+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gsl_sf_bessel_Jn (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gsl_sf_bessel_Jn (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gsl_gsl_sf_bessel_Jn=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gsl_gsl_sf_bessel_Jn=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gsl_gsl_sf_bessel_Jn" >&5 $as_echo "$ac_cv_lib_gsl_gsl_sf_bessel_Jn" >&6; } if test "x$ac_cv_lib_gsl_gsl_sf_bessel_Jn" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSL 1 _ACEOF LIBS="-lgsl $LIBS" else { $as_echo "$as_me:$LINENO: WARNING: Missing GNU GSL library...Bessel-function field initialization will not be supported." >&5 $as_echo "$as_me: WARNING: Missing GNU GSL library...Bessel-function field initialization will not be supported." >&2;} fi ############################################################################## # Check for HDF5 library # Check whether --with-hdf5 was given. if test "${with_hdf5+set}" = set; then withval=$with_hdf5; ok=$withval else ok=yes fi if test "$ok" = "yes"; then { $as_echo "$as_me:$LINENO: checking for deflate in -lz" >&5 $as_echo_n "checking for deflate in -lz... " >&6; } if test "${ac_cv_lib_z_deflate+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return deflate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_z_deflate=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_deflate=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 $as_echo "$ac_cv_lib_z_deflate" >&6; } if test "x$ac_cv_lib_z_deflate" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBZ 1 _ACEOF LIBS="-lz $LIBS" else { $as_echo "$as_me:$LINENO: WARNING: zlib is required for HDF5!" >&5 $as_echo "$as_me: WARNING: zlib is required for HDF5!" >&2;} fi save_CC=$CC if test "x$with_mpi" = "xyes"; then CC=$MPICXX fi save_LIBS_0="$LIBS" # save, to check later if we found any library { $as_echo "$as_me:$LINENO: checking for H5Pcreate in -lhdf5" >&5 $as_echo_n "checking for H5Pcreate in -lhdf5... " >&6; } if test "${ac_cv_lib_hdf5_H5Pcreate+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhdf5 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char H5Pcreate (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return H5Pcreate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_hdf5_H5Pcreate=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_hdf5_H5Pcreate=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hdf5_H5Pcreate" >&5 $as_echo "$ac_cv_lib_hdf5_H5Pcreate" >&6; } if test "x$ac_cv_lib_hdf5_H5Pcreate" = x""yes; then for ac_header in hdf5.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to meep@ab-initio.mit.edu ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF LIBS="-lhdf5 $LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_HDF5 1 _ACEOF fi done fi if test x"$save_LIBS_0" = x"$LIBS"; then { $as_echo "$as_me:$LINENO: WARNING: Couldn't find the HDF5 library!! Switching to --without-hdf5." >&5 $as_echo "$as_me: WARNING: Couldn't find the HDF5 library!! Switching to --without-hdf5." >&2;} fi CC=$save_CC if test "x$with_mpi" = "xyes"; then for ac_func in H5Pset_mpi H5Pset_fapl_mpio do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi fi ############################################################################## # Figure out the number of processors so we can quickly build the docs and # run the tests... (FIXME: use more standard autoconf macros) RUNCODE="" if test "x$with_mpi" = "xyes"; then cat > test_num_processors.c < #include #include int main() { long nprocs; nprocs = sysconf(_SC_NPROCESSORS_ONLN); if (nprocs < 1) nprocs = 1; printf ("%ld\n",nprocs); exit (EXIT_SUCCESS); } MYEOF $CC -o test_num_processors test_num_processors.c NUMPROCS=`./test_num_processors` rm -f test_num_processors test_num_processors.c echo Looks like we have got "$NUMPROCS" processors RUNCODE="mpirun -np $NUMPROCS" fi ############################################################################## # Libraries and flags (other than -lmeep) required to link Meep: MEEPLIBS="$LDFLAGS $LIBS" ############################################################################## # subsequent libraries are only for libctl front end meep_save_LIBS=$LIBS # Check whether --with-libctl was given. if test "${with_libctl+set}" = set; then withval=$with_libctl; with_libctl=$withval else with_libctl=yes fi if test "x$with_libctl" = "xno"; then : elif test "x$with_libctl" != "xyes"; then LIBCTL_DIR="$with_libctl" fi if test "x$with_libctl" != xno; then WITH_LIBCTL_TRUE= WITH_LIBCTL_FALSE='#' else WITH_LIBCTL_TRUE='#' WITH_LIBCTL_FALSE= fi ############################################################################## # Check for Guile library and its behavior (for libctl front end): if test "x$with_libctl" != xno; then # Extract the first word of "guile-config", so it can be a program name with args. set dummy guile-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_GUILE_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$GUILE_CONFIG"; then ac_cv_prog_GUILE_CONFIG="$GUILE_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_GUILE_CONFIG="guile-config" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_GUILE_CONFIG" && ac_cv_prog_GUILE_CONFIG="unknown" fi fi GUILE_CONFIG=$ac_cv_prog_GUILE_CONFIG if test -n "$GUILE_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $GUILE_CONFIG" >&5 $as_echo "$GUILE_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$GUILE_CONFIG" = "xunknown"; then { $as_echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if test "${ac_cv_lib_readline_readline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return readline (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_readline_readline=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_readline=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBREADLINE 1 _ACEOF LIBS="-lreadline $LIBS" fi { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi { $as_echo "$as_me:$LINENO: checking for scm_lt_dlinit in -lguile-ltdl" >&5 $as_echo_n "checking for scm_lt_dlinit in -lguile-ltdl... " >&6; } if test "${ac_cv_lib_guile_ltdl_scm_lt_dlinit+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lguile-ltdl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char scm_lt_dlinit (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return scm_lt_dlinit (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_guile_ltdl_scm_lt_dlinit=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_guile_ltdl_scm_lt_dlinit=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_guile_ltdl_scm_lt_dlinit" >&5 $as_echo "$ac_cv_lib_guile_ltdl_scm_lt_dlinit" >&6; } if test "x$ac_cv_lib_guile_ltdl_scm_lt_dlinit" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGUILE_LTDL 1 _ACEOF LIBS="-lguile-ltdl $LIBS" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lltdl" >&5 $as_echo_n "checking for dlopen in -lltdl... " >&6; } if test "${ac_cv_lib_ltdl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lltdl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_ltdl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ltdl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_dlopen" >&5 $as_echo "$ac_cv_lib_ltdl_dlopen" >&6; } if test "x$ac_cv_lib_ltdl_dlopen" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBLTDL 1 _ACEOF LIBS="-lltdl $LIBS" fi fi { $as_echo "$as_me:$LINENO: checking for gh_eval_str in -lguile" >&5 $as_echo_n "checking for gh_eval_str in -lguile... " >&6; } if test "${ac_cv_lib_guile_gh_eval_str+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lguile $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gh_eval_str (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gh_eval_str (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_guile_gh_eval_str=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_guile_gh_eval_str=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_guile_gh_eval_str" >&5 $as_echo "$ac_cv_lib_guile_gh_eval_str" >&6; } if test "x$ac_cv_lib_guile_gh_eval_str" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGUILE 1 _ACEOF LIBS="-lguile $LIBS" else { { $as_echo "$as_me:$LINENO: error: linking to guile failed" >&5 $as_echo "$as_me: error: linking to guile failed" >&2;} { (exit 1); exit 1; }; } fi else CPPFLAGS="$CPPFLAGS `$GUILE_CONFIG compile`" LIBS="`$GUILE_CONFIG link` $LIBS" { $as_echo "$as_me:$LINENO: checking if linking to guile works" >&5 $as_echo_n "checking if linking to guile works... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gh_enter (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return gh_enter (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:$LINENO: error: guile-config is broken" >&5 $as_echo "$as_me: error: guile-config is broken" >&2;} { (exit 1); exit 1; }; } fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # Check how smob types work in this Guile version: for ac_func in scm_make_smob_type do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for SCM_SMOB_PREDICATE" >&5 $as_echo_n "checking for SCM_SMOB_PREDICATE... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int x; SCM_SMOB_PREDICATE(1,x); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ok" >&5 $as_echo "$ok" >&6; } if test $ok = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SCM_SMOB_PREDICATE 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for SCM_SMOB_DATA" >&5 $as_echo_n "checking for SCM_SMOB_DATA... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int x; SCM_SMOB_DATA(x); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ok" >&5 $as_echo "$ok" >&6; } if test $ok = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SCM_SMOB_DATA 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for SCM_NEWSMOB" >&5 $as_echo_n "checking for SCM_NEWSMOB... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int x; SCM_NEWSMOB(x,1,0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ok=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ok" >&5 $as_echo "$ok" >&6; } if test $ok = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SCM_NEWSMOB 1 _ACEOF fi # Check how to activate Guile readline support: ACTIVATE_READLINE="" if test "x$cross_compiling" = xno; then { $as_echo "$as_me:$LINENO: checking how to activate readline in Guile" >&5 $as_echo_n "checking how to activate readline in Guile... " >&6; } ractivate="(use-modules (readline-activator)) (activate-readline)" if guile -c "$ractivate" > /dev/null 2>&1; then { $as_echo "$as_me:$LINENO: result: readline-activator" >&5 $as_echo "readline-activator" >&6; } ACTIVATE_READLINE="$ractivate" else ractivate="(use-modules (ice-9 readline)) (activate-readline)" if guile -c "$ractivate" >& /dev/null; then { $as_echo "$as_me:$LINENO: result: ice-9 readline" >&5 $as_echo "ice-9 readline" >&6; } ACTIVATE_READLINE="$ractivate" else { $as_echo "$as_me:$LINENO: result: cannot" >&5 $as_echo "cannot" >&6; } ACTIVATE_READLINE="" fi fi fi fi # if with_libctl ############################################################################## # Check for libctl library and files if test "x$with_libctl" != xno; then { $as_echo "$as_me:$LINENO: checking for libctl dir" >&5 $as_echo_n "checking for libctl dir... " >&6; } if test x != x"$LIBCTL_DIR" -a ! -r "$LIBCTL_DIR/base/ctl.scm"; then LIBCTL_DIR="" fi if test x = x"$LIBCTL_DIR" -a -r /usr/local/share/libctl/base/ctl.scm; then LIBCTL_DIR="/usr/local/share/libctl" fi if test x = x"$LIBCTL_DIR" -a -r /usr/share/libctl3/base/ctl.scm; then LIBCTL_DIR="/usr/share/libctl3" fi if test x = x"$LIBCTL_DIR" -a -r /usr/share/libctl/base/ctl.scm; then LIBCTL_DIR="/usr/share/libctl" fi if test x = x"$LIBCTL_DIR"; then { { $as_echo "$as_me:$LINENO: error: could not find libctl files; use --with-libctl=" >&5 $as_echo "$as_me: error: could not find libctl files; use --with-libctl=" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $LIBCTL_DIR" >&5 $as_echo "$LIBCTL_DIR" >&6; } for ac_prog in gen-ctl-io do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_GEN_CTL_IO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$GEN_CTL_IO"; then ac_cv_prog_GEN_CTL_IO="$GEN_CTL_IO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_GEN_CTL_IO="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi GEN_CTL_IO=$ac_cv_prog_GEN_CTL_IO if test -n "$GEN_CTL_IO"; then { $as_echo "$as_me:$LINENO: result: $GEN_CTL_IO" >&5 $as_echo "$GEN_CTL_IO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GEN_CTL_IO" && break done test -n "$GEN_CTL_IO" || GEN_CTL_IO="echo" if test x"$GEN_CTL_IO" = xecho; then { { $as_echo "$as_me:$LINENO: error: could not find gen-ctl-io program; check your PATH" >&5 $as_echo "$as_me: error: could not find gen-ctl-io program; check your PATH" >&2;} { (exit 1); exit 1; }; } fi # check for -lctl: { $as_echo "$as_me:$LINENO: checking for ctl_get_vector3 in -lctl" >&5 $as_echo_n "checking for ctl_get_vector3 in -lctl... " >&6; } if test "${ac_cv_lib_ctl_ctl_get_vector3+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lctl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ctl_get_vector3 (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return ctl_get_vector3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_ctl_ctl_get_vector3=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ctl_ctl_get_vector3=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ctl_ctl_get_vector3" >&5 $as_echo "$ac_cv_lib_ctl_ctl_get_vector3" >&6; } if test "x$ac_cv_lib_ctl_ctl_get_vector3" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBCTL 1 _ACEOF LIBS="-lctl $LIBS" else { { $as_echo "$as_me:$LINENO: error: Couldn't find the required libctl library." >&5 $as_echo "$as_me: error: Couldn't find the required libctl library." >&2;} { (exit 1); exit 1; }; } fi # check for ctl.h (Fedora puts it in /usr/include/ctl, grrr) CTL_H_CPPFLAG="" if test "${ac_cv_header_ctl_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for ctl.h" >&5 $as_echo_n "checking for ctl.h... " >&6; } if test "${ac_cv_header_ctl_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ctl_h" >&5 $as_echo "$ac_cv_header_ctl_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking ctl.h usability" >&5 $as_echo_n "checking ctl.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking ctl.h presence" >&5 $as_echo_n "checking ctl.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: ctl.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: ctl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ctl.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: ctl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: ctl.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: ctl.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ctl.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: ctl.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ctl.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: ctl.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ctl.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: ctl.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ctl.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: ctl.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: ctl.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: ctl.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to meep@ab-initio.mit.edu ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for ctl.h" >&5 $as_echo_n "checking for ctl.h... " >&6; } if test "${ac_cv_header_ctl_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_ctl_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ctl_h" >&5 $as_echo "$ac_cv_header_ctl_h" >&6; } fi if test "x$ac_cv_header_ctl_h" = x""yes; then CTL_H_CPPFLAG=" " else save_CPPFLAGS=$CPPFLAGS { $as_echo "$as_me:$LINENO: checking for alternate ctl.h location" >&5 $as_echo_n "checking for alternate ctl.h location... " >&6; } for ctl_h_path in /usr/include/ctl /usr/local/include/ctl; do CPPFLAGS="$save_CPPFLAGS -I$ctl_h_path" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then CTL_H_CPPFLAG=-I$ctl_h_path; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done { $as_echo "$as_me:$LINENO: result: $CTL_H_CPPFLAG" >&5 $as_echo "$CTL_H_CPPFLAG" >&6; } CPPFLAGS=$save_CPPFLAGS fi if test "x$CTL_H_CPPFLAG" = "x"; then { { $as_echo "$as_me:$LINENO: error: Couldn't find the ctl.h header file for libctl." >&5 $as_echo "$as_me: error: Couldn't find the ctl.h header file for libctl." >&2;} { (exit 1); exit 1; }; } fi # Check libctl version >= LIBCTL_MAJOR.LIBCTL_MINOR.LIBCTL_BUGFIX LIBCTL_MAJOR=3; LIBCTL_MINOR=0; LIBCTL_BUGFIX=3 { $as_echo "$as_me:$LINENO: checking whether libctl version is at least ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX}" >&5 $as_echo_n "checking whether libctl version is at least ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX}... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ [ #include #if LIBCTL_MAJOR_VERSION > $LIBCTL_MAJOR || (LIBCTL_MAJOR_VERSION == $LIBCTL_MAJOR && (LIBCTL_MINOR_VERSION > $LIBCTL_MINOR || (LIBCTL_MINOR_VERSION == $LIBCTL_MINOR && LIBCTL_BUGFIX_VERSION >= $LIBCTL_BUGFIX))) yes #endif ] _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } else { { $as_echo "$as_me:$LINENO: error: libctl version ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX} or later is required" >&5 $as_echo "$as_me: error: libctl version ${LIBCTL_MAJOR}.${LIBCTL_MINOR}.${LIBCTL_BUGFIX} or later is required" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest* # On IRIX, basename/dirname functions in libctl/main.c require -lgen { $as_echo "$as_me:$LINENO: checking for basename in -lgen" >&5 $as_echo_n "checking for basename in -lgen... " >&6; } if test "${ac_cv_lib_gen_basename+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgen $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char basename (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return basename (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gen_basename=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gen_basename=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_basename" >&5 $as_echo "$ac_cv_lib_gen_basename" >&6; } if test "x$ac_cv_lib_gen_basename" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGEN 1 _ACEOF LIBS="-lgen $LIBS" fi fi # if with_libctl ############################################################################## LIBCTL_LIBS=$LIBS LIBS=$meep_save_LIBS ############################################################################## # The following function is used only for debugging. Note that # we must test for it *after* setting the compiler flags (which # affect whether it is declared, as it is a GNU extension). # We need to #include because that somehow affects whether # the function is declared with older gcc versions. We need # to use AC_TRY_COMPILE because the test in AC_HAVE_DECL seems # to be optimized out. for ac_func in feenableexcept do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether feenableexcept declaration is usable" >&5 $as_echo_n "checking whether feenableexcept declaration is usable... " >&6; } feenableexcept_decl_ok=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #define _GNU_SOURCE 1 #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { feenableexcept(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_DECL_FEENABLEEXCEPT 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 feenableexcept_decl_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $feenableexcept_decl_ok" >&5 $as_echo "$feenableexcept_decl_ok" >&6; } ############################################################################## # See if we need to catch SIGFPE to avoid crashing on underflow exceptions # etcetera, since some stupid operating systems (e.g. Alpha/Tru64) crash on # SIGFPE by default. { $as_echo "$as_me:$LINENO: checking whether to catch and ignore SIGFPE signals" >&5 $as_echo_n "checking whether to catch and ignore SIGFPE signals... " >&6; } if test "$cross_compiling" = yes; then ignore_sigfpe=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { volatile double x=1,y=0; return x/y; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ignore_sigfpe=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ignore_sigfpe=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ignore_sigfpe" >&5 $as_echo "$ignore_sigfpe" >&6; } if test $ignore_sigfpe = yes; then cat >>confdefs.h <<\_ACEOF #define IGNORE_SIGFPE 1 _ACEOF fi ############################################################################## # Miscellaneous function and header checks { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi for ac_header in sys/time.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to meep@ab-initio.mit.edu ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in BSDgettimeofday gettimeofday cblas_ddot cblas_daxpy do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ############################################################################## # check for restrict keyword in C++ { $as_echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if test "${ac_cv_c_restrict+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_restrict=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) cat >>confdefs.h <<\_ACEOF #define restrict /**/ _ACEOF ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac # check for C99 _Pragma support, so that we can emit pragmas in macros cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { _Pragma("ivdep") ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF #define _Pragma /**/ _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ############################################################################## program_transform_name="s,_,-,g;$program_transform_name" ############################################################################## ac_config_files="$ac_config_files Makefile meep-pkgconfig src/Makefile tests/Makefile examples/Makefile libctl/Makefile libctl/meep.scm" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WITH_LIBCTL_TRUE}" && test -z "${WITH_LIBCTL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"WITH_LIBCTL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"WITH_LIBCTL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by meep $as_me 1.1.1, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ meep config.status 1.1.1 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' LD_F77='`$ECHO "X$LD_F77" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds_F77='`$ECHO "X$old_archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_F77='`$ECHO "X$compiler_F77" | $Xsed -e "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' GCC_F77='`$ECHO "X$GCC_F77" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_F77='`$ECHO "X$lt_prog_compiler_no_builtin_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl_F77='`$ECHO "X$lt_prog_compiler_wl_F77" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic_F77='`$ECHO "X$lt_prog_compiler_pic_F77" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static_F77='`$ECHO "X$lt_prog_compiler_static_F77" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_F77='`$ECHO "X$lt_cv_prog_compiler_c_o_F77" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc_F77='`$ECHO "X$archive_cmds_need_lc_F77" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_F77='`$ECHO "X$enable_shared_with_static_runtimes_F77" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec_F77='`$ECHO "X$export_dynamic_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec_F77='`$ECHO "X$whole_archive_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object_F77='`$ECHO "X$compiler_needs_object_F77" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds_F77='`$ECHO "X$old_archive_from_new_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_F77='`$ECHO "X$archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_cmds_F77='`$ECHO "X$module_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds_F77='`$ECHO "X$module_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld_F77='`$ECHO "X$with_gnu_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag_F77='`$ECHO "X$allow_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag_F77='`$ECHO "X$no_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_F77='`$ECHO "X$hardcode_libdir_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_F77='`$ECHO "X$hardcode_libdir_flag_spec_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator_F77='`$ECHO "X$hardcode_libdir_separator_F77" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_F77='`$ECHO "X$hardcode_direct_F77" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute_F77='`$ECHO "X$hardcode_direct_absolute_F77" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L_F77='`$ECHO "X$hardcode_minus_L_F77" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var_F77='`$ECHO "X$hardcode_shlibpath_var_F77" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic_F77='`$ECHO "X$hardcode_automatic_F77" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath_F77='`$ECHO "X$inherit_rpath_F77" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs_F77='`$ECHO "X$link_all_deplibs_F77" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path_F77='`$ECHO "X$fix_srcfile_path_F77" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols_F77='`$ECHO "X$always_export_symbols_F77" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds_F77='`$ECHO "X$export_symbols_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms_F77='`$ECHO "X$exclude_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms_F77='`$ECHO "X$include_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds_F77='`$ECHO "X$prelink_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec_F77='`$ECHO "X$file_list_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action_F77='`$ECHO "X$hardcode_action_F77" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs_F77='`$ECHO "X$compiler_lib_search_dirs_F77" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdeps_F77='`$ECHO "X$postdeps_F77" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path_F77='`$ECHO "X$compiler_lib_search_path_F77" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ LD_F77 \ compiler_CXX \ compiler_F77 \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_no_builtin_flag_F77 \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_CXX \ lt_prog_compiler_static_F77 \ lt_cv_prog_compiler_c_o_CXX \ lt_cv_prog_compiler_c_o_F77 \ export_dynamic_flag_spec_CXX \ export_dynamic_flag_spec_F77 \ whole_archive_flag_spec_CXX \ whole_archive_flag_spec_F77 \ compiler_needs_object_CXX \ compiler_needs_object_F77 \ with_gnu_ld_CXX \ with_gnu_ld_F77 \ allow_undefined_flag_CXX \ allow_undefined_flag_F77 \ no_undefined_flag_CXX \ no_undefined_flag_F77 \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_CXX \ hardcode_libdir_separator_F77 \ fix_srcfile_path_CXX \ fix_srcfile_path_F77 \ exclude_expsyms_CXX \ exclude_expsyms_F77 \ include_expsyms_CXX \ include_expsyms_F77 \ file_list_spec_CXX \ file_list_spec_F77 \ compiler_lib_search_dirs_CXX \ compiler_lib_search_dirs_F77 \ predep_objects_CXX \ predep_objects_F77 \ postdep_objects_CXX \ postdep_objects_F77 \ predeps_CXX \ predeps_F77 \ postdeps_CXX \ postdeps_F77 \ compiler_lib_search_path_CXX \ compiler_lib_search_path_F77; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ old_archive_cmds_CXX \ old_archive_cmds_F77 \ old_archive_from_new_cmds_CXX \ old_archive_from_new_cmds_F77 \ old_archive_from_expsyms_cmds_CXX \ old_archive_from_expsyms_cmds_F77 \ archive_cmds_CXX \ archive_cmds_F77 \ archive_expsym_cmds_CXX \ archive_expsym_cmds_F77 \ module_cmds_CXX \ module_cmds_F77 \ module_expsym_cmds_CXX \ module_expsym_cmds_F77 \ export_symbols_cmds_CXX \ export_symbols_cmds_F77 \ prelink_cmds_CXX \ prelink_cmds_F77; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "meep-pkgconfig") CONFIG_FILES="$CONFIG_FILES meep-pkgconfig" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "libctl/Makefile") CONFIG_FILES="$CONFIG_FILES libctl/Makefile" ;; "libctl/meep.scm") CONFIG_FILES="$CONFIG_FILES libctl/meep.scm" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX F77 " # ### BEGIN LIBTOOL CONFIG # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: F77 # The linker used to build libraries. LD=$lt_LD_F77 # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_F77 # A language specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU compiler? with_gcc=$GCC_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_F77 # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_F77 # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_F77 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_F77 # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_F77 # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path_F77 # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_F77 # Specify filename containing input files. file_list_spec=$lt_file_list_spec_F77 # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_F77 postdep_objects=$lt_postdep_objects_F77 predeps=$lt_predeps_F77 postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # ### END LIBTOOL TAG CONFIG: F77 _LT_EOF ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi meep-openmpi-1.1.1/config.sub0000755000175200017520000010224011204551150015313 0ustar debiandebian#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2009-04-17' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: meep-openmpi-1.1.1/NEWS0000644000175200017520000002642211244566766014065 0ustar debiandebianMeep 1.1.1 (24 August 2009) * Fixed release bug preventing Casimir calculation from running. Meep 1.1 (20 August 2009) * Meep's PML is now a true PML for arbitrary anisotropic, dispersive, and conducting media. (Now uses a slightly unconventional reformulation of PML described at ab-initio.mit.edu/meep/pml-meep.pdf) * Fixed bug which caused anisotropic non-diagonal mu to be unstable. * Fix compilation failure with gcc 4.4 due to missing cstdio header (thanks to Linran Fan and Bin Shao for the bug reports). * C++ interface: volume was renamed to grid_volume and geometric_volume was renamed to volume, to better reflect their respective roles. * Added accurate-fields-near-cylorigin? option to have more accurate fields near the r=0 origin for large m in cylindrical coordinates, at the expense of requiring a smaller Courant factor. (Default is false, corresponding to behavior in older Meep versions.) * In 2d computational cells, added much more efficient support for exp(ikz) z-dependence, enabled by new special-kz? input variable (default is false since it only works in 2d and is a little subtle for real fields). * Includes preliminary new features to aid in computation of optical forces (both classical and quantum Casimir forces); further documentation pending more testing. * Removed obsolete doc directory (all documentation is on the website these days). * Small performance improvements in Lorentzian dispersion handling. * Fix configure script failure when cross-compiling. * Fix compilation failure with MPICH. Meep 1.0.3 (5 June 2009) * Allow GUILE_CONFIG environment variable to override location of guile-config program in configure script; this is useful when cross-compiling. Meep 1.0.2 (2 June 2009) * Correct superficial 'make check' failure on 32-bit x86 machines with gcc 4.3.x, due to slight impact on floating-point rounding by automatic SSE/SSE2 vectorization; thanks to Silviu Popescu for the bug report. * Correct superficial 'make check' failure when compiling under icc. Meep 1.0.1 (28 May 2009) * Enable correct operation and passed test suite when MEEP_SINGLE (single-precision) mode is enabled in meep.hpp; thanks to Seyoon Kim for the bug reports. * Use new automake features to have less-verbose build output by default (you can build in verbose mode by 'make V=1'), and running all test programs then reporting which ones failed instead of stopping at the first failure. * Fix superficial failure in 2D_convergence test under gcc 3.4.6; thanks to Alex Prengel for the bug report. * Fix failure in flux test under gcc 4.3.1 in some cases; thanks to Alex Prengel for the bug report. * Fix compilation problem with gcc 4.4, correcting Debian bug #505002. Meep 1.0 (28 April 2009) * New timestepping scheme for off-diagonal anisotropic epsilon and mu, based on technique by Werner and Cary [ J. Comp. Phys. 226, 1085 (2007) ], that improves FDTD stability when anisotropy is present (such as when subpixel averaging is used on isotropic media). * Scheme user interface now supports user-specified anisotropic (real-symmetric) epsilon and mu (via epsilon-diag, epsilon-offdiag, mu-diag, and mu-offdiag parameters, similar to MPB). Accurate subpixel averaging of anisotropic media based on the method by Kottke, Farjadpour, & Johnson [ Phys. Rev. E. 77, 036611 (2008) ]. * Anisotropic dispersive materials are now supported, although currently the dispersive part of the epsilon/mu tensor must be diagonal, via the new sigma-diag parameter of polarizability. (The corresponding C++ interface has also removed delta_epsilon.) * The delta-epsilon parameter of polarizability has been removed; you should use sigma instead. * New fields::integrate2 function (and corresponding Scheme function integrate2-field-function) to perform integrations involving two simulations with the same computational cell (e.g. field-overlap calculations for coupled-mode theory). * In the Scheme interface, subpixel averaging is not used for user-specified material-function types; you only get subpixel averaging for the standard shapes (blocks, cylinders, etcetera). * Haskell code-generation is no longer used, and hsrc directory is removed. Bitrotted and undocumented (hence unused) saturable-absorber feature has been removed, along with energy-saturation parameter of polarizability. * Some bug-fixes to test programs that made them overly sensitive to roundoff errors and possibly fail depending on the compiler. (New fields::round_time and meep-round-time functions to round times to single-precision, useful for robust time comparisons.) Meep 0.20.4 (17 March 2009) * Bug fix in cylindrical code, which caused it to blow up in some circumstances for nonzero m. * Bug fix: non-integrated sources with conductivity are now second-order accurate, thanks to Alejandro Rodriguez. * Bug fix in writing strings with parallel HDF5, thanks to Zheng Li for the bug report. * Check that PML parameters are sensible (e.g. that total PML thickness is no greater than cell thickness) to avoid common mistakes. * New extra-materials input variable, so that you no longer have to use "dummy objects" to specify the existence of some materials when using material-function types. Meep 0.20.3 (24 July 2008) * Fixed circular dependency in Makefile, which caused problems with some versions of make; thanks to Kaoru Narita for the bug report. Meep 0.20.2 (21 July 2008) * Fixed incompatibility with Guile 1.6.x or earlier; thanks to the bug report by Andreas Unger. Meep 0.20.1 (20 July 2008) * Improved handling of nested synchronized-magnetic calls. * Bug fix: parallel builds (make -j) should now work. * Bug fix: pkg-config file was incorrectly installed for MPI version; thanks to Majid Sodagar for the bug report. Meep 0.20 (19 July 2008) * Support for user-specified permeability (mu). Renamed "dielectric" to "medium" in libctl interface, new "mu" property and new output-bfield and output-mu functions, and new "Permeability" and "Bx" etc. field types. * Support for user-specified electric and/or magnetic conductivities. These are especially useful to add a desired dissipation loss (an imaginary part of epsilon/mu) in a narrow bandwidth, without messing around with Lorentzian dispersive materials. * Add predefined perfect-magnetic-conductor (mu = -infinity) material, along with perfect-electric-conductor (eps = -infinity). * Added synchronized-magnetic step function to allow step functions to run with the electric and magnetic fields synchronized in time to second-order accuracy. * New PML implementation (UPML instead of split-field), should have lower reflection in many cases. * User-specified PML profile and asymptotic reflection. * Internally, all timestepping code is now handwritten (and much shorter) rather than old verbose Haskell-generated code; this should make it easier to add new features. * Add support for non-integrated current sources, if the is-integrated? property of the current is set to false; this is now the default, to make handling of E and H sources more similar and intuitive. * Work with HDF5 1.8 (which previously would not compile unless you manually set a preprocessor flag, due to API changes). * Check for ctl.h in /usr/include/ctl/ctl.h (default in Fedora), and check for libctl in /usr/share/libctl3 (default in Debian & Ubuntu). * Bug fix: fixed relative phase of E and H sources (which were off from one another by half a timestep); thanks to M. Megens for bug report. * Bug fix: make sure h5 filenames have unique timestep for cases where dt is very small or very large. Meep 0.10.1 (13 Nov. 2007) * Bug fix in flux_in_box, which accidentally returned the flux multiplied by the number of processors, instead of the flux. * Bug fix in epsilon averaging for structures including metals (epsilon < 0), fixing an instability. * Bug fix in output-png when running in parallel (removing race condition). * Fixed bug that disabled subpixel averaging for dimensions=1 (thanks to Mischa Megens for the bug report). * Fixed bug that caused output-tot-pwr to stop Meep with an error message; thanks to Vyacheslav Sokolov for the bug report. * Make "at-every" step functions less susceptible to rounding errors; thanks to L. Le Guyader for the bug report. * Fixed bug in dispersive media that wasted memory on parallel machines (the polarization memory was not parallelized); thanks to J. L. Silva for the bug report. * Bug fix in output-png+h5, thanks to a report by Chad Husko. * Fixed several deadlocks that could occur when the parallel Meep is used with a serial HDF5 library (we continue to recommend using the parallel HDF5 library with parallel Meep, however). Thanks in part to Lingling Tang for his bug report. * For maintainer-mode, improved detection of Haskell package names; thanks to Liang Huo for the bug report. Meep 0.10 (21 Aug. 2006) * eps-averaging? is now turned on by default (in libctl interface), using much-improved algorithm by Ardavan Farjadpour. This greatly improves accuracy, and also allows continuous tuning of geometric parameters. (See our upcoming paper in Optics Lett., with a preprint linked on the web site.) New input variables subpixel-tol and subpixel-maxeval to control the accuracy of the subpixel averaging. * Support for chi2 (Pockels) as well as chi3 (Kerr) nonlinearities. * Symmetries no longer require the cell size to be an even number of pixels. Previously, Meep exited with an error in this case, whereas now it simply adds an extra pixel to the cell size as needed. * New with-prefix step function to allow you to use a different filename-prefix for selected outputs. * New feature for output-png: built-in shell variable $EPS that refers to the last-output epsilon .h5 file, which you can use to easily add dielectric contours/overlays to the field output image. * Added output-png+h5 function that outputs both .png and .h5 files. * New functions flux-in-box, electric-energy-in-box, magnetic-energy-in-box, and field-energy-in-box (convenience wrappers around C++ functions). * Bug fix in Kerr nonlinearity - chi3 was accidentally scaled by epsilon^4 factor. * Bug fix: if you specified three or more symmetries, at most two symmetries were used (ignoring the rest). * Bug fix in rotate2 symmetry, which wasn't working correctly. * Bug fix in add-flux for multiple flux regions, thanks to K. Choi. * Bug fix in harminv where it wouldn't allow you to call harminv more than once for the same run loop; thanks to Aristos Karalis. * Bug fix in save-flux/load-flux that prevented it from working properly without output directories, thanks to Karl Koch. * Fixed abort that sometimes occurred due to rounding when the source was the same width as the cell (thanks to G. J. Parker). * Fixed minor build problems on Cygwin, SGI, and other systems, thanks to Christopher Kang, Robyn Landers, Florencio Garcia, and others. Meep 0.9 (1 Apr. 2006) * Initial public release. meep-openmpi-1.1.1/ltmain.sh0000755000175200017520000073310411144147434015175 0ustar debiandebian# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION=2.2.6 TIMESTAMP="" package_revision=1.3012 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/usr/bin/grep -E"} : ${FGREP="/usr/bin/grep -F"} : ${GREP="/usr/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/opt/local/bin/gsed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 meep-openmpi-1.1.1/ChangeLog0000644000175200017520000114627511244567010015131 0ustar debiandebianMon Aug 24 15:46:01 EDT 2009 stevenj@alum.mit.edu * tentative 1.1.1 release date M ./NEWS -1 +1 Sat Aug 22 00:36:20 EDT 2009 stevenj@alum.mit.edu * whoops M ./tests/known_results.cpp -1 +1 Fri Aug 21 12:36:04 EDT 2009 stevenj@alum.mit.edu * forgot to change geometric-volume -> volume in casimir.scm M ./NEWS +4 M ./configure.ac -2 +2 M ./libctl/casimir.scm -15 +15 M ./tests/known_results.cpp -1 +1 Thu Aug 20 19:57:05 EDT 2009 stevenj@alum.mit.edu tagged meep-1.1 Thu Aug 20 19:30:03 EDT 2009 stevenj@alum.mit.edu * included planned 1.1 release date M ./NEWS -3 +3 Thu Aug 20 19:27:52 EDT 2009 stevenj@alum.mit.edu * added Alejandro and Alex M. to authors list for Casimir stuff M ./AUTHORS +2 Thu Aug 20 19:27:26 EDT 2009 stevenj@alum.mit.edu * more compiler warnings (stemming from incomplete deletion of obsolete SZ0 macro) M ./src/step_generic.cpp -6 +6 Thu Aug 20 19:27:07 EDT 2009 stevenj@alum.mit.edu * clean up some compiler warnings (thanks Peter) M ./libctl/meep.cpp -2 +2 M ./src/casimir.cpp -3 +3 Thu Aug 20 18:20:24 EDT 2009 stevenj@alum.mit.edu * whoops M ./libctl/meep.scm.in -1 +1 Thu Aug 20 14:07:23 EDT 2009 stevenj@alum.mit.edu * more robust (hopefully) checking for how to combine stdio.h and mpi.h (#undefing SEEK_* conflicts with openmpi, so it can't be done unconditionally) M ./configure.ac -4 +10 M ./src/mympi.cpp -4 +6 Thu Aug 20 01:51:36 EDT 2009 stevenj@alum.mit.edu * version bump, NEWS M ./NEWS -1 +32 M ./configure.ac -2 +2 Thu Aug 20 01:35:03 EDT 2009 stevenj@alum.mit.edu * rename zero-fields-near-cylorigin? to accurate-fields-near-cylorigin? and reverse meaning M ./libctl/meep.scm.in -4 +4 Thu Aug 20 01:29:58 EDT 2009 stevenj@alum.mit.edu * fix symmetry in ring.ctl example M ./examples/ring.ctl -2 +2 Thu Aug 20 01:25:43 EDT 2009 stevenj@alum.mit.edu * whoops, forgot to rename some geometric-volume stuff in scheme interface M ./libctl/meep-ctl-swig.hpp -4 +3 M ./libctl/meep.cpp -2 +1 M ./libctl/meep.scm.in -14 +14 Thu Aug 20 01:20:43 EDT 2009 stevenj@alum.mit.edu * add option to NOT use David's hack of setting fieldsss |m| pixels near r=0 to zero for |m|>2 -- using the hack is the default, and seems to maintain stability for a fixed Courant number ~ 0.62 independent of m, but degrades accuracy near r=0 -- with this disabled, Courant number should be set to around min(0.5, 1/(|m|+0.5)) apparently M ./examples/ring.ctl -1 +1 M ./libctl/meep.scm.in -2 +12 M ./src/fields.cpp -3 +6 M ./src/meep.hpp -2 +6 M ./src/step_db.cpp -23 +58 M ./tests/cylindrical.cpp -7 +7 M ./tests/flux.cpp -1 +1 Thu Aug 20 01:04:21 EDT 2009 stevenj@alum.mit.edu * delete obsolete rshift-phasing hack (which was added years ago as an experiment for Alejandro that didn't pan out) M ./src/fields.cpp -11 M ./src/meep.hpp -2 +1 M ./src/step_db.cpp -2 +2 Wed Aug 19 23:35:45 EDT 2009 stevenj@alum.mit.edu * added cylindrical PML scaling test to pml.cpp M ./tests/pml.cpp -2 +47 Wed Aug 19 19:13:13 EDT 2009 stevenj@alum.mit.edu * fix casimir.scm inclusion in dist and for VPATH builds M ./libctl/Makefile.am -3 +2 M ./libctl/meep.scm.in -1 +1 Wed Aug 19 19:04:31 EDT 2009 stevenj@alum.mit.edu * remove obsolete doc directory (all docs are on wiki these days) M ./Makefile.am -7 +1 M ./configure.ac -9 R ./doc/ R ./doc/Makefile.am R ./doc/README R ./doc/Yee_bulk.eps R ./doc/complicated.tex R ./doc/energy_cons.tex R ./doc/energy_cons_1d.tex R ./doc/epsilon_polariton_1d.tex R ./doc/example.cpp R ./doc/gpl.tex R ./doc/lossgain_epsilon.tex R ./doc/meep.tex R ./doc/nonlinear.tex R ./doc/omniguide.tex R ./doc/polaritonbands.tex R ./doc/preproc.pl R ./doc/simple.tex R ./doc/simplebands.tex Wed Aug 19 18:56:37 EDT 2009 stevenj@alum.mit.edu * rename xv (formerly gv) to v (now volume, formerly grid_volume) M ./libctl/meep-ctl-const.hpp r1 M ./libctl/meep-ctl-swig.hpp r1 M ./libctl/meep-ctl.hpp r1 M ./libctl/meep.cpp r1 M ./libctl/structure.cpp r1 M ./src/anisotropic_averaging.cpp r1 M ./src/bands.cpp r1 M ./src/bicgstab.cpp r1 M ./src/bicgstab.hpp r1 M ./src/boundaries.cpp r1 M ./src/casimir.cpp r1 M ./src/control_c.cpp r1 M ./src/cw_fields.cpp r1 M ./src/dft.cpp r2 M ./src/energy_and_flux.cpp r1 M ./src/fields.cpp r1 M ./src/grace.cpp r1 M ./src/h5fields.cpp r1 M ./src/h5file.cpp r1 M ./src/initialize.cpp r1 M ./src/integrate.cpp r1 M ./src/integrate2.cpp r1 M ./src/loop_in_chunks.cpp r3 M ./src/meep.hpp r1 M ./src/meep/mympi.hpp r1 M ./src/meep/vec.hpp r1 M ./src/meep_internals.hpp r1 M ./src/monitor.cpp r1 M ./src/mpb.cpp r1 M ./src/mympi.cpp r1 M ./src/output_directory.cpp r1 M ./src/polarization.cpp r1 M ./src/sources.cpp r1 M ./src/sphere-quad.cpp r1 M ./src/step.cpp r1 M ./src/step_db.cpp r1 M ./src/step_generic.cpp r1 M ./src/stress.cpp r1 M ./src/structure.cpp r1 M ./src/time.cpp r1 M ./src/update_eh.cpp r1 M ./src/update_pols.cpp r1 M ./src/vec.cpp r1 M ./tests/2D_convergence.cpp r1 M ./tests/bench.cpp r1 M ./tests/bragg_transmission.cpp r1 M ./tests/convergence_cyl_waveguide.cpp r1 M ./tests/cylindrical.cpp r1 M ./tests/flux.cpp r1 M ./tests/h5test.cpp r1 M ./tests/harmonics.cpp r1 M ./tests/integrate.cpp r1 M ./tests/known_results.cpp r1 M ./tests/one_dimensional.cpp r1 M ./tests/physical.cpp r1 M ./tests/pml.cpp r1 M ./tests/symmetry.cpp r1 M ./tests/three_d.cpp r1 M ./tests/two_dimensional.cpp r1 Wed Aug 19 18:53:18 EDT 2009 stevenj@alum.mit.edu * rename grid_volume "v" to "gv" M ./libctl/meep-ctl-const.hpp r2 M ./libctl/meep-ctl-swig.hpp r2 M ./libctl/meep-ctl.hpp r2 M ./libctl/meep.cpp r2 M ./libctl/structure.cpp r2 M ./src/anisotropic_averaging.cpp r2 M ./src/bands.cpp r2 M ./src/bicgstab.cpp r2 M ./src/bicgstab.hpp r2 M ./src/boundaries.cpp r2 M ./src/casimir.cpp r2 M ./src/control_c.cpp r2 M ./src/cw_fields.cpp r2 M ./src/dft.cpp r2 M ./src/energy_and_flux.cpp r2 M ./src/fields.cpp r2 M ./src/grace.cpp r2 M ./src/h5fields.cpp r2 M ./src/h5file.cpp r2 M ./src/initialize.cpp r2 M ./src/integrate.cpp r2 M ./src/integrate2.cpp r2 M ./src/loop_in_chunks.cpp r2 M ./src/meep.hpp r2 M ./src/meep/mympi.hpp r2 M ./src/meep/vec.hpp r2 M ./src/meep_internals.hpp r2 M ./src/monitor.cpp r2 M ./src/mpb.cpp r2 M ./src/mympi.cpp r2 M ./src/output_directory.cpp r2 M ./src/polarization.cpp r2 M ./src/sources.cpp r2 M ./src/sphere-quad.cpp r2 M ./src/step.cpp r2 M ./src/step_db.cpp r2 M ./src/step_generic.cpp r2 M ./src/stress.cpp r2 M ./src/structure.cpp r2 M ./src/time.cpp r2 M ./src/update_eh.cpp r2 M ./src/update_pols.cpp r2 M ./src/vec.cpp r2 M ./tests/2D_convergence.cpp r2 M ./tests/bench.cpp r2 M ./tests/bragg_transmission.cpp r2 M ./tests/convergence_cyl_waveguide.cpp r2 M ./tests/cylindrical.cpp r2 M ./tests/flux.cpp r2 M ./tests/h5test.cpp r2 M ./tests/harmonics.cpp r2 M ./tests/integrate.cpp r2 M ./tests/known_results.cpp r2 M ./tests/one_dimensional.cpp r2 M ./tests/physical.cpp r2 M ./tests/pml.cpp r2 M ./tests/symmetry.cpp r2 M ./tests/three_d.cpp r2 M ./tests/two_dimensional.cpp r2 Wed Aug 19 18:51:32 EDT 2009 stevenj@alum.mit.edu * don't use "v" as variable name for vector M ./libctl/meep-ctl-swig.hpp -1 +1 M ./libctl/structure.cpp -10 +10 M ./src/initialize.cpp -4 +4 M ./src/loop_in_chunks.cpp -14 +14 M ./src/meep/vec.hpp -22 +22 M ./src/monitor.cpp -6 +6 M ./src/mpb.cpp -1 +1 M ./src/mympi.cpp -5 +5 M ./src/sources.cpp -1 +1 M ./src/vec.cpp -2 +2 M ./tests/bench.cpp -1 +1 M ./tests/bragg_transmission.cpp -2 +2 M ./tests/convergence_cyl_waveguide.cpp -1 +1 M ./tests/cylindrical.cpp -3 +3 M ./tests/flux.cpp -4 +4 M ./tests/one_dimensional.cpp -2 +2 M ./tests/three_d.cpp -2 +2 M ./tests/two_dimensional.cpp -2 +2 Wed Aug 19 18:33:53 EDT 2009 stevenj@alum.mit.edu * temporarily rename "gv" geometric_volume vars to "xv" M ./libctl/meep-ctl-const.hpp r1 M ./libctl/meep-ctl-swig.hpp r1 M ./libctl/meep-ctl.hpp r1 M ./libctl/meep.cpp r1 M ./libctl/structure.cpp r1 M ./src/anisotropic_averaging.cpp r1 M ./src/bands.cpp r1 M ./src/bicgstab.cpp r1 M ./src/bicgstab.hpp r1 M ./src/boundaries.cpp r1 M ./src/casimir.cpp r1 M ./src/control_c.cpp r1 M ./src/cw_fields.cpp r1 M ./src/dft.cpp r2 M ./src/energy_and_flux.cpp r1 M ./src/fields.cpp r1 M ./src/grace.cpp r1 M ./src/h5fields.cpp r1 M ./src/h5file.cpp r1 M ./src/initialize.cpp r1 M ./src/integrate.cpp r1 M ./src/integrate2.cpp r1 M ./src/loop_in_chunks.cpp r2 M ./src/meep.hpp r1 M ./src/meep/mympi.hpp r1 M ./src/meep/vec.hpp r1 M ./src/meep_internals.hpp r1 M ./src/monitor.cpp r1 M ./src/mpb.cpp r1 M ./src/mympi.cpp r1 M ./src/output_directory.cpp r1 M ./src/polarization.cpp r1 M ./src/sources.cpp r1 M ./src/sphere-quad.cpp r1 M ./src/step.cpp r1 M ./src/step_db.cpp r1 M ./src/step_generic.cpp r1 M ./src/stress.cpp r1 M ./src/structure.cpp r1 M ./src/time.cpp r1 M ./src/update_eh.cpp r1 M ./src/update_pols.cpp r1 M ./src/vec.cpp r1 M ./tests/2D_convergence.cpp r1 M ./tests/bench.cpp r1 M ./tests/bragg_transmission.cpp r1 M ./tests/convergence_cyl_waveguide.cpp r1 M ./tests/cylindrical.cpp r1 M ./tests/flux.cpp r1 M ./tests/h5test.cpp r1 M ./tests/harmonics.cpp r1 M ./tests/integrate.cpp r1 M ./tests/known_results.cpp r1 M ./tests/one_dimensional.cpp r1 M ./tests/physical.cpp r1 M ./tests/pml.cpp r1 M ./tests/symmetry.cpp r1 M ./tests/three_d.cpp r1 M ./tests/two_dimensional.cpp r1 Wed Aug 19 18:03:56 EDT 2009 stevenj@alum.mit.edu * whoops M ./tests/h5test.cpp -1 +1 Wed Aug 19 18:01:42 EDT 2009 stevenj@alum.mit.edu * rename geometric_volume to volume M ./libctl/meep-ctl-swig.hpp r2 M ./libctl/meep.cpp r2 M ./libctl/structure.cpp r1 M ./src/anisotropic_averaging.cpp r1 M ./src/casimir.cpp r1 M ./src/dft.cpp r2 M ./src/energy_and_flux.cpp r1 M ./src/fields.cpp r1 M ./src/h5fields.cpp r1 M ./src/integrate.cpp r1 M ./src/integrate2.cpp r1 M ./src/loop_in_chunks.cpp r1 M ./src/meep.hpp r2 M ./src/meep/vec.hpp r2 M ./src/monitor.cpp r1 M ./src/mpb.cpp r1 M ./src/sources.cpp r1 M ./src/stress.cpp r1 M ./src/structure.cpp r1 M ./src/vec.cpp r2 M ./tests/flux.cpp r1 M ./tests/h5test.cpp r1 M ./tests/harmonics.cpp r1 M ./tests/integrate.cpp r1 M ./tests/pml.cpp r1 Wed Aug 19 17:54:10 EDT 2009 stevenj@alum.mit.edu * rename volume to grid_volume M ./doc/complicated.tex r1 M ./doc/epsilon_polariton_1d.tex r1 M ./doc/nonlinear.tex r1 M ./doc/simple.tex r1 M ./examples/ring.ctl -1 +1 M ./libctl/meep.cpp r1 M ./libctl/structure.cpp r1 M ./src/anisotropic_averaging.cpp r1 M ./src/boundaries.cpp r1 M ./src/casimir.cpp r1 M ./src/dft.cpp r1 M ./src/energy_and_flux.cpp r1 M ./src/fields.cpp r1 M ./src/h5fields.cpp r1 M ./src/integrate.cpp r1 M ./src/integrate2.cpp r1 M ./src/loop_in_chunks.cpp r1 M ./src/meep.hpp r1 M ./src/meep/vec.hpp r1 M ./src/meep_internals.hpp r1 M ./src/monitor.cpp r1 M ./src/mpb.cpp r1 M ./src/polarization.cpp r1 M ./src/sources.cpp r1 M ./src/step_generic.cpp r1 M ./src/structure.cpp r1 M ./src/vec.cpp r1 M ./tests/2D_convergence.cpp r1 M ./tests/bench.cpp r1 M ./tests/bragg_transmission.cpp r1 M ./tests/convergence_cyl_waveguide.cpp r1 M ./tests/cylindrical.cpp r1 M ./tests/flux.cpp r1 M ./tests/h5test.cpp r1 M ./tests/harmonics.cpp r1 M ./tests/integrate.cpp r1 M ./tests/known_results.cpp r1 M ./tests/one_dimensional.cpp r1 M ./tests/physical.cpp r1 M ./tests/pml.cpp r1 M ./tests/symmetry.cpp r1 M ./tests/three_d.cpp r1 M ./tests/two_dimensional.cpp r1 Wed Aug 19 16:03:01 EDT 2009 mccauley@mit.edu * fixed syntax error in casimir.scm M ./libctl/casimir.scm -1 +1 Wed Aug 19 15:58:06 EDT 2009 mccauley@mit.edu * add casimir.scm helper functions M ./libctl/Makefile.am +1 A ./libctl/casimir.scm M ./libctl/meep.scm.in +4 Wed Aug 19 15:30:05 EDT 2009 mccauley@mit.edu * fixed Casimir stress stuff, added k integrations M ./libctl/meep-ctl-swig.hpp +2 M ./libctl/meep.cpp +14 M ./src/casimir.cpp -26 +100 M ./src/meep.hpp -2 +5 Wed Aug 19 14:35:54 EDT 2009 stevenj@alum.mit.edu * fix solve_cw for new PML M ./src/cw_fields.cpp -66 +49 M ./src/fields.cpp -2 +14 M ./src/meep.hpp -3 +22 M ./src/step.cpp -1 +1 M ./src/update_eh.cpp -15 +18 M ./tests/physical.cpp -4 Wed Aug 19 11:50:47 EDT 2009 stevenj@alum.mit.edu * slight cleanup M ./src/step_generic.cpp -19 +11 Mon Aug 17 17:41:11 EDT 2009 stevenj@alum.mit.edu * fixed field-backup/synchronization for new PML (must backup internal U and W fields too) M ./src/energy_and_flux.cpp -5 +21 M ./src/fields.cpp -8 +22 M ./src/meep.hpp +3 M ./tests/three_d.cpp -3 +2 Mon Aug 17 13:51:40 EDT 2009 stevenj@alum.mit.edu * fixed harmonics test for new PML - we slightly changed how PML interacts with nonlinearities, which changes the known results by about 1e-4 in this example M ./tests/harmonics.cpp -2 +2 Thu Aug 13 20:01:54 EDT 2009 stevenj@alum.mit.edu * swap roles of U and D/B fields in PML, to make the former a quantity that is purely needed locally and removing its interactions with boundary conditions etcetera M ./src/boundaries.cpp -9 +3 M ./src/step.cpp -15 M ./src/step_db.cpp -13 +13 M ./src/step_generic.cpp -34 +35 M ./src/update_eh.cpp -9 +4 Thu Aug 13 19:32:38 EDT 2009 stevenj@alum.mit.edu * initial stab at cylindrical code with new PML, not quite working yet M ./src/step_db.cpp -63 +158 Tue Aug 11 23:50:46 EDT 2009 stevenj@alum.mit.edu * PML test now includes anisotropy (and passes) M ./tests/pml.cpp -14 +55 Tue Aug 11 23:49:49 EDT 2009 stevenj@alum.mit.edu * fix new PML - need to communicate U field at PML boundaries M ./src/boundaries.cpp -4 +10 M ./src/meep.hpp -1 +1 M ./src/step.cpp +15 M ./src/step_db.cpp -2 +11 Tue Aug 11 12:26:57 EDT 2009 stevenj@alum.mit.edu * fixed (I think) bug that caused anisotropic mu to be unstable (and was only first-order) ... the treatment of offdiagonal mu components forgot to take into account the shift between the H-yee and E-yee lattices! M ./src/anisotropic_averaging.cpp -1 +2 M ./src/update_eh.cpp -3 +3 Mon Aug 10 19:28:25 EDT 2009 stevenj@alum.mit.edu * PML + dispersion seems to be working! M ./tests/pml.cpp -7 +20 Mon Aug 10 12:24:09 EDT 2009 stevenj@alum.mit.edu * partially rewritten PML , passes tests/pml but still needs testing -- should now be true PML for anisotropic eps/mu and for dispersive P -- cylindrical case not yet updated, also cw_solve needs fixing M ./src/energy_and_flux.cpp -12 +3 M ./src/fields.cpp -6 +23 M ./src/meep.hpp -1 +4 M ./src/meep_internals.hpp -25 +15 M ./src/step_db.cpp -21 +20 M ./src/step_generic.cpp -215 +317 M ./src/update_eh.cpp -22 +18 M ./src/update_pols.cpp -1 +1 M ./tests/pml.cpp +2 Sat Aug 8 00:00:19 EDT 2009 stevenj@alum.mit.edu * use a true PML for conductivity (previously was only y an approximate PML) M ./src/fields.cpp +4 M ./src/meep.hpp +1 M ./src/meep_internals.hpp -10 +12 M ./src/step_db.cpp -3 +8 M ./src/step_generic.cpp -20 +44 M ./src/structure.cpp -18 +2 M ./tests/pml.cpp -11 +41 Fri Aug 7 17:30:07 EDT 2009 stevenj@alum.mit.edu * note that our PML is not a proper PML for conductivity (sigh) M ./src/structure.cpp +3 Thu Aug 6 19:52:07 EDT 2009 stevenj@alum.mit.edu * beta feature seems to work M ./libctl/meep.scm.in -2 +3 Thu Aug 6 19:24:43 EDT 2009 stevenj@alum.mit.edu * units in beta should have 2*pi, just like k M ./src/step_db.cpp -1 +1 Thu Aug 6 18:55:08 EDT 2009 stevenj@alum.mit.edu * slightly more transparent usage of beta trick M ./libctl/meep.scm.in -4 +14 M ./src/fields.cpp -2 +2 Thu Aug 6 18:40:25 EDT 2009 stevenj@alum.mit.edu * initial (untested) implementation of exp(i beta z) in 2d calculations M ./libctl/meep.scm.in -1 +2 M ./src/Makefile.am -1 +1 M ./src/fields.cpp -4 +13 M ./src/meep.hpp -2 +4 M ./src/meep_internals.hpp +16 M ./src/step_db.cpp +29 M ./src/step_generic.cpp +27 Thu Aug 6 17:06:25 EDT 2009 stevenj@alum.mit.edu * slight code cleanup M ./src/update_eh.cpp -4 +3 Thu Aug 6 17:04:10 EDT 2009 stevenj@alum.mit.edu * slight performance improvements in polarization code M ./src/update_eh.cpp -5 +6 M ./src/update_pols.cpp -3 +3 Wed Jul 15 15:04:45 EDT 2009 stevenj@alum.mit.edu * add option for dft chunks to not use centered grid M ./src/dft.cpp -6 +11 M ./src/meep.hpp -1 +3 M ./src/stress.cpp -2 +2 Wed Jul 15 14:28:42 EDT 2009 stevenj@alum.mit.edu * rename yee2diel_offsets to yee2cent_offsets, following the new convention of "centered grid" instead of the confusing and inaccurate ""dielectric grid" M ./src/dft.cpp r1 M ./src/h5fields.cpp r1 M ./src/integrate.cpp r1 M ./src/integrate2.cpp r1 M ./src/meep/vec.hpp r1 M ./src/vec.cpp r1 Wed Jul 15 14:23:39 EDT 2009 stevenj@alum.mit.edu * added synonym "Centered" for "Dielectric" to use when referring to the centered grid, since the former name is much more accurate nowadays as a grid M ./libctl/Makefile.am -1 +1 M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -1 +1 M ./src/h5fields.cpp -2 +2 M ./src/integrate.cpp -2 +2 M ./src/integrate2.cpp -3 +3 M ./src/loop_in_chunks.cpp -8 +8 M ./src/meep.hpp -1 +1 M ./src/meep/vec.hpp +1 M ./src/mpb.cpp -2 +2 M ./src/vec.cpp -2 +2 Tue Jul 14 19:27:29 EDT 2009 stevenj@alum.mit.edu * when doing dft with Nfreq = 1, use center freq M ./src/dft.cpp +2 M ./src/stress.cpp +1 Mon Jul 13 17:00:18 EDT 2009 mccauley@mit.edu * use fields::normal_direction rather than geometric_volume::normal_direction, since the former correctly handles no-size dimensions M ./src/casimir.cpp -1 +1 Wed Jul 8 13:16:30 EDT 2009 stevenj@alum.mit.edu * avoid squaring integration weights in stress tensor M ./src/dft.cpp -2 +14 M ./src/meep.hpp -1 +14 M ./src/stress.cpp -5 +6 Wed Jul 8 13:15:49 EDT 2009 stevenj@alum.mit.edu * bug fix - perfect metals did not work (failed to set offdiagonal epsilon/mu) M ./libctl/structure.cpp +4 Wed Jul 8 10:53:25 EDT 2009 stevenj@alum.mit.edu * first stab at force-spectrum computation (compiles, but untested) M ./libctl/meep-ctl-swig.hpp +1 M ./libctl/meep.cpp +8 M ./libctl/meep.scm.in -6 +58 M ./src/Makefile.am -2 +2 M ./src/dft.cpp -6 +14 M ./src/meep.hpp -1 +37 A ./src/stress.cpp Sat Jul 4 13:39:48 EDT 2009 stevenj@alum.mit.edu * silence compiler warning M ./src/mympi.cpp +2 Sat Jul 4 13:38:35 EDT 2009 stevenj@alum.mit.edu * comment fix M ./src/casimir.cpp -6 +7 Fri Jul 3 18:58:27 EDT 2009 mccauley@mit.edu * for convenience of Casimir calculations, add two new input variables (global-D-conductivity and global-B-conductivity) representing scalar conductivities which are added to the conductivity everywhere M ./libctl/meep-ctl-swig.hpp -1 +3 M ./libctl/meep.scm.in -1 +7 M ./libctl/structure.cpp -7 +18 Fri Jul 3 18:39:51 EDT 2009 mccauley@mit.edu * adapt casimir_make_g to handle H sources (which are shifted by half a timestep); rename meep::make_casimir_g to stop g++ complaints M ./libctl/meep-ctl-swig.hpp -1 +1 M ./libctl/meep.cpp -2 +2 M ./src/casimir.cpp -6 +20 M ./src/meep.hpp -1 +1 Fri Jul 3 17:32:08 EDT 2009 mccauley@mit.edu * slight optimization M ./src/casimir.cpp -7 +4 Fri Jul 3 17:31:46 EDT 2009 stevenj@alum.mit.edu * use chunkloop in casimir stress integration to avoid 2*pi*r Jacobian M ./src/casimir.cpp -9 +54 Thu Jul 2 19:07:53 EDT 2009 mccauley@mit.edu * comment M ./src/casimir.cpp -1 +1 Thu Jul 2 18:58:19 EDT 2009 mccauley@mit.edu * include 1/2pi normalization in Fourier integral M ./src/casimir.cpp -1 +1 Wed Jul 1 15:29:25 EDT 2009 stevenj@alum.mit.edu * add first draft of Casimir helper functions M ./libctl/meep-ctl-swig.hpp +9 M ./libctl/meep.cpp +18 M ./libctl/meep.i +19 M ./src/Makefile.am -2 +2 A ./src/casimir.cpp M ./src/meep.hpp +11 Tue Jun 30 14:55:07 EDT 2009 stevenj@alum.mit.edu * std::remove needs cstdio M ./src/h5file.cpp +1 Thu Jun 18 10:50:23 EDT 2009 stevenj@alum.mit.edu * change infinity to meep::infinity, to work around weird gcc 3.4.4 bug(?) on Cygwin, thanks to Mischa Megens and Alexandr Sadovnikov for the bug report M ./tests/bragg_transmission.cpp -1 +1 M ./tests/h5test.cpp -3 +3 Sat Jun 6 20:17:35 EDT 2009 stevenj@alum.mit.edu * work around problem with MPICH (and other MPI versions?) with SEEK_SET and mpi.h M ./NEWS -1 +3 M ./configure.ac -3 +23 M ./src/mympi.cpp +4 Sat Jun 6 19:47:13 EDT 2009 stevenj@alum.mit.edu * tentative 1.0.4 version bump M ./NEWS +4 M ./configure.ac -2 +2 Sat Jun 6 19:46:47 EDT 2009 stevenj@alum.mit.edu * give sensible cross-compiling default for sigfpe test M ./configure.ac -2 +1 Fri Jun 5 12:33:18 EDT 2009 stevenj@alum.mit.edu tagged meep-1.0.3 Fri Jun 5 12:25:57 EDT 2009 stevenj@alum.mit.edu * update NEWS M ./NEWS -2 +3 Fri Jun 5 12:12:34 EDT 2009 stevenj@alum.mit.edu tagged meep-1.0.2 Thu Jun 4 13:03:42 EDT 2009 stevenj@alum.mit.edu * whoops M ./configure.ac -2 +2 Thu Jun 4 12:57:59 EDT 2009 stevenj@alum.mit.edu * version bump M ./NEWS +5 M ./configure.ac -2 +2 Thu Jun 4 12:51:40 EDT 2009 stevenj@alum.mit.edu * allow GUILE_CONFIG var to override location of guile-config M ./configure.ac -7 +7 Mon Jun 1 20:13:40 EDT 2009 stevenj@alum.mit.edu * version bump for 1.0.2 M ./NEWS +9 M ./configure.ac -2 +2 Mon Jun 1 20:08:12 EDT 2009 stevenj@alum.mit.edu * we can no longer rely on splitting producing *exactly* the same results, including roundoff, because the exploitation of SSE/SSE2 depends on the splitting (which determines alignments, array lengths, etc), and this affects roundoff error; thanks to Silviu Popescu for the bug report M ./tests/flux.cpp -10 +11 M ./tests/one_dimensional.cpp -2 +8 M ./tests/three_d.cpp -3 +9 M ./tests/two_dimensional.cpp -2 +8 Mon Jun 1 19:29:26 EDT 2009 stevenj@alum.mit.edu * use meep_internals.hpp in step_generic, since that header contains the declarations for the step_generic functions M ./src/step_generic.cpp +1 Thu May 28 17:03:22 EDT 2009 stevenj@alum.mit.edu * fix tolerance in symmetry test for icc M ./tests/symmetry.cpp -1 +1 Thu May 28 08:37:55 EDT 2009 stevenj@alum.mit.edu tagged meep-1.0.1 Wed May 27 22:46:10 EDT 2009 stevenj@alum.mit.edu * update news M ./NEWS -1 +4 Wed May 27 19:10:41 EDT 2009 stevenj@alum.mit.edu * more robust calculation of whether a chunk overlaps with PML; thanks to Alex Prengel for the bug report of how this causes problems withgcc 4.3.2 on Athena Linux/x86 (32-bit) M ./src/structure.cpp -6 +17 Wed May 27 19:09:42 EDT 2009 stevenj@alum.mit.edu * output computational cell in libctl interface M ./libctl/structure.cpp -1 +3 Wed May 27 18:57:41 EDT 2009 stevenj@alum.mit.edu * 2D_convergence needs to run a little longer to get reliable results M ./tests/2D_convergence.cpp -1 +1 Fri May 22 22:44:07 EDT 2009 stevenj@alum.mit.edu * missing string.h header causes failure on linux.mit.edu M ./src/h5file.cpp +1 Fri May 22 22:40:02 EDT 2009 stevenj@alum.mit.edu * running 2D_convergence for slightly more timesteps fixed spurious failure in 2D_convergence; thanks to Alex Prengel for the bug report and help with Athena M ./NEWS -1 +6 M ./tests/2D_convergence.cpp -1 +1 Fri May 22 22:09:34 EDT 2009 stevenj@alum.mit.edu * more standard way to make silent rules the default M ./configure.ac -6 +1 Fri May 22 21:35:49 EDT 2009 stevenj@alum.mit.edu * version bump for 1.0.1 M ./configure.ac -2 +2 Fri May 22 21:32:17 EDT 2009 stevenj@alum.mit.edu * tentative NEWS for 1.0.1 M ./NEWS +11 Fri May 22 21:23:20 EDT 2009 stevenj@alum.mit.edu * don't regenerate sphere-quad.h unnecessarily, fix make distcheck M ./src/Makefile.am -4 +4 Fri May 22 21:00:44 EDT 2009 stevenj@alum.mit.edu * cleanfiles M ./Makefile.am +1 M ./src/Makefile.am -2 +1 Fri May 22 19:08:19 EDT 2009 stevenj@alum.mit.edu * use RUNCODE for running test programs, so that they ruse mpirun in MPI mode as before M ./tests/Makefile.am +2 Fri May 22 19:07:01 EDT 2009 stevenj@alum.mit.edu * enable silent rules by default M ./configure.ac +5 Fri May 22 18:39:59 EDT 2009 stevenj@alum.mit.edu * move boundary communications into mympi.cpp so that mycomm can be used M ./src/meep.hpp +2 M ./src/mympi.cpp +48 M ./src/step.cpp -48 +1 Fri May 22 18:11:11 EDT 2009 stevenj@alum.mit.edu * whoops, most of the MPI functions use double precision even when realnum == float M ./src/mympi.cpp -15 +13 Fri May 22 15:53:43 EDT 2009 stevenj@alum.mit.edu * replace MPI_DOUBLE with MPI_REALNUM to work in single-precision mode; thanks to Seyoon Kim for the bug report M ./src/mympi.cpp -13 +15 M ./src/step.cpp -2 +4 Fri May 22 14:09:17 EDT 2009 stevenj@alum.mit.edu * fixed tests to pass in single precision M ./tests/h5test.cpp -1 +1 M ./tests/symmetry.cpp -3 +11 Fri May 22 13:41:25 EDT 2009 stevenj@alum.mit.edu * rm unused variable M ./src/h5fields.cpp -3 Wed May 20 19:10:34 EDT 2009 stevenj@alum.mit.edu * fix compilation in MEEP_SINGLE mode, thanks to Seyoon Kim for the bug report M ./src/step.cpp -1 +1 Wed May 20 19:10:02 EDT 2009 stevenj@alum.mit.edu * silence compiler warnings M ./src/energy_and_flux.cpp -2 +3 M ./src/monitor.cpp -1 +1 M ./src/mpb.cpp -1 +2 Tue May 19 13:48:37 EDT 2009 stevenj@alum.mit.edu * whoops M ./tests/Makefile.am -1 +1 Tue May 19 13:37:00 EDT 2009 stevenj@alum.mit.edu * use new automake options M ./configure.ac -1 +2 Tue May 19 13:23:20 EDT 2009 stevenj@alum.mit.edu * use new automake TESTS variable M ./tests/Makefile.am -3 +46 Thu Apr 30 11:58:29 EDT 2009 stevenj@alum.mit.edu * fix header file in h5file to use cstdio, since we call std::remove and not remove, fixing Debian bug #505002 M ./src/h5file.cpp -3 +1 Wed Apr 29 13:46:19 EDT 2009 stevenj@alum.mit.edu * update copyright year in --version string M ./libctl/Makefile.am -1 +1 Tue Apr 28 23:39:11 EDT 2009 stevenj@alum.mit.edu tagged meep-1-0 Tue Apr 28 23:38:03 EDT 2009 stevenj@alum.mit.edu * update TODO M ./TODO -5 +5 Tue Apr 28 20:00:50 EDT 2009 stevenj@alum.mit.edu * new NEWS M ./NEWS -1 +17 Tue Apr 28 19:46:35 EDT 2009 stevenj@alum.mit.edu * removed delta_epsilon parameter of polarizability entirely; use only sigma, which is allowed to be anisotropic (although offdiagonal sigma are not yet supported) M ./examples/material-dispersion.ctl -2 +2 M ./libctl/meep.scm.in -3 +2 M ./libctl/structure.cpp -27 +16 M ./src/anisotropic_averaging.cpp -1 +1 M ./src/meep.hpp -24 +19 M ./src/meep/vec.hpp -2 +13 M ./src/meep_internals.hpp -1 +1 M ./src/polarization.cpp -37 +16 M ./src/vec.cpp -5 M ./tests/known_results.cpp -2 +4 M ./tests/symmetry.cpp -2 +4 Tue Apr 28 19:02:46 EDT 2009 stevenj@alum.mit.edu * delete obsolete energy-saturation stuff, which was never documented and hence never used, and had bitrotted M ./libctl/meep.scm.in -2 +1 M ./libctl/structure.cpp -13 +10 M ./src/meep.hpp -19 +14 M ./src/meep_internals.hpp -3 +1 M ./src/polarization.cpp -72 +18 M ./src/update_pols.cpp -11 M ./tests/known_results.cpp -23 M ./tests/symmetry.cpp -68 Tue Apr 28 18:45:05 EDT 2009 stevenj@alum.mit.edu * round times to floats for time comparisons, e.g. for source cutoffs, to avoid gratuitous sensitivity to slight changes in roundoff behavior (e.g. from different compiler options) M ./libctl/meep.scm.in -16 +20 M ./src/meep.hpp -6 +11 M ./src/sources.cpp -2 +5 M ./tests/known_results.cpp -8 +8 M ./tests/symmetry.cpp -41 +41 Tue Apr 28 17:38:12 EDT 2009 stevenj@alum.mit.edu * remove dependence of gaussian cutoff on precision M ./src/sources.cpp -2 +2 Tue Apr 28 16:57:19 EDT 2009 stevenj@alum.mit.edu * remove half-baked subpixel sigma averaging that was only used for cylindrical coordinates with electric susceptibility M ./src/polarization.cpp -25 +6 Tue Apr 28 16:46:35 EDT 2009 stevenj@alum.mit.edu * support diagonal anisotropic material dispersion, fix bug in cylindrical mu material dispersion, remove unused sigma[] array M ./libctl/meep.scm.in -1 +2 M ./libctl/structure.cpp -8 +18 M ./src/meep.hpp -8 +15 M ./src/meep/vec.hpp -1 +8 M ./src/meep_internals.hpp -3 +3 M ./src/polarization.cpp -34 +60 M ./src/structure.cpp -3 M ./src/vec.cpp +5 Tue Apr 28 14:28:14 EDT 2009 stevenj@alum.mit.edu * update release date (hopefully today) M ./NEWS -1 +1 Tue Apr 28 14:27:23 EDT 2009 stevenj@alum.mit.edu * use ~irrational points, to avoid failure from slightly differnt rounding in snapping point to the nearest grid point M ./tests/h5test.cpp -1 +1 Tue Apr 28 11:05:35 EDT 2009 stevenj@alum.mit.edu * increase error threshold on flux_2d test, since actual error was within 0.00002 of threshold and rounding differences sometimes pushed us over M ./tests/flux.cpp -2 +5 Mon Apr 27 20:24:31 EDT 2009 stevenj@alum.mit.edu * performance hack: gcc seems to emit significantly bfaster code if we make a specialized version of step_generic for the case when the inner loop is stride-1; fortunately, this is autogenerated and should not make maintainance more difficult M ./configure.ac +3 M ./src/Makefile.am -1 +4 M ./src/meep/vec.hpp +53 M ./src/meep_internals.hpp +41 M ./src/step_db.cpp -1 +1 M ./src/step_generic.cpp -4 +2 M ./src/update_eh.cpp -1 +1 Mon Apr 27 19:42:57 EDT 2009 stevenj@alum.mit.edu * turn on more aggressive optimization with g++, which seems to help as of gcc 4.3, and I'm not too worried about the bugs in ancient gcc 3.3.x any more M ./m4/ax_cxx_maxopt.m4 -9 +3 Mon Apr 27 19:19:12 EDT 2009 stevenj@alum.mit.edu * do all configure tests using C++, since that's what we compile/link with M ./configure.ac -6 +1 Mon Apr 27 16:10:20 EDT 2009 stevenj@alum.mit.edu * whoops, fixed breakage of --enable-debug mode M ./configure.ac -15 +16 Fri Apr 24 21:57:00 EDT 2009 stevenj@alum.mit.edu * remover redundant lapack check when harminv is found M ./configure.ac -1 +1 Fri Apr 24 21:47:31 EDT 2009 stevenj@alum.mit.edu * uses gcc -march=native on more architectures where available, and correctly set arch flag in CXXFLAGS not CFLAGS M ./m4/ax_gcc_archflag.m4 -4 +4 Fri Apr 24 21:34:32 EDT 2009 stevenj@alum.mit.edu * re-enable optimization flags that were accidentally turned off because stupid configure script was setting CXXFLAGS twice M ./configure.ac -33 +33 Fri Apr 24 21:23:16 EDT 2009 stevenj@alum.mit.edu * updated icc flags (from FFTW) M ./m4/ax_cxx_maxopt.m4 -1 +4 Fri Apr 24 21:02:54 EDT 2009 stevenj@alum.mit.edu * update macros from FFTW M ./m4/ax_gcc_archflag.m4 -6 +8 M ./m4/ax_gcc_x86_cpuid.m4 -4 +26 Fri Apr 24 21:02:33 EDT 2009 stevenj@alum.mit.edu * remove obsolute configure flag --with-saturable-absorbers M ./configure.ac -7 Fri Apr 24 17:41:05 EDT 2009 stevenj@alum.mit.edu * make 2D_convergence.cpp more insensitive to floating-point rounding for pixels that fall right on the cylinder border (which cause the test to fail with some compiler optimizations that change the rounding of r*r) M ./tests/2D_convergence.cpp -1 +1 Tue Apr 21 18:55:34 EDT 2009 stevenj@alum.mit.edu * version bump M ./configure.ac -3 +4 Tue Apr 21 18:53:26 EDT 2009 stevenj@alum.mit.edu * silence compiler warning M ./src/sphere-quad.cpp -1 +1 Tue Apr 21 18:51:39 EDT 2009 stevenj@alum.mit.edu * tentative Meep 1.0 news M ./NEWS +24 Tue Apr 21 18:51:32 EDT 2009 stevenj@alum.mit.edu * fix Ardavan's name M ./AUTHORS -1 +1 Tue Apr 21 18:48:34 EDT 2009 stevenj@alum.mit.edu * disable subpixel averaging for pixels crossing metals M ./libctl/structure.cpp +30 Tue Apr 21 18:38:36 EDT 2009 stevenj@alum.mit.edu * alloc_f and figure_out_step_plan need to be public so that they can be called from fields:: M ./src/meep.hpp -2 +3 Tue Apr 21 17:23:42 EDT 2009 hila@math.mit.edu * maxabs should be optional in integrate2, fixing broken scheme interface M ./src/meep.hpp -2 +2 Tue Apr 21 17:42:03 EDT 2009 stevenj@alum.mit.edu * cache trivial chi1inv in structure_chunk, and use it to allocate correct fields when require_component is called (in particular, fixing behavior in 2D when anisotropy couples xy and z) M ./src/anisotropic_averaging.cpp +3 M ./src/fields.cpp -13 +64 M ./src/meep.hpp -1 +6 M ./src/sources.cpp -15 M ./src/structure.cpp +17 Tue Apr 21 17:41:20 EDT 2009 stevenj@alum.mit.edu * bug fix in checks for trivial chi1inv M ./src/anisotropic_averaging.cpp -8 +12 Tue Apr 21 17:32:36 EDT 2009 stevenj@alum.mit.edu * hsrc no longer exists M ./autogen.sh -2 Thu Apr 16 19:14:36 EDT 2009 ardfar@mit.edu * NEWS synced with Steven's version (resolve merge conflict) M ./NEWS -1 +1 Thu Apr 16 19:10:54 EDT 2009 stevenj@alum.mit.edu * remove unused {stride/num}_{each/any}_direction vars M ./src/fields.cpp -13 M ./src/meep.hpp -2 M ./src/update_eh.cpp -6 +6 Thu Apr 16 18:59:26 EDT 2009 stevenj@alum.mit.edu * remove unused Haskell code generator M ./Makefile.am -23 +2 M ./autogen.sh -2 M ./configure.ac -27 R ./hsrc/ R ./hsrc/Complex.lhs R ./hsrc/Makefile.am R ./hsrc/StepGen.lhs R ./hsrc/YeeLattice.lhs R ./hsrc/step_d_gen.hs R ./hsrc/step_h_gen.hs R ./hsrc/update_e_from_d_gen.hs R ./hsrc/update_from_e_gen.hs M ./src/Makefile.am -11 +1 Thu Apr 16 18:50:34 EDT 2009 stevenj@alum.mit.edu * remove stride0/stride distinction -- stride0 should always be used M ./src/meep/vec.hpp -5 +4 M ./src/vec.cpp -6 +5 Thu Apr 9 14:21:44 EDT 2009 stevenj@alum.mit.edu * fix merge conflict M ./src/step.cpp -1 +2 Thu Apr 9 14:16:52 EDT 2009 stevenj@fftw.org * some updates to phasein code, to use proper refcounting and to properly phasein polarizations; also use refcounting for fields_chunk copy constructor M! ./src/fields.cpp -4 +5 M! ./src/meep.hpp -2 +2 M! ./src/step.cpp -1 M! ./src/structure.cpp -1 +7 Mon Apr 6 16:31:57 EDT 2009 stevenj@alum.mit.edu * add fields::integrate2 function for field-overlap integrals between two runs M ./libctl/meep.i +29 M ./libctl/meep.scm.in +5 M ./src/Makefile.am -4 +5 M ./src/integrate.cpp -29 +29 A ./src/integrate2.cpp M ./src/meep.hpp +18 Wed Mar 18 22:45:15 EDT 2009 stevenj@alum.mit.edu tagged meep-0.20.4 Tue Mar 17 19:28:01 EDT 2009 stevenj@alum.mit.edu * date NEWS for release M! ./NEWS -1 +1 Tue Apr 7 19:24:02 EDT 2009 ardfar@mit.edu * new anisotropic averaging with stable(r) timestepping M ./libctl/structure.cpp -74 +93 M ./src/anisotropic_averaging.cpp -5 +11 M ./src/h5file.cpp -1 +1 M ./src/step_generic.cpp -33 +36 M ./tests/2D_convergence.cpp -1 +1 M ./tests/h5test.cpp -2 +2 M ./tests/known_results.cpp -1 +1 Wed Mar 18 18:01:43 EDT 2009 ardfar@mit.edu * addition to anisotropic medium averaging to include case of fallback M ./libctl/structure.cpp -10 +39 Wed Mar 18 17:28:37 EDT 2009 ardfar@mit.edu * anisotropic media averaging in libctl frontend M ./libctl/meep.scm.in -2 +7 M ./libctl/structure.cpp -71 +268 Thu Mar 12 22:20:02 EDT 2009 stevenj@alum.mit.edu * date NEWS for release M ./NEWS -1 +1 Tue Mar 10 14:46:38 EDT 2009 stevenj@alum.mit.edu * copyright year update to 2009 M ./COPYRIGHT -1 +1 M ./libctl/meep.scm.in -1 +1 M ./src/bands.cpp -1 +1 M ./src/bicgstab.cpp -1 +1 M ./src/bicgstab.hpp -1 +1 M ./src/boundaries.cpp -1 +1 M ./src/control_c.cpp -1 +1 M ./src/cw_fields.cpp -1 +1 M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -1 +1 M ./src/fields.cpp -1 +1 M ./src/grace.cpp -1 +1 M ./src/h5fields.cpp -1 +1 M ./src/h5file.cpp -1 +1 M ./src/initialize.cpp -1 +1 M ./src/integrate.cpp -1 +1 M ./src/loop_in_chunks.cpp -1 +1 M ./src/meep.hpp -1 +1 M ./src/meep/mympi.hpp -1 +1 M ./src/meep/vec.hpp -1 +1 M ./src/meep_internals.hpp -1 +1 M ./src/monitor.cpp -1 +1 M ./src/mpb.cpp -1 +1 M ./src/mympi.cpp -1 +1 M ./src/output_directory.cpp -1 +1 M ./src/polarization.cpp -1 +1 M ./src/sources.cpp -1 +1 M ./src/sphere-quad.cpp -1 +1 M ./src/step.cpp -1 +1 M ./src/step_db.cpp -1 +1 M ./src/structure.cpp -1 +1 M ./src/time.cpp -1 +1 M ./src/update_eh.cpp -1 +1 M ./src/update_pols.cpp -1 +1 M ./src/vec.cpp -1 +1 M ./tests/bench.cpp -1 +1 M ./tests/bragg_transmission.cpp -1 +1 M ./tests/cylindrical.cpp -1 +1 M ./tests/flux.cpp -1 +1 M ./tests/harmonics.cpp -1 +1 M ./tests/integrate.cpp -1 +1 M ./tests/known_results.cpp -1 +1 M ./tests/one_dimensional.cpp -1 +1 M ./tests/physical.cpp -1 +1 M ./tests/symmetry.cpp -1 +1 M ./tests/three_d.cpp -1 +1 M ./tests/two_dimensional.cpp -1 +1 Tue Mar 10 14:42:12 EDT 2009 stevenj@alum.mit.edu * version bump to 0.20.4 (beta) M ./NEWS +18 M ./configure.ac -2 +2 Mon Feb 9 19:54:14 EST 2009 stevenj@alum.mit.edu * merged bug fix in writing strings with parallel HDF5 M ./src/h5file.cpp -1 +1 Wed Nov 12 21:06:24 EST 2008 stevenj@fftw.org * bug fix in writing strings with parallel HDF5, thanks to Zheng Li for the bug report M! ./src/h5file.cpp -1 +1 Fri Jan 30 16:24:00 EST 2009 stevenj@alum.mit.edu * bug fix in cylindrical code, which was missing im/r term for pixels at 0.5*(delta r) from the origin M ./src/step_db.cpp -3 +3 Fri Jan 30 15:38:33 EST 2009 stevenj@alum.mit.edu * in initialize_field, update E/H if D/B was set M ./src/initialize.cpp +8 Tue Jan 13 17:11:58 EST 2009 mccauley@mit.edu * fixed divide_processors to use correct mygroup M ./src/mympi.cpp -5 +3 Tue Jan 13 13:06:12 EST 2009 stevenj@alum.mit.edu * fix divide_parallel stuff to compile M ./src/meep/mympi.hpp +1 M ./src/mympi.cpp -3 +11 Tue Jan 13 13:04:29 EST 2009 stevenj@alum.mit.edu * fix to work properly with latest libtool M ./Makefile.am -1 +1 M ./configure.ac +1 Fri Jan 9 17:44:04 EST 2009 stevenj@alum.mit.edu * hack to allow multiple FDTD simulations in parallel from the same MPI job M ./src/meep/mympi.hpp +5 M ./src/mympi.cpp -35 +109 Tue Dec 9 16:20:26 EST 2008 stevenj@alum.mit.edu * bug fix (thanks Alejandro): when a non-integrated source is used with a conductivity, the 1/(1+cond) factor needs to be multiplied by the current amplitude to get second-order accuracy in the timestepping M ./src/step.cpp -6 +15 Thu Dec 4 16:09:02 EST 2008 stevenj@fftw.org * bug fix in writing strings with parallel HDF5, thanks to Zheng Li for the bug report M ./src/h5file.cpp -1 +1 Mon Jul 28 18:49:19 EDT 2008 stevenj@alum.mit.edu * bug fix in merged interface - libctl was returning eps=1 for eps-averaging?=false M ./libctl/structure.cpp -2 +2 Mon Jul 28 00:55:48 EDT 2008 stevenj@alum.mit.edu * check for correct MPB header M ./configure.ac -1 +1 Mon Jul 28 00:53:58 EDT 2008 stevenj@alum.mit.edu * eigenmode sources are mostly working, with a couple glitches (all-components sources don't work right, and including both H and E doesn't seem to give a 1-way source like it should) M ./libctl/meep.scm.in -13 +66 M ./src/fields.cpp -1 +1 M ./src/meep.hpp -3 +3 M ./src/meep/vec.hpp +2 M ./src/mpb.cpp -15 +66 Sun Jul 27 15:50:42 EDT 2008 stevenj@alum.mit.edu * include check that PML parameters are sensible (e.g. that total PML thickness is not greater than cell thickness, which seems to be a common mistake) M ./src/meep.hpp +1 M ./src/structure.cpp +20 Sun Jul 27 14:25:03 EDT 2008 stevenj@alum.mit.edu * accept NULL for A() function in add_volume_source M ./src/sources.cpp -2 +2 Sun Jul 27 13:52:17 EDT 2008 stevenj@alum.mit.edu * use new mpb.h header M ./src/mpb.cpp -19 +20 Sun Jul 27 02:41:47 EDT 2008 stevenj@alum.mit.edu * initial stab at MPB-based eigenmode sources (still untested, but compiles) M ./configure.ac -1 +20 M ./src/Makefile.am -1 +1 M ./src/meep.hpp +9 M ./src/meep/vec.hpp +1 A ./src/mpb.cpp M ./src/vec.cpp +4 Sat Jul 26 19:12:33 EDT 2008 stevenj@alum.mit.edu * added src_time::set_frequency M ./src/meep.hpp +3 Sat Jul 26 17:06:19 EDT 2008 stevenj@alum.mit.edu * added new extra-materials input variable, so that you no longer have to use "dummy objects" to specify materials when using material-function types M ./TODO -4 +1 M ./libctl/meep-ctl-swig.hpp +1 M ./libctl/meep.scm.in -1 +6 M ./libctl/structure.cpp -24 +31 Thu Jul 24 16:47:10 EDT 2008 stevenj@alum.mit.edu * merge 0.20.3 patch M ./libctl/Makefile.am -1 +1 Thu Jul 24 16:27:52 EDT 2008 stevenj@fftw.org tagged meep-0.20.3 Thu Jul 24 16:25:03 EDT 2008 stevenj@fftw.org * removed circular ctl-io.h dependency, bumped version to 0.20.3 M! ./NEWS +5 M! ./configure.ac -2 +2 M! ./libctl/Makefile.am -1 +1 Thu Jul 24 01:10:47 EDT 2008 stevenj@alum.mit.edu * make it easy to switch Meep to single precision by changing one #define in meep.hpp M ./src/anisotropic_averaging.cpp -1 +1 M ./src/bicgstab.cpp -21 +11 M ./src/bicgstab.hpp -4 +6 M ./src/boundaries.cpp -6 +6 M ./src/cw_fields.cpp -16 +17 M ./src/dft.cpp -6 +6 M ./src/energy_and_flux.cpp -6 +6 M ./src/fields.cpp -11 +11 M ./src/h5fields.cpp -4 +4 M ./src/h5file.cpp -11 +13 M ./src/integrate.cpp -2 +2 M ./src/meep.hpp -19 +38 M ./src/meep_internals.hpp -9 +10 M ./src/monitor.cpp -1 +1 M ./src/mympi.cpp +13 M ./src/polarization.cpp -7 +7 M ./src/step_db.cpp -16 +16 M ./src/step_generic.cpp -11 +12 M ./src/structure.cpp -22 +22 M ./src/update_eh.cpp -8 +8 M ./src/update_pols.cpp -3 +3 M ./tests/cylindrical.cpp -1 +3 M ./tests/h5test.cpp -6 +5 M ./tests/harmonics.cpp -2 +3 M ./tests/known_results.cpp -1 +2 M ./tests/pml.cpp -1 +1 Wed Jul 23 22:28:07 EDT 2008 stevenj@alum.mit.edu * added libctl front-end support for dispersive mu M ./libctl/meep.scm.in -1 +3 M ./libctl/structure.cpp -6 +18 M ./src/meep.hpp -2 +3 M ./src/polarization.cpp -1 +1 Wed Jul 23 22:00:27 EDT 2008 stevenj@alum.mit.edu * fixed libctl front-end M ./libctl/Makefile.am -1 +1 M ./libctl/meep.scm.in -3 +12 M ./libctl/structure.cpp -86 +130 M ./src/anisotropic_averaging.cpp -10 +14 M ./src/meep.hpp +3 M ./src/meep/vec.hpp -3 +3 Wed Jul 23 18:14:51 EDT 2008 stevenj@alum.mit.edu * initial merge of mu and epsilon support Merge of update_e_from_d and update_h_from_b, and unified support for electric and magnetic susceptibilities. make check passes, but the libctl front-end has not been updated yet. Magnetic materials now support anisotropic averaging, material dispersion, and nonlinearity. Instead of invmu and inveps arrays, we now have a single chi1inv array that stores 1/(1+chi1) for the first-order susceptibilities chi1. The material_function::meaneps function has been replaced by a function material_function::eff_chi1inv_row that is used for both mu and epsilon and returns a row of the effective-medium 1/(1+chi1) tensor. This has the important consequence that user-specified anisotropic materials are now possible. Also, user-controlled effective-medium averaging is possible, and in particular we can do the proper Kottke averaging for anisotropic media. Also, some (diagonal) anisotropy is now supported in the chi2 and chi3 nonlinearities. ./src/update_e_from_d.cpp -> ./src/update_eh.cpp ./src/update_from_e.cpp -> ./src/update_pols.cpp M ./doc/polaritonbands.tex -3 +1 M ./src/Makefile.am -2 +2 M ./src/anisotropic_averaging.cpp -232 +106 r1 M ./src/boundaries.cpp -10 +13 M ./src/cw_fields.cpp -15 +10 M ./src/energy_and_flux.cpp -4 +6 M ./src/fields.cpp -21 +27 M ./src/h5fields.cpp -6 +7 r1 M ./src/initialize.cpp -37 +1 M ./src/integrate.cpp -10 +11 r1 M ./src/meep.hpp -61 +74 r1 M ./src/meep/vec.hpp -4 +11 M ./src/meep_internals.hpp -3 +3 M ./src/monitor.cpp -74 +68 r1 M ./src/polarization.cpp -118 +49 M ./src/sources.cpp -6 +6 r1 M ./src/step.cpp -44 +45 M ./src/step_generic.cpp r1 M ./src/structure.cpp -103 +97 r1 M ./src/update_eh.cpp -51 +87 r1 R ./src/update_h_from_b.cpp M ./src/update_pols.cpp -10 +13 M ./tests/convergence_cyl_waveguide.cpp -1 +5 M ./tests/known_results.cpp -2 +2 Mon Jul 21 19:40:53 EDT 2008 stevenj@fftw.org tagged meep-0.20.2 Mon Jul 21 19:40:03 EDT 2008 stevenj@fftw.org * fix to work with Guile 1.6.x M ./NEWS +5 M ./configure.ac -2 +2 M ./libctl/meep.scm.in -1 +1 Sun Jul 20 14:35:23 EDT 2008 stevenj@fftw.org tagged meep-0.20.1 Sun Jul 20 14:35:13 EDT 2008 stevenj@fftw.org * fix libctl dependencies so that parallel builds work M ./NEWS +2 M ./libctl/Makefile.am -5 +9 Sun Jul 20 13:51:21 EDT 2008 stevenj@fftw.org * install correct pkgconfig file (meep_mpi.pc) for MPI version; thanks to Majid Sodagar for the bug report; bump version to 0.20.1 ./meep.pc.in -> ./meep-pkgconfig.in M ./Makefile.am -2 +5 M ./NEWS +7 M ./configure.ac -3 +3 M ./meep-pkgconfig.in -1 +1 Sun Jul 20 12:10:59 EDT 2008 stevenj@fftw.org * more robust handling of nested synchronizations via count; also, allow (expensive) synchronized timestepping if user timesteps inside a synchronized-field state M ./src/energy_and_flux.cpp -4 +6 M ./src/fields.cpp -2 +1 M ./src/meep.hpp -1 +1 M ./src/step.cpp -1 +14 Sat Jul 19 20:02:00 EDT 2008 stevenj@fftw.org * typo M ./NEWS -2 +2 Sat Jul 19 19:56:20 EDT 2008 stevenj@fftw.org tagged meep-0.20 Sat Jul 19 19:53:58 EDT 2008 stevenj@fftw.org * added perfect-magnetic/electric-conductor predefined materials; epsilon now defaults to 1 for the medium M ./NEWS +6 M ./libctl/meep.scm.in -1 +3 Sat Jul 19 13:28:06 EDT 2008 stevenj@fftw.org * pml test with length is now a little more stringent (checks that dependence is really 1/L^6, and not better) M ./tests/pml.cpp -27 +11 Sat Jul 19 12:39:34 EDT 2008 stevenj@fftw.org * make sync/restore magnetic fields idempotent, as synchronizations might be nested (especially in libctl UI) M ./src/energy_and_flux.cpp +4 M ./src/fields.cpp +3 M ./src/meep.hpp +1 M ./src/step.cpp +2 Fri Jul 18 19:58:06 EDT 2008 stevenj@fftw.org * clarification M ./NEWS -2 +3 Fri Jul 18 19:49:47 EDT 2008 stevenj@fftw.org * copyright year update to 2008 M ./COPYRIGHT -1 +1 M ./NEWS -1 +1 M ./libctl/meep.scm.in -1 +1 M ./src/bands.cpp -1 +1 M ./src/bicgstab.cpp -1 +1 M ./src/bicgstab.hpp -1 +1 M ./src/boundaries.cpp -1 +1 M ./src/control_c.cpp -1 +1 M ./src/cw_fields.cpp -1 +1 M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -1 +1 M ./src/fields.cpp -1 +1 M ./src/grace.cpp -1 +1 M ./src/h5fields.cpp -1 +1 M ./src/h5file.cpp -1 +1 M ./src/initialize.cpp -1 +1 M ./src/integrate.cpp -1 +1 M ./src/loop_in_chunks.cpp -1 +1 M ./src/meep.hpp -1 +1 M ./src/meep/mympi.hpp -1 +1 M ./src/meep/vec.hpp -1 +1 M ./src/meep_internals.hpp -1 +1 M ./src/monitor.cpp -1 +1 M ./src/mympi.cpp -1 +1 M ./src/output_directory.cpp -1 +1 M ./src/polarization.cpp -1 +1 M ./src/sources.cpp -1 +1 M ./src/sphere-quad.cpp -1 +1 M ./src/step.cpp -1 +1 M ./src/step_db.cpp -1 +1 M ./src/structure.cpp -1 +1 M ./src/time.cpp -1 +1 M ./src/update_e_from_d.cpp -1 +1 M ./src/update_from_e.cpp -1 +1 M ./src/update_h_from_b.cpp -1 +1 M ./src/vec.cpp -1 +1 M ./tests/bench.cpp -1 +1 M ./tests/bragg_transmission.cpp -1 +1 M ./tests/cylindrical.cpp -1 +1 M ./tests/flux.cpp -1 +1 M ./tests/harmonics.cpp -1 +1 M ./tests/integrate.cpp -1 +1 M ./tests/known_results.cpp -1 +1 M ./tests/one_dimensional.cpp -1 +1 M ./tests/physical.cpp -1 +1 M ./tests/symmetry.cpp -1 +1 M ./tests/three_d.cpp -1 +1 M ./tests/two_dimensional.cpp -1 +1 Fri Jul 18 19:46:30 EDT 2008 stevenj@fftw.org * missing string.h header (for gcc 4.3; see debian bug #455289) M ./src/step_db.cpp +1 M ./src/update_e_from_d.cpp +2 M ./src/update_h_from_b.cpp +17 Fri Jul 18 18:58:53 EDT 2008 stevenj@fftw.org * fix PML test to test whether reflection converges to zero with increasing resolution M ./tests/pml.cpp -201 +127 Fri Jul 18 18:18:23 EDT 2008 stevenj@fftw.org * honor quiet flag in structure.cpp M ./src/structure.cpp -3 +4 Fri Jul 18 17:17:40 EDT 2008 stevenj@fftw.org * updated archflag guesses from fftw M ./m4/ax_gcc_archflag.m4 -24 +31 Fri Jul 18 17:11:06 EDT 2008 stevenj@fftw.org * 0.20 release date M ./NEWS -1 +1 Fri Jul 18 17:09:24 EDT 2008 stevenj@fftw.org * updated TODO M ./TODO -8 +2 Fri Jul 18 16:58:59 EDT 2008 ardavan@mit.edu * libctl 3.0.3 is required, to support boolean object properties M ./configure.ac -1 +1 Fri Jul 18 16:34:14 EDT 2008 ardavan@mit.edu * check for libctl in /usr/share/libctl3 M ./configure.ac +3 Fri Jul 18 14:00:57 EDT 2008 stevenj@fftw.org * Hx source seems to couple better to modes than Ez src, gives more reliable results for ring example M ./examples/ring.ctl -1 +1 Fri Jul 18 13:46:21 EDT 2008 stevenj@fftw.org * make is-integrated?=false the default for sources M ./NEWS -1 +2 M ./libctl/meep.scm.in -1 +1 Fri Jul 18 13:12:17 EDT 2008 stevenj@fftw.org * made 1d symmetry tests a little bigger so that the tests are big enough to run on 8 processors M ./tests/symmetry.cpp -2 +2 Fri Jul 18 12:54:01 EDT 2008 stevenj@fftw.org * tolerance was a little too low in cylindrical.cpp for new code (where the roundoff error depends on the splitting) M ./tests/cylindrical.cpp -2 +2 Fri Jul 18 12:52:20 EDT 2008 stevenj@fftw.org * bug fix in and_to_all/or_to_all - was passing wrong type (bool instead of int); also eliminate a couple of unnecessary memcpy's M ./src/mympi.cpp -7 +14 Wed Jul 16 18:51:41 EDT 2008 stevenj@fftw.org * slight code simplification M ./src/structure.cpp -2 +4 Wed Jul 16 18:40:52 EDT 2008 stevenj@fftw.org * typo in comment M ./src/boundaries.cpp -1 +1 Wed Jul 16 18:29:56 EDT 2008 stevenj@fftw.org * added synchronized-magnetic step func M ./NEWS +4 M ./libctl/meep.scm.in +8 Tue Jul 15 22:51:43 EDT 2008 stevenj@fftw.org * version bump M ./NEWS +32 M ./configure.ac -2 +2 Tue Jul 15 22:04:35 EDT 2008 stevenj@fftw.org * use master_printf rather than printf in tests M ./tests/cylindrical.cpp -11 +11 M ./tests/flux.cpp -4 +4 M ./tests/h5test.cpp -1 +1 M ./tests/physical.cpp -2 +2 Tue Jul 15 22:03:55 EDT 2008 stevenj@fftw.org * fix deadlock bug in chunk connection when H is allocated on some processes but not on others M ./src/step.cpp -1 M ./src/update_h_from_b.cpp +4 Mon Jun 30 17:08:02 EDT 2008 ardfar@mit.edu * added PML test M ./tests/Makefile.am -1 +1 A ./tests/pml.cpp Mon Jun 30 18:33:33 EDT 2008 stevenj@alum.mit.edu * allow user-specified PML profile function and asymptotic (round-trip) reflection M ./libctl/meep.scm.in -1 +3 M ./libctl/structure.cpp -23 +59 M ./src/meep.hpp -8 +19 M ./src/structure.cpp -13 +17 Mon Jun 23 23:09:49 EDT 2008 stevenj@alum.mit.edu * added output-bfield etc. M ./libctl/meep.scm.in +1 Mon Jun 23 19:19:37 EDT 2008 stevenj@alum.mit.edu * slight optimization M ./src/step_generic.cpp -3 +3 Mon Jun 23 19:02:01 EDT 2008 stevenj@alum.mit.edu * use some clever/ugly macros to greatly speed up ksig[] index calculation in the PML loops (makes a significant difference in small benchmarks) M ./src/step_generic.cpp -50 +34 Mon Jun 23 18:20:19 EDT 2008 stevenj@alum.mit.edu * a few small optimizations (factoring out siginv[k], special-casing the most common loop) in update_EDHB M ./src/step_generic.cpp -13 +32 Mon Jun 23 17:36:03 EDT 2008 stevenj@alum.mit.edu * tried using "restrict" keyword to speed things up, but annoying gcc actually slows things down! M ./configure.ac +7 M ./src/step_generic.cpp -22 +27 Mon Jun 23 17:11:40 EDT 2008 stevenj@alum.mit.edu * fixed a typo in the PML offset calculation; this bug apparently doesn't affect the results, but I'm not sure why M ./src/step_generic.cpp -3 +3 Mon Jun 23 16:06:45 EDT 2008 stevenj@alum.mit.edu * optimization - delete offdiagonal inveps when == 0 M ./src/anisotropic_averaging.cpp -3 +18 Mon Jun 23 15:22:00 EDT 2008 stevenj@alum.mit.edu * fix some floating-point thresholds M ./tests/cylindrical.cpp -2 +2 Mon Jun 23 14:53:08 EDT 2008 stevenj@alum.mit.edu * fixed solve_cw, re-enable solve_cw in physical.cpp M ./src/cw_fields.cpp -25 +80 M ./src/meep.hpp -4 +4 M ./src/step.cpp -24 M ./src/update_e_from_d.cpp -3 +9 M ./tests/physical.cpp -22 +18 Sat Jun 21 18:30:29 EDT 2008 stevenj@alum.mit.edu * fix bug in figuring out curl components in 2d, introduced by cylindrical patch; bypass cw_solve in physical.cpp for now ... make check now passes again!! M ./src/fields.cpp -1 +2 M ./tests/physical.cpp +10 Sat Jun 21 01:56:19 EDT 2008 stevenj@alum.mit.edu * verified that changes in known_results were due to changes in PML, and that the new results converge to the old ones as the PML thickens; updated numbers so that known_results passes again M ./tests/known_results.cpp -8 +9 Sat Jun 21 01:21:55 EDT 2008 stevenj@alum.mit.edu * new value for polariton_energy known_result - difference is due to new scheme for synchronizing magnetic fields (I verified that switching back to the old synchronization gives the old result again, so it's not the new timestepping) M ./tests/known_results.cpp -1 +1 Fri Jun 20 21:29:24 EDT 2008 stevenj@alum.mit.edu * I'm convinced that the old Meep had a bug in its update code for Dz at r=0 for m=0, where it was off by a factor of 4 (this effectively multipled epsilon by 4 for one pixel at r=0 for m==0, which causesd only small errors in the results, and still converged, so it went unnoticed) M ./src/step_db.cpp -1 +1 Fri Jun 20 21:19:49 EDT 2008 stevenj@alum.mit.edu * lower tolerance (from zero) in cylindrical.cpp -- because of the new way the (1/r) d(r*f)/dr derivative is computed via a cumsum, the roundoff error depends on the splitting in the r direction M ./tests/cylindrical.cpp -2 +2 Fri Jun 20 18:50:53 EDT 2008 stevenj@alum.mit.edu * fixed some bugs in step_db for Dcyl (wrong radius used at one point, and also treat negative m properly...the latter problem being a bug in the previous Meep too) M ./src/step_db.cpp -7 +8 Fri Jun 20 18:49:34 EDT 2008 stevenj@alum.mit.edu * use new LOOP_OVER_VOL_OWNED0 in step_curl, to avoid the r=0 origin which gets special treatment in Dcyl M ./src/meep/vec.hpp +10 M ./src/step_generic.cpp -8 +8 M ./src/vec.cpp -1 +1 Fri Jun 20 15:42:08 EDT 2008 stevenj@alum.mit.edu * some fixes; m=0 case now matches old code, and also mmatches if we manually multiply m terms by zero in both programs, so eremaining bug is in im/r terms M ./src/step_db.cpp -20 +32 Fri Jun 20 03:27:38 EDT 2008 stevenj@alum.mit.edu * initial stab at re-implementing cylindrical support; compiles, and flux.cpp passes, but cylindrical.cpp still fails M ./src/anisotropic_averaging.cpp -4 +4 M ./src/fields.cpp -3 +13 M ./src/meep.hpp +3 M ./src/meep/vec.hpp +9 M ./src/step_db.cpp -26 +159 M ./src/step_generic.cpp -1 +1 M ./src/structure.cpp -1 +1 Thu Jun 19 20:54:57 EDT 2008 stevenj@alum.mit.edu * unified step_d and step_b into step_db; also, changed d_minus_p to more-generic f_minus_p (both for step_db and in preparation for more unification of magnetic and electric code) ./src/step_d.cpp -> ./src/step_db.cpp M ./src/Makefile.am -1 +1 M ./src/energy_and_flux.cpp -4 +6 r1 M ./src/fields.cpp -9 +7 r1 M ./src/meep.hpp -5 +2 r1 M ./src/meep/vec.hpp -1 +1 M ./src/step.cpp -2 +2 R ./src/step_b.cpp M ./src/step_db.cpp -13 +22 r1 M ./src/update_e_from_d.cpp -12 +16 r1 Thu Jun 19 20:54:08 EDT 2008 stevenj@alum.mit.edu * silence compiler warning M ./tests/symmetry.cpp -2 +2 Thu Jun 19 20:34:04 EDT 2008 stevenj@alum.mit.edu * when copying fields_chunks, be careful not to duplicate H==B fields M ./src/fields.cpp -5 +11 Thu Jun 19 20:17:01 EDT 2008 stevenj@alum.mit.edu * greatly simplified step_d and step_h by allowing step_curl to swap its arguments if g1 is NULL M ./src/step_b.cpp -27 +3 M ./src/step_d.cpp -27 +4 M ./src/step_generic.cpp -4 +9 Thu Jun 19 20:15:51 EDT 2008 stevenj@alum.mit.edu * added FOR_FT_COMPONENTS in preparation for more generic stepping functions M ./src/meep/vec.hpp +3 M ./src/vec.cpp +10 Thu Jun 19 19:39:28 EDT 2008 stevenj@alum.mit.edu * bug fix - B is a pseudovector too (not just H), and use B*H for H_EnergyDensity derived component M ./src/vec.cpp -2 +2 Thu Jun 19 18:43:46 EDT 2008 stevenj@alum.mit.edu * naming consistency (H/E sources vs. B/D sources); also, bug fix in "D" sources, which were supposed to be multiplied by eps but appparently weren't (& implemented similar "B" sources multiplied by mu) M ./src/cw_fields.cpp r1 M ./src/fields.cpp r2 M ./src/meep.hpp r2 M ./src/sources.cpp -3 +7 r2 M ./src/step.cpp -2 +2 r2 M ./src/update_e_from_d.cpp r1 Thu Jun 19 18:16:54 EDT 2008 stevenj@alum.mit.edu * send H, not B, when H==B M ./src/boundaries.cpp -15 +17 Thu Jun 19 18:04:45 EDT 2008 stevenj@alum.mit.edu * in preparation for Dcyl, use function for cyclic shifts of directions M ./src/meep/vec.hpp +11 M ./src/monitor.cpp -6 +2 M ./src/step_b.cpp -4 +6 M ./src/step_d.cpp -4 +5 M ./src/structure.cpp -1 +1 M ./src/update_e_from_d.cpp -8 +8 M ./src/update_h_from_b.cpp -8 +8 Thu Jun 19 18:03:48 EDT 2008 stevenj@alum.mit.edu * can't force_consistency for H, only for B M ./src/cw_fields.cpp -4 +4 M ./src/step.cpp -2 +1 Thu Jun 19 17:41:08 EDT 2008 stevenj@alum.mit.edu * handle u == NULL in update_EDHB M ./src/step_generic.cpp -1 +3 Thu Jun 19 15:58:57 EDT 2008 stevenj@alum.mit.edu * use HUGE_VAL for infinity, since this is in c90 standard and in C++, and is equivalent to INFINITY on IEEE754 systems; don't define "infinity" twice in meep.scm M ./libctl/meep.scm.in -2 M ./src/meep.hpp -5 +1 Thu Jun 19 15:49:12 EDT 2008 stevenj@alum.mit.edu * implement output-mu and related functions to output/integrate Permeability M ./libctl/meep.scm.in +1 M ./src/h5fields.cpp -4 +34 M ./src/integrate.cpp -7 +37 M ./src/loop_in_chunks.cpp +2 M ./src/monitor.cpp -1 +4 Thu Jun 19 15:48:50 EDT 2008 stevenj@alum.mit.edu * whoops, typo (set_mu wrote to inveps instead of invmu) M ./src/anisotropic_averaging.cpp -2 +2 Thu Jun 19 02:30:32 EDT 2008 stevenj@alum.mit.edu * fix a couple of memory leaks M ./src/boundaries.cpp +1 M ./src/dft.cpp +2 Thu Jun 19 01:17:18 EDT 2008 stevenj@alum.mit.edu * only allocate separate B and H fields if necessary + many related changed now, unnecessary H fields are set == B at the pointer level; H is allocated lazily, just before needed, in PML regions or when mu!=1, to guarantee consistency allow invmu to be NULL allow user-specification of mu != 1 (although no averaging is done yet) don't use PML equations if unnecessary - in the PML regions, some components may still be updated with the ordinary equations fix potential bug in update_EDHB where the PML equations might not have been used if g1 and g2 were swapped, since that also swaps sigsize_dsig1 the PML equations in nonlinear materials now use the fields, not the fields multiplied by (1+sigma) etc., to determine the nonlinear coefficient, which seems more correct (and allows us to switch to the non-PML equations in more cases) M ./src/anisotropic_averaging.cpp -1 +7 M ./src/boundaries.cpp -2 +21 M ./src/energy_and_flux.cpp -1 +3 M ./src/fields.cpp -1 +10 M ./src/meep.hpp -1 +1 M ./src/meep/mympi.hpp +2 M ./src/mympi.cpp +14 M ./src/step_generic.cpp -19 +29 M ./src/structure.cpp -1 +1 M ./src/update_h_from_b.cpp -19 +38 Thu Jun 19 01:12:53 EDT 2008 stevenj@alum.mit.edu * in mix_with, handle case where two structures don't have the same inveps/invmu/conductivity allocated M ./src/structure.cpp -10 +47 Thu Jun 19 01:04:26 EDT 2008 ardavan@mit.edu * updated numbers in harmonics test (slightly changed by new PML) M ./tests/harmonics.cpp -4 +4 Thu Jun 19 00:12:11 EDT 2008 stevenj@alum.mit.edu * silence compiler warnings M ./src/energy_and_flux.cpp -1 +1 M ./src/integrate.cpp +1 Wed Jun 18 22:14:24 EDT 2008 stevenj@alum.mit.edu * silence some compiler warnings M ./src/h5file.cpp -4 +3 Wed Jun 18 21:48:59 EDT 2008 stevenj@alum.mit.edu * have_component should return true if *any* of the owned chunks have the component, not just the first owned chunk -- this doesn't seem to have caused problems in the past, but it 's a bit unsafe M ./src/fields.cpp -2 +2 Wed Jun 18 18:00:46 EDT 2008 stevenj@alum.mit.edu * compute magnetic energy as B*H, not |H|^2 M ./src/energy_and_flux.cpp -2 +3 Wed Jun 18 17:18:50 EDT 2008 stevenj@alum.mit.edu * don't use conductivity and chi2/chi3 in chunks where they are zero M ./src/anisotropic_averaging.cpp -30 M ./src/structure.cpp -4 +63 Wed Jun 18 17:16:51 EDT 2008 stevenj@alum.mit.edu * bug fix in new PML: f_prev should be D-P, not D M ./src/energy_and_flux.cpp +3 M ./src/step_d.cpp -5 +7 Wed Jun 18 01:17:37 EDT 2008 stevenj@alum.mit.edu * added conductivity & mu support to libctl (although mu support still needs to be enabled in C++); conductivity seems to work in simple tests M ./libctl/meep.scm.in -1 +10 M ./libctl/structure.cpp -69 +142 M ./src/anisotropic_averaging.cpp -20 +19 M ./src/meep.hpp -3 +7 M ./src/structure.cpp +3 Wed Jun 18 00:45:35 EDT 2008 stevenj@alum.mit.edu * fix (harmless) compiler warnings M ./src/h5fields.cpp -4 +6 Tue Jun 17 23:43:39 EDT 2008 stevenj@alum.mit.edu * initial stab at general conductivity support (diagonal anisotropic B or D conductors) - untested (but compiles and shouldn't affect programs not using the conducitivity) M ./src/anisotropic_averaging.cpp -1 +31 M ./src/meep.hpp -21 +12 M ./src/meep_internals.hpp +24 M ./src/step.cpp +3 M ./src/step_b.cpp -5 +10 M ./src/step_d.cpp -5 +10 M ./src/step_generic.cpp -19 +63 M ./src/structure.cpp -27 +83 Tue Jun 17 23:42:49 EDT 2008 stevenj@alum.mit.edu * error thresholds were too low (passed on x86 in extended-precision mode, but not on x86_64 with ordinary double precision); also, work around weird gcc problem with array of fields/structures M ./tests/symmetry.cpp -23 +27 Tue Jun 17 23:41:47 EDT 2008 stevenj@alum.mit.edu * don't forget to call set_volume in set_mu M ./src/anisotropic_averaging.cpp -1 +4 Tue Jun 17 23:41:05 EDT 2008 stevenj@alum.mit.edu * work around mysterious valgrind complaint about uninitialized var when running bragg_transmission.dac; also, slight code cleanup (PASTE macro was unnecessary) M ./src/step_generic.cpp -12 +22 Tue Jun 17 18:04:53 EDT 2008 stevenj@alum.mit.edu * slight clarification (behavior unchanged) M ./src/structure.cpp -1 +1 Tue Jun 17 17:22:39 EDT 2008 stevenj@alum.mit.edu * remove redundnant test M ./src/step_generic.cpp -12 +6 Tue Jun 17 17:05:44 EDT 2008 stevenj@alum.mit.edu * use macros to reduce cut-and-paste in update_EDHB, and fix several bugs in index computations M ./src/step_generic.cpp -172 +82 Tue Jun 17 16:52:16 EDT 2008 stevenj@alum.mit.edu * avoid high-symmetry monitor point M ./tests/2D_convergence.cpp -1 +1 Tue Jun 17 15:49:34 EDT 2008 stevenj@alum.mit.edu * remove unused variables/computations M ./src/step_generic.cpp -8 Tue Jun 17 15:18:54 EDT 2008 ardfar@mit.edu * added g2 && !g1 case for non-PML nonlinear M ./src/step_generic.cpp +8 Tue Jun 17 14:43:25 EDT 2008 ardfar@mit.edu * added two more missing files A ./src/step_b.cpp A ./src/update_h_from_b.cpp Tue Jun 17 14:42:57 EDT 2008 ardfar@mit.edu * added step_generic A ./src/step_generic.cpp Tue Jun 17 11:50:14 EDT 2008 ardfar@mit.edu * set default Rabs to 1e-15 (todo: make this user-configurable, along with PML profile) M ./src/structure.cpp -1 +1 Tue Jun 17 11:49:50 EDT 2008 ardfar@mit.edu * handle off-diagonal inveps M ./src/update_e_from_d.cpp -2 +2 Tue Jun 17 11:39:53 EDT 2008 ardfar@mit.edu * optimization - only call average_with_backup if is_mine M ./src/energy_and_flux.cpp -4 +5 Sun Jun 15 22:09:54 EDT 2008 ardfar@mit.edu * lower tolerance still works M ./tests/two_dimensional.cpp -1 +1 Thu Jun 12 20:15:18 EDT 2008 ardfar@mit.edu * tolerances were too low (the energy numbers fluctuate a little from timestep to timestep, and the old tolerance was right on the borderline) M ./tests/two_dimensional.cpp -1 +1 Thu Jun 12 20:07:07 EDT 2008 stevenj@fftw.org * fixed relative phase of E and H sources (which were wrong by half a timestep); also, tolerance in two_dimensional.cpp was too low (changing the runtime by half a timestep changed the energy by more than the tolerance for the decay rate) M ./src/sources.cpp +3 M ./src/step.cpp -2 +4 M ./tests/two_dimensional.cpp -1 +1 Thu Jun 12 19:02:24 EDT 2008 ardfar@mit.edu * resolve conflicting patch M ./src/update_e_from_d.cpp -60 +12 Tue Nov 13 15:27:02 EST 2007 stevenj@fftw.org tagged 0.10.1 Thu Aug 16 13:33:34 EDT 2007 stevenj@fftw.org * version bump to 0.10.1 (not final until tag!) M ./configure.ac -2 +2 Wed Aug 15 22:41:37 EDT 2007 stevenj@fftw.org * update_e_from_d should only update owned E's M! ./src/update_e_from_d.cpp -12 +60 Thu Jun 12 18:33:34 EDT 2008 ardfar@mit.edu * separate f_prev and f_backup, add synchronize_magnetic_fields function M ./src/cw_fields.cpp -2 +2 M ./src/energy_and_flux.cpp -53 +46 M ./src/fields.cpp +4 M ./src/meep.hpp -6 +9 M ./src/step_d.cpp -1 +6 M ./src/update_e_from_d.cpp -1 +1 Thu Jun 12 15:23:41 EDT 2008 ardfar@mit.edu * forgot to record this M ./src/structure.cpp -18 Thu Jun 12 15:22:03 EDT 2008 ardfar@mit.edu * slight cleanup M ./src/meep.hpp -3 +1 Thu Jun 12 14:44:04 EDT 2008 ardfar@mit.edu * big patch to rewrite timestepping and PML, and add mu/B M ./src/Makefile.am -12 +3 M ./src/anisotropic_averaging.cpp -1 +16 M ./src/cw_fields.cpp -29 +24 M ./src/energy_and_flux.cpp -35 +50 M ./src/fields.cpp -43 +4 M ./src/initialize.cpp +1 M ./src/meep.hpp -15 +45 M ./src/meep/vec.hpp -19 +24 M ./src/step.cpp -8 +16 M ./src/step_d.cpp -150 +40 R ./src/step_h.cpp M ./src/structure.cpp -69 +93 M ./src/update_e_from_d.cpp -152 +24 M ./src/vec.cpp -1 +7 M ./tests/harmonics.cpp -7 +7 M ./tests/symmetry.cpp -2 Fri Apr 25 15:42:38 EDT 2008 stevenj@fftw.org * is-integrated?, not is-integrated M ./libctl/meep.scm.in -4 +4 Thu Apr 24 21:08:03 EDT 2008 stevenj@fftw.org * added store-polarization-energy? input variable to support that feature of the polarizations M ./libctl/meep.scm.in -3 +5 Thu Apr 24 21:01:49 EDT 2008 stevenj@fftw.org * disable slow, undocumented saturable-absorber support by default; use simple hand-written alternative in update_from_e.cpp; computingg polarization energy is now optional (to save memory and time since it is rarely used in practice) M ./configure.ac +7 M ./src/fields.cpp -7 +8 M ./src/meep.hpp -3 +3 M ./src/meep_internals.hpp -3 +4 M ./src/polarization.cpp -4 +11 M ./src/update_e_from_d.cpp -11 +13 M ./src/update_from_e.cpp -1 +34 M ./tests/known_results.cpp -1 +5 Thu Apr 24 20:55:17 EDT 2008 stevenj@fftw.org * typo M ./configure.ac -1 +1 Thu Apr 24 20:54:49 EDT 2008 stevenj@fftw.org * fix thermal_energy to include all polarization contributions M ./src/energy_and_flux.cpp -4 +5 Thu Apr 24 20:54:26 EDT 2008 stevenj@fftw.org * fixed cw_solve to work with recent patch for non-integrated currents M ./src/cw_fields.cpp -1 +1 M ./src/meep.hpp -2 +2 M ./src/step.cpp -5 +6 Thu Apr 24 20:40:32 EDT 2008 stevenj@fftw.org * disable checks for floating-point exceptions in debugging mode, as some versions of g++ seem to have spurious exceptions in the complexx number routines(?) M ./src/mympi.cpp -1 +1 Sun Apr 6 20:28:31 EDT 2008 stevenj@fftw.org * support HDF5 1.8 M ./src/h5file.cpp +4 Sun Apr 6 13:56:43 EDT 2008 stevenj@fftw.org * more robust link check for guile when guile-config not available M ./configure.ac -1 +2 Sun Apr 6 13:54:52 EDT 2008 stevenj@fftw.org * no way to test how to activate readline when cross-compiling M ./configure.ac +2 Sun Jan 6 16:37:49 EST 2008 stevenj@fftw.org * add to TODO M ./TODO +6 Fri Dec 21 20:05:17 EST 2007 stevenj@fftw.org * fix h5 filename timestamps for cases where dt is very small or very large (just use the integer time step number in that case) M ./src/h5fields.cpp -1 +6 Fri Dec 14 14:19:29 EST 2007 stevenj@fftw.org * check for ctl.h in /usr/include/ctl/, which is the default under Fedora (grrr) M ./configure.ac -1 +15 M ./libctl/Makefile.am -1 +1 Thu Dec 6 20:03:02 EST 2007 stevenj@fftw.org * added is_integrated option to src_time to allow non-integrated E sources and non-integrated custom sources M ./libctl/meep.scm.in -18 +25 M ./src/meep.hpp -2 +17 M ./src/step.cpp -4 +2 M ./src/update_e_from_d.cpp -2 +9 Tue Nov 13 15:15:27 EST 2007 stevenj@fftw.org * release date for 0.10.1 M ./NEWS -1 +1 Tue Nov 13 15:13:59 EST 2007 stevenj@fftw.org * update copyright year to 2007 M ./COPYRIGHT -1 +1 M ./libctl/meep.scm.in -1 +1 M ./src/bands.cpp -1 +1 M ./src/bicgstab.cpp -1 +1 M ./src/bicgstab.hpp -1 +1 M ./src/boundaries.cpp -1 +1 M ./src/control_c.cpp -1 +1 M ./src/cw_fields.cpp -1 +1 M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -1 +1 M ./src/fields.cpp -1 +1 M ./src/grace.cpp -1 +1 M ./src/h5fields.cpp -1 +1 M ./src/h5file.cpp -1 +1 M ./src/initialize.cpp -1 +1 M ./src/integrate.cpp -1 +1 M ./src/loop_in_chunks.cpp -1 +1 M ./src/meep.hpp -1 +1 M ./src/meep/mympi.hpp -1 +1 M ./src/meep/vec.hpp -1 +1 M ./src/meep_internals.hpp -1 +1 M ./src/monitor.cpp -1 +1 M ./src/mympi.cpp -1 +1 M ./src/output_directory.cpp -1 +1 M ./src/polarization.cpp -1 +1 M ./src/sources.cpp -1 +1 M ./src/sphere-quad.cpp -1 +1 M ./src/step.cpp -1 +1 M ./src/step_d.cpp -1 +1 M ./src/step_h.cpp -1 +1 M ./src/structure.cpp -1 +1 M ./src/time.cpp -1 +1 M ./src/update_e_from_d.cpp -1 +1 M ./src/update_from_e.cpp -1 +1 M ./src/vec.cpp -1 +1 M ./tests/bench.cpp -1 +1 M ./tests/bragg_transmission.cpp -1 +1 M ./tests/cylindrical.cpp -1 +1 M ./tests/flux.cpp -1 +1 M ./tests/harmonics.cpp -1 +1 M ./tests/integrate.cpp -1 +1 M ./tests/known_results.cpp -1 +1 M ./tests/one_dimensional.cpp -1 +1 M ./tests/physical.cpp -1 +1 M ./tests/symmetry.cpp -1 +1 M ./tests/three_d.cpp -1 +1 M ./tests/two_dimensional.cpp -1 +1 Mon Nov 12 19:34:43 EST 2007 stevenj@fftw.org * updated NEWS M ./NEWS +33 Mon Nov 12 18:58:32 EST 2007 stevenj@fftw.org * shorten long h5test M ./tests/h5test.cpp -32 +52 Mon Nov 12 18:30:09 EST 2007 stevenj@fftw.org * fix several deadlocks when using serial HDF5 with parallel Meep M ./src/h5fields.cpp +1 M ./src/h5file.cpp -2 +4 M ./tests/h5test.cpp +3 Sat Nov 10 19:54:33 EST 2007 stevenj@fftw.org * fix small mem leak M ./src/h5file.cpp -2 +4 Sat Oct 20 13:34:19 EDT 2007 stevenj@fftw.org * attempt to auto-detect -package name for ghc stuff, since apparently ghc keeps changing it (grr); thanks to Liang Huo for the bug report M ./configure.ac -1 +20 M ./hsrc/Makefile.am -1 +1 Mon Oct 8 19:02:15 EDT 2007 stevenj@fftw.org * bug fix -- dft_chunk objects were improperly disposed of in ~fields due to confusion between next_in_chunk and next_in_dft, thanks to Alex McCauley for the bug report and twinkies M ./src/dft.cpp -6 +20 M ./src/fields.cpp -1 +5 M ./src/meep.hpp -1 +1 Mon Oct 8 19:00:42 EDT 2007 stevenj@fftw.org * eliminate compiler warnings about unused params M ./src/meep.hpp -6 +6 Mon Oct 8 18:22:47 EDT 2007 stevenj@fftw.org * set fluxes = NULL after remove_fluxes M ./src/fields.cpp +1 Thu Aug 16 13:30:18 EDT 2007 stevenj@fftw.org * 2D saturated polariton known_results fails on 4 processors; according to darcs trackdown this has failed since at least 2005, so it's not clear that it ever worked M ./tests/known_results.cpp -2 +3 Wed Aug 15 22:41:22 EDT 2007 stevenj@fftw.org * comment fix M ./src/boundaries.cpp -1 +1 Wed Aug 15 17:28:10 EDT 2007 stevenj@fftw.org * flux.cpp test case accidentally put flux plane inside PML M ./tests/flux.cpp -1 +1 Wed Aug 15 17:27:32 EDT 2007 stevenj@fftw.org * fixed bug in flux_in_box: accidentally returned flux * number of processes, instead of flux! yikes, caused 'make check' to fail with MPI, too M ./src/energy_and_flux.cpp -1 +1 Wed Aug 15 16:54:25 EDT 2007 stevenj@fftw.org * restored legacy simplistic averaging code, modified slightly to remove potential instability, with comment explaining that this code somehow yields quadratic convergence in one of the test cases (although not in general), indicating that there may be a method behind the madness M ./src/anisotropic_averaging.cpp -11 +37 M ./tests/convergence_cyl_waveguide.cpp -2 +2 Wed Aug 15 16:27:23 EDT 2007 stevenj@fftw.org * disable epsilon averaging for pixels that include metals (eps < 0), since this can lead to an 0 < average epsilon < 1, which causes instabilities by changing the Courant condition (apparently) M ./libctl/structure.cpp -4 +18 M ./src/anisotropic_averaging.cpp -1 +21 Wed Aug 15 15:44:07 EDT 2007 stevenj@fftw.org * run h5topng only once on multiple CPUs, avoid race condition M ./libctl/meep.scm.in -2 +4 Wed Aug 15 15:43:22 EDT 2007 stevenj@fftw.org * fix deadlock for output-hfield etc. reported by Lingling Tang (deadlocks when using non-MPI HDF5) M ./libctl/meep.scm.in -1 +5 M ./src/h5file.cpp -8 +11 Fri Aug 10 10:53:06 EDT 2007 stevenj@fftw.org * update acx_blas M ./m4/acx_blas.m4 -1 +16 Mon Jun 25 17:29:24 EDT 2007 ardfar@mit.edu * use delete[] not delete for deallocating new char[] array M ./src/h5file.cpp -3 +3 Wed May 9 19:41:29 EDT 2007 stevenj@fftw.org * update hsrc/Makefile for ghc-6.6 M ./hsrc/Makefile.am -1 +1 Wed Apr 18 18:23:01 EDT 2007 stevenj@fftw.org * bug fix: subpixel averaging was disabled for dimensions=1 (thanks to Mischa Megens for the bug report) M ./libctl/structure.cpp -1 +1 Mon Jan 15 16:45:27 EST 2007 stevenj@fftw.org * delete cruft M ./examples/pw-source.ctl -2 Thu Jan 4 20:47:38 EST 2007 stevenj@fftw.org * MPI_LONG_DOUBLE is optional in the MPI standard, so check before using it in MPI_Allreduce M ./src/mympi.cpp -2 +11 Tue Jan 2 21:30:53 EST 2007 stevenj@fftw.org * fixed bug that prevented output-tot-pwr from working; thanks to Vyacheslav Sokolov for the bug report M ./src/h5fields.cpp -1 +1 M ./src/integrate.cpp -1 +1 M ./src/meep.hpp -1 +1 M ./src/vec.cpp -2 +2 Thu Nov 2 15:17:51 EST 2006 stevenj@fftw.org * make at-every less susceptible to rounding; thanks to L. Le Guyader for the bug report M ./libctl/meep.scm.in -1 +2 Fri Oct 20 18:09:36 EDT 2006 stevenj@fftw.org * include -march in pkgconfig flags (g++ requires it, apparently) M ./configure.ac +12 M ./meep.pc.in -1 +1 Sat Sep 30 13:49:40 EDT 2006 stevenj@fftw.org * fix bug reported by J. L. Silva, where polarization memory was not parallelized M ./src/polarization.cpp -1 +1 Sat Sep 30 13:49:26 EDT 2006 stevenj@fftw.org * consistency M ./src/anisotropic_averaging.cpp +2 Mon Sep 18 21:50:06 EDT 2006 stevenj@fftw.org * custom_src_time should respect start_time M ./src/meep.hpp -1 +2 Mon Aug 28 13:54:42 EDT 2006 stevenj@fftw.org * bug fix in output-png+h5, thanks to Chad Husko M ./libctl/meep.scm.in -1 +1 Mon Aug 21 19:44:04 EDT 2006 stevenj@fftw.org tagged 0.10 Mon Aug 21 19:09:43 EDT 2006 stevenj@fftw.org * really include meep-enums.scm M ./libctl/Makefile.am -1 +1 Mon Aug 21 18:22:18 EDT 2006 stevenj@fftw.org * version bump M ./NEWS -4 +4 M ./configure.ac -2 +2 Fri Aug 18 14:01:51 EDT 2006 stevenj@fftw.org * avoid printing redundant messages about padding M ./src/structure.cpp -2 +2 Tue Aug 8 20:21:33 EDT 2006 stevenj@fftw.org * fix test case to handle nlo != 1 M ./tests/bragg_transmission.cpp -3 +3 Mon Aug 7 13:48:19 EDT 2006 stevenj@fftw.org * updated NEWS for upcoming 0.10 M ./NEWS +49 Sun Aug 6 00:27:57 EDT 2006 stevenj@fftw.org * added testcase for 2nd/3rd harmonic generation M ./tests/Makefile.am -1 +1 A ./tests/harmonics.cpp Sat Aug 5 23:05:58 EDT 2006 stevenj@fftw.org * turned on polariton symmetry tests, with slightly increased tolerances M ./tests/symmetry.cpp -12 +8 Sat Aug 5 22:39:00 EDT 2006 stevenj@fftw.org * add nonlinear symmetry tests The nonlinear symmetry tests had been disabled because they caused the symmmetry.dac test to fail. I had assumed this was a bug, but now I'm not so sure. First, the nonlinear calculations rely on an averaging of field values from adjacent points, and this averaging process will differ by rounding errors when using symmetries (e.g. left + right + top + bottom may change to right + left + top + bottom, which differs by rounding). So, I had to decrease the error threshold for the nonlinear tests. Second, a more serious concern: symmetry is not necessarily preserved when rounding is included. A simple example is that exp(i m phi) modes in a cylindrical waveguide may be converted to exp(3 i m phi) modes by a Kerr nonlinearity, analogous to 3rd harmonic generation. I *think* that this conversion does not occur for the trivial representation (analogous to m=0), but I'm not 100% sure. So, the nonlinear tests (which use the trivial representation, i.e. no phase factor) should be okay... However, e.g. the rot4z symmetry test still fails if I use *both* TM and TE sources (which interact due to the nonlinearity). Outputting the fields, it looks like a nonsymmetric pattern really is generated after a while in this case. Perhaps this is a numerical effect, related to the rounding mentioned above? M ./tests/symmetry.cpp -30 +35 Sat Aug 5 00:59:36 EDT 2006 stevenj@fftw.org * turn on epsilon averaging by default in libctl interface -- the speed penalty seems to be only about 10%, and the huge accuracy gains (as well as continuous sensitivity to geometry) are more than worth it M ./libctl/meep.scm.in -1 +1 Sat Aug 5 00:56:16 EDT 2006 stevenj@fftw.org * slight optimization in handling off-diagonal epsilon Checking whether the off-diagonal inveps components are zero leads to a slight (< 10%) speed increase on our Pentium IVs, probably thanks to the avoided loads of the off-diagonal fields. On the other hand, keeping a separate array of flags is definitely not a win--it is better to check inveps directly. M ./src/update_e_from_d.cpp -8 +15 Sat Aug 5 00:54:56 EDT 2006 stevenj@fftw.org * bug fix - set_epsilon should delete off-diagonal inveps components when averaging is not being used (otherwise, doing set_epsilon with averaging followed by set_epsilon with no averaging leads to wrong results) M ./src/anisotropic_averaging.cpp +2 Fri Aug 4 20:39:37 EDT 2006 stevenj@fftw.org * some explanatory comments for Pade approximant M ./src/update_e_from_d.cpp -3 +10 Fri Aug 4 03:15:24 EDT 2006 stevenj@fftw.org * merge chi2 (pockels) stuff from Ardavan M ./libctl/meep.scm.in +1 M ./libctl/structure.cpp +52 M ./src/meep.hpp -2 +7 M ./src/structure.cpp -10 +54 M ./src/update_e_from_d.cpp -12 +19 Fri Aug 4 02:21:21 EDT 2006 stevenj@fftw.org * rename kerr to chi3 in preparation for Ardavan chi2 merge M ./doc/nonlinear.tex -2 +2 M ./libctl/structure.cpp -9 +9 r1 M ./src/meep.hpp -1 +1 r3 M ./src/structure.cpp r3 M ./src/update_e_from_d.cpp r3 M ./tests/bench.cpp r1 M ./tests/symmetry.cpp r1 Fri Aug 4 02:10:52 EDT 2006 stevenj@fftw.org * kerr does not require d_minus_p M ./src/update_e_from_d.cpp -2 +1 Fri Aug 4 02:02:12 EDT 2006 stevenj@fftw.org * eliminate update_e_from_d_update.hpp in favor of much smaller, somewhat faster, and more maintainable hand-written version M ./src/Makefile.am -5 +2 M ./src/meep.hpp -3 M ./src/update_e_from_d.cpp -3 +225 R ./src/update_e_from_d_prepare.cpp R ./src/update_e_from_d_sources.cpp R ./src/update_e_from_d_update.cpp Thu Aug 3 17:06:49 EDT 2006 stevenj@fftw.org * eliminated generated update_e_from_d_prepare.hpp (a lot of pointlessly duplicated code), and sped up somewhat, and eliminated old/unused ran.* files M ./src/Makefile.am -8 +5 R ./src/ran.cpp R ./src/ran.hpp M ./src/step_d.cpp -1 M ./src/step_h.cpp -1 M ./src/update_e_from_d_prepare.cpp -3 +34 M ./src/update_from_e.cpp -1 Thu Aug 3 15:31:33 EDT 2006 stevenj@fftw.org * do correct cylindrical integration for fallback_meaneps M ./libctl/structure.cpp -7 +12 Thu Aug 3 14:58:31 EDT 2006 stevenj@fftw.org * fixed(?) failure of convergence_cyl_waveguide test M ./src/anisotropic_averaging.cpp -7 +7 M ./tests/convergence_cyl_waveguide.cpp +2 Wed Aug 2 22:24:51 EDT 2006 stevenj@fftw.org * fixed libctl fallback to use proper cubature M ./libctl/structure.cpp -3 +77 Wed Aug 2 21:48:01 EDT 2006 stevenj@fftw.org * minor bugfix to default meaneps routine (shouldn't affect results much) M ./src/anisotropic_averaging.cpp -8 +12 Wed Aug 2 21:15:06 EDT 2006 stevenj@fftw.org * allowed user control of subpixel tolerance via subpixel-tol and subpixel-maxeval parameters, and set these to more modest values, and output progress indicator during subpixel averaging (since it may be slow in 3d) M ./libctl/meep-ctl-swig.hpp +1 M ./libctl/meep.scm.in -1 +4 M ./libctl/structure.cpp -4 +10 M ./src/anisotropic_averaging.cpp -12 +31 M ./src/meep.hpp -6 +17 M ./src/meep_internals.hpp +2 M ./src/step.cpp -2 M ./src/structure.cpp -4 +6 Wed Aug 2 20:03:23 EDT 2006 stevenj@fftw.org * merged Ardavan's much-improved subpixel-averaging code, after deleting a lot of obsolete stuff. M ./libctl/structure.cpp -13 +183 M ./src/Makefile.am -2 +2 M ./src/anisotropic_averaging.cpp -101 +199 M ./src/meep.hpp -5 +18 M ./src/meep/vec.hpp -1 +3 M ./src/structure.cpp -71 +9 R ./src/threevec.hpp M ./src/vec.cpp -2 +10 Wed Aug 2 19:26:43 EDT 2006 stevenj@fftw.org * remove debugging printf M ./src/sources.cpp -2 Wed Aug 2 14:08:03 EDT 2006 stevenj@fftw.org * remove annoying restriction on symmetries requiring even number of grid points, since this is no longer required (an extra pixel is added as needed) M ./src/structure.cpp -2 +2 Fri Jul 28 11:36:03 EDT 2006 stevenj@fftw.org * use $(EXEEXT) in dependency, thanks to Christopher Kang for the bug report M ./src/Makefile.am -1 +1 Tue Jul 25 23:52:34 EDT 2006 stevenj@fftw.org * add structure::print_layout for debugging M ./src/meep.hpp +1 M ./src/sources.cpp +2 M ./src/structure.cpp +19 Wed Jul 5 17:06:27 EDT 2006 stevenj@fftw.org * remove obsolete slice output and (64-bit unclean) file* stuff M ./doc/Makefile.am -2 +4 M ./doc/complicated.tex -8 +8 M ./doc/energy_cons_1d.tex -1 M ./doc/example.cpp -2 +2 M ./doc/lossgain_epsilon.tex -3 +1 M ./doc/nonlinear.tex -2 +1 M ./doc/omniguide.tex -1 M ./doc/simple.tex -9 +7 M ./doc/simplebands.tex -2 +2 M ./src/Makefile.am -1 +1 M ./src/bands.cpp -11 +13 M ./src/grace.cpp -25 +30 M ./src/meep.hpp -49 +4 M ./src/meep/mympi.hpp -11 +3 M ./src/meep/vec.hpp -4 M ./src/mympi.cpp -84 +14 M ./src/output_directory.cpp -2 +2 R ./src/slices.cpp M ./src/vec.cpp -30 M ./tests/cylindrical.cpp -5 M ./tests/one_dimensional.cpp -2 M ./tests/symmetry.cpp -17 M ./tests/three_d.cpp -10 M ./tests/two_dimensional.cpp -4 Sun Jun 25 00:47:58 EDT 2006 stevenj@fftw.org * fix bug in add-flux for multiple flux-regions (thanks to K. Choi for the bug report) M ./libctl/meep-ctl-swig.hpp +6 M ./libctl/meep.cpp +16 M ./libctl/meep.scm.in -3 +6 Mon Jun 12 13:01:20 EDT 2006 stevenj@fftw.org * added simple angled-planewave source example A ./examples/pw-source.ctl Sat May 20 16:05:11 EDT 2006 stevenj@fftw.org * allow source size to exceed cell size by < 1 pixel, to account for rounding (thanks to G. J. Parker for the bug report) M ./src/sources.cpp -4 +13 Fri May 5 13:46:43 EDT 2006 stevenj@fftw.org * harminv now works even if you call it multiple times for one run loop; added harminv! function so that you can change the output data variables (thanks to Aristos for the suggestion) M ./libctl/meep.scm.in -12 +19 Thu May 4 22:57:01 EDT 2006 stevenj@fftw.org * quote filenames passed to shell M ./libctl/meep.scm.in -2 +2 Thu May 4 20:04:36 EDT 2006 stevenj@fftw.org * whoops M ./libctl/meep.scm.in -8 +7 Thu May 4 19:45:30 EDT 2006 stevenj@fftw.org * added with-prefix function to use extra filename prefix for some outputs (e.g. different prefixes for different in-volumes) M ./libctl/meep.scm.in +7 Thu May 4 19:39:04 EDT 2006 stevenj@fftw.org * allow per-volume $EPS filenames M ./libctl/meep.scm.in -5 +12 Thu May 4 19:01:44 EDT 2006 stevenj@fftw.org * two requests from Aristos: added output-png+h5 function that doesn't delete the .h5 file, and now output-png defines $EPS variable that can be used on command line to reference the last epsilon file outputted M ./libctl/meep.scm.in -7 +19 Thu May 4 18:38:50 EDT 2006 stevenj@fftw.org * fix bug in save-flux/load-flux (filename was screwed up and use-output-directory did not work); thanks to Karl Koch for the bug report M ./libctl/meep.scm.in -6 +2 M ./src/dft.cpp -7 +11 M ./src/meep.hpp -2 +4 Wed May 3 16:10:34 EDT 2006 stevenj@fftw.org * add volume::center_origin() M ./libctl/structure.cpp -1 +1 M ./src/meep/vec.hpp -3 +3 Wed May 3 16:09:08 EDT 2006 stevenj@fftw.org * tweaks - include more .i and .scm files in tarball so that they don't need to be generated by user (making complex sed/sh commands portable is hard) M ./libctl/Makefile.am -5 +5 Mon Apr 17 17:27:05 EDT 2006 stevenj@fftw.org * more symmetry fixes, in preparation for allowing symmetry for sizes that are not an even # of pixels M ./libctl/structure.cpp -7 +4 M ./src/meep/vec.hpp +7 M ./src/vec.cpp -7 +11 Wed Apr 12 14:12:12 EDT 2006 stevenj@fftw.org * added missing output-sfield-z etc. commands, in addition to output-poynting-z etc for MPB compatibility; thanks to X. Y. Ao for the bug report M ./libctl/meep.scm.in -1 +2 Wed Apr 12 01:31:53 EDT 2006 stevenj@fftw.org * fixed bug: rotate2 symmetry was totally broken, yikes! M ./src/structure.cpp -2 +10 Wed Apr 12 00:57:13 EDT 2006 stevenj@fftw.org * bug fix in symmetry::operator+ that causes symmetries to be dropped if we added three or more symmetries M ./src/vec.cpp -1 +3 Wed Apr 12 00:56:46 EDT 2006 stevenj@fftw.org * minor cleanups M ./src/vec.cpp -5 +5 Mon Apr 10 13:57:28 EDT 2006 stevenj@fftw.org * flux-in-box etc. convenience functions M ./libctl/meep.scm.in +17 Fri Apr 7 14:02:17 EDT 2006 stevenj@fftw.org * missing string.h headers, thanks to Florencio Garcia M ./src/fields.cpp +1 M ./src/grace.cpp +1 M ./src/h5fields.cpp +1 Fri Apr 7 12:48:42 EDT 2006 stevenj@fftw.org * exit() requires stdlib.h ... reported by Florencio Garcia M ./src/mympi.cpp +1 M ./src/threevec.hpp -2 +1 Wed Apr 5 15:21:50 EDT 2006 stevenj@fftw.org * fixed bugs in previous patch; renamed split_specifically to halve since that's all we use it for, remove some old unused functions M ./src/meep/vec.hpp -3 +1 M ./src/structure.cpp -6 +6 M ./src/vec.cpp -42 +4 Tue Apr 4 23:52:23 EDT 2006 stevenj@fftw.org * silence warning M ./src/dft.cpp -1 Tue Apr 4 23:50:30 EDT 2006 stevenj@fftw.org * don't use C99 round function (replace with more portable my_round); delete some unused cruft M ./src/meep_internals.hpp +5 M ./src/vec.cpp -13 +1 Tue Apr 4 23:41:54 EDT 2006 stevenj@fftw.org * fixed bug reported by Andreas von Rhein - failure in intersect_with due to rounding in origin operations...now most origin operations work on the integer origin io; some code cleanups M ./src/meep/vec.hpp -5 +6 M ./src/structure.cpp -7 +7 M ./src/vec.cpp -51 +51 Tue Apr 4 17:58:27 EDT 2006 stevenj@fftw.org * -lgen required for basename/dirname on SGI; thanks to Robyn Landers M ./configure.ac +3 Sun Apr 2 00:10:31 EST 2006 stevenj@fftw.org tagged 0.9 Sat Apr 1 23:45:10 EST 2006 stevenj@fftw.org * updated NEWS M ./NEWS -1 +1 Sat Apr 1 22:17:25 EST 2006 stevenj@fftw.org * don't use HDF5 when it is not available M ./tests/bragg_transmission.cpp +2 Sat Apr 1 22:10:18 EST 2006 stevenj@fftw.org * use GEN_CTL_IO env. var if present for gen-ctl-io check M ./configure.ac -5 +2 Fri Mar 31 18:07:21 EST 2006 stevenj@fftw.org * updated title page of manual M ./doc/meep.tex -3 +6 Fri Mar 31 18:01:04 EST 2006 stevenj@fftw.org * fixed sign of magnetic current sources (so that continuity equation is satisfied: d(mag. charge density)/dt = -div (magnetic current) ) M ./src/step.cpp -2 +2 Fri Mar 31 16:48:05 EST 2006 stevenj@fftw.org * fixed custom-src M ./libctl/meep.i -3 +6 M ./libctl/meep.scm.in -2 +1 Thu Mar 30 13:20:45 EST 2006 stevenj@fftw.org * README updates M ./README +11 A ./doc/README Thu Mar 30 00:16:10 EST 2006 stevenj@fftw.org * add integrate-field-function and max-abs-field-function to libctl interface M ./libctl/meep.scm.in +23 Wed Mar 29 23:32:24 EST 2006 stevenj@fftw.org * fix output_hdf5 for complex functions; add output-field-function to libctl; add output-single-precision? to libctl M ./libctl/meep.i +2 M ./libctl/meep.scm.in -2 +28 M ./src/h5fields.cpp -13 +17 M ./src/meep.hpp -1 +2 Mon Mar 27 23:17:05 EST 2006 stevenj@fftw.org * fix invalid "friend class injection" (see http://womble.decadentplace.org.uk/c++/syntax-errors.html) M ./src/meep/vec.hpp +24 Mon Mar 27 22:39:25 EST 2006 stevenj@fftw.org * backwards-incompatible change: re-order the arguments for all field_function and and field_rfunction arguments so that the callback void* goes immediately after the callback function; this is to enable these functions to be called from the libctl interface (which requires that SWIG be able to recognize the arguments as a group) M ./libctl/meep.i +37 M ./src/energy_and_flux.cpp -5 +5 M ./src/h5fields.cpp -15 +12 M ./src/integrate.cpp -11 +11 M ./src/meep.hpp -16 +9 M ./tests/integrate.cpp -1 +1 Mon Mar 27 20:59:18 EST 2006 stevenj@fftw.org * version bump, copyright year update M ./AUTHORS +4 M ./COPYRIGHT -1 +1 M ./NEWS -1 +3 M ./TODO -2 M ./configure.ac -1 +1 M ./doc/example.cpp -1 +1 M ./src/bands.cpp -1 +1 M ./src/bicgstab.cpp -1 +1 M ./src/bicgstab.hpp -1 +1 M ./src/boundaries.cpp -1 +1 M ./src/control_c.cpp -1 +1 M ./src/cw_fields.cpp -1 +1 M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -1 +1 M ./src/fields.cpp -1 +1 M ./src/grace.cpp -1 +1 M ./src/h5fields.cpp -1 +1 M ./src/h5file.cpp -1 +1 M ./src/initialize.cpp -1 +1 M ./src/integrate.cpp -1 +1 M ./src/loop_in_chunks.cpp -1 +1 M ./src/meep.hpp -1 +1 M ./src/meep/mympi.hpp -1 +1 M ./src/meep/vec.hpp -1 +1 M ./src/meep_internals.hpp -1 +1 M ./src/monitor.cpp -1 +1 M ./src/mympi.cpp -1 +1 M ./src/output_directory.cpp -1 +1 M ./src/polarization.cpp -1 +1 M ./src/slices.cpp -1 +1 M ./src/sources.cpp -1 +1 M ./src/sphere-quad.cpp -1 +1 M ./src/step.cpp -1 +1 M ./src/step_d.cpp -1 +1 M ./src/step_h.cpp -1 +1 M ./src/structure.cpp -1 +1 M ./src/time.cpp -1 +1 M ./src/update_e_from_d.cpp -1 +1 M ./src/update_e_from_d_prepare.cpp -1 +1 M ./src/update_e_from_d_sources.cpp -1 +1 M ./src/update_e_from_d_update.cpp -1 +1 M ./src/update_from_e.cpp -1 +1 M ./src/vec.cpp -1 +1 M ./tests/bench.cpp -1 +1 M ./tests/bragg_transmission.cpp -1 +1 M ./tests/cylindrical.cpp -1 +1 M ./tests/flux.cpp -1 +1 M ./tests/integrate.cpp -1 +1 M ./tests/known_results.cpp -1 +1 M ./tests/one_dimensional.cpp -1 +1 M ./tests/physical.cpp -1 +1 M ./tests/symmetry.cpp -1 +1 M ./tests/three_d.cpp -1 +1 M ./tests/two_dimensional.cpp -1 +1 Thu Mar 9 17:48:38 EST 2006 stevenj@fftw.org * added geometric_volume::integral_volume to get integration volume corresponding to a gv M ./src/meep/vec.hpp -1 +2 M ./src/vec.cpp -4 +11 Wed Mar 8 18:12:16 EST 2006 stevenj@fftw.org * multiply cnumbers by 1.0 before passing to SWIG functions, since SWIG gets confused if we pass an integer for a complex arg. M ./libctl/meep.scm.in -4 +4 Wed Mar 8 18:11:29 EST 2006 stevenj@fftw.org * support derived_components in max_abs for output-png, etcetera M ./src/h5fields.cpp -54 +1 M ./src/integrate.cpp -2 +54 M ./src/meep.hpp +15 M ./src/vec.cpp +61 Tue Jan 24 17:00:36 EST 2006 stevenj@fftw.org * use pkgdatadir for installing .scm files M ./libctl/Makefile.am -13 +5 Tue Jan 24 16:15:41 EST 2006 stevenj@fftw.org * create libctl/specs directory if necessary during 'make install' M ./libctl/Makefile.am +1 Tue Dec 6 22:08:57 EST 2005 stevenj@fftw.org * added epsilon-func convenience wrapper for material-func M ./libctl/meep.scm.in +2 Fri Dec 2 15:22:45 EST 2005 stevenj@fftw.org * don't use -pedantic, even in maintainer mode, because it can cause compilation failures due to header files not under our control (e.g. the LAM/MPI header file) M ./configure.ac -1 +1 Thu Dec 1 23:18:04 EST 2005 stevenj@fftw.org * whoops 2*pi*R should be included in loop_in_chunks integration volume even for dR=0 M ./src/loop_in_chunks.cpp -1 +1 Thu Dec 1 21:18:03 EST 2005 stevenj@fftw.org * MPI tweaks for libctl front-end M ./libctl/Makefile.am +3 M ./libctl/meep.scm.in +10 M ./src/mympi.cpp -1 +2 Thu Dec 1 20:12:38 EST 2005 stevenj@fftw.org * update Ep and Ez at r=0 in cylindrical coords M ./src/update_e_from_d_update.cpp -2 +16 Thu Dec 1 20:12:24 EST 2005 stevenj@fftw.org * eliminate compiler warning M ./src/dft.cpp -3 +3 Thu Dec 1 19:13:59 EST 2005 stevenj@fftw.org * fixed loop-in-chunks for integrating over dR=0 regions; added FIXME for updating E from D for r=0 special cases M ./src/loop_in_chunks.cpp -2 +2 M ./src/update_e_from_d_update.cpp +3 Thu Dec 1 19:04:08 EST 2005 stevenj@fftw.org * whoops, distribute material-dispersion.ctl M ./examples/Makefile.am -1 +1 Thu Dec 1 19:03:01 EST 2005 stevenj@fftw.org * add material-dispersion.ctl example, run-k-point function, and change-sources! A ./examples/material-dispersion.ctl M ./libctl/meep.scm.in -23 +31 Wed Nov 23 00:19:11 EST 2005 stevenj@fftw.org * some fixes for polarizability M ./libctl/structure.cpp -15 +14 Tue Nov 22 23:15:41 EST 2005 stevenj@fftw.org * amp-fun now works for sources M ./libctl/meep.i +3 M ./libctl/meep.scm.in +1 Tue Nov 22 22:23:41 EST 2005 stevenj@fftw.org * run-kpoints sets all-freqs variable with frequencies, like MPB M ./libctl/meep.scm.in -2 +6 Tue Nov 22 22:22:36 EST 2005 stevenj@fftw.org * better handling of empty dimensions, more consistent with lower-dimensional computation M ./libctl/meep.scm.in -1 +1 M ./src/dft.cpp -2 +19 M ./src/fields.cpp +10 M ./src/loop_in_chunks.cpp -5 +4 M ./src/meep.hpp -1 +4 M ./src/sources.cpp -1 +1 Mon Nov 14 19:00:58 EST 2005 stevenj@fftw.org * fix weights and units for flux spectra! (bug! effect on normalized transmission/reflection spectra should be minimal, however) M ./src/dft.cpp -7 +15 Sat Nov 12 17:40:53 EST 2005 stevenj@fftw.org * comment typos M ./src/loop_in_chunks.cpp -5 +5 Sat Nov 12 17:38:13 EST 2005 stevenj@fftw.org * TODO updates M ./TODO -25 +31 Sat Nov 12 16:51:37 EST 2005 stevenj@fftw.org * typo in Makefile.am M ./examples/Makefile.am -1 +1 Fri Nov 11 19:12:31 EST 2005 stevenj@fftw.org * has_boundary(Low, R) now returns true if the origin is at r > 0 M ./src/fields.cpp -1 +3 M ./src/structure.cpp +2 M ./src/vec.cpp -1 +1 Fri Nov 11 19:11:27 EST 2005 stevenj@fftw.org * added cylindrical ring-resonator example M ./examples/Makefile.am -1 +1 A ./examples/ring-cyl.ctl Fri Nov 11 18:33:36 EST 2005 stevenj@fftw.org * support geometry-center in libctl, fix cylindrical in libctl; support r_to_minus_r_symmetry for non-integer m M ./libctl/meep-ctl-swig.hpp -2 +2 M ./libctl/meep.scm.in -2 +2 M ./libctl/structure.cpp -8 +12 M ./src/fields.cpp -2 +2 M ./src/meep/vec.hpp -1 +1 M ./src/vec.cpp -2 +5 Fri Nov 11 17:35:48 EST 2005 stevenj@fftw.org * add examples/Makefile to list of Makefiles M ./configure.ac +1 Fri Nov 11 16:58:54 EST 2005 stevenj@fftw.org * use Makefile to specify examples to distribute, instead of whole examples/ directory (which may be cluttered with output files etc.); don't distribute doc/ directory at all unless built with --with-doc M ./Makefile.am -2 +8 A ./examples/Makefile.am Wed Nov 9 22:05:32 EST 2005 stevenj@fftw.org * Make unit directions periodic by default, and don't put PML on them M ./src/fields.cpp +6 M ./src/structure.cpp -2 +4 Wed Nov 9 21:38:31 EST 2005 stevenj@fftw.org * added nonlinear example A ./examples/3rd-harm-1d.ctl Wed Nov 9 21:36:25 EST 2005 stevenj@fftw.org * some fixes in libctl for 1d cells, Kerr media, stop-when-decayed ... M ./libctl/meep.scm.in -3 +6 M ./libctl/structure.cpp -29 +47 Wed Nov 9 13:42:44 EST 2005 stevenj@fftw.org * share structure_chunk between structure and fields_chunkk to save memory in the common case; behavior should be the same as before, however, because I implemented copy-on-write semantics via reference counting M ./src/fields.cpp -4 +14 M ./src/meep.hpp -2 +7 M ./src/polarization.cpp +1 M ./src/step.cpp +1 M ./src/structure.cpp -3 +24 Tue Nov 8 22:17:08 EST 2005 stevenj@fftw.org * renamed material_of_unshifted_point_in_tree_inobject function in libctl M ./libctl/structure.cpp -3 +3 Tue Nov 8 21:59:59 EST 2005 stevenj@fftw.org * renormalized currents: amplitude of J is no longer frequency-dependent, and is ~ 1.0 instead M ./src/meep.hpp -1 +1 M ./src/sources.cpp -3 +11 M ./tests/known_results.cpp -8 +16 Tue Nov 8 21:27:08 EST 2005 stevenj@fftw.org * Don't use -Os, even though it produces slightly faster code; in g++ 3.3.5 (and who knows what other versions) it seems to be buggy, sigh M ./m4/ax_cxx_maxopt.m4 -1 +2 M ./src/Makefile.am -1 +3 Tue Nov 8 21:26:35 EST 2005 stevenj@fftw.org * fixed misnumbered chi's, and delete[] instead of delete M ./libctl/meep.scm.in -1 +1 M ./libctl/structure.cpp -7 +7 M ./src/h5file.cpp -1 +1 Tue Nov 8 20:35:21 EST 2005 stevenj@fftw.org * added draft (untested) support for kerr and dispersive materials in the libctl front-end M ./libctl/meep.scm.in +1 M ./libctl/structure.cpp -11 +147 Tue Nov 8 20:33:57 EST 2005 stevenj@fftw.org * added fields::remove_polarizabilities, added use_averaging optional argument to end of structure constructor, automatically keep track of current polarization in material_function class, reset polarizabilities in fiels::zero_fields M ./src/fields.cpp +14 M ./src/h5fields.cpp -1 +1 M ./src/meep.hpp -39 +52 M ./src/structure.cpp -4 +14 Tue Nov 8 20:32:51 EST 2005 stevenj@fftw.org * added polarization::zero_fields, for use in fields::zero_fields, and removed the corresponding code from the constructor M ./src/meep_internals.hpp +1 M ./src/polarization.cpp -28 +39 Tue Nov 8 18:34:45 EST 2005 stevenj@fftw.org * fix gen-ctl-io lines for vpath builds (meep.scm is in build dir., not srcdir) M ./libctl/Makefile.am -3 +3 Tue Nov 8 18:33:07 EST 2005 stevenj@fftw.org * Less aggressive compiler flags (FIXME: why does -fstrict-aliasing cause 'make check' to fail with g++ 3.3.5? Is this a compiler bug, or a Meep bug?) M ./m4/ax_cxx_maxopt.m4 -6 +7 Tue Nov 8 18:05:18 EST 2005 stevenj@fftw.org * FFTW-style auto-detection of compiler flags M ./configure.ac -46 +12 M ./darcs_test -2 +2 A ./m4/ax_check_compiler_flags.m4 A ./m4/ax_compiler_vendor.m4 A ./m4/ax_cxx_maxopt.m4 A ./m4/ax_gcc_archflag.m4 A ./m4/ax_gcc_x86_cpuid.m4 Mon Nov 7 23:01:31 EST 2005 stevenj@fftw.org * build libctl but not doc by default; include missing file in dist M ./configure.ac -4 +4 M ./libctl/Makefile.am -1 +1 Mon Nov 7 22:12:48 EST 2005 stevenj@fftw.org * update copyright year, bump version to 0.8 M ./COPYRIGHT -1 +1 M ./configure.ac -1 +1 M ./doc/example.cpp -1 +1 M ./libctl/Makefile.am -1 +1 M ./libctl/meep.scm.in -1 +1 M ./src/bands.cpp -1 +1 M ./src/bicgstab.cpp -1 +1 M ./src/bicgstab.hpp -1 +1 M ./src/boundaries.cpp -1 +1 M ./src/control_c.cpp -1 +1 M ./src/cw_fields.cpp -1 +1 M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -1 +1 M ./src/fields.cpp -1 +1 M ./src/grace.cpp -1 +1 M ./src/h5fields.cpp -1 +1 M ./src/h5file.cpp -1 +1 M ./src/initialize.cpp -1 +1 M ./src/integrate.cpp -1 +1 M ./src/loop_in_chunks.cpp -1 +1 M ./src/meep.hpp -1 +1 M ./src/meep/mympi.hpp -1 +1 M ./src/meep/vec.hpp -1 +1 M ./src/meep_internals.hpp -1 +1 M ./src/monitor.cpp -1 +1 M ./src/mympi.cpp -1 +1 M ./src/output_directory.cpp -1 +1 M ./src/polarization.cpp -1 +1 M ./src/slices.cpp -1 +1 M ./src/sources.cpp -1 +1 M ./src/sphere-quad.cpp -1 +1 M ./src/step.cpp -1 +1 M ./src/step_d.cpp -1 +1 M ./src/step_h.cpp -1 +1 M ./src/structure.cpp -1 +1 M ./src/time.cpp -1 +1 M ./src/update_e_from_d.cpp -1 +1 M ./src/update_e_from_d_prepare.cpp -1 +1 M ./src/update_e_from_d_sources.cpp -1 +1 M ./src/update_e_from_d_update.cpp -1 +1 M ./src/update_from_e.cpp -1 +1 M ./src/vec.cpp -1 +1 M ./tests/bench.cpp -1 +1 M ./tests/bragg_transmission.cpp -1 +1 M ./tests/cylindrical.cpp -1 +1 M ./tests/flux.cpp -1 +1 M ./tests/integrate.cpp -1 +1 M ./tests/known_results.cpp -1 +1 M ./tests/one_dimensional.cpp -1 +1 M ./tests/physical.cpp -1 +1 M ./tests/symmetry.cpp -1 +1 M ./tests/three_d.cpp -1 +1 M ./tests/two_dimensional.cpp -1 +1 Mon Nov 7 15:03:30 EST 2005 stevenj@fftw.org * added eps-averaging? input var. M ./libctl/meep-ctl-swig.hpp +1 M ./libctl/meep.scm.in +3 M ./libctl/structure.cpp +3 Mon Nov 7 04:32:20 EST 2005 stevenj@fftw.org * some renaming; check for complex symmetry phases in determining whether to use real fields; use (x,y,z) = (r,p,z) in cylindrical coordinates M ./libctl/meep.scm.in -5 +12 M ./libctl/structure.cpp -3 +3 Sun Nov 6 21:28:07 EST 2005 stevenj@fftw.org * added band diagram example A ./examples/holey-wvg-bands.ctl Sun Nov 6 18:54:14 EST 2005 stevenj@fftw.org * libctl meep now defaults to metal boundaries, ensure-periodicity when k, added run-k-points A ./examples/holey-wvg-cavity.ctl M ./libctl/meep.scm.in -10 +70 M ./libctl/structure.cpp +11 M ./src/boundaries.cpp -7 +6 M ./src/meep.hpp -2 +1 M ./tests/symmetry.cpp +2 Fri Nov 4 16:16:13 EST 2005 stevenj@fftw.org * tweaks ./examples/tut-bend-flux.ctl -> ./examples/bend-flux.ctl ./examples/tut-ring.ctl -> ./examples/ring.ctl M ./libctl/meep.scm.in -4 +7 Fri Nov 4 15:04:37 EST 2005 stevenj@fftw.org * added fields::total_volume to get v"un-symmetrized" volume for output, use mirror sym. in tut-ring.ctl, and include examples/ in tarball M ./Makefile.am -1 +1 M ./examples/tut-ring.ctl +3 M ./libctl/meep.scm.in -2 +2 M ./src/fields.cpp +9 M ./src/meep.hpp +2 M ./src/meep/vec.hpp +4 Fri Nov 4 02:19:11 EST 2005 stevenj@fftw.org * more meep libctl changes, added examples/ directory, added FourierTransforming timesink to performance tracking A ./examples/ A ./examples/tut-bend-flux.ctl A ./examples/tut-ring.ctl M ./libctl/meep-ctl-swig.hpp +1 M ./libctl/meep.scm.in -90 +139 M ./libctl/structure.cpp -9 +14 M ./src/dft.cpp +2 M ./src/meep.hpp -1 +1 M ./src/time.cpp +1 Tue Nov 1 18:20:39 EST 2005 stevenj@fftw.org * added max_abs(component, geometric_volume), other libctl updates M ./libctl/meep.scm.in -15 +73 M ./src/h5fields.cpp -2 +9 M ./src/integrate.cpp +14 M ./src/meep.hpp +3 M ./src/vec.cpp +2 Wed Oct 26 14:00:45 EDT 2005 stevenj@fftw.org * added volume::interior; respect ensure_periodicity in libctl; some fixes M ./libctl/meep-ctl-swig.hpp +1 M ./libctl/meep.scm.in -14 +22 M ./libctl/structure.cpp -1 +2 M ./src/meep/vec.hpp +1 M ./src/vec.cpp -2 +12 Tue Oct 25 20:57:22 EDT 2005 stevenj@fftw.org * output # processors for benchmarking M ./tests/bench.cpp -1 +2 Tue Oct 25 20:17:15 EDT 2005 stevenj@fftw.org * urg, if NAN is not available we should define it to a number we are not likely to see (it is used to initialize current_time in src_time, for example) M ./src/meep.hpp -1 +1 Tue Oct 25 19:41:27 EDT 2005 stevenj@fftw.org * SUFFIXES rule should be .SUFFIXES in Makefiles M ./doc/Makefile.am -1 +1 M ./hsrc/Makefile.am -1 +1 M ./tests/Makefile.am -1 +1 Mon Oct 24 20:43:56 EDT 2005 stevenj@fftw.org * whoops M ./libctl/Makefile.am -1 +1 Mon Oct 24 20:35:05 EDT 2005 stevenj@fftw.org * automatically set dimensions M ./libctl/meep.scm.in -4 +11 Mon Oct 24 20:34:47 EDT 2005 stevenj@fftw.org * whoops, missing file A ./libctl/meep_op_renames.i Mon Oct 24 16:29:32 EDT 2005 stevenj@fftw.org * increase tolerance for crashing on negative weights M ./src/vec.cpp -1 +1 Sat Oct 22 23:46:41 EDT 2005 stevenj@fftw.org * add _mpi/-mpi suffix when installing MPI version M ./configure.ac +8 M ./libctl/Makefile.am -5 +5 M ./src/Makefile.am -3 +3 M ./tests/Makefile.am -1 +1 Sat Oct 22 22:34:45 EDT 2005 stevenj@fftw.org * make real fields the default M ./libctl/meep.scm.in -2 +5 Fri Oct 21 23:53:06 EDT 2005 stevenj@fftw.org * rationalized units: set 4*pi to 1 (no point to keeping 4*pi, especially since we didn't have 4*pi multiplying J anyway) M ./hsrc/update_e_from_d_gen.hs -1 +1 M ./hsrc/update_from_e_gen.hs -2 +2 M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -6 +6 M ./src/h5fields.cpp -2 +2 M ./src/monitor.cpp -2 +2 M ./tests/known_results.cpp -5 +5 Fri Oct 21 23:13:24 EDT 2005 stevenj@fftw.org * various more libctl stuff M ./libctl/meep.i +6 M ./libctl/meep.scm.in -16 +40 Fri Oct 21 23:11:13 EDT 2005 stevenj@fftw.org * don't need h5file::close since we can use delete; should not have dft_flux destructor since it the class is used by value not as a pointer...added dft_flux::remove for explicit removal of flux lists from the chunks M ./src/meep.hpp -3 +2 Fri Oct 21 23:10:31 EDT 2005 stevenj@fftw.org * some memory-leak fixes M ./src/fields.cpp +1 M ./src/h5file.cpp -1 +2 Wed Oct 19 12:50:19 EDT 2005 stevenj@fftw.org * flux fixes, some rearrangements M ./libctl/meep.scm.in -101 +139 Tue Oct 18 22:20:56 EDT 2005 stevenj@fftw.org * bug fix - harminv test must use C++ compiler in case harminv was compiled with C++ M ./configure.ac +5 Tue Oct 18 21:43:22 EDT 2005 stevenj@fftw.org * generating update_e_from_d_sources was completely unnecessary M ./src/Makefile.am -5 +1 M ./src/update_e_from_d_sources.cpp -1 +13 Tue Oct 18 20:41:44 EDT 2005 stevenj@fftw.org * making infinity and nan by dividing by zero was causing problems on the Alpha M ./src/meep.hpp -2 +2 Sun Oct 16 02:06:54 EDT 2005 stevenj@fftw.org * deleting a dft_flux should now remove it from the fields chunk; some slight rearrangement of overloaded functions for SWIG M ./src/dft.cpp -1 +3 M ./src/meep.hpp -1 +2 M ./src/meep/vec.hpp +14 Wed Oct 12 20:26:58 EDT 2005 stevenj@fftw.org * fixed harminv, some renaming for consistency M ./libctl/meep.scm.in -12 +42 Wed Oct 12 19:50:50 EDT 2005 stevenj@fftw.org * new constructor for gaussian_src_time accepts frequency width instead of time width (this is backwards compatible because old code used the old constructor) M ./libctl/meep.scm.in +2 M ./src/meep.hpp -1 +1 M ./src/sources.cpp -4 +4 Wed Oct 12 19:45:59 EDT 2005 stevenj@fftw.org * controllable progress-interval parameter M ./libctl/meep.scm.in -1 +5 Wed Oct 12 19:42:07 EDT 2005 stevenj@fftw.org * bug fixes M ./libctl/meep.i -8 +8 M ./libctl/meep.scm.in -6 +10 Wed Oct 12 19:16:48 EDT 2005 stevenj@fftw.org * many more updates to libctl stuff M ./libctl/meep-ctl-swig.hpp -1 +2 M ./libctl/meep.i -1 +19 M ./libctl/meep.scm.in -63 +132 M ./libctl/structure.cpp -10 +30 Tue Oct 11 22:41:33 EDT 2005 stevenj@fftw.org * added fluxes, output directory; fields::outdir now is a copy rather than a const char* (which would fail for Scheme) M ./libctl/meep-ctl-swig.hpp +2 M ./libctl/meep.cpp +10 M ./libctl/meep.scm.in -37 +104 M ./src/fields.cpp -2 +3 M ./src/meep.hpp -1 +1 M ./src/output_directory.cpp -2 +3 Tue Oct 11 20:09:09 EDT 2005 stevenj@fftw.org * added harminv, run functions to libctl M ./libctl/meep-ctl-swig.hpp +3 M ./libctl/meep.cpp +28 M ./libctl/meep.scm.in +92 Tue Oct 11 13:13:58 EDT 2005 stevenj@fftw.org * libctl src support; added custom_src_time so that users don't need to declare a class; simpler gaussian_src_time constructor variant M ./libctl/Makefile.am -1 +1 M ./libctl/meep.i +11 M ./libctl/meep.scm.in -1 +76 M ./src/meep.hpp +20 M ./src/sources.cpp -1 +23 Mon Oct 10 22:34:50 EDT 2005 stevenj@fftw.org * made origin center (like MPB), added swig typemap for complex(vec) functions M ./libctl/meep.i -8 +22 M ./libctl/structure.cpp +4 Mon Oct 10 17:30:45 EDT 2005 stevenj@fftw.org * libctl front-end is slowly approaching usability M ./libctl/Makefile.am -6 +34 M ./libctl/meep-ctl-swig.hpp -2 +4 M ./libctl/meep.i -1 +3 M ./libctl/meep.scm.in -6 +117 M ./libctl/structure.cpp -17 +76 Mon Oct 10 17:24:16 EDT 2005 stevenj@fftw.org * don't output in quiet mode M ./src/h5fields.cpp -1 +1 Mon Oct 10 17:20:38 EDT 2005 stevenj@fftw.org * added symmetry::operator*(complex), coordinate_mismatch(derived_component), FOR_SIDES macro; fixed fields::verbose(); output_hdf5 is now tolerant to component/derived_component confusion; open_hdf5_file prints a message when a file is created for writing M ./src/fields.cpp +6 M ./src/h5fields.cpp -1 +20 M ./src/meep.hpp -2 +4 M ./src/meep/vec.hpp -1 +8 M ./src/vec.cpp -1 +1 Fri Oct 7 17:56:17 EDT 2005 stevenj@fftw.org * fixed a couple of small memory leaks reported by valgrind, and one huge one that I introduced accidentally for nonlinear media; added new fields::reset() and fields::remove_fluxes() functions; fixed inconsistency: d_minus_p was declared as an array of length NUM_DIRECTIONS, but was indexed via field components (this wasn't technically a bug, since it was only accessed through E components which fall within NUM_DIRECTIONS), but it was asking for trouble M ./src/fields.cpp -5 +20 M ./src/meep.hpp -1 +3 M ./src/output_directory.cpp -4 +2 M ./src/structure.cpp -1 +3 M ./src/update_e_from_d.cpp -1 +1 Fri Oct 7 00:09:47 EDT 2005 stevenj@fftw.org * revive libctl stuff from the dead ./libctl/meep-ctl-const.h -> ./libctl/meep-ctl-const.hpp ./libctl/meep-ctl-swig.h -> ./libctl/meep-ctl-swig.hpp ./libctl/meep-ctl.h -> ./libctl/meep-ctl.hpp M ./libctl/Makefile.am -7 +13 M ./libctl/meep-ctl.hpp -3 +3 M ./libctl/meep.cpp -1 +1 M ./libctl/meep.i -6 +7 M ./libctl/structure.cpp -185 +184 Sun Oct 2 12:14:22 EDT 2005 stevenj@fftw.org * resolve merge conflicts M ./src/meep.hpp +5 M ./tests/bragg_transmission.cpp -11 +15 Fri Sep 30 18:57:40 EDT 2005 alexrod7@mit.edu * add operator-= for dft_chunk so that we can subtract fields from two simulations in the same run without saving as hdf5 M! ./src/dft.cpp +12 M! ./src/meep.hpp -2 +2 M! ./tests/bragg_transmission.cpp -10 +16 Fri Sep 2 14:54:32 EDT 2005 stevenj@fftw.org * added mpicxx check (from Silvestre Zabala) as well as new macro-archive tags M ./m4/acx_mpi.m4 -2 +9 Thu Sep 1 22:20:08 EDT 2005 stevenj@fftw.org * slightly simplified save_hdf5 and load_hdf5 for dft_flux M ./src/dft.cpp +12 M ./src/meep.hpp +4 M ./tests/bragg_transmission.cpp -5 +5 Thu Sep 1 20:50:56 EDT 2005 stevenj@fftw.org * bug fix in solve_cw - check for zero current amplitudes must include all processors M ./src/cw_fields.cpp -3 +6 Mon Aug 8 19:39:55 EDT 2005 stevenj@fftw.org * bug fix in fields::initialize - don't try to initialize non-allocated fields M ./src/initialize.cpp -5 +7 Mon Aug 8 19:29:48 EDT 2005 stevenj@fftw.org * allow phasing of cylindrical radius via fields::set_rshift M ./src/fields.cpp +11 M ./src/meep.hpp -1 +2 M ./src/step_d.cpp -8 +9 M ./src/step_h.cpp -8 +9 Mon Aug 8 14:45:12 EDT 2005 stevenj@fftw.org * added 3-mirror-plane test M ./tests/symmetry.cpp +42 Mon Aug 8 14:39:12 EDT 2005 stevenj@fftw.org * added symmetry::operator- M ./src/meep/vec.hpp +2 M ./tests/symmetry.cpp -3 +3 Wed Jul 27 16:17:10 EDT 2005 stevenj@fftw.org * initialize mpi(argc,argv) had to be modified to pass those arguments as *references*, since MPI_Init may modify the argument list (fortunately, no changes are required to user code) M ./src/meep/mympi.hpp -1 +1 M ./src/mympi.cpp -1 +1 Mon Jul 25 20:30:59 EDT 2005 stevenj@fftw.org * typo (wrong return type) M ./src/bicgstab.cpp -1 +1 Mon Jul 25 20:30:49 EDT 2005 stevenj@fftw.org * wrong format string now that m is double M ./src/bands.cpp -1 +1 Mon Jul 25 17:43:23 EDT 2005 stevenj@fftw.org * bugfix in HDF5+MPI (called H5Fopen instead of H5Fcreate) M ./src/h5file.cpp -2 +2 Mon Jul 25 17:42:25 EDT 2005 stevenj@fftw.org * HDF5 check needs to use MPICXX in case HDF was compiled with MPI (and needs mpi.h for header file) M ./configure.ac +5 Mon Jul 18 18:53:51 EDT 2005 stevenj@fftw.org * allow non-integer values of "m" in cylindrical coordinates (you probably should only do this for cells that don't include r=0) M ./src/fields.cpp -7 +6 M ./src/initialize.cpp -5 +7 M ./src/meep.hpp -4 +6 M ./src/step_d.cpp -3 +3 M ./src/step_h.cpp -3 +3 Fri Jul 8 17:19:02 EDT 2005 stevenj@fftw.org * slightly weakened test (now that we are truly including multiple source frequencies) M ./tests/two_dimensional.cpp -1 +1 Fri Jul 8 16:36:36 EDT 2005 stevenj@fftw.org * noticed *another* apparent bug in nonlinear code for symmetry, grrr (??); disable test for now M ./tests/symmetry.cpp -2 +6 Fri Jul 8 16:36:04 EDT 2005 stevenj@fftw.org * add more multiple-source tests to symmetry.cpp M ./tests/symmetry.cpp +6 Thu Jul 7 20:21:19 EDT 2005 stevenj@fftw.org * fix by Mihai for case with multiple source times M ./src/sources.cpp -1 +1 Wed Jun 1 21:19:31 EDT 2005 stevenj@fftw.org * another potential bug exposed by my previous patch - polariton_ex test also fails when symmetry is included, so revert with comment for now M ./tests/symmetry.cpp -2 +6 Wed Jun 1 20:16:42 EDT 2005 stevenj@fftw.org * can't use "darcs changes" to generate ChangeLog during 'make dist', because then 'darcs check' will fail (doesn't run in darcs dir); instead, add new 'make darcs-dist' target that creates the ChangeLog M ./ChangeLog -1 +1 M ./Makefile.am -3 +7 Wed Jun 1 20:10:55 EDT 2005 stevenj@fftw.org * silence warning M ./src/monitor.cpp +1 Wed Jun 1 20:10:31 EDT 2005 stevenj@fftw.org * silence C++ warning M ./src/bicgstab.cpp -2 +4 Wed Jun 1 19:46:28 EDT 2005 stevenj@fftw.org * Generate ChangeLog automatically during 'make dist' M ./ChangeLog -1 +1 M ./Makefile.am +5 Wed Jun 1 14:15:23 EDT 2005 stevenj@fftw.org * add equal_layout method to check whether two fields/structures have same chunking, etcetera; testcase in symmetry.cpp also add == for symmetry and signed_direction, and != for various things that already have ==. also fixed bug in symmetry.cpp (some fields were being compared to themselves rather than to symmetrized version) NOTE: THERE IS STILL A BUG IN symmetry.cpp ... nonlinear_ex() compares the field to itself rather than to a symmetrized version, and fails if the correct thing is done, which means that there may be a bug in the nonlinear code for symmetry M ./src/fields.cpp +16 M ./src/meep.hpp +3 M ./src/meep/vec.hpp +7 M ./src/structure.cpp +13 M ./src/vec.cpp +11 M ./tests/symmetry.cpp -3 +36 Wed Jun 1 12:46:06 EDT 2005 stevenj@fftw.org * pass chunk index to chunkloop function, so that in the future we can easily write functions that e.g. compare two different fields objects M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -1 +1 M ./src/h5fields.cpp -2 +2 M ./src/integrate.cpp -1 +1 M ./src/loop_in_chunks.cpp -1 +1 M ./src/meep.hpp -1 +1 M ./src/sources.cpp -1 +1 Wed Jun 1 00:50:53 EDT 2005 stevenj@fftw.org * current unit fix: field update should add current*dt, not current, to fields M ./src/step.cpp -2 +2 Wed Jun 1 00:33:49 EDT 2005 stevenj@fftw.org * minor update to bicgstab comments M ./src/bicgstab.cpp -2 +2 Wed Jun 1 00:27:39 EDT 2005 stevenj@fftw.org * whoops, forgot to return a value from solve_cw M ./src/cw_fields.cpp -1 +1 Tue May 31 20:20:39 EDT 2005 stevenj@fftw.org * need string.h in bicgstab.cpp for memset() M ./src/bicgstab.cpp +1 Tue May 31 20:05:00 EDT 2005 stevenj@fftw.org * to get current(t) from dipole(t), use forward rather than backward difference (makes slightly more sense with solve_cw since many currents turn on at t = 0, and backwards difference would then give undesired spike at t=0) M ./src/meep.hpp -1 +1 M ./src/meep_internals.hpp -2 Tue May 31 19:55:04 EDT 2005 stevenj@fftw.org * get sources directly in solve_cw; add new step_d_source to sidestep current hacks M ./src/cw_fields.cpp -10 +5 M ./src/meep.hpp -1 +3 M ./src/step.cpp -5 +25 Tue May 31 19:24:53 EDT 2005 stevenj@fftw.org * use solve_cw in physical.cpp instead of timestepping M ./tests/physical.cpp -53 +21 Tue May 31 19:24:16 EDT 2005 stevenj@fftw.org * put -J on right hand side of solve_cw M ./src/cw_fields.cpp -3 +3 Tue May 31 18:36:51 EDT 2005 stevenj@fftw.org * yikes, silly bug in fields::solve_cw M ./src/cw_fields.cpp -1 +1 Tue May 31 18:17:47 EDT 2005 stevenj@fftw.org * allow CW sources to have complex frequencies (e.g. exponentially decaying) M ./src/meep.hpp -7 +9 M ./src/sources.cpp -11 +3 Tue May 31 18:07:17 EDT 2005 stevenj@fftw.org * increase maxiters default to 10000 in solve_cw M ./src/meep.hpp -1 +1 Tue May 31 18:05:13 EDT 2005 stevenj@fftw.org * add solve_cw() variant that gets frequency from sources (and has reasonable defaults for the tolerance and maximum iterations) M ./src/cw_fields.cpp +15 M ./src/meep.hpp +4 Tue May 31 17:52:24 EDT 2005 stevenj@fftw.org * don't output so often in bicgstab M ./src/bicgstab.cpp -1 +7 Tue May 31 17:49:00 EDT 2005 stevenj@fftw.org * slight tweak in bicgstab M ./src/bicgstab.cpp +5 Tue May 31 17:26:11 EDT 2005 stevenj@fftw.org * in fields::solve_cw, use the BiCGSTAB(L) algorithm instead of BiCGSTAB. With L >= 2, this avoids a known convergence failure in BiCGSTAB for operators (like ours) where the eigenvalues are nearly purely imaginary. Now, solve_cw converges to arbitrary tolerance (limited by numerical precision, of course) even in > 1d! Hooray, it works! M ./configure.ac -1 +1 M ./src/bicgstab.cpp -50 +167 M ./src/bicgstab.hpp -6 +24 M ./src/cw_fields.cpp -6 +18 M ./src/meep.hpp -1 +1 Tue May 31 01:12:22 EDT 2005 stevenj@fftw.org * whoops, forgot to add cw_fields.cpp M ./src/bicgstab.cpp -1 +2 M ./src/bicgstab.hpp -1 +2 A ./src/cw_fields.cpp Mon May 30 22:35:05 EDT 2005 stevenj@fftw.org * remove (commented-out) stabilized dnrm2, which doesn't parallelize anyway M ./src/bicgstab.cpp -22 +1 Mon May 30 22:34:10 EDT 2005 stevenj@fftw.org * whoops M ./src/bicgstab.cpp -1 +1 Mon May 30 22:23:05 EDT 2005 stevenj@fftw.org * during phasing, don't forget to update the E boundaries as well as E M ./src/step.cpp -4 +7 Mon May 30 22:20:06 EDT 2005 stevenj@fftw.org * add new fields::solve_cw method that, instead of timestepping, treats the whole FDTD system as a big linear equation (specified implicitly by the fields::step) and solves it by the stabilized bi-conjugate gradient method to get the CW response at a particular frequency. It seems to work reasonably well, except for some reason I can't fathom you can't set the tolerance very low (less then 1e-2) or it never converges in 2+ dimensions M ./configure.ac -1 +1 M ./src/Makefile.am -7 +7 A ./src/bicgstab.cpp A ./src/bicgstab.hpp M ./src/fields.cpp +2 M ./src/meep.hpp -5 +13 M ./src/sources.cpp -8 +12 M ./src/step.cpp -1 +21 M ./src/update_e_from_d.cpp -1 +5 Thu May 19 15:21:05 EDT 2005 stevenj@fftw.org * add FIXME comment to unnecessary allocation M ./src/fields.cpp +1 Tue May 17 16:57:48 EDT 2005 stevenj@fftw.org * fixed slight bug ... volume::nowned() really returned the minimum nowned over all components, which is slightly less than the actual nowned for some components in cylindrical coords; changed the name to nowned_min() to reflect this, added a new nowned(component) that gives the exact nowned, and added a regression test M ./src/meep/vec.hpp -1 +2 M ./src/vec.cpp -4 +11 M ./tests/integrate.cpp +3 Tue May 17 16:19:33 EDT 2005 stevenj@fftw.org * rename all C++ headers to .hpp, for consistency with .cpp and for clarity ./src/meep.h -> ./src/meep.hpp ./src/meep/mympi.h -> ./src/meep/mympi.hpp ./src/meep/vec.h -> ./src/meep/vec.hpp ./src/meep_internals.h -> ./src/meep_internals.hpp ./src/ran.h -> ./src/ran.hpp ./src/threevec.h -> ./src/threevec.hpp M ./doc/complicated.tex -1 +1 M ./doc/energy_cons.tex -1 +1 M ./doc/energy_cons_1d.tex -1 +1 M ./doc/epsilon_polariton_1d.tex -1 +1 M ./doc/example.cpp -1 +1 M ./doc/lossgain_epsilon.tex -1 +1 M ./doc/nonlinear.tex -1 +1 M ./doc/omniguide.tex -1 +1 M ./doc/polaritonbands.tex -1 +1 M ./doc/simple.tex -1 +1 M ./doc/simplebands.tex -1 +1 M ./src/Makefile.am -12 +13 M ./src/anisotropic_averaging.cpp -2 +2 M ./src/bands.cpp -2 +2 M ./src/boundaries.cpp -2 +2 M ./src/control_c.cpp -1 +1 M ./src/dft.cpp -2 +2 M ./src/energy_and_flux.cpp -2 +2 M ./src/fields.cpp -2 +2 M ./src/grace.cpp -2 +2 M ./src/h5fields.cpp -1 +1 M ./src/h5file.cpp -1 +1 M ./src/initialize.cpp -2 +2 M ./src/integrate.cpp -2 +2 M ./src/loop_in_chunks.cpp -2 +2 M ./src/meep.hpp -3 +2 M ./src/meep_internals.hpp -2 +1 M ./src/monitor.cpp -2 +2 M ./src/mympi.cpp -1 +1 M ./src/output_directory.cpp -1 +1 M ./src/polarization.cpp -2 +2 M ./src/ran.cpp -1 +1 M ./src/ran.hpp -1 M ./src/slices.cpp -2 +2 M ./src/sources.cpp -2 +2 M ./src/step.cpp -2 +2 M ./src/step_d.cpp -4 +4 M ./src/step_h.cpp -4 +4 M ./src/structure.cpp -2 +2 M ./src/threevec.hpp -1 M ./src/time.cpp -1 +1 M ./src/update_e_from_d.cpp -2 +2 M ./src/update_e_from_d_prepare.cpp -4 +4 M ./src/update_e_from_d_sources.cpp -3 +3 M ./src/update_e_from_d_update.cpp -3 +3 M ./src/update_from_e.cpp -4 +4 M ./src/vec.cpp -1 +1 M ./tests/2D_convergence.cpp -1 +1 M ./tests/bench.cpp -1 +1 M ./tests/bragg_transmission.cpp -1 +1 M ./tests/convergence_cyl_waveguide.cpp -1 +1 M ./tests/cylindrical.cpp -1 +1 M ./tests/flux.cpp -1 +1 M ./tests/h5test.cpp -2 +2 M ./tests/integrate.cpp -1 +1 M ./tests/known_results.cpp -1 +1 M ./tests/one_dimensional.cpp -1 +1 M ./tests/physical.cpp -1 +1 M ./tests/symmetry.cpp -1 +1 M ./tests/three_d.cpp -1 +1 M ./tests/two_dimensional.cpp -1 +1 Mon May 16 18:52:39 EDT 2005 stevenj@fftw.org * don't re-allocate d_minus_p array at each timestep M ./src/fields.cpp +5 M ./src/meep.h -3 +6 M ./src/update_e_from_d.cpp -11 +6 M ./src/update_e_from_d_prepare.cpp -2 +1 M ./src/update_e_from_d_sources.cpp -2 +1 M ./src/update_e_from_d_update.cpp -2 +1 Mon May 16 18:03:20 EDT 2005 stevenj@fftw.org * add possibility to change PML strength, e.g. pml(X) * 2.0 will increase PML conductivity by 2 (squaring attenuation for same thickness, in theory, albeit increasing numerical reflection) M ./src/meep.h -10 +17 M ./src/structure.cpp -6 +11 Mon May 16 15:45:01 EDT 2005 stevenj@fftw.org * comment regarding accuracy of modal volume calcs M ./src/energy_and_flux.cpp -2 +14 Mon May 16 14:58:27 EDT 2005 stevenj@fftw.org * Darcs is now right-handed (there was a bug in 1d/2d/3d that caused the curls to have the wrong signs, making the system "left-handed" and giving fluxes the wrong signs, although it didn't affect most other calculations) M ./src/fields.cpp -1 +1 M ./tests/flux.cpp -6 +6 Mon May 16 13:36:37 EDT 2005 stevenj@fftw.org * work around datatype change in HDF5 1.6.4 (grrr) M ./src/h5file.cpp -2 +13 Mon May 16 13:29:19 EDT 2005 stevenj@fftw.org * eliminate unnecessary allocation of PML fields M ./src/energy_and_flux.cpp -8 +14 M ./src/fields.cpp -9 +13 Wed Apr 27 15:33:47 EDT 2005 stevenj@fftw.org * whoops, fix compilation failure for --without-hdf5 M ./src/h5file.cpp +2 Mon Apr 25 17:25:20 EDT 2005 stevenj@fftw.org * fixed incorrect types in hdf5 calls M ./src/h5file.cpp -2 +2 Mon Apr 25 16:33:34 EDT 2005 stevenj@fftw.org * print a little more information from "aack, odd number of grid points" M ./src/structure.cpp -1 +2 Mon Apr 25 16:31:35 EDT 2005 stevenj@fftw.org * when phasing epsilon, use update_e_from_d to keep E in synch, rather than "manual" division and multiplication by inveps diagonal" M ./src/step.cpp -31 +1 Mon Apr 25 16:30:55 EDT 2005 stevenj@fftw.org * order spherical quadrature points to maximize spatial separation (to make interface detection more efficient, in future) M ./src/sphere-quad.cpp -7 +49 Mon May 2 10:44:24 EDT 2005 droundy@abridgegame.org * fix bug when running in cylindrical coordinates with real fields. M ./src/step_d.cpp -1 +3 M ./src/step_h.cpp -1 +3 Sat Feb 5 13:44:55 EST 2005 stevenj@fftw.org * output s/step along with time-step status M ./src/meep.h +1 M ./src/step.cpp -2 +8 M ./src/time.cpp -1 +1 Sat Feb 5 12:46:16 EST 2005 stevenj@fftw.org * fix comment M ./src/energy_and_flux.cpp -3 +3 Sat Feb 5 12:24:51 EST 2005 stevenj@fftw.org * rename Slicing to FieldOutput (since we also count hdf5 output under this) M ./src/h5fields.cpp r1 M ./src/meep.h r1 M ./src/slices.cpp r1 M ./src/time.cpp r1 Sat Feb 5 12:19:11 EST 2005 stevenj@fftw.org * more verbose output by default, with option to suppress by setting meep::quiet = true M ./configure.ac -10 M ./src/bands.cpp -6 +7 M ./src/fields.cpp -2 +3 M ./src/h5fields.cpp +2 M ./src/meep.h -5 +3 M ./src/mympi.cpp -2 +4 M ./src/output_directory.cpp -2 +3 M ./src/step.cpp -2 +9 M ./src/structure.cpp +3 M ./src/time.cpp -6 +6 M ./tests/2D_convergence.cpp +1 M ./tests/bench.cpp +1 M ./tests/bragg_transmission.cpp +1 M ./tests/convergence_cyl_waveguide.cpp +1 M ./tests/cylindrical.cpp +1 M ./tests/flux.cpp +1 M ./tests/h5test.cpp +1 M ./tests/integrate.cpp +1 M ./tests/known_results.cpp +1 M ./tests/one_dimensional.cpp +1 M ./tests/physical.cpp +1 M ./tests/symmetry.cpp +1 M ./tests/three_d.cpp +1 M ./tests/two_dimensional.cpp +1 Sat Feb 5 11:22:51 EST 2005 stevenj@fftw.org * allocate all fields lazily (not just in 2d), ensure all field arrays are initialized to null, don't allocate imag. part for is_real, add missing is_real check to fields::initialize, various cleanups M ./src/boundaries.cpp -9 +12 M ./src/fields.cpp -82 +61 M ./src/initialize.cpp -44 +25 M ./src/meep.h -3 +3 M ./src/meep_internals.h +1 M ./src/polarization.cpp -2 +4 M ./src/sources.cpp -1 +5 M ./tests/2D_convergence.cpp -1 +1 M ./tests/h5test.cpp -3 +3 M ./tests/known_results.cpp -1 +1 M ./tests/symmetry.cpp -8 +8 Fri Feb 4 19:53:44 EST 2005 stevenj@fftw.org * major surgery on connect_the_chunks connect_the_chunks was: (a) a major performance bottleneck on multiprocessor systems (b) very difficult to modify, consisting of the same code copy-and-pasted many times (c) fairly fragile, with the loops impossible to reorder without breaking step.cc I've tried to fix all of those problems. Now, instead of calling things like locate_point O(nc^2) where np is the number of chunks, it only computes it O(nc) times, and a lot of the duplication is removed. It's also much less fragile, because the connections are stored per phase type (complex, -1, or +1) rather than in one order-sensitive array. However, this required major changes to boundaries.cpp and related code. M ./src/boundaries.cpp -273 +163 M ./src/fields.cpp -25 +21 M ./src/meep.h -10 +14 M ./src/step.cpp -41 +58 Mon Jan 31 19:23:19 EST 2005 stevenj@fftw.org * added new methods dft_flux::scale_dfts, fields::require_component, and fields::remove_sources M ./src/dft.cpp -6 +6 M ./src/fields.cpp -7 +22 M ./src/meep.h -2 +8 M ./src/sources.cpp -9 +12 M ./tests/bragg_transmission.cpp -1 +1 Thu Jan 27 00:32:41 EST 2005 stevenj@fftw.org * prelimiary support for "D" sources, which multiply J by epsilon M ./src/sources.cpp +9 Thu Jan 27 00:30:34 EST 2005 stevenj@fftw.org * support symmetry-based reductions of geometric_volume_list for efficient computation e.g. of DFT fluxes etc M ./src/dft.cpp -45 +22 M ./src/meep.h -4 +2 M ./src/meep/vec.h -8 +24 M ./src/vec.cpp +63 Thu Jan 27 00:29:49 EST 2005 stevenj@fftw.org * bug fix in symmetry::phase_shift for Poynting vector M ./src/vec.cpp -1 +3 Thu Jan 27 00:28:26 EST 2005 stevenj@fftw.org * force newline in abort messages if one is missing M ./src/mympi.cpp +1 Tue Jan 25 20:19:21 EST 2005 stevenj@fftw.org * immediately flush master_printf output M ./src/mympi.cpp -1 +1 Mon Dec 6 18:04:09 EST 2004 stevenj@fftw.org * comment correction M ./src/h5fields.cpp -2 +1 M ./src/integrate.cpp -2 +1 Mon Dec 6 17:25:02 EST 2004 stevenj@fftw.org * added new derived_component type for various quantities (Poynting vector, energy density) useful to output in get_field and output_hdf5 M ./src/h5fields.cpp +68 M ./src/meep.h +8 M ./src/meep/vec.h -3 +41 M ./src/monitor.cpp +36 M ./src/vec.cpp +42 M ./tests/h5test.cpp -15 +24 Mon Dec 6 15:08:07 EST 2004 stevenj@fftw.org * consolidated min/max/abs functions in meep_internals.h M ./src/h5fields.cpp -5 +1 M ./src/meep_internals.h -13 +2 M ./src/vec.cpp -6 +1 Mon Dec 6 14:55:50 EST 2004 stevenj@fftw.org * whoops (only compute offsets for integration on Dielectric grid) M ./src/integrate.cpp -1 +2 Mon Dec 6 14:40:47 EST 2004 stevenj@fftw.org * fixed missing namespaces M ./src/update_e_from_d_update.cpp -5 +1 Mon Dec 6 14:21:53 EST 2004 stevenj@fftw.org * consolidated/simplified fields::output_hdf5 interface M ./src/h5fields.cpp -74 +54 M ./src/meep.h -25 +8 M ./tests/h5test.cpp -3 +3 Mon Dec 6 13:44:27 EST 2004 stevenj@fftw.org * add -*- C++ -*- to top of header files so that emacs will use C++ mode (even though they end with .h and not .hpp or .hh) M ./libctl/meep-ctl-const.h +1 M ./libctl/meep-ctl-swig.h +1 M ./libctl/meep-ctl.h +1 M ./src/meep.h +1 M ./src/meep/mympi.h +1 M ./src/meep/vec.h +1 M ./src/meep_internals.h +1 M ./src/ran.h +1 M ./src/threevec.h +1 Mon Dec 6 00:54:10 EST 2004 stevenj@fftw.org * rewrote hdf5 output again in terms of new generic field_function (to output an arbitrary function of the fields); also, when the Dielectric component is requested we use 3/trace(average inveps) instead of eps[i], since the former is closer to what is actually used for time-stepping M ./src/h5fields.cpp -107 +266 M ./src/integrate.cpp -8 +38 M ./src/meep.h -14 +57 M ./src/monitor.cpp -11 +66 Sun Dec 5 14:24:12 EST 2004 stevenj@fftw.org * whoops, forgot to add integrate.cpp A ./src/integrate.cpp Sun Dec 5 14:07:52 EST 2004 stevenj@fftw.org * rename fields::integrate to fields::loop_in_chunks, to reflect more generic nature; added *new* fields::integrate which *does* just do integration and makes it much much easier; rewrote energy_and_flux.cpp in terms of new integrate function ./src/fields_integrate.cpp -> ./src/loop_in_chunks.cpp M ./src/Makefile.am -6 +7 M ./src/dft.cpp -5 +5 r1 M ./src/energy_and_flux.cpp -231 +46 r2 M ./src/h5fields.cpp -4 +4 r1 M ./src/loop_in_chunks.cpp -32 +47 r1 M ./src/meep.h -7 +21 r2 M ./src/meep/mympi.h -1 +2 M ./src/mympi.cpp +8 M ./src/sources.cpp -5 +5 r1 M ./tests/integrate.cpp -50 +27 Fri Dec 3 20:02:06 EST 2004 stevenj@fftw.org * faster, more easily generalized output_hdf5 based on fields::integrate The old version of fields::output_hdf5 pre-dated fields::integrate, and had home-brewed code for looping over the chunks and symmetries and computing the output from each. Not only was this complicated (as opposed to centralizing the complexity in fields::integrate), but it also was based on fields::interpolate onto an arbitrary grid, which had the following disadvantages: * doing an arbitrary interpolation for every point in a large volume is very slow. This is a problem if we want to output often. * very hard to compute functions of more than one field component, e.g. the energy density or the average inveps dielectric, because on an arbitrary grid this requires communication in general. * hard to prevent different chunks/symmetries to write slightly overlapping data, which produces undefined results in parallel HDF5. The new code *always* outputs on the dielectric grid, which (since it is a fixed interpolation scheme) is a tight loop for each chunk, and is guaranteed by fields::integrate to be non-overlapping. Perhaps even more importantly, it will now be easy to implement output functions of more than one field component, since no communication is required for the interpolation. M ./src/h5fields.cpp -206 +174 M ./src/meep.h -3 +3 M ./tests/h5test.cpp -25 +36 Fri Dec 3 12:25:35 EST 2004 stevenj@fftw.org * whoops, fixed bug in last patch (vec min/max funcs) M ./src/vec.cpp +4 Fri Dec 3 00:37:08 EST 2004 stevenj@fftw.org * added more min/max functions for vec/ivec M ./src/meep/vec.h +6 M ./src/mympi.cpp +11 M ./src/vec.cpp -10 +30 Fri Dec 3 00:36:16 EST 2004 stevenj@fftw.org * added snap_unit_dims to fields::integrate M ./src/fields_integrate.cpp -3 +19 M ./src/meep.h -1 +2 Fri Dec 3 00:34:09 EST 2004 stevenj@fftw.org * comment clarification for yee2diel_offsets M ./src/vec.cpp -4 +6 Thu Dec 2 17:49:54 EST 2004 stevenj@fftw.org * stopgap fix for PML with non-diagonal inveps...is a longer-term, "proper" fix needed??? M ./src/structure.cpp +4 Mon Nov 29 21:37:42 EST 2004 stevenj@fftw.org * added h5file::prevent_deadlock() for deadlock-prevention hacks in exclusive-access HDF5 mode (maybe we should just ditch support for that and require HDF5 to be compiled with MPI?) M ./src/dft.cpp +2 M ./src/h5file.cpp -4 +10 M ./src/meep.h +1 M ./tests/bragg_transmission.cpp +2 Mon Nov 29 19:28:53 EST 2004 stevenj@fftw.org * completely revamped structure and structure_chunk initialization In the previous version of the code, the typical initialization sequence went like this: 1) create structure (initializes chunks, evaluates epsilon) 2) set PML (re-initializes chunks, shuffles epsilon around) Step (2) is problematic because the communication of epsilon to the new chunks was performed point-by-point. Not only is this incredibly slow, but it actually causes Tungsten's MPI implementation to crash (probably because there are too many messages). Moreover, it is completely unnecessary. In the new version, the PML boundaries are specified when the structure is first created, so that the chunks need only be computed once and are never re-shuffled around. INCOMPATIBLE API CHANGE: old: structure s(vol, eps, splitting, symmetries); s.use_pml_everywhere(1.0); new: structure s(vol, eps, pml(1.0), symmetries, splitting); In general, the PML boundary regions are specified by *summing* terms of the form pml(thickness, direction, High/Low). If one or both of the last two arguments is omitted, it means *all* sides and *all* directions, respectively. So, a more complicated example is: old: structure s(vol, eps, splitting, symmetries); s.use_pml(X, High, 1.0); s.use_pml(X, Low, 1.0); s.use_pml(Y, High, 1.0); new: structure s(vol, eps, pml(1.0, X) + pml(1.0, Y, High), symmetries, splitting); To specify *no* PML, you use: structure s(vol, eps, no_pml(), symmetries, splitting); This is actually the default, if you omit the boundary-region argument along with splitting (default = 0) and symmetries (default = identity). INCOMPATIBLE API CHANGE: old: s.set_epsilon(eps, minvol, do_aniso_averaging); new: s.set_epsilon(eps, do_aniso_averaging, minvol); The default for the last two arguments is true and 0, respectively, so in the usual case where you are using this function because you want to turn on averaging (currently not the default), you just do: s.set_epsilon(eps); M ./doc/complicated.tex -2 +1 M ./doc/epsilon_polariton_1d.tex -2 +1 M ./doc/lossgain_epsilon.tex -5 +4 M ./doc/nonlinear.tex -5 +3 M ./doc/omniguide.tex -1 +1 M ./doc/simple.tex -3 +2 M ./src/meep.h -31 +86 M ./src/structure.cpp -279 +139 M ./tests/2D_convergence.cpp -1 +1 M ./tests/bench.cpp -3 +2 M ./tests/bragg_transmission.cpp -4 +2 M ./tests/convergence_cyl_waveguide.cpp -3 +3 M ./tests/cylindrical.cpp -10 +8 M ./tests/flux.cpp -12 +6 M ./tests/h5test.cpp -3 +3 M ./tests/integrate.cpp -1 +1 M ./tests/known_results.cpp -5 +2 M ./tests/one_dimensional.cpp -4 +4 M ./tests/physical.cpp -4 +2 M ./tests/symmetry.cpp -42 +38 M ./tests/three_d.cpp -10 +7 M ./tests/two_dimensional.cpp -22 +12 Sun Nov 28 19:01:35 EST 2004 stevenj@fftw.org * provide high-resolution wall_time() function in lieu of clock(). Automatically print elapsed time upon program completion. Don't use exit(0) in main()...use return 0 so that ~initialize() is called. M ./configure.ac +7 M ./src/fields.cpp -2 +2 M ./src/meep.h -1 +1 M ./src/meep/mympi.h +5 M ./src/mympi.cpp +31 M ./src/time.cpp -10 +8 M ./tests/bench.cpp -20 +19 M ./tests/cylindrical.cpp -1 +1 M ./tests/flux.cpp -1 +1 M ./tests/one_dimensional.cpp -1 +1 M ./tests/three_d.cpp -1 +1 M ./tests/two_dimensional.cpp -1 +1 Wed Nov 24 20:04:09 EST 2004 stevenj@fftw.org * add stride0 function that returns 0, instead of 1, for unused dimensions, so that we can easily distinguish them from "real" dimensions in macros etc. M ./src/meep/vec.h -7 +9 M ./src/vec.cpp -5 +6 Wed Nov 24 20:03:39 EST 2004 stevenj@fftw.org * don't use make_average_eps in omniguide.tex M ./doc/omniguide.tex -1 +2 Wed Nov 24 17:49:55 EST 2004 stevenj@fftw.org * remove structure::make_average_eps (apparently unused, non-functional, pointless function) M ./src/meep.h -2 M ./src/structure.cpp -20 Fri Nov 5 12:45:13 EST 2004 stevenj@fftw.org * updated acx_mpi.m4 M ./m4/acx_mpi.m4 -4 +4 Fri Oct 29 21:30:13 EDT 2004 stevenj@fftw.org * added another joke M ./README -1 +1 Fri Aug 20 18:08:59 EDT 2004 alexrod7@mit.edu * added fields::electric_energy_weighted_integral function M ./src/energy_and_flux.cpp -10 +27 M ./src/meep.h +2 Thu Oct 28 21:51:37 EDT 2004 stevenj@fftw.org * resolve conflict M ./tests/2D_convergence.cpp -3 +3 Thu Oct 28 21:48:29 EDT 2004 alexrod7@mit.edu * bug fix: tensor epsilon averaging missed the z component in 2d (added test case for this) M! ./src/structure.cpp -1 +2 M! ./tests/2D_convergence.cpp -17 +29 Mon Aug 9 15:31:16 EDT 2004 alexrod7@mit.edu * add fields::electric_deps_integral_in_box function for perturbation theory etc. M ./src/energy_and_flux.cpp +59 M ./src/meep.h +2 Tue Jul 27 18:24:11 EDT 2004 stevenj@fftw.org * when computing max(E dot D), compute product of components *before* averaging, in closer analogue to how energy integral is computed M ./src/energy_and_flux.cpp -25 +12 Tue Jul 20 15:37:27 EDT 2004 alexrod7@mit.edu * add function to compute modal volume according to Purcell definition M ./src/energy_and_flux.cpp +103 M ./src/meep.h +2 Wed Jul 14 21:02:03 EDT 2004 stevenj@fftw.org * removed gratuitous "inline" keyword that confused gcc 3.3 M ./src/vec.cpp -1 +1 Wed Jul 14 20:02:19 EDT 2004 stevenj@fftw.org * correct save_dft_hdf5/load_dft_hdf5 for MPI, add test case to bragg_transmission.cpp (compute reflection by subtracting DFTs) M ./src/dft.cpp -11 +8 M ./src/meep/mympi.h +1 M ./src/mympi.cpp +8 M ./tests/bragg_transmission.cpp -24 +52 Wed Jul 14 17:38:18 EDT 2004 stevenj@fftw.org * vec(r,z) -> veccyl(r,z); vec2d(x,y) -> vec(x,y) as a historical artifact, the code used vec(_, _) to indicate cylindrical coordinates, while vec(_) was 1d and vec(_,_,_) was 3d. 2d was handled by vec2d(_, _). It makes much more sense to make cylindrical coordinates the exception, and so I have implemented this change. To insure that this does not introduce any bugs into Meep, I implemented the change in 2 stages. First, implement veccyl and remove vec(_, _) constructor -- the compiler catches any uses of the 2 argument vec(_,_) and I can replace them with veccyl. Second, remove vec2d and make vec(_,_) produce a 2d vector. USER CODE WILL NEED TO BE UPDATED, HOWEVER! Hopefully, the elimination of vec2d will clue people in that something has changed. M ./doc/complicated.tex -3 +3 M ./doc/energy_cons.tex -3 +3 M ./doc/example.cpp -3 +3 M ./doc/lossgain_epsilon.tex -8 +8 M ./doc/nonlinear.tex -3 +3 M ./doc/omniguide.tex -6 +6 M ./doc/polaritonbands.tex -2 +2 M ./doc/simple.tex -2 +2 M ./src/anisotropic_averaging.cpp -3 +4 M ./src/boundaries.cpp -3 +4 M ./src/meep/vec.h -8 +8 M ./src/slices.cpp -16 +16 M ./src/step.cpp -1 +1 M ./src/vec.cpp -8 +8 M ./tests/2D_convergence.cpp -9 +9 M ./tests/bench.cpp -10 +10 M ./tests/convergence_cyl_waveguide.cpp -4 +4 M ./tests/cylindrical.cpp -33 +33 M ./tests/flux.cpp -14 +14 M ./tests/h5test.cpp -6 +6 M ./tests/known_results.cpp -2 +2 M ./tests/physical.cpp -5 +5 M ./tests/symmetry.cpp -103 +103 M ./tests/two_dimensional.cpp -42 +42 Wed Jul 14 15:22:17 EDT 2004 stevenj@fftw.org * slight change in flux tolerance M ./tests/flux.cpp -1 +1 Tue Jul 13 19:33:26 EDT 2004 stevenj@fftw.org * rename c -> Courant, make a field of structure instead of global First of all, I renamed "c" to "Courant", since that is what it is (Courant number = dt/dx) ... it is not the speed of light, which should be 1. (I've run into bugs multiple times now from having "c" be shadowed by a local variable, e.g. for the component, and this gets rid of that forever.) Second, since people may want to change the Courant number to reduce numerical dispersion (in general, it only has to be < 1 / sqrt(#dimensions)), I made it a field of the structure class (and also of structure_chunk and fields_chunk). The default is still 0.5, however. Third, inva is no longer a field of the fields class; instead, we have a new field dt which is the timestep. This is much more intuitive and useful to the end-user (and to us) instead of having to compute Courant*inva all the time. There some minor related changes. e.g. do_harminv takes simply the sampling interval dt instead of a scale_factor and a. M ./hsrc/step_d_gen.hs -3 +3 M ./hsrc/step_h_gen.hs -3 +3 M ./hsrc/update_from_e_gen.hs -1 +1 M ./src/bands.cpp -16 +14 M ./src/boundaries.cpp -1 +1 M ./src/dft.cpp -2 +2 M ./src/fields.cpp -7 +9 M ./src/initialize.cpp -5 +4 M ./src/meep.h -10 +11 M ./src/meep/vec.h -4 +7 M ./src/meep_internals.h -1 +1 M ./src/monitor.cpp -1 +1 M ./src/polarization.cpp -2 +2 M ./src/slices.cpp -5 +5 M ./src/sources.cpp -1 +1 M ./src/step.cpp -2 +3 M ./src/step_d.cpp -13 +13 M ./src/step_h.cpp -12 +12 M ./src/structure.cpp -11 +23 M ./src/vec.cpp -32 +28 M ./tests/bench.cpp -1 +1 M ./tests/bragg_transmission.cpp -8 +8 M ./tests/convergence_cyl_waveguide.cpp -2 +2 M ./tests/flux.cpp -8 +8 M ./tests/h5test.cpp -1 +1 M ./tests/physical.cpp -2 +2 Tue Jul 13 18:20:48 EDT 2004 stevenj@fftw.org * use delete[] instead of delete in dft.cpp M ./src/dft.cpp -1 +1 Tue Jul 13 00:41:36 EDT 2004 stevenj@fftw.org * grrrr M ./libctl/Makefile.am -8 +7 Tue Jul 13 00:29:32 EDT 2004 stevenj@fftw.org * grrr M ./libctl/Makefile.am -1 +1 Tue Jul 13 00:14:52 EDT 2004 stevenj@fftw.org UNDO: set GEN_CTL_IO even --without-libctl M ./configure.ac -3 +3 Tue Jul 13 00:19:32 EDT 2004 stevenj@fftw.org * can't buld meep_wrap.cxx without libctl M ./libctl/Makefile.am -2 +8 Tue Jul 13 00:14:52 EDT 2004 stevenj@fftw.org * set GEN_CTL_IO even --without-libctl M ./configure.ac -3 +3 Mon Jul 12 23:38:50 EDT 2004 stevenj@fftw.org * disable debugging output in integrate.cpp M ./tests/integrate.cpp -1 +1 Mon Jul 12 23:33:53 EDT 2004 stevenj@fftw.org * fix bug in dft_flux spectrum, support dft over list of geometric volumes in preparation for exploiting symmetry, add routine to get dft flux through surface of box M ./src/dft.cpp -69 +133 M ./src/energy_and_flux.cpp -10 +10 M ./src/fields_integrate.cpp -1 +1 M ./src/h5file.cpp -1 +1 M ./src/meep.h -19 +27 M ./src/meep/vec.h -2 +19 M ./src/vec.cpp +9 M ./tests/bench.cpp -2 +2 M ./tests/bragg_transmission.cpp -7 M ./tests/flux.cpp -32 +93 M ./tests/integrate.cpp -51 +98 Thu Jul 1 12:02:55 EDT 2004 stevenj@fftw.org * note FIXME in dft.cpp (save_hdf5 is wrong for MPI) M ./src/dft.cpp +4 Wed Jun 30 19:46:07 EDT 2004 stevenj@fftw.org * make cylindrical flux test include r=0 in interior of integration volume M ./tests/flux.cpp -7 +7 Wed Jun 30 19:38:06 EDT 2004 stevenj@fftw.org * added cylindrical-coord flux test M ./tests/flux.cpp -2 +46 Fri Jun 25 14:03:04 EDT 2004 stevenj@fftw.org * fields::add_dft_pt, so that we can get the dft of a point without computing field value * dV M ./src/dft.cpp -1 +14 M ./src/meep.h -1 +4 Tue Jun 22 14:53:56 EDT 2004 stevenj@fftw.org * update for new libctl, which supports (limited) SWIG integration M ./libctl/Makefile.am -3 +3 A ./libctl/meep-ctl-swig.h M ./libctl/meep-ctl.h -3 +1 M ./libctl/meep.i +8 M ./libctl/meep.scm.in -2 +5 M ./libctl/structure.cpp -4 +4 Mon Jun 21 20:08:21 EDT 2004 stevenj@fftw.org * append_data option only makes sense for fields::output_hdf5 version that takes an h5file option M ./src/h5fields.cpp -3 +2 M ./src/meep.h -7 +7 Mon Jun 21 19:57:49 EDT 2004 stevenj@fftw.org * various modifications to support using SWIG to help generate Guile (libctl) interface, so I don't have to muck around with smobs M ./libctl/Makefile.am -4 +12 M ./libctl/meep-ctl.h -11 +6 M ./libctl/meep.cpp -2 +3 A ./libctl/meep.i M ./libctl/meep.scm.in -3 +3 R ./libctl/my-smob.h M ./libctl/structure.cpp -100 +5 M ./src/meep.h -13 +10 M ./src/meep/vec.h -1 +1 Mon Jun 21 17:26:44 EDT 2004 stevenj@fftw.org * print benchmark output in easier format for grepping and tabulating M ./tests/bench.cpp -5 +5 Wed Jul 14 16:45:12 EDT 2004 meep@ab-initio.mit.edu * don't use --enable-shared in darcs_test (triggers a bug with gcc 2.95, apparently) M ./darcs_test -1 +1 Mon Jun 21 00:28:57 EDT 2004 stevenj@fftw.org * no need to include mymypi.h and vec.h if already included via meep.h M ./src/h5file.cpp -1 M ./src/vec.cpp -2 Mon Jun 21 00:22:21 EDT 2004 stevenj@fftw.org * vec.h and mympi.h should be installed under /usr/local/include/meep, while meep.h is installed under /usr/local/include ./src/mympi.h -> ./src/meep/mympi.h ./src/vec.h -> ./src/meep/vec.h M ./src/Makefile.am -1 +3 A ./src/meep/ M ./src/meep.h -2 +2 Sat Jun 19 14:09:48 EDT 2004 stevenj@fftw.org * lazy chunk connection: only reconnect chunks once, and do so in step_boundaries, after chunk connections have been invalidated by sources, boundary conditions, etc. M ./src/boundaries.cpp -12 +16 M ./src/fields.cpp -3 +3 M ./src/initialize.cpp -11 +21 M ./src/meep.h -10 +8 M ./src/mympi.cpp +16 M ./src/mympi.h +2 M ./src/sources.cpp -1 +1 M ./src/step.cpp +1 M ./tests/Makefile.am +2 Fri Jun 18 20:12:48 EDT 2004 stevenj@fftw.org * whoops, incorrect return type on new set_origin M ./src/vec.h -3 +3 Fri Jun 18 19:59:51 EDT 2004 stevenj@fftw.org * only call func() once per point, and use LOOP_OVER_VOL, in initialize_field M ./src/initialize.cpp -10 +9 Fri Jun 18 19:47:38 EDT 2004 stevenj@fftw.org * optimizations after profiling After running the code with profiling (compile with -pg) and analyzing the results with gprof, I noticed that a lot of time was being wasted calling volume::io() and volume::iloc() during "startup". (This corroborated an earlier observation that the pre-time-stepping code was taking a long time, several seconds in 3d.) I've sped up this greatly by several improvements, summarized as follows: 1) Eliminate loops of the form: for (i = 0; i < v.ntot(); ++i) { ivec here = v.iloc(c, i); ... } replacing them with LOOP_OVER_VOL 2) Add special loops LOOP_OVER_VOL_OWNED and LOOP_OVER_VOL_NOTOWNED to loop just over the owned and not-owned (boundary) points, respectively. 3) io() was still taking too long, so I replaced it with a io member that is recomputed on the rare occasions when the origin is changed. To make sure that it gets recomputed, volume::origin is now private, and there are functions for getting/setting it. Plus a few other tricks/optimizations in heavily-called "startup" functions. M ./src/boundaries.cpp -209 +199 M ./src/meep.h -1 +1 M ./src/polarization.cpp -8 +14 M ./src/sources.cpp -4 +1 M ./src/step_d.cpp -13 +13 M ./src/step_h.cpp -12 +12 M ./src/structure.cpp -53 +65 M ./src/vec.cpp -33 +106 M ./src/vec.h -15 +52 M ./tests/bench.cpp -1 +1 M ./tests/flux.cpp -3 +3 M ./tests/integrate.cpp -4 +94 M ./tests/symmetry.cpp -1 +1 Thu Jun 17 17:50:06 EDT 2004 stevenj@fftw.org * pass shift ivect instead of vec to field integrand, so that ivec coords can be computed without worrying about rounding M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -3 +3 M ./src/fields_integrate.cpp -3 +3 M ./src/meep.h -1 +1 M ./src/sources.cpp -7 +7 M ./tests/integrate.cpp -2 +2 Thu Jun 17 13:56:21 EDT 2004 stevenj@fftw.org * whoops, bug in h5file::read_size M ./src/dft.cpp -1 +1 M ./src/h5file.cpp +1 Thu Jun 17 03:51:31 EDT 2004 stevenj@fftw.org * accept data prefix in dft/flux load/save HDF5 M ./src/dft.cpp -12 +16 M ./src/meep.h -4 +6 Thu Jun 17 02:34:46 EDT 2004 stevenj@fftw.org * set outdir in fields::set_output_directory(!!) M ./src/output_directory.cpp -2 +2 Thu Jun 17 02:33:58 EDT 2004 stevenj@fftw.org * removed unused dindex M ./tests/bragg_transmission.cpp -2 Thu Jun 17 02:33:37 EDT 2004 stevenj@fftw.org * extra check in src_vol integrand M ./src/sources.cpp +3 Thu Jun 17 02:32:24 EDT 2004 stevenj@fftw.org * add add_volume_source that assumes a constant amplitude M ./src/meep.h +3 M ./src/sources.cpp -2 +8 Thu Jun 10 02:29:06 EDT 2004 stevenj@fftw.org * update bragg_transmission for new output_hdf5 syntax, print a little output M ./tests/bragg_transmission.cpp -3 +6 Thu Jun 10 02:19:35 EDT 2004 stevenj@fftw.org * whoops, some fixes to previous h5file patch M ./src/h5file.cpp -7 +8 Thu Jun 10 02:05:50 EDT 2004 stevenj@fftw.org * lazy HDF5 creation, closing after data extension, to avoid deadlocks for writing time data M ./src/dft.cpp +1 M ./src/h5fields.cpp +2 M ./src/h5file.cpp -46 +68 M ./src/meep.h -1 +6 Thu Jun 10 01:05:33 EDT 2004 stevenj@fftw.org * fixed logic bug in hdf5: need to keep a list of extensible datasets; just remembering most recent one is insufficient M ./src/h5file.cpp -21 +60 M ./src/meep.h -1 +10 M ./tests/h5test.cpp -1 +1 Thu Jun 10 00:09:08 EDT 2004 stevenj@fftw.org * reworked HDF5 I/O api, so that file can be kept open until I/O operations are finished ./src/h5io.cpp -> ./src/h5file.cpp M ./src/Makefile.am -3 +2 M ./src/dft.cpp -69 +25 M ./src/h5fields.cpp -39 +25 M ./src/h5file.cpp -315 +415 R ./src/h5io.h M ./src/meep.h -18 +71 M ./tests/h5test.cpp -38 +37 Tue Jun 8 17:37:18 EDT 2004 stevenj@fftw.org * use "=", not "==" for sh tests M ./configure.ac -2 +2 Tue Jun 8 16:43:41 EDT 2004 stevenj@fftw.org * lower tolerance to ignore small negative weights M ./src/vec.cpp -1 +1 Tue Jun 8 16:43:01 EDT 2004 stevenj@fftw.org * according to the GNU libc manual, you should always ignore SIGINT if the parent process wants you to M ./src/control_c.cpp -1 +2 Tue Jun 8 16:41:56 EDT 2004 stevenj@fftw.org * check whether to catch and ignore SIGFPE, for darn Alpha systems that crash even on innocuous things like exp(-infinity) M ./configure.ac +14 M ./src/mympi.cpp +7 Mon Jun 7 22:13:32 EDT 2004 stevenj@fftw.org * check for MPI immediately after getting C++ compiler, so that mpiCC is used for all subsequent tests (for --with-mpi) M ./configure.ac -14 +17 Fri Jun 4 18:41:55 EDT 2004 stevenj@fftw.org * don't output hdf5 file in bragg_transmission test M ./tests/bragg_transmission.cpp -1 +2 Wed Jun 2 16:50:01 EDT 2004 stevenj@fftw.org * removed DFT volumes and fluxes from TODO (since done) M ./TODO -4 +1 Wed Jun 2 16:42:46 EDT 2004 stevenj@fftw.org * added geometric_volume::normal_direction M ./src/dft.cpp -28 +2 M ./src/energy_and_flux.cpp -30 +5 M ./src/vec.cpp +31 M ./src/vec.h +1 Wed Jun 2 16:30:08 EDT 2004 stevenj@fftw.org * bug fixes in dft, add dft_flux feature, add test case comparing to analytical 1d Bragg transmission spectrum M ./src/dft.cpp -1 +125 M ./src/meep.h +28 M ./src/mympi.cpp +8 M ./src/mympi.h +1 M ./tests/Makefile.am -4 +4 A ./tests/bragg_transmission.cpp Tue Jun 1 02:44:45 EDT 2004 stevenj@fftw.org * added 2d flux test M ./tests/flux.cpp -3 +49 Tue Jun 1 01:00:27 EDT 2004 stevenj@fftw.org * IVEC_LOOP_WEIGHT macro cleanup M ./src/dft.cpp -1 +1 M ./src/energy_and_flux.cpp -3 +3 M ./src/sources.cpp -1 +1 M ./src/vec.h -3 +3 M ./tests/integrate.cpp -2 +4 Mon May 31 21:56:30 EDT 2004 stevenj@fftw.org * whoops, do I remember how to compute cross products? M ./src/energy_and_flux.cpp -10 +19 Mon May 31 20:22:39 EDT 2004 stevenj@fftw.org * as long as we have ivec::<=, we should have >=, <, and > too M ./src/vec.h +15 Mon May 31 20:22:10 EDT 2004 stevenj@fftw.org * whoops, inva instead of a in fields::integrate for source volumes M ./src/fields_integrate.cpp -1 +1 Mon May 31 19:58:08 EDT 2004 stevenj@fftw.org * added unit_vec function to vec.h M ./src/vec.h -1 +7 Mon May 31 18:49:44 EDT 2004 stevenj@fftw.org * make sure coordinates are exact in symmetry.cpp In symmetry.cpp, we want to check that adding symmetry to a simulation produces *exactly* the same result as the simulation without explicit use of symmetry. This, however, requires a great deal of care with floating point arithmetic. In particular, one important requirement is that the sources *exactly* obey the symmetry condition. In order for this to be true, the location of the source *as represented within floating point* must be symmetric. (Recall that floating-point can only represent base-2 rational fractions exactly, i.e. integer * 2^e.) To impose this condition, we employ two tricks: First, the resolution 'a' should be exactly representable (e.g. a power of 2) , so that no surprises occur when converting vecs to ivecs etc. Second, the coordinates, or at least those coordinates which are supposed to be symmetric, must be exactly representable. For example, suppose that something is supposed to be mirror symmetric around x=0.5. You might think that sources at x=0.2 and x=0.8 would satisfy this, but they don't because those two coordinates are not exactly representable--they are stored as 0.2+eps1 and 0.8+eps2, where eps1 and eps2 are ~1e-16, and these coordinates are not symmetric. Instead, we use e.g. x=0.25 and x=0.75, which are symmetric because they are exactly represented (1 / 2^2 and 3 / 2^2, respectively). Of course, a user code is not expected to play these games, but in such circumstances it is acceptable for the symmetric and non-symmetric simulations to differ by errors on the order of the machine precision. M ./tests/symmetry.cpp -21 +21 Sun May 30 20:31:25 EDT 2004 stevenj@fftw.org * only call alloc_f() for is_mine() chunks M ./src/sources.cpp -1 +1 Sun May 30 20:30:49 EDT 2004 stevenj@fftw.org * LOOP_OVER_IVECS cleanups M ./src/dft.cpp -10 +4 M ./src/energy_and_flux.cpp -22 +7 M ./src/sources.cpp -5 +1 M ./src/vec.h -23 +24 M ./tests/integrate.cpp -17 +13 Sun May 30 19:59:08 EDT 2004 stevenj@fftw.org * replace old add_source_volume with new version based on fields::integrate M ./src/dft.cpp -7 +5 M ./src/fields_integrate.cpp -1 +16 M ./src/meep.h -19 +12 M ./src/meep_internals.h -2 +2 M ./src/sources.cpp -109 +94 Sat May 29 03:44:12 EDT 2004 stevenj@fftw.org * add max() function for symmetry.cpp, when C++ doesn't provide it M ./tests/symmetry.cpp +2 Sat May 29 03:02:24 EDT 2004 stevenj@fftw.org * updated "known result" for polariton_energy for new fields::integrate-based energy The new field_energy function, using fields::integrate, gives slightly different energy results from the old code. This is because of different integration weights for the boundary edges...I think the new version is more reasonable, actually. Basically, the old code just summed up the energy for every point in the cell, with uniform integration weight. The new code is almost the same, except that at the boundaries, it integrates the boundary pixels assuming linear interpolation to the points just beyond (or at) the boundary. (Points beyond the boundary are assumed zero for non-periodic boundary conditions.) I think this should be more accurate. Of course, the new result and the old result converge to one another as the resolution is increased. M ./tests/known_results.cpp -3 +3 Sat May 29 02:51:55 EDT 2004 stevenj@fftw.org * completely replaced old flux_plane stuff with new flux_box calculation (supports 2d/3d flux integration, not just 1d) M ./src/Makefile.am -7 +6 M ./src/energy_and_flux.cpp +41 r1 M ./src/fields.cpp -3 R ./src/fluxes.cpp M ./src/meep.h -24 +28 r1 M ./src/meep_internals.h -31 M ./src/step.cpp -1 +3 M ./src/vec.h +1 M ./tests/bench.cpp r1 M ./tests/flux.cpp -1 +1 r1 Sat May 29 01:53:07 EDT 2004 stevenj@fftw.org * added fields::integrate-based flux and thermo. energy M ./src/dft.cpp -9 +7 M ./src/energy_and_flux.cpp -27 +141 M ./src/meep.h -2 +3 M ./src/meep_internals.h -1 +1 M ./src/polarization.cpp -11 Fri May 28 23:27:41 EDT 2004 stevenj@fftw.org * fields::integrate now works over an arbitrary Yee grid M ./src/dft.cpp -1 +3 M ./src/energy_and_flux.cpp -41 +26 M ./src/fields_integrate.cpp -34 +49 M ./src/meep.h -2 +4 M ./src/vec.cpp -1 +12 M ./src/vec.h +1 M ./tests/integrate.cpp -5 +15 M ./tests/symmetry.cpp -1 +2 Fri May 28 21:27:12 EDT 2004 stevenj@fftw.org * some code compression in dft.cpp M ./src/dft.cpp -52 +34 Fri May 28 20:30:27 EDT 2004 stevenj@fftw.org * fixes to fields::integrate and friends (+ more rigorous test), use fields::integrate for energy integration M ./src/dft.cpp -29 +20 M ./src/energy_and_flux.cpp -40 +84 M ./src/fields_integrate.cpp -87 +147 M ./src/meep.h -2 +1 M ./src/vec.cpp +16 M ./src/vec.h +19 M ./tests/integrate.cpp -35 +73 Thu May 27 22:20:02 EDT 2004 stevenj@fftw.org * added dft.cpp: generic DFT volume support M ./src/Makefile.am -1 +1 A ./src/dft.cpp M ./src/fields.cpp +2 M ./src/meep.h -2 +59 M ./src/step.cpp +1 M ./src/vec.h -3 +3 Thu May 27 20:18:02 EDT 2004 stevenj@fftw.org * added read_chunk, read_size to h5io M ./src/h5io.cpp -41 +203 M ./src/h5io.h -23 +28 Fri May 28 18:49:43 EDT 2004 michel@mit.edu * don't call globals "dirname", since this is a library function in POSIX M ./tests/cylindrical.cpp r1 M ./tests/known_results.cpp r1 M ./tests/one_dimensional.cpp r1 M ./tests/symmetry.cpp r1 M ./tests/three_d.cpp r1 M ./tests/two_dimensional.cpp r1 Fri May 28 18:41:02 EDT 2004 michel@mit.edu * whoops, missing close paren M ./configure.ac -1 +1 Fri May 28 18:40:15 EDT 2004 michel@mit.edu * check for fftw2 installed as libdfftw M ./configure.ac -2 +3 M ./src/monitor.cpp -1 +3 Thu May 27 04:58:29 EDT 2004 stevenj@fftw.org * minor tweak M ./src/fields_integrate.cpp -1 +1 Thu May 27 04:54:43 EDT 2004 stevenj@fftw.org * whoops M ./src/fields_integrate.cpp -1 +1 Thu May 27 04:28:04 EDT 2004 stevenj@fftw.org * add fields::integrate and friends (this should make it *much* easier to implement DFT volumes, integration of energy/flux, etcetera) M ./src/Makefile.am -6 +8 A ./src/fields_integrate.cpp M ./src/meep.h +12 M ./src/meep_internals.h +13 M ./src/mympi.cpp +16 M ./src/mympi.h +2 M ./src/vec.cpp -9 +24 M ./src/vec.h -2 +63 M ./tests/Makefile.am -2 +3 A ./tests/integrate.cpp Mon May 24 20:24:07 EDT 2004 stevenj@fftw.org * comments re: src_vol M ./TODO +8 Mon May 24 17:50:31 EDT 2004 stevenj@fftw.org * whoops, fixed infinite loop introduced by previous patch M ./src/h5fields.cpp -1 +2 Mon May 24 17:40:25 EDT 2004 stevenj@fftw.org * Support HDF5 output of supercell (or volume not intersecting cell) for periodic boundaries M ./TODO -1 M ./src/h5fields.cpp -76 +151 M ./src/vec.h +7 M ./tests/h5test.cpp -15 +25 Sun May 23 19:50:29 EDT 2004 stevenj@fftw.org * add h5io::read and h5io::write for string data M ./src/h5io.cpp -48 +130 M ./src/h5io.h +5 M ./src/mympi.cpp +11 M ./src/mympi.h +1 M ./tests/h5test.cpp +16 Sun May 23 18:43:54 EDT 2004 stevenj@fftw.org * hdf5 output should be single-precision by default (no reason to waste a factor of 2 in space, since FDTD isn't accurate to 8 decimal places anyway), changed order of output_hdf5 etc. to be somewhat more sensible M ./src/h5fields.cpp -9 +12 M ./src/h5io.cpp -6 +9 M ./src/h5io.h -5 +5 M ./src/meep.h -3 +6 M ./tests/h5test.cpp -3 +3 Sun May 23 18:31:58 EDT 2004 stevenj@fftw.org * FIXME: thermo_energy_in_box has a comment saying it is buggy for symmetry & parallel, but it is still being called M ./src/energy_and_flux.cpp -2 Sun May 23 14:54:15 EDT 2004 stevenj@fftw.org * HDF5 epsilon output is now supported; note how we plan to implement energy density and Poynting vector output M ./TODO -1 +3 Sun May 23 14:50:06 EDT 2004 stevenj@fftw.org * support Dielectric component in get_field, elsewhere; added NO_DIRECTION direction so that scalars work with symmetry; fixed fields::get_eps so that it gives same results with multiple chunks; silenced numerous gcc 3.4 compiler warnings M ./src/boundaries.cpp -2 +2 M ./src/control_c.cpp -1 +2 M ./src/energy_and_flux.cpp +2 M ./src/fluxes.cpp +1 M ./src/h5fields.cpp -5 +7 M ./src/meep.h -5 +15 M ./src/monitor.cpp -51 +78 M ./src/mympi.h -1 +1 M ./src/output_directory.cpp -33 +8 M ./src/sources.cpp -1 +1 M ./src/structure.cpp -1 +1 M ./src/threevec.h -1 +1 M ./src/update_e_from_d_sources.cpp -1 M ./src/vec.cpp -12 +17 M ./src/vec.h -2 +4 M ./tests/h5test.cpp -19 +25 Sun May 23 01:31:44 EDT 2004 stevenj@fftw.org * silence warning in bands.cpp M ./src/bands.cpp -1 +1 Sat May 22 21:42:00 EDT 2004 stevenj@fftw.org * changed prototypes for output_hdf5, add option to automatically name files etc. like for slice output M ./src/h5fields.cpp -10 +32 M ./src/meep.h -4 +8 M ./tests/h5test.cpp -6 +9 Thu May 20 19:17:50 EDT 2004 michel@mit.edu * more TODO M ./TODO -3 +12 Thu May 20 17:41:20 EDT 2004 michel@mit.edu * set small weight to zero for interpolation, check for negative weights M ./src/vec.cpp +10 Thu May 20 00:38:36 EDT 2004 stevenj@fftw.org * lower harminv limit M ./src/bands.cpp -1 +1 Thu May 20 00:12:01 EDT 2004 stevenj@fftw.org * prevent harminv matrices from getting too big M ./src/bands.cpp +1 Wed May 19 23:25:47 EDT 2004 stevenj@fftw.org * pick closest freq to converged value, instead of last one within 0.03 M ./tests/convergence_cyl_waveguide.cpp -2 +2 Wed May 19 23:24:33 EDT 2004 stevenj@fftw.org * use fixed spectral density instead of fixed number of modes as default in do_harminv, to avoid singular eigenproblems and resulting instabilities, as also described in 'man harminv' M ./src/bands.cpp -4 +6 M ./src/meep.h -2 +2 Wed May 19 03:36:38 EDT 2004 stevenj@fftw.org * whoops, merge pre-split harminv-related changes made with Mihai M ./TODO -3 M ./configure.ac -5 +3 Wed May 19 03:10:38 EDT 2004 stevenj@fftw.org * whoops, limit nf by maxbands, not numfreqs M ./src/bands.cpp -4 +4 Tue May 18 23:55:43 EDT 2004 stevenj@fftw.org * rewrite harminv support for harminv 1.1 M ./configure.ac -2 +2 M ./src/bands.cpp -108 +117 M ./src/meep.h -1 +5 Tue May 18 23:52:46 EDT 2004 stevenj@fftw.org * bug fix: handle case where harminv returns only 1 frequency M ./tests/2D_convergence.cpp -2 +3 Mon May 17 18:42:14 EDT 2004 stevenj@fftw.org * give error if ghc is missing in --enable-maintainer-mode M ./configure.ac +3 Tue May 18 15:06:53 EDT 2004 michel@mit.edu * Fix slice output bug due to buffering M ./src/slices.cpp -7 +24 Thu May 13 19:52:53 EDT 2004 michel@mit.edu * TODO: split harminv M ./TODO +3 Thu May 13 19:32:58 EDT 2004 michel@mit.edu * error if no LAPACK (disable harminv instead?), abort if try to save to HDF5 without HDF5 M! ./configure.ac -3 +6 M! ./src/h5io.cpp +2 Sat May 15 01:15:25 EDT 2004 stevenj@fftw.org * fixed handling of missing pkg-config and/or harminv M ./configure.ac -2 +2 Sat May 15 00:28:43 EDT 2004 stevenj@fftw.org * use external harminv library M ./Makefile.am +2 M ./configure.ac -13 +21 A ./m4/pkg.m4 M ./src/Makefile.am -2 +2 M ./src/bands.cpp -24 +22 R ./src/harminv.cpp R ./src/harminv.h M ./tests/2D_convergence.cpp +3 M ./tests/convergence_cyl_waveguide.cpp +4 Thu May 13 19:23:05 EDT 2004 michel@mit.edu * fix bug: inverse symmetry is S.transform(foo,-sn), not S.transform(foo,S.multiplicity()-sn) M ./src/sources.cpp -1 +1 Thu May 13 18:31:44 EDT 2004 stevenj@fftw.org * TODO file A ./TODO Thu May 13 18:20:11 EDT 2004 stevenj@fftw.org * support compilation without FFTW or GSL M ./configure.ac -3 +5 M ./src/initialize.cpp -3 +20 M ./src/monitor.cpp -2 +12 Thu May 13 18:15:44 EDT 2004 stevenj@fftw.org * prevent floating-point exception from 0/0 M ./tests/physical.cpp -1 +2 Wed May 12 20:34:36 EDT 2004 stevenj@fftw.org * added strategic calls to sync() and all_wait() to get HDF5 output working under MPI M ./src/h5io.cpp -1 +3 M ./tests/h5test.cpp +10 Wed May 12 18:36:35 EDT 2004 stevenj@fftw.org * bug fix: h5io::write_chunk forgot to call H5Dclose M ./src/h5io.cpp +2 M ./tests/h5test.cpp -1 +1 Wed May 12 18:01:40 EDT 2004 stevenj@fftw.org * fixes so that h5io.cpp compiles without hdf5 M ./src/h5io.cpp -8 +3 Wed May 12 17:47:15 EDT 2004 stevenj@fftw.org * make h5test pass (trivially) in --without-hdf5 case M ./tests/h5test.cpp -1 +3 Wed May 12 17:34:16 EDT 2004 stevenj@fftw.org * workaround for bug in g++ 2.95 M ./tests/h5test.cpp -1 +2 Wed May 12 17:30:27 EDT 2004 stevenj@fftw.org * more robust checking for feenableexcept declaration M ./configure.ac -2 +21 M ./src/mympi.cpp +3 Wed May 12 17:02:00 EDT 2004 stevenj@fftw.org * define _GNU_SOURCE to make sure feenableexcept is declared by fenv.h M ./src/mympi.cpp -1 +3 Wed May 12 16:39:45 EDT 2004 stevenj@fftw.org * comment re src_vol index comparison M ./src/sources.cpp +2 Wed May 12 16:38:12 EDT 2004 stevenj@fftw.org * added h5test case for appending data (plus some cleanups/fixes in append case) M ./src/h5fields.cpp -1 M ./src/h5io.cpp -8 +14 M ./tests/h5test.cpp +76 Wed May 12 14:43:53 EDT 2004 stevenj@fftw.org * h5io::write should only execute on master M ./src/h5io.cpp -5 +7 Wed May 12 14:43:01 EDT 2004 michel@mit.edu * implemented volume sources M ./hsrc/update_e_from_d_gen.hs -8 +10 M ./src/boundaries.cpp +50 M ./src/meep.h -9 +12 M ./src/meep_internals.h -12 +16 M ./src/sources.cpp -53 +121 M ./src/step.cpp -10 +11 M ./src/vec.cpp -10 +8 M ./src/vec.h +1 M ./tests/known_results.cpp -16 +16 M ./tests/symmetry.cpp -12 +12 Wed May 12 03:51:24 EDT 2004 stevenj@fftw.org * include "meep_internals" for min() and max() functions M ./tests/h5test.cpp +1 Wed May 12 03:06:07 EDT 2004 stevenj@fftw.org * whoops, forgot to include h5fields.cpp, duhh A ./src/h5fields.cpp Wed May 12 03:00:11 EDT 2004 stevenj@fftw.org * whoops, make sure z dir. of h5 output file is non-empty in test M ./tests/h5test.cpp -1 +1 Wed May 12 02:58:16 EDT 2004 stevenj@fftw.org * slightly smaller h5test M ./tests/h5test.cpp -3 +3 Wed May 12 02:54:46 EDT 2004 stevenj@fftw.org * get damned HDF5 test program to pass with symmetry M ./src/meep.h -1 M ./src/monitor.cpp -14 +3 M ./tests/h5test.cpp -59 +147 Tue May 11 21:05:19 EDT 2004 stevenj@fftw.org * support inverse transforms in symmetry::transform (denoted by -n) M ./src/vec.cpp -3 +3 Tue May 11 20:22:14 EDT 2004 stevenj@fftw.org * fixed chunk bug in h5io, check splitting in h5test M ./src/h5io.cpp -1 +1 M ./tests/h5test.cpp -28 +32 Tue May 11 20:04:35 EDT 2004 stevenj@fftw.org * 3d h5test M ./tests/h5test.cpp -5 +108 Tue May 11 19:15:31 EDT 2004 stevenj@fftw.org * fixed various bugs in h5io, got first test case working M ./src/h5io.cpp -50 +86 M ./src/mympi.cpp -4 +18 M ./src/mympi.h -1 +3 A ./tests/h5test.cpp Tue May 11 16:02:51 EDT 2004 stevenj@fftw.org * initial h5 output support (no symmetry, not tested much) M ./src/Makefile.am -3 +3 M ./src/h5io.cpp -6 +5 M ./src/h5io.h -3 +3 M ./src/meep.h +13 M ./src/mympi.cpp +8 M ./src/mympi.h +1 M ./tests/Makefile.am -1 +1 Tue May 11 14:55:39 EDT 2004 stevenj@fftw.org * fix doc/meep.pdf output M ./doc/Makefile.am -2 +3 M ./doc/nonlinear.tex -1 +1 Tue May 11 14:55:18 EDT 2004 stevenj@fftw.org * update COPYRIGHT year M ./COPYRIGHT -1 +1 Sat May 8 00:46:36 EDT 2004 stevenj@fftw.org * silence warnings M ./src/mympi.cpp +4 Fri May 7 23:51:14 EDT 2004 stevenj@fftw.org * non-collective interpolation M ./src/meep.h +6 M ./src/monitor.cpp +34 Thu May 6 19:49:13 EDT 2004 stevenj@fftw.org * add h5io.cpp, basic HDF5 i/o routines (not used yet) M ./configure.ac +19 M ./src/Makefile.am -3 +3 A ./src/h5io.cpp A ./src/h5io.h M ./src/mympi.cpp +39 M ./src/mympi.h +3 Sat May 8 19:42:58 EDT 2004 droundy@abridgegame.org * add nonlinear example to documentation. M ./doc/Makefile.am -2 +11 M ./doc/meep.tex +2 A ./doc/nonlinear.tex Sat May 8 19:38:12 EDT 2004 droundy@abridgegame.org * fix bug in kerr computation. I was calculating inveps where I should have been calculating the fractional change in inveps. M ./src/update_e_from_d_update.cpp -1 +1 Sat May 8 16:53:23 EDT 2004 droundy@abridgegame.org * split update_e_from_d into three routines. This is to deal with some versions of gcc that would crash trying to compile update_e_from_d. M ./hsrc/update_e_from_d_gen.hs -31 +22 M ./src/Makefile.am -5 +13 M ./src/meep.h +3 M ./src/update_e_from_d.cpp -16 +14 A ./src/update_e_from_d_prepare.cpp A ./src/update_e_from_d_sources.cpp A ./src/update_e_from_d_update.cpp Fri May 7 23:52:15 EDT 2004 stevenj@fftw.org * add geometric_volume::intersects M ./src/vec.cpp +11 M ./src/vec.h +4 Thu May 6 19:42:52 EDT 2004 stevenj@fftw.org * include so that we can use this header alone M ./src/mympi.h +3 Thu May 6 14:39:58 EDT 2004 stevenj@fftw.org * some fp constant fixes M ./src/meep.h -2 +11 Thu May 6 14:26:19 EDT 2004 stevenj@fftw.org * whoops, forgot arg for fprintf M ./src/mympi.cpp -1 +1 Thu May 6 14:24:52 EDT 2004 stevenj@fftw.org * print "meep: " before abort message, to be GNU-ly correct M ./src/mympi.cpp +1 Sat May 8 00:43:57 EDT 2004 stevenj@fftw.org * use darcs_test for test Fri May 7 19:11:51 EDT 2004 droundy@abridgegame.org * turn on some basic testing. Fri May 7 19:01:25 EDT 2004 droundy@abridgegame.org * fix warning. M ./src/structure.cpp -1 +1 Fri May 7 19:00:38 EDT 2004 droundy@abridgegame.org * try to get dependencies right in doc and tests. M ./doc/Makefile.am +3 M ./hsrc/Makefile.am -1 +1 M ./tests/Makefile.am -1 +3 Fri May 7 18:56:45 EDT 2004 droundy@abridgegame.org * add support for nonlinear kerr materials. M ./hsrc/YeeLattice.lhs -33 +40 M ./hsrc/update_e_from_d_gen.hs -10 +26 M ./src/meep.h -2 +11 M ./src/structure.cpp +45 M ./src/update_e_from_d.cpp +9 M ./tests/bench.cpp +50 M ./tests/symmetry.cpp +33 Fri May 7 11:20:05 EDT 2004 droundy@abridgegame.org * add additional kerr tests. M ./tests/symmetry.cpp -63 +132 Thu May 6 15:52:24 EDT 2004 droundy@abridgegame.org * clean up sum_over_components ever so slightly. M ./hsrc/YeeLattice.lhs -17 +22 Fri May 7 14:59:49 EDT 2004 droundy@abridgegame.org * fix bug when doing EPS slices with real fields. M ./src/slices.cpp -1 +1 Wed May 5 00:57:19 EDT 2004 stevenj@fftw.org * disable libctl by default (until it is working better) M ./configure.ac -2 +1 Tue May 4 23:18:01 EDT 2004 stevenj@fftw.org * re-ified current/dipole distinction in src_time M ./hsrc/update_e_from_d_gen.hs -1 +1 M ./src/meep.h -8 +19 M ./src/meep_internals.h -4 +4 M ./src/sources.cpp -4 +4 M ./src/step.cpp -1 +1 M ./tests/known_results.cpp -10 +8 Tue May 4 21:21:20 EDT 2004 stevenj@fftw.org * FIXME: disable saturated-gain tests until divergence bug is fixed M ./tests/symmetry.cpp +3 Thu Dec 18 02:10:46 EST 2003 stevenj@fftw.org * for symmetry to work properly, equal sources must be combined This requires serious crap in src_time to get an equality test that works over inheritance. Also, the current O(n^2) algorithm in src_pt::add_to has got to be revised when source volumes are added. Ugh. M ./src/meep.h -6 +11 M ./src/meep_internals.h +2 M ./src/sources.cpp -15 +61 M ./tests/symmetry.cpp -2 +5 Wed Dec 17 21:10:27 EST 2003 stevenj@fftw.org * correct for current renormalization M ./tests/known_results.cpp -8 +10 Wed Dec 17 20:58:48 EST 2003 stevenj@fftw.org * more backwards compatibility (tiny change in default cutoff, but is enough to fail two_dimensional.dac, grr) M ./src/sources.cpp -1 +1 Wed Dec 17 18:35:14 EST 2003 stevenj@fftw.org * don't use last_source_time for CW sources (infinity!), print more stuff, use good limits for steady-state (with slow CW turn-on) M ./tests/physical.cpp -6 +19 Wed Dec 17 18:34:33 EST 2003 stevenj@fftw.org * slow-turn-on for is_continuous add_point_source M ./src/sources.cpp -7 +6 Wed Dec 17 16:57:39 EST 2003 stevenj@fftw.org * fix fp exception in continuous source M ./src/sources.cpp -3 +3 Wed Dec 17 15:45:23 EST 2003 stevenj@fftw.org * backwards compatibility for specifying continuous sources (finite last_source_time) M ./src/sources.cpp -8 +8 Wed Dec 17 14:54:47 EST 2003 stevenj@fftw.org * split src into src_pt and src_time, with many related changes M ./doc/complicated.tex r1 M ./doc/simple.tex r1 M ./hsrc/Complex.lhs r1 M ./hsrc/StepGen.lhs r1 M ./hsrc/YeeLattice.lhs r1 M ./hsrc/step_d_gen.hs r1 M ./hsrc/step_h_gen.hs r1 M ./hsrc/update_e_from_d_gen.hs -4 +12 r1 M ./hsrc/update_from_e_gen.hs r1 M ./src/anisotropic_averaging.cpp r1 M ./src/bands.cpp -15 +6 r2 M ./src/boundaries.cpp r1 M ./src/control_c.cpp r1 M ./src/energy_and_flux.cpp r1 M ./src/fields.cpp +3 r1 M ./src/fluxes.cpp r1 M ./src/grace.cpp r1 M ./src/harminv.cpp r1 M ./src/harminv.h r1 M ./src/initialize.cpp r1 M ./src/meep.h -12 +79 r3 M ./src/meep_internals.h -14 +17 r2 M ./src/monitor.cpp r1 M ./src/mympi.cpp r1 M ./src/mympi.h r1 M ./src/output_directory.cpp r1 M ./src/polarization.cpp r1 M ./src/ran.cpp r1 M ./src/ran.h r1 M ./src/slices.cpp r1 M ./src/sources.cpp -74 +97 r2 M ./src/sphere-quad.cpp r1 M ./src/step.cpp -17 +16 r3 M ./src/step_d.cpp r1 M ./src/step_h.cpp r1 M ./src/structure.cpp r1 M ./src/threevec.h r1 M ./src/time.cpp r1 M ./src/update_e_from_d.cpp r1 M ./src/update_from_e.cpp r1 M ./src/vec.cpp r1 M ./src/vec.h r1 M ./tests/2D_convergence.cpp r1 M ./tests/bench.cpp r1 M ./tests/convergence_cyl_waveguide.cpp r1 M ./tests/flux.cpp r1 M ./tests/physical.cpp r1 M ./tests/three_d.cpp r1 M ./tests/two_dimensional.cpp r1 Wed Dec 17 23:14:49 EST 2003 stevenj@fftw.org * avoid confusion between formal params and members M ./src/polarization.cpp -3 +3 Wed Dec 17 14:54:19 EST 2003 stevenj@fftw.org * some more %lg's to replace M ./doc/example.cpp -3 +3 Tue Dec 16 18:33:52 EST 2003 stevenj@fftw.org * missing dependency on libmeep M ./tests/Makefile.am -1 +1 Tue Dec 16 14:00:34 EST 2003 stevenj@fftw.org * input converged frequency from MPB, weaken convergence criterion (otherwise test fails because of weird error increase around a=30) M ./tests/2D_convergence.cpp -5 +11 Tue Dec 16 13:56:07 EST 2003 stevenj@fftw.org * acronym expansions M ./README +9 Mon Dec 15 17:48:02 EST 2003 stevenj@fftw.org * set_epsilon already calls is_mine; no need to call it twice M ./src/structure.cpp -1 +1 Tue Apr 6 12:32:38 EDT 2004 droundy@civet.berkeley.edu * add in dependencies amongst haskell sources. M ./hsrc/Makefile.am +5 Mon Dec 15 18:14:14 EST 2003 stevenj@fftw.org * compilation fixes, use new create_geom_box_tree0 M ./libctl/structure.cpp -39 +50 Wed Dec 17 19:53:05 EST 2003 stevenj@fftw.org * in debug mode, also crash with SIGFPE on overflow (it's not good if something is blowing up) M ./src/mympi.cpp -1 +1 Wed Dec 17 16:56:55 EST 2003 stevenj@fftw.org * with --enable-debug, trap floating-point exceptions M ./configure.ac +2 M ./src/mympi.cpp +8 Wed Dec 17 14:11:20 EST 2003 stevenj@fftw.org * --enable-debug option for configure M ./configure.ac +11 Mon Dec 15 17:45:03 EST 2003 stevenj@fftw.org * set_epsilon should initialize structure_c M ./src/structure.cpp -12 +9 Sun Dec 14 14:23:20 EST 2003 stevenj@fftw.org * tee is too slow M ./tests/Makefile.am -1 +2 Sun Dec 14 14:23:02 EST 2003 stevenj@fftw.org * silence warning M ./tests/2D_convergence.cpp -1 +1 Sun Dec 14 13:15:02 EST 2003 stevenj@fftw.org * remove tests/Makefile.in (generated by automake) R ./tests/Makefile.in Sun Dec 14 13:14:39 EST 2003 stevenj@fftw.org * save test output in .done file M ./tests/Makefile.am -2 +1 Sat Dec 13 23:53:02 EST 2003 stevenj@fftw.org * comments and niceties M ./src/sphere-quad.cpp +6 Sat Dec 13 23:48:53 EST 2003 stevenj@fftw.org * typo in comment M ./src/sphere-quad.cpp -1 +1 Sat Dec 13 23:41:26 EST 2003 stevenj@fftw.org * whoops, wrong index for spherical quad. M ./src/anisotropic_averaging.cpp -1 +1 Sat Dec 13 23:39:46 EST 2003 stevenj@fftw.org * make it easier to change resolution limits in convergence test M ./tests/convergence_cyl_waveguide.cpp -2 +6 Sat Dec 13 23:24:25 EST 2003 stevenj@fftw.org * damn, missed another %lg M ./src/anisotropic_averaging.cpp -1 +1 Sat Dec 13 23:23:23 EST 2003 stevenj@fftw.org * threevec convenience constructor M ./src/anisotropic_averaging.cpp -2 +1 M ./src/threevec.h -1 +2 Sat Dec 13 23:22:39 EST 2003 stevenj@fftw.org * more fleshed-out sphere quadrature for aniso. averaging M ./src/anisotropic_averaging.cpp -4 +22 Sat Dec 13 23:22:11 EST 2003 stevenj@fftw.org * geo_center takes reference arg. M ./src/anisotropic_averaging.cpp -1 +1 Sat Dec 13 23:13:28 EST 2003 stevenj@fftw.org * whoops, more %lg -> %g replacements M ./doc/complicated.tex -3 +3 M ./src/bands.cpp -8 +8 M ./src/grace.cpp -3 +3 M ./src/slices.cpp -30 +30 M ./src/step.cpp -1 +1 M ./src/vec.cpp -6 +6 M ./tests/2D_convergence.cpp -3 +3 M ./tests/cylindrical.cpp -2 +2 M ./tests/flux.cpp -1 +1 M ./tests/one_dimensional.cpp -1 +1 M ./tests/physical.cpp -4 +4 M ./tests/symmetry.cpp -1 +1 M ./tests/three_d.cpp -5 +5 M ./tests/two_dimensional.cpp -5 +5 Sat Dec 13 18:31:44 EST 2003 stevenj@fftw.org * %lg is incorrect in a printf statement (because of the default type-promotion rules, float arguments are always passed to printf as double in standard C/C++) M ./doc/complicated.tex -3 +3 M ./doc/energy_cons.tex -2 +2 M ./doc/energy_cons_1d.tex -3 +3 M ./doc/epsilon_polariton_1d.tex -2 +2 M ./doc/lossgain_epsilon.tex -5 +5 M ./src/bands.cpp -10 +10 M ./src/grace.cpp -7 +7 M ./src/harminv.cpp -1 +1 M ./src/slices.cpp -61 +61 M ./src/step.cpp -2 +2 M ./src/threevec.h -1 +1 M ./src/time.cpp -1 +1 M ./src/vec.cpp -7 +7 M ./tests/2D_convergence.cpp -4 +4 M ./tests/bench.cpp -1 +1 M ./tests/convergence_cyl_waveguide.cpp -2 +2 M ./tests/cylindrical.cpp -10 +10 M ./tests/flux.cpp -11 +11 M ./tests/known_results.cpp -2 +2 M ./tests/one_dimensional.cpp -5 +5 M ./tests/physical.cpp -4 +4 M ./tests/symmetry.cpp -7 +7 M ./tests/three_d.cpp -10 +10 M ./tests/two_dimensional.cpp -11 +11 Sat Dec 13 18:29:02 EST 2003 stevenj@fftw.org * add experimental spherical-quadrature code (not used yet) M ./src/Makefile.am -3 +11 M ./src/anisotropic_averaging.cpp +47 A ./src/sphere-quad.cpp Fri Dec 12 17:33:23 EST 2003 droundy@civet.berkeley.edu * resolve conflicts with automake etc. M ./darcs_test -2 +2 M ./src/anisotropic_averaging.cpp -2 +28 M ./src/meep.h +2 M ./src/structure.cpp -5 +11 M ./src/threevec.h -1 +1 M ./tests/2D_convergence.cpp -3 +4 M ./tests/Makefile.am -1 +1 M ./tests/Makefile.in -35 +378 M ./tests/convergence_cyl_waveguide.cpp -16 +21 Wed Dec 10 16:19:57 EST 2003 droundy@abridgegame.org * if necesary, allocate inveps in redefine_chunks. M ./src/structure.cpp -1 +7 Tue Dec 9 12:54:57 EST 2003 droundy@abridgegame.org * anisotropic dielectric averaging. M! ./src/anisotropic_averaging.cpp -14 +18 r1 M! ./src/structure.cpp -1 +1 M! ./src/threevec.h -7 +9 A! ./tests/2D_convergence.cpp A! ./tests/Makefile.in M! ./tests/convergence_cyl_waveguide.cpp -44 +108 Thu Dec 11 16:27:18 EST 2003 stevenj@fftw.org * use gcc attributes to identify printf-like and abort-like functions M ./src/mympi.h -5 +13 Thu Dec 11 15:57:53 EST 2003 stevenj@fftw.org * use padded volume for material_function M ./src/polarization.cpp -1 +1 M ./src/structure.cpp -2 +2 M ./src/vec.h +6 Thu Dec 11 13:47:03 EST 2003 stevenj@fftw.org * remember my-smob.h for make dist M ./libctl/Makefile.am -1 +3 Thu Dec 11 13:26:46 EST 2003 stevenj@fftw.org * expanded material_function class Use material_function class (renamed from epsilon_function) for both epsilon and sigma functions and, in the future, other things like nonlinearity as well. Add calls to set_volume where appropriate. M ./libctl/structure.cpp -10 +17 r1 M ./src/anisotropic_averaging.cpp r1 M ./src/meep.h -1 +28 r2 M ./src/meep_internals.h -1 +1 M ./src/polarization.cpp -9 +26 M ./src/structure.cpp -1 +4 r2 Thu Dec 11 00:41:39 EST 2003 stevenj@fftw.org * add libctl skeleton M ./Makefile.am -1 +7 M ./configure.ac +142 A ./libctl/ A ./libctl/Makefile.am A ./libctl/meep-ctl-const.h A ./libctl/meep-ctl.h A ./libctl/meep.cpp A ./libctl/meep.scm.in A ./libctl/my-smob.h A ./libctl/structure.cpp Thu Dec 11 00:40:52 EST 2003 stevenj@fftw.org * allow arbitrary epsilon_function object, not just double eps(r) M ./src/anisotropic_averaging.cpp -3 +3 M ./src/meep.h -4 +30 M ./src/structure.cpp -16 +36 Wed Dec 10 21:13:00 EST 2003 stevenj@fftw.org * rename material.cpp to structure.cpp ./src/material.cpp -> ./src/structure.cpp M ./src/Makefile.am -3 +3 Wed Dec 10 20:45:53 EST 2003 stevenj@fftw.org * enable compiler warnings in maintainer mode, silence/fix some cases M ./configure.ac +6 M ./src/anisotropic_averaging.cpp +1 M ./src/boundaries.cpp +3 M ./src/fields.cpp -1 +1 M ./src/initialize.cpp -1 +1 M ./src/mympi.cpp +24 M ./src/output_directory.cpp -4 +4 M ./src/threevec.h -1 +1 M ./src/vec.h +1 Wed Dec 10 19:59:04 EST 2003 stevenj@fftw.org * residual fixes from mat->structure renaming M ./hsrc/update_e_from_d_gen.hs -10 +10 M ./src/material.cpp -1 +1 M ./src/monitor.cpp -2 +2 M ./src/polarization.cpp -2 +2 M ./tests/Makefile.am +2 Wed Dec 10 19:41:26 EST 2003 stevenj@fftw.org * mat -> structure, etc. M ./doc/complicated.tex -4 +4 r3 M ./doc/energy_cons.tex r4 M ./doc/energy_cons_1d.tex r4 M ./doc/epsilon_polariton_1d.tex r4 M ./doc/example.cpp r4 M ./doc/gpl.tex r3 M ./doc/lossgain_epsilon.tex r4 M ./doc/meep.tex r3 M ./doc/omniguide.tex -5 +5 r2 M ./doc/polaritonbands.tex -1 +1 r3 M ./doc/simple.tex -2 +2 r3 M ./doc/simplebands.tex -2 +2 r2 M ./src/anisotropic_averaging.cpp r4 M ./src/bands.cpp r3 M ./src/boundaries.cpp r4 M ./src/control_c.cpp r4 M ./src/energy_and_flux.cpp r4 M ./src/fields.cpp r7 M ./src/fluxes.cpp r3 M ./src/grace.cpp r3 M ./src/harminv.cpp r3 M ./src/harminv.h r4 M ./src/initialize.cpp r4 M ./src/material.cpp -22 +22 r3 M ./src/meep.h -5 +5 r4 M ./src/meep_internals.h -1 +1 r3 M ./src/monitor.cpp r3 M ./src/mympi.cpp r3 M ./src/mympi.h r4 M ./src/output_directory.cpp r3 M ./src/polarization.cpp -6 +6 r3 M ./src/ran.cpp r4 M ./src/ran.h r4 M ./src/slices.cpp -6 +6 r4 M ./src/sources.cpp r3 M ./src/step.cpp -7 +7 r5 M ./src/step_d.cpp r4 M ./src/step_h.cpp r4 M ./src/threevec.h r3 M ./src/time.cpp r3 M ./src/update_e_from_d.cpp r4 M ./src/update_from_e.cpp r4 M ./src/vec.cpp r3 M ./src/vec.h r3 M ./tests/bench.cpp -15 +15 r3 M ./tests/convergence_cyl_waveguide.cpp -2 +2 r3 M ./tests/cylindrical.cpp -16 +16 r4 M ./tests/flux.cpp -9 +9 r4 M ./tests/known_results.cpp -22 +22 r3 M ./tests/one_dimensional.cpp -6 +6 r4 M ./tests/physical.cpp -6 +6 r3 M ./tests/symmetry.cpp -58 +58 r7 M ./tests/three_d.cpp -14 +14 r4 M ./tests/two_dimensional.cpp -23 +23 r4 Wed Dec 10 18:47:02 EST 2003 stevenj@fftw.org * don't build shared libraries by default (only with --enable-shared) M ./configure.ac +1 Wed Dec 10 18:06:00 EST 2003 stevenj@fftw.org * use vpath build in test M ./darcs_test -1 +3 Wed Dec 10 18:04:21 EST 2003 stevenj@fftw.org * fix for vpath building M ./doc/Makefile.am -1 +1 Wed Dec 10 15:50:21 EST 2003 stevenj@fftw.org * don't bother with --enable-shared just for make dist M ./darcs_test -1 +1 Wed Dec 10 15:13:16 EST 2003 stevenj@fftw.org * autoreconf paranoia M ./autogen.sh +3 Wed Dec 10 15:09:12 EST 2003 stevenj@fftw.org * COPYING is created by autoreconf; does not need to be in repo R ./COPYING Wed Dec 10 15:02:43 EST 2003 stevenj@fftw.org * am_conditional for WITH_DOC M ./configure.ac +10 Wed Dec 10 14:58:34 EST 2003 stevenj@fftw.org * always make autoreconf verbose, and always replace files M ./autogen.sh -5 +1 Wed Dec 10 14:55:14 EST 2003 stevenj@fftw.org * remove deleted files from dist M ./src/Makefile.am -2 +2 Wed Dec 10 14:53:44 EST 2003 stevenj@fftw.org * whoops, handle empty $verbose M ./autogen.sh -1 +1 Wed Dec 10 14:49:51 EST 2003 stevenj@fftw.org * darcs_test does 'make dist' without docs, other build fixes M ./Makefile.am +4 M ./autogen.sh -7 +15 M ./configure.ac -1 +1 M ./darcs_test -2 +3 M ./doc/Makefile.am -3 +11 Wed Dec 10 14:49:16 EST 2003 stevenj@fftw.org * more merge recording R ./Makefile.in Wed Dec 10 13:41:34 EST 2003 stevenj@fftw.org * stupid merging with latest pull of stupid whitespace M ./AUTHORS -1 M ./ChangeLog -1 M ./Makefile.am -1 M ./NEWS -1 M ./README -1 M ./autogen.sh -6 +25 M ./doc/example.cpp -1 M ./hsrc/Makefile.am -1 R ./install-sh M ./m4/acx_blas.m4 -1 M ./m4/acx_lapack.m4 -1 M ./m4/acx_mpi.m4 -1 M ./meep.pc.in -1 M ./src/Makefile.am -1 M ./src/anisotropic_averaging.cpp +2 M ./src/bands.cpp -1 M ./src/boundaries.cpp +2 R ./src/check.h M ./src/control_c.cpp +2 R ./src/copyright.h R ./src/diff_slice.cpp M ./src/energy_and_flux.cpp +2 M ./src/fields.cpp +2 M ./src/fluxes.cpp +2 M ./src/grace.cpp +2 M ./src/harminv.cpp -2 +15 M ./src/initialize.cpp +2 M ./src/material.cpp +2 M ./src/meep.h +2 M ./src/meep_internals.h +2 M ./src/monitor.cpp +2 M ./src/mympi.cpp +2 M ./src/mympi.h +2 M ./src/output_directory.cpp +2 M ./src/polarization.cpp +2 M ./src/ran.cpp +2 M ./src/ran.h +2 M ./src/slices.cpp +2 M ./src/sources.cpp +2 M ./src/step.cpp +2 M ./src/step_d.cpp +2 R ./src/step_d.h M ./src/step_h.cpp +2 R ./src/step_h.h M ./src/threevec.h +2 M ./src/time.cpp +2 M ./src/update_e_from_d.cpp +2 R ./src/update_e_from_d.h M ./src/update_from_e.cpp +2 R ./src/update_from_e.h M ./src/vec.cpp +2 M ./src/vec.h +2 M ./tests/Makefile.am -1 R ./tests/Makefile.in Tue Dec 9 18:14:15 EST 2003 meep@ab-initio.mit.edu * record result of convert-repo (bunch of blank lines, go figure) M! ./COPYING -1 M! ./COPYRIGHT -1 A! ./Makefile.in M! ./autogen.sh -30 +8 M! ./configure.ac -1 M! ./darcs_test -2 M! ./doc/Makefile.am -1 M! ./doc/Yee_bulk.eps -1 M! ./doc/complicated.tex -1 M! ./doc/energy_cons.tex -1 M! ./doc/energy_cons_1d.tex -1 M! ./doc/epsilon_polariton_1d.tex -1 M! ./doc/example.cpp -1 M! ./doc/gpl.tex -1 M! ./doc/lossgain_epsilon.tex -1 M! ./doc/meep.tex -1 M! ./doc/omniguide.tex -1 M! ./doc/polaritonbands.tex -1 M! ./doc/preproc.pl -1 M! ./doc/simple.tex -1 M! ./doc/simplebands.tex -1 M! ./hsrc/Complex.lhs -1 M! ./hsrc/StepGen.lhs -1 M! ./hsrc/YeeLattice.lhs -1 M! ./hsrc/step_d_gen.hs -1 M! ./hsrc/step_h_gen.hs -1 M! ./hsrc/update_e_from_d_gen.hs -1 M! ./hsrc/update_from_e_gen.hs -1 A! ./install-sh M! ./src/anisotropic_averaging.cpp -3 M! ./src/boundaries.cpp -3 M! ./src/check.h -1 M! ./src/control_c.cpp -3 M! ./src/copyright.h -1 A! ./src/diff_slice.cpp M! ./src/energy_and_flux.cpp -3 M! ./src/fields.cpp -3 M! ./src/fluxes.cpp -3 M! ./src/grace.cpp -3 M! ./src/harminv.cpp -1 M! ./src/harminv.h -1 M! ./src/initialize.cpp -3 M! ./src/material.cpp -3 M! ./src/meep.h -3 M! ./src/meep_internals.h -3 M! ./src/monitor.cpp -3 M! ./src/mympi.cpp -3 M! ./src/mympi.h -3 M! ./src/output_directory.cpp -3 M! ./src/polarization.cpp -3 M! ./src/ran.cpp -3 M! ./src/ran.h -3 M! ./src/slices.cpp -3 M! ./src/sources.cpp -3 M! ./src/step.cpp -3 M! ./src/step_d.cpp -3 A! ./src/step_d.h M! ./src/step_h.cpp -3 A! ./src/step_h.h M! ./src/threevec.h -3 M! ./src/time.cpp -3 M! ./src/update_e_from_d.cpp -3 A! ./src/update_e_from_d.h M! ./src/update_from_e.cpp -3 A! ./src/update_from_e.h M! ./src/vec.cpp -3 M! ./src/vec.h -3 A! ./tests/Makefile.in M! ./tests/bench.cpp -1 M! ./tests/convergence_cyl_waveguide.cpp -1 M! ./tests/cylindrical.cpp -1 M! ./tests/flux.cpp -1 M! ./tests/known_results.cpp -1 M! ./tests/one_dimensional.cpp -1 M! ./tests/physical.cpp -1 M! ./tests/symmetry.cpp -1 M! ./tests/three_d.cpp -1 M! ./tests/two_dimensional.cpp -1 Tue Dec 9 18:01:15 EST 2003 stevenj@fftw.org * use AC_F77_WRAPPERS for harminv M ./configure.ac +2 M ./src/harminv.cpp -15 +1 Tue Dec 9 17:58:44 EST 2003 stevenj@fftw.org * use meep namespace for libmeep M ./doc/complicated.tex -1 +2 M ./doc/energy_cons.tex -1 +2 M ./doc/energy_cons_1d.tex -1 +2 M ./doc/epsilon_polariton_1d.tex -1 +2 M ./doc/example.cpp -1 +2 M ./doc/lossgain_epsilon.tex -1 +2 M ./doc/omniguide.tex -1 +2 M ./doc/polaritonbands.tex -1 +2 M ./doc/simple.tex -2 +3 M ./doc/simplebands.tex -1 +2 M ./src/anisotropic_averaging.cpp +4 M ./src/bands.cpp -1 +3 M ./src/boundaries.cpp +4 M ./src/control_c.cpp +4 M ./src/energy_and_flux.cpp +4 M ./src/fields.cpp +4 M ./src/fluxes.cpp +4 M ./src/grace.cpp +4 M ./src/initialize.cpp +4 M ./src/material.cpp +4 M ./src/meep.h -3 +7 M ./src/meep_internals.h +4 M ./src/monitor.cpp -7 +10 M ./src/mympi.cpp +4 M ./src/mympi.h -3 +7 M ./src/output_directory.cpp +4 M ./src/polarization.cpp +4 M ./src/ran.cpp +4 M ./src/ran.h +3 M ./src/slices.cpp +4 M ./src/sources.cpp +4 M ./src/step.cpp -5 +9 M ./src/step_d.cpp +4 M ./src/step_h.cpp +4 M ./src/threevec.h -1 +5 M ./src/time.cpp +4 M ./src/update_e_from_d.cpp +4 M ./src/update_from_e.cpp +3 M ./src/vec.cpp -2 +5 M ./src/vec.h -3 +7 M ./tests/bench.cpp -1 +2 M ./tests/convergence_cyl_waveguide.cpp -1 +2 M ./tests/cylindrical.cpp -1 +2 M ./tests/flux.cpp -1 +2 M ./tests/known_results.cpp -1 +2 M ./tests/one_dimensional.cpp -1 +2 M ./tests/physical.cpp -1 +2 M ./tests/symmetry.cpp -1 +2 M ./tests/three_d.cpp -1 +2 M ./tests/two_dimensional.cpp -1 +2 Tue Dec 9 16:30:27 EST 2003 stevenj@fftw.org * add meep.ps.gz target M ./doc/Makefile.am +3 Tue Dec 9 16:27:30 EST 2003 stevenj@fftw.org * use hyperref package for building pdf M ./doc/Makefile.am +2 M ./doc/energy_cons.tex -1 +1 M ./doc/energy_cons_1d.tex -1 +1 M ./doc/meep.tex -1 +1 Tue Dec 9 15:51:47 EST 2003 stevenj@fftw.org * AM_PROG_LIBTOOL is required for depcomp to be dist'ed (no mention of this in automake docs, grrr) M ./configure.ac -1 +1 Tue Dec 9 15:26:01 EST 2003 stevenj@fftw.org * grrr M ./darcs_test +1 Tue Dec 9 15:06:18 EST 2003 stevenj@fftw.org * use __FILE__ for output directory M ./doc/complicated.tex -1 +1 M ./doc/energy_cons.tex -1 +1 M ./doc/energy_cons_1d.tex -1 +1 M ./doc/epsilon_polariton_1d.tex -1 +1 M ./doc/example.cpp -1 +1 M ./doc/lossgain_epsilon.tex -1 +1 M ./doc/omniguide.tex -1 +1 M ./doc/polaritonbands.tex -1 +1 M ./doc/simple.tex -1 +1 M ./src/output_directory.cpp -2 +9 Mon Dec 8 22:25:57 EST 2003 stevenj@fftw.org * must build libmeep too for make dist M ./Makefile.am -2 +9 Mon Dec 8 21:59:40 EST 2003 stevenj@fftw.org * sigh...still trying to fix make dist dependencies M ./Makefile.am -2 +3 Mon Dec 8 21:56:41 EST 2003 stevenj@fftw.org * less verbose darcs_test now that auto* works M ./darcs_test -1 +1 Mon Dec 8 21:37:11 EST 2003 stevenj@fftw.org * dist fix M ./Makefile.am -1 +4 Mon Dec 8 20:48:21 EST 2003 stevenj@fftw.org * fixes to make dist (I hope) M ./Makefile.am -1 +3 M ./darcs_test -4 Mon Dec 8 20:27:17 EST 2003 stevenj@fftw.org * 'make' in hsrc before 'make dist' M ./darcs_test -2 +6 Mon Dec 8 20:04:03 EST 2003 stevenj@fftw.org * darcs_test uses 'make dist' M ./darcs_test +13 Mon Dec 8 19:58:44 EST 2003 stevenj@fftw.org * add meep.pc file for use with pkg-config M ./Makefile.am +3 M ./configure.ac +7 A ./meep.pc.in Mon Dec 8 17:40:50 EST 2003 stevenj@fftw.org * use \includegraphics so that pdflatex works M ./doc/Makefile.am -5 +5 M ./doc/energy_cons.tex -1 +1 M ./doc/energy_cons_1d.tex -1 +1 M ./doc/epsilon_polariton_1d.tex -1 +1 M ./doc/lossgain_epsilon.tex -1 +1 M ./doc/meep.tex -2 +2 M ./doc/omniguide.tex -1 +1 M ./doc/polaritonbands.tex -1 +1 M ./doc/simple.tex -1 +1 Mon Dec 8 16:55:20 EST 2003 stevenj@fftw.org * move example.cpp to doc/ ./src/example.cpp -> ./doc/example.cpp M ./doc/Makefile.am -5 +6 R ./doc/dummy.cpp M ./src/Makefile.am -4 Mon Dec 8 16:13:52 EST 2003 stevenj@fftw.org * whoop sagain A ./src/Makefile.am Mon Dec 8 15:53:33 EST 2003 stevenj@fftw.org * whoops A ./Makefile.am Mon Dec 8 15:33:50 EST 2003 stevenj@fftw.org * more verbose darcs_test M ./autogen.sh -2 +22 M ./darcs_test -7 +1 Mon Dec 8 15:24:01 EST 2003 stevenj@fftw.org * make dist fixes M ./doc/Makefile.am +2 Mon Dec 8 15:00:58 EST 2003 stevenj@fftw.org * include config.log in darcs_test output M ./autogen.sh +1 M ./darcs_test +6 Sun Dec 7 19:24:52 EST 2003 stevenj@fftw.org * whoops, update test for automake'd version M ./darcs_test -2 +2 Sun Dec 7 19:21:26 EST 2003 stevenj@fftw.org * automakization ./doc/Makefile.in -> ./doc/Makefile.am A ./ChangeLog A ./NEWS A ./README A ./autogen.sh M ./configure.ac -4 +22 M ./doc/Makefile.am -45 +38 A ./doc/dummy.cpp M ./hsrc/Makefile.am -4 +7 M ./src/anisotropic_averaging.cpp +1 M ./src/bands.cpp +1 M ./src/boundaries.cpp +2 M ./src/check.h +1 M ./src/control_c.cpp +1 M ./src/copyright.h +1 R ./src/diff_slice.cpp M ./src/energy_and_flux.cpp +1 M ./src/example.cpp +1 M ./src/fields.cpp +1 M ./src/fluxes.cpp +1 M ./src/grace.cpp +1 M ./src/harminv.cpp +1 M ./src/harminv.h +1 M ./src/initialize.cpp +1 M ./src/material.cpp +1 M ./src/meep.h +1 M ./src/meep_internals.h +1 M ./src/monitor.cpp -1 +14 M ./src/mympi.cpp +1 M ./src/mympi.h +1 M ./src/output_directory.cpp +1 M ./src/polarization.cpp +1 M ./src/ran.cpp +1 M ./src/ran.h +1 M ./src/slices.cpp +1 M ./src/sources.cpp +1 M ./src/step.cpp +1 M ./src/step_d.cpp +1 R ./src/step_d.h M ./src/step_h.cpp +1 R ./src/step_h.h M ./src/threevec.h +1 M ./src/time.cpp +1 M ./src/update_e_from_d.cpp +1 R ./src/update_e_from_d.h M ./src/update_from_e.cpp +1 R ./src/update_from_e.h M ./src/vec.cpp +1 M ./src/vec.h +1 A ./tests/Makefile.am R ./tests/Makefile.in Fri Dec 5 16:57:51 EST 2003 stevenj@fftw.org * bunch of moves ./Complex.lhs -> ./src/Complex.lhs ./StepGen.lhs -> ./src/StepGen.lhs ./YeeLattice.lhs -> ./src/YeeLattice.lhs ./anisotropic_averaging.cpp -> ./src/anisotropic_averaging.cpp ./bands.cpp -> ./src/bands.cpp ./boundaries.cpp -> ./src/boundaries.cpp ./check.h -> ./src/check.h ./control_c.cpp -> ./src/control_c.cpp ./copyright.h -> ./src/copyright.h ./diff_slice.cpp -> ./src/diff_slice.cpp ./energy_and_flux.cpp -> ./src/energy_and_flux.cpp ./example.cpp -> ./src/example.cpp ./fields.cpp -> ./src/fields.cpp ./fluxes.cpp -> ./src/fluxes.cpp ./grace.cpp -> ./src/grace.cpp ./harminv.cpp -> ./src/harminv.cpp ./harminv.h -> ./src/harminv.h ./initialize.cpp -> ./src/initialize.cpp ./material.cpp -> ./src/material.cpp ./meep.h -> ./src/meep.h ./meep_internals.h -> ./src/meep_internals.h ./monitor.cpp -> ./src/monitor.cpp ./mympi.cpp -> ./src/mympi.cpp ./mympi.h -> ./src/mympi.h ./output_directory.cpp -> ./src/output_directory.cpp ./polarization.cpp -> ./src/polarization.cpp ./ran.cpp -> ./src/ran.cpp ./ran.h -> ./src/ran.h ./slices.cpp -> ./src/slices.cpp ./sources.cpp -> ./src/sources.cpp ./step.cpp -> ./src/step.cpp ./step_d.cpp -> ./src/step_d.cpp ./step_d.h -> ./src/step_d.h ./step_d_gen.hs -> ./src/step_d_gen.hs ./step_h.cpp -> ./src/step_h.cpp ./step_h.h -> ./src/step_h.h ./step_h_gen.hs -> ./src/step_h_gen.hs ./threevec.h -> ./src/threevec.h ./time.cpp -> ./src/time.cpp ./update_e_from_d.cpp -> ./src/update_e_from_d.cpp ./update_e_from_d.h -> ./src/update_e_from_d.h ./update_e_from_d_gen.hs -> ./src/update_e_from_d_gen.hs ./update_from_e.cpp -> ./src/update_from_e.cpp ./update_from_e.h -> ./src/update_from_e.h ./update_from_e_gen.hs -> ./src/update_from_e_gen.hs ./vec.cpp -> ./src/vec.cpp ./vec.h -> ./src/vec.h ./configure.in -> ./configure.ac ./src/step_d_gen.hs -> ./hsrc/step_d_gen.hs ./src/step_h_gen.hs -> ./hsrc/step_h_gen.hs ./src/update_e_from_d_gen.hs -> ./hsrc/update_e_from_d_gen.hs ./src/update_from_e_gen.hs -> ./hsrc/update_from_e_gen.hs ./src/Complex.lhs -> ./hsrc/Complex.lhs ./src/StepGen.lhs -> ./hsrc/StepGen.lhs ./src/YeeLattice.lhs -> ./hsrc/YeeLattice.lhs A ./AUTHORS R ./Makefile.in R ./autogen.sh M ./configure.ac -129 +50 A ./hsrc/ A ./hsrc/Makefile.am R ./install-sh A ./m4/ A ./m4/acx_blas.m4 A ./m4/acx_lapack.m4 A ./m4/acx_mpi.m4 A ./src/ Fri Dec 5 15:13:17 EST 2003 stevenj@fftw.org * same as before Fix copyright year M ./COPYRIGHT -1 +1 Fri Dec 5 11:56:10 EST 2003 droundy@abridgegame.org * fix epsilon averaging bug (again). M ./material.cpp -10 +20 M ./tests/known_results.cpp -2 +2 Thu Dec 4 12:07:11 EST 2003 droundy@abridgegame.org * fix old epsilon averaging bugs. This fix changes where epsilon is evaluated in 2D and 1D. M ./material.cpp -44 +15 M ./tests/flux.cpp -1 +1 M ./tests/known_results.cpp -1 +1 M ./vec.cpp -2 +2 Thu Dec 4 13:31:20 EST 2003 michel * Added convergence test (waveguide mode frequency in cylindrical) M ./tests/Makefile.in -3 +3 A ./tests/convergence_cyl_waveguide.cpp Wed Nov 26 16:41:10 EST 2003 michel * Fix memory leak in bufprint M ./slices.cpp +1 Wed Dec 3 16:24:16 EST 2003 droundy@abridgegame.org * fix resolution scaling of 3D sources. M ./sources.cpp -1 +1 M ./tests/known_results.cpp -6 +6 Wed Dec 3 16:23:40 EST 2003 droundy@abridgegame.org * fix initialize_A (which was causing crashes). M ./fields.cpp -6 +5 M ./initialize.cpp -2 +2 Wed Dec 3 12:03:32 EST 2003 David Roundy * reorder libraries to work on sarge. M ./Makefile.in -1 +1 M ./doc/Makefile.in -1 +1 M ./tests/Makefile.in -1 +1 Tue Dec 2 18:07:37 EST 2003 droundy@abridgegame.org * change monitor harminv interface. M ./doc/complicated.tex -4 +4 M ./meep.h -1 +1 M ./monitor.cpp -5 +9 Tue Dec 2 14:20:54 EST 2003 droundy@abridgegame.org * add support for anisotropic averaging (untested). Also fix a bug in the normal averaging in 3D. It was evaluating epsilon at the wrong locations. M ./Makefile.in -1 +2 A ./anisotropic_averaging.cpp M ./material.cpp -47 +76 M ./meep.h +4 M ./tests/known_results.cpp -1 +1 A ./threevec.h Tue Dec 2 14:16:43 EST 2003 droundy@abridgegame.org * fix memory leaks. M ./material.cpp -2 +4 Mon Dec 1 15:51:43 EST 2003 droundy@abridgegame.org * support anisotropic dielectrics. M ./Complex.lhs -2 +4 M ./StepGen.lhs -1 +8 M ./YeeLattice.lhs -7 +70 M ./update_e_from_d.h -994 +2736 M ./update_e_from_d_gen.hs -22 +41 M ./update_from_e.h -539 +78 Wed Nov 26 15:31:13 EST 2003 droundy@abridgegame.org * fix the fix to sources outside of periodic cells. M ./sources.cpp -1 +1 Wed Nov 26 12:36:19 EST 2003 droundy@abridgegame.org * speed up EPS output in parallel (hopefully). M ./mympi.cpp -3 +7 M ./slices.cpp -106 +169 Tue Nov 25 17:38:38 EST 2003 droundy@abridgegame.org * support sources out of uservolume in periodic directions. M ./sources.cpp -1 +4 Tue Nov 25 11:20:47 EST 2003 droundy@abridgegame.org * add outputting of EPS polarization slices. M ./meep.h +9 M ./monitor.cpp +11 M ./slices.cpp +95 Tue Nov 25 12:29:53 EST 2003 michel * Added Poynting vector functions to monitor and fixed comment in meep.h M ./meep.h -1 +3 M ./monitor.cpp +27 Tue Nov 25 12:27:02 EST 2003 michel * Remove printf for phasing in M ./fields.cpp -2 Mon Nov 24 10:05:02 EST 2003 droundy@abridgegame.org * don't output zero values in EPS files to save space. M ./slices.cpp -1 +2 Fri Nov 21 16:21:56 EST 2003 droundy@abridgegame.org * fix saturation condition to avoid overshooting. M ./Complex.lhs -3 +7 M ./StepGen.lhs +8 M ./YeeLattice.lhs -1 +1 M ./polarization.cpp -2 +2 M ./tests/known_results.cpp -3 +3 M ./update_e_from_d.h -114 +1329 M ./update_e_from_d_gen.hs -13 +5 M ./update_from_e.h -1287 +1203 M ./update_from_e_gen.hs -17 +23 Fri Nov 21 15:18:11 EST 2003 droundy@abridgegame.org * fix 4 pi issue with polarization energies. M ./energy_and_flux.cpp -1 +1 M ./polarization.cpp -7 +3 M ./tests/known_results.cpp -3 +3 M ./update_e_from_d.h -6 +6 M ./update_e_from_d_gen.hs -1 +1 M ./update_from_e.h -54 +54 M ./update_from_e_gen.hs -1 +1 Tue Nov 18 17:56:35 EST 2003 droundy@abridgegame.org * change title color again. M ./slices.cpp -1 +1 Wed Nov 19 15:54:10 EST 2003 droundy@abridgegame.org * fix known_results test to work in 3D. Also change the component-broken energy to sum to the total energy. M ./polarization.cpp -3 +12 M ./tests/known_results.cpp -5 +5 Tue Nov 18 17:36:29 EST 2003 droundy@abridgegame.org * change color of EPS title. M ./slices.cpp +4 Tue Nov 18 16:03:49 EST 2003 droundy@abridgegame.org * fix bugs in saturated gain. M ./YeeLattice.lhs -1 +2 M ./boundaries.cpp -8 +51 M ./fields.cpp +1 M ./step.cpp -8 +4 M ./tests/known_results.cpp -4 +5 M ./tests/symmetry.cpp +30 M ./update_e_from_d_gen.hs -1 M ./update_from_e.h -660 +212 Tue Nov 18 12:43:56 EST 2003 droundy@abridgegame.org * output D as well as E and H in real_imaginary_slices. M ./slices.cpp -4 +4 Tue Nov 18 12:12:16 EST 2003 droundy@abridgegame.org * fix parallel output in symmetry.cpp M ./tests/symmetry.cpp -2 +2 Mon Nov 17 18:34:21 EST 2003 droundy@abridgegame.org * fix bugs in saturation averaging. M ./YeeLattice.lhs -4 +5 M ./tests/symmetry.cpp -2 +35 M ./update_from_e.h -13 +19 Mon Nov 17 18:00:07 EST 2003 droundy@abridgegame.org * test polariton symmetry in 2D as well as 1D. M ./tests/symmetry.cpp -2 +7 Mon Nov 17 15:22:08 EST 2003 droundy@abridgegame.org * optimize phase shift on EPS output. M ./meep.h -1 +2 M ./slices.cpp -3 +5 Mon Nov 17 14:38:18 EST 2003 droundy@abridgegame.org * print filename on EPS output. M ./slices.cpp -9 +9 Mon Nov 17 14:09:01 EST 2003 droundy@abridgegame.org * add polariton symmetry test. M ./tests/symmetry.cpp +28 Fri Nov 14 14:14:44 EST 2003 droundy@abridgegame.org * a few saturation bugfixes. This makes saturation run in multiple dimensions. However, it seems to blow up in 3D, and I don't have any idea what it does in other dimensions. M ./YeeLattice.lhs -13 +13 M ./polarization.cpp -5 +6 M ./tests/known_results.cpp -2 +5 M ./update_from_e.h -366 +366 Fri Nov 14 13:11:14 EST 2003 droundy@abridgegame.org * average energy on yee lattice when updating saturation. M ./StepGen.lhs -6 +16 M ./YeeLattice.lhs -27 +65 M ./update_from_e.h -2323 +1212 M ./update_from_e_gen.hs -111 +29 Thu Nov 13 16:25:29 EST 2003 droundy@abridgegame.org * rename generating code. ./step_d.hs -> ./step_d_gen.hs ./step_h.hs -> ./step_h_gen.hs ./update_e_from_d.hs -> ./update_e_from_d_gen.hs ./update_from_e.hs -> ./update_from_e_gen.hs A ./Complex.lhs M ./Makefile.in -10 +10 r4 M ./StepGen.lhs -3 +22 A ./YeeLattice.lhs M ./step_d.h -31 +31 M ./step_h.h -31 +31 M ./update_e_from_d.h -7 +7 Thu Nov 13 16:02:31 EST 2003 droundy@abridgegame.org * break timestepping into separate files. M ./Makefile.in -2 +9 M ./step.cpp -356 A ./step_d.cpp A ./step_h.cpp A ./update_e_from_d.cpp A ./update_from_e.cpp Wed Nov 12 11:19:46 EST 2003 droundy@abridgegame.org * Fix mpi polarizability bug. M ./polarization.cpp -7 +11 Tue Nov 11 18:55:32 EST 2003 droundy@abridgegame.org * sum energy over components when updating saturation. Note that this doesn't yet do any averaging. Most of the work was just in creating the sum over components efficiently. And yes, the code is rather scary. M ./StepGen.lhs -1 +22 M ./update_from_e.h -2604 +2731 M ./update_from_e.hs -12 +67 Tue Nov 11 15:51:37 EST 2003 droundy@abridgegame.org * loop over owned points when updating saturating polarization. M ./fields.cpp +9 M ./meep.h +1 M ./update_from_e.h -22 +3212 M ./update_from_e.hs -24 +75 Tue Nov 11 13:47:18 EST 2003 droundy@abridgegame.org * communicate polarizations. M ./boundaries.cpp -1 +110 M ./meep_internals.h -1 +3 M ./polarization.cpp -26 +35 M ./step.cpp +1 M ./vec.h -3 +3 Mon Nov 10 13:21:54 EST 2003 droundy@abridgegame.org * add exponential distribution random number generator. M ./ran.cpp +6 M ./ran.h +1 Fri Nov 7 13:48:16 EST 2003 droundy@abridgegame.org * add random number generator. M ./Makefile.in -1 +1 A ./ran.cpp A ./ran.h Fri Nov 7 12:16:53 EST 2003 droundy@abridgegame.org * add initialize from vector potential option. M ./initialize.cpp +42 M ./meep.h -1 +2 Thu Nov 6 18:18:34 EST 2003 droundy@abridgegame.org * add copy constructor for fields. M ./fields.cpp -7 +123 M ./meep.h -1 +5 Thu Nov 6 16:52:45 EST 2003 droundy@abridgegame.org * output D as well as E and H EPS slices. M ./slices.cpp -11 +10 Thu Nov 6 15:06:38 EST 2003 droundy@abridgegame.org * make alloc_f automatically allocate all the needed fields. M ./fields.cpp -15 +29 M ./sources.cpp -10 +2 Thu Nov 6 14:09:21 EST 2003 droundy@abridgegame.org * get rid of empty for loops in generated code. M ./StepGen.lhs -3 +6 M ./update_e_from_d.h -8 Thu Nov 6 13:34:16 EST 2003 droundy@abridgegame.org * clean up complex loops in update_...hs M ./StepGen.lhs -6 +2 M ./update_e_from_d.h -35 +129 M ./update_e_from_d.hs -14 +14 M ./update_from_e.h -27 +61 M ./update_from_e.hs -11 +10 Thu Nov 6 12:22:18 EST 2003 droundy@abridgegame.org * speed up EPS envelope output. M ./slices.cpp -4 +6 Thu Nov 6 11:53:14 EST 2003 droundy@abridgegame.org * add envelope-outputting EPS option. M ./meep.h +2 M ./slices.cpp +55 Wed Nov 5 16:22:30 EST 2003 droundy@abridgegame.org * use metallic boundary conditions by default. M ./boundaries.cpp -8 M ./doc/complicated.tex -1 M ./doc/simple.tex -4 +1 M ./fields.cpp -1 +3 M ./meep.h -1 M ./tests/bench.cpp -5 M ./tests/cylindrical.cpp -5 M ./tests/known_results.cpp -7 +1 M ./tests/physical.cpp -1 +1 M ./tests/symmetry.cpp -27 M ./tests/three_d.cpp -2 M ./tests/two_dimensional.cpp -5 +1 Wed Nov 5 15:28:01 EST 2003 droundy@civet.berkeley.edu * fix bug in polariton found by Chiyan. M ./tests/known_results.cpp -3 +3 M ./update_from_e.h -3 +3 M ./update_from_e.hs -1 +1 Tue Nov 4 18:14:29 EST 2003 droundy@abridgegame.org * support vol1d and vol2d as well as volone and voltwo. M ./vec.cpp +8 M ./vec.h +2 Tue Nov 4 15:10:32 EST 2003 droundy@abridgegame.org * rewrite polarization code using code generator. M ./Makefile.in -1 +5 M ./meep.h -13 +2 M ./polarization.cpp -117 M ./step.cpp -28 +12 M ./update_e_from_d.h +22 M ./update_e_from_d.hs -3 +27 A ./update_from_e.h A ./update_from_e.hs Mon Nov 3 17:10:11 EST 2003 droundy@civet.berkeley.edu * add two more polariton tests. M ./tests/known_results.cpp +28 Mon Nov 3 10:14:33 EST 2003 droundy@abridgegame.org * add polariton test in 1D. M ./tests/known_results.cpp +15 Mon Nov 3 08:23:03 EST 2003 droundy@abridgegame.org * treat source as a polarization. This patch also contains a whole slew of gcc --pedantic inspired changes, which I'm too lazy to separate out from the critical stuff. M ./StepGen.lhs -4 +32 M ./bands.cpp -3 M ./boundaries.cpp -20 +9 M ./energy_and_flux.cpp -19 +10 M ./fields.cpp -6 +5 M ./fluxes.cpp +1 M ./material.cpp -51 +53 M ./meep.h -6 +7 M ./meep_internals.h -2 +5 M ./mympi.cpp +2 M ./output_directory.cpp -12 +12 M ./polarization.cpp -4 M ./slices.cpp -36 +36 M ./sources.cpp -29 +13 M ./step.cpp -19 +15 M ./step_d.h -16 M ./step_d.hs -4 +9 M ./tests/flux.cpp -2 +1 M ./tests/known_results.cpp -11 +11 M ./tests/physical.cpp -2 +2 M ./tests/symmetry.cpp -2 +4 M ./tests/two_dimensional.cpp -2 +2 M ./time.cpp -1 +2 M ./update_e_from_d.h -12 +55 M ./update_e_from_d.hs -26 +55 M ./vec.cpp -10 +33 M ./vec.h -2 +12 Mon Nov 3 08:04:39 EST 2003 droundy@abridgegame.org * speed up 1D tests. M ./tests/one_dimensional.cpp -6 Fri Oct 31 13:01:12 EST 2003 droundy@abridgegame.org * don't test mpi (since I'll now test it on superjdj). M ./darcs_test -7 Fri Oct 31 09:55:59 EST 2003 droundy@abridgegame.org * fix array overrun bug that only bothered gcc 2.95. M ./boundaries.cpp -2 +2 Thu Oct 30 08:22:01 EST 2003 droundy@abridgegame.org * rename step_e.h to update_e_from_d.h ./step_e.h -> ./update_e_from_d.h ./step_e.hs -> ./update_e_from_d.hs M ./Makefile.in -3 +4 M ./step.cpp -1 +1 Wed Oct 29 14:13:28 EST 2003 droundy@abridgegame.org * generate code for update_e_from_d. M ./step.cpp -8 +1 M ./step_e.h -365 +13 M ./step_e.hs -68 +27 Wed Oct 29 12:56:27 EST 2003 droundy@abridgegame.org * switch to timestepping D rather than E. M ./Makefile.in -5 +1 M ./doc/epsilon_polariton_1d.tex -4 +3 M ./fields.cpp -7 +13 M ./meep.h -7 +2 M ./meep_internals.h -3 +1 M ./polarization.cpp -72 +25 M ./sources.cpp -2 +2 M ./step.cpp -597 +55 M ./step_d.h -36 +36 M ./step_d.hs -3 +3 R ./step_e_old.h R ./step_e_old.hs M ./tests/Makefile.in -3 +3 M ./tests/bench.cpp -85 R ./tests/step_algorithm.cpp M ./vec.cpp +5 M ./vec.h -2 +4 Wed Oct 29 10:11:52 EST 2003 droundy@abridgegame.org * add 3D test using soon-to-be-old timestepping. M ./Makefile.in -1 +7 M ./step.cpp -2 +71 A ./step_d.h A ./step_d.hs A ./step_e_old.h A ./step_e_old.hs M ./tests/step_algorithm.cpp +38 Wed Oct 29 09:56:14 EST 2003 droundy@abridgegame.org * trivial cleanup. M ./fields.cpp -1 +1 Wed Oct 29 09:23:06 EST 2003 droundy@abridgegame.org * add D field to fields data structure (but don't actually use it). M ./boundaries.cpp -42 +27 M ./fields.cpp -10 +10 M ./material.cpp -4 +5 M ./meep.h -23 +26 M ./meep_internals.h -4 +6 M ./step.cpp +144 M ./vec.h -16 +30 Wed Oct 29 08:58:28 EST 2003 droundy@civet.berkeley.edu tagged working version Wed Oct 29 07:31:08 EST 2003 droundy@abridgegame.org * add support for initializing saturation state with saturated gain. M ./meep.h +6 M ./meep_internals.h +1 M ./polarization.cpp +27 Wed Oct 29 06:51:57 EST 2003 droundy@abridgegame.org * add support for outputting any polarization energy we want. M ./meep.h -2 +16 M ./meep_internals.h +1 M ./monitor.cpp +50 M ./polarization.cpp -1 +17 M ./slices.cpp -7 +50 Wed Oct 29 06:51:17 EST 2003 droundy@abridgegame.org * start work on methods introduction for manual. M ./doc/meep.tex -3 +100 Wed Oct 29 06:50:11 EST 2003 droundy@abridgegame.org * fix translate error in EPS output. M ./slices.cpp -1 +1 Tue Oct 28 10:05:38 EST 2003 droundy@abridgegame.org * remove some commented out code. M ./polarization.cpp -1 M ./slices.cpp -2 Tue Oct 28 08:37:35 EST 2003 droundy@abridgegame.org * add EPS output of polarization energy. M ./meep.h +10 M ./meep_internals.h +1 M ./monitor.cpp +46 M ./polarization.cpp +9 M ./slices.cpp +88 Tue Oct 28 15:03:10 EST 2003 droundy@civet.berkeley.edu * fix mpi create directory bug. M ./output_directory.cpp -8 +8 Mon Oct 27 12:19:53 EST 2003 droundy@abridgegame.org * add 1D symmetry test. M ./tests/symmetry.cpp +44 Mon Oct 27 11:36:46 EST 2003 droundy@abridgegame.org * support symmetry in 1D. M ./material.cpp -3 M ./vec.cpp +1 Mon Oct 27 11:35:50 EST 2003 droundy@abridgegame.org * shift EPS output to be on page when printed. M ./slices.cpp -3 +3 Mon Oct 27 09:14:17 EST 2003 droundy@abridgegame.org * rename dactyl to meep in makefiles. M ./Makefile.in -27 +27 M ./doc/Makefile.in -10 +10 M ./doc/epsilon_polariton_1d.tex -1 +3 M ./tests/Makefile.in -2 +2 Mon Oct 27 13:20:57 EST 2003 droundy@civet.berkeley.edu * fix bug in make doc. M ./doc/Makefile.in -2 +2 Mon Oct 27 07:34:32 EST 2003 droundy@abridgegame.org * fix epsilon 1D output. M ./doc/epsilon_polariton_1d.tex -6 +6 Mon Oct 27 06:37:55 EST 2003 droundy@abridgegame.org * remove redundant is_mine check. M ./monitor.cpp -4 +2 Fri Oct 24 13:58:58 EDT 2003 droundy@abridgegame.org * never reuse old directories! M ./output_directory.cpp -12 +13 Fri Oct 24 13:57:31 EDT 2003 droundy@abridgegame.org * allow real fields with k == 0. M ./fields.cpp -1 +1 Fri Oct 24 11:16:44 EDT 2003 droundy@abridgegame.org * speed up 2D and cylindrical tests. M ./tests/cylindrical.cpp -12 +12 M ./tests/two_dimensional.cpp -11 +11 Fri Oct 24 11:04:06 EDT 2003 droundy@abridgegame.org * fix interpolation at r == 0. M ./fields.cpp +1 M ./meep_internals.h +2 M ./slices.cpp -2 +4 M ./tests/cylindrical.cpp -1 +50 M ./vec.cpp -83 +51 M ./vec.h -6 +3 Fri Oct 24 06:42:35 EDT 2003 droundy@abridgegame.org * test both MPI and non-MPI. M ./darcs_test -1 +14 Thu Oct 23 12:54:33 EDT 2003 droundy@abridgegame.org * fix mpi bug introduced when boundaries were rewritten. M ./step.cpp -3 +3 Thu Oct 23 09:12:24 EDT 2003 droundy@abridgegame.org * add support for creating files within a directory. M ./mympi.cpp +17 M ./mympi.h +1 Thu Oct 23 08:42:27 EDT 2003 droundy@abridgegame.org * optimize phase in slice output. M ./meep.h +5 M ./slices.cpp -31 +41 Thu Oct 23 13:49:09 EDT 2003 droundy@civet.berkeley.edu * fix effort volume symmetry bug. M ./material.cpp -2 +9 Thu Oct 23 07:30:58 EDT 2003 michel * Fix effort_volumes calculation when using symmetry M ./material.cpp -3 +3 Thu Oct 23 12:57:37 EDT 2003 droundy@civet.berkeley.edu * resolve conflict in tests/symmetry.cpp. M ./tests/symmetry.cpp +81 Thu Oct 23 07:32:33 EDT 2003 michel * Added support for symmetry in cylindrical + test in tests/symmetry.cpp M! ./material.cpp -1 +1 M! ./tests/symmetry.cpp -42 +7 M! ./vec.cpp +3 Thu Oct 23 07:27:38 EDT 2003 michel * Fix bands output to file and flush file M ./bands.cpp -3 +6 Thu Oct 23 07:44:38 EDT 2003 droundy@abridgegame.org * add support for symmetry when k == 0. M ./energy_and_flux.cpp -24 +9 M ./fields.cpp -6 +6 M ./material.cpp -8 +17 M ./meep.h -10 +10 M ./monitor.cpp +1 M ./sources.cpp -73 +18 M ./step.cpp -10 +7 M ./tests/symmetry.cpp -14 +105 M ./vec.cpp -9 +20 M ./vec.h -2 +8 Thu Oct 23 07:20:49 EDT 2003 droundy@abridgegame.org * define complex sum_to_all. M ./mympi.cpp +8 M ./mympi.h +1 Wed Oct 22 11:56:52 EDT 2003 droundy@abridgegame.org * floor fix in fluxes. M ./fluxes.cpp -2 +2 Wed Oct 22 09:42:33 EDT 2003 droundy@abridgegame.org * fix bugs caused by v not being enclosed within user_volume. M ./boundaries.cpp -30 +32 Wed Oct 22 14:45:01 EDT 2003 droundy@civet.berkeley.edu * speed up 3D tests. M ./tests/physical.cpp -4 +5 M ./tests/three_d.cpp -18 +18 Wed Oct 22 09:36:15 EDT 2003 droundy@abridgegame.org * avoid overwriting array in bands. Also a couple of formatting fixes... M ./bands.cpp -5 +5 Wed Oct 22 12:47:12 EDT 2003 droundy@civet.berkeley.edu * replace a few more incidences of dactyl with meep. M ./doc/complicated.tex -2 +2 M ./doc/omniguide.tex -1 +1 M ./doc/simple.tex -1 +1 M ./doc/simplebands.tex -1 +1 Wed Oct 22 11:55:25 EDT 2003 droundy@civet.berkeley.edu * change name of code from dactyl to meep. ./dactyl.h -> ./meep.h ./dactyl_internals.h -> ./meep_internals.h ./doc/dactyl.tex -> ./doc/meep.tex M ./Makefile.in r2 M ./bands.cpp r2 M ./boundaries.cpp r2 M ./check.h r2 M ./control_c.cpp r2 M ./copyright.h r2 M ./diff_slice.cpp r2 M ./doc/Makefile.in r3 M ./doc/complicated.tex r3 M ./doc/energy_cons.tex r3 M ./doc/energy_cons_1d.tex r3 M ./doc/epsilon_polariton_1d.tex r3 M ./doc/gpl.tex r4 M ./doc/lossgain_epsilon.tex r3 M ./doc/meep.tex -1 +1 r4 M ./doc/omniguide.tex r3 M ./doc/polaritonbands.tex r3 M ./doc/simple.tex r3 M ./doc/simplebands.tex r3 M ./energy_and_flux.cpp r2 M ./example.cpp r2 M ./fields.cpp r2 M ./fluxes.cpp r2 M ./grace.cpp r2 M ./harminv.cpp r2 M ./harminv.h r2 M ./initialize.cpp r2 M ./material.cpp r2 M ./meep.h r2 M ./meep_internals.h r2 M ./monitor.cpp r2 M ./mympi.cpp r2 M ./mympi.h r2 M ./output_directory.cpp r2 M ./polarization.cpp r2 M ./slices.cpp r2 M ./sources.cpp r2 M ./step.cpp r2 M ./step_e.h r2 M ./step_h.h r2 M ./tests/Makefile.in r2 M ./tests/bench.cpp r2 M ./tests/cylindrical.cpp r2 M ./tests/flux.cpp r2 M ./tests/known_results.cpp r2 M ./tests/one_dimensional.cpp r2 M ./tests/physical.cpp r2 M ./tests/step_algorithm.cpp r2 M ./tests/symmetry.cpp r2 M ./tests/three_d.cpp r2 M ./tests/two_dimensional.cpp r2 M ./time.cpp r2 M ./vec.cpp r2 M ./vec.h r2 Mon Oct 20 12:57:37 EDT 2003 michel * Fixed metal/magnetic boundaries in Cylindrical M ./boundaries.cpp -13 +5 Mon Oct 20 14:22:08 EDT 2003 droundy@civet.berkeley.edu * use floor a few places to round properly. M ./vec.cpp -4 +5 Mon Oct 20 07:23:03 EDT 2003 droundy@abridgegame.org * don't crash on record_bands just because we didn't prepare. M ./bands.cpp +1 Fri Oct 17 08:55:52 EDT 2003 droundy@abridgegame.org * add symmetry tests with rods. M ./tests/symmetry.cpp -2 +30 M ./vec.h +2 Thu Oct 16 12:58:51 EDT 2003 droundy@abridgegame.org * do epsilon averaging right in 3D. M ./material.cpp -1 +11 M ./tests/known_results.cpp -1 +1 Thu Oct 16 11:57:38 EDT 2003 droundy@abridgegame.org * support nice slices on any plane in 3D. M ./boundaries.cpp -39 +36 M ./dactyl.h -1 +10 M ./monitor.cpp -20 +45 M ./mympi.cpp +7 M ./mympi.h +1 M ./slices.cpp +102 M ./vec.h +15 Thu Oct 16 06:10:15 EDT 2003 droundy@abridgegame.org * increase tolerance in flux test. M ./tests/flux.cpp -1 +1 Wed Oct 15 14:24:47 EDT 2003 droundy@abridgegame.org * fix bug in periodic boundary conditions. M ./step.cpp -1 +1 M ./tests/known_results.cpp -14 +20 Wed Oct 15 10:54:26 EDT 2003 droundy@abridgegame.org * add configure flag to enable timing code. M ./configure.in +7 M ./dactyl.h +5 M ./time.cpp +2 Wed Oct 15 10:34:50 EDT 2003 droundy@abridgegame.org * rewrite boundary condition code. M ./boundaries.cpp -42 +83 M ./dactyl.h -1 +4 M ./fields.cpp -5 +8 M ./step.cpp -60 +30 Wed Oct 15 10:33:39 EDT 2003 droundy@abridgegame.org * add new test on known results. M ./mympi.cpp -1 +1 M ./mympi.h -1 +1 M ./tests/Makefile.in -3 +3 A ./tests/known_results.cpp Wed Oct 15 07:08:29 EDT 2003 droundy@abridgegame.org * treat metals specially in boundaries. M ./boundaries.cpp -32 +59 M ./dactyl.h +5 M ./fields.cpp +4 M ./step.cpp -25 +65 Fri Oct 10 12:24:10 EDT 2003 droundy@civet.berkeley.edu * increase tolerance in step_algorithm test. M ./tests/step_algorithm.cpp -1 +1 Fri Oct 10 11:51:28 EDT 2003 droundy@abridgegame.org * parallelize redefine_chunks. M ./material.cpp -95 +129 M ./mympi.cpp +8 M ./mympi.h -1 +2 M ./tests/physical.cpp -1 +1 M ./tests/step_algorithm.cpp -1 +1 Fri Oct 10 11:41:07 EDT 2003 droundy@abridgegame.org * fix simplebands example. M ./doc/simplebands.tex -2 +2 Fri Oct 10 11:04:37 EDT 2003 droundy@abridgegame.org * add nicer explanation to omniguide example. M ./doc/omniguide.tex -9 +8 Fri Oct 10 09:28:20 EDT 2003 droundy@abridgegame.org * fix bands file fix. M ./dactyl.h -1 +1 Fri Oct 10 09:24:30 EDT 2003 droundy@abridgegame.org * make bands use file rather than FILE. M ./bands.cpp -5 +6 M ./dactyl.h -2 +2 Fri Oct 10 08:33:40 EDT 2003 droundy@abridgegame.org * add 3D benchmarks and support thin volumes in 2D and 3D. M ./tests/bench.cpp +60 M ./vec.cpp -3 +5 Fri Oct 10 08:33:18 EDT 2003 droundy@abridgegame.org * add use_bloch interface accepting a double. M ./dactyl.h +3 Fri Oct 10 08:33:01 EDT 2003 droundy@abridgegame.org * remove debugging code... M ./material.cpp -10 +1 Thu Oct 9 13:10:07 EDT 2003 droundy@abridgegame.org * define a flush command for the file type. This command is a noop when running in parallel... M ./mympi.cpp +8 M ./mympi.h +1 Thu Oct 9 12:57:10 EDT 2003 droundy@abridgegame.org * add 3D symmetry support and tests. M ./material.cpp -1 +1 M ./sources.cpp -2 +9 M ./tests/cylindrical.cpp -3 +3 M ./tests/physical.cpp -1 +52 M ./tests/symmetry.cpp -2 +231 M ./vec.cpp -12 +34 M ./vec.h -1 +10 Thu Oct 9 12:39:17 EDT 2003 michel * Fixed periodic boundary conditions M ./boundaries.cpp -4 +3 Thu Oct 9 11:59:57 EDT 2003 droundy@abridgegame.org * don't crash on EPS slices in 3D. M ./slices.cpp +8 M ./sources.cpp -1 +1 Thu Oct 9 10:05:07 EDT 2003 droundy@abridgegame.org * rewrite monitor points to use new interpolation method. M ./dactyl.h -5 +2 M ./monitor.cpp -36 +20 M ./slices.cpp -4 +6 Thu Oct 9 08:37:40 EDT 2003 droundy@abridgegame.org * fix but in magnetic energy in box. M ./energy_and_flux.cpp -7 +6 Thu Oct 9 08:27:00 EDT 2003 droundy@abridgegame.org * reorganize interpolation yet again. M ./vec.cpp -139 +70 M ./vec.h -3 +4 Wed Oct 8 10:58:23 EDT 2003 droundy@abridgegame.org * fix pml asymmetry by storing both split fields. M ./StepGen.lhs -3 +9 M ./dactyl.h -2 +4 M ./dactyl_internals.h -1 +1 M ./energy_and_flux.cpp -4 +8 M ./fields.cpp -18 +29 M ./polarization.cpp -17 +33 M ./slices.cpp -1 +1 M ./step.cpp -54 +64 M ./step_e.h -100 +160 M ./step_e.hs -36 +23 M ./step_h.h -96 +120 M ./step_h.hs -32 +15 M ./tests/symmetry.cpp -39 +11 Tue Oct 7 14:13:07 EDT 2003 michel * Added splitting by effort and use it for PML M ./dactyl.h -4 +12 M ./fields.cpp -3 +2 M ./material.cpp -20 +233 M ./step.cpp -5 +5 M ./tests/Makefile.in -4 +4 A ./tests/physical.cpp M ./tests/symmetry.cpp -3 +5 M ./vec.cpp -19 +141 M ./vec.h +5 Tue Oct 7 13:47:17 EDT 2003 michel * Fix peek_field debug output M ./step.cpp -1 +1 Tue Oct 7 13:37:54 EDT 2003 michel * Added PML sigma slice output M ./slices.cpp +14 Tue Oct 7 13:27:05 EDT 2003 david * fix time stepping bug and add more parentheses in generated loop code. M ./step_e.h -60 +60 M ./step_e.hs -3 +3 M ./step_h.h -52 +52 M ./step_h.hs -2 +2 Tue Oct 7 13:12:44 EDT 2003 david * support ghc 5.02. M ./Makefile.in -2 +2 M ./StepGen.lhs -1 +1 Tue Oct 7 10:32:12 EDT 2003 droundy@abridgegame.org * resolve merge conflict in three_d. M ./tests/three_d.cpp -1 +1 Tue Oct 7 10:23:25 EDT 2003 droundy@abridgegame.org * use fancy new interpolate in all cartesian cases. M! ./fluxes.cpp -8 +6 M! ./tests/step_algorithm.cpp -1 +1 M! ./tests/symmetry.cpp +1 M! ./tests/three_d.cpp -1 +1 M! ./vec.cpp -142 +5 M! ./vec.h -4 Mon Oct 6 12:26:10 EDT 2003 droundy@civet.berkeley.edu * lower accuracy requirements in 3D test. M ./tests/three_d.cpp -1 +1 Mon Oct 6 11:12:03 EDT 2003 droundy@abridgegame.org * support 3D at last! M ./sources.cpp +1 M ./tests/Makefile.in -3 +3 A ./tests/three_d.cpp M ./tests/two_dimensional.cpp -1 +1 M ./vec.cpp -18 +53 M ./vec.h -5 +9 Mon Oct 6 08:31:03 EDT 2003 droundy@abridgegame.org * round pml sigma nicely. M ./material.cpp -2 +3 Fri Oct 3 09:13:19 EDT 2003 droundy@abridgegame.org * fix stride bug in 3D. M ./vec.cpp -5 +4 Fri Oct 3 07:19:38 EDT 2003 droundy@civet.berkeley.edu * don't use restrict after all, since gcc 2.95 doesn't support it. M ./step.cpp -1 +1 Fri Oct 3 07:13:29 EDT 2003 droundy@abridgegame.org * use __restrict__ keyword, although it doesn't seem to help. M ./step.cpp -17 +19 Thu Oct 2 12:51:20 EDT 2003 droundy@abridgegame.org * use generated timestepping code for E. M ./Makefile.in -2 +4 M ./StepGen.lhs -2 +2 M ./dactyl.h +2 M ./step.cpp -121 +259 A ./step_e.h A ./step_e.hs M ./step_h.h -80 +80 M ./tests/bench.cpp -7 +42 M ./tests/flux.cpp -14 +4 M ./tests/step_algorithm.cpp -4 +74 M ./vec.cpp -1 +1 Thu Oct 2 10:21:12 EDT 2003 droundy@abridgegame.org * step_h optimizations. M ./StepGen.lhs -5 +23 M ./step_h.h -50 +280 M ./step_h.hs -5 +19 M ./vec.cpp -1 Thu Oct 2 09:11:05 EDT 2003 droundy@abridgegame.org * rewrite step generating code. M ./Makefile.in -4 +3 A ./StepGen.lhs M ./step.cpp -1 +1 A ./step_h.h A ./step_h.hs R ./stepgen.h R ./stepgen.hs Wed Oct 1 16:19:32 EDT 2003 droundy@abridgegame.org * generate timestepping code automatically. M ./Makefile.in +5 M ./step.cpp -15 +14 A ./stepgen.h A ./stepgen.hs M ./tests/bench.cpp -1 +1 M ./tests/step_algorithm.cpp -2 +3 Wed Oct 1 09:08:34 EDT 2003 droundy@abridgegame.org * new step_h code which is simpler. M ./dactyl.h +14 M ./fields.cpp +47 M ./material.cpp -1 +7 M ./output_directory.cpp -1 +6 M ./step.cpp -65 +175 M ./tests/Makefile.in -3 +3 M ./tests/bench.cpp -2 +55 M ./tests/cylindrical.cpp +1 A ./tests/step_algorithm.cpp M ./tests/symmetry.cpp +1 M ./tests/two_dimensional.cpp +1 M ./vec.cpp -54 +32 M ./vec.h -3 +39 Tue Sep 30 08:06:08 EDT 2003 droundy@abridgegame.org * fix pml bug in H pml. M ./material.cpp -6 +7 Mon Sep 29 07:57:26 EDT 2003 droundy@abridgegame.org * define stride for a given direction in a field. M ./vec.cpp -7 +12 M ./vec.h +1 Mon Sep 29 07:59:46 EDT 2003 droundy@civet.berkeley.edu * resolve merge conflict in vec.cpp. M ./vec.cpp -72 Mon Sep 29 07:35:36 EDT 2003 droundy@abridgegame.org * remove unused debug code step_right. M ./dactyl.h -5 M ./step.cpp -86 Mon Sep 29 07:26:58 EDT 2003 droundy@abridgegame.org * use geometric_volume for energies and slices. M! ./dactyl.h -13 +14 M! ./dactyl_internals.h -1 +1 M! ./doc/energy_cons.tex -2 +2 M! ./doc/energy_cons_1d.tex -4 +4 M! ./energy_and_flux.cpp -20 +19 M! ./polarization.cpp -4 +3 M! ./slices.cpp -38 +29 M! ./tests/cylindrical.cpp -8 +16 M! ./tests/flux.cpp -8 +8 M! ./tests/one_dimensional.cpp -4 +8 M! ./tests/symmetry.cpp -14 +26 M! ./tests/two_dimensional.cpp -6 +12 M! ./vec.cpp -22 +52 M! ./vec.h -5 +5 Fri Sep 26 10:32:25 EDT 2003 droundy@abridgegame.org * preliminary work to support anisotropic dielectric tensors. This patch just changes the data structures to be capable of holding the anisotropic dielectric function. M ./dactyl.h -2 +2 M ./energy_and_flux.cpp -3 +6 M ./material.cpp -54 +70 M ./polarization.cpp -3 +5 M ./step.cpp -59 +61 M ./vec.h +8 Fri Sep 26 09:13:50 EDT 2003 droundy@abridgegame.org * define macros to loop over electric and magnetic field components. M ./vec.h +5 Mon Sep 29 07:34:54 EDT 2003 droundy@civet.berkeley.edu * define min and max right at top of vec.cpp. This is to fix a compile error on gcc 2.95.4. M ./vec.cpp -13 +5 Fri Sep 26 11:20:51 EDT 2003 michel * Geometric volume M ./vec.cpp -2 +34 M ./vec.h +16 Fri Sep 26 07:20:15 EDT 2003 droundy@abridgegame.org * another mpi bug fix. M ./tests/bench.cpp -1 Thu Sep 25 12:21:24 EDT 2003 droundy@civet.berkeley.edu * fix numerous mpi bugs. M ./bands.cpp -9 +6 M ./dactyl.h -1 +5 M ./doc/complicated.tex -2 +1 M ./doc/energy_cons.tex -2 +1 M ./doc/energy_cons_1d.tex -2 +1 M ./doc/epsilon_polariton_1d.tex -13 +14 M ./doc/lossgain_epsilon.tex -2 +1 M ./doc/omniguide.tex -2 +1 M ./doc/polaritonbands.tex -8 +2 M ./doc/simple.tex -8 +7 M ./doc/simplebands.tex -2 +1 M ./example.cpp -2 +1 M ./grace.cpp -3 +3 r2 M ./material.cpp +22 M ./mympi.cpp -2 +2 M ./mympi.h -2 +6 M ./polarization.cpp -12 +15 M ./tests/bench.cpp -1 +1 M ./tests/cylindrical.cpp -2 +1 M ./tests/flux.cpp -2 +1 M ./tests/one_dimensional.cpp -2 +1 M ./tests/symmetry.cpp -2 +1 M ./tests/two_dimensional.cpp -2 +1 Thu Sep 25 09:22:39 EDT 2003 michel * Make volume(void) an empty constructor M ./vec.cpp -6 M ./vec.h -1 +1 Thu Sep 25 09:37:44 EDT 2003 droundy@abridgegame.org * fix parallelization bug in bands. M ./bands.cpp -3 +6 M ./mympi.cpp +7 M ./mympi.h +1 Thu Sep 25 08:52:48 EDT 2003 droundy@abridgegame.org * more parallelization of IO fixes. M ./dactyl.h -1 +1 M ./doc/complicated.tex -17 +22 M ./mympi.cpp +17 r1 M ./mympi.h +1 r1 M ./output_directory.cpp -2 +2 M ./slices.cpp r1 M ./tests/symmetry.cpp -4 +2 M ./vec.cpp r1 Thu Sep 25 08:46:08 EDT 2003 michel * replace D1,D2 with d1,d2 (directions) M ./vec.cpp -5 +5 Thu Sep 25 08:36:56 EDT 2003 michel * inline 3 functions: min, max, max M ./vec.cpp -3 +3 Thu Sep 25 07:15:38 EDT 2003 michel * More automation in vec.cpp: split_specifically, transform, etc. M ./vec.cpp -59 +8 Wed Sep 24 18:20:40 EDT 2003 michel * Use LOOP_OVER_DIRECTIONS in volume::contains; use bool M ./vec.cpp -43 +15 M ./vec.h -3 +3 Wed Sep 24 14:05:19 EDT 2003 droundy@abridgegame.org * rewrite MPI file output to use MPI-2. M ./dactyl.h -2 +2 M ./mympi.cpp -1 +48 M ./mympi.h -2 +12 M ./slices.cpp -166 +135 M ./vec.cpp -6 +8 M ./vec.h -1 +3 Wed Sep 24 12:52:32 EDT 2003 michel * simplify volume.num_direction() and volume.nx() etc. M ./vec.cpp -17 +6 M ./vec.h -17 +8 Wed Sep 24 12:44:11 EDT 2003 michel * added vec(ndim) and ivec(ndim) constructors M ./vec.h +2 Wed Sep 24 11:56:04 EDT 2003 michel * use LOOP_OVER_DIRECTIONS in class ivec M ./vec.h -51 +28 Wed Sep 24 11:43:32 EDT 2003 michel * in zero_vec only set to 0 meaningful components M ./vec.h -1 +1 Wed Sep 24 11:34:54 EDT 2003 michel * Make use of LOOP_OVER_DIRECTIONS in vec operators M ./vec.h -48 +35 Wed Sep 24 12:06:47 EDT 2003 droundy@abridgegame.org * reorganize mpi portion of header file. M ./Makefile.in -11 +3 M ./dactyl.h -20 +1 A ./mympi.h Wed Sep 24 10:02:08 EDT 2003 droundy@abridgegame.org * test cleanups and new flux plane test. M ./tests/cylindrical.cpp -2 +1 M ./tests/flux.cpp +36 M ./tests/one_dimensional.cpp -2 +1 M ./tests/symmetry.cpp -2 +1 M ./tests/two_dimensional.cpp -2 +1 Wed Sep 24 09:49:13 EDT 2003 droundy@abridgegame.org * doc fixes. M ./doc/complicated.tex -4 +8 M ./doc/simple.tex -2 +3 Wed Sep 24 09:38:26 EDT 2003 droundy@abridgegame.org * rebuild docs if header files change. M ./doc/Makefile.in -1 +1 Wed Sep 24 09:03:40 EDT 2003 michel * clean vec() constructor and fix vec with undefined dimension M ./material.cpp -4 +2 M ./sources.cpp -1 +2 M ./vec.cpp -11 +1 M ./vec.h -2 +11 Wed Sep 24 07:43:18 EDT 2003 droundy@abridgegame.org * fix bug in 1D flux when running in parallel. M ./fluxes.cpp -2 +4 Wed Sep 24 07:05:14 EDT 2003 droundy@abridgegame.org * don't delete output directories on make clean. M ./doc/Makefile.in -2 +2 M ./tests/Makefile.in -1 +1 Tue Sep 23 13:47:57 EDT 2003 droundy@abridgegame.org * make two mirror test use pml. M ./tests/symmetry.cpp -10 +13 Tue Sep 23 13:35:30 EDT 2003 michel * Added inline functions nd(dim) & dstart(dim) M ./vec.h +8 Tue Sep 23 13:11:15 EDT 2003 droundy@abridgegame.org * simplify complex.tex example just a tad. M ./doc/complicated.tex -10 +5 Tue Sep 23 12:54:32 EDT 2003 droundy@abridgegame.org * add support for multiple symmetry operations. M ./energy_and_flux.cpp -5 +14 M ./tests/symmetry.cpp -4 +51 M ./vec.cpp -8 +68 M ./vec.h -1 +8 Tue Sep 23 12:18:03 EDT 2003 droundy@abridgegame.org * add copy constructor for mat. M ./dactyl.h +1 M ./material.cpp +12 Tue Sep 23 08:21:00 EDT 2003 droundy@abridgegame.org * skip redundant chunk boundary draws. Also, draw chunk boundaries at electric walls (or where they would be). M ./slices.cpp -13 +11 Tue Sep 23 08:04:34 EDT 2003 droundy@abridgegame.org * eliminate divides in PML timestepping. M ./dactyl.h +1 M ./material.cpp +14 M ./step.cpp -30 +35 Tue Sep 23 07:35:53 EDT 2003 droundy@abridgegame.org * improve visibility of chunk borders in EPS output. M ./slices.cpp -4 +6 Tue Sep 23 07:02:51 EDT 2003 michel * Fix chunk splitting and added cylindrical pml test. M ./tests/cylindrical.cpp -3 +61 M ./vec.cpp -2 +2 Tue Sep 23 07:01:15 EDT 2003 michel * Fixed boundary location in cylindrical. This caused PML problems in cylindrical. M ./vec.cpp -2 +2 Mon Sep 22 15:43:22 EDT 2003 michel * fix chunk border output in cylindrical EPS output. M ./slices.cpp -1 +1 Mon Sep 22 15:42:08 EDT 2003 michel * support pentium III. M ./configure.in -3 +3 Mon Sep 22 13:36:59 EDT 2003 droundy@abridgegame.org * outline chunk boundaries in EPS plots. M ./dactyl.h +2 M ./slices.cpp +39 Mon Sep 22 10:54:05 EDT 2003 droundy@abridgegame.org * change d1 etc to D1 etc. M ./bands.cpp r4 M ./boundaries.cpp r4 M ./check.h r4 M ./control_c.cpp r4 M ./copyright.h r4 M ./dactyl.h r4 M ./dactyl_internals.h r4 M ./diff_slice.cpp r4 M ./doc/complicated.tex r4 M ./doc/dactyl.tex r4 M ./doc/energy_cons.tex r4 M ./doc/energy_cons_1d.tex r4 M ./doc/epsilon_polariton_1d.tex r4 M ./doc/gpl.tex r4 M ./doc/lossgain_epsilon.tex r4 M ./doc/omniguide.tex r4 M ./doc/polaritonbands.tex r4 M ./doc/simple.tex r4 M ./doc/simplebands.tex r4 M ./energy_and_flux.cpp r4 M ./example.cpp r4 M ./fields.cpp r4 M ./fluxes.cpp r4 M ./grace.cpp r4 M ./harminv.cpp r4 M ./harminv.h r4 M ./initialize.cpp r4 M ./material.cpp r4 M ./monitor.cpp r4 M ./mympi.cpp r4 M ./output_directory.cpp r4 M ./polarization.cpp r4 M ./slices.cpp r4 M ./sources.cpp r4 M ./step.cpp r4 M ./tests/bench.cpp r4 M ./tests/cylindrical.cpp r4 M ./tests/flux.cpp r4 M ./tests/one_dimensional.cpp r4 M ./tests/symmetry.cpp r4 M ./tests/two_dimensional.cpp r4 M ./time.cpp r4 M ./vec.cpp r4 M ./vec.h r4 Mon Sep 22 10:28:00 EDT 2003 droundy@civet.berkeley.edu * add int max function to vec.cpp M ./vec.cpp +5 Mon Sep 22 09:47:35 EDT 2003 droundy@abridgegame.org * fix up eps output to be more efficient at high resolutions. M ./dactyl.h -1 +6 M ./monitor.cpp -3 +9 M ./slices.cpp -13 +52 M ./vec.cpp -1 +27 M ./vec.h -1 +3 Fri Sep 19 14:46:26 EDT 2003 droundy@abridgegame.org * add timing capabilities to fields. M ./Makefile.in -1 +1 M ./boundaries.cpp +2 M ./dactyl.h -6 +17 M ./fields.cpp +5 M ./slices.cpp -6 +10 M ./step.cpp +8 M ./tests/Makefile.in -2 +1 M ./tests/bench.cpp -4 +12 M ./tests/cylindrical.cpp -1 +1 M ./tests/one_dimensional.cpp -1 +1 M ./tests/symmetry.cpp -2 +2 M ./tests/two_dimensional.cpp -1 +1 A ./time.cpp Fri Sep 19 11:44:54 EDT 2003 droundy@abridgegame.org * fix 2d example in tutorial and add another. M ./doc/Makefile.in -5 +9 A ./doc/complicated.tex M ./doc/dactyl.tex -1 +3 M ./doc/simple.tex -6 +7 Fri Sep 19 11:42:02 EDT 2003 droundy@abridgegame.org * fix postscript output when there are multiple chunks. M ./slices.cpp -12 +20 Fri Sep 19 09:48:53 EDT 2003 droundy@abridgegame.org * add showpage to postscript output. M ./slices.cpp +1 Thu Sep 18 12:48:53 EDT 2003 droundy@abridgegame.org * simplify vec transform. M ./vec.cpp -15 +5 Thu Sep 18 11:28:25 EDT 2003 droundy@abridgegame.org * fix roundoff bugs. This patch is rather extreme. The code now works under the principle of trying to never store the location of a lattice point in a vec, but always to use an ivec, which is just an integer vector format on the yee lattice. M ./boundaries.cpp -15 +30 M ./dactyl.h -2 +3 M ./doc/Makefile.in -2 +2 M ./doc/simple.tex -14 +21 M ./energy_and_flux.cpp -5 +5 M ./fluxes.cpp -4 +8 M ./material.cpp -1 +1 M ./slices.cpp -22 +22 M ./step.cpp -2 +7 M ./vec.cpp -107 +157 M ./vec.h -11 +109 Wed Sep 17 12:19:27 EDT 2003 droundy@abridgegame.org * fix display of epsilon with symmetry. M ./slices.cpp -14 +14 Wed Sep 17 11:57:20 EDT 2003 droundy@abridgegame.org * don't use pml in chunks that aren't on borders. M ./material.cpp +3 Wed Sep 17 11:26:08 EDT 2003 droundy@abridgegame.org * support splitting any grid into any number of chunks. M ./tests/cylindrical.cpp -1 +1 M ./tests/two_dimensional.cpp -2 +2 M ./vec.cpp -16 +53 M ./vec.h +1 Wed Sep 17 08:56:30 EDT 2003 droundy@abridgegame.org * fix symmetry slice output. M ./slices.cpp -11 +21 Wed Sep 17 08:52:34 EDT 2003 droundy@abridgegame.org * fix pml with symmetry. M ./material.cpp -10 +5 M ./tests/symmetry.cpp -1 +51 M ./vec.cpp -8 +11 Tue Sep 16 13:45:38 EDT 2003 droundy@civet.berkeley.edu * refix TE/TM mpi bug. M ./boundaries.cpp -6 +4 M ./dactyl.h +2 M ./fields.cpp +8 Tue Sep 16 09:07:50 EDT 2003 droundy@abridgegame.org * don't segfault outputting TE/TM slices. M ./slices.cpp +5 Tue Sep 16 12:27:45 EDT 2003 droundy@abridgegame.org * fix te/tm bug in boundaries. M ./boundaries.cpp -6 +8 M ./tests/bench.cpp +26 M ./tests/two_dimensional.cpp -5 +152 Tue Sep 16 08:52:23 EDT 2003 droundy@abridgegame.org * only use required fields (TE/TM) in 2d. M ./boundaries.cpp -2 +2 M ./dactyl.h -3 +9 M ./energy_and_flux.cpp -2 +2 M ./fields.cpp -4 +15 M ./monitor.cpp -1 +1 M ./sources.cpp -8 +23 M ./step.cpp -6 +6 M ./tests/bench.cpp +51 Mon Sep 15 15:13:32 EDT 2003 droundy@abridgegame.org * multiple symmetry bugfixes and new tests. M ./boundaries.cpp -2 +2 M ./energy_and_flux.cpp -2 +2 M ./sources.cpp -1 +1 M ./step.cpp -1 M ./tests/symmetry.cpp -5 +214 M ./vec.cpp -5 +9 Mon Sep 15 11:18:09 EDT 2003 droundy@abridgegame.org * fix bug with mirror plane and metal combined. M ./boundaries.cpp -5 +5 M ./dactyl.h -1 +1 Mon Sep 15 11:14:22 EDT 2003 droundy@abridgegame.org * fix bug when metal is in both x and y directions. M ./boundaries.cpp -8 +11 Mon Sep 15 09:18:59 EDT 2003 droundy@abridgegame.org * get rid of debug output in symmetry test. M ./tests/symmetry.cpp -3 Mon Sep 15 09:07:49 EDT 2003 droundy@abridgegame.org * fix remaining bugs in symmetry code and add test. M ./doc/Makefile.in -1 +5 M ./doc/dactyl.tex +2 A ./doc/simple.tex M ./energy_and_flux.cpp -4 +4 M ./material.cpp -2 +2 M ./tests/Makefile.in -3 +6 A ./tests/symmetry.cpp M ./vec.cpp -28 +80 M ./vec.h +3 Fri Sep 12 11:22:20 EDT 2003 droundy@abridgegame.org * add preliminary incomplete support for symmetries. M ./boundaries.cpp -103 +99 M ./dactyl.h -10 +12 M ./dactyl_internals.h +2 M ./energy_and_flux.cpp -19 +33 M ./fields.cpp +2 M ./material.cpp -4 +33 M ./slices.cpp -121 +33 M ./sources.cpp -25 +53 M ./tests/flux.cpp +6 M ./vec.cpp -1 +154 M ./vec.h -1 +75 Wed Sep 10 14:17:09 EDT 2003 droundy@civet.berkeley.edu * eliminate a couple of divides. M ./energy_and_flux.cpp -2 +2 Wed Sep 10 14:16:42 EDT 2003 droundy@civet.berkeley.edu * check for roundoff errors leading to negative volumes. M ./vec.cpp +8 Wed Sep 10 14:16:15 EDT 2003 droundy@civet.berkeley.edu * fix MPI tag overflow bug. M ./step.cpp -2 +7 Wed Sep 10 07:53:31 EDT 2003 droundy@abridgegame.org * vec and volume cleanup. M ./vec.cpp -35 +39 M ./vec.h -34 +35 Tue Sep 9 08:14:19 EDT 2003 droundy@abridgegame.org * add 2D bloch boundary condition support. M ./bands.cpp -3 +3 M ./boundaries.cpp -39 +105 M ./dactyl.h -6 +6 M ./fields.cpp -20 +4 M ./initialize.cpp -2 +2 M ./monitor.cpp -7 +7 M ./tests/two_dimensional.cpp -3 +48 Mon Sep 8 14:39:36 EDT 2003 droundy@abridgegame.org * metal boundary conditions rewrite and 2D support. M ./boundaries.cpp -5 +36 M ./dactyl.h +8 M ./fields.cpp +1 M ./material.cpp -19 +18 M ./tests/cylindrical.cpp +2 M ./tests/two_dimensional.cpp +2 M ./vec.h +8 Mon Sep 8 13:24:05 EDT 2003 droundy@abridgegame.org * get rid of old use_pml_left etc in favor of use_pml_everywhere. M ./dactyl.h -3 +1 M ./doc/epsilon_polariton_1d.tex -2 +1 M ./doc/lossgain_epsilon.tex -3 +1 M ./material.cpp -8 +9 M ./tests/bench.cpp -2 +1 M ./tests/flux.cpp -4 +2 M ./vec.cpp +9 M ./vec.h +1 Mon Sep 8 11:20:51 EDT 2003 droundy@abridgegame.org * support (and test) PML in 2D. This also involved a rather large PML cleanup which greatly simplified the PML sigma creation code. M ./dactyl.h -5 +3 M ./material.cpp -198 +31 M ./step.cpp -38 +38 M ./tests/two_dimensional.cpp -1 +59 M ./vec.cpp +24 M ./vec.h +22 Mon Sep 8 10:43:50 EDT 2003 droundy@abridgegame.org * add new debug method for examining field contents. M ./dactyl.h +2 M ./step.cpp +17 Mon Sep 8 09:14:35 EDT 2003 droundy@abridgegame.org * don't rerun tests without good reason. M ./tests/Makefile.in -8 +7 Fri Sep 5 14:23:42 EDT 2003 droundy@abridgegame.org * add support for 2D. M ./boundaries.cpp -1 +1 M ./material.cpp +15 M ./slices.cpp -35 +70 M ./sources.cpp +1 M ./step.cpp +139 M ./tests/Makefile.in -2 +5 A ./tests/two_dimensional.cpp M ./vec.cpp -7 +131 M ./vec.h +3 Fri Sep 5 14:14:41 EDT 2003 droundy@abridgegame.org * postscript formatting changes. M ./slices.cpp -28 +28 Fri Sep 5 13:04:36 EDT 2003 droundy@abridgegame.org * simplify yee lattice averaging of inveps and sigma. M ./material.cpp -23 +5 M ./polarization.cpp -31 +8 Fri Sep 5 10:28:52 EDT 2003 droundy@abridgegame.org * simplify code for recording eps. M ./material.cpp -7 +1 Fri Sep 5 10:20:53 EDT 2003 droundy@abridgegame.org * fix pml bug in cylindrical coordinates. M ./step.cpp -1 +1 Fri Sep 5 09:16:46 EDT 2003 droundy@abridgegame.org * extend vec into 2D. M ./vec.cpp -2 +49 M ./vec.h +9 Thu Sep 4 12:00:52 EDT 2003 droundy@abridgegame.org * fix roundoff issue with cavity. There are still systematic errors in the flux that I'd like to address at some point. M ./tests/flux.cpp -7 +8 Thu Sep 4 12:00:15 EDT 2003 droundy@abridgegame.org * plot 1d eps_slice as a line plot. M ./slices.cpp -2 +53 Thu Sep 4 09:56:29 EDT 2003 droundy@abridgegame.org * preliminary 3D work. M ./vec.cpp +81 M ./vec.h +12 Thu Sep 4 09:38:53 EDT 2003 droundy@abridgegame.org * error message typo fix. M ./vec.cpp -1 +1 Thu Sep 4 08:58:05 EDT 2003 droundy@abridgegame.org * all object files depend on vec.h... M ./Makefile.in -1 +1 Thu Sep 4 08:45:09 EDT 2003 droundy@abridgegame.org * shorten the cutoff if it would lead to underflow. M ./sources.cpp +2 Thu Sep 4 08:41:15 EDT 2003 droundy@abridgegame.org * draw eps boundaries on 1D eps slices. M ./slices.cpp -1 +8 Thu Sep 4 08:40:47 EDT 2003 droundy@abridgegame.org * include min in flux.cpp. M ./tests/flux.cpp +2 Wed Sep 3 13:34:05 EDT 2003 droundy@abridgegame.org * add good flux tests. M ./tests/flux.cpp -11 +80 Wed Sep 3 12:47:29 EDT 2003 droundy@abridgegame.org * fix bugs in flux plane. M ./dactyl_internals.h -1 +2 M ./energy_and_flux.cpp -4 +2 M ./fluxes.cpp -14 +24 Tue Sep 2 14:14:48 EDT 2003 droundy@abridgegame.org * new flux plane mechanism. M ./Makefile.in -1 +1 M ./dactyl.h -2 +24 M ./dactyl_internals.h +17 M ./energy_and_flux.cpp -13 M ./fields.cpp +4 A ./fluxes.cpp M ./step.cpp +2 M ./tests/bench.cpp -2 +3 M ./tests/flux.cpp -2 +3 Tue Sep 2 09:32:14 EDT 2003 droundy@abridgegame.org * have make clean remove debug output. M ./Makefile.in -1 +1 M ./tests/Makefile.in -1 +1 Tue Sep 2 09:29:42 EDT 2003 droundy@abridgegame.org * add debug_printf function to print on all procs to files. M ./dactyl.h -1 +2 M ./mympi.cpp -1 +17 Tue Sep 2 09:28:46 EDT 2003 droundy@abridgegame.org * fix bug in find_last_source (parallelization bug). M ./bands.cpp -2 +3 M ./dactyl.h +1 M ./mympi.cpp +8 Tue Sep 2 08:12:54 EDT 2003 droundy@abridgegame.org * interpolate for energy_in_box at edges. M ./Makefile.in -1 +1 M ./energy_and_flux.cpp -2 +4 M ./tests/Makefile.in -2 +2 M ./vec.cpp +73 M ./vec.h +6 Fri Aug 29 12:57:35 EDT 2003 droundy@abridgegame.org * add flux code (so far only supporting 1D). M ./dactyl.h -16 +4 M ./energy_and_flux.cpp +13 M ./tests/Makefile.in -2 +3 M ./tests/bench.cpp +41 A ./tests/flux.cpp Fri Aug 29 12:13:39 EDT 2003 droundy@abridgegame.org * fix bug where I was interpolating the fields wrongly. M ./monitor.cpp -1 +1 Fri Aug 29 12:12:59 EDT 2003 droundy@abridgegame.org * define function for interpolating epsilon. M ./dactyl.h +8 M ./monitor.cpp +51 Fri Aug 29 11:55:27 EDT 2003 droundy@abridgegame.org * fix bug in find_last_source. M ./bands.cpp -2 +2 M ./sources.cpp -1 +1 Fri Aug 29 10:03:06 EDT 2003 droundy@abridgegame.org * try to guess some good optimization flags. M ./configure.in -6 +35 Fri Aug 29 07:23:17 EDT 2003 droundy@abridgegame.org * oops g++ 2.95 fix... M ./tests/cylindrical.cpp -1 +1 Fri Aug 29 07:17:34 EDT 2003 droundy@abridgegame.org * g++3 fixes. M ./bands.cpp -3 +3 M ./control_c.cpp -1 +1 M ./dactyl.h -2 +4 M ./doc/epsilon_polariton_1d.tex -1 +1 M ./doc/lossgain_epsilon.tex -3 +3 M ./fields.cpp -1 +1 M ./grace.cpp -6 +6 M ./harminv.cpp -8 +8 M ./harminv.h +2 M ./mympi.cpp -1 +1 M ./slices.cpp -23 +23 M ./sources.cpp -4 +4 M ./step.cpp -1 M ./vec.cpp -2 +2 Thu Aug 28 13:58:48 EDT 2003 droundy@abridgegame.org * add a larger benchmark test. M ./tests/bench.cpp +1 Thu Aug 28 13:44:39 EDT 2003 droundy@abridgegame.org * add benchmark code. M ./Makefile.in -1 +4 M ./doc/Makefile.in -1 +1 M ./tests/Makefile.in -5 +9 A ./tests/bench.cpp Thu Aug 28 12:52:46 EDT 2003 droundy@abridgegame.org * add metallic cylindrical test case for communications. M ./tests/cylindrical.cpp +56 Thu Aug 28 12:07:36 EDT 2003 droundy@abridgegame.org * actually use mpi when making docs. M ./doc/Makefile.in -6 +7 Thu Aug 28 12:00:10 EDT 2003 droundy@abridgegame.org * run tests and make docs with all available local procs. M ./configure.in -1 +23 Thu Aug 28 11:43:57 EDT 2003 droundy@abridgegame.org * if latex2html isn't present, skip html docs. M ./configure.in +7 M ./doc/Makefile.in -1 +1 Thu Aug 28 11:35:14 EDT 2003 droundy@abridgegame.org * fix bug in limit on number of requests allocated. M ./step.cpp -2 +4 Thu Aug 28 11:13:38 EDT 2003 droundy@abridgegame.org * comment in communications code. M ./step.cpp -1 +1 Thu Aug 28 11:13:19 EDT 2003 droundy@abridgegame.org * don't require latex2html to build ps documentation. M ./doc/dactyl.tex -1 Thu Aug 28 11:03:11 EDT 2003 droundy@abridgegame.org * parallelize lossgain_epsilon example. M ./doc/lossgain_epsilon.tex -11 +14 Thu Aug 28 10:12:19 EDT 2003 droundy@abridgegame.org * fix up communication code. This change has a bit of reorganization to it, it adds a unique tag to each message (which fixes a bug), and reorders the communications so the sends and recieves should usually be ordered in a nicer manner. M ./step.cpp -28 +30 Thu Aug 28 10:07:05 EDT 2003 droundy@abridgegame.org * interpolate correctly under mpi. M ./monitor.cpp -8 +11 Thu Aug 28 10:01:46 EDT 2003 droundy@abridgegame.org * add extra mympi functionality. M ./dactyl.h -4 +6 M ./mympi.cpp -9 +17 Thu Aug 28 10:00:40 EDT 2003 droundy@abridgegame.org * remove redundand cd ..s in Makefile. M ./Makefile.in -4 +4 Thu Aug 28 08:11:37 EDT 2003 droundy@abridgegame.org * support mpi in make doc. M ./bands.cpp -17 +21 M ./doc/Makefile.in -13 +10 M ./doc/energy_cons.tex -4 +6 M ./doc/energy_cons_1d.tex -7 +7 M ./doc/epsilon_polariton_1d.tex +2 M ./doc/omniguide.tex +2 M ./doc/polaritonbands.tex +2 R ./doc/preproc.hs A ./doc/preproc.pl M ./doc/simplebands.tex -2 +5 Thu Aug 28 06:51:32 EDT 2003 droundy@abridgegame.org * abort should write to stderr, not stdout. M ./mympi.cpp -1 +1 Thu Aug 28 06:50:33 EDT 2003 droundy@abridgegame.org * make clean should clean tests and doc too. M ./Makefile.in +2 Thu Aug 28 06:48:58 EDT 2003 droundy@abridgegame.org * fix printing in mpi cylindrical test. M ./tests/cylindrical.cpp -21 +9 Wed Aug 27 15:13:46 EDT 2003 droundy@abridgegame.org * replace exit with abort throughout. M ./bands.cpp -14 +5 M ./boundaries.cpp -8 +2 M ./control_c.cpp -1 +1 M ./fields.cpp -14 +6 M ./grace.cpp -4 +1 M ./material.cpp -22 +9 M ./monitor.cpp -4 +1 M ./polarization.cpp -14 +6 M ./slices.cpp -16 +4 M ./sources.cpp -25 +10 M ./step.cpp -2 +1 M ./vec.cpp -34 +21 Wed Aug 27 14:58:46 EDT 2003 droundy@abridgegame.org * more mpi work. M ./boundaries.cpp -8 +4 M ./dactyl.h -1 +1 M ./fields.cpp -7 +5 M ./output_directory.cpp -5 +3 M ./step.cpp -8 +36 Wed Aug 27 14:00:00 EDT 2003 droundy@abridgegame.org * make mpi actually work (albeit crudely). M ./configure.in +4 M ./dactyl.h -2 +22 M ./energy_and_flux.cpp -10 +18 M ./example.cpp -7 +9 M ./fields.cpp -3 +4 M ./material.cpp -71 +93 M ./mympi.cpp -1 +68 M ./output_directory.cpp -2 +2 M ./slices.cpp -14 +40 M ./sources.cpp -4 +6 M ./step.cpp -20 +42 M ./tests/Makefile.in -2 +3 M ./tests/cylindrical.cpp -37 +33 M ./tests/one_dimensional.cpp -22 +18 Wed Aug 27 09:28:59 EDT 2003 droundy@abridgegame.org * add configure --with-mpi option. M ./Makefile.in -1 +2 M ./autogen.sh +1 R ./config.h.in M ./configure.in -5 +33 M ./dactyl.h +7 M ./example.cpp -1 +4 A ./mympi.cpp Wed Aug 27 08:11:32 EDT 2003 droundy@abridgegame.org * print slices with lots more digits. M ./slices.cpp -1 +1 Wed Aug 27 07:51:56 EDT 2003 droundy@abridgegame.org * turn on a few more tests. M ./tests/cylindrical.cpp -6 +4 M ./tests/one_dimensional.cpp -6 +4 Tue Aug 26 11:11:20 EDT 2003 droundy@abridgegame.org * chunk splitting bugfixes! M ./boundaries.cpp -298 +101 M ./dactyl.h -5 +2 M ./step.cpp -15 +15 Tue Aug 26 08:57:30 EDT 2003 droundy@abridgegame.org * another broken step towards mpi. M ./boundaries.cpp -161 +253 M ./dactyl.h -12 +16 M ./energy_and_flux.cpp -14 +12 M ./example.cpp -1 +1 M ./fields.cpp -12 +26 M ./initialize.cpp -2 +2 M ./step.cpp -29 +34 M ./vec.h +5 Mon Aug 25 08:23:28 EDT 2003 droundy@abridgegame.org * fix valgrind message when in 1D. M ./vec.cpp -3 +6 Fri Aug 22 09:10:47 EDT 2003 droundy@abridgegame.org * speed up 1d test. M ./tests/one_dimensional.cpp -8 +8 Fri Aug 22 09:00:36 EDT 2003 droundy@abridgegame.org * add tests and bugfixes for 1d chunkiness. M ./tests/Makefile.in -2 +3 A ./tests/one_dimensional.cpp M ./vec.cpp -22 +28 M ./vec.h +2 Thu Aug 21 15:24:50 EDT 2003 droundy@abridgegame.org * implement nice test for chunks! M ./tests/cylindrical.cpp -10 +139 Thu Aug 21 15:23:37 EDT 2003 droundy@abridgegame.org * make contains defined properly. M ./energy_and_flux.cpp -7 +4 M ./vec.cpp -4 +9 Thu Aug 21 15:14:57 EDT 2003 droundy@abridgegame.org * fix rounding issues with multichunks. M ./sources.cpp -1 M ./step.cpp -25 +23 M ./vec.cpp -23 +26 Thu Aug 21 10:24:11 EDT 2003 droundy@abridgegame.org * fix it so interpolation doesn't give roundoff differences. This just avoids roundoff errors being different for different numbers of chunks. It requires that the origin (0,0) lie on a grid point. M ./vec.cpp -4 +9 Fri Aug 1 15:14:29 EDT 2003 droundy@abridgegame.org * bug fixes in monitor point and interpolate. M ./monitor.cpp -1 +3 M ./vec.cpp -5 +7 Fri Aug 1 14:28:47 EDT 2003 droundy@abridgegame.org * fix bug in monitor point. M ./monitor.cpp -1 +1 Fri Aug 1 14:19:48 EDT 2003 droundy@abridgegame.org * fix bug in stepping at r == 0 and z == 0. M ./step.cpp -1 +1 Fri Aug 1 14:16:21 EDT 2003 droundy@abridgegame.org * fix bug in interpolation. M ./monitor.cpp -1 +1 Fri Aug 1 12:03:03 EDT 2003 droundy@abridgegame.org * fix bug in interpolation in eastern quadrant. M ./vec.cpp -4 +4 Fri Aug 1 12:01:13 EDT 2003 droundy@abridgegame.org * add routine to just integrate the volume of the cell. M ./dactyl.h +2 M ./energy_and_flux.cpp +14 Fri Aug 1 11:04:40 EDT 2003 droundy@abridgegame.org * sort terms when summing interpolation in monitor point. M ./dactyl.h -2 +3 M ./fields.cpp -1 +1 M ./monitor.cpp -11 +41 Fri Aug 1 09:29:50 EDT 2003 droundy@abridgegame.org * fix bug in contains and in interpolate. M ./vec.cpp -2 +22 Fri Aug 1 09:28:08 EDT 2003 droundy@abridgegame.org * fix bug in monitor points at chunk boundaries. M ./dactyl.h -2 +1 M ./monitor.cpp -18 +8 Fri Aug 1 08:42:56 EDT 2003 droundy@abridgegame.org * add += operator to vec. M ./vec.h +6 Fri Aug 1 08:40:15 EDT 2003 droundy@abridgegame.org * dv is zero if a point isn't in the volume. M ./vec.cpp +1 Fri Aug 1 08:36:14 EDT 2003 droundy@abridgegame.org * comment change in fields.cpp. M ./fields.cpp -1 +1 Fri Aug 1 08:33:57 EDT 2003 droundy@abridgegame.org * comment change in vec.cpp. M ./vec.cpp -1 +1 Fri Aug 1 08:06:39 EDT 2003 droundy@abridgegame.org * make interpolate round down a bit more often. M ./vec.cpp -1 +1 Fri Aug 1 08:03:25 EDT 2003 droundy@abridgegame.org * bugfix: make owns do right thing at r == 0. M ./vec.cpp +2 Fri Aug 1 07:59:53 EDT 2003 droundy@abridgegame.org * bugfix: two bugs in interpolation. M ./vec.cpp -4 +5 Thu Jul 31 15:01:00 EDT 2003 droundy@abridgegame.org * make energy_in_box really be in box. M ./energy_and_flux.cpp -2 +9 Thu Jul 31 14:57:35 EDT 2003 droundy@abridgegame.org * outdir mat fix. M ./dactyl.h -14 +13 M ./fields.cpp -3 +3 M ./material.cpp -2 +3 M ./monitor.cpp -4 +4 M ./output_directory.cpp -6 M ./slices.cpp -8 +8 Thu Jul 31 08:38:17 EDT 2003 droundy@abridgegame.org * remove bogus monitor point constructor from header. M ./dactyl.h -1 Thu Jul 31 08:26:02 EDT 2003 droundy@abridgegame.org * make mat split recursively (and intelligently). M ./material.cpp -5 +1 M ./tests/cylindrical.cpp -2 +2 M ./vec.cpp -1 +23 M ./vec.h +1 Thu Jul 31 08:25:17 EDT 2003 droundy@abridgegame.org * just for the heck of it, split chunk in e_p_1d.tex M ./doc/epsilon_polariton_1d.tex -1 +1 Thu Jul 31 08:22:40 EDT 2003 droundy@abridgegame.org * get rid of excess printf in doc. M ./doc/epsilon_polariton_1d.tex -1 Thu Jul 31 08:04:14 EDT 2003 droundy@abridgegame.org * make test at least test for failure. M ./Makefile.in -1 +1 M ./tests/cylindrical.cpp -9 +18 Thu Jul 31 07:48:50 EDT 2003 droundy@abridgegame.org * remove debug printf. M ./vec.cpp -4 +1 Thu Jul 31 07:43:29 EDT 2003 droundy@abridgegame.org * remove debug printf. M ./sources.cpp -6 +1 Thu Jul 31 07:40:45 EDT 2003 droundy@abridgegame.org * add tests dir and one null test. M ./Makefile.in -1 +2 M ./configure.in -1 +1 A ./tests/ A ./tests/Makefile.in A ./tests/cylindrical.cpp Wed Jul 30 14:39:48 EDT 2003 droundy@abridgegame.org * fix comment in boundaries. M ./boundaries.cpp -1 +1 Wed Jul 30 14:38:23 EDT 2003 droundy@abridgegame.org * fix bug when origin isn't at r=0. M ./step.cpp -20 +20 Wed Jul 30 14:05:32 EDT 2003 droundy@abridgegame.org * actually split up into multiple chunks! M ./dactyl.h -5 +6 M ./example.cpp -8 +9 M ./material.cpp -24 +28 M ./output_directory.cpp -3 +12 M ./slices.cpp -1 +1 M ./sources.cpp +6 M ./vec.cpp -21 +76 M ./vec.h -1 +3 Wed Jul 30 14:03:06 EDT 2003 droundy@abridgegame.org * fix bugs in propogation when radial origin isn't zero. M ./step.cpp -9 +13 Wed Jul 30 09:40:08 EDT 2003 droundy@abridgegame.org * break mat chunk creation into a separate method. M ./dactyl.h +3 M ./material.cpp +9 Wed Jul 30 09:39:21 EDT 2003 droundy@abridgegame.org * remove debug print statement. M ./boundaries.cpp -2 Wed Jul 30 09:16:09 EDT 2003 droundy@abridgegame.org * new boundary condition code (preparatory to multiple chunks) M ./Makefile.in -1 +1 A ./boundaries.cpp M ./dactyl.h -1 +13 M ./fields.cpp -146 +22 M ./vec.cpp -3 +29 M ./vec.h +1 Tue Jul 29 07:52:24 EDT 2003 droundy@abridgegame.org * bugfix: was reading beyond an array occasionally. M ./bands.cpp -1 +3 Tue Jul 29 07:19:21 EDT 2003 droundy@abridgegame.org * fields_chunk doesn't need kz. M ./dactyl.h -5 +5 M ./fields.cpp -9 +7 M ./initialize.cpp -6 +6 Mon Jul 28 14:01:36 EDT 2003 droundy@abridgegame.org * fields_chunk doesn't need to know the time... M ./bands.cpp -5 +5 M ./dactyl.h -16 +16 M ./dactyl_internals.h -6 +5 M ./energy_and_flux.cpp -4 +4 M ./fields.cpp -1 +1 M ./monitor.cpp -6 +6 M ./sources.cpp -30 +35 M ./step.cpp -16 +16 Mon Jul 28 11:50:15 EDT 2003 droundy@abridgegame.org * fields_chunk doesn't need to keep track of phasein_time. M ./dactyl.h -4 +3 M ./fields.cpp -10 +3 M ./step.cpp -25 +3 Mon Jul 28 11:49:23 EDT 2003 droundy@abridgegame.org * makefile improvement. M ./Makefile.in -1 +1 Mon Jul 28 11:20:24 EDT 2003 droundy@abridgegame.org * fix bug where k was wrong in fields. M ./fields.cpp +1 Mon Jul 28 10:40:05 EDT 2003 droundy@abridgegame.org * get rid of annowing informational message. M ./bands.cpp -1 Mon Jul 28 10:07:38 EDT 2003 droundy@abridgegame.org * fix bands bug. M ./bands.cpp -5 +5 M ./dactyl.h -1 M ./step.cpp -21 +2 Mon Jul 28 09:35:43 EDT 2003 droundy@abridgegame.org * convert bands away from fields_chunk to fields. M ./bands.cpp -24 +40 M ./dactyl.h -17 +1 M ./dactyl_internals.h -1 +3 M ./doc/omniguide.tex -4 +4 M ./doc/polaritonbands.tex -2 +2 M ./doc/simplebands.tex -2 +2 M ./fields.cpp -5 +17 M ./initialize.cpp -2 +17 M ./step.cpp +1 Mon Jul 28 08:26:01 EDT 2003 droundy@abridgegame.org * initialize time to zero... M ./fields.cpp +1 Mon Jul 28 07:51:22 EDT 2003 droundy@abridgegame.org * make the new mat and field actually work. ./dactyl.cpp -> ./step.cpp M ./Makefile.in -3 +3 M ./configure.in -1 +1 M ./dactyl.h -20 +118 M ./doc/Makefile.in -2 +9 M ./doc/energy_cons.tex -2 +2 M ./doc/energy_cons_1d.tex -2 +2 M ./doc/epsilon_polariton_1d.tex -2 +2 M ./doc/lossgain_epsilon.tex -3 +3 M ./energy_and_flux.cpp -3 +31 M ./example.cpp -2 +2 A ./fields.cpp M ./material.cpp +46 M ./monitor.cpp -1 +7 M ./polarization.cpp +43 M ./slices.cpp -87 +96 A ./sources.cpp M ./step.cpp -389 +85 Fri Jul 25 13:16:25 EDT 2003 droundy@abridgegame.org * fix latex errors in docs. M ./doc/dactyl.tex -4 +4 M ./doc/epsilon_polariton_1d.tex -2 +2 M ./doc/omniguide.tex -1 +1 M ./doc/simplebands.tex -5 +4 Fri Jul 25 11:53:41 EDT 2003 droundy@abridgegame.org * oops, forgot to remove monitor_1d.cpp R ./monitor_1d.cpp Fri Jul 25 11:37:05 EDT 2003 droundy@abridgegame.org * rename mat and fields preparatory to splitting them. M ./bands.cpp r2 M ./check.h r2 M ./control_c.cpp r2 M ./copyright.h r2 M ./dactyl.cpp r2 M ./dactyl.h r2 M ./dactyl_internals.h r2 M ./diff_slice.cpp r2 M ./doc/dactyl.tex r2 M ./doc/energy_cons.tex r2 M ./doc/energy_cons_1d.tex r2 M ./doc/epsilon_polariton_1d.tex r2 M ./doc/gpl.tex r2 M ./doc/lossgain_epsilon.tex r2 M ./doc/omniguide.tex r2 M ./doc/polaritonbands.tex r2 M ./doc/simplebands.tex r2 M ./energy_and_flux.cpp r2 M ./example.cpp r2 M ./grace.cpp r2 M ./harminv.cpp r2 M ./harminv.h r2 M ./initialize.cpp r2 M ./material.cpp r2 M ./monitor.cpp r2 M ./monitor_1d.cpp r2 M ./output_directory.cpp r2 M ./polarization.cpp r2 M ./slices.cpp r2 M ./vec.cpp r2 M ./vec.h r2 Thu Jul 24 11:59:13 EDT 2003 droundy@abridgegame.org * minor improvement in polaritonbands. M ./doc/polaritonbands.tex -1 +2 Thu Jul 24 11:53:45 EDT 2003 droundy@abridgegame.org * reimplement throwing away bands with too little power. M ./bands.cpp +18 Tue Jul 22 09:22:52 EDT 2003 droundy@abridgegame.org * bands fixes. M ./bands.cpp -2 +5 M ./doc/omniguide.tex -7 +4 M ./initialize.cpp +4 Fri Jul 18 14:42:44 EDT 2003 droundy@abridgegame.org * fix up bands calculation a bit. M ./bands.cpp -31 +47 M ./dactyl.h -1 M ./dactyl_internals.h -2 +4 M ./doc/omniguide.tex -4 +11 Fri Jul 18 09:21:03 EDT 2003 droundy@abridgegame.org * fix up the 1d polariton example. M ./doc/epsilon_polariton_1d.tex -6 +6 Thu Jul 17 14:20:13 EDT 2003 droundy@abridgegame.org * remove old plot.hs and modes.hs files. M ./Makefile.in -7 +3 R ./modes.hs R ./plot.hs Thu Jul 17 14:18:19 EDT 2003 droundy@abridgegame.org * fix up lossgain example a bit more. M ./doc/lossgain_epsilon.tex -9 +10 Thu Jul 17 12:55:27 EDT 2003 droundy@abridgegame.org * fix complex conjugation of source. M ./dactyl.cpp -4 +4 Thu Jul 17 10:06:42 EDT 2003 droundy@abridgegame.org * fix interpolation bug in analytic_epsilon. M ./polarization.cpp -1 +2 Thu Jul 17 06:55:52 EDT 2003 droundy@abridgegame.org * improvement in lossgain example, exposing bug somewhere. M ./doc/lossgain_epsilon.tex -18 +31 Wed Jul 16 10:10:47 EDT 2003 droundy@abridgegame.org * support one dimensional plotting nicely. M ./slices.cpp -20 +36 Wed Jul 16 10:04:07 EDT 2003 droundy@abridgegame.org * compute analytic epsilon of omega. M ./dactyl.h +1 M ./dactyl_internals.h +1 M ./doc/epsilon_polariton_1d.tex -4 +16 M ./polarization.cpp +26 Wed Jul 16 09:09:18 EDT 2003 droundy@abridgegame.org * fix up 1d polariton epsilon example. M ./doc/epsilon_polariton_1d.tex -32 +35 Wed Jul 9 10:33:27 EDT 2003 droundy@abridgegame.org * in grace, if the filename already has .eps, don't add another. M ./grace.cpp +5 Wed Jul 9 10:21:08 EDT 2003 droundy@abridgegame.org * add eps output in 1D and with real fields. M ./dactyl.h -1 +1 M ./grace.cpp -1 +1 M ./slices.cpp -20 +33 Wed Jul 9 08:53:08 EDT 2003 droundy@abridgegame.org * assorted valgrind-inspired fixes. M ./dactyl.cpp +5 M ./dactyl.h -1 +1 M ./dactyl_internals.h +1 M ./grace.cpp -2 +6 M ./slices.cpp -2 +2 Wed Jul 9 08:52:17 EDT 2003 droundy@abridgegame.org * fix bug with sources and real fields. M ./dactyl.cpp -12 +3 M ./dactyl_internals.h -1 +1 Wed Jul 9 08:20:39 EDT 2003 droundy@abridgegame.org * redo saturation calculation. M ./dactyl.cpp +1 M ./dactyl.h +1 M ./dactyl_internals.h -2 M ./polarization.cpp -20 +27 Wed Jul 9 07:35:04 EDT 2003 droundy@abridgegame.org * initial (failed) attempt at supporting real fields. M ./dactyl.cpp -5 +19 M ./dactyl.h -2 +2 M ./dactyl_internals.h -25 +5 M ./polarization.cpp -5 +15 M ./slices.cpp -1 +1 Tue Jul 8 13:43:16 EDT 2003 droundy@abridgegame.org * support for gain and loss saturation. M ./dactyl.h -1 +1 M ./dactyl_internals.h -2 +7 M ./doc/energy_cons_1d.tex -4 +5 M ./polarization.cpp -10 +56 Tue Jul 8 13:42:16 EDT 2003 droundy@abridgegame.org * fix bug in H sources. M ./dactyl.cpp -1 +1 Tue Jul 8 11:22:57 EDT 2003 droundy@abridgegame.org * fix integrating bug. M ./vec.cpp -3 +2 Tue Jul 8 11:22:13 EDT 2003 droundy@abridgegame.org * add energy conservation example in cyl. M ./doc/Makefile.in -1 +6 M ./doc/dactyl.tex +2 A ./doc/energy_cons.tex M ./doc/energy_cons_1d.tex -3 +3 Tue Jul 8 10:55:22 EDT 2003 droundy@abridgegame.org * minor changes to example. M ./example.cpp -8 +7 Tue Jul 8 10:54:02 EDT 2003 droundy@abridgegame.org * interpolation fixes. M ./vec.cpp -3 +28 M ./vec.h -8 +1 Tue Jul 8 10:53:35 EDT 2003 droundy@abridgegame.org * slice improvements. M ./slices.cpp -3 +6 Tue Jul 8 10:52:52 EDT 2003 droundy@abridgegame.org * only update P_pml if f_pml exists. M ./polarization.cpp -7 +9 Tue Jul 8 10:51:47 EDT 2003 droundy@abridgegame.org * fix bugs in energy computation. M ./dactyl.cpp -1 +1 M ./energy_and_flux.cpp -3 +3 M ./polarization.cpp -1 +1 Tue Jul 8 10:50:23 EDT 2003 droundy@abridgegame.org * interpolate in point source. M ./dactyl.cpp -2 +10 Tue Jul 8 10:50:07 EDT 2003 droundy@abridgegame.org * typos in comments. M ./dactyl.cpp -2 +2 Tue Jul 8 10:47:38 EDT 2003 droundy@abridgegame.org * fix up examples. M ./dactyl.cpp -4 +67 M ./dactyl.h +4 M ./doc/Makefile.in -8 +6 M ./doc/dactyl.tex -1 +1 M ./doc/energy_cons_1d.tex -12 +16 R ./doc/epsilon_polariton.tex A ./doc/epsilon_polariton_1d.tex Thu Jul 3 15:16:58 EDT 2003 droundy@abridgegame.org * valgrind fix--initialize sigma fields. M ./polarization.cpp +2 Thu Jul 3 15:15:52 EDT 2003 droundy@abridgegame.org * fix interpolation bugs and use it in lossgain example. M ./doc/lossgain_epsilon.tex -6 +4 M ./monitor.cpp -1 +1 M ./vec.cpp -20 +103 Thu Jul 3 11:13:15 EDT 2003 droundy@abridgegame.org * buggy attempt at cylindrical interpolation. M ./monitor.cpp -45 M ./vec.cpp +41 M ./vec.h +4 Thu Jul 3 10:44:24 EDT 2003 droundy@abridgegame.org * add interface for nice interpolation. M ./monitor.cpp -2 +8 M ./vec.cpp -1 +31 M ./vec.h -1 +2 Thu Jul 3 10:14:50 EDT 2003 droundy@abridgegame.org * make monitor point output field that is closest... M ./monitor.cpp -1 +1 Thu Jul 3 10:14:05 EDT 2003 droundy@abridgegame.org * include pml boundary in eps file output. M ./slices.cpp -3 +36 Thu Jul 3 10:12:47 EDT 2003 droundy@abridgegame.org * add support for radial pml. M ./dactyl.cpp -8 +53 M ./dactyl.h +1 M ./material.cpp +46 Wed Jul 2 11:34:32 EDT 2003 droundy@abridgegame.org * mode initialization in cylindrical coords. M ./Makefile.in -1 +1 M ./dactyl.cpp -22 A ./initialize.cpp Wed Jul 2 10:30:40 EDT 2003 droundy@abridgegame.org * fixes to doc and bugfixes required by docs. M ./dactyl.cpp +9 M ./dactyl.h -5 +10 M ./dactyl_internals.h -1 +2 M ./doc/energy_cons_1d.tex -20 +20 M ./doc/lossgain_epsilon.tex -34 +29 M ./doc/omniguide.tex -5 +5 M ./doc/polaritonbands.tex -4 +4 M ./doc/simplebands.tex -2 +2 M ./energy_and_flux.cpp -2 +18 M ./polarization.cpp -4 +53 Wed Jul 2 08:23:27 EDT 2003 droundy@abridgegame.org * fix slice naming problem when a == 1. M ./slices.cpp -10 +4 Wed Jul 2 08:21:43 EDT 2003 droundy@abridgegame.org * spiff up example. M ./example.cpp -2 +15 Wed Jul 2 08:21:19 EDT 2003 droundy@abridgegame.org * fix m == 1, r == 0 bug. M ./dactyl.cpp -1 +1 Wed Jul 2 08:20:55 EDT 2003 droundy@abridgegame.org * add initialize_field method. M ./dactyl.cpp +8 M ./dactyl.h -1 +3 Wed Jul 2 08:20:40 EDT 2003 droundy@abridgegame.org * fix step_right bug. M ./dactyl.cpp -3 +3 Tue Jul 1 11:23:34 EDT 2003 droundy@abridgegame.org * add output_real_imaginary_slices without volume argument. M ./dactyl.h +1 M ./slices.cpp +4 Tue Jul 1 11:23:04 EDT 2003 droundy@abridgegame.org * add step_right method for debugging. M ./dactyl.cpp +69 M ./dactyl.h +3 Tue Jul 1 09:29:27 EDT 2003 droundy@abridgegame.org * oops forgot to add vec.h and vec.cpp... A ./vec.cpp A ./vec.h Tue Jul 1 09:27:36 EDT 2003 droundy@abridgegame.org * get rid of old unused 1d files. R ./bands_1d.cpp R ./material_1d.cpp R ./polarization_1d.cpp R ./slices_1d.cpp R ./tidod.cpp R ./tidod.h R ./tidod_internals.h Tue Jul 1 09:26:30 EDT 2003 droundy@abridgegame.org * get rid of obsolete tests. R ./d_eps_pml_m_1.cpp R ./d_k_0.1pi_pml_m_0.cpp R ./d_k_0.1pi_pml_m_1.cpp R ./d_k_0.1pi_pml_m_2.cpp R ./d_k_0_pml_m_2.cpp R ./d_metal_m_1.cpp R ./d_pml_m_0.cpp R ./d_pml_m_1.cpp R ./d_pml_m_2.cpp R ./d_rpml_m_1.cpp R ./d_zpml_m_1.cpp Tue Jul 1 09:25:15 EDT 2003 droundy@abridgegame.org * total rewrite to support multiple dimensions. M ./Makefile.in -4 +2 M ./bands.cpp -668 +52 M ./dactyl.cpp -1015 +444 M ./dactyl.h -97 +56 M ./dactyl_internals.h -18 +9 M ./energy_and_flux.cpp -289 +36 M ./example.cpp -58 +24 M ./material.cpp -226 +230 M ./monitor.cpp -62 +17 M ./output_directory.cpp -18 M ./polarization.cpp -284 +104 M ./slices.cpp -308 +266 M ./tidod.cpp -2 +2 Wed Jun 18 08:41:43 EDT 2003 droundy@abridgegame.org * various doc and poorly tested fixes. M ./Makefile.in +1 M ./bands.cpp +2 M ./dactyl.cpp +6 M ./doc/epsilon_polariton.tex -3 +3 M ./monitor.cpp +6 Tue Jun 3 09:32:41 EDT 2003 droundy@abridgegame.org * fix peaktime argument of source adding (was off by c). M ./dactyl.cpp -1 +1 M ./tidod.cpp -1 +1 Tue Jun 3 09:27:58 EDT 2003 droundy@abridgegame.org * make energy conserved in 1D. This fix adds code to keep track of energy lost (or gained) in polaritonic (or plasma, etc) materials in 1D, so energy conservation can be verified even in such materials. This is preliminary to implementing saturated gain, and should be ported to the cylindrical code. M ./doc/Makefile.in -1 +6 M ./doc/dactyl.tex +2 A ./doc/energy_cons_1d.tex M ./material_1d.cpp -1 +1 M ./polarization_1d.cpp -1 +43 M ./slices_1d.cpp +31 M ./tidod.cpp -3 +72 M ./tidod.h +7 M ./tidod_internals.h -1 +2 Mon May 12 09:32:35 EDT 2003 droundy@abridgegame.org * fix for when a peaktime is specified in add_source. M ./dactyl.cpp -2 +2 Mon May 12 09:30:39 EDT 2003 droundy@abridgegame.org * various 1d fixes. M ./Makefile.in -1 +2 M ./bands_1d.cpp -2 +2 M ./material_1d.cpp -2 +2 M ./polarization_1d.cpp -1 +3 A ./slices_1d.cpp M ./tidod.cpp -2 +2 Fri May 9 13:44:37 EDT 2003 droundy@abridgegame.org * add 1d code. M ./Makefile.in -1 +3 A ./bands_1d.cpp A ./material_1d.cpp A ./monitor_1d.cpp M ./output_directory.cpp +18 A ./polarization_1d.cpp A ./tidod.cpp A ./tidod.h A ./tidod_internals.h Fri May 9 09:02:13 EDT 2003 droundy@abridgegame.org * oops, example wasn't superluminal... ./doc/superluminal_epsilon.tex -> ./doc/lossgain_epsilon.tex M ./doc/Makefile.in r1 M ./doc/dactyl.tex r1 M ./doc/lossgain_epsilon.tex -6 +5 r1 Thu May 8 12:14:41 EDT 2003 droundy@abridgegame.org * make prepare_for_bands use float time; new bands algorithm. M ./bands.cpp -3 +247 M ./dactyl.h -1 +5 M ./doc/omniguide.tex -21 +7 M ./doc/polaritonbands.tex -2 +2 Thu May 1 08:07:56 EDT 2003 droundy@abridgegame.org * get rid of white background in omniguide example plot. M ./doc/Makefile.in +2 Thu May 1 07:53:12 EDT 2003 droundy@abridgegame.org * add superluminal example to docs. M ./doc/Makefile.in -2 +13 M ./doc/dactyl.tex +2 A ./doc/superluminal_epsilon.tex Tue Apr 29 10:06:43 EDT 2003 droundy@abridgegame.org * implement harminv on monitor point lists. M ./dactyl.h -4 +6 M ./monitor.cpp +27 Tue Apr 29 10:04:22 EDT 2003 droundy@abridgegame.org * Flip sign of freq_im so it is correct, when harminving. M ./bands.cpp -3 +3 Fri Apr 25 12:11:18 EDT 2003 droundy@abridgegame.org * fix bug when there is more than one polarizability. M ./polarization.cpp -1 +2 Thu Apr 24 09:14:42 EDT 2003 droundy@abridgegame.org * Fix problem introduced in pml reworking. M ./material.cpp -5 +10 Wed Apr 23 11:51:17 EDT 2003 droundy@abridgegame.org * crude attempt at optimizing pml. M ./dactyl.h -2 +3 M ./material.cpp -14 +99 Wed Apr 23 08:09:35 EDT 2003 droundy@abridgegame.org * remove debug printf. M ./slices.cpp -1 Wed Apr 23 07:47:44 EDT 2003 droundy@abridgegame.org * add continuous wave sources. M ./dactyl.cpp -9 +56 M ./dactyl.h -2 +10 M ./dactyl_internals.h -1 +1 Tue Apr 22 12:59:29 EDT 2003 michel@mit.edu * In output_slices, include epsilon output if new_ma is defined. M ./slices.cpp -1 +6 Tue Apr 22 14:19:19 EDT 2003 droundy@civet.berkeley.edu * resolve slice filename conflict. M ./slices.cpp -47 +2 Tue Apr 22 12:28:53 EDT 2003 michel@mit.edu * In output_slices, reduced code by using a time_step_string for a==1 M ./slices.cpp -18 +60 Fri Apr 18 07:00:25 EDT 2003 droundy@abridgegame.org * Fix timestamp units in slices. M ./slices.cpp -30 +30 Wed Apr 16 12:17:41 EDT 2003 michel@mit.edu * Allow for maxbands = 1 in fourier_transform M ./monitor.cpp -2 +3 Wed Apr 16 12:13:59 EDT 2003 michel@mit.edu * Fixed potentially infinite loop M ./dactyl.cpp -1 +1 Wed Apr 16 08:16:01 EDT 2003 michel@mit.edu * Use get_envelope_at_time in get_amplitude_at_time M ./dactyl.cpp -4 +3 Wed Apr 16 08:36:34 EDT 2003 droundy@abridgegame.org * Nicer energy units in epsilon_polariton. M ./doc/epsilon_polariton.tex -1 +1 Thu Apr 10 08:29:53 EDT 2003 droundy@abridgegame.org * Use normal distance units for use_pml--CHANGE YOUR CONTROL FILES!!! M ./bands.cpp r1 M ./dactyl.cpp r1 M ./dactyl.h +1 r1 M ./dactyl_internals.h r1 M ./doc/dactyl.tex r1 M ./doc/epsilon_polariton.tex -1 +2 r1 M ./doc/omniguide.tex r1 M ./doc/polaritonbands.tex r1 M ./doc/simplebands.tex r1 M ./example.cpp -1 +1 r1 M ./material.cpp +4 r1 M ./polarization.cpp r1 Thu Apr 10 07:55:11 EDT 2003 droundy@abridgegame.org * Simplify epsilon plotting by using the grace class. M ./doc/epsilon_polariton.tex -28 +8 Wed Apr 9 13:34:04 EDT 2003 droundy@abridgegame.org * Avoid an infinite loop in bands. M ./bands.cpp +3 Wed Apr 9 11:59:18 EDT 2003 droundy@abridgegame.org * Fix up polariton bands example, which was wrong. M ./doc/Makefile.in -7 +4 M ./doc/polaritonbands.tex -7 +10 M ./grace.cpp -1 +2 Wed Apr 9 11:57:13 EDT 2003 droundy@abridgegame.org * Be less verbose. M ./bands.cpp -2 +2 Wed Apr 9 10:19:32 EDT 2003 droundy@abridgegame.org * Omniguide update. M ./doc/omniguide.tex -10 +10 Wed Apr 9 10:19:04 EDT 2003 droundy@abridgegame.org * More bands tuning. M ./bands.cpp -4 +5 Mon Apr 7 12:07:36 EDT 2003 droundy@abridgegame.org * Don't make doc when testing. M ./Makefile.in -1 +1 M ./darcs_test -1 +1 Mon Apr 7 11:13:26 EDT 2003 droundy@abridgegame.org * Only include dactyl.h once... M ./dactyl.h +4 Mon Apr 7 10:41:12 EDT 2003 droundy@abridgegame.org * Grace counting fix. M ./grace.cpp -10 +10 Mon Apr 7 10:40:22 EDT 2003 droundy@abridgegame.org * Bands fixes and omniguide bands example. M ./bands.cpp -19 +22 M ./doc/Makefile.in -2 +8 M ./doc/dactyl.tex +2 A ./doc/omniguide.tex Fri Apr 4 11:36:17 EST 2003 droundy@abridgegame.org * Support more output directories. M ./output_directory.cpp -1 +1 Thu Apr 3 08:25:32 EST 2003 droundy@abridgegame.org * Don't throw out mostly unoccupied bands by default. M ./dactyl.h -1 +1 Thu Apr 3 08:24:08 EST 2003 droundy@abridgegame.org * Kludge to get initialize_with working again, sort of. M ./dactyl.cpp -30 +30 Thu Apr 3 08:23:12 EST 2003 droundy@abridgegame.org * Various bands tuneups. M ./bands.cpp -6 +32 Thu Apr 3 08:15:14 EST 2003 droundy@abridgegame.org * Fix bug in initialize when m > 0 (was missing the ground state!). M ./dactyl.cpp -1 +1 Thu Apr 3 07:58:24 EST 2003 droundy@abridgegame.org * Create a symlink pointing to latest output. M ./output_directory.cpp +9 Wed Apr 2 11:16:32 EST 2003 droundy@abridgegame.org * Possibly fixes to initialize_with functions. M ./dactyl.cpp -39 +43 Wed Apr 2 10:18:16 EST 2003 droundy@abridgegame.org * Spiff up a test. M ./Makefile.in +7 M ./d_k_0.1pi_pml_m_1.cpp -7 +6 Tue Apr 1 13:03:05 EST 2003 droundy@abridgegame.org * More bands tuning. M ./bands.cpp -7 +26 Tue Apr 1 13:00:42 EST 2003 droundy@abridgegame.org * Output approximate power when doing grace_bands. M ./bands.cpp -20 +5 Tue Apr 1 12:59:40 EST 2003 droundy@abridgegame.org * Make grace able to output one additional datum per point. M ./dactyl.h -2 +4 M ./grace.cpp -6 +12 Tue Apr 1 11:51:08 EST 2003 droundy@abridgegame.org * Resolve conflict in merge with find_last_source and prepare_for_bands. M ./bands.cpp -6 +2 Tue Apr 1 11:00:19 EST 2003 michel@mit.edu * Fix bug in energy calculation (revert h in pml after stepping) M ./dactyl.h +2 M ./energy_and_flux.cpp +41 Tue Apr 1 10:46:58 EST 2003 michel@mit.edu * Added fields::find_last_source() M ./bands.cpp -2 +11 M ./dactyl.h +1 Mon Mar 31 11:47:04 EST 2003 michel@mit.edu * Wrote energy_in_box(rmin, rmax, zmin, zmax) M ./dactyl.h -3 +4 M ./energy_and_flux.cpp -23 +45 Mon Mar 31 11:41:04 EST 2003 droundy@abridgegame.org * Throw out bands which have too little amplitude. M ./bands.cpp -1 +21 M ./dactyl.h -1 +2 M ./dactyl_internals.h -1 +1 Mon Mar 31 05:49:37 EST 2003 droundy@abridgegame.org * Assorted bands fixes. M ./bands.cpp -15 +52 M ./dactyl.cpp -2 +3 Fri Mar 28 10:17:30 EST 2003 michel@mit.edu * Changed energy and field units (now independent of a) M ./energy_and_flux.cpp -3 +4 Fri Mar 28 10:06:39 EST 2003 michel@mit.edu * Fixed units for time() M ./dactyl.h -4 +4 Thu Mar 27 09:39:43 EST 2003 bermel@mit.edu * Include rather than . M ./harminv.h -1 +1 Thu Mar 27 09:38:13 EST 2003 bermel@mit.edu * Get units of k in initialize_with right. (a 2pi) M ./dactyl.cpp -9 +9 Thu Mar 27 09:35:52 EST 2003 bermel@mit.edu * Output amplitude (actually "approx power") to output of bands. M ./bands.cpp -6 +12 M ./dactyl.h -1 +1 Tue Mar 25 08:24:21 EST 2003 michel@mit.edu * New flux planes and moved energy and flux to energy_and_flux.cpp M ./Makefile.in -1 +1 M ./bands.cpp -2 M ./dactyl.h +20 M ./dactyl_internals.h +15 A ./energy_and_flux.cpp M ./slices.cpp -93 Tue Mar 25 09:35:26 EST 2003 droundy@abridgegame.org * Add more verbosity. M ./bands.cpp -10 +20 Wed Mar 19 09:59:02 EST 2003 droundy@abridgegame.org * Make err matching requirement less strict at low freqs. M ./bands.cpp -1 +3 Wed Mar 19 09:58:35 EST 2003 droundy@abridgegame.org * Fixes in commented out printfs in bands calc. M ./bands.cpp -18 +18 Wed Mar 19 09:57:57 EST 2003 droundy@abridgegame.org * Reduce scale_factor for better results in bands calc. M ./bands.cpp -1 +1 Wed Mar 19 09:57:27 EST 2003 droundy@abridgegame.org * Ignore amplitude in matching freqs in bands calc. M ./bands.cpp -2 +2 Wed Mar 19 09:45:07 EST 2003 droundy@abridgegame.org * Get rid of old lowpass filter in bands calc. M ./bands.cpp -17 +2 Wed Mar 19 09:37:37 EST 2003 droundy@abridgegame.org * Add a verbosity flag which will make dactyl more talkative for debugging purposes. M ./bands.cpp -14 +19 M ./dactyl.cpp +1 M ./dactyl.h +2 M ./dactyl_internals.h +1 Tue Mar 18 09:04:40 EST 2003 droundy@abridgegame.org * Allow user to set range in a grace plot. M ./dactyl.h +1 M ./grace.cpp -3 +15 Wed Mar 12 13:54:44 EST 2003 michel@mit.edu * set sigma_phi to zero again M ./material.cpp -1 +1 Mon Mar 17 13:03:42 EST 2003 droundy@abridgegame.org * Add class for outputting to a grace plot. M ./Makefile.in -1 +1 M ./bands.cpp +12 M ./dactyl.h +23 A ./grace.cpp Mon Mar 17 09:26:38 EST 2003 droundy@abridgegame.org * Fix units of k. M ./dactyl.cpp -2 +2 Mon Mar 17 06:29:37 EST 2003 droundy@abridgegame.org * Add epsilon calculation example. M ./doc/Makefile.in -2 +9 M ./doc/dactyl.tex +2 A ./doc/epsilon_polariton.tex Fri Mar 14 12:27:17 EST 2003 droundy@abridgegame.org * Fix eps file orientation produced by plot. M ./doc/Makefile.in -1 +1 M ./doc/polaritonbands.tex -1 +1 M ./plot.hs -1 +1 Wed Mar 12 12:51:14 EST 2003 michel@mit.edu * improved make_output_directory M ./dactyl.h -1 +1 M ./example.cpp -1 M ./output_directory.cpp -9 +22 Wed Mar 12 13:41:29 EST 2003 droundy@abridgegame.org * Various polariton fixes--still untested in PML. M ./polarization.cpp -17 +72 Wed Mar 12 13:38:39 EST 2003 droundy@abridgegame.org * Add fancy new interrupt handling, and fix up polariton example. M ./Makefile.in -1 +1 A ./control_c.cpp M ./dactyl.h +7 M ./doc/polaritonbands.tex -33 +11 M ./example.cpp -11 +5 Wed Mar 12 13:32:28 EST 2003 droundy@abridgegame.org * Get fmin right when there is an epsilon. M ./bands.cpp -2 +2 Wed Mar 12 11:48:52 EST 2003 droundy@abridgegame.org * Check for phonon bands, just in case... M ./bands.cpp +15 M ./dactyl_internals.h +4 Wed Mar 12 10:49:19 EST 2003 droundy@abridgegame.org * Another chapter to the manual (incomplete, of course). M ./doc/dactyl.tex -2 +39 Wed Mar 12 10:45:39 EST 2003 droundy@abridgegame.org * Break out the guts of get_freqs into a separate method. M ./bands.cpp -123 +125 M ./dactyl_internals.h +5 Wed Mar 12 10:41:43 EST 2003 droundy@abridgegame.org * Define a handy time method to get the actual floating point time of the simulation. M ./dactyl.h +1 Wed Mar 12 10:37:51 EST 2003 droundy@abridgegame.org * Fix plane wave source to work better with eps != 1. M ./dactyl.cpp -10 +12 Wed Mar 12 10:34:53 EST 2003 droundy@abridgegame.org * Fix band structure frequency units. M ./bands.cpp -6 +11 Wed Mar 12 10:33:05 EST 2003 droundy@abridgegame.org * Don't use libtool any more. M ./Makefile.in -1 +2 Wed Mar 12 07:35:36 EST 2003 droundy@abridgegame.org * Fix PML derivatives to be self-consistent (hopefully also fixing sigma_phi instability). M ./dactyl.cpp -66 +77 Tue Mar 11 12:50:52 EST 2003 michel@mit.edu * Made all eps arrays of size (nr+1)*(nz+1) M ./material.cpp -10 +10 Tue Mar 11 12:50:04 EST 2003 michel@mit.edu * Fixed frequency units bug in do_harminv M ./bands.cpp -1 +1 Tue Mar 11 12:49:40 EST 2003 droundy@abridgegame.org * Don't crash on initialize_polarizations with no polarization. M ./polarization.cpp -1 +1 Tue Mar 11 10:54:49 EST 2003 droundy@abridgegame.org * Turn back on sigma_phi (in the PML, that is). M ./material.cpp -5 Mon Mar 10 12:14:27 EST 2003 droundy@abridgegame.org * Output slices of polarizations. M ./slices.cpp -1 +17 Mon Mar 10 12:14:05 EST 2003 droundy@abridgegame.org * Update diff_slice to new number of digits in time. M ./diff_slice.cpp -2 +2 Mon Mar 10 12:06:50 EST 2003 droundy@abridgegame.org * Don't allow bad sources at small r. M ./dactyl.cpp +10 Mon Mar 10 08:45:58 EST 2003 droundy@abridgegame.org * Get rid of extraneous memory allocation check. M ./dactyl.cpp -4 Mon Mar 10 08:37:10 EST 2003 droundy@abridgegame.org * Remove extraneous commented out code. M ./polarization.cpp -2 Mon Mar 10 08:31:39 EST 2003 droundy@abridgegame.org * Make polaritons work (maybe) in PML. M ./dactyl.cpp +2 M ./dactyl.h +2 M ./dactyl_internals.h -3 +7 M ./doc/dactyl.tex +52 M ./material.cpp +1 M ./polarization.cpp -28 +147 Mon Mar 10 08:21:25 EST 2003 droundy@abridgegame.org * Move rmin_bulk to dactyl_internal.h M ./dactyl.cpp -10 M ./dactyl_internals.h +10 Mon Mar 10 08:08:26 EST 2003 droundy@abridgegame.org * Makefile fix for doc. M ./Makefile.in -1 +3 M ./doc/Makefile.in -1 +1 Fri Mar 7 11:28:35 EST 2003 droundy@abridgegame.org * Make all field arrays the same size. M ./dactyl.cpp -6 +6 M ./slices.cpp -6 +6 Fri Mar 7 08:32:00 EST 2003 michel@mit.edu * More exact energy calculation M ./dactyl.cpp -12 +18 M ./dactyl.h +3 M ./slices.cpp -1 +49 Fri Mar 7 06:46:17 EST 2003 droundy@abridgegame.org * Get rid of stupid NaN test in polariton propogation. M ./polarization.cpp -4 +1 Fri Mar 7 06:43:26 EST 2003 droundy@abridgegame.org * Add polariton bands section to manual and tests. M ./doc/Makefile.in -3 +10 M ./doc/dactyl.tex +2 A ./doc/polaritonbands.tex Fri Mar 7 06:22:51 EST 2003 droundy@abridgegame.org * Fix polarization propogation bug. M ./polarization.cpp -7 +7 Fri Mar 7 06:20:51 EST 2003 droundy@abridgegame.org * Fix calculation of start time for bandstruc to deal with t not starting at zero, and also with large qmin. M ./bands.cpp -3 +4 Fri Mar 7 06:14:49 EST 2003 droundy@abridgegame.org * Improve phasein of epsilon so charge should be conserved. M ./dactyl.cpp +53 Thu Mar 6 09:59:57 EST 2003 droundy@abridgegame.org * Add new test suite (almost empty) and documentation. M ./Makefile.in -13 +4 M ./configure.in -1 +1 A ./darcs_test A ./doc/Makefile.in M ./doc/dactyl.tex +5 A ./doc/preproc.hs A ./doc/simplebands.tex Thu Mar 6 08:56:43 EST 2003 michel@mit.edu * Use plain frequency units for Re and Im parts of freq M ./bands.cpp -73 +40 M ./dactyl.h -2 +4 Thu Mar 6 09:28:26 EST 2003 droundy@abridgegame.org * Do fourier transform over limited range with monitor points. M ./monitor.cpp -5 +16 Thu Mar 6 09:27:45 EST 2003 droundy@abridgegame.org * Fix up the planewave when eps != 1. M ./dactyl.cpp -1 +1 Wed Mar 5 11:32:10 EST 2003 michel@mit.edu * Made phase_in_material easier to use, changed time units M ./dactyl.cpp -4 +9 M ./dactyl.h -1 +2 Wed Mar 5 11:31:24 EST 2003 michel * Added fields::do_harminv M ./bands.cpp -1 +61 M ./dactyl.h +2 Wed Mar 5 11:30:24 EST 2003 droundy@abridgegame.org * fourier transform a monitor point list. M ./Makefile.in -1 +1 M ./dactyl.h +21 M ./monitor.cpp +53 Wed Mar 5 11:24:59 EST 2003 droundy@abridgegame.org * Fix time in monitor point stuff. M ./monitor.cpp -1 +1 Wed Mar 5 07:36:07 EST 2003 droundy@abridgegame.org * New monitor point code. M ./Makefile.in -1 +1 M ./dactyl.h +23 A ./monitor.cpp M ./slices.cpp -17 Tue Mar 4 12:36:40 EST 2003 droundy@abridgegame.org * Clean up normal sources. M ./dactyl.cpp -36 +18 Tue Mar 4 12:36:23 EST 2003 droundy@abridgegame.org * Create a plane wave source. M ./dactyl.cpp -1 +33 M ./dactyl.h +3 Tue Mar 4 08:08:10 EST 2003 droundy@abridgegame.org * Get rid of static polarization resulting from short source pulses. M ./dactyl.cpp -15 +57 M ./dactyl_internals.h -1 +3 Tue Mar 4 07:42:18 EST 2003 droundy@abridgegame.org * Make name argument to slice functions optional. M ./dactyl.h -3 +3 Tue Mar 4 07:19:20 EST 2003 droundy@abridgegame.org * Eliminate spurious error message in polarization code. M ./polarization.cpp -1 +1 Mon Mar 3 12:57:27 EST 2003 droundy@abridgegame.org * Make sources complex. M ./dactyl.cpp -107 +77 M ./dactyl.h -9 +11 M ./dactyl_internals.h -1 +1 M ./example.cpp -1 +1 Mon Mar 3 11:46:04 EST 2003 michel@mit.edu * Source z location is double (units of a). M ./dactyl.cpp -18 +145 M ./dactyl.h -7 +8 Mon Mar 3 11:39:11 EST 2003 michel@mit.edu * Check enough space for PML M ./material.cpp +9 Mon Mar 3 10:24:00 EST 2003 droundy@abridgegame.org * Implement polarizations (polaritons actually work now) ! M ./dactyl.cpp +4 M ./dactyl.h -1 +7 M ./dactyl_internals.h -1 +3 M ./material.cpp +12 M ./polarization.cpp -7 +110 Mon Mar 3 10:23:28 EST 2003 droundy@abridgegame.org * Fix memory leaks and a memory error. M ./dactyl.cpp +3 Mon Mar 3 10:20:57 EST 2003 droundy@abridgegame.org * Reimplement the get_band method. M ./bands.cpp -35 +58 M ./dactyl.h -1 +3 M ./dactyl_internals.h -3 +1 Mon Mar 3 10:19:07 EST 2003 droundy@abridgegame.org * Tune scale_factor. M ./bands.cpp -1 +1 Fri Feb 28 14:19:09 EST 2003 droundy@abridgegame.org * Fix bug setting up TE modes with nonzero k. M ./dactyl.cpp -4 +4 Fri Feb 28 10:28:53 EST 2003 michel@mit.edu * Get rid of Big sig comments and fix PML bug M ./material.cpp -3 +1 Fri Feb 28 10:33:26 EST 2003 droundy@abridgegame.org * Preparatory work towards supporting frequency-dependent polarizations (plus reorganizations). M ./Makefile.in -1 +1 M ./bands.cpp -54 +55 M ./dactyl.cpp -2 +4 M ./dactyl.h -35 +10 M ./dactyl_internals.h +50 M ./material.cpp -2 +3 A ./polarization.cpp M ./slices.cpp -9 Fri Feb 28 06:13:02 EST 2003 droundy@abridgegame.org * Fix bug in units specifying epsilon in z direction. M ./material.cpp -1 +1 Thu Feb 27 08:30:17 EST 2003 droundy@abridgegame.org * Get rid of some annoying printfs. M ./dactyl.cpp -2 Thu Feb 27 08:20:04 EST 2003 droundy@abridgegame.org * Add a makefile target for html manual. M ./Makefile.in +3 Thu Feb 27 08:14:29 EST 2003 droundy@abridgegame.org * Fix misspelling in title... M ./doc/dactyl.tex -1 +1 Thu Feb 27 08:13:35 EST 2003 droundy@abridgegame.org * Change title and authors of manual. M ./doc/dactyl.tex -2 +2 Thu Feb 27 08:10:39 EST 2003 droundy@abridgegame.org * Fix phase shift due to freq in initialized modes. M ./dactyl.cpp -2 +2 Thu Feb 27 08:10:18 EST 2003 droundy@abridgegame.org * Fix indexing problem for TE modes. M ./dactyl.cpp -2 +2 Thu Feb 27 07:57:27 EST 2003 droundy@abridgegame.org * Replace make_vacuum with make_mean_eps. M ./dactyl.h -1 +1 M ./material.cpp -5 +10 Thu Feb 27 07:57:02 EST 2003 droundy@abridgegame.org * Fix bugs in TM initialization. M ./dactyl.cpp -8 +6 Thu Feb 27 06:50:55 EST 2003 droundy@abridgegame.org * Nicer formatting of some code. M ./dactyl.cpp -6 +6 Thu Feb 27 06:50:14 EST 2003 droundy@abridgegame.org * Remove old commented out code. M ./dactyl.cpp -13 Thu Feb 27 06:49:01 EST 2003 droundy@abridgegame.org * Fix initializing of TM and TE states. M ./dactyl.cpp -28 +44 Wed Feb 26 13:12:10 EST 2003 droundy@abridgegame.org * Partial fixes in field initialization. M ./dactyl.cpp -44 +55 Wed Feb 26 13:11:21 EST 2003 droundy@abridgegame.org * Mix inverse of eps, not eps itself. M ./material.cpp -1 +1 Wed Feb 26 13:10:40 EST 2003 droundy@abridgegame.org * Fix up routine to find maximum in Jm. M ./dactyl.cpp -2 +3 Wed Feb 26 13:09:53 EST 2003 droundy@abridgegame.org * Move definition of pi into darcs_internal.h. M ./bands.cpp -2 M ./dactyl_internals.h +3 Wed Feb 26 10:46:51 EST 2003 droundy@abridgegame.org * Add new dactyl_internals.h file. A ./dactyl_internals.h Wed Feb 26 10:45:41 EST 2003 droundy@abridgegame.org * Fix up phasing in of epsilon. M ./dactyl.cpp -58 +65 M ./dactyl.h +2 Wed Feb 26 10:44:34 EST 2003 droundy@abridgegame.org * Increase number of digits in slice file times. M ./slices.cpp -26 +26 Wed Feb 26 08:41:15 EST 2003 droundy@abridgegame.org * Create a method to put vacuum in a mat structure. M ./dactyl.h +1 M ./material.cpp +9 Wed Feb 26 08:31:14 EST 2003 droundy@abridgegame.org * I forgot to add the materials file... A ./material.cpp Wed Feb 26 08:28:57 EST 2003 droundy@abridgegame.org * Move slice code (and rest of output) to a separate file. M ./Makefile.in -1 +2 M ./dactyl.cpp -472 A ./slices.cpp Wed Feb 26 08:24:18 EST 2003 droundy@abridgegame.org * Support phasing from one material to another adiabatically. M ./Makefile.in -2 +2 M ./bands.cpp +3 M ./dactyl.cpp -167 +117 M ./dactyl.h -4 +12 Wed Feb 26 06:39:46 EST 2003 droundy@abridgegame.org * Split out macros into a common header file. M ./Makefile.in -1 +2 M ./bands.cpp -13 +2 M ./dactyl.cpp -25 +1 Wed Feb 26 06:36:11 EST 2003 droundy@abridgegame.org * Change copyright to MIT (as it should be). M ./bands.cpp -1 +1 M ./d_eps_pml_m_1.cpp -1 +1 M ./d_k_0.1pi_pml_m_0.cpp -1 +1 M ./d_k_0.1pi_pml_m_1.cpp -1 +1 M ./d_k_0.1pi_pml_m_2.cpp -1 +1 M ./d_k_0_pml_m_2.cpp -1 +1 M ./d_metal_m_1.cpp -1 +1 M ./d_pml_m_0.cpp -1 +1 M ./d_pml_m_1.cpp -1 +1 M ./d_pml_m_2.cpp -1 +1 M ./d_rpml_m_1.cpp -1 +1 M ./d_zpml_m_1.cpp -1 +1 M ./dactyl.cpp -1 +1 M ./dactyl.h -1 +1 M ./diff_slice.cpp -1 +1 M ./example.cpp -1 +1 M ./output_directory.cpp -1 +1 Wed Feb 26 05:52:05 EST 2003 droundy@civet.berkeley.edu * Add a script to call autoconf, etc. A ./autogen.sh Mon Feb 24 13:35:17 EST 2003 droundy@abridgegame.org * Tune example band structure parameters. M ./example.cpp -3 +3 Mon Feb 24 13:34:58 EST 2003 droundy@abridgegame.org * Improve commented out debug statements. M ./bands.cpp -5 +5 Mon Feb 24 13:34:08 EST 2003 droundy@abridgegame.org * Make bands calculation yet more stable... M ./bands.cpp -1 +2 Mon Feb 24 11:45:59 EST 2003 droundy@abridgegame.org * Fix colors in band structure plot. M ./plot.hs -2 +2 Mon Feb 24 11:45:19 EST 2003 droundy@abridgegame.org * Patch to make bands calculation more robust to uncertainty in decay time. M ./bands.cpp -1 +1 Mon Feb 24 10:25:14 EST 2003 droundy@abridgegame.org * Don't record monitor point in bands file, that makes the file too big. M ./example.cpp -1 +1 Mon Feb 24 10:22:04 EST 2003 droundy@abridgegame.org * Look at larger k values, which are more interesting. M ./example.cpp -1 +1 Mon Feb 24 10:21:04 EST 2003 droundy@abridgegame.org * Create new interface for files in output dir. M ./dactyl.h +1 M ./example.cpp -14 +6 M ./output_directory.cpp +12 Mon Feb 24 10:18:54 EST 2003 droundy@abridgegame.org * Remove unused code in bands.cpp. M ./bands.cpp -17 Mon Feb 24 10:18:14 EST 2003 droundy@abridgegame.org * Don't bother initializing band data to zero. M ./bands.cpp -18 Mon Feb 24 10:17:43 EST 2003 droundy@abridgegame.org * Fix memory leak in bs computation. M ./bands.cpp +2 Mon Feb 24 10:14:09 EST 2003 droundy@abridgegame.org * Major revision of plot.hs. M ./plot.hs -386 +56 Mon Feb 24 06:50:13 EST 2003 droundy@abridgegame.org * Untested patch to deal with "example.dac" named executables properly. M ./output_directory.cpp -3 +8 Mon Feb 24 06:31:21 EST 2003 droundy@abridgegame.org * If source file doesn't exist in existing out dir, use that dir. M ./output_directory.cpp +4 Mon Feb 24 06:30:47 EST 2003 droundy@abridgegame.org * Spruce up output of example program. M ./example.cpp -2 +4 Mon Feb 24 06:29:12 EST 2003 droundy@abridgegame.org * Make band structure calculation not always calculate modes. M ./bands.cpp -7 +17 M ./dactyl.h +2 Mon Feb 24 06:19:41 EST 2003 droundy@abridgegame.org * Add output directory stuff into dactyl itself. M ./Makefile.in -1 +1 M ./dactyl.cpp -29 +40 M ./dactyl.h +10 M ./example.cpp -59 +18 A ./output_directory.cpp Mon Feb 24 05:18:34 EST 2003 droundy@abridgegame.org * Get rid of some potential buffer overflows. M ./dactyl.cpp -32 +35 Mon Feb 24 05:09:14 EST 2003 droundy@abridgegame.org * Make modes plot have bigger X's than other shape symbols. M ./modes.hs -1 +1 Fri Feb 21 13:12:58 EST 2003 droundy@civet.berkeley.edu * Resolve conflict with eps shift patch. M ./dactyl.cpp -4 Fri Feb 21 11:49:09 EST 2003 bermel@mit.edu * Simple fix for bug setting speed of light to inappropriate value M ./example.cpp -2 +2 Fri Feb 21 10:46:34 EST 2003 bermel@mit.edu * Fix to example which creates directory and copies source into it M ./example.cpp -3 +12 Fri Feb 21 10:29:38 EST 2003 bermel@mit.edu * Create target directory + copy source file M ./dactyl.cpp -1 +5 M ./example.cpp -1 +34 Fri Feb 21 10:50:29 EST 2003 bermel@mit.edu * Simple fix for crash when flux planes aren't used M ./dactyl.cpp -1 +2 Fri Feb 21 13:01:10 EST 2003 droundy@abridgegame.org * Yet another test. A ./d_eps_pml_m_1.cpp Fri Feb 21 12:45:30 EST 2003 droundy@abridgegame.org * Fix pml in non-one epsilon. M ./dactyl.cpp -32 +20 Fri Feb 21 12:45:05 EST 2003 droundy@abridgegame.org * Fix shift in epsilon definition. M ./dactyl.cpp -1 +1 Fri Feb 21 11:55:24 EST 2003 droundy@abridgegame.org * Yet more tests with Mihai. A ./d_k_0.1pi_pml_m_0.cpp A ./d_k_0.1pi_pml_m_1.cpp A ./d_k_0.1pi_pml_m_2.cpp A ./d_k_0_pml_m_2.cpp Fri Feb 21 11:48:58 EST 2003 droundy@abridgegame.org * Fix bug in diff_slice. M ./diff_slice.cpp -1 +1 Fri Feb 21 11:34:20 EST 2003 droundy@abridgegame.org * Fix bugs in m > 1. M ./dactyl.cpp -3 +6 Fri Feb 21 11:34:01 EST 2003 droundy@abridgegame.org * Two more tests. A ./d_pml_m_0.cpp A ./d_pml_m_2.cpp Fri Feb 21 11:09:46 EST 2003 droundy@abridgegame.org * Add test for both kinds of pml. A ./d_pml_m_1.cpp Fri Feb 21 11:08:29 EST 2003 droundy@abridgegame.org * Change naming scheme for real and imaginary slices. M ./dactyl.cpp -14 +14 M ./diff_slice.cpp -26 +26 Fri Feb 21 11:07:52 EST 2003 droundy@abridgegame.org * Fix bugs with radial and axial pml. M ./dactyl.cpp -4 +4 Fri Feb 21 10:42:28 EST 2003 droundy@abridgegame.org * Checked and fixed bugs in zpml! A ./d_zpml_m_1.cpp M ./dactyl.cpp -12 +11 Fri Feb 21 09:38:01 EST 2003 droundy@abridgegame.org * Allow user to specify a real (not complex) source. M ./dactyl.cpp -1 +13 M ./dactyl.h +3 M ./example.cpp +1 Fri Feb 21 09:36:26 EST 2003 droundy@abridgegame.org * Snapshot of somewhat working bandstructure code. M ./bands.cpp -69 +156 Thu Feb 20 08:11:01 EST 2003 droundy@abridgegame.org * Change example to a fancy band structure example. M ./example.cpp -16 +29 Thu Feb 20 08:08:52 EST 2003 droundy@abridgegame.org * Get rid of some printfs in the band structure calc. M ./bands.cpp -16 +15 Thu Feb 20 08:08:24 EST 2003 droundy@abridgegame.org * Eliminate useless line of code. M ./bands.cpp -2 +1 Thu Feb 20 08:06:34 EST 2003 droundy@abridgegame.org * Make example deal with control-C nicely. M ./example.cpp -5 +12 Thu Feb 20 08:05:22 EST 2003 droundy@abridgegame.org * Make monitor point output nicely formatted. M ./dactyl.cpp -8 +13 Thu Feb 20 08:03:07 EST 2003 droundy@abridgegame.org * Add H sources. M ./bands.cpp -3 +7 M ./dactyl.cpp -28 +70 M ./dactyl.h -2 +9 Sat Feb 15 13:28:55 EST 2003 bermel@mit.edu * Minor source initialization fixes M ./dactyl.cpp -2 +1 Sat Feb 15 08:05:31 EST 2003 bermel@mit.edu * small but crucial fix to rmin_bulk M ./dactyl.cpp -1 +2 Fri Feb 14 10:20:29 EST 2003 droundy@abridgegame.org * Redefine d_rpml_m_1.cpp to synchronize with Mihai's test case. M ./d_rpml_m_1.cpp -5 +8 Fri Feb 14 10:17:14 EST 2003 droundy@civet.berkeley.edu * Set sigma_phi to zero for now, to get rid of blowup. M ./dactyl.cpp -3 +8 Fri Feb 14 10:16:36 EST 2003 droundy@civet.berkeley.edu * Redefine rmin_bulk to agree with Mihai's terminology. M ./dactyl.cpp -2 +6 Fri Feb 14 05:27:45 EST 2003 bermel@mit.edu * Declare rflux in dactyl.h. M ./dactyl.h +1 Thu Feb 13 09:52:15 EST 2003 * Flux patches M ./dactyl.cpp -10 +103 M ./dactyl.h -2 +4 M ./example.cpp -2 +2 Wed Feb 12 07:15:20 EST 2003 droundy@civet.berkeley.edu * Remove dependency on valgrind. M ./bands.cpp -2 Thu Feb 13 09:16:28 EST 2003 droundy@civet.berkeley.edu * Fix bug in documentation of PML. M ./doc/dactyl.tex -12 +12 Thu Feb 13 09:15:52 EST 2003 droundy@civet.berkeley.edu * Fix epsilon vs inverse epsilon bug. M ./dactyl.cpp -3 +3 Thu Feb 13 08:58:47 EST 2003 droundy@civet.berkeley.edu * PML bugfixes. M ./dactyl.cpp -59 +76 Thu Feb 13 07:22:32 EST 2003 droundy@civet.berkeley.edu * Add documentation. M ./Makefile.in -1 +9 A ./doc/ A ./doc/Yee_bulk.eps A ./doc/dactyl.tex A ./doc/gpl.tex Wed Feb 12 07:50:27 EST 2003 droundy@civet.berkeley.edu * Check if source is inside cell before adding. M ./dactyl.cpp +5 Wed Feb 12 07:11:52 EST 2003 droundy@civet.berkeley.edu * Add check.h... A ./check.h Wed Feb 12 07:09:56 EST 2003 droundy@civet.berkeley.edu * Add install-sh. A ./install-sh Wed Feb 12 06:27:30 EST 2003 droundy@civet.berkeley.edu * Initial version--0.2 A ./COPYING A ./COPYRIGHT A ./Makefile.in A ./bands.cpp A ./config.h.in A ./configure.in A ./copyright.h A ./d_metal_m_1.cpp A ./d_rpml_m_1.cpp A ./dactyl.cpp A ./dactyl.h A ./diff_slice.cpp A ./example.cpp A ./harminv.cpp A ./harminv.h A ./modes.hs A ./plot.hs meep-openmpi-1.1.1/COPYRIGHT0000644000175200017520000000142211173421137014631 0ustar debiandebian/* Copyright (C) 2005-2009 Massachusetts Institute of Technology. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ meep-openmpi-1.1.1/README0000644000175200017520000000122711173421136014220 0ustar debiandebianMeep (or MEEP) is a free finite-difference time-domain (FDTD) simulation software package developed at MIT to model electromagnetic systems. You can download Meep and learn more about it at the Meep home page: http://ab-initio.mit.edu/meep/ The Meep home page also links to a meep-discuss mailing list for discussions about Meep and FDTD simulations, and a meep-announce mailing list for announcements of Meep releases. "MEEP" stands for: MIT Electromagnetic Equation Propagation or (add your own below): Maxwell's Equations for Every Person MEEP Excites Engineers and Physicists Maybe Electromagnetism Eventually Pays? Many Eggheads Earn Prestige