From patchwork Mon Nov 12 16:00:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Garlick X-Patchwork-Id: 184 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 BD6CF167F7; Mon, 12 Nov 2018 16:04:27 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) by mira.cbaines.net (Postfix) with ESMTPS id 73C0D167F5 for ; Mon, 12 Nov 2018 16:04:27 +0000 (GMT) Received: from localhost ([::1]:49365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMEhO-0004OF-PJ for patchwork@mira.cbaines.net; Mon, 12 Nov 2018 11:04:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMEhE-0004LE-J4 for guix-patches@gnu.org; Mon, 12 Nov 2018 11:04:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMEh8-0004ku-Pj for guix-patches@gnu.org; Mon, 12 Nov 2018 11:04:13 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:44007) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMEh3-0004gb-6S for guix-patches@gnu.org; Mon, 12 Nov 2018 11:04:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gMEh3-0000zz-24 for guix-patches@gnu.org; Mon, 12 Nov 2018 11:04:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#33059] [PATCH v2 7/9] gnu: Add python-fenics-ffc. Resent-From: Paul Garlick Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Nov 2018 16:04:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33059 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: 33059@debbugs.gnu.org, Efraim Flashner , Eric Bavier , Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 33059-submit@debbugs.gnu.org id=B33059.15420386283746 (code B ref 33059); Mon, 12 Nov 2018 16:04:05 +0000 Received: (at 33059) by debbugs.gnu.org; 12 Nov 2018 16:03:48 +0000 Received: from localhost ([127.0.0.1]:48253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMEgl-0000yM-QC for submit@debbugs.gnu.org; Mon, 12 Nov 2018 11:03:48 -0500 Received: from smtp.hosts.co.uk ([85.233.160.19]:63096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gMEgj-0000xx-Mn for 33059@debbugs.gnu.org; Mon, 12 Nov 2018 11:03:46 -0500 Received: from [79.123.23.187] (helo=parkin.tourbillion-technology.com.com) by smtp.hosts.co.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim) (envelope-from ) id 1gMEgd-000500-94; Mon, 12 Nov 2018 16:03:40 +0000 From: Paul Garlick Date: Mon, 12 Nov 2018 16:00:39 +0000 Message-Id: <1542038441-5738-8-git-send-email-pgarlick@tourbillion-technology.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1542038441-5738-1-git-send-email-pgarlick@tourbillion-technology.com> References: <87k1m7vvjp.fsf@gnu.org> <1542038441-5738-1-git-send-email-pgarlick@tourbillion-technology.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Garlick Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/simulation.scm (python-fenics-ffc): New variable. --- gnu/packages/simulation.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index ecdb2b2..d1a5e46 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -349,3 +349,55 @@ versions will also support Hermite and nonconforming elements. FIAT is part of the FEniCS Project.") (license license:lgpl3+))) + +(define-public python-fenics-ffc + (package + (name "python-fenics-ffc") + (version "2018.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "fenics-ffc" version)) + (sha256 + (base32 + "1b2ia5vlkw298x7rf0k2p3ihlpwkwgc98p3s6sbpds3hqmfrzdz9")))) + (build-system python-build-system) + (native-inputs + `(("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-fenics-dijitso" ,python-fenics-dijitso) + ("python-fenics-fiat" ,python-fenics-fiat) + ("python-fenics-ufl" ,python-fenics-ufl))) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (setenv "HOME" (getcwd)) + (setenv "PYTHONPATH" + (string-append (getcwd) ":" (getenv "PYTHONPATH"))) + (with-directory-excursion "test" + ;; FIXME: the tests in subdirectory + ;; 'unit/ufc/finite_element' require the ffc_factory + ;; extension module. This module, located in the 'libs' + ;; subdirectory, needs to be built and made accessible + ;; prior to running the tests. + (invoke "py.test" "unit/" "--ignore=unit/ufc/") + (with-directory-excursion "uflacs" + (invoke "py.test" "unit/"))) + #t))))) + (home-page "https://bitbucket.org/fenics-project/ffc/") + (synopsis "Compiler for finite element variational forms") + (description "The FEniCS Form Compiler (FFC) is a compiler for +finite element variational forms. From a high-level description of +the form, it generates efficient low-level C++ code that can be used +to assemble the corresponding discrete operator (tensor). In +particular, a bilinear form may be assembled into a matrix and a +linear form may be assembled into a vector. FFC may be used either +from the command line (by invoking the @code{ffc} command) or as a +Python module (@code{import ffc}). + +FFC is part of the FEniCS Project.") + ;; There are two files released with a public domain licence; + ;; ufc.h and ufc_geometry.h, in subdirectory 'ffc/backends/ufc'. + (license (list license:public-domain license:lgpl3+))))