From patchwork Wed Aug 19 12:03:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Garlick X-Patchwork-Id: 23686 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 02A9227BBE6; Wed, 19 Aug 2020 13:06:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 68AC927BBE5 for ; Wed, 19 Aug 2020 13:06:27 +0100 (BST) Received: from localhost ([::1]:49828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8MrK-0000wX-Ru for patchwork@mira.cbaines.net; Wed, 19 Aug 2020 08:06:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8Mqx-0000Qb-0o for guix-patches@gnu.org; Wed, 19 Aug 2020 08:06:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8Mqw-0006cB-2k for guix-patches@gnu.org; Wed, 19 Aug 2020 08:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k8Mqv-00039N-UG for guix-patches@gnu.org; Wed, 19 Aug 2020 08:06:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42929] [PATCH] gnu: Add fullswof-2d. Resent-From: Paul Garlick Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Aug 2020 12:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42929 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42929@debbugs.gnu.org Cc: Paul Garlick X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159783870612023 (code B ref -1); Wed, 19 Aug 2020 12:06:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Aug 2020 12:05:06 +0000 Received: from localhost ([127.0.0.1]:38406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8Mq1-00037q-Hp for submit@debbugs.gnu.org; Wed, 19 Aug 2020 08:05:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:53412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8Mpz-00037e-2n for submit@debbugs.gnu.org; Wed, 19 Aug 2020 08:05:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8Mpy-0007V1-Sh for guix-patches@gnu.org; Wed, 19 Aug 2020 08:05:02 -0400 Received: from smtp.hosts.co.uk ([85.233.160.19]:55069) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8Mpw-0006Lm-Nz for guix-patches@gnu.org; Wed, 19 Aug 2020 08:05:02 -0400 Received: from maikeh336.claranet.co.uk ([79.123.23.187] helo=parkin.tourbillion-technology.com.com) by smtp.hosts.co.uk with esmtpsa (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim) (envelope-from ) id 1k8Mpq-0001IS-5l; Wed, 19 Aug 2020 13:04:55 +0100 From: Paul Garlick Date: Wed, 19 Aug 2020 13:03:52 +0100 Message-Id: <1597838632-32403-1-git-send-email-pgarlick@tourbillion-technology.com> X-Mailer: git-send-email 1.8.3.1 Received-SPF: none client-ip=85.233.160.19; envelope-from=pgarlick@tourbillion-technology.com; helo=smtp.hosts.co.uk X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/19 08:04:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/simulation.scm (fullswof-2d): New variable. --- gnu/packages/simulation.scm | 72 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index 8d57885..a95160c 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -19,6 +19,7 @@ (define-module (gnu packages simulation) #:use-module (gnu packages) #:use-module (gnu packages algebra) + #:use-module (gnu packages admin) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) @@ -47,6 +48,7 @@ #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (guix download) + #:use-module (guix svn-download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) @@ -724,3 +726,73 @@ problems that can be solved using the Finite Element Method (FEM). within the FEniCS project. It provides the python user interface to the FEniCS core components and external libraries.") (license license:lgpl3+))) + +(define-public fullswof-2d + (let ((revision 505) + (release "1.09.01")) + (package + (name "fullswof-2d") + (version release) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "https://subversion.renater.fr/" + "anonscm/svn/fullswof-2d/tags/" + "release-" version)) + (revision revision))) + (file-name (string-append "fullswof-2d-" version "-checkout")) + (sha256 + (base32 + "16v08dx7h7n4wyddzbwimazwyj74ynis12mpjfkay4243npy44b8")))) + (build-system gnu-build-system) + (native-inputs + `(("inetutils" ,inetutils))) ; for 'hostname', used in the check phase + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (add-after 'build 'build-tools + (lambda _ + (with-directory-excursion "Tools/ConvertFormat" + (invoke "make" "../../bin/asc2xyz") + (invoke "make" "../../bin/xyz2asc")) + (with-directory-excursion "Tools/ExtractWindow" + (invoke "make" "../../bin/cropxyz")) + #t)) + (replace 'check ; no check target + (lambda _ + (invoke "make" "benchref"))) + (replace 'install ; no install target + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append + out "/share/doc/" ,name "-" ,version)) + (examples (string-append doc "/Examples"))) + (with-directory-excursion "bin" + (for-each (lambda (binary) (install-file binary bin)) + (list "asc2xyz" "xyz2asc" "cropxyz" + "FullSWOF_2D"))) + (with-directory-excursion "doc" + (for-each (lambda (pdf) (install-file pdf doc)) + (list "Documentation.pdf" "refman.pdf"))) + (with-directory-excursion "Tools" + (for-each (lambda (dir) + (copy-file + (string-append dir "/README.txt") + (string-append doc "/README_" dir ".txt"))) + (list "ConvertFormat" "ExtractWindow"))) + (copy-recursively "Examples" examples) + #t)))))) + (home-page "https://www.idpoisson.fr/fullswof/") + (synopsis "Two dimensional flow solver for flood modelling") + (description "@code{FullSWOF_2d} is a numerical tool for solving +the shallow water equations on structured grids. The name FullSWOF +refers to the Full form of the Shallow Water equations for Overland +Flow. The discretized system of equations is solved using the finite +volume method. A choice of shock-capturing methods is available to +locate the transition boundaries between the wet areas and the dry +areas in the model. A semi-implicit method is used to advance the +solution in time. The tool is typically applied to the modelling of +river flooding.") + (license license:cecill))))