From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Partha Saha Newsgroups: gmane.lisp.guile.bugs Subject: bug#23553: Error in running some loop in set! geometry Date: Fri, 13 May 2016 10:34:28 +0000 (UTC) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1463422350 26317 80.91.229.3 (16 May 2016 18:12:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 May 2016 18:12:30 +0000 (UTC) To: 23553@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon May 16 20:12:18 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b2N04-0008N6-Nt for guile-bugs@m.gmane.org; Mon, 16 May 2016 20:12:17 +0200 Original-Received: from localhost ([::1]:45960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2N04-0005j8-2Z for guile-bugs@m.gmane.org; Mon, 16 May 2016 14:12:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Myy-0003Na-8W for bug-guile@gnu.org; Mon, 16 May 2016 14:11:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2Mys-0002uu-SM for bug-guile@gnu.org; Mon, 16 May 2016 14:11:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Mys-0002uk-9l for bug-guile@gnu.org; Mon, 16 May 2016 14:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b2Mys-0003Ap-1H for bug-guile@gnu.org; Mon, 16 May 2016 14:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Partha Saha Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 16 May 2016 18:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23553 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146342225012180 (code B ref -1); Mon, 16 May 2016 18:11:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 May 2016 18:10:50 +0000 Original-Received: from localhost ([127.0.0.1]:54217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2Myg-0003AN-0E for submit@debbugs.gnu.org; Mon, 16 May 2016 14:10:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2MYA-0007cd-V8 for submit@debbugs.gnu.org; Mon, 16 May 2016 13:43:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MY4-0004Kw-Jb for submit@debbugs.gnu.org; Mon, 16 May 2016 13:43:21 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MY4-0004Kn-7y for submit@debbugs.gnu.org; Mon, 16 May 2016 13:43:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MY2-0005F9-Ke for bug-guile@gnu.org; Mon, 16 May 2016 13:43:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MXy-0004Gl-IN for bug-guile@gnu.org; Mon, 16 May 2016 13:43:17 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:36072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MXy-0004Fl-B0 for bug-guile@gnu.org; Mon, 16 May 2016 13:43:14 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b1AfW-0000mv-HF for bug-guile@gnu.org; Fri, 13 May 2016 12:50:06 +0200 Original-Received: from 125.20.9.230 ([125.20.9.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2016 12:50:06 +0200 Original-Received: from psaha089 by 125.20.9.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2016 12:50:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 133 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 125.20.9.230 (Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Mon, 16 May 2016 14:10:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8016 Archived-At: Dear Prof. Steve and all the meep users I am new to meep and Scheme coding and I think I have a problem making a loop in Scheme but I don't know what I have done wrong. I am trying to make a 1D slotted nanobeam slab but finding some error in running the loop. My ctl file is as follows: ; Some parameters to describe the geometry: (define-param eps 12) ; dielectric constant of waveguide (define-param w 1.1627906977) ; width of waveguide (define-param r_center 0.4203935599) ; radius of holes at the center (define-param r_end 0.3631484794) ; radius of holes at the end (define-param h 0.3935599284) ; height of slab (define-param w_slot 0.0894454383) ; width of slot ;(define-param d 1.4) ; defect spacing (ordinary spacing = 1) but in my case no defect hence disabled (define-param N 30) ; number of holes on either side of defect (define-param i-max 20) ; number of holes on either side of tapered region (define-param di 1); change in i (define-param dmirr 1); change in mirr (define-param mirr-max 10) ; number of holes on either side of mirror holes region ; The cell dimensions (define-param sy 6) ; size of cell in y direction (perpendicular to wvg.) (define-param sz 3) ; size of cell in z 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))) ; size of cell in x direction (set! geometry-lattice (make lattice (size sx sy sz))) (set! geometry (append geometry; combine lists of objects (list (make block (center 0 0 0) (size infinity w h) (material (make dielectric (epsilon eps)))) (make block (center 0 0 0) (size (+ (* 2 N) 2) w_slot infinity) (material air)) ; air slot in the waveguide (do ((i 1 (+ i di))) ((>= i i-max)) (make cylinder (center (+ 0.5 (* (+ i -1) 1)) 0 0) (radius (+ r_center (/ (* (* (+ i -1) (+ i -1)) (- r_end r_center)) (* (+ i-max -1) (+ i-max -1))))) (height infinity) (material air))) (do ((i 1 (+ i di))) ((>= i i-max)) (make cylinder (center (+ -0.5 (* (+ i -1) -1)) 0 0) (radius (+ r_center (/ (* (* (+ i -1) (+ i -1)) (- r_end r_center)) (* (+ i-max -1) (+ i-max -1))))) (height infinity) (material air))) (do ((mirr 1 (+ mirr dmirr))) ((>= mirr mirr-max)) (make cylinder (center (+ i-max mirr -0.5) 0 0) (radius r_end) (height infinity) (material air))) (do ((mirr 1 (+ mirr dmirr))) ((>= mirr mirr-max)) (make cylinder (center (- 0.5 i-max mirr) 0 0) (radius r_end) (height infinity) (material air))) );end of list );end of append );end of geometry (set! pml-layers (list (make pml (thickness dpml)))) (set-param! resolution 20) (define-param fcen 0.3653594) ; pulse center frequency (define-param df 0.2) ; pulse width (in frequency) (define-param nfreq 500) ; number of frequencies at which to compute flux (set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ey) (center (+ dpml (* -0.5 sx)) 0 0) (size 0 w 0)))) (set! symmetries (list (make mirror-sym (direction Y) (phase -1)))) (run-sources+ 300 (at-beginning output-epsilon) (after-sources (harminv Ez (vector3 (+ N 0.2) 0 0) fcen df))) The error message is ERROR: In procedure cdr: ERROR: In procedure cdr: Wrong type (expecting pair): # The full error is Backtrace: In ice-9/boot-9.scm: 157: 11 [catch #t # ...] In unknown file: ?: 10 [apply-smob/1 #] In ice-9/eval.scm: 432: 9 [eval # #] 432: 8 [eval # #] In unknown file: ?: 7 [primitive-load "nanobeam_edited_with_do_loop.ctl"] In ice-9/eval.scm: 387: 6 [eval # ()] 432: 5 [eval # #] 432: 4 [eval # #] 467: 3 [eval # #] In unknown file: ?: 2 [make-structure 3 #(66.0 6.0 3.0) #(0.0 0.0 0.0) 20 #t 1.0e-4 100000 #f ...] In ice-9/eval.scm: 387: 1 [eval # #] In unknown file: ?: 0 [cdr #] ERROR: In procedure cdr: ERROR: In procedure cdr: Wrong type (expecting pair): # Can anyone help me in finding the error?