summaryrefslogtreecommitdiff
path: root/math/femlab
diff options
context:
space:
mode:
Diffstat (limited to 'math/femlab')
-rw-r--r--math/femlab/Makefile43
-rw-r--r--math/femlab/distinfo1
-rw-r--r--math/femlab/files/femlab.sh6
-rw-r--r--math/femlab/files/patch-aa31
-rw-r--r--math/femlab/files/patch-ab55
-rw-r--r--math/femlab/pkg-comment1
-rw-r--r--math/femlab/pkg-descr21
-rw-r--r--math/femlab/pkg-plist19
8 files changed, 177 insertions, 0 deletions
diff --git a/math/femlab/Makefile b/math/femlab/Makefile
new file mode 100644
index 000000000000..b7910210436a
--- /dev/null
+++ b/math/femlab/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: femlab
+# Version required: v1.1
+# Date created: 19 June 1997
+# Whom: Pedro Giffuni
+#
+# $Id: Makefile,v 1.3 1997/01/19 02:47:27 obrien Exp $
+#
+
+DISTNAME= femlab-2d-v1.1
+PKGNAME= femlab-1.1
+CATEGORIES= math cad
+MASTER_SITES= ftp://ftp.md.chalmers.se/pub/Femlab/ \
+ ftp://ftp.ifs.hr/pub/SciUtil/
+
+MAINTAINER= giffunip@asme.org
+
+BUILD_DEPENDS= ${PREFIX}/lib/libsx.a:${PORTSDIR}/X11/libsx
+
+WRKSRC= ${WRKDIR}/${PKGNAME}
+USE_X11= yes
+
+FEMLAB_HOME= ${PREFIX}/lib/X11/femlab
+
+do-install:
+ ${MKDIR} ${FEMLAB_HOME}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/source/femlab ${FEMLAB_HOME}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/fsource/meshgen ${FEMLAB_HOME}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/fsource/poisson ${FEMLAB_HOME}/bin
+ ${MKDIR} ${FEMLAB_HOME}/config
+ ${INSTALL_DATA} ${WRKSRC}/config/modules ${FEMLAB_HOME}/config
+ ${SED} -e "s|@@FEMLAB_HOME@@|${FEMLAB_HOME}|" <${FILESDIR}/femlab.sh >${PREFIX}/bin/femlab
+ chmod +x ${PREFIX}/bin/femlab
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/examples/femlab
+ ${INSTALL_MAN} ${WRKSRC}/examples/*.fem ${PREFIX}/share/examples/femlab
+ ${MKDIR} ${PREFIX}/share/doc/femlab
+ ${INSTALL_MAN} ${WRKSRC}/docs/manual.dvi ${PREFIX}/share/doc/femlab
+ ${INSTALL_MAN} ${WRKSRC}/docs/manual.ps ${PREFIX}/share/doc/femlab
+.endif
+
+.include <bsd.port.mk>
diff --git a/math/femlab/distinfo b/math/femlab/distinfo
new file mode 100644
index 000000000000..2c07b0714092
--- /dev/null
+++ b/math/femlab/distinfo
@@ -0,0 +1 @@
+MD5 (femlab-2d-v1.1.tar.gz) = 8a296c529c222c4b6115e1ea749bf76d
diff --git a/math/femlab/files/femlab.sh b/math/femlab/files/femlab.sh
new file mode 100644
index 000000000000..89a178c77853
--- /dev/null
+++ b/math/femlab/files/femlab.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+FEMLAB_HOME=@@FEMLAB_HOME@@
+export FEMLAB_HOME
+
+exec ${FEMLAB_HOME}/bin/femlab
diff --git a/math/femlab/files/patch-aa b/math/femlab/files/patch-aa
new file mode 100644
index 000000000000..95ee4e5cb5fb
--- /dev/null
+++ b/math/femlab/files/patch-aa
@@ -0,0 +1,31 @@
+*** source/Imakefile.orig Tue Sep 2 10:38:18 1997
+--- source/Imakefile Tue Sep 2 10:39:42 1997
+***************
+*** 17,29 ****
+
+ OBJS = $(SRCS:.c=.o)
+
+! CC = gcc -O
+ CDEBUGFLAGS =
+ EXTRA_INCLUDES = -I../include
+ #
+ # Change next line to the location of the libsx library
+ #
+! EXTRA_LOAD_FLAGS = -L/users/math/martenl/projects/lib
+ LOCAL_LIBRARIES = -lfreq -lsx -lm XawClientLibs
+ DEPLIBS = XawClientDepLibs
+
+--- 17,29 ----
+
+ OBJS = $(SRCS:.c=.o)
+
+! CC = gcc -O2
+ CDEBUGFLAGS =
+ EXTRA_INCLUDES = -I../include
+ #
+ # Change next line to the location of the libsx library
+ #
+! EXTRA_LOAD_FLAGS = -L$(X11BASE)
+ LOCAL_LIBRARIES = -lfreq -lsx -lm XawClientLibs
+ DEPLIBS = XawClientDepLibs
+
diff --git a/math/femlab/files/patch-ab b/math/femlab/files/patch-ab
new file mode 100644
index 000000000000..2dd2078f1569
--- /dev/null
+++ b/math/femlab/files/patch-ab
@@ -0,0 +1,55 @@
+*** source/graph.c.orig Sat Sep 13 16:23:18 1997
+--- source/graph.c Sat Sep 13 16:39:13 1997
+***************
+*** 608,614 ****
+ void getDrawingScale()
+ {
+ float xoff, yoff;
+! float scl;
+ int width, height;
+ int ww;
+ int nx, ny, id;
+--- 608,614 ----
+ void getDrawingScale()
+ {
+ float xoff, yoff;
+! float iscl; /* inverse scale */
+ int width, height;
+ int ww;
+ int nx, ny, id;
+***************
+*** 630,645 ****
+ width = width / nx;
+ height = height / ny;
+
+! if(state > HAVE_NOTHING){
+! scl = 1./max(xmax-xmin,ymax-ymin);
+! xoff = -scl*(xmin+.5*(xmax-xmin)-.5/scl);
+! yoff = -scl*(ymin+.5*(ymax-ymin)-.5/scl);
+
+! xoff = - xmin*scl*.85;
+! yoff = - ymin*scl*.85;
+
+ ww = min(width, height);
+! Xscl = (int) ((float)ww * 0.85 * scl);
+ Xxoff = (int) ww * xoff ;
+ Xyoff = (int) ww * yoff;
+ Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
+--- 630,646 ----
+ width = width / nx;
+ height = height / ny;
+
+! iscl = max(xmax-xmin,ymax-ymin);
+
+! if((state > HAVE_NOTHING) && (iscl != 0.0)){
+! xoff = .5-(xmin+.5*(xmax-xmin))/iscl;
+! yoff = .5-(ymin+.5*(ymax-ymin))/iscl;
+!
+! xoff = - xmin*.85/iscl;
+! yoff = - ymin*.85/iscl;
+
+ ww = min(width, height);
+! Xscl = (int) ((float)ww * 0.85 / iscl);
+ Xxoff = (int) ww * xoff ;
+ Xyoff = (int) ww * yoff;
+ Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
diff --git a/math/femlab/pkg-comment b/math/femlab/pkg-comment
new file mode 100644
index 000000000000..22b1e980cf2f
--- /dev/null
+++ b/math/femlab/pkg-comment
@@ -0,0 +1 @@
+Interactive program for solving partial differential equations in 2D
diff --git a/math/femlab/pkg-descr b/math/femlab/pkg-descr
new file mode 100644
index 000000000000..9e489374dc06
--- /dev/null
+++ b/math/femlab/pkg-descr
@@ -0,0 +1,21 @@
+Femlab is built up by several different programs. Currently the
+X11-interface, a meshgenerator and one solver. These programs communicate
+with each other with two ASCII files called "area.scratch" and
+"solu.scratch". The programs reside in FEMLAB_HOME/bin. These allows you
+to for instance run the solver directly from the csh as a batch job. The
+aim is to provide more solvers for different applications, such as 2D
+incompressible flow problems, transient problems etc. It should also be
+possible to use the X11 interface for your own applications.
+ +---------------------------------------+
+ | |
+ | Authors: |
+ | Peter Hansbo |
+ | Marten Levenstam |
+ | Dep. of Mathematics |
+ | Chalmers University of Technology |
+ | S-412 96 Goteborg |
+ | SWEDEN |
+ | femlab@math.chalmers.se |
+ | |
+ | \|/ |
+ +----------------( )--------------------+
diff --git a/math/femlab/pkg-plist b/math/femlab/pkg-plist
new file mode 100644
index 000000000000..6eb4f1681066
--- /dev/null
+++ b/math/femlab/pkg-plist
@@ -0,0 +1,19 @@
+bin/femlab
+lib/X11/femlab/config/modules
+lib/X11/femlab/bin/femlab
+lib/X11/femlab/bin/meshgen
+lib/X11/femlab/bin/poisson
+share/doc/femlab/manual.dvi
+share/doc/femlab/manual.ps
+share/examples/femlab/capacitor.fem
+share/examples/femlab/convection.fem
+share/examples/femlab/man.fem
+share/examples/femlab/pot-cyl.fem
+share/examples/femlab/soap.fem
+share/examples/femlab/spark-plug.fem
+share/examples/femlab/torsion.fem
+@dirrm lib/X11/femlab/config
+@dirrm lib/X11/femlab/bin
+@dirrm lib/X11/femlab
+@dirrm share/doc/femlab
+@dirrm share/examples/femlab