From unknown Mon Aug 11 19:04:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23553: Error in running some loop in set! geometry 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: To: 23553@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.146342225012180 (code B ref -1); Mon, 16 May 2016 18:11:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 May 2016 18:10:50 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.5 required=5.0 tests=BAYES_50,FREEMAIL_FROM, FSL_HELO_BARE_IP_2,RCVD_NUMERIC_HELO autolearn=disabled version=3.3.2 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 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 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 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 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 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 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/ From: Partha Saha Date: Fri, 13 May 2016 10:34:28 +0000 (UTC) Lines: 133 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -1.5 (-) 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) 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? From unknown Mon Aug 11 19:04:08 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Partha Saha Subject: bug#23553: closed (Re: bug#23553: Error in running some loop in set! geometry) Message-ID: References: <87d1e2l4lx.fsf@pobox.com> X-Gnu-PR-Message: they-closed 23553 X-Gnu-PR-Package: guile Reply-To: 23553@debbugs.gnu.org Date: Tue, 28 Feb 2017 15:26:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1488295561-5917-1" This is a multi-part message in MIME format... ------------=_1488295561-5917-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #23553: Error in running some loop in set! geometry which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 23553@debbugs.gnu.org. --=20 23553: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23553 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1488295561-5917-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 23553-done) by debbugs.gnu.org; 28 Feb 2017 15:25:41 +0000 Received: from localhost ([127.0.0.1]:60423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cijen-0001Ws-B8 for submit@debbugs.gnu.org; Tue, 28 Feb 2017 10:25:41 -0500 Received: from pb-sasl2.pobox.com ([64.147.108.67]:52928 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cijel-0001Wj-1L for 23553-done@debbugs.gnu.org; Tue, 28 Feb 2017 10:25:39 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id BD74C5F5BA; Tue, 28 Feb 2017 10:25:38 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=hGWLx0inzibWYWbsGzjjp1opwOw=; b=DACRsa rLAExa7oRqq3JengaBsexc1euYr/RQLr7dI2YiIES92e2V54QOb4+tx9IV85IQLh 1z8PccVxoQ9WA7j+wf5qn9vnkVqCWIq/RD1g8BXQDJUm1byRiKzGFvYOmruoBcHb xTLZJyPq79FDRFi+c3ZJeSyJnd7MYpXn1LNgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=vIfY2stmTgNKBHFMbumlNrAXz0Yxmawu AbhFVF1qxJL9goaO+MArLmsWUgq23MqFwtTRAi4Zzuu49PkDK4772AtNZ7M1VhVZ HNr2t6F4AsaGtr8OFzv1eAUaHLsrSQTQTMvN3i1hq58xCBwfl4tiwjF+ItIUgr17 X1B9P6+WC0Y= Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id B3EE05F5B8; Tue, 28 Feb 2017 10:25:38 -0500 (EST) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id BFECB5F5B6; Tue, 28 Feb 2017 10:25:37 -0500 (EST) From: Andy Wingo To: Partha Saha Subject: Re: bug#23553: Error in running some loop in set! geometry References: Date: Tue, 28 Feb 2017 16:25:30 +0100 In-Reply-To: (Partha Saha's message of "Fri, 13 May 2016 10:34:28 +0000 (UTC)") Message-ID: <87d1e2l4lx.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 282F543A-FDCA-11E6-9BCB-6141F2301B6D-02397024!pb-sasl2.pobox.com X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 23553-done Cc: 23553-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Fri 13 May 2016 12:34, Partha Saha writes: > Dear Prof. Steve and all the meep users This address is for bugs in Guile itself, not meep. Closing this bug as out of scope. Happy hacking with Guile, though :) Andy ------------=_1488295561-5917-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 16 May 2016 18:10:50 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.5 required=5.0 tests=BAYES_50,FREEMAIL_FROM, FSL_HELO_BARE_IP_2,RCVD_NUMERIC_HELO autolearn=disabled version=3.3.2 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 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 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 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 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 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 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/ To: bug-guile@gnu.org From: Partha Saha Subject: Error in running some loop in set! geometry Date: Fri, 13 May 2016 10:34:28 +0000 (UTC) Lines: 133 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: submit 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) 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? ------------=_1488295561-5917-1--