gnu: Add fasthenry.
* gnu/packages/engineering.scm (fasthenry): New variable. * gnu/packages/patches/fasthenry-spAllocate.patch, gnu/packages/patches/fasthenry-spBuild.patch, gnu/packages/patches/fasthenry-spFactor.patch, gnu/packages/patches/fasthenry-spSolve.patch, gnu/packages/patches/fasthenry-spUtils.patch: New files. * gnu-system.am (dist_patch_DATA): Add them.
This commit is contained in:
parent
930945015c
commit
23bae7bb86
|
@ -435,6 +435,11 @@ dist_patch_DATA = \
|
|||
gnu/packages/patches/expat-CVE-2015-1283.patch \
|
||||
gnu/packages/patches/fastcap-mulGlobal.patch \
|
||||
gnu/packages/patches/fastcap-mulSetup.patch \
|
||||
gnu/packages/patches/fasthenry-spAllocate.patch \
|
||||
gnu/packages/patches/fasthenry-spBuild.patch \
|
||||
gnu/packages/patches/fasthenry-spUtils.patch \
|
||||
gnu/packages/patches/fasthenry-spSolve.patch \
|
||||
gnu/packages/patches/fasthenry-spFactor.patch \
|
||||
gnu/packages/patches/findutils-absolute-paths.patch \
|
||||
gnu/packages/patches/findutils-localstatedir.patch \
|
||||
gnu/packages/patches/flashrom-use-libftdi1.patch \
|
||||
|
|
|
@ -314,3 +314,53 @@ optimizer; and it can produce photorealistic and design review images.")
|
|||
"Fastcap is a capacitance extraction program based on a
|
||||
multipole-accelerated algorithm.")
|
||||
(license (license:non-copyleft #f "See fastcap.c."))))
|
||||
|
||||
(define-public fasthenry
|
||||
(package
|
||||
(name "fasthenry")
|
||||
(version "3.0-12Nov96")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(uri (string-append
|
||||
"http://www.rle.mit.edu/cpg/codes/" name
|
||||
"-" version ".tar.z"))
|
||||
(sha256
|
||||
(base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
|
||||
(patches (list (search-patch "fasthenry-spAllocate.patch")
|
||||
(search-patch "fasthenry-spBuild.patch")
|
||||
(search-patch "fasthenry-spUtils.patch")
|
||||
(search-patch "fasthenry-spSolve.patch")
|
||||
(search-patch "fasthenry-spFactor.patch")))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
|
||||
#:parallel-build? #f
|
||||
#:tests? #f ;; no tests-suite
|
||||
#:modules ((srfi srfi-1)
|
||||
,@%gnu-build-system-modules)
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(data (string-append out "/share"))
|
||||
(bin (string-append out "/bin"))
|
||||
(doc (string-append data "/doc/" ,name "-" ,version))
|
||||
(examples (string-append doc "/examples")))
|
||||
(with-directory-excursion "bin"
|
||||
(mkdir-p bin)
|
||||
(for-each
|
||||
(lambda (f)
|
||||
(copy-file f (string-append bin "/" (basename f))))
|
||||
(find-files "." ".*")))
|
||||
(copy-recursively "doc" doc)
|
||||
(copy-recursively "examples" examples)
|
||||
#t))))))
|
||||
(home-page "http://www.rle.mit.edu/cpg/research_codes.htm")
|
||||
(synopsis "Multipole-accelerated inductance analysis program")
|
||||
(description
|
||||
"Fasthenry is an inductance extraction program based on a
|
||||
multipole-accelerated algorithm.")
|
||||
(license (license:non-copyleft #f "See induct.c."))))
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
Add forward declarations.
|
||||
|
||||
--- fasthenry-3.0/src/fasthenry/sparse/spAllocate.c.orig 2015-07-22 09:45:28.864758891 +0200
|
||||
+++ fasthenry-3.0/src/fasthenry/sparse/spAllocate.c 2015-07-22 13:04:17.579742206 +0200
|
||||
@@ -107,7 +107,9 @@
|
||||
#include "spDefs.h"
|
||||
|
||||
|
||||
-
|
||||
+static InitializeElementBlocks( MatrixPtr, int, int );
|
||||
+static RecordAllocation( MatrixPtr, char* );
|
||||
+static AllocateBlockOfAllocationList( MatrixPtr );
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Add forward declarations.
|
||||
|
||||
--- fasthenry-3.0/src/fasthenry/sparse/spBuild.c.orig 2015-07-22 10:13:30.884638176 +0200
|
||||
+++ fasthenry-3.0/src/fasthenry/sparse/spBuild.c 2015-07-22 13:08:48.862973419 +0200
|
||||
@@ -106,6 +106,8 @@
|
||||
#include "spDefs.h"
|
||||
|
||||
|
||||
+static void Translate( MatrixPtr, int*, int* );
|
||||
+static ExpandTranslationArrays( MatrixPtr, register int );
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
Add forward declarations.
|
||||
|
||||
--- fasthenry-3.0/src/fasthenry/sparse/spFactor.c.orig 2015-07-22 10:37:04.934043468 +0200
|
||||
+++ fasthenry-3.0/src/fasthenry/sparse/spFactor.c 2015-07-22 12:52:55.515636802 +0200
|
||||
@@ -105,7 +105,29 @@
|
||||
#include "spDefs.h"
|
||||
|
||||
|
||||
-
|
||||
+static int FactorComplexMatrix( MatrixPtr );
|
||||
+static CreateInternalVectors( MatrixPtr );
|
||||
+static CountMarkowitz( MatrixPtr, register RealVector, int );
|
||||
+static MarkowitzProducts( MatrixPtr, int );
|
||||
+static ElementPtr SearchForPivot( MatrixPtr, int, int );
|
||||
+static ElementPtr SearchForSingleton( MatrixPtr, int );
|
||||
+static ElementPtr QuicklySearchDiagonal( MatrixPtr, int );
|
||||
+static ElementPtr SearchDiagonal( MatrixPtr, register int );
|
||||
+static ElementPtr SearchEntireMatrix( MatrixPtr, int );
|
||||
+static RealNumber FindLargestInCol( register ElementPtr );
|
||||
+static RealNumber FindBiggestInColExclude( MatrixPtr, register ElementPtr,
|
||||
+ register int );
|
||||
+static ExchangeRowsAndCols( MatrixPtr, ElementPtr, register int );
|
||||
+static ExchangeColElements( MatrixPtr, int, register ElementPtr,
|
||||
+ int, register ElementPtr, int );
|
||||
+static ExchangeRowElements( MatrixPtr, int, register ElementPtr,
|
||||
+ int, register ElementPtr, int );
|
||||
+static RealRowColElimination( MatrixPtr, register ElementPtr );
|
||||
+static ComplexRowColElimination( MatrixPtr, register ElementPtr );
|
||||
+static UpdateMarkowitzNumbers( MatrixPtr, ElementPtr );
|
||||
+static ElementPtr CreateFillin( MatrixPtr, register int, int );
|
||||
+static int MatrixIsSingular( MatrixPtr, int );
|
||||
+static int ZeroPivot( MatrixPtr, int );
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Add forward declarations.
|
||||
|
||||
--- fasthenry-3.0/src/fasthenry/sparse/spSolve.c.orig 2015-07-22 12:06:20.502771958 +0200
|
||||
+++ fasthenry-3.0/src/fasthenry/sparse/spSolve.c 2015-07-22 12:12:03.822798513 +0200
|
||||
@@ -95,6 +95,7 @@
|
||||
#include "spDefs.h"
|
||||
|
||||
|
||||
+static void SolveComplexMatrix( MatrixPtr, RealVector, RealVector );
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Add forward declarations.
|
||||
|
||||
--- fasthenry-3.0/src/fasthenry/sparse/spUtils.c.orig 2015-07-22 12:12:52.579370846 +0200
|
||||
+++ fasthenry-3.0/src/fasthenry/sparse/spUtils.c 2015-07-22 12:14:09.636275633 +0200
|
||||
@@ -107,6 +107,7 @@
|
||||
#include "spDefs.h"
|
||||
|
||||
|
||||
+static RealNumber ComplexCondition( MatrixPtr, RealNumber, int* );
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue