In examples/large_deformation/hyperelastic.py a rotation by displacements is applied. By using a similar function the vectors defining the force couples could be defined for dw_surface_ltr (IMHO). Does it make sense?
r.
----- Reply message -----
From: "Andre Smit" <freev...(a)gmail.com>
To: <sfepy...(a)googlegroups.com>
Subject: Torque
Date: Sat, Dec 18, 2010 05:10
What is the best way to apply a torque load to a model?
--
Andre
--
You received this message because you are subscribed to the Google Groups "sfepy-devel" group.
To post to this group, send email to sfepy...(a)googlegroups.com.
To unsubscribe from this group, send email to sfepy-devel...(a)googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
i'm finding sfepy to be very interesting, but installing it on windows
is very much tiresome. is there any way to make the installation one-
click???
thanks.
I just updated my 2007 Intel Duo Core MacBook Pro to Snow Leopard...
updated macports... I need to know if these errors that I'm posting
below are critical to using sfepy for magnetostatic modeling...
#1: All dependencies are installed. I started the sfepy_gui.py-2.6
and I got a problem:
Xlib: extension "RANDR" missing on display ":0.0".
I looked around on the internet and everyone pointed to the xorg.conf
file. I don't have this file and Snow Leopard's X11 is actually
started via "startx". I tried "starx -configure" Something happened
but no "xorg.conf" file appeared anywhere on my system... I don't
know how to make sure I get this RANDR problem handled and I have no
idea what problems will arise if I don't handle it now.
#2: I executed the runTests.py script and I got two problems. The
first is with the test_fem.py script. The second is with the
test_input_acoustics.py. Below, I am posting the outputs of the --
debug flag on both individual test scripts.
*********_*_*_**_*_*_*_*_*_* DEBUG TEST_FEM.PY OUTPUT:
*_*_*_*_*_*_**_**************
<<< directory: /opt/local/var/macports/software/py26-sfepy/2011.1_0/
opt/local/Library/Frameworks/Python.framework/Versions/2.6/share/sfepy/
tests, test files: 1
<<< /opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
Library/Frameworks/Python.framework/Versions/2.6/share/sfepy/tests/
test_fem.py
sfepy: left over: ['verbose', 'nm', '__builtins__', '_filename',
'__file__', '__doc__', '__package__', 'sfepy', 'test_bases',
'__name__', 'TestCommon', 'op']
>>> test instance prepared (2 test(s))
... 2_3 order 0 (n_nod: 1): True
... 2_3 order 1 (n_nod: 3): True
... 2_3 order 2 (n_nod: 6): True
... 2_3 order 3 (n_nod: 10): True
... 2_3 order 4 (n_nod: 15): True
... 2_3 order 5 (n_nod: 21): True
... 2_3 order 6 (n_nod: 28): True
... 2_3 order 7 (n_nod: 36): True
... 2_3 order 8 (n_nod: 45): True
... 2_3 order 9 (n_nod: 55): True
... 2_3 order 10 (n_nod: 66): True
... 2_4 order 0 (n_nod: 1): True
>>> <type 'exceptions.TypeError'>
Traceback (most recent call last):
File "/opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
bin/runTests.py-2.6", line 225, in <module>
main()
File "/opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
bin/runTests.py-2.6", line 216, in main
run_tests(stats, dirname, [filename])
File "/opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
bin/runTests.py-2.6", line 148, in run_tests
n_fail, n_total, test_time = run_test( conf_name, options )
File "/opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
bin/runTests.py-2.6", line 111, in run_test
ok, n_fail, n_total = test.run( options.debug )
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/base/testing.py", line 65, in run
ret = test_method()
File "/opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
Library/Frameworks/Python.framework/Versions/2.6/share/sfepy/tests/
test_fem.py", line 274, in test_base_functions_delta
bf = ps.eval_base(ps.node_coors)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/fem/poly_spaces.py", line 294, in
eval_base
eps=eps)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/fem/poly_spaces.py", line 650, in
_eval_base
suppress_errors, eps)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/fem/extmods/fem.py", line 168, in
eval_lagrange_tensor_product
return _fem.eval_lagrange_tensor_product(*args)
TypeError: unknown array type
*************_*_*_*_*_*_**_*__DEBUG TEST_INPUT_ACOUSTICS.PY OUTPUT
__*_*_*_**_*_*_*******************
<<< directory: /opt/local/Library/Frameworks/Python.framework/Versions/
2.6/share/sfepy/tests, test files: 1
<<< /opt/local/Library/Frameworks/Python.framework/Versions/2.6/share/
sfepy/tests/test_input_acoustics.py
sfepy: left over: ['verbose', '__builtins__', '_filename', '__file__',
'__package__', 'TestInput', 'input_name', '__name__', 'output_name',
'__doc__']
sfepy: left over: ['w', '__builtins__', 'rho', '__name__', 'v_n',
'verbose', 'c', 'data_dir', '__doc__', '__package__', '_filename',
'__file__']
>>> test instance prepared (1 test(s))
... solving ../examples/acoustics/acoustics.py...
sfepy: reading mesh (/opt/local/Library/Frameworks/Python.framework/
Versions/2.6/share/sfepy/meshes/2d/special/two_rectangles.mesh)...
sfepy: ...done in 0.00 s
sfepy: setting up domain edges...
sfepy: ...done in 0.00 s
sfepy: creating regions...
sfepy: Gamma_out
sfepy: Omega
sfepy: Gamma_in
sfepy: ...done in 0.01 s
sfepy: equation "Acoustic pressure":
sfepy: 117649.0 * dw_laplace.ivol.Omega( one.one, q, p )
- 1000000.0 * dw_mass_scalar.ivol.Omega( q, p )
- 343000j * dw_surface_mass_scalar.isurf.Gamma_out( q, p )
= 182355950j * dw_surface_integrate.isurf.Gamma_in( q )
sfepy: setting up dof connectivities...
sfepy: ...done in 0.00 s
sfepy: using solvers:
nls: newton
ls: ls
sfepy: updating variables...
sfepy: ...done
sfepy: matrix shape: (61, 61)
sfepy: assembling matrix graph...
sfepy: ...done in 0.00 s
sfepy: matrix structural nonzeros: 445 (1.20e-01% fill)
sfepy: updating materials...
sfepy: one
sfepy: ...done in 0.00 s
sfepy: nls: iter: 0, residual: 1.116698e+07 (rel: 1.000000e+00)
>>> <type 'exceptions.TypeError'>
Traceback (most recent call last):
File "/opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
bin/runTests.py-2.6", line 225, in <module>
main()
File "/opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
bin/runTests.py-2.6", line 216, in main
run_tests(stats, dirname, [filename])
File "/opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
bin/runTests.py-2.6", line 148, in run_tests
n_fail, n_total, test_time = run_test( conf_name, options )
File "/opt/local/var/macports/software/py26-sfepy/2011.1_0/opt/local/
bin/runTests.py-2.6", line 111, in run_test
ok, n_fail, n_total = test.run( options.debug )
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/base/testing.py", line 65, in run
ret = test_method()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
share/sfepy/tests/testsBasic.py", line 72, in test_input
nls_status=status)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/solvers/generic.py", line 224, in
solve_direct
nls_status=nls_status)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/solvers/generic.py", line 164, in
solve_stationary_op
state = problem.solve(nls_status=nls_status)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/fem/problemDef.py", line 850, in
solve
vec = solvers.nls(vec0)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/solvers/nls.py", line 247, in
__call__
mtx_a = fun_grad(vec_x)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/fem/evaluate.py", line 46, in
eval_tangent_matrix
mtx = pb.equations.eval_tangent_matrices(vec, mtx)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/fem/equations.py", line 639, in
eval_tangent_matrices
self.evaluate(mode='weak', dw_mode='matrix',
asm_obj=tangent_matrix)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/fem/equations.py", line 523, in
evaluate
asm_obj=asm_obj)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/fem/equations.py", line 774, in
evaluate
mode=dw_mode, diff_var=svar)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/terms/terms.py", line 1373, in
assemble_to
rdc, cdc)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/sfepy/fem/extmods/fem.py", line 148, in
assemble_matrix_complex
return _fem.assemble_matrix_complex(*args)
TypeError: not a C array
Can anyone please help on these two errors or let me know if they are
CRITICAL>>>>??
Hi
any Cython expert around (Ondrej?).
Our build system already supports cython extension modules and I succeeded in
using it for simple stuff, like the sfepy/fem/physics/extmods/cdft.pyx, see [1].
Now I would like to proceed further, but am only a beginner, so an advice would
come handy:
I need to map somehow numpy arrays to the FMField struct defined in
sfepy/fem/extmods/fmfield.h to be able to export C functions (e.g. term
evaluation functions) to Python and pass numpy arrays in. What is the best way
to do this? Also being able to call Python from C would be nice (e.g. some
numpy array functions).
(Why all this?
- Cython wrappers are much lighter compared to swig ones -> less call overhead.
- Cython code looks like Python, so it's easier to write fast code.
- it's cool :))
r.
[1] https://github.com/rc/sfepy/tree/cython
I am pleased to announce release 2011.2 of SfePy.
Description
-----------
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 license.
Home page: http://sfepy.org
Mailing lists, issue tracking: http://code.google.com/p/sfepy/
Git (source) repository: http://github.com/sfepy
Documentation: http://docs.sfepy.org/doc
Highlights of this release
--------------------------
- experimental implementation of terms aiming at easier usage and
definition of new terms
- Mooney-Rivlin membrane term
- update build system to use exclusively setup.py
- allow switching boundary conditions on/off depending on time
- support for variable time step solvers
For more information on this release, see
http://sfepy.googlecode.com/svn/web/releases/2011.2_RELEASE_NOTES.txt
(full release notes, rather long and technical).
Best regards,
Robert Cimrman and Vladimír Lukeš
Hello all,
does anybody know both Fenics and SfePy quite well, so that he/she can
advice where I should rather spend my time: Either with Fenics or with
SfePy? Or should I rather ask: With SfePy or Fenics? :-)
I am interested in:
- programming elements to meet a specific purpose
- programming material laws
- solve both academic and real-world problems (mostly nonlinear-structural)
- exploiting parallel processing for FEM
Looking forward to your response.
Sven