As the release is out, we can now think about how to allow for Cython in our
The current build system is rather schizophrenic (numpy distutils and
makefiles), so ideas which way to go are welcome. The process should be simple :o)
another step to better interactive use of SfePy was implemented today - the
geometries (or reference mappings) are now created on the fly as needed. This
simplified a lot of the code in sfepy.fem.
If you only use the problem description files, you should not notice this
change. Otherwise you might :-} Report back any problems, please.
I try to apply constant volume forces to subregion (not whole
domain). For example I use
I add follow line:
ff=domain.create_region('ff','nodes in x < %.10f' % ( min_x +
0.1*(max_x - min_x)))
And replace "omega" in line which define t2 with "ff".
The result is error:
sfepy: infs or nans in the residual: [-0.78190974 0.
0. ..., 0. 0. 0. ]
--> 197 if self.log is not None:
198 self.log(err, it)
What I do wrong?
I am looking for a framework for prototyping different stuff regarding
shape optimization for development and research purposes related to
our commercial optimization software TOSCA (www.fe-design.com). I was
looking for a python framework with FE-capabilities and found SfePy
which I find really exiting.
Now, I've read most of the documentation, seen the fluid-shape
optimization example (shapeOptim.py) which I have not debugged yet,
but I am still missing some bricks to see the whole picture. I think
my main problem is that I am missing the understanding the "objects"
1. Do you have a class-diagram or the like? Relations between problem,
elements, nodes, material and terms is unclear for me. I believe you
use many function pointers or something like that which throws me off.
I have some experience programming Fortran, C++, Perl and some Python
and maybe my Python skills are too bad...
2. Secondly, when I grasp what you are doing, I would like to
implement a more general adjoint solver (the fluid problem is assuming
self-adjoint or not?). In very general form I would like to:
a) append linear adjoint loads (inheriting BCs from primary problem)
with respect to my optimization problem,
b) solve the primary and the adjoint loadcases
c) save the solutions
d) calculate sensitivities
e) update nodal positions and goto b)
Any helpful comments are very appreciated. Please excuse me if I use
some mathematical expressions imprecise or incorrect - I am a
mechanical engineer using mathematical methods to solve mechanical
problems. The math is cool and interesting but second priority. :-)
Peter M. Clausen
I had to do a clean install of ubuntu-lucid due to careless changes I
have made to the system python files. I could no longer use gtk.gtkgl
which was needed. So, trying to get a working sfepy from clean ubuntu, I
came across python-setuptools which is needed (used apt-get), and sympy
6.7 which needs to be built and installed locally just like scikits.
I now have a correctly running sfepy again :-)
Might help someone with less resolve to get sfepy working :-)
I am pleased to announce release 2010.3 of SfePy.
SfePy (simple finite elements in Python) is a software for solving systems of
coupled partial differential equations by the finite element method. The code
is based on NumPy and SciPy packages. It is distributed under the new BSD
Development, mailing lists, issue tracking: http://sfepy.org
Git repository: http://github.com/sfepy
Project page: http://sfepy.kme.zcu.cz
Highlights of this release
- significantly rewritten code for better interactive use
- cleaner and simpler high level interface
- new tutorial section:
- Interactive Example: Linear Elasticity 
Apart from many bug-fixes, let us mention:
- new examples:
- demonstration of the high level interface
- new tests:
- tests of the new high level interface
- simplified but more powerful homogenization engine
For more information on this release, see
(full release notes, rather long and technical).
Robert Cimrman and Contributors (*)
(*) Contributors to this release (alphabetical order):
Vladimír Lukeš, Osman, Andre Smit, Logan Sorenson
I am back. The conference was very nice, and several things are clear to me now:
- sphinx was a good move (thanks, Logan!)
- cython is the way to go for speed
- writing a GUI with traits and mayavi should not be that difficult for a
dedicated person (one guy did a very cool GUI for some brain imaging in six
months as his master thesis at EPFL, without prior knowledge of Python...)
Check out the conference site , all the slides should appear there sooner or
Also, a very interesting collection of tutorials was assembled, see , (or
 with my scipy.sparse tutorial, to be merged to ).
we are going to make a release soon (maybe tomorrow), so any testing of the
current git master branch  would be welcome.
I hope that not everyone is on holidays :)
FYI: I have finally created some documentation on how to evaluate an expression
involving sfepy terms given as string, see . The new
ProblemDefinition.create_evaluable() function has some nice properties that
allow fast re-evaluation of the expression with different values of variables.