Commit e670f326 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

System physical-dimension, requires grid, loadable

As an interim step in separation of systems, physical-dimension is now loadable if grid is loaded. All grid tests pass. However, there are failures basic Antik functions and tests are not properly loaded.
parent 498c6451
;; Antik system definition
;; Liam Healy 2010-12-24 09:43:28EST antik.asd
;; Time-stamp: <2013-03-09 18:25:58EST antik-base.asd>
;; Time-stamp: <2013-11-23 11:14:56EST antik-base.asd>
;; Copyright 2011, 2012, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -42,7 +42,7 @@
(asdf:defsystem-connection #:antik-tests
:serial t
:requires (#:antik #:lisp-unit)
:requires (#:antik-base #:lisp-unit)
:components
((:module tests
:components
......
;; Foreign (C or C-compatible) arrays
;; Liam Healy 2008-12-28 10:44:22EST foreign-array.lisp
;; Time-stamp: <2013-02-02 09:51:11EST foreign-array.lisp>
;; Time-stamp: <2013-11-23 09:45:23EST foreign-array.lisp>
;;
;; Copyright 2008, 2009, 2010, 2011, 2012, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -29,7 +29,7 @@
;;;; Object and methods
;;;;****************************************************************************
(export '(foreign-array foreign-pointer dimensions total-size
(export '(foreign-array foreign-pointer dimensions
cl-array metadata-slot
*print-contents* *print-foreign-array-readably*
make-foreign-array
......
;; Antik system definition
;; Liam Healy 2010-12-24 09:43:28EST antik.asd
;; Time-stamp: <2013-03-09 18:33:47EST grid.asd>
;; Time-stamp: <2013-11-23 11:39:42EST grid.asd>
;; Copyright 2011, 2012, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -76,7 +76,6 @@
:components
((:file "augment")
(:file "compose")
;;(:file "element-functions") ; requires physical-dimension
(:file "map")
(:file "slice")
(:file "norm-vector-product")))))))
;; Functions on grids
;; Liam Healy 2010-06-19 22:25:17EDT functions.lisp
;; Time-stamp: <2013-11-09 09:18:11EST functions.lisp>
;; Time-stamp: <2013-11-23 09:44:34EST functions.lisp>
;; Copyright 2010, 2011, 2012, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -20,7 +20,7 @@
(in-package :grid)
(export '(*grid-types* gridp grid rank dimensions
(export '(*grid-types* gridp grid rank dimensions total-size
specification make-grid aref aref* contents))
(export '(make-simple-grid grid *default-grid-type*
*default-element-type* *default-dimensions*))
......
;; Physical dimension system definition
;; Liam Healy 2012-02-20 10:14:49EST physical-dimension.asd
;; Time-stamp: <2013-11-09 10:13:50EST physical-dimension.asd>
;; Time-stamp: <2013-11-23 11:13:00EST physical-dimension.asd>
;; Copyright 2012, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -28,7 +28,7 @@
:license "GPL v3"
:serial t
:defsystem-depends-on (#:asdf-system-connections)
:depends-on (#:antik-base #:drakma)
:depends-on (#:grid #:drakma)
:components
((:module input-output
:serial t
......@@ -78,11 +78,15 @@
:components
((:module physical-quantities
:components
((:file "grid")))
(:module tests
((:file "grid")))))
(asdf:defsystem-connection #:pq-grid-tests
:serial t
:requires (#:physical-dimension #:foreign-array)
:components
((:module tests
:serial t
:components
((:file "format-grid")))))
:components ((:file "format-grid")))))
(asdf:defsystem-connection #:degree-symbol
:serial t
......@@ -91,4 +95,3 @@
((:module physical-quantities
:components
((:file "degree-symbol")))))
;; Grid methods for physical dimension quantities
;; Liam Healy 2011-01-17 18:36:54EST grid.lisp
;; Time-stamp: <2013-11-09 09:17:40EST grid.lisp>
;; Time-stamp: <2013-11-23 09:50:59EST grid.lisp>
;; Copyright 2011, 2012, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -83,9 +83,6 @@
(setf grid::*additional-gridp-test* #'pq-gridp)
(defun scalar-units-p (units)
(ignore-errors (parse-units units)))
;;;;****************************************************************************
;;;; Grid methods
;;;;****************************************************************************
......
;; Objects that represent physical measurements.
;; Liam Healy Wed Mar 6 2002 - 09:04
;; Time-stamp: <2013-06-02 13:48:46EDT physical-quantities.lisp>
;; Time-stamp: <2013-11-23 09:50:54EST physical-quantities.lisp>
;; Copyright 2011, 2012, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -318,6 +318,9 @@
(setf pointer ptr)
(if units (make-pq mag units) mag)))
(defun scalar-units-p (units)
(ignore-errors (parse-units units)))
;;; Use #_ for physical dimension quantities, e.g. #_90_degree
(set-dispatch-macro-character
#\# #\_
......
;; Test math functions on numbers
;; Liam Healy 2010-12-24 13:54:53EST numbers.lisp
;; Time-stamp: <2011-01-29 11:10:44EST numbers.lisp>
;; Time-stamp: <2013-11-23 11:17:44EST numbers.lisp>
;; Copyright 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -68,13 +68,16 @@
(tan 0.0d0))
(lisp-unit::assert-numerical-equal
0.0d0
(pqval (asin 0.0d0)))
;; (pqval (asin 0.0d0))
(asin 0.0d0))
(lisp-unit::assert-numerical-equal
0.0d0
(pqval (acos 1.0d0)))
;; (pqval (acos 1.0d0))
(acos 1.0d0))
(lisp-unit::assert-numerical-equal
0.0d0
(pqval (atan 0.0d0)))
;; (pqval (atan 0.0d0))
(atan 0.0d0))
(lisp-unit::assert-numerical-equal
27.0d0
(expt 3.0d0 3))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment