Diff of the two buildlogs: -- --- b1/build.log 2021-07-19 22:55:34.457260210 +0000 +++ b2/build.log 2021-07-19 23:17:00.656944227 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Mon Jul 19 09:15:53 -12 2021 -I: pbuilder-time-stamp: 1626729353 +I: Current time: Tue Jul 20 12:55:48 +14 2021 +I: pbuilder-time-stamp: 1626735348 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bullseye-reproducible-base.tgz] I: copying local configuration @@ -16,8 +16,8 @@ I: copying [./octave-level-set_0.3.1~git.2019.04.13-2.debian.tar.xz] I: Extracting source gpgv: unknown type of key resource 'trustedkeys.kbx' -gpgv: keyblock resource '/tmp/dpkg-verify-sig.R1bvctHI/trustedkeys.kbx': General error -gpgv: Signature made Sun Jan 3 22:59:51 2021 -12 +gpgv: keyblock resource '/tmp/dpkg-verify-sig.2IMSzJRX/trustedkeys.kbx': General error +gpgv: Signature made Tue Jan 5 00:59:51 2021 +14 gpgv: using RSA key 3F464391498FE874BDB5D98F2124AA1983785C90 gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on ./octave-level-set_0.3.1~git.2019.04.13-2.dsc @@ -32,135 +32,169 @@ dpkg-source: info: applying skip-failings-bists.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/18858/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/4617/tmp/hooks/D01_modify_environment starting +debug: Running on ff64a. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +Removing 'diversion of /bin/sh to /bin/sh.distrib by dash' +Adding 'diversion of /bin/sh to /bin/sh.distrib by bash' +Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash' +Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash' +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/4617/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/4617/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=3' - DISTRIBUTION='' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="1" [2]="4" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.1.4(1)-release' + BUILDDIR=/build + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=6' + DIRSTACK=() + DISTRIBUTION= + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='d32bde5c6fe04a24b1011d17c178bbe2' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='18858' - PS1='# ' - PS2='> ' + INVOCATION_ID=9060bbf20f6847d092ef2239bfaa68ec + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=4617 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/tmp.4CE0sXmhoR/pbuilderrc_1nov --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.4CE0sXmhoR/b1 --logfile b1/build.log octave-level-set_0.3.1~git.2019.04.13-2.dsc' - SUDO_GID='116' - SUDO_UID='112' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:8000/' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/tmp.4CE0sXmhoR/pbuilderrc_3kYn --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.4CE0sXmhoR/b2 --logfile b2/build.log --extrapackages usrmerge octave-level-set_0.3.1~git.2019.04.13-2.dsc' + SUDO_GID=114 + SUDO_UID=109 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:8000/ I: uname -a - Linux cbxi4b 5.10.0-7-armmp #1 SMP Debian 5.10.40-1 (2021-05-28) armv7l GNU/Linux + Linux i-capture-the-hostname 5.10.0-7-arm64 #1 SMP Debian 5.10.40-1 (2021-05-28) aarch64 GNU/Linux I: ls -l /bin total 3580 - -rwxr-xr-x 1 root root 816764 Jun 21 14:26 bash - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bunzip2 - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bzcat - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzcmp -> bzdiff - -rwxr-xr-x 1 root root 2225 Jul 20 2020 bzdiff - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzegrep -> bzgrep - -rwxr-xr-x 1 root root 4877 Sep 4 2019 bzexe - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzfgrep -> bzgrep - -rwxr-xr-x 1 root root 3775 Jul 20 2020 bzgrep - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bzip2 - -rwxr-xr-x 1 root root 9636 Jul 20 2020 bzip2recover - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzless -> bzmore - -rwxr-xr-x 1 root root 1297 Jul 20 2020 bzmore - -rwxr-xr-x 1 root root 26668 Sep 22 2020 cat - -rwxr-xr-x 1 root root 43104 Sep 22 2020 chgrp - -rwxr-xr-x 1 root root 38984 Sep 22 2020 chmod - -rwxr-xr-x 1 root root 43112 Sep 22 2020 chown - -rwxr-xr-x 1 root root 92616 Sep 22 2020 cp - -rwxr-xr-x 1 root root 75524 Dec 10 2020 dash - -rwxr-xr-x 1 root root 75880 Sep 22 2020 date - -rwxr-xr-x 1 root root 55436 Sep 22 2020 dd - -rwxr-xr-x 1 root root 59912 Sep 22 2020 df - -rwxr-xr-x 1 root root 96764 Sep 22 2020 dir - -rwxr-xr-x 1 root root 55012 Feb 7 02:38 dmesg - lrwxrwxrwx 1 root root 8 Nov 6 2019 dnsdomainname -> hostname - lrwxrwxrwx 1 root root 8 Nov 6 2019 domainname -> hostname - -rwxr-xr-x 1 root root 22508 Sep 22 2020 echo - -rwxr-xr-x 1 root root 28 Nov 9 2020 egrep - -rwxr-xr-x 1 root root 22496 Sep 22 2020 false - -rwxr-xr-x 1 root root 28 Nov 9 2020 fgrep - -rwxr-xr-x 1 root root 47492 Feb 7 02:38 findmnt - -rwsr-xr-x 1 root root 26076 Feb 26 04:12 fusermount - -rwxr-xr-x 1 root root 124508 Nov 9 2020 grep - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 gunzip - -rwxr-xr-x 1 root root 6376 Mar 2 11:30 gzexe - -rwxr-xr-x 1 root root 64212 Mar 2 11:30 gzip - -rwxr-xr-x 1 root root 13784 Nov 6 2019 hostname - -rwxr-xr-x 1 root root 43180 Sep 22 2020 ln - -rwxr-xr-x 1 root root 35068 Feb 7 2020 login - -rwxr-xr-x 1 root root 96764 Sep 22 2020 ls - -rwxr-xr-x 1 root root 99940 Feb 7 02:38 lsblk - -rwxr-xr-x 1 root root 51408 Sep 22 2020 mkdir - -rwxr-xr-x 1 root root 43184 Sep 22 2020 mknod - -rwxr-xr-x 1 root root 30780 Sep 22 2020 mktemp - -rwxr-xr-x 1 root root 34408 Feb 7 02:38 more - -rwsr-xr-x 1 root root 34400 Feb 7 02:38 mount - -rwxr-xr-x 1 root root 9824 Feb 7 02:38 mountpoint - -rwxr-xr-x 1 root root 88524 Sep 22 2020 mv - lrwxrwxrwx 1 root root 8 Nov 6 2019 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 18 03:38 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 26652 Sep 22 2020 pwd - lrwxrwxrwx 1 root root 4 Jun 21 14:26 rbash -> bash - -rwxr-xr-x 1 root root 30740 Sep 22 2020 readlink - -rwxr-xr-x 1 root root 43104 Sep 22 2020 rm - -rwxr-xr-x 1 root root 30732 Sep 22 2020 rmdir - -rwxr-xr-x 1 root root 14144 Sep 27 2020 run-parts - -rwxr-xr-x 1 root root 76012 Dec 22 2018 sed - lrwxrwxrwx 1 root root 4 Jul 16 21:29 sh -> dash - -rwxr-xr-x 1 root root 22532 Sep 22 2020 sleep - -rwxr-xr-x 1 root root 55360 Sep 22 2020 stty - -rwsr-xr-x 1 root root 46704 Feb 7 02:38 su - -rwxr-xr-x 1 root root 22532 Sep 22 2020 sync - -rwxr-xr-x 1 root root 340872 Feb 16 21:55 tar - -rwxr-xr-x 1 root root 9808 Sep 27 2020 tempfile - -rwxr-xr-x 1 root root 67696 Sep 22 2020 touch - -rwxr-xr-x 1 root root 22496 Sep 22 2020 true - -rwxr-xr-x 1 root root 9636 Feb 26 04:12 ulockmgr_server - -rwsr-xr-x 1 root root 22108 Feb 7 02:38 umount - -rwxr-xr-x 1 root root 22520 Sep 22 2020 uname - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 uncompress - -rwxr-xr-x 1 root root 96764 Sep 22 2020 vdir - -rwxr-xr-x 1 root root 38512 Feb 7 02:38 wdctl - lrwxrwxrwx 1 root root 8 Nov 6 2019 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Mar 2 11:30 zcat - -rwxr-xr-x 1 root root 1678 Mar 2 11:30 zcmp - -rwxr-xr-x 1 root root 5880 Mar 2 11:30 zdiff - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zegrep - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zfgrep - -rwxr-xr-x 1 root root 2081 Mar 2 11:30 zforce - -rwxr-xr-x 1 root root 7585 Mar 2 11:30 zgrep - -rwxr-xr-x 1 root root 2206 Mar 2 11:30 zless - -rwxr-xr-x 1 root root 1842 Mar 2 11:30 zmore - -rwxr-xr-x 1 root root 4553 Mar 2 11:30 znew -I: user script /srv/workspace/pbuilder/18858/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 816764 Jun 22 16:26 bash + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bunzip2 + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bzcat + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzcmp -> bzdiff + -rwxr-xr-x 1 root root 2225 Jul 21 2020 bzdiff + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzegrep -> bzgrep + -rwxr-xr-x 1 root root 4877 Sep 5 2019 bzexe + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzfgrep -> bzgrep + -rwxr-xr-x 1 root root 3775 Jul 21 2020 bzgrep + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bzip2 + -rwxr-xr-x 1 root root 9636 Jul 21 2020 bzip2recover + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzless -> bzmore + -rwxr-xr-x 1 root root 1297 Jul 21 2020 bzmore + -rwxr-xr-x 1 root root 26668 Sep 23 2020 cat + -rwxr-xr-x 1 root root 43104 Sep 23 2020 chgrp + -rwxr-xr-x 1 root root 38984 Sep 23 2020 chmod + -rwxr-xr-x 1 root root 43112 Sep 23 2020 chown + -rwxr-xr-x 1 root root 92616 Sep 23 2020 cp + -rwxr-xr-x 1 root root 75524 Dec 11 2020 dash + -rwxr-xr-x 1 root root 75880 Sep 23 2020 date + -rwxr-xr-x 1 root root 55436 Sep 23 2020 dd + -rwxr-xr-x 1 root root 59912 Sep 23 2020 df + -rwxr-xr-x 1 root root 96764 Sep 23 2020 dir + -rwxr-xr-x 1 root root 55012 Feb 8 04:38 dmesg + lrwxrwxrwx 1 root root 8 Nov 8 2019 dnsdomainname -> hostname + lrwxrwxrwx 1 root root 8 Nov 8 2019 domainname -> hostname + -rwxr-xr-x 1 root root 22508 Sep 23 2020 echo + -rwxr-xr-x 1 root root 28 Nov 10 2020 egrep + -rwxr-xr-x 1 root root 22496 Sep 23 2020 false + -rwxr-xr-x 1 root root 28 Nov 10 2020 fgrep + -rwxr-xr-x 1 root root 47492 Feb 8 04:38 findmnt + -rwsr-xr-x 1 root root 26076 Feb 27 06:12 fusermount + -rwxr-xr-x 1 root root 124508 Nov 10 2020 grep + -rwxr-xr-x 2 root root 2346 Mar 3 13:30 gunzip + -rwxr-xr-x 1 root root 6376 Mar 3 13:30 gzexe + -rwxr-xr-x 1 root root 64212 Mar 3 13:30 gzip + -rwxr-xr-x 1 root root 13784 Nov 8 2019 hostname + -rwxr-xr-x 1 root root 43180 Sep 23 2020 ln + -rwxr-xr-x 1 root root 35068 Feb 8 2020 login + -rwxr-xr-x 1 root root 96764 Sep 23 2020 ls + -rwxr-xr-x 1 root root 99940 Feb 8 04:38 lsblk + -rwxr-xr-x 1 root root 51408 Sep 23 2020 mkdir + -rwxr-xr-x 1 root root 43184 Sep 23 2020 mknod + -rwxr-xr-x 1 root root 30780 Sep 23 2020 mktemp + -rwxr-xr-x 1 root root 34408 Feb 8 04:38 more + -rwsr-xr-x 1 root root 34400 Feb 8 04:38 mount + -rwxr-xr-x 1 root root 9824 Feb 8 04:38 mountpoint + -rwxr-xr-x 1 root root 88524 Sep 23 2020 mv + lrwxrwxrwx 1 root root 8 Nov 8 2019 nisdomainname -> hostname + lrwxrwxrwx 1 root root 14 Apr 19 05:38 pidof -> /sbin/killall5 + -rwxr-xr-x 1 root root 26652 Sep 23 2020 pwd + lrwxrwxrwx 1 root root 4 Jun 22 16:26 rbash -> bash + -rwxr-xr-x 1 root root 30740 Sep 23 2020 readlink + -rwxr-xr-x 1 root root 43104 Sep 23 2020 rm + -rwxr-xr-x 1 root root 30732 Sep 23 2020 rmdir + -rwxr-xr-x 1 root root 14144 Sep 28 2020 run-parts + -rwxr-xr-x 1 root root 76012 Dec 23 2018 sed + lrwxrwxrwx 1 root root 4 Jul 20 12:56 sh -> bash + lrwxrwxrwx 1 root root 4 Jul 18 23:26 sh.distrib -> dash + -rwxr-xr-x 1 root root 22532 Sep 23 2020 sleep + -rwxr-xr-x 1 root root 55360 Sep 23 2020 stty + -rwsr-xr-x 1 root root 46704 Feb 8 04:38 su + -rwxr-xr-x 1 root root 22532 Sep 23 2020 sync + -rwxr-xr-x 1 root root 340872 Feb 17 23:55 tar + -rwxr-xr-x 1 root root 9808 Sep 28 2020 tempfile + -rwxr-xr-x 1 root root 67696 Sep 23 2020 touch + -rwxr-xr-x 1 root root 22496 Sep 23 2020 true + -rwxr-xr-x 1 root root 9636 Feb 27 06:12 ulockmgr_server + -rwsr-xr-x 1 root root 22108 Feb 8 04:38 umount + -rwxr-xr-x 1 root root 22520 Sep 23 2020 uname + -rwxr-xr-x 2 root root 2346 Mar 3 13:30 uncompress + -rwxr-xr-x 1 root root 96764 Sep 23 2020 vdir + -rwxr-xr-x 1 root root 38512 Feb 8 04:38 wdctl + lrwxrwxrwx 1 root root 8 Nov 8 2019 ypdomainname -> hostname + -rwxr-xr-x 1 root root 1984 Mar 3 13:30 zcat + -rwxr-xr-x 1 root root 1678 Mar 3 13:30 zcmp + -rwxr-xr-x 1 root root 5880 Mar 3 13:30 zdiff + -rwxr-xr-x 1 root root 29 Mar 3 13:30 zegrep + -rwxr-xr-x 1 root root 29 Mar 3 13:30 zfgrep + -rwxr-xr-x 1 root root 2081 Mar 3 13:30 zforce + -rwxr-xr-x 1 root root 7585 Mar 3 13:30 zgrep + -rwxr-xr-x 1 root root 2206 Mar 3 13:30 zless + -rwxr-xr-x 1 root root 1842 Mar 3 13:30 zmore + -rwxr-xr-x 1 root root 4553 Mar 3 13:30 znew +I: user script /srv/workspace/pbuilder/4617/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -646,7 +680,7 @@ Get: 442 http://deb.debian.org/debian bullseye/main armhf dh-octave all 1.0.3 [21.9 kB] Get: 443 http://deb.debian.org/debian bullseye/main armhf octave-struct armhf 1.0.16-8 [36.2 kB] Get: 444 http://deb.debian.org/debian bullseye/main armhf octave-parallel armhf 4.0.0-2+b1 [173 kB] -Fetched 134 MB in 1min 8s (1976 kB/s) +Fetched 134 MB in 20s (6741 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package bsdextrautils. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19398 files and directories currently installed.) @@ -2468,8 +2502,26 @@ Writing extended state information... Building tag database... -> Finished parsing the build-deps +Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + usrmerge +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Need to get 13.0 kB of archives. +After this operation, 43.0 kB of additional disk space will be used. +Get:1 http://deb.debian.org/debian bullseye/main armhf usrmerge all 25 [13.0 kB] +debconf: delaying package configuration, since apt-utils is not installed +Fetched 13.0 kB in 0s (246 kB/s) +Selecting previously unselected package usrmerge. +(Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 36762 files and directories currently installed.) +Preparing to unpack .../archives/usrmerge_25_all.deb ... +Unpacking usrmerge (25) ... +Setting up usrmerge (25) ... +The system has been successfully converted. I: Building the package -I: Running cd /build/octave-level-set-0.3.1~git.2019.04.13/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../octave-level-set_0.3.1~git.2019.04.13-2_source.changes +hostname: Name or service not known +I: Running cd /build/octave-level-set-0.3.1~git.2019.04.13/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../octave-level-set_0.3.1~git.2019.04.13-2_source.changes dpkg-buildpackage: info: source package octave-level-set dpkg-buildpackage: info: source version 0.3.1~git.2019.04.13-2 dpkg-buildpackage: info: source distribution unstable @@ -2527,24 +2579,24 @@ CXXFLAGS="-g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose internal_init_narrowband.cpp FastMarching.o Utils.o -o __levelset_internal_init_narrowband.oct CXXFLAGS="-g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose geomElements.cpp FastMarching.o Utils.o -o __levelset_geomElements.oct CXXFLAGS="-g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose geomBoundary.cpp FastMarching.o Utils.o -o __levelset_geomBoundary.oct -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security internal_fastmarching.cpp -o /tmp/oct-uVP98s.o -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security internal_init_narrowband.cpp -o /tmp/oct-NkAE1j.o -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security geomElements.cpp -o /tmp/oct-SgFhQA.o -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security geomBoundary.cpp -o /tmp/oct-p5d1CQ.o -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_internal_init_narrowband.oct FastMarching.o Utils.o /tmp/oct-NkAE1j.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro CXXFLAGS="-g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose geomGamma.cpp FastMarching.o Utils.o -o __levelset_geomGamma.oct -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security geomGamma.cpp -o /tmp/oct-vtxp6k.o -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_internal_fastmarching.oct FastMarching.o Utils.o /tmp/oct-uVP98s.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro CXXFLAGS="-g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose nbFromGeom.cpp FastMarching.o Utils.o -o __levelset_nbFromGeom.oct -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security nbFromGeom.cpp -o /tmp/oct-16Nqfo.o -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_geomElements.oct FastMarching.o Utils.o /tmp/oct-SgFhQA.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security geomElements.cpp -o /tmp/oct-e2FZ2t.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security geomBoundary.cpp -o /tmp/oct-gtlItx.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security internal_init_narrowband.cpp -o /tmp/oct-iq5VQo.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security internal_fastmarching.cpp -o /tmp/oct-ZxaCUh.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security geomGamma.cpp -o /tmp/oct-54oi2D.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security nbFromGeom.cpp -o /tmp/oct-1YGw9F.o +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_internal_init_narrowband.oct FastMarching.o Utils.o /tmp/oct-iq5VQo.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro CXXFLAGS="-g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose internal_mesh.cpp FastMarching.o Utils.o -o __levelset_internal_mesh.oct -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security internal_mesh.cpp -o /tmp/oct-puCOCP.o -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_geomBoundary.oct FastMarching.o Utils.o /tmp/oct-p5d1CQ.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security internal_mesh.cpp -o /tmp/oct-yutoqQ.o +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_internal_fastmarching.oct FastMarching.o Utils.o /tmp/oct-ZxaCUh.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro CXXFLAGS="-g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security" /usr/bin/mkoctfile --verbose upwindGrad.cpp FastMarching.o Utils.o -o __levelset_upwindGrad.oct -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security upwindGrad.cpp -o /tmp/oct-xPrScv.o -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_upwindGrad.oct FastMarching.o Utils.o /tmp/oct-xPrScv.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_nbFromGeom.oct FastMarching.o Utils.o /tmp/oct-16Nqfo.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security upwindGrad.cpp -o /tmp/oct-fJFmXM.o +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_geomElements.oct FastMarching.o Utils.o /tmp/oct-e2FZ2t.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_geomBoundary.oct FastMarching.o Utils.o /tmp/oct-gtlItx.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_nbFromGeom.oct FastMarching.o Utils.o /tmp/oct-1YGw9F.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_geomGamma.oct FastMarching.o Utils.o /tmp/oct-54oi2D.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro In file included from /usr/include/c++/10/vector:72, from /usr/include/octave-6.2.0/octave/../octave/svd.h:31, from /usr/include/octave-6.2.0/octave/../octave/mx-ext.h:57, @@ -2559,12 +2611,12 @@ /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_geomGamma.oct FastMarching.o Utils.o /tmp/oct-vtxp6k.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_internal_mesh.oct FastMarching.o Utils.o /tmp/oct-puCOCP.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_upwindGrad.oct FastMarching.o Utils.o /tmp/oct-fJFmXM.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/octave-level-set-0.3.1~git.2019.04.13=. -fstack-protector-strong -Wformat -Werror=format-security -o __levelset_internal_mesh.oct FastMarching.o Utils.o /tmp/oct-yutoqQ.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro make[1]: Leaving directory '/build/octave-level-set-0.3.1~git.2019.04.13/src' copyfile /build/octave-level-set-0.3.1~git.2019.04.13/./src/__levelset_geomBoundary.oct /build/octave-level-set-0.3.1~git.2019.04.13/./src/__levelset_geomElements.oct /build/octave-level-set-0.3.1~git.2019.04.13/./src/__levelset_geomGamma.oct /build/octave-level-set-0.3.1~git.2019.04.13/./src/__levelset_internal_fastmarching.oct /build/octave-level-set-0.3.1~git.2019.04.13/./src/__levelset_internal_init_narrowband.oct /build/octave-level-set-0.3.1~git.2019.04.13/./src/__levelset_internal_mesh.oct /build/octave-level-set-0.3.1~git.2019.04.13/./src/__levelset_nbFromGeom.oct /build/octave-level-set-0.3.1~git.2019.04.13/./src/__levelset_upwindGrad.oct /build/octave-level-set-0.3.1~git.2019.04.13/./inst/arm-unknown-linux-gnueabihf-api-v55 -/tmp/octave-help-PSy6xa:149: table requires an argument: the formatter for @item -/tmp/octave-help-PSy6xa:149: table requires an argument: the formatter for @item +/tmp/octave-help-H3Enft:149: table requires an argument: the formatter for @item +/tmp/octave-help-H3Enft:149: table requires an argument: the formatter for @item warning: doc_cache_create: unusable help text found in file 'ls_sign_colourmap' warning: called from doc_cache_create>handle_function at line 98 column 5 @@ -2577,10 +2629,10 @@ pkg at line 568 column 9 /usr/share/dh-octave/install-pkg.m at line 43 column 1 -/tmp/octave-help-XpD2V8:144: @code expected braces -/tmp/octave-help-XpD2V8:148: @code expected braces -/tmp/octave-help-XpD2V8:144: @code expected braces -/tmp/octave-help-XpD2V8:148: @code expected braces +/tmp/octave-help-EN2Wst:144: @code expected braces +/tmp/octave-help-EN2Wst:148: @code expected braces +/tmp/octave-help-EN2Wst:144: @code expected braces +/tmp/octave-help-EN2Wst:148: @code expected braces warning: doc_cache_create: unusable help text found in file 'so_example_problem' warning: called from doc_cache_create>handle_function at line 98 column 5 @@ -2598,43 +2650,71 @@ dh_octave_check -O--buildsystem=octave Checking package... Checking m files ... -[inst/ls_enforce.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_enforce.m +[inst/ls_enforce_speed.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_enforce_speed.m ***** error - ls_enforce (1, 2) + ls_enforce_speed (1, 2) ***** error - ls_enforce (1, 2, 3, 4) -***** error - ls_enforce (1, "inside", [1, 2]); + ls_enforce_speed (1, 2, 3, 4) +***** error + ls_enforce_speed (1, "inside", [1, 2]); ***** error - ls_enforce (1, "foo", true); + ls_enforce_speed (1, "foo", true); ***** error - ls_enforce (1, NA, false); + ls_enforce_speed (1, NA, false); +***** function checkCircleRadius (XX, YY, h, phi, r) + phiCorrect = XX.^2 + YY.^2 - r^2; + sd1 = ls_signed_distance (phi, h); + sd2 = ls_signed_distance (phiCorrect, h); + assert (sd1, sd2, h); +***** endfunction ***** test n = 100; x = linspace (-10, 10, n); + h = x(2) - x(1); [XX, YY] = meshgrid (x, x); - circ2 = (XX.^2 + YY.^2 < 2^2); - circ8 = (XX.^2 + YY.^2 < 8^2); - phi = (XX.^2 + YY.^2 - 5^2); + phi = XX.^2 + YY.^2 - 3^2; + F = ones (size (XX)); + whereContain = (XX.^2 + YY.^2 < 5^2); + F = ls_enforce_speed (F, "contain", whereContain); + whereInside = (XX.^2 + YY.^2 < 8^2); + F = ls_enforce_speed (F, "inside", whereInside); + dists = ls_solve_stationary (phi, F, h); + phi2 = ls_extract_solution (10, dists, phi, F); + assert (ls_check (phi2, "contain", whereContain)); + assert (ls_check (phi2, "inside", whereInside)); + checkCircleRadius (XX, YY, h, phi2, 8); - phi2 = ls_enforce (phi, "inside", circ8); - assert (ls_equal (phi2, phi)); - phi2 = ls_enforce (phi, "inside", circ2); - assert (ls_check (phi2, "inside", circ2)); + phi = XX.^2 + YY.^2 - 8^2; + F = -ones (size (XX)); + whereContain = (XX.^2 + YY.^2 < 5^2); + F = ls_enforce_speed (F, "contain", whereContain); + whereOutside = (XX.^2 + YY.^2 >= 7^2); + F = ls_enforce_speed (F, "outside", whereOutside); + dists = ls_solve_stationary (phi, F, h); + phi2 = ls_extract_solution (10, dists, phi, F); + assert (ls_check (phi2, "contain", whereContain)); + assert (ls_check (phi2, "outside", whereOutside)); + checkCircleRadius (XX, YY, h, phi2, 5); +***** demo + n = 100; + x = linspace (-10, 10, n); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); - phi2 = ls_enforce (phi, "contain", circ2); - assert (ls_equal (phi2, phi)); - phi2 = ls_enforce (phi, "contain", circ8); - assert (ls_check (phi2, "contain", circ8)); + phi = XX.^2 + YY.^2 - 8^2; + F = -ones (size (XX)); + F = ls_enforce_speed (F, "outside", XX.^2 + YY.^2 >= 7^2); + F = ls_enforce_speed (F, "contain", XX.^2 + YY.^2 < 3^2); + times = linspace (1, 6, 40); + ls_animate_evolution (phi, F, h, times, 0.05); - phi2 = ls_enforce (phi, "outside", ~circ8); - assert (ls_equal (phi2, phi)); - phi2 = ls_enforce (phi, "outside", ~circ2); - ls_check (phi2, "outside", ~circ2); - phi2 = ls_enforce (phi, "outside", circ2); - ls_check (phi2, "outside", circ2); + phi = XX.^2 + YY.^2 - 3^2; + F = ones (size (XX)); + F = ls_enforce_speed (F, "inside", XX.^2 + YY.^2 < 8^2); + F = ls_enforce_speed (F, "contain", XX.^2 + YY.^2 < 5^2); + ls_animate_evolution (phi, F, h, times, 0.05); 6 tests, 6 passed, 0 known failure, 0 skipped [inst/fastmarching.m] >>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/fastmarching.m @@ -2781,7 +2861,7 @@ fastmarching at line 110 column 19 __test__ at line 5 column 5 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 22 column 31 + /tmp/tmp.FIWHElEeX1 at line 22 column 31 ***** test u0 = [0, NA; Inf, 2]; @@ -2793,14 +2873,14 @@ fastmarching at line 110 column 19 __test__ at line 5 column 5 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 22 column 31 + /tmp/tmp.FIWHElEeX1 at line 22 column 31 warning: found too far alive point in fast marching, d = -8.000000 warning: called from fastmarching at line 110 column 19 __test__ at line 5 column 5 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 22 column 31 + /tmp/tmp.FIWHElEeX1 at line 22 column 31 ***** test u0 = [0, NA, NA, NA, 0.1; ... @@ -2840,14 +2920,14 @@ p(1), pLogN(1)); assert (p(1), 1, 1e-1); assert (pLogN(1), 1, 1e-1); -n = 101: t = 0.191 s -n = 201: t = 0.855 s -n = 501: t = 6.084 s -n = 1001: t = 25.466 s -n = 2001: t = 114.431 s +n = 101: t = 0.126 s +n = 201: t = 0.807 s +n = 501: t = 5.090 s +n = 1001: t = 18.147 s +n = 2001: t = 75.583 s Exponents: - O(n): 1.07 - O(n log n): 0.99 + O(n): 1.05 + O(n log n): 0.97 ***** test T = 1.6; timeSteps = 10000; @@ -3004,6 +3084,99 @@ imshow (u); title ("Solved Maze. Blue: Walls, Red: Unreachable, Yellow: Start."); 16 tests, 16 passed, 0 known failure, 0 skipped +[inst/ls_setxor.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_setxor.m +***** error + ls_setxor (1) +***** error + ls_setxor (1, 2, 3) +***** error + ls_setxor (1, [1, 2]) +***** test + assert (ls_equal (ls_setxor ([-1, -1, Inf], [1, -1, -Inf]), [-1, 1, -1])); + n = 50; + x = linspace (-10, 10, n); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + + phi1 = XX.^2 + YY.^2 - 8^2; + phi2 = XX.^2 + YY.^2 - 5^2; + + assert (ls_equal (ls_setdiff (phi1, phi2), ls_setxor (phi1, phi2))); +***** demo + n = 100; + x = linspace (-7, 7, n); + [XX, YY] = meshgrid (x, x); + + phi1 = (XX - 2).^2 + YY.^2 - 3^2; + phi2 = (XX + 2).^2 + YY.^2 - 3^2; + phi = ls_setxor (phi1, phi2); + + figure (); + subplot (1, 2, 1); + hold ("on"); + contour (XX, YY, phi1, [0, 0], "k"); + contour (XX, YY, phi2, [0, 0], "k"); + hold ("off"); + axis ("equal"); + + subplot (1, 2, 2); + hold ("on"); + imagesc (x, x, phi); + set (gca (), "ydir", "normal"); + ls_sign_colourmap (); + contour (XX, YY, phi, [0, 0], "k"); + hold ("off"); + axis ("equal"); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/so_explore_descent.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_explore_descent.m +***** error + so_explore_descent (1); +***** error + so_explore_descent (1, 2, 3); +***** error + so_explore_descent (struct (), 2); +***** error + so_explore_descent ([2, 3], 2); +***** error <'fload' is not available> + pkg unload -nodeps parallel; + so_explore_descent ("foo", 2); +***** demo + pkg load parallel; + + data = struct (); + data.p = so_init_params (false); + data.p.vol = 10; + data.p.weight = 50; + + data.p.nSteps = 10; + data.figs = struct (); + data.figs.speed = figure (); + data.figs.exploreCosts = figure (); + + n = 100; + x = linspace (-10, 10, n); + h = x(2) - x(1); + data.g = struct ("x", x, "h", h); + + data = so_example_problem (data); + phi0 = ls_genbasic (data.g.x, "box", -3, 7); + + printf ("Computing descent...\n"); + f = tmpfile (); + d = data; + d.handler = struct (); + d = so_save_descent (f, struct (), d); + s = so_run_descent (data.p.nSteps, phi0, d); + printf ("Final cost: %.6d\n", s.cost); + + printf ("\nNow replaying...\n"); + init = @() data; + frewind (f); + so_explore_descent (f, init); + fclose (f); +5 tests, 5 passed, 0 known failure, 0 skipped [inst/upwind_gradient_norm.m] >>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/upwind_gradient_norm.m ***** error @@ -3052,68 +3225,229 @@ r = sqrt (phi); assert (g, 2 * r, 0.1); 7 tests, 7 passed, 0 known failure, 0 skipped -[inst/ls_complement.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_complement.m +[inst/ls_init_narrowband.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_init_narrowband.m ***** error - ls_complement () + ls_init_narrowband () ***** error - ls_complement (1, 2) + ls_init_narrowband (1, 2, 3) +***** test + assert (ls_init_narrowband ([]), []); +***** test + n = 10; + x = linspace (-2, 2, n); + h = x(2) - x(1); + phi = abs (x) - 1; + + d = ls_init_narrowband (phi, h); + where = ~isna (d); + assert (d(where), phi(where), sqrt (eps)); ***** test n = 50; - x = linspace (-10, 10, n); + x = linspace (-2, 2, n); + h = x(2) - x(1); + [XX, YY, ZZ] = ndgrid (x); + RRsq = XX.^2 + YY.^2 + ZZ.^2; + phi = RRsq - 1; + + d = ls_init_narrowband (phi, h); + where = ~isna (d); + assert (d(where), sqrt (RRsq(where)) - 1, h / 3); +***** test + tol = sqrt (eps); + assert (ls_init_narrowband ([Inf, -Inf, Inf]), [0.5, -0.5, 0.5], tol); + assert (ls_init_narrowband ([Inf, -1, Inf]), [1, 0, 1], tol); + %assert (ls_init_narrowband ([1, -Inf, 1]), [0, 1, 0], tol); +***** function dh = distToSegment (x, a, b) + dir = b - a; + dir /= norm (dir); + proj = dot (x - a, dir); + if (proj < 0) + dh = norm (x - a); + elseif (proj > 1) + dh = norm (x - b); + else + dh = norm (x - (a + proj * dir)); + endif +***** endfunction +***** function dh = distToLine (x, c) + assert (c(1, 1), 0); + dh = Inf; + for i = 2 : size (c, 2) - 1 + dh = min (dh, distToSegment (x, c(:, i), c(:, i + 1))); + endfor +***** endfunction +***** function dh = distOfContoursAsym (c1, c2) + dh = 0; + for i = 2 : size (c1, 2) + dh = max (dh, distToLine (c1(:, i), c2)); + endfor +***** endfunction +***** function dh = distOfContours (c1, c2) + dh = max (distOfContoursAsym (c1, c2), distOfContoursAsym (c2, c1)); +***** endfunction +***** test + phis = ls_get_tests (); + printf ("Comparing contours for %d cases...\n", length (phis)); + for i = 1 : length (phis) + d = ls_init_narrowband (phis{i}); + c1 = contourc (d, [0, 0]); + if (size (c1, 2) > 0) + c2 = contourc (phis{i}, [0, 0]); + dh = distOfContours (c1, c2); + printf ("i = %d: dist = %f\n", i, dh); + if (isfinite (dh)) + assert (dh, 0, 1e-1); + endif + endif + endfor +Comparing contours for 6 cases... +i = 1: dist = 0.060660 +i = 2: dist = Inf +i = 4: dist = 0.039039 +i = 5: dist = 0.085786 +i = 6: dist = 0.085786 +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/ls_time_step.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_time_step.m +***** error + ls_time_step (1, 2) +***** error + ls_time_step (1, 2, 3, 4, 5, 6) +***** error + ls_time_step (1, 2, 3, 4, [5, 5]) +***** error + ls_time_step ([1; 1], [2, 2], [3, 3, 3]) +***** error + ls_time_step ([1, 1], 1, [2, 2], [3, 3, 3]) +***** error + ls_time_step (ones (2, 2), 1, 1) +***** test + n = 100; + x = linspace (0, 1, n); + h = x(2) - x(1); + + phi0 = sin (x); + fPos = ones (size (phi0)); + + % Single time step, moving exactly one grid step. + phit = ls_time_step (1, phi0, fPos); + assert (phit(2 : end), phi0(1 : end - 1)); + + % t = 1 should correspond to the previous result, and t = 2 + % shifts one more time step. However, due to boundary effects, + % we have to exclude some elements in the comparisons. + phitArr = ls_time_step ([1, 2], 0.5, phi0, fPos); + assert (size (phitArr), [2, 1]); + assert (phitArr{1}(3 : end), phit(3 : end), 1e-4); + assert (phitArr{2}(5 : end), phi0(3 : end - 2), 1e-4); + + % Try out movement in the other direction. + phit = ls_time_step (0.5, 0.1, phi0, -fPos, 0.5); + assert (phit(1 : end - 4), phi0(2 : end - 3), 1e-4); +***** function compareFastMarching (t, phi0, F, h, tol) + phit = ls_time_step (t, phi0, F, h); + d = ls_solve_stationary (phi0, F, h); + phit_fm = ls_extract_solution (t, d, phi0, F); + + sd1 = ls_signed_distance (phit, h); + sd2 = ls_signed_distance (phit_fm, h); + assert (sd1, sd2, tol); +***** endfunction +***** test + warning ("off", "level-set:fast-marching:too-far-alive"); + + n = 100; + x = linspace (-5, 5, n); h = x(2) - x(1); [XX, YY] = meshgrid (x, x); - phi1 = (XX - 2).^2 + (YY - 2).^2 - 2^2; - phi2 = (XX + 2).^2 + (YY + 2).^2 - 2^2; + phi0 = ls_genbasic (XX, YY, "sphere", [0, 0], [3, 1.5]); + F = ones (size (phi0)); + compareFastMarching (0.5, phi0, F, h, h / 2); + compareFastMarching (1.5, phi0, F, h, h / 2); - assert (ls_disjoint (phi1, ls_complement (phi1))); - assert (ls_disjoint (phi2, ls_complement (phi2))); + phi0 = ls_genbasic (XX, YY, "box", [-3, -3], [3, 3]); + F = YY / 5; + compareFastMarching (1, phi0, F, h, h); - assert (~ls_disjoint (phi1, ls_complement (phi2))); - assert (~ls_disjoint (phi2, ls_complement (phi1))); + F = ones (size (phi0)); + compareFastMarching (1, phi0, F, h, h / 2); - sd1 = ls_signed_distance (ls_complement (phi1), h); - sd2 = ls_complement (ls_signed_distance (phi1, h)); - assert (sd1, sd2, sqrt (eps)); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/ls_union.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_union.m + phi0 = ls_genbasic (XX, YY, "sphere", [0, 0], 3); + F = sin (XX .* YY); + compareFastMarching (1, phi0, F, h, h); +***** test + warning ("off", "level-set:fast-marching:increased-distance"); + + n = 50; + x = linspace (-5, 5, n); + h = x(2) - x(1); + [XX, YY, ZZ] = ndgrid (x, x, x); + + phi0 = ls_genbasic (XX, YY, ZZ, "sphere", [0, 0, 0], 3); + F = ones (size (phi0)); + compareFastMarching (1, phi0, F, h, h / 2); + compareFastMarching (1, phi0, -F, h, h / 2); +***** demo + n = 500; + x = linspace (-5, 5, n); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + + F = sin (XX .* YY); + phi0 = ls_genbasic (XX, YY, "sphere", [0, 0], 3); + phit = ls_time_step ([0.5, 1], phi0, F, h); + + figure (); + hold ("on"); + imagesc (x, x, F); + axis ("equal"); + set (gca (), "ydir", "normal"); + ls_sign_colourmap (); + contour (XX, YY, phi0, [0, 0], "k", "LineWidth", 2); + contour (XX, YY, phit{1}, [0, 0], "k", "LineWidth", 2); + contour (XX, YY, phit{2}, [0, 0], "k", "LineWidth", 2); + hold ("off"); +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/ls_setdiff.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_setdiff.m ***** error - ls_union () -***** error - ls_union (1, -2, [1, 2]) + ls_setdiff (1) +***** error + ls_setdiff (1, 2, 3) +***** error + ls_setdiff (1, [1, 2]) ***** test + assert (ls_equal (ls_setdiff ([-1, -1, 1], [1, -1, -1]), [-1, 1, 1])); n = 50; x = linspace (-10, 10, n); + h = x(2) - x(1); [XX, YY] = meshgrid (x, x); - phi1 = (XX - 3).^2 + (YY - 3).^2 - 2^2; - phi2 = (XX + 3).^2 + (YY + 3).^2 - 2^2; - phi3 = XX.^2 + YY.^2 - 2^2; + phi1 = XX.^2 + YY.^2 - 8^2; + phi2 = XX.^2 + YY.^2 - 5^2; - phi = ls_union (phi1, phi2, phi3); - assert (ls_issubset (phi1, phi)); - assert (ls_issubset (phi2, phi)); - assert (ls_issubset (phi3, phi)); + phi = ls_setdiff (phi1, phi2); + assert (ls_issubset (phi, phi1)); + assert (ls_disjoint (phi, phi2)); - assert (ls_union (phi3), phi3); + phi = ls_setdiff (phi2, phi1); + assert (ls_isempty (phi)); ***** demo n = 100; x = linspace (-7, 7, n); [XX, YY] = meshgrid (x, x); - phi1 = (XX - 2 * cos (7/6 * pi)).^2 + (YY - 2 * sin (7/6 * pi)).^2 - 3^2; - phi2 = (XX - 2 * cos (11/6 * pi)).^2 + (YY - 2 * sin (11/6 * pi)).^2 - 3^2; - phi3 = XX.^2 + (YY - 2).^2 - 3^2; - phi = ls_union (phi1, phi2, phi3); + phi1 = (XX - 2).^2 + YY.^2 - 3^2; + phi2 = (XX + 2).^2 + YY.^2 - 3^2; + phi = ls_setdiff (phi1, phi2); figure (); subplot (1, 2, 1); hold ("on"); contour (XX, YY, phi1, [0, 0], "k"); contour (XX, YY, phi2, [0, 0], "k"); - contour (XX, YY, phi3, [0, 0], "k"); hold ("off"); axis ("equal"); @@ -3125,94 +3459,871 @@ contour (XX, YY, phi, [0, 0], "k"); hold ("off"); axis ("equal"); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/ls_absolute_geom.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_absolute_geom.m +***** demo + n = 100; + x = linspace (-7, 7, n); + [XX, YY] = meshgrid (x, x); + + phi1 = XX.^2 + YY.^2 - 6^2; + phi2 = XX.^2 + YY.^2 - 3^2; + phi = ls_setdiff (phi1, phi2); + + figure (); + subplot (1, 2, 1); + hold ("on"); + contour (XX, YY, phi1, [0, 0], "k"); + contour (XX, YY, phi2, [0, 0], "k"); + hold ("off"); + axis ("equal"); + + subplot (1, 2, 2); + hold ("on"); + imagesc (x, x, phi); + set (gca (), "ydir", "normal"); + ls_sign_colourmap (); + contour (XX, YY, phi, [0, 0], "k"); + hold ("off"); + axis ("equal"); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/ls_inside.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_inside.m ***** error - ls_absolute_geom (1, 2); + ls_inside () ***** error - ls_absolute_geom (1, 2, 3, 4); -***** error - x = [-1, 1]; + ls_inside (1, 2) +***** test + assert (ls_inside ([1, 0, -1, 0, 1]), [false, false, true, false, false]); +***** test + if (exist ("signbit") == 5) + assert (ls_inside ([-0, 0]), [true, false]); + else + warning ("'signbit' function not available, skipping test."); + endif +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/ls_distance_fcn.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_distance_fcn.m +***** error + ls_distance_fcn () +***** error + ls_distance_fcn (1, 2, 3) +***** test + assert (ls_distance_fcn ([]), []); +***** test + n = 10; + x = linspace (-2, 2, n); + h = x(2) - x(1); + phi = abs (x) - 1; + + d = ls_distance_fcn (phi, h); + assert (d, max (phi, 0), sqrt (eps)); +***** test + n = 50; + x = linspace (-2, 2, n); + h = x(2) - x(1); [XX, YY, ZZ] = ndgrid (x); - ls_absolute_geom (struct (), XX, YY); -***** error - ls_absolute_geom (struct (), [-1, 0, 1], [0, 0, 0]); -***** error - ls_absolute_geom (struct (), zeros (3, 2), zeros (2, 2)); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/so_explore_descent.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_explore_descent.m + RRsq = XX.^2 + YY.^2 + ZZ.^2; + phi = RRsq - 1; + + d = ls_distance_fcn (phi, h); + assert (d, max (sqrt (RRsq) - 1, 0), h); +***** xtest + n = 500; + x = linspace (-10, 10, n); + h = x(2) - x(1); + + [XX, YY] = meshgrid (x, x); + phi = ls_genbasic (XX, YY, "sphere", [0, 0], 8); + + id = tic (); + d = ls_distance_fcn (phi, h); + time1 = toc (id); + + id = tic (); + sd = ls_signed_distance (phi, h); + time2 = toc (id); + + assert (d, max (sd, 0), sqrt (eps)); + printf ("ls_distance_fcn faster than ls_signed_distance by %.1f%%\n", ... + 100 * ((time2 - time1) / time2)); + assert (time1 < time2); +ls_distance_fcn faster than ls_signed_distance by 23.9% +***** test + phis = ls_get_tests (); + for i = 1 : length (phis) + phi = ls_normalise (phis{i}); + d = ls_distance_fcn (phi); + sd = ls_signed_distance (phi); + assert (d, max (sd, 0), sqrt (eps)); + endfor +***** demo + n = 100; + x = linspace (-10, 10, n); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + + phi = ls_genbasic (XX, YY, "sphere", [0, 0], [8, 5]); + d = ls_distance_fcn (phi, h); + + figure (); + mesh (XX, YY, d); + view ([45, 45]); +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/ls_find_geometry.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_find_geometry.m ***** error - so_explore_descent (1); + ls_find_geometry () ***** error - so_explore_descent (1, 2, 3); -***** error - so_explore_descent (struct (), 2); -***** error - so_explore_descent ([2, 3], 2); -***** error <'fload' is not available> - pkg unload -nodeps parallel; - so_explore_descent ("foo", 2); + ls_find_geometry (1, 2, 3, 4) +***** error + ls_find_geometry (resize (zeros (8, 1), [2, 2, 2])) +***** error + ls_find_geometry ([1, -1, 1]) +***** error + ls_find_geometry ([0, 1; -1, -1]) +***** error + ls_find_geometry ([-1, NA; -1, -1]) +***** function verifyGeometry (phi, geom) + sz = size (phi); + nNode = prod (sz); + L = sz(1); + M = sz(2); + nElem = (L - 1) * (M - 1); + assert (geom.dim, sz); + + % Basic properties of the elem field. + assert (geom.elem.n, nElem); + assert (size (geom.elem.nodelist), [nElem, 4]); + assert (all (geom.elem.type(geom.elem.index.inner) == -1)); + assert (all ((geom.elem.type(geom.elem.index.bdry) == 0))); + assert (all ((geom.elem.type(geom.elem.index.outer) == 1))); + % Order of the nodes in nodelist. + assert (geom.elem.nodelist(1, :), [L+2, 2, 1, L+1]); + % Correct classification of inner/outer/bdry elements. + assert (all (phi(geom.elem.nodelist(geom.elem.index.inner, :))(:) < 0)); + assert (all (phi(geom.elem.nodelist(geom.elem.index.outer, :))(:) > 0)); + bdryPhis = phi(geom.elem.nodelist(geom.elem.index.bdry, :)); + bdryPhis = sort (bdryPhis, 2); + assert (all (bdryPhis(:, 1) < 0) && all (bdryPhis(:, end) > 0)); + + % Each boundary element should have two or four intersected edges. + % Also verify that the start/endEdge fields of the internal information + % match up to the points in question. + for i = 1 : geom.bdryel.n + empty = length (find (isna (geom.bdryel.edges(i, :)))); + assert (empty == 2 || empty == 0); + for j = 1 : length (geom.internal.bdryelSegments{i}) + s = geom.internal.bdryelSegments{i}{j}; + assert (geom.bdryel.edges(i, s.startEdge) == s.startPt); + assert (geom.bdryel.edges(i, s.endEdge) == s.endPt); + endfor + endfor + + % Run through gamma components and verify that geom.ispts.onedge matches. + for i = 1 : geom.gamma.n + c = geom.gamma.ispts{i}; + c(end + 1) = c(1); + for j = 1 : length (c) - 1 + cur = c(j); + next = c(j + 1); + bdryel = geom.ispts.onedge(cur, 1, 1); + assert (geom.ispts.onedge(next, 2, 1), bdryel); + assert (geom.bdryel.edges(bdryel, geom.ispts.onedge(cur, 1, 2)), cur); + assert (geom.bdryel.edges(bdryel, geom.ispts.onedge(next, 2, 2)), next); + + edgeForward = geom.ispts.onedge(cur, 1, 3); + assert (geom.bedges.ispts(edgeForward, 1), cur); + assert (geom.bedges.ispts(edgeForward, 2), next); + + assert (geom.ispts.gammachain(cur, 1), next); + assert (geom.ispts.gammachain(next, 2), cur); + endfor + endfor + + % Verify that the ordering of points in bedges matches the onedge + % information about start / end points in each boundary element. + for i = 1 : geom.bedges.n + assert (geom.ispts.onedge(geom.bedges.ispts(i, 1), 1, 1), ... + geom.ispts.onedge(geom.bedges.ispts(i, 2), 2, 1)); + assert (geom.ispts.onedge(geom.bedges.ispts(i, 1), 1, 3), i); + assert (geom.ispts.onedge(geom.bedges.ispts(i, 2), 2, 3), i); + endfor +***** endfunction +***** test + phis = ls_get_tests (); + hs = [0.1, 0.5, 1, 1.5]; + for i = 1 : length (phis) + for h = hs + for s = [-1, 1] + cur = phis{i} * s; + phi = ls_normalise (cur, h); + geom = ls_find_geometry (phi, h); + verifyGeometry (phi, geom); + endfor + endfor + endfor +***** test + phi = ones (4, 4); + phi(2 : 3, 2 : 3) = [Inf, -1; -Inf, 2]; + g = ls_find_geometry (phi, 0.1, 0.01); + + ind = find (g.elem.index.bdry == 5); + assert (size (ind), [1, 1]); + edges = g.bdryel.edges(ind, :); + assert (all (~isna (edges))); + + assert (g.ispts.inout(edges, :), [7, 11; 7, 6; 10, 6; 10, 11]); + assert (g.ispts.frac(edges), [0.99; 0.5; 0.01; 1/3], sqrt (eps)); + assert (g.ispts.incoord(edges, :), ... + [0.099, 0; 0, -0.05; -0.001, 0; 0, 1/30], sqrt (eps)); +***** error + phi = [-1, -1; 1, 1]; + ls_find_geometry (phi); +***** test + phi = ones (3, 3); + phi(2, 2) = -1; + geom = ls_find_geometry (phi); + + % Permute the component array such that it starts with the north point + % and then compare coordinates. Note that the "north" point is "south" + % in matrix interpretation and thus has "outindex" of 6. + assert (geom.gamma.n, 1); + c = geom.gamma.ispts{1}'; + while (geom.ispts.inout(c(1), 2) != 6) + c = [c(2 : end), c(1)]; + endwhile + assert (geom.ispts.incoord(c, :), ... + [0, 1/2; -1/2, 0; 0, -1/2; 1/2, 0], sqrt (eps)); +***** function checkBoundaryDirection (pts, dir) + pts(end + 1, :) = pts(1, :); + for i = 1 : length (pts) - 1 + a = [pts(i, :), 0]; + b = [pts(i + 1, :), 0]; + z = cross (a, b); + assert (z(1 : 2), [0, 0]); + assert (sign (z(3)), dir); + endfor +***** endfunction +***** test + n = 50; + x = linspace (-10, 10, n); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + + phi = ls_setdiff (ls_genbasic (XX, YY, "sphere", [0, 0], 8), ... + ls_genbasic (XX, YY, "sphere", [0, 0], 4)); + phi = ls_normalise (phi, h); + geom = ls_find_geometry (phi, h); + geom = ls_absolute_geom (geom, XX, YY); + + assert (geom.gamma.n, 2); + len1 = length (geom.gamma.ispts{1}); + len2 = length (geom.gamma.ispts{2}); + if (len1 < len2) + outer = geom.gamma.ispts{2}; + inner = geom.gamma.ispts{1}; + else + assert (len1 > len2); + outer = geom.gamma.ispts{1}; + inner = geom.gamma.ispts{2}; + endif + + checkBoundaryDirection (geom.ispts.coord(outer, :), 1); + checkBoundaryDirection (geom.ispts.coord(inner, :), -1); +***** test + phi = ones (4, 4); + phi(2, 2) = -1; + phi(3, 3) = -1; + + geom = ls_find_geometry (phi); + assert (geom.gamma.n, 2); + geom = ls_find_geometry (-phi); + assert (geom.gamma.n, 1); + + % Now also try with other "kind" of narrow pair. + phi = phi(:, end : -1 : 1); + geom = ls_find_geometry (phi); + assert (geom.gamma.n, 2); + geom = ls_find_geometry (-phi); + assert (geom.gamma.n, 1); ***** demo - pkg load parallel; + n = 15; + x = linspace (-10, 10, n); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + + r1 = sqrt (2) * 2.9; + r2 = 3; + phi = ls_union (ls_genbasic (XX, YY, "sphere", [-3, -3], r1), ... + ls_genbasic (XX, YY, "sphere", [3, 3], r1), ... + ls_genbasic (XX, YY, "sphere", [-5, 5], r2), ... + ls_genbasic (XX, YY, "sphere", [5, -5], r2)); + + phi = ls_normalise (phi, h); + g = ls_find_geometry (phi, h, 0.2); + g = ls_absolute_geom (g, XX, YY); + + figure (); + hold ("on"); + for i = 1 : size (g.elem.nodelist, 1) + nodes = g.elem.nodelist(i, :); + switch (g.elem.type(i)) + case -1 + colour = [0.5, 0.5, 1]; + case 0 + colour = [1, 0.5, 0.5]; + case 1 + colour = [0.8, 0.8, 0.8]; + endswitch + patch (XX(nodes), YY(nodes), colour); + endfor + + plot (g.ispts.coord(:, 1), g.ispts.coord(:, 2), "k.", "MarkerSize", 8); + for i = 1 : g.gamma.n + pts = g.gamma.ispts{i}; + pts(end + 1) = pts(1); + plot (g.ispts.coord(pts, 1), g.ispts.coord(pts, 2), "k-", "LineWidth", 2); + endfor + + contour (XX, YY, phi, [0, 0], "g"); + + axis ([min(x), max(x), min(x), max(x)]); + axis ("equal"); + grid ("on"); + set (gca (), "xtick", x, "ytick", x, "xticklabel", "", "yticklabel", ""); + hold ("off"); +12 tests, 12 passed, 0 known failure, 0 skipped +[inst/ls_genbasic.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_genbasic.m +***** shared x, y, XX, YY, XXX, YYY, ZZZ + n = 121; + x = linspace (-5, 7, n); + y = linspace (-7, 5, n); + [XX, YY] = meshgrid (x, y); + [XXX, YYY, ZZZ] = ndgrid (x, y, x); +***** error + ls_genbasic (); +***** error + ls_genbasic (1, 2); +***** error + ls_genbasic ("sphere"); +***** error + ls_genbasic (XX, YY, "unknown"); +***** test + ls_genbasic (x, "sphere", 0, 1); + ls_genbasic (x', "sphere", 0, 1); + ls_genbasic (XX, YY, "sphere", [0, 0], 1); + ls_genbasic (0, 1, "sphere", [0, 0], 1); +***** error + ls_genbasic (XX, YY, "sphere"); +***** error + ls_genbasic (XX, YY, "sphere", 1); +***** error + ls_genbasic (XX, YY, "sphere", 1, 2, 3); +***** error + ls_genbasic (XX, YY, "sphere", [1, 2, 3], 1); +***** error + ls_genbasic (XX, YY, "sphere", [1, 2], [1, 2, 3]); +***** test + assert (ls_genbasic (XX, YY, "sphere", [1, -1], 1), ... + ls_genbasic (XX, YY, "sphere", [1, -1], [1, 1])); +***** test + c = [1; -1; 2]; + r = [1; 2; 0.6]; + tol = 0.4; + phi1 = ls_genbasic (XXX, YYY, ZZZ, "sphere", c, r); + phi2 = ls_genbasic (XXX, YYY, ZZZ, "sphere", c, min (r) - tol); + assert (ls_issubset (phi2, phi1)); + coords = {XXX, YYY, ZZZ}; + for i = 1 : length (c) + assert (ls_disjoint (phi1, ... + coords{i} - (c(i) - r(i)), ... + c(i) + r(i) - coords{i})); + assert (~ls_disjoint (phi1 - tol, coords{i} - (c(i) - r(i)))); + assert (~ls_disjoint (phi1 - tol, c(i) + r(i) - coords{i})); + endfor +***** error + ls_genbasic (XX, YY, "box", 1); +***** error + ls_genbasic (XX, YY, "box", 1, 2, 3); +***** error + ls_genbasic (XX, YY, "box", [1, 2, 3], [1, 2]); +***** error + ls_genbasic (XX, YY, "box", [1; 2], [1, 2, 3]); +***** test + assert (ls_equal (ls_genbasic (x, "box", -1, 2), abs (x - 0.5) - 1.5)); + assert (ls_equal (ls_genbasic (x, "box", 2, -1), abs (x - 0.5) - 1.5)); +***** test + a = [2; -3; 1]; + b = [0; 2; -1]; + tol = 0.2; + phi1 = ls_genbasic (XXX, YYY, ZZZ, "box", a, b); + phi2 = ls_genbasic (XXX, YYY, ZZZ, "box", b, a); + assert (phi1, phi2); + coords = {XXX, YYY, ZZZ}; + for i = 1 : length (coords) + assert (ls_disjoint (phi1, ... + coords{i} - min (a(i), b(i)), ... + max (a(i), b(i)) - coords{i})); + assert (~ls_disjoint (phi1 - tol, coords{i} - min (a(i), b(i)))); + assert (~ls_disjoint (phi1 - tol, max (a(i), b(i)) - coords{i})); + endfor +***** error + ls_genbasic (XX, YY, "half", 1); +***** error + ls_genbasic (XX, YY, "half", 1, 2, 3); +***** error + ls_genbasic (XX, YY, "half", [1, 2, 3], [1, 2]); +***** error + ls_genbasic (XX, YY, "half", [1; 2], [1, 2, 3]); +***** test + p = [0, 2, 1]; + + phi = ls_genbasic (XXX, YYY, ZZZ, "half", p, [0; 0; 1]); + assert (ls_equal (phi, 1 - ZZZ)); + + normal = [1; 2; -0.5]; + phi1 = ls_genbasic (XXX, YYY, ZZZ, "half", p, normal); + phi2 = ls_genbasic (XXX, YYY, ZZZ, "half", p, 2 * normal); + assert (ls_equal (phi1, phi2)); + + phi = ls_genbasic (XX, YY, "half", [0, 0], [1, -1]); + assert (ls_equal (phi, YY - XX)); +***** demo + n = 200; + x = linspace (-7, 7, n); + [XX, YY] = meshgrid (x, x); + + phi1 = ls_genbasic (XX, YY, "box", [-5, -3], [3, 6]); + phi2 = ls_genbasic (XX, YY, "sphere", [-1; 1], 2); + phi3 = ls_genbasic (XX, YY, "sphere", [0; 0], [6, 1]); + phi4 = ls_genbasic (XX, YY, "half", [3, -3], [1, -2]) / 8; + + phi = ls_union (ls_setdiff (phi1, phi2), phi3, phi4); + figure (); + hold ("on"); + imagesc (x, x, phi); + set (gca (), "ydir", "normal"); + ls_sign_colourmap (); + contour (XX, YY, phi, [0, 0], "k"); + hold ("off"); + axis ("equal"); +23 tests, 23 passed, 0 known failure, 0 skipped +[inst/ls_issubset.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_issubset.m +***** error + ls_issubset (1) +***** error + ls_issubset (1, 2, 3) +***** error + ls_issubset (1, [1, 2]) +***** test + n = 50; + x = linspace (-10, 10, n); + [XX, YY] = meshgrid (x, x); + + phi1 = XX.^2 + YY.^2 - 1^2; + phi2 = XX.^2 + YY.^2 - 5^2; + phi3 = XX.^2 + YY.^2 - 8^2; + phi4 = (XX - 3).^2 + YY.^2 - 3^2; + + assert (ls_issubset (phi1, phi2)); + assert (ls_issubset (phi4, phi3)); + assert (~ls_issubset (phi4, phi2)); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/so_run_descent.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_run_descent.m +***** shared data, phi0 data = struct (); data.p = so_init_params (false); data.p.vol = 10; data.p.weight = 50; - data.p.nSteps = 10; - data.figs = struct (); - data.figs.speed = figure (); - data.figs.exploreCosts = figure (); + n = 100; + x = linspace (-10, 10, n); + h = x(2) - x(1); + data.g = struct ("x", x, "h", h); + + data = so_example_problem (data); + data.handler = struct (); + + phi0 = ls_genbasic (data.g.x, "box", -3, 5); +***** error + so_run_descent (1, 2); +***** error + so_run_descent (1, 2, 3, 4); +***** error + so_run_descent (0, phi0, data); +***** error + so_run_descent (1.5, phi0, data); +***** error + so_run_descent ([2, 3], phi0, data); +***** error + d = data; + d.p.descent.initialStep = 0; + so_run_descent (1, phi0, d); +***** test + nSteps = 12; + + [s, descentLog] = so_run_descent (nSteps, phi0, data); + assert (s.cost, 0, 1e-3); + assert (length (descentLog.costs), nSteps + 1); + assert (descentLog.costs(end), s.cost); + %semilogy (descentLog.costs, "o"); +***** test + tol = 5e-2; + nSteps = 100; + d = data; + d.cb.check_stop = @(data) (data.cost < tol); + + [s, descentLog] = so_run_descent (nSteps, phi0, d); + assert (s.cost < tol); + printf ("Steps needed: %d\n", descentLog.steps); + assert (descentLog.steps < nSteps); +Steps needed: 8 +***** demo + data = struct (); + data.p = so_init_params (true); + data.p.vol = 10; + data.p.weight = 50; n = 100; x = linspace (-10, 10, n); h = x(2) - x(1); data.g = struct ("x", x, "h", h); + % Look at so_example_problem to see how the callbacks + % and the plotting handler is defined. data = so_example_problem (data); + phi0 = ls_genbasic (data.g.x, "box", -3, 7); + [s, descentLog] = so_run_descent (5, phi0, data); - printf ("Computing descent...\n"); - f = tmpfile (); - d = data; - d.handler = struct (); - d = so_save_descent (f, struct (), d); - s = so_run_descent (data.p.nSteps, phi0, d); + figure (); + semilogy (0 : descentLog.steps, descentLog.costs, "o"); + title ("Cost Descrease"); + + printf ("\nFinal interval: [%.6d, %.6d]\n", s.a, s.b); printf ("Final cost: %.6d\n", s.cost); +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/so_step_armijo.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_step_armijo.m +***** function s = updateState (phi, data) + inside = ls_inside (phi); + vol = data.g.h * length (find (inside)); + cost = 1 / vol; - printf ("\nNow replaying...\n"); - init = @() data; - frewind (f); - so_explore_descent (f, init); - fclose (f); + % Throw if the volume is too large. This is used + % to check the error handling code. + if (vol > 15) + error ("volume too large"); + endif + + s = struct ("phi", phi, "cost", cost); +***** endfunction +***** shared n, phi, baseData, d, f, dJ + n = 100; + x = linspace (-10, 10, n); + h = x(2) - x(1); + a = 0; + b = 5; + phi = ls_genbasic (x, "box", a, b); + + baseData = struct (); + baseData.p = so_init_params (false); + baseData.g = struct ("x", x, "h", h); + baseData.cb = struct ("update_state", @updateState); + baseData.s = updateState (phi, baseData); + baseData.s.phi = phi; + + f = ones (size (phi)); + d = ls_solve_stationary (phi, f, h); + + curVol = b - a; + dJ = -2 / curVol^2; +***** error + so_step_armijo (1, 2, 3, 4) +***** error + so_step_armijo (1, 2, 3, 4, 5, 6) +***** error + so_step_armijo ([1, 1], 2, 3, 4, struct ()) +***** error + so_step_armijo (1, 2, 3, [4, 4], struct ()) +***** error + so_step_armijo (1, 2, 3, 4, 5) +***** error + so_step_armijo (1, d, f, 4, baseData) +***** error + so_step_armijo (1, 2, f, dJ, baseData) +***** error + so_step_armijo (1, 2, 3, dJ, baseData) +***** error + data = baseData; + data.p.lineSearch.relaxation = 0; + so_step_armijo (1, d, f, dJ, data); +***** error + data = baseData; + data.p.lineSearch.relaxation = 1; + so_step_armijo (1, d, f, dJ, data); +***** error + data = baseData; + data.p.lineSearch.backtrack = 0; + so_step_armijo (1, d, f, dJ, data); +***** error + data = baseData; + data.p.lineSearch.backtrack = 1; + so_step_armijo (1, d, f, dJ, data); +***** error + data = baseData; + data.p.lineSearch.initial = 1; + so_step_armijo (1, d, f, dJ, data); +***** error + data = baseData; + data.p.lineSearch.minStep = -1; + so_step_armijo (1, d, f, dJ, data); +***** test + data = baseData; + data.p.lineSearch.minStep = 0; + so_step_armijo (1, d, f, dJ, data); +***** test + data = baseData; + data.p.verbose = true; + data.p.lineSearch.relaxation = 0.9; + [~, t] = so_step_armijo (1, d, f, dJ, data); + assert (t < 0.5); +Armijo step 2.000000: cost = 0.110000 +Armijo step 1.600000: cost = 0.120732 +Armijo step 1.280000: cost = 0.133784 +Armijo step 1.024000: cost = 0.141429 +Armijo step 0.819200: cost = 0.150000 +Armijo step 0.655360: cost = 0.159677 +Armijo step 0.524288: cost = 0.165000 +Armijo step 0.419430: cost = 0.170690 +Armijo step 0.335544: cost = 0.176786 +Armijo step 0.268435: cost = 0.183333 +Armijo step 0.214748: cost = 0.183333 +Armijo step 0.171799: cost = 0.183333 +***** test + so_step_armijo (2, d, f, dJ, baseData); +***** error + so_step_armijo (3, d, f, dJ, baseData); +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/ls_equal.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_equal.m +***** error + ls_equal (1) +***** error + ls_equal (1, 2, 3) +***** error + ls_equal (1, [1, 2]) +***** test + assert (ls_equal ([Inf, 0, -2, -Inf, eps], ... + [1, 0, -Inf, -eps, 1])); + assert (ls_equal ([1, 0; -1, 0], [Inf, 0; -5, 0])); + assert (!ls_equal ([1, -1; 0, 0], [1, 0; 0, 0])); +***** test + if (exist ("signbit") == 5) + assert (ls_equal ([0, -0], [1, -1])); + else + warning ("'signbit' function not available, skipping test."); + endif 5 tests, 5 passed, 0 known failure, 0 skipped -[inst/ls_disjoint.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_disjoint.m +[inst/ls_build_mesh.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_build_mesh.m ***** error - ls_disjoint () -***** error - ls_disjoint (1, -2, [1, 2]) + ls_build_mesh (1) +***** error + ls_build_mesh (1, 2, 3, 4) +***** error + x = linspace (-10, 10, 10); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + phi = ls_genbasic (XX, YY, "sphere", [0, 0], 5); + phi = ls_normalise (phi, h); + geom = ls_find_geometry (phi, h); + ls_build_mesh (geom, phi); +***** function verifyDirection (a, b, centre) + v1 = [a - centre; 0]; + v2 = [b - centre; 0]; + x = cross (v1, v2); + assert (x(1 : 2), zeros (2, 1)); + assert (x(3) > 0); +***** endfunction +***** function verifyMesh (geom, phi, glob) + [mesh, vmap] = ls_build_mesh (geom, phi, glob); + nPts = prod (geom.dim); + + % Verify ordering of triangle points. + for i = 1 : size (mesh.t, 2) + verifyDirection (mesh.p(:, mesh.t(1, i)), mesh.p(:, mesh.t(2, i)), ... + mesh.p(:, mesh.t(3, i))); + endfor + + % Go through all grid points and verify them with the mesh. + for i = 1 : nPts + gridInd = vmap.grid(i); + if (isna (gridInd)) + assert (!glob); + continue; + endif + + assert (vmap.mesh(gridInd), i); + assert (mesh.p(:, gridInd), geom.nodes.coord(i, :)'); + endfor + + % Go through all intersection points and verify them. + for i = 1 : geom.ispts.n + gridInd = vmap.ispt(i); + assert (vmap.mesh(gridInd), -i); + assert (mesh.p(:, gridInd), geom.ispts.coord(i, :)'); + endfor + + % Verify mesh.e against geom.bedges. + for i = 1 : geom.bedges.n + assert (mesh.e(1 : 2, i), vmap.ispt(geom.bedges.ispts(i, :)')); + assert (mesh.e(5, i), geom.bedges.comp(i)); + endfor +***** endfunction +***** function verifyPhi (phi, XX, YY, h) + for s = [-1, 1] + cur = phi * s; + cur = ls_normalise (cur, h); + geom = ls_find_geometry (cur, h); + geom = ls_absolute_geom (geom, XX, YY); + + verifyMesh (geom, cur, false); + verifyMesh (geom, cur, true); + endfor +***** endfunction ***** test - assert (ls_disjoint ([-1, 0, 1], [0, 0, 0], [1, 0, -1])); - assert (~ls_disjoint ([Inf, -Inf, 1], [-1, -1, 1])); - assert (~ls_disjoint ([-1, -1, 1], [0, 0, 0], [1, -1, -1])); + n = 20; + x = linspace (-10, 10, n); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + + phi = ls_union (ls_genbasic (XX, YY, "sphere", [-6, -6], 3), ... + ls_genbasic (XX, YY, "sphere", [6, 6], 3)); + verifyPhi (phi, XX, YY, h); + + phi = ls_setdiff (ls_genbasic (XX, YY, "sphere", [0, 0], 8), ... + ls_genbasic (XX, YY, "sphere", [0, 0], 4)); + verifyPhi (phi, XX, YY, h); +***** demo + x = linspace (-10, 10, 11); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + + phi = ls_union (ls_genbasic (XX, YY, "sphere", [5, 5], 4.5), ... + ls_genbasic (XX, YY, "sphere", [-2, -2], 4)); + phi = ls_normalise (phi, h); + geom = ls_find_geometry (phi, h); + geom = ls_absolute_geom (geom, XX, YY); + + mesh = ls_build_mesh (geom, phi, false); + meshGlob = ls_build_mesh (geom, phi, true); + + figure (); + hold ("on"); + trimesh (meshGlob.t(1 : 3, :)', meshGlob.p(1, :), meshGlob.p(2, :), "r"); + trimesh (mesh.t(1 : 3, :)', mesh.p(1, :), mesh.p(2, :), "g"); + for i = 1 : size (mesh.e, 2) + plot (mesh.p(1, mesh.e(1 : 2, i)), mesh.p(2, mesh.e(1 : 2, i)), "b"); + endfor + hold ("off"); + legend ("Global", "Domain", "Boundary"); + axis ("equal"); + axis ("square"); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/ls_absolute_geom.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_absolute_geom.m +***** error + ls_absolute_geom (1, 2); +***** error + ls_absolute_geom (1, 2, 3, 4); +***** error + x = [-1, 1]; + [XX, YY, ZZ] = ndgrid (x); + ls_absolute_geom (struct (), XX, YY); +***** error + ls_absolute_geom (struct (), [-1, 0, 1], [0, 0, 0]); +***** error + ls_absolute_geom (struct (), zeros (3, 2), zeros (2, 2)); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/ls_nb_from_geom.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_nb_from_geom.m +***** error + ls_nb_from_geom (1) +***** error + ls_nb_from_geom (1, 2, 3, 4) +***** error + [a, b] = ls_nb_from_geom (1, 2); +***** error + ls_nb_from_geom (1, 2, rand (2, 2)); +***** error + x = linspace (-10, 10, 10); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + phi = ls_genbasic (XX, YY, "sphere", [0, 0], 5); + phi = ls_normalise (phi, h); + geom = ls_find_geometry (phi, h); + ls_nb_from_geom (geom, phi); +***** error + x = linspace (-10, 10, 10); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + phi = ls_genbasic (XX, YY, "sphere", [0, 0], 5); + phi = ls_normalise (phi, h); + geom = ls_find_geometry (phi, h); + ls_nb_from_geom (geom, phi, [1, 2, 3]); ***** test n = 50; x = linspace (-10, 10, n); + h = x(2) - x(1); [XX, YY] = meshgrid (x, x); - phi1 = (XX - 2).^2 + (YY - 2).^2 - 2^2; - phi2 = (XX + 2).^2 + (YY + 2).^2 - 2^2; - phi3 = XX.^2 + YY.^2 - 2^2; + phi = ls_setdiff (ls_genbasic (XX, YY, "sphere", [0, 0], 8), ... + ls_genbasic (XX, YY, "sphere", [1, 1], 5)); + phi = ls_normalise (phi, h); + geom = ls_find_geometry (phi, h); + geom = ls_absolute_geom (geom, XX, YY); - assert (ls_disjoint (phi1, phi2)); - assert (~ls_disjoint (phi1, phi3)); - assert (~ls_disjoint (phi2, phi3)); - assert (~ls_disjoint (phi1, phi2, phi3)); -4 tests, 4 passed, 0 known failure, 0 skipped + dOld = ls_init_narrowband (phi, h); + dNew = ls_nb_from_geom (geom, phi); + + where = (!isna (dOld)); + assert (all (!isna (dNew(where)))); + assert (dNew(where), dOld(where), h / 4); +***** demo + n = 50; + x = linspace (-10, 10, n); + h = x(2) - x(1); + [XX, YY] = meshgrid (x, x); + + phi = ls_genbasic (XX, YY, "sphere", [0, 0], 3); + phi = ls_normalise (phi, h); + geom = ls_find_geometry (phi, h); + geom = ls_absolute_geom (geom, XX, YY); + + g0 = NA (1, geom.bedges.n); + for i = 1 : geom.bedges.n + a = geom.ispts.coord(geom.bedges.ispts(i, 1), :); + b = geom.ispts.coord(geom.bedges.ispts(i, 2), :); + m = (a + b) / 2; + angle = abs (atan2 (m(2), m(1))); + g0(i) = min (angle, 2 * pi - angle); + endfor + + [d, g] = ls_nb_from_geom (geom, phi, g0); + [d, g] = fastmarching (d, g, h * ones (size (phi))); + + figure (); + hold ("on"); + imagesc (x, x, g); + set (gca (), "ydir", "normal"); + contour (XX, YY, phi, [0, 0], "k"); + hold ("off"); + colorbar (); +7 tests, 7 passed, 0 known failure, 0 skipped [inst/ls_hausdorff_dist.m] >>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_hausdorff_dist.m ***** error @@ -3265,22 +4376,22 @@ sdDiff = norm (sdA(:) - sdB(:), inf); assert (abs (sdDiff - d1) > 10 * h); 6 tests, 6 passed, 0 known failure, 0 skipped -[inst/ls_distance_fcn.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_distance_fcn.m +[inst/ls_signed_distance.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_signed_distance.m ***** error - ls_distance_fcn () + ls_signed_distance () ***** error - ls_distance_fcn (1, 2, 3) + ls_signed_distance (1, 2, 3) ***** test - assert (ls_distance_fcn ([]), []); + assert (ls_signed_distance ([]), []); ***** test n = 10; x = linspace (-2, 2, n); h = x(2) - x(1); phi = abs (x) - 1; - d = ls_distance_fcn (phi, h); - assert (d, max (phi, 0), sqrt (eps)); + d = ls_signed_distance (phi, h); + assert (d, phi, sqrt (eps)); ***** test n = 50; x = linspace (-2, 2, n); @@ -3289,83 +4400,91 @@ RRsq = XX.^2 + YY.^2 + ZZ.^2; phi = RRsq - 1; - d = ls_distance_fcn (phi, h); - assert (d, max (sqrt (RRsq) - 1, 0), h); -***** xtest - n = 500; - x = linspace (-10, 10, n); - h = x(2) - x(1); - - [XX, YY] = meshgrid (x, x); - phi = ls_genbasic (XX, YY, "sphere", [0, 0], 8); - - id = tic (); - d = ls_distance_fcn (phi, h); - time1 = toc (id); - - id = tic (); - sd = ls_signed_distance (phi, h); - time2 = toc (id); - - assert (d, max (sd, 0), sqrt (eps)); - printf ("ls_distance_fcn faster than ls_signed_distance by %.1f%%\n", ... - 100 * ((time2 - time1) / time2)); - assert (time1 < time2); -ls_distance_fcn faster than ls_signed_distance by 20.2% + d = ls_signed_distance (phi, h); + assert (d, sqrt (RRsq) - 1, h); +***** test + phi = [5e-6, 1.7e-154, -1.3e-2]; + for h = [0.02, 0.01, 0.005] + d = ls_signed_distance (phi, h); + assert (all (isfinite (d))); + assert (d(2), 0); + endfor ***** test phis = ls_get_tests (); for i = 1 : length (phis) phi = ls_normalise (phis{i}); - d = ls_distance_fcn (phi); - sd = ls_signed_distance (phi); - assert (d, max (sd, 0), sqrt (eps)); + d = ls_signed_distance (phi); + assert (ls_equal (d, phi)); endfor +***** test + if (exist ("signbit") == 5) + phi = [-0, 0]; + d = ls_signed_distance (phi); + assert (ls_equal (phi, d)); + else + warning ("'signbit' function not available, skipping test."); + endif ***** demo n = 100; x = linspace (-10, 10, n); h = x(2) - x(1); [XX, YY] = meshgrid (x, x); - phi = ls_genbasic (XX, YY, "sphere", [0, 0], [8, 5]); - d = ls_distance_fcn (phi, h); + phi0 = atan (ls_union ((XX.^2 + (YY - 5).^2) - 20, ... + (XX.^2 + (YY + 5).^2) - 20)); + %phi0 = XX.^2 / 1.3^2 + YY.^2 - 1; + d = ls_signed_distance (phi0, h); figure (); - mesh (XX, YY, d); - view ([45, 45]); -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/ls_setxor.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_setxor.m -***** error - ls_setxor (1) + subplot (1, 2, 1); + contour (XX, YY, phi0); + title ("Initial"); + colorbar (); + axis ("equal"); + + subplot (1, 2, 2); + contour (XX, YY, d); + title ("Signed Distance"); + colorbar (); + axis ("equal"); +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/ls_union.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_union.m ***** error - ls_setxor (1, 2, 3) -***** error - ls_setxor (1, [1, 2]) + ls_union () +***** error + ls_union (1, -2, [1, 2]) ***** test - assert (ls_equal (ls_setxor ([-1, -1, Inf], [1, -1, -Inf]), [-1, 1, -1])); n = 50; x = linspace (-10, 10, n); - h = x(2) - x(1); [XX, YY] = meshgrid (x, x); - phi1 = XX.^2 + YY.^2 - 8^2; - phi2 = XX.^2 + YY.^2 - 5^2; + phi1 = (XX - 3).^2 + (YY - 3).^2 - 2^2; + phi2 = (XX + 3).^2 + (YY + 3).^2 - 2^2; + phi3 = XX.^2 + YY.^2 - 2^2; - assert (ls_equal (ls_setdiff (phi1, phi2), ls_setxor (phi1, phi2))); + phi = ls_union (phi1, phi2, phi3); + assert (ls_issubset (phi1, phi)); + assert (ls_issubset (phi2, phi)); + assert (ls_issubset (phi3, phi)); + + assert (ls_union (phi3), phi3); ***** demo n = 100; x = linspace (-7, 7, n); [XX, YY] = meshgrid (x, x); - phi1 = (XX - 2).^2 + YY.^2 - 3^2; - phi2 = (XX + 2).^2 + YY.^2 - 3^2; - phi = ls_setxor (phi1, phi2); + phi1 = (XX - 2 * cos (7/6 * pi)).^2 + (YY - 2 * sin (7/6 * pi)).^2 - 3^2; + phi2 = (XX - 2 * cos (11/6 * pi)).^2 + (YY - 2 * sin (11/6 * pi)).^2 - 3^2; + phi3 = XX.^2 + (YY - 2).^2 - 3^2; + phi = ls_union (phi1, phi2, phi3); figure (); subplot (1, 2, 1); hold ("on"); contour (XX, YY, phi1, [0, 0], "k"); contour (XX, YY, phi2, [0, 0], "k"); + contour (XX, YY, phi3, [0, 0], "k"); hold ("off"); axis ("equal"); @@ -3377,153 +4496,210 @@ contour (XX, YY, phi, [0, 0], "k"); hold ("off"); axis ("equal"); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/ls_init_narrowband.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_init_narrowband.m +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/so_example_problem.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_example_problem.m +***** shared basicData + basicData = struct (); + basicData.p = so_init_params (true); + basicData.p.vol = 4; + basicData.p.weight = 10; + + n = 50; + x = linspace (-4, 5, n); + h = x(2) - x(1); + basicData.g = struct ("x", x, "h", h); ***** error - ls_init_narrowband () + so_example_problem (); ***** error - ls_init_narrowband (1, 2, 3) + so_example_problem (1, 2); +***** error + so_example_problem (1); ***** test - assert (ls_init_narrowband ([]), []); + data = so_example_problem (basicData); + phi = ls_genbasic (data.g.x, "box", -2.5, 1.3); + + [a, b] = data.util.bounds (phi, data); + assert (a, -2.5, sqrt (eps)); + assert (b, 1.3, sqrt (eps)); ***** test - n = 10; - x = linspace (-2, 2, n); - h = x(2) - x(1); - phi = abs (x) - 1; + data = so_example_problem (basicData); - d = ls_init_narrowband (phi, h); - where = ~isna (d); - assert (d(where), phi(where), sqrt (eps)); + phi = ls_genbasic (data.g.x, "box", -2, 2); + s0 = data.cb.update_state (phi, data); + + phi = ls_genbasic (data.g.x, "box", -3, 3); + s1 = data.cb.update_state (phi, data); + + phi = ls_genbasic (data.g.x, "box", -1, 1); + s2 = data.cb.update_state (phi, data); + + phi = ls_genbasic (data.g.x, "box", -1, 3); + s3 = data.cb.update_state (phi, data); + + phi = ls_genbasic (data.g.x, "box", -3, 1); + s4 = data.cb.update_state (phi, data); + + assert (all ([s0.cost, s1.cost, s2.cost, s3.cost, s4.cost] >= 0)); + assert (s0.cost, 0, 1e-1); + assert (s1.cost > s3.cost); + assert (s1.cost > s4.cost); + assert (s2.cost > s3.cost); + assert (s2.cost > s4.cost); + assert (s3.cost > s0.cost); + assert (s4.cost > s0.cost); +***** function testDeriv (a, b, data) + phi = ls_genbasic (data.g.x, "box", a, b); + data.s = data.cb.update_state (phi, data); + [f, dJ] = data.cb.get_direction (data); + assert (dJ < 0); + + dt = 5e-3; + dists = ls_solve_stationary (phi, f, data.g.h); + phip = ls_extract_solution (dt, dists, phi, f); + sp = data.cb.update_state (phip, data); + + assert (sp.cost < data.s.cost); + relErr = abs (sp.cost - (data.s.cost + dt * dJ)) / data.s.cost; + assert (relErr < 0.1); +***** endfunction ***** test - n = 50; - x = linspace (-2, 2, n); - h = x(2) - x(1); - [XX, YY, ZZ] = ndgrid (x); - RRsq = XX.^2 + YY.^2 + ZZ.^2; - phi = RRsq - 1; + data = so_example_problem (basicData); - d = ls_init_narrowband (phi, h); - where = ~isna (d); - assert (d(where), sqrt (RRsq(where)) - 1, h / 3); + testDeriv (-1, 1, data); + testDeriv (-3, 3, data); + testDeriv (-1, 3, data); + testDeriv (-3, 1, data); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/so_save_descent.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_save_descent.m +***** error + so_save_descent (1, 2); +***** error + so_save_descent (1, 2, 3, 4); +***** error + so_save_descent (1, 2, 3); +***** error + so_save_descent (struct (), 2, struct ()); +***** error + so_save_descent ([2, 3], 2, struct ()); +***** error <'fsave' is not available> + pkg unload -nodeps parallel; + so_save_descent ("foo", 2, struct ()); ***** test - tol = sqrt (eps); - assert (ls_init_narrowband ([Inf, -Inf, Inf]), [0.5, -0.5, 0.5], tol); - assert (ls_init_narrowband ([Inf, -1, Inf]), [1, 0, 1], tol); - %assert (ls_init_narrowband ([1, -Inf, 1]), [0, 1, 0], tol); -***** function dh = distToSegment (x, a, b) - dir = b - a; - dir /= norm (dir); - proj = dot (x - a, dir); - if (proj < 0) - dh = norm (x - a); - elseif (proj > 1) - dh = norm (x - b); - else - dh = norm (x - (a + proj * dir)); - endif -***** endfunction -***** function dh = distToLine (x, c) - assert (c(1, 1), 0); - dh = Inf; - for i = 2 : size (c, 2) - 1 - dh = min (dh, distToSegment (x, c(:, i), c(:, i + 1))); - endfor -***** endfunction -***** function dh = distOfContoursAsym (c1, c2) - dh = 0; - for i = 2 : size (c1, 2) - dh = max (dh, distToLine (c1(:, i), c2)); - endfor -***** endfunction -***** function dh = distOfContours (c1, c2) - dh = max (distOfContoursAsym (c1, c2), distOfContoursAsym (c2, c1)); -***** endfunction + pkg load parallel; + so_save_descent ("foo", 2, struct ()); + so_save_descent (5, 2, struct ()); +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/so_init_params.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_init_params.m +***** error + so_init_params () +***** error + so_init_params (true, 1, 2) +***** error + so_init_params (true, 0); +***** error + so_init_params (true, 1.5); ***** test - phis = ls_get_tests (); - printf ("Comparing contours for %d cases...\n", length (phis)); - for i = 1 : length (phis) - d = ls_init_narrowband (phis{i}); - c1 = contourc (d, [0, 0]); - if (size (c1, 2) > 0) - c2 = contourc (phis{i}, [0, 0]); - dh = distOfContours (c1, c2); - printf ("i = %d: dist = %f\n", i, dh); - if (isfinite (dh)) - assert (dh, 0, 1e-1); - endif - endif - endfor -Comparing contours for 6 cases... -i = 1: dist = 0.060660 -i = 2: dist = Inf -i = 4: dist = 0.039039 -i = 5: dist = 0.085786 -i = 6: dist = 0.085786 + p = so_init_params (true); +***** error <'pararrayfun' is not available> + pkg unload -nodeps parallel; + p = so_init_params (true, 2); +***** test + pkg load parallel; + p = so_init_params (true, 2); 7 tests, 7 passed, 0 known failure, 0 skipped -[inst/ls_setdiff.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_setdiff.m +[inst/ls_normalise.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_normalise.m ***** error - ls_setdiff (1) + ls_normalise () ***** error - ls_setdiff (1, 2, 3) -***** error - ls_setdiff (1, [1, 2]) + ls_normalise (1, 2, 3, 4) ***** test - assert (ls_equal (ls_setdiff ([-1, -1, 1], [1, -1, -1]), [-1, 1, 1])); - n = 50; + h = 0.1; + zeroTol = 0.2; + phi = ones (4, 4); + phiEx = phi; + phi(2 : 3, 2 : 3) = [-eps, -0; 0, eps]; + phiEx(2 : 3, 2 : 3) = [-zeroTol*h, -zeroTol*h; zeroTol*h, zeroTol*h]; + phin = ls_normalise (phi, h, zeroTol); + if (exist ("signbit") == 5) + assert (phin, phiEx); + else + warning ("'signbit' function not available, skipping test."); + endif +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/ls_check.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_check.m +***** error + ls_check (1, 2) +***** error + ls_check (1, 2, 3, 4) +***** error + ls_check (1, "inside", [1, 2]); +***** error + ls_check (1, "foo", true); +***** error + ls_check (1, NA, false); +***** test + n = 100; x = linspace (-10, 10, n); - h = x(2) - x(1); [XX, YY] = meshgrid (x, x); - phi1 = XX.^2 + YY.^2 - 8^2; - phi2 = XX.^2 + YY.^2 - 5^2; + circ2 = (XX.^2 + YY.^2 < 2^2); + circ8 = (XX.^2 + YY.^2 < 8^2); + phi = (XX.^2 + YY.^2 - 5^2); - phi = ls_setdiff (phi1, phi2); - assert (ls_issubset (phi, phi1)); - assert (ls_disjoint (phi, phi2)); + assert (ls_check (phi, "inside", circ8)); + assert (ls_check (phi, "contain", circ2)); + assert (ls_check (phi, "outside", ~circ8)); - phi = ls_setdiff (phi2, phi1); - assert (ls_isempty (phi)); -***** demo - n = 100; - x = linspace (-7, 7, n); + assert (~ls_check (phi, "inside", circ2)); + assert (~ls_check (phi, "contain", circ8)); + assert (~ls_check (phi, "outside", circ8)); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/ls_intersect.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_intersect.m +***** error + ls_intersect () +***** error + ls_intersect (1, -2, [1, 2]) +***** test + n = 50; + x = linspace (-10, 10, n); [XX, YY] = meshgrid (x, x); - phi1 = (XX - 2).^2 + YY.^2 - 3^2; - phi2 = (XX + 2).^2 + YY.^2 - 3^2; - phi = ls_setdiff (phi1, phi2); + phi1 = (XX - 2).^2 + (YY - 2).^2 - 2^2; + phi2 = (XX + 2).^2 + (YY + 2).^2 - 2^2; + phi3 = XX.^2 + YY.^2 - 2^2; - figure (); - subplot (1, 2, 1); - hold ("on"); - contour (XX, YY, phi1, [0, 0], "k"); - contour (XX, YY, phi2, [0, 0], "k"); - hold ("off"); - axis ("equal"); + assert (ls_isempty (ls_intersect (phi1, phi2))); + assert (ls_intersect (phi3), phi3); - subplot (1, 2, 2); - hold ("on"); - imagesc (x, x, phi); - set (gca (), "ydir", "normal"); - ls_sign_colourmap (); - contour (XX, YY, phi, [0, 0], "k"); - hold ("off"); - axis ("equal"); + phi = ls_intersect (phi1, phi3); + assert (~ls_isempty (phi)); + assert (ls_issubset (phi, phi1) && ls_issubset (phi, phi3)); + + phi = ls_intersect (phi2, phi3); + assert (~ls_isempty (phi)); + assert (ls_issubset (phi, phi2) && ls_issubset (phi, phi3)); ***** demo n = 100; x = linspace (-7, 7, n); [XX, YY] = meshgrid (x, x); - phi1 = XX.^2 + YY.^2 - 6^2; - phi2 = XX.^2 + YY.^2 - 3^2; - phi = ls_setdiff (phi1, phi2); + phi1 = (XX - 2 * cos (7/6 * pi)).^2 + (YY - 2 * sin (7/6 * pi)).^2 - 3^2; + phi2 = (XX - 2 * cos (11/6 * pi)).^2 + (YY - 2 * sin (11/6 * pi)).^2 - 3^2; + phi3 = XX.^2 + (YY - 2).^2 - 3^2; + phi = ls_intersect (phi1, phi2, phi3); figure (); subplot (1, 2, 1); hold ("on"); contour (XX, YY, phi1, [0, 0], "k"); contour (XX, YY, phi2, [0, 0], "k"); + contour (XX, YY, phi3, [0, 0], "k"); hold ("off"); axis ("equal"); @@ -3535,7 +4711,7 @@ contour (XX, YY, phi, [0, 0], "k"); hold ("off"); axis ("equal"); -4 tests, 4 passed, 0 known failure, 0 skipped +3 tests, 3 passed, 0 known failure, 0 skipped [inst/ls_extract_solution.m] >>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_extract_solution.m ***** error @@ -3597,7 +4773,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3605,7 +4781,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3613,7 +4789,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3621,7 +4797,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3629,7 +4805,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3637,7 +4813,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3645,7 +4821,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3653,7 +4829,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3661,7 +4837,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3669,7 +4845,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3677,7 +4853,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3685,7 +4861,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3693,7 +4869,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3701,7 +4877,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3709,7 +4885,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3717,7 +4893,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3725,7 +4901,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3733,7 +4909,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3741,7 +4917,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3749,7 +4925,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3757,7 +4933,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3765,7 +4941,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3773,7 +4949,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.088561 to 0.090209 warning: called from @@ -3781,7 +4957,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3789,7 +4965,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3797,7 +4973,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3805,7 +4981,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3813,7 +4989,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3821,7 +4997,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3829,7 +5005,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3837,7 +5013,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3845,7 +5021,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3853,7 +5029,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3861,7 +5037,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3869,7 +5045,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3877,7 +5053,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3885,7 +5061,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3893,7 +5069,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3901,7 +5077,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3909,7 +5085,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3917,7 +5093,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3925,7 +5101,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3933,7 +5109,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3941,7 +5117,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3949,7 +5125,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3957,7 +5133,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3965,7 +5141,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 warning: increased distance in fast marching 0.105699 to 0.105896 warning: called from @@ -3973,7 +5149,7 @@ ls_signed_distance at line 45 column 5 __test__ at line 16 column 7 test at line 677 column 11 - /tmp/tmp.BDKZrjsjwO at line 118 column 31 + /tmp/tmp.FIWHElEeX1 at line 238 column 31 ***** demo n = 100; @@ -4008,176 +5184,30 @@ phi0 = ls_genbasic (XX, YY, "sphere", [0, 0], 3); ls_animate_evolution (phi0, F, h, linspace (0, 3, 40), 0.01); 8 tests, 8 passed, 0 known failure, 0 skipped -[inst/so_init_params.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_init_params.m -***** error - so_init_params () -***** error - so_init_params (true, 1, 2) -***** error - so_init_params (true, 0); -***** error - so_init_params (true, 1.5); -***** test - p = so_init_params (true); -***** error <'pararrayfun' is not available> - pkg unload -nodeps parallel; - p = so_init_params (true, 2); -***** test - pkg load parallel; - p = so_init_params (true, 2); -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/ls_normalise.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_normalise.m -***** error - ls_normalise () +[inst/ls_disjoint.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_disjoint.m ***** error - ls_normalise (1, 2, 3, 4) + ls_disjoint () +***** error + ls_disjoint (1, -2, [1, 2]) ***** test - h = 0.1; - zeroTol = 0.2; - phi = ones (4, 4); - phiEx = phi; - phi(2 : 3, 2 : 3) = [-eps, -0; 0, eps]; - phiEx(2 : 3, 2 : 3) = [-zeroTol*h, -zeroTol*h; zeroTol*h, zeroTol*h]; - phin = ls_normalise (phi, h, zeroTol); - if (exist ("signbit") == 5) - assert (phin, phiEx); - else - warning ("'signbit' function not available, skipping test."); - endif -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/ls_check.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_check.m -***** error - ls_check (1, 2) -***** error - ls_check (1, 2, 3, 4) -***** error - ls_check (1, "inside", [1, 2]); -***** error - ls_check (1, "foo", true); -***** error - ls_check (1, NA, false); + assert (ls_disjoint ([-1, 0, 1], [0, 0, 0], [1, 0, -1])); + assert (~ls_disjoint ([Inf, -Inf, 1], [-1, -1, 1])); + assert (~ls_disjoint ([-1, -1, 1], [0, 0, 0], [1, -1, -1])); ***** test - n = 100; + n = 50; x = linspace (-10, 10, n); [XX, YY] = meshgrid (x, x); - circ2 = (XX.^2 + YY.^2 < 2^2); - circ8 = (XX.^2 + YY.^2 < 8^2); - phi = (XX.^2 + YY.^2 - 5^2); - - assert (ls_check (phi, "inside", circ8)); - assert (ls_check (phi, "contain", circ2)); - assert (ls_check (phi, "outside", ~circ8)); - - assert (~ls_check (phi, "inside", circ2)); - assert (~ls_check (phi, "contain", circ8)); - assert (~ls_check (phi, "outside", circ8)); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/so_step_armijo.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_step_armijo.m -***** function s = updateState (phi, data) - inside = ls_inside (phi); - vol = data.g.h * length (find (inside)); - cost = 1 / vol; - - % Throw if the volume is too large. This is used - % to check the error handling code. - if (vol > 15) - error ("volume too large"); - endif - - s = struct ("phi", phi, "cost", cost); -***** endfunction -***** shared n, phi, baseData, d, f, dJ - n = 100; - x = linspace (-10, 10, n); - h = x(2) - x(1); - a = 0; - b = 5; - phi = ls_genbasic (x, "box", a, b); - - baseData = struct (); - baseData.p = so_init_params (false); - baseData.g = struct ("x", x, "h", h); - baseData.cb = struct ("update_state", @updateState); - baseData.s = updateState (phi, baseData); - baseData.s.phi = phi; - - f = ones (size (phi)); - d = ls_solve_stationary (phi, f, h); + phi1 = (XX - 2).^2 + (YY - 2).^2 - 2^2; + phi2 = (XX + 2).^2 + (YY + 2).^2 - 2^2; + phi3 = XX.^2 + YY.^2 - 2^2; - curVol = b - a; - dJ = -2 / curVol^2; -***** error - so_step_armijo (1, 2, 3, 4) -***** error - so_step_armijo (1, 2, 3, 4, 5, 6) -***** error - so_step_armijo ([1, 1], 2, 3, 4, struct ()) -***** error - so_step_armijo (1, 2, 3, [4, 4], struct ()) -***** error - so_step_armijo (1, 2, 3, 4, 5) -***** error - so_step_armijo (1, d, f, 4, baseData) -***** error - so_step_armijo (1, 2, f, dJ, baseData) -***** error - so_step_armijo (1, 2, 3, dJ, baseData) -***** error - data = baseData; - data.p.lineSearch.relaxation = 0; - so_step_armijo (1, d, f, dJ, data); -***** error - data = baseData; - data.p.lineSearch.relaxation = 1; - so_step_armijo (1, d, f, dJ, data); -***** error - data = baseData; - data.p.lineSearch.backtrack = 0; - so_step_armijo (1, d, f, dJ, data); -***** error - data = baseData; - data.p.lineSearch.backtrack = 1; - so_step_armijo (1, d, f, dJ, data); -***** error - data = baseData; - data.p.lineSearch.initial = 1; - so_step_armijo (1, d, f, dJ, data); -***** error - data = baseData; - data.p.lineSearch.minStep = -1; - so_step_armijo (1, d, f, dJ, data); -***** test - data = baseData; - data.p.lineSearch.minStep = 0; - so_step_armijo (1, d, f, dJ, data); -***** test - data = baseData; - data.p.verbose = true; - data.p.lineSearch.relaxation = 0.9; - [~, t] = so_step_armijo (1, d, f, dJ, data); - assert (t < 0.5); -Armijo step 2.000000: cost = 0.110000 -Armijo step 1.600000: cost = 0.120732 -Armijo step 1.280000: cost = 0.133784 -Armijo step 1.024000: cost = 0.141429 -Armijo step 0.819200: cost = 0.150000 -Armijo step 0.655360: cost = 0.159677 -Armijo step 0.524288: cost = 0.165000 -Armijo step 0.419430: cost = 0.170690 -Armijo step 0.335544: cost = 0.176786 -Armijo step 0.268435: cost = 0.183333 -Armijo step 0.214748: cost = 0.183333 -Armijo step 0.171799: cost = 0.183333 -***** test - so_step_armijo (2, d, f, dJ, baseData); -***** error - so_step_armijo (3, d, f, dJ, baseData); -18 tests, 18 passed, 0 known failure, 0 skipped + assert (ls_disjoint (phi1, phi2)); + assert (~ls_disjoint (phi1, phi3)); + assert (~ls_disjoint (phi2, phi3)); + assert (~ls_disjoint (phi1, phi2, phi3)); +4 tests, 4 passed, 0 known failure, 0 skipped [inst/so_replay_descent.m] >>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_replay_descent.m ***** error @@ -4505,21 +5535,6 @@ line ([0, 0], [2, 10]); title ("Diffraction"); 8 tests, 8 passed, 0 known failure, 0 skipped -[inst/ls_inside.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_inside.m -***** error - ls_inside () -***** error - ls_inside (1, 2) -***** test - assert (ls_inside ([1, 0, -1, 0, 1]), [false, false, true, false, false]); -***** test - if (exist ("signbit") == 5) - assert (ls_inside ([-0, 0]), [true, false]); - else - warning ("'signbit' function not available, skipping test."); - endif -4 tests, 4 passed, 0 known failure, 0 skipped [inst/ls_isempty.m] >>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_isempty.m ***** error @@ -4601,1032 +5616,69 @@ hold ("off"); title ("Type 'highlight'"); 10 tests, 10 passed, 0 known failure, 0 skipped -[inst/ls_nb_from_geom.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_nb_from_geom.m -***** error - ls_nb_from_geom (1) +[inst/ls_complement.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_complement.m ***** error - ls_nb_from_geom (1, 2, 3, 4) + ls_complement () ***** error - [a, b] = ls_nb_from_geom (1, 2); -***** error - ls_nb_from_geom (1, 2, rand (2, 2)); -***** error - x = linspace (-10, 10, 10); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - phi = ls_genbasic (XX, YY, "sphere", [0, 0], 5); - phi = ls_normalise (phi, h); - geom = ls_find_geometry (phi, h); - ls_nb_from_geom (geom, phi); -***** error - x = linspace (-10, 10, 10); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - phi = ls_genbasic (XX, YY, "sphere", [0, 0], 5); - phi = ls_normalise (phi, h); - geom = ls_find_geometry (phi, h); - ls_nb_from_geom (geom, phi, [1, 2, 3]); + ls_complement (1, 2) ***** test n = 50; x = linspace (-10, 10, n); h = x(2) - x(1); [XX, YY] = meshgrid (x, x); - phi = ls_setdiff (ls_genbasic (XX, YY, "sphere", [0, 0], 8), ... - ls_genbasic (XX, YY, "sphere", [1, 1], 5)); - phi = ls_normalise (phi, h); - geom = ls_find_geometry (phi, h); - geom = ls_absolute_geom (geom, XX, YY); - - dOld = ls_init_narrowband (phi, h); - dNew = ls_nb_from_geom (geom, phi); - - where = (!isna (dOld)); - assert (all (!isna (dNew(where)))); - assert (dNew(where), dOld(where), h / 4); -***** demo - n = 50; - x = linspace (-10, 10, n); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - phi = ls_genbasic (XX, YY, "sphere", [0, 0], 3); - phi = ls_normalise (phi, h); - geom = ls_find_geometry (phi, h); - geom = ls_absolute_geom (geom, XX, YY); - - g0 = NA (1, geom.bedges.n); - for i = 1 : geom.bedges.n - a = geom.ispts.coord(geom.bedges.ispts(i, 1), :); - b = geom.ispts.coord(geom.bedges.ispts(i, 2), :); - m = (a + b) / 2; - angle = abs (atan2 (m(2), m(1))); - g0(i) = min (angle, 2 * pi - angle); - endfor - - [d, g] = ls_nb_from_geom (geom, phi, g0); - [d, g] = fastmarching (d, g, h * ones (size (phi))); - - figure (); - hold ("on"); - imagesc (x, x, g); - set (gca (), "ydir", "normal"); - contour (XX, YY, phi, [0, 0], "k"); - hold ("off"); - colorbar (); -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/ls_equal.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_equal.m -***** error - ls_equal (1) -***** error - ls_equal (1, 2, 3) -***** error - ls_equal (1, [1, 2]) -***** test - assert (ls_equal ([Inf, 0, -2, -Inf, eps], ... - [1, 0, -Inf, -eps, 1])); - assert (ls_equal ([1, 0; -1, 0], [Inf, 0; -5, 0])); - assert (!ls_equal ([1, -1; 0, 0], [1, 0; 0, 0])); -***** test - if (exist ("signbit") == 5) - assert (ls_equal ([0, -0], [1, -1])); - else - warning ("'signbit' function not available, skipping test."); - endif -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/so_run_descent.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_run_descent.m -***** shared data, phi0 - data = struct (); - data.p = so_init_params (false); - data.p.vol = 10; - data.p.weight = 50; - - n = 100; - x = linspace (-10, 10, n); - h = x(2) - x(1); - data.g = struct ("x", x, "h", h); - - data = so_example_problem (data); - data.handler = struct (); - - phi0 = ls_genbasic (data.g.x, "box", -3, 5); -***** error - so_run_descent (1, 2); -***** error - so_run_descent (1, 2, 3, 4); -***** error - so_run_descent (0, phi0, data); -***** error - so_run_descent (1.5, phi0, data); -***** error - so_run_descent ([2, 3], phi0, data); -***** error - d = data; - d.p.descent.initialStep = 0; - so_run_descent (1, phi0, d); -***** test - nSteps = 12; - - [s, descentLog] = so_run_descent (nSteps, phi0, data); - assert (s.cost, 0, 1e-3); - assert (length (descentLog.costs), nSteps + 1); - assert (descentLog.costs(end), s.cost); - %semilogy (descentLog.costs, "o"); -***** test - tol = 5e-2; - nSteps = 100; - d = data; - d.cb.check_stop = @(data) (data.cost < tol); - - [s, descentLog] = so_run_descent (nSteps, phi0, d); - assert (s.cost < tol); - printf ("Steps needed: %d\n", descentLog.steps); - assert (descentLog.steps < nSteps); -Steps needed: 8 -***** demo - data = struct (); - data.p = so_init_params (true); - data.p.vol = 10; - data.p.weight = 50; - - n = 100; - x = linspace (-10, 10, n); - h = x(2) - x(1); - data.g = struct ("x", x, "h", h); - - % Look at so_example_problem to see how the callbacks - % and the plotting handler is defined. - data = so_example_problem (data); + phi1 = (XX - 2).^2 + (YY - 2).^2 - 2^2; + phi2 = (XX + 2).^2 + (YY + 2).^2 - 2^2; - phi0 = ls_genbasic (data.g.x, "box", -3, 7); - [s, descentLog] = so_run_descent (5, phi0, data); + assert (ls_disjoint (phi1, ls_complement (phi1))); + assert (ls_disjoint (phi2, ls_complement (phi2))); - figure (); - semilogy (0 : descentLog.steps, descentLog.costs, "o"); - title ("Cost Descrease"); + assert (~ls_disjoint (phi1, ls_complement (phi2))); + assert (~ls_disjoint (phi2, ls_complement (phi1))); - printf ("\nFinal interval: [%.6d, %.6d]\n", s.a, s.b); - printf ("Final cost: %.6d\n", s.cost); -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/ls_enforce_speed.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_enforce_speed.m + sd1 = ls_signed_distance (ls_complement (phi1), h); + sd2 = ls_complement (ls_signed_distance (phi1, h)); + assert (sd1, sd2, sqrt (eps)); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/ls_enforce.m] +>>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_enforce.m ***** error - ls_enforce_speed (1, 2) + ls_enforce (1, 2) ***** error - ls_enforce_speed (1, 2, 3, 4) -***** error - ls_enforce_speed (1, "inside", [1, 2]); + ls_enforce (1, 2, 3, 4) +***** error + ls_enforce (1, "inside", [1, 2]); ***** error - ls_enforce_speed (1, "foo", true); + ls_enforce (1, "foo", true); ***** error - ls_enforce_speed (1, NA, false); -***** function checkCircleRadius (XX, YY, h, phi, r) - phiCorrect = XX.^2 + YY.^2 - r^2; - sd1 = ls_signed_distance (phi, h); - sd2 = ls_signed_distance (phiCorrect, h); - assert (sd1, sd2, h); -***** endfunction + ls_enforce (1, NA, false); ***** test n = 100; x = linspace (-10, 10, n); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - phi = XX.^2 + YY.^2 - 3^2; - F = ones (size (XX)); - whereContain = (XX.^2 + YY.^2 < 5^2); - F = ls_enforce_speed (F, "contain", whereContain); - whereInside = (XX.^2 + YY.^2 < 8^2); - F = ls_enforce_speed (F, "inside", whereInside); - dists = ls_solve_stationary (phi, F, h); - phi2 = ls_extract_solution (10, dists, phi, F); - assert (ls_check (phi2, "contain", whereContain)); - assert (ls_check (phi2, "inside", whereInside)); - checkCircleRadius (XX, YY, h, phi2, 8); - - phi = XX.^2 + YY.^2 - 8^2; - F = -ones (size (XX)); - whereContain = (XX.^2 + YY.^2 < 5^2); - F = ls_enforce_speed (F, "contain", whereContain); - whereOutside = (XX.^2 + YY.^2 >= 7^2); - F = ls_enforce_speed (F, "outside", whereOutside); - dists = ls_solve_stationary (phi, F, h); - phi2 = ls_extract_solution (10, dists, phi, F); - assert (ls_check (phi2, "contain", whereContain)); - assert (ls_check (phi2, "outside", whereOutside)); - checkCircleRadius (XX, YY, h, phi2, 5); -***** demo - n = 100; - x = linspace (-10, 10, n); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - phi = XX.^2 + YY.^2 - 8^2; - F = -ones (size (XX)); - F = ls_enforce_speed (F, "outside", XX.^2 + YY.^2 >= 7^2); - F = ls_enforce_speed (F, "contain", XX.^2 + YY.^2 < 3^2); - times = linspace (1, 6, 40); - ls_animate_evolution (phi, F, h, times, 0.05); - - phi = XX.^2 + YY.^2 - 3^2; - F = ones (size (XX)); - F = ls_enforce_speed (F, "inside", XX.^2 + YY.^2 < 8^2); - F = ls_enforce_speed (F, "contain", XX.^2 + YY.^2 < 5^2); - ls_animate_evolution (phi, F, h, times, 0.05); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/ls_genbasic.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_genbasic.m -***** shared x, y, XX, YY, XXX, YYY, ZZZ - n = 121; - x = linspace (-5, 7, n); - y = linspace (-7, 5, n); - [XX, YY] = meshgrid (x, y); - [XXX, YYY, ZZZ] = ndgrid (x, y, x); -***** error - ls_genbasic (); -***** error - ls_genbasic (1, 2); -***** error - ls_genbasic ("sphere"); -***** error - ls_genbasic (XX, YY, "unknown"); -***** test - ls_genbasic (x, "sphere", 0, 1); - ls_genbasic (x', "sphere", 0, 1); - ls_genbasic (XX, YY, "sphere", [0, 0], 1); - ls_genbasic (0, 1, "sphere", [0, 0], 1); -***** error - ls_genbasic (XX, YY, "sphere"); -***** error - ls_genbasic (XX, YY, "sphere", 1); -***** error - ls_genbasic (XX, YY, "sphere", 1, 2, 3); -***** error - ls_genbasic (XX, YY, "sphere", [1, 2, 3], 1); -***** error - ls_genbasic (XX, YY, "sphere", [1, 2], [1, 2, 3]); -***** test - assert (ls_genbasic (XX, YY, "sphere", [1, -1], 1), ... - ls_genbasic (XX, YY, "sphere", [1, -1], [1, 1])); -***** test - c = [1; -1; 2]; - r = [1; 2; 0.6]; - tol = 0.4; - phi1 = ls_genbasic (XXX, YYY, ZZZ, "sphere", c, r); - phi2 = ls_genbasic (XXX, YYY, ZZZ, "sphere", c, min (r) - tol); - assert (ls_issubset (phi2, phi1)); - coords = {XXX, YYY, ZZZ}; - for i = 1 : length (c) - assert (ls_disjoint (phi1, ... - coords{i} - (c(i) - r(i)), ... - c(i) + r(i) - coords{i})); - assert (~ls_disjoint (phi1 - tol, coords{i} - (c(i) - r(i)))); - assert (~ls_disjoint (phi1 - tol, c(i) + r(i) - coords{i})); - endfor -***** error - ls_genbasic (XX, YY, "box", 1); -***** error - ls_genbasic (XX, YY, "box", 1, 2, 3); -***** error - ls_genbasic (XX, YY, "box", [1, 2, 3], [1, 2]); -***** error - ls_genbasic (XX, YY, "box", [1; 2], [1, 2, 3]); -***** test - assert (ls_equal (ls_genbasic (x, "box", -1, 2), abs (x - 0.5) - 1.5)); - assert (ls_equal (ls_genbasic (x, "box", 2, -1), abs (x - 0.5) - 1.5)); -***** test - a = [2; -3; 1]; - b = [0; 2; -1]; - tol = 0.2; - phi1 = ls_genbasic (XXX, YYY, ZZZ, "box", a, b); - phi2 = ls_genbasic (XXX, YYY, ZZZ, "box", b, a); - assert (phi1, phi2); - coords = {XXX, YYY, ZZZ}; - for i = 1 : length (coords) - assert (ls_disjoint (phi1, ... - coords{i} - min (a(i), b(i)), ... - max (a(i), b(i)) - coords{i})); - assert (~ls_disjoint (phi1 - tol, coords{i} - min (a(i), b(i)))); - assert (~ls_disjoint (phi1 - tol, max (a(i), b(i)) - coords{i})); - endfor -***** error - ls_genbasic (XX, YY, "half", 1); -***** error - ls_genbasic (XX, YY, "half", 1, 2, 3); -***** error - ls_genbasic (XX, YY, "half", [1, 2, 3], [1, 2]); -***** error - ls_genbasic (XX, YY, "half", [1; 2], [1, 2, 3]); -***** test - p = [0, 2, 1]; - - phi = ls_genbasic (XXX, YYY, ZZZ, "half", p, [0; 0; 1]); - assert (ls_equal (phi, 1 - ZZZ)); - - normal = [1; 2; -0.5]; - phi1 = ls_genbasic (XXX, YYY, ZZZ, "half", p, normal); - phi2 = ls_genbasic (XXX, YYY, ZZZ, "half", p, 2 * normal); - assert (ls_equal (phi1, phi2)); - - phi = ls_genbasic (XX, YY, "half", [0, 0], [1, -1]); - assert (ls_equal (phi, YY - XX)); -***** demo - n = 200; - x = linspace (-7, 7, n); [XX, YY] = meshgrid (x, x); - phi1 = ls_genbasic (XX, YY, "box", [-5, -3], [3, 6]); - phi2 = ls_genbasic (XX, YY, "sphere", [-1; 1], 2); - phi3 = ls_genbasic (XX, YY, "sphere", [0; 0], [6, 1]); - phi4 = ls_genbasic (XX, YY, "half", [3, -3], [1, -2]) / 8; - - phi = ls_union (ls_setdiff (phi1, phi2), phi3, phi4); - figure (); - hold ("on"); - imagesc (x, x, phi); - set (gca (), "ydir", "normal"); - ls_sign_colourmap (); - contour (XX, YY, phi, [0, 0], "k"); - hold ("off"); - axis ("equal"); -23 tests, 23 passed, 0 known failure, 0 skipped -[inst/so_example_problem.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_example_problem.m -***** shared basicData - basicData = struct (); - basicData.p = so_init_params (true); - basicData.p.vol = 4; - basicData.p.weight = 10; - - n = 50; - x = linspace (-4, 5, n); - h = x(2) - x(1); - basicData.g = struct ("x", x, "h", h); -***** error - so_example_problem (); -***** error - so_example_problem (1, 2); -***** error - so_example_problem (1); -***** test - data = so_example_problem (basicData); - phi = ls_genbasic (data.g.x, "box", -2.5, 1.3); - - [a, b] = data.util.bounds (phi, data); - assert (a, -2.5, sqrt (eps)); - assert (b, 1.3, sqrt (eps)); -***** test - data = so_example_problem (basicData); - - phi = ls_genbasic (data.g.x, "box", -2, 2); - s0 = data.cb.update_state (phi, data); - - phi = ls_genbasic (data.g.x, "box", -3, 3); - s1 = data.cb.update_state (phi, data); - - phi = ls_genbasic (data.g.x, "box", -1, 1); - s2 = data.cb.update_state (phi, data); - - phi = ls_genbasic (data.g.x, "box", -1, 3); - s3 = data.cb.update_state (phi, data); - - phi = ls_genbasic (data.g.x, "box", -3, 1); - s4 = data.cb.update_state (phi, data); - - assert (all ([s0.cost, s1.cost, s2.cost, s3.cost, s4.cost] >= 0)); - assert (s0.cost, 0, 1e-1); - assert (s1.cost > s3.cost); - assert (s1.cost > s4.cost); - assert (s2.cost > s3.cost); - assert (s2.cost > s4.cost); - assert (s3.cost > s0.cost); - assert (s4.cost > s0.cost); -***** function testDeriv (a, b, data) - phi = ls_genbasic (data.g.x, "box", a, b); - data.s = data.cb.update_state (phi, data); - [f, dJ] = data.cb.get_direction (data); - assert (dJ < 0); + circ2 = (XX.^2 + YY.^2 < 2^2); + circ8 = (XX.^2 + YY.^2 < 8^2); + phi = (XX.^2 + YY.^2 - 5^2); - dt = 5e-3; - dists = ls_solve_stationary (phi, f, data.g.h); - phip = ls_extract_solution (dt, dists, phi, f); - sp = data.cb.update_state (phip, data); + phi2 = ls_enforce (phi, "inside", circ8); + assert (ls_equal (phi2, phi)); + phi2 = ls_enforce (phi, "inside", circ2); + assert (ls_check (phi2, "inside", circ2)); - assert (sp.cost < data.s.cost); - relErr = abs (sp.cost - (data.s.cost + dt * dJ)) / data.s.cost; - assert (relErr < 0.1); -***** endfunction -***** test - data = so_example_problem (basicData); + phi2 = ls_enforce (phi, "contain", circ2); + assert (ls_equal (phi2, phi)); + phi2 = ls_enforce (phi, "contain", circ8); + assert (ls_check (phi2, "contain", circ8)); - testDeriv (-1, 1, data); - testDeriv (-3, 3, data); - testDeriv (-1, 3, data); - testDeriv (-3, 1, data); + phi2 = ls_enforce (phi, "outside", ~circ8); + assert (ls_equal (phi2, phi)); + phi2 = ls_enforce (phi, "outside", ~circ2); + ls_check (phi2, "outside", ~circ2); + phi2 = ls_enforce (phi, "outside", circ2); + ls_check (phi2, "outside", circ2); 6 tests, 6 passed, 0 known failure, 0 skipped -[inst/ls_time_step.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_time_step.m -***** error - ls_time_step (1, 2) -***** error - ls_time_step (1, 2, 3, 4, 5, 6) -***** error - ls_time_step (1, 2, 3, 4, [5, 5]) -***** error - ls_time_step ([1; 1], [2, 2], [3, 3, 3]) -***** error - ls_time_step ([1, 1], 1, [2, 2], [3, 3, 3]) -***** error - ls_time_step (ones (2, 2), 1, 1) -***** test - n = 100; - x = linspace (0, 1, n); - h = x(2) - x(1); - - phi0 = sin (x); - fPos = ones (size (phi0)); - - % Single time step, moving exactly one grid step. - phit = ls_time_step (1, phi0, fPos); - assert (phit(2 : end), phi0(1 : end - 1)); - - % t = 1 should correspond to the previous result, and t = 2 - % shifts one more time step. However, due to boundary effects, - % we have to exclude some elements in the comparisons. - phitArr = ls_time_step ([1, 2], 0.5, phi0, fPos); - assert (size (phitArr), [2, 1]); - assert (phitArr{1}(3 : end), phit(3 : end), 1e-4); - assert (phitArr{2}(5 : end), phi0(3 : end - 2), 1e-4); - - % Try out movement in the other direction. - phit = ls_time_step (0.5, 0.1, phi0, -fPos, 0.5); - assert (phit(1 : end - 4), phi0(2 : end - 3), 1e-4); -***** function compareFastMarching (t, phi0, F, h, tol) - phit = ls_time_step (t, phi0, F, h); - d = ls_solve_stationary (phi0, F, h); - phit_fm = ls_extract_solution (t, d, phi0, F); - - sd1 = ls_signed_distance (phit, h); - sd2 = ls_signed_distance (phit_fm, h); - assert (sd1, sd2, tol); -***** endfunction -***** test - warning ("off", "level-set:fast-marching:too-far-alive"); - - n = 100; - x = linspace (-5, 5, n); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - phi0 = ls_genbasic (XX, YY, "sphere", [0, 0], [3, 1.5]); - F = ones (size (phi0)); - compareFastMarching (0.5, phi0, F, h, h / 2); - compareFastMarching (1.5, phi0, F, h, h / 2); - - phi0 = ls_genbasic (XX, YY, "box", [-3, -3], [3, 3]); - F = YY / 5; - compareFastMarching (1, phi0, F, h, h); - - F = ones (size (phi0)); - compareFastMarching (1, phi0, F, h, h / 2); - - phi0 = ls_genbasic (XX, YY, "sphere", [0, 0], 3); - F = sin (XX .* YY); - compareFastMarching (1, phi0, F, h, h); -***** test - warning ("off", "level-set:fast-marching:increased-distance"); - - n = 50; - x = linspace (-5, 5, n); - h = x(2) - x(1); - [XX, YY, ZZ] = ndgrid (x, x, x); - - phi0 = ls_genbasic (XX, YY, ZZ, "sphere", [0, 0, 0], 3); - F = ones (size (phi0)); - compareFastMarching (1, phi0, F, h, h / 2); - compareFastMarching (1, phi0, -F, h, h / 2); -***** demo - n = 500; - x = linspace (-5, 5, n); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - F = sin (XX .* YY); - phi0 = ls_genbasic (XX, YY, "sphere", [0, 0], 3); - phit = ls_time_step ([0.5, 1], phi0, F, h); - - figure (); - hold ("on"); - imagesc (x, x, F); - axis ("equal"); - set (gca (), "ydir", "normal"); - ls_sign_colourmap (); - contour (XX, YY, phi0, [0, 0], "k", "LineWidth", 2); - contour (XX, YY, phit{1}, [0, 0], "k", "LineWidth", 2); - contour (XX, YY, phit{2}, [0, 0], "k", "LineWidth", 2); - hold ("off"); -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/ls_find_geometry.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_find_geometry.m -***** error - ls_find_geometry () -***** error - ls_find_geometry (1, 2, 3, 4) -***** error - ls_find_geometry (resize (zeros (8, 1), [2, 2, 2])) -***** error - ls_find_geometry ([1, -1, 1]) -***** error - ls_find_geometry ([0, 1; -1, -1]) -***** error - ls_find_geometry ([-1, NA; -1, -1]) -***** function verifyGeometry (phi, geom) - sz = size (phi); - nNode = prod (sz); - L = sz(1); - M = sz(2); - nElem = (L - 1) * (M - 1); - assert (geom.dim, sz); - - % Basic properties of the elem field. - assert (geom.elem.n, nElem); - assert (size (geom.elem.nodelist), [nElem, 4]); - assert (all (geom.elem.type(geom.elem.index.inner) == -1)); - assert (all ((geom.elem.type(geom.elem.index.bdry) == 0))); - assert (all ((geom.elem.type(geom.elem.index.outer) == 1))); - % Order of the nodes in nodelist. - assert (geom.elem.nodelist(1, :), [L+2, 2, 1, L+1]); - % Correct classification of inner/outer/bdry elements. - assert (all (phi(geom.elem.nodelist(geom.elem.index.inner, :))(:) < 0)); - assert (all (phi(geom.elem.nodelist(geom.elem.index.outer, :))(:) > 0)); - bdryPhis = phi(geom.elem.nodelist(geom.elem.index.bdry, :)); - bdryPhis = sort (bdryPhis, 2); - assert (all (bdryPhis(:, 1) < 0) && all (bdryPhis(:, end) > 0)); - - % Each boundary element should have two or four intersected edges. - % Also verify that the start/endEdge fields of the internal information - % match up to the points in question. - for i = 1 : geom.bdryel.n - empty = length (find (isna (geom.bdryel.edges(i, :)))); - assert (empty == 2 || empty == 0); - for j = 1 : length (geom.internal.bdryelSegments{i}) - s = geom.internal.bdryelSegments{i}{j}; - assert (geom.bdryel.edges(i, s.startEdge) == s.startPt); - assert (geom.bdryel.edges(i, s.endEdge) == s.endPt); - endfor - endfor - - % Run through gamma components and verify that geom.ispts.onedge matches. - for i = 1 : geom.gamma.n - c = geom.gamma.ispts{i}; - c(end + 1) = c(1); - for j = 1 : length (c) - 1 - cur = c(j); - next = c(j + 1); - bdryel = geom.ispts.onedge(cur, 1, 1); - assert (geom.ispts.onedge(next, 2, 1), bdryel); - assert (geom.bdryel.edges(bdryel, geom.ispts.onedge(cur, 1, 2)), cur); - assert (geom.bdryel.edges(bdryel, geom.ispts.onedge(next, 2, 2)), next); - - edgeForward = geom.ispts.onedge(cur, 1, 3); - assert (geom.bedges.ispts(edgeForward, 1), cur); - assert (geom.bedges.ispts(edgeForward, 2), next); - - assert (geom.ispts.gammachain(cur, 1), next); - assert (geom.ispts.gammachain(next, 2), cur); - endfor - endfor - - % Verify that the ordering of points in bedges matches the onedge - % information about start / end points in each boundary element. - for i = 1 : geom.bedges.n - assert (geom.ispts.onedge(geom.bedges.ispts(i, 1), 1, 1), ... - geom.ispts.onedge(geom.bedges.ispts(i, 2), 2, 1)); - assert (geom.ispts.onedge(geom.bedges.ispts(i, 1), 1, 3), i); - assert (geom.ispts.onedge(geom.bedges.ispts(i, 2), 2, 3), i); - endfor -***** endfunction -***** test - phis = ls_get_tests (); - hs = [0.1, 0.5, 1, 1.5]; - for i = 1 : length (phis) - for h = hs - for s = [-1, 1] - cur = phis{i} * s; - phi = ls_normalise (cur, h); - geom = ls_find_geometry (phi, h); - verifyGeometry (phi, geom); - endfor - endfor - endfor -***** test - phi = ones (4, 4); - phi(2 : 3, 2 : 3) = [Inf, -1; -Inf, 2]; - g = ls_find_geometry (phi, 0.1, 0.01); - - ind = find (g.elem.index.bdry == 5); - assert (size (ind), [1, 1]); - edges = g.bdryel.edges(ind, :); - assert (all (~isna (edges))); - - assert (g.ispts.inout(edges, :), [7, 11; 7, 6; 10, 6; 10, 11]); - assert (g.ispts.frac(edges), [0.99; 0.5; 0.01; 1/3], sqrt (eps)); - assert (g.ispts.incoord(edges, :), ... - [0.099, 0; 0, -0.05; -0.001, 0; 0, 1/30], sqrt (eps)); -***** error - phi = [-1, -1; 1, 1]; - ls_find_geometry (phi); -***** test - phi = ones (3, 3); - phi(2, 2) = -1; - geom = ls_find_geometry (phi); - - % Permute the component array such that it starts with the north point - % and then compare coordinates. Note that the "north" point is "south" - % in matrix interpretation and thus has "outindex" of 6. - assert (geom.gamma.n, 1); - c = geom.gamma.ispts{1}'; - while (geom.ispts.inout(c(1), 2) != 6) - c = [c(2 : end), c(1)]; - endwhile - assert (geom.ispts.incoord(c, :), ... - [0, 1/2; -1/2, 0; 0, -1/2; 1/2, 0], sqrt (eps)); -***** function checkBoundaryDirection (pts, dir) - pts(end + 1, :) = pts(1, :); - for i = 1 : length (pts) - 1 - a = [pts(i, :), 0]; - b = [pts(i + 1, :), 0]; - z = cross (a, b); - assert (z(1 : 2), [0, 0]); - assert (sign (z(3)), dir); - endfor -***** endfunction -***** test - n = 50; - x = linspace (-10, 10, n); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - phi = ls_setdiff (ls_genbasic (XX, YY, "sphere", [0, 0], 8), ... - ls_genbasic (XX, YY, "sphere", [0, 0], 4)); - phi = ls_normalise (phi, h); - geom = ls_find_geometry (phi, h); - geom = ls_absolute_geom (geom, XX, YY); - - assert (geom.gamma.n, 2); - len1 = length (geom.gamma.ispts{1}); - len2 = length (geom.gamma.ispts{2}); - if (len1 < len2) - outer = geom.gamma.ispts{2}; - inner = geom.gamma.ispts{1}; - else - assert (len1 > len2); - outer = geom.gamma.ispts{1}; - inner = geom.gamma.ispts{2}; - endif - - checkBoundaryDirection (geom.ispts.coord(outer, :), 1); - checkBoundaryDirection (geom.ispts.coord(inner, :), -1); -***** test - phi = ones (4, 4); - phi(2, 2) = -1; - phi(3, 3) = -1; - - geom = ls_find_geometry (phi); - assert (geom.gamma.n, 2); - geom = ls_find_geometry (-phi); - assert (geom.gamma.n, 1); - - % Now also try with other "kind" of narrow pair. - phi = phi(:, end : -1 : 1); - geom = ls_find_geometry (phi); - assert (geom.gamma.n, 2); - geom = ls_find_geometry (-phi); - assert (geom.gamma.n, 1); -***** demo - n = 15; - x = linspace (-10, 10, n); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - r1 = sqrt (2) * 2.9; - r2 = 3; - phi = ls_union (ls_genbasic (XX, YY, "sphere", [-3, -3], r1), ... - ls_genbasic (XX, YY, "sphere", [3, 3], r1), ... - ls_genbasic (XX, YY, "sphere", [-5, 5], r2), ... - ls_genbasic (XX, YY, "sphere", [5, -5], r2)); - - phi = ls_normalise (phi, h); - g = ls_find_geometry (phi, h, 0.2); - g = ls_absolute_geom (g, XX, YY); - - figure (); - hold ("on"); - - for i = 1 : size (g.elem.nodelist, 1) - nodes = g.elem.nodelist(i, :); - switch (g.elem.type(i)) - case -1 - colour = [0.5, 0.5, 1]; - case 0 - colour = [1, 0.5, 0.5]; - case 1 - colour = [0.8, 0.8, 0.8]; - endswitch - patch (XX(nodes), YY(nodes), colour); - endfor - - plot (g.ispts.coord(:, 1), g.ispts.coord(:, 2), "k.", "MarkerSize", 8); - for i = 1 : g.gamma.n - pts = g.gamma.ispts{i}; - pts(end + 1) = pts(1); - plot (g.ispts.coord(pts, 1), g.ispts.coord(pts, 2), "k-", "LineWidth", 2); - endfor - - contour (XX, YY, phi, [0, 0], "g"); - - axis ([min(x), max(x), min(x), max(x)]); - axis ("equal"); - grid ("on"); - set (gca (), "xtick", x, "ytick", x, "xticklabel", "", "yticklabel", ""); - hold ("off"); -12 tests, 12 passed, 0 known failure, 0 skipped -[inst/so_save_descent.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/so_save_descent.m -***** error - so_save_descent (1, 2); -***** error - so_save_descent (1, 2, 3, 4); -***** error - so_save_descent (1, 2, 3); -***** error - so_save_descent (struct (), 2, struct ()); -***** error - so_save_descent ([2, 3], 2, struct ()); -***** error <'fsave' is not available> - pkg unload -nodeps parallel; - so_save_descent ("foo", 2, struct ()); -***** test - pkg load parallel; - so_save_descent ("foo", 2, struct ()); - so_save_descent (5, 2, struct ()); -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/ls_signed_distance.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_signed_distance.m -***** error - ls_signed_distance () -***** error - ls_signed_distance (1, 2, 3) -***** test - assert (ls_signed_distance ([]), []); -***** test - n = 10; - x = linspace (-2, 2, n); - h = x(2) - x(1); - phi = abs (x) - 1; - - d = ls_signed_distance (phi, h); - assert (d, phi, sqrt (eps)); -***** test - n = 50; - x = linspace (-2, 2, n); - h = x(2) - x(1); - [XX, YY, ZZ] = ndgrid (x); - RRsq = XX.^2 + YY.^2 + ZZ.^2; - phi = RRsq - 1; - - d = ls_signed_distance (phi, h); - assert (d, sqrt (RRsq) - 1, h); -***** test - phi = [5e-6, 1.7e-154, -1.3e-2]; - for h = [0.02, 0.01, 0.005] - d = ls_signed_distance (phi, h); - assert (all (isfinite (d))); - assert (d(2), 0); - endfor -***** test - phis = ls_get_tests (); - for i = 1 : length (phis) - phi = ls_normalise (phis{i}); - d = ls_signed_distance (phi); - assert (ls_equal (d, phi)); - endfor -***** test - if (exist ("signbit") == 5) - phi = [-0, 0]; - d = ls_signed_distance (phi); - assert (ls_equal (phi, d)); - else - warning ("'signbit' function not available, skipping test."); - endif -***** demo - n = 100; - x = linspace (-10, 10, n); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - phi0 = atan (ls_union ((XX.^2 + (YY - 5).^2) - 20, ... - (XX.^2 + (YY + 5).^2) - 20)); - %phi0 = XX.^2 / 1.3^2 + YY.^2 - 1; - d = ls_signed_distance (phi0, h); - - figure (); - subplot (1, 2, 1); - contour (XX, YY, phi0); - title ("Initial"); - colorbar (); - axis ("equal"); - - subplot (1, 2, 2); - contour (XX, YY, d); - title ("Signed Distance"); - colorbar (); - axis ("equal"); -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/ls_build_mesh.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_build_mesh.m -***** error - ls_build_mesh (1) -***** error - ls_build_mesh (1, 2, 3, 4) -***** error - x = linspace (-10, 10, 10); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - phi = ls_genbasic (XX, YY, "sphere", [0, 0], 5); - phi = ls_normalise (phi, h); - geom = ls_find_geometry (phi, h); - ls_build_mesh (geom, phi); -***** function verifyDirection (a, b, centre) - v1 = [a - centre; 0]; - v2 = [b - centre; 0]; - x = cross (v1, v2); - assert (x(1 : 2), zeros (2, 1)); - assert (x(3) > 0); -***** endfunction -***** function verifyMesh (geom, phi, glob) - [mesh, vmap] = ls_build_mesh (geom, phi, glob); - nPts = prod (geom.dim); - - % Verify ordering of triangle points. - for i = 1 : size (mesh.t, 2) - verifyDirection (mesh.p(:, mesh.t(1, i)), mesh.p(:, mesh.t(2, i)), ... - mesh.p(:, mesh.t(3, i))); - endfor - - % Go through all grid points and verify them with the mesh. - for i = 1 : nPts - gridInd = vmap.grid(i); - if (isna (gridInd)) - assert (!glob); - continue; - endif - - assert (vmap.mesh(gridInd), i); - assert (mesh.p(:, gridInd), geom.nodes.coord(i, :)'); - endfor - - % Go through all intersection points and verify them. - for i = 1 : geom.ispts.n - gridInd = vmap.ispt(i); - assert (vmap.mesh(gridInd), -i); - assert (mesh.p(:, gridInd), geom.ispts.coord(i, :)'); - endfor - - % Verify mesh.e against geom.bedges. - for i = 1 : geom.bedges.n - assert (mesh.e(1 : 2, i), vmap.ispt(geom.bedges.ispts(i, :)')); - assert (mesh.e(5, i), geom.bedges.comp(i)); - endfor -***** endfunction -***** function verifyPhi (phi, XX, YY, h) - for s = [-1, 1] - cur = phi * s; - cur = ls_normalise (cur, h); - geom = ls_find_geometry (cur, h); - geom = ls_absolute_geom (geom, XX, YY); - - verifyMesh (geom, cur, false); - verifyMesh (geom, cur, true); - endfor -***** endfunction -***** test - n = 20; - x = linspace (-10, 10, n); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - phi = ls_union (ls_genbasic (XX, YY, "sphere", [-6, -6], 3), ... - ls_genbasic (XX, YY, "sphere", [6, 6], 3)); - verifyPhi (phi, XX, YY, h); - - phi = ls_setdiff (ls_genbasic (XX, YY, "sphere", [0, 0], 8), ... - ls_genbasic (XX, YY, "sphere", [0, 0], 4)); - verifyPhi (phi, XX, YY, h); -***** demo - x = linspace (-10, 10, 11); - h = x(2) - x(1); - [XX, YY] = meshgrid (x, x); - - phi = ls_union (ls_genbasic (XX, YY, "sphere", [5, 5], 4.5), ... - ls_genbasic (XX, YY, "sphere", [-2, -2], 4)); - phi = ls_normalise (phi, h); - geom = ls_find_geometry (phi, h); - geom = ls_absolute_geom (geom, XX, YY); - - mesh = ls_build_mesh (geom, phi, false); - meshGlob = ls_build_mesh (geom, phi, true); - - figure (); - hold ("on"); - trimesh (meshGlob.t(1 : 3, :)', meshGlob.p(1, :), meshGlob.p(2, :), "r"); - trimesh (mesh.t(1 : 3, :)', mesh.p(1, :), mesh.p(2, :), "g"); - for i = 1 : size (mesh.e, 2) - plot (mesh.p(1, mesh.e(1 : 2, i)), mesh.p(2, mesh.e(1 : 2, i)), "b"); - endfor - hold ("off"); - legend ("Global", "Domain", "Boundary"); - axis ("equal"); - axis ("square"); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/ls_issubset.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_issubset.m -***** error - ls_issubset (1) -***** error - ls_issubset (1, 2, 3) -***** error - ls_issubset (1, [1, 2]) -***** test - n = 50; - x = linspace (-10, 10, n); - [XX, YY] = meshgrid (x, x); - - phi1 = XX.^2 + YY.^2 - 1^2; - phi2 = XX.^2 + YY.^2 - 5^2; - phi3 = XX.^2 + YY.^2 - 8^2; - phi4 = (XX - 3).^2 + YY.^2 - 3^2; - - assert (ls_issubset (phi1, phi2)); - assert (ls_issubset (phi4, phi3)); - assert (~ls_issubset (phi4, phi2)); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/ls_intersect.m] ->>>>> /build/octave-level-set-0.3.1~git.2019.04.13/inst/ls_intersect.m -***** error - ls_intersect () -***** error - ls_intersect (1, -2, [1, 2]) -***** test - n = 50; - x = linspace (-10, 10, n); - [XX, YY] = meshgrid (x, x); - - phi1 = (XX - 2).^2 + (YY - 2).^2 - 2^2; - phi2 = (XX + 2).^2 + (YY + 2).^2 - 2^2; - phi3 = XX.^2 + YY.^2 - 2^2; - - assert (ls_isempty (ls_intersect (phi1, phi2))); - assert (ls_intersect (phi3), phi3); - - phi = ls_intersect (phi1, phi3); - assert (~ls_isempty (phi)); - assert (ls_issubset (phi, phi1) && ls_issubset (phi, phi3)); - - phi = ls_intersect (phi2, phi3); - assert (~ls_isempty (phi)); - assert (ls_issubset (phi, phi2) && ls_issubset (phi, phi3)); -***** demo - n = 100; - x = linspace (-7, 7, n); - [XX, YY] = meshgrid (x, x); - - phi1 = (XX - 2 * cos (7/6 * pi)).^2 + (YY - 2 * sin (7/6 * pi)).^2 - 3^2; - phi2 = (XX - 2 * cos (11/6 * pi)).^2 + (YY - 2 * sin (11/6 * pi)).^2 - 3^2; - phi3 = XX.^2 + (YY - 2).^2 - 3^2; - phi = ls_intersect (phi1, phi2, phi3); - - figure (); - subplot (1, 2, 1); - hold ("on"); - contour (XX, YY, phi1, [0, 0], "k"); - contour (XX, YY, phi2, [0, 0], "k"); - contour (XX, YY, phi3, [0, 0], "k"); - hold ("off"); - axis ("equal"); - - subplot (1, 2, 2); - hold ("on"); - imagesc (x, x, phi); - set (gca (), "ydir", "normal"); - ls_sign_colourmap (); - contour (XX, YY, phi, [0, 0], "k"); - hold ("off"); - axis ("equal"); -3 tests, 3 passed, 0 known failure, 0 skipped Checking C++ files ... Summary: 258 tests, 254 passed, 4 known failures, 0 skipped dh_installdocs -O--buildsystem=octave @@ -5644,7 +5696,7 @@ dh_strip -a -O--buildsystem=octave dh_makeshlibs -a -O--buildsystem=octave dh_shlibdeps -a -O--buildsystem=octave -dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_internal_fastmarching.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_upwindGrad.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_geomGamma.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_internal_init_narrowband.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_geomBoundary.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_internal_mesh.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_geomElements.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_nbFromGeom.oct were not linked against libpthread.so.0 (they use none of the library's symbols) +dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_internal_fastmarching.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_internal_mesh.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_upwindGrad.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_geomGamma.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_geomBoundary.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_geomElements.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_nbFromGeom.oct debian/octave-level-set/usr/lib/arm-linux-gnueabihf/octave/packages/level-set-0.3.1/arm-unknown-linux-gnueabihf-api-v55/__levelset_internal_init_narrowband.oct were not linked against libpthread.so.0 (they use none of the library's symbols) dh_octave_substvar -O--buildsystem=octave dh_installdeb -O--buildsystem=octave dh_gencontrol -O--buildsystem=octave @@ -5652,8 +5704,8 @@ dpkg-gencontrol: warning: package octave-level-set: substitution variable ${octave:Upstream-Description} unused, but is defined dh_md5sums -O--buildsystem=octave dh_builddeb -O--buildsystem=octave -dpkg-deb: building package 'octave-level-set' in '../octave-level-set_0.3.1~git.2019.04.13-2_armhf.deb'. dpkg-deb: building package 'octave-level-set-dbgsym' in '../octave-level-set-dbgsym_0.3.1~git.2019.04.13-2_armhf.deb'. +dpkg-deb: building package 'octave-level-set' in '../octave-level-set_0.3.1~git.2019.04.13-2_armhf.deb'. dpkg-genbuildinfo --build=binary dpkg-genchanges --build=binary >../octave-level-set_0.3.1~git.2019.04.13-2_armhf.changes dpkg-genchanges: info: binary-only upload (no source code included) @@ -5662,12 +5714,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/4617/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/4617/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/18858 and its subdirectories -I: Current time: Mon Jul 19 10:55:30 -12 2021 -I: pbuilder-time-stamp: 1626735330 +I: removing directory /srv/workspace/pbuilder/4617 and its subdirectories +I: Current time: Tue Jul 20 13:16:56 +14 2021 +I: pbuilder-time-stamp: 1626736616