Navigation Menu

Skip to content

Commit

Permalink
started SfePy, based on sfe-release-00.35.01.tgz
Browse files Browse the repository at this point in the history
  • Loading branch information
rc committed Dec 19, 2007
0 parents commit 8eeaec3
Show file tree
Hide file tree
Showing 229 changed files with 409,117 additions and 0 deletions.
44 changes: 44 additions & 0 deletions INSTALL.txt
@@ -0,0 +1,44 @@
# 19.01.2007
# last revision: 14.12.2007

This is not for faint of the heart!

Installation prerequisites:
latest (SVN) numpy, scipy (with umfpack support), swig

Dependencies:
matplotlib, pyparsing, umfpack, pytables
eigen.py can use symeig

Not tested on Windows, I don't have them.

Compiling:
----------
1. Edit the Makefile.
- compiler, swig command
- location of python and numpy include files
2. 'make'

Installation:
-------------
None. Run the executable script 'simple.py' in the top-level directory of the
distribution (TOPDIR).

Testing:
--------

Run './runTests.py --filter' or './runTests.py --filter-more' in TOPDIR.

Tests that save results save them into TOPDIR/output-tests directory. View the
results (*.vtk) with a VTK-capable viewer (e.g. paraview, mayavi2).

If all is ok, four failed tests (of 20) should be reported. The failed tests
cover code not included in the distribution; they are:
test_input_pfdpm_permeability.py, test_input_stabilized_navier_stokes.py and
test_boundaryFluxes() of test_laplace_unit_disk.py,
test_laplace_unit_square.py.

If you get more failures, be sure to verify that you have the latest SVN
version of Numpy and SciPy installed (should be at least '0.7.0.dev3649' for
SciPy and '1.0.5.dev4571' for NumPy).
Verify also your pytables installation (possible test_io.py failures).
188 changes: 188 additions & 0 deletions Makefile
@@ -0,0 +1,188 @@
# 14.12.2004, c
# last revision: 14.12.2007
VERSION := 00.35.01
PROJECTNAME := sfe

############### Edit here. #######################################

ARCH := linux
#ARCH := cygwin

ifeq ($(ARCH),linux)
C++ := gcc
CC := gcc
SWIG := swig
DATE := date +%Y_%m_%d

# OPTFLAGS := -g -pg -fPIC -DPIC
OPTFLAGS := -g -O2 -fPIC -DPIC
CARCHFLAGS := -Wall -c
CARCHOUT := -o

PYTHON_INCL := -I/usr/include/python2.4 -I/home/share/software/include -I/usr/lib/python2.4/site-packages/numpy/core/include
# SWIG_LIB := -lswigpy

EXT_INCL := $(PYTHON_INCL)
endif

#DEBUG_FLAGS := -DDEBUG_FMF -DDEBUG_MESH
DEBUG_FLAGS := -DDEBUG_FMF
#DEBUG_FLAGS :=

################ Do not edit below! ##############################

ISRELEASE := 1
MODULES := eldesc input sfe sfe/base sfe/fem sfe/fem/extmods sfe/homogenization sfe/solvers sfe/terms sfe/terms/extmods tests
ifndef ISRELEASE
MODULES += sfe/optimize
else
DEBUG_FLAGS :=
endif
VERSIONH := sfe/fem/extmods/version.h
ALLTARGETS := version modules

CUR_DIR := $(shell pwd)

DISTFILES_TOP := btrace_python Makefile DIARY VERSION findSurf.py init_sfe.py shaper.py test.mesh genDocs.py genPerMesh.py homogen.py extractor.py plotPerfusionCoefs.py runTests.py simple.py eigen.py TODO INSTALL.txt README.txt
RELDISTFILES_TOP := btrace_python Makefile VERSION init_sfe.py extractor.py findSurf.py genDocs.py genPerMesh.py runTests.py simple.py eigen.py INSTALL.txt README.txt RELEASE_NOTES.txt
SUBDIRS = database doc eldesc input para script sfe tests umfpack
RELSUBDIRS = database doc eldesc input script sfe tests
DATADIRS := database
DATADISTDIR := $(PROJECTNAME)-data-$(shell $(DATE))
DISTDIR := $(PROJECTNAME)-$(VERSION)
RELDISTDIR := $(PROJECTNAME)-release-$(VERSION)
BKUPDIR = 00backup-$(notdir $(PROJECTNAME))

####### Default rule

all: $(ALLTARGETS)
echo $(DATADIR)
@echo All done.

##################################################################

INCL :=
SRCPYFILES :=
SRCCFILES :=
HDRCFILES :=
CLEANFILES :=
SRC_LIBSWIG :=

# include the description for each module
include $(patsubst %,%/Makefile.inc,$(MODULES))
INCL += $(patsubst %,-I%,$(MODULES))

CFLAGS := $(OPTFLAGS) -D__SDIR__='"${LOCDIR}"' ${DEBUG_FLAGS} ${INCL} ${EXT_INCL} $(CARCHFLAGS)

ifdef ISRELEASE
CFLAGS += -DISRELEASE
SWIGFLAGS := -DISRELEASE
endif

####### Implicit rules

%_wrap.c: %.i
# $(SWIG) -noruntime -python $(INCL) ${EXT_INCL} -o $@ $<
$(SWIG) -python $(INCL) ${EXT_INCL} $(SWIGFLAGS) -o $@ $<

%_wrap.o: %_wrap.c
$(CC) $(CFLAGS) $< $(CARCHOUT) $@

%.o : %.c
$(CC) $(CFLAGS) $< $(CARCHOUT) $@

####### Build rules

.PHONY : tags version dist reldist htmldocs save backup clean

modules: sfe/fem/extmods/version.h $(SRC_LIBSWIG)
@echo Python modules done.
@echo ""

#$(SRC_LIBSWIG): $(SRC_OBJSWIG) $(SRC_OBJC)
# @echo $(SRC_SRCSWIG)
# @echo $(SRC_OBJSWIGC)
# @echo $(SRC_OBJSWIG)
# @echo $(SRC_OBJSWIGPY)
# @echo $(SRC_LIBSWIG)
# @echo $(SRC_OBJC)
# $(CC) -shared -fPIC -DPIC $< $(SRC_OBJC) $(SWIG_LIB) -o $@
#
$(VERSIONH) : Makefile
sed "s|^\(#define VERSION\) \"[0-9.]*\"|\1 \"$(VERSION)\"|;" $(VERSIONH).in > $(VERSIONH)

clean:
-rm -f *.o *.bak *~ *% *tgz #*
-rm -f $(CLEANFILES)

tags: clear_tags c_tags python_tags

clear_tags:
-rm -f TAGS

c_tags:
-etags -a $(SRCCFILES) $(HDRCFILES)

python_tags:
-etags -a $(SRCPYFILES)

version:
echo $(VERSION) > 'VERSION'

dist: version
-mkdir $(DISTDIR)
rm -rf $(DISTDIR)/*
for i in $(DISTFILES_TOP); do cp -fpd $$i $(DISTDIR)/$$i; done
@for i in $(SUBDIRS); do \
$(MAKE) -C $$i -f Makefile.dist dist DISTDIR=${CUR_DIR}/$(DISTDIR); \
done
tar cf $(DISTDIR).tar $(DISTDIR)
gzip -f --best $(DISTDIR).tar
mv $(DISTDIR).tar.gz $(DISTDIR).tgz
rm -rf $(DISTDIR)

reldist: version
-./genDocs.py --omit="termsAdjointNavierStokes termsHDPM cachesHDPM cachesBasic"
-cp -fpd tmp/terms.pdf doc/tex/
-mkdir $(RELDISTDIR)
rm -rf $(RELDISTDIR)/*
for i in $(RELDISTFILES_TOP); do cp -fpd $$i $(RELDISTDIR)/$$i; done
@for i in $(RELSUBDIRS); do \
$(MAKE) -C $$i -f Makefile.dist reldist DISTDIR=${CUR_DIR}/$(RELDISTDIR); \
done
mkdir $(RELDISTDIR)/output-tests
sed "s|ISRELEASE \:\=|ISRELEASE \:\= 1|;" $(RELDISTDIR)/Makefile > $(RELDISTDIR)/Makefile2
mv -f $(RELDISTDIR)/Makefile2 $(RELDISTDIR)/Makefile
tar cf $(RELDISTDIR).tar $(RELDISTDIR)
gzip -f --best $(RELDISTDIR).tar
mv -f $(RELDISTDIR).tar.gz $(RELDISTDIR).tgz
rm -rf $(RELDISTDIR)

databackup:
-mkdir $(DATADISTDIR)
rm -rf $(DATADISTDIR)/*
for i in $(DATADIRS); do cp -fa $$i $(DATADISTDIR)/$$i; done
tar cf $(DATADISTDIR).tar $(DATADISTDIR)
gzip -f --best $(DATADISTDIR).tar
mv $(DATADISTDIR).tar.gz $(DATADISTDIR).tgz
rm -rf $(DATADISTDIR)
mv -f $(DATADISTDIR).tgz $(BKUPDIR)/$(DATADISTDIR).tgz

backup: dist
-mkdir $(BKUPDIR)
mv -f $(DISTDIR).tgz $(BKUPDIR)/$(DISTDIR).tgz

save: backup
-mount /mnt/floppy
cp -f $(BKUPDIR)/$(DISTDIR).tgz /mnt/floppy/
umount /mnt/floppy

htmldocs:
-rm -rf doc/html
-rm -f doc/doxygenrc
-mkdir doc/aux
-pythfilter.py . doc/aux/
sed "s|^\(PROJECT_NUMBER = \)NUMBER|\1$(VERSION)|;"\
doc/doxygen.config > doc/doxygenrc
doxygen doc/doxygenrc
-rm -rf doc/aux
1 change: 1 addition & 0 deletions README.txt
@@ -0,0 +1 @@
See INSTALL.txt for installation instructions.
60 changes: 60 additions & 0 deletions RELEASE_NOTES.txt
@@ -0,0 +1,60 @@
# created: 20.07.2007 (-1)
# last revision: 14.12.2007

from 00.31.06 to 00.35.01:
==========================
- per term integration, major rewrite of sfe.fem and related:
- term.integral.domain( arguments ) syntax
- 'integral_*' keyword for input files
- each term can use its own quadrature points
- 'field' keyword syntax changed

- minor:
- genDocs.py: PDF term documentation generator

from 00.26.01 to 00.31.06:
==========================

- acoustic band gaps determination:
- zones of frequencies where elastic waves do not prapagate
- based on homogenization of material made of small inclusions periodically
embedded in an elastic matrix
- run via 'eigen.py'
- general linear combination boundary conditions - 'lcbc' keyword:
- rigid body motion constraint imposed on regions
- new Solver classes, solver reorganization:
- all solvers now configured in a uniform way ('solver_[0-9]+' keywords)
- specify solvers using 'options' keyword
- new terms:
- dot product in a volume or on a surface region
- vector field mass term
- scalar field "mass", fine-coarse scalar "mass" terms:
- used for coarse mesh -> fine mesh interpolation of scalar fields

- minor:
- added updated findSurf.py into distribution - extract surface from a mesh
- script/kill_*
- script/writeMesh2D.m
- script/writeSparseMatrixHDF5.m

from 00.22.02 to 00.26.01:
==========================

- testing framework (in the spirit of unit tests):
- particularly tests that standard input files work
- runTests.py: output filtering
- linear spring term (kind of a relaxed Dirichlet BC on node displacements)
- volume term
- Laplace term in 2D
- chained periodic boundary conditions resolving
- new options for simple.py: --save-field-meshes, --solve-not
- periodic mesh merger (genPerMesh.py)

- minor:
- improved region saving
- growing term data cache
- sparse matrix saving into HDF5
- point dof connectivity and geometry
- region handling improvements (canCells flag)
- nonlinear solver status reporting
- distribution: test and example meshes included in the release tarball
1 change: 1 addition & 0 deletions VERSION
@@ -0,0 +1 @@
00.35.01
3 changes: 3 additions & 0 deletions btrace_python
@@ -0,0 +1,3 @@
#!/bin/sh
# 15.12.2004, c
gdb --quiet --core=core --se=/usr/bin/python
12 changes: 12 additions & 0 deletions database/MANIFEST
@@ -0,0 +1,12 @@
kostka_big.mesh
kostka_medium.mesh
kostka_medium_tetra.mesh
plackaplacata.mesh
pul_klikatak.mesh
pul_klikatak2.mesh
simple.mesh
triplacka.mesh
triplackaquad.mesh
triplackasmooth.mesh
tristverec.mesh
tristverec2.mesh
26 changes: 26 additions & 0 deletions database/Makefile.dist
@@ -0,0 +1,26 @@
# 19.07.2007, c
# last revision: 23.10.2007

CDIR = $(notdir $(CURDIR))
DESTDIR = $(DISTDIR)/$(CDIR)

DISTFILES := Makefile.dist MANIFEST
DISTDIRS := tests phono

RELDISTFILES := $(DISTFILES) $(shell cat MANIFEST)
RELDISTDIRS := $(DISTDIRS)

dist:
# echo $(DESTDIR)
mkdir $(DESTDIR)
cp -fpd $(DISTFILES) $(DESTDIR)
@for i in $(DISTDIRS); do \
$(MAKE) -C $$i -f Makefile.dist dist DISTDIR=${DESTDIR}; \
done

reldist:
mkdir $(DESTDIR)
cp -fpd $(RELDISTFILES) $(DESTDIR)
@for i in $(RELDISTDIRS); do \
$(MAKE) -C $$i -f Makefile.dist reldist DISTDIR=${DESTDIR}; \
done

0 comments on commit 8eeaec3

Please sign in to comment.