Problem with linear elasticity
I have an older code that I am trying to update to up-to-date -version of SfePy. The code has been running with the SfePy 2014.4. Now when updating to Anaconda, python 3.6 and SfePy 2018.1 the same script gives me the error message below. Is this a problem with my script or a bug in SfePy?
Thank you for you help! -Tuomas
sfepy: guessing abaqus sfepy: reading mesh [tri3, quad4, tetra4, hexa8] (Z:\Projektit\Sfepy\data\models\mesh.inp)... sfepy: ...done in 0.22 s sfepy: creating regions... sfepy: Omega sfepy: Left sfepy: Right sfepy: Center sfepy: CenterBottom sfepy: ...done in 0.12 s sfepy: equation "balance_of_forces": sfepy: dw_lin_elastic_iso.i.Omega( variable_lam.val, variable_mu.val, v, u ) = dw_point_load.0.Center(Load.force, v) sfepy: using solvers: ts: no ts nls: newton ls: ls sfepy: updating variables... sfepy: ...done sfepy: setting up dof connectivities... sfepy: ...done in 0.01 s sfepy: matrix shape: (55308, 55308) sfepy: assembling matrix graph... sfepy: ...done in 0.38 s sfepy: matrix structural nonzeros: 1846422 (-1.49e-03% fill) sfepy: updating variables... sfepy: ...done sfepy: updating materials... sfepy: variable_mu sfepy: Load sfepy: variable_lam sfepy: ...done in 0.07 s sfepy: giving up! Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\simple.py", line 177, in <module> main() File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\simple.py", line 174, in main app() File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\applications\application.py", line 29, in call_basic return self.call(**kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\applications\pde_solver_app.py", line 218, in call post_process_hook_final=self.post_process_hook_final) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\problem.py", line 1383, in solve status=status) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\solvers\ts_solvers.py", line 34, in _standard_ts_call status=status, **kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\solvers\ts_solvers.py", line 75, in __call__ vec = nls(vec0) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\solvers\nls.py", line 257, in __call__ vec_r = fun(vec_x) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\evaluate.py", line 76, in eval_residual vec_r = self.problem.equations.eval_residuals(vec) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\equations.py", line 701, in eval_residuals self.evaluate(mode='weak', dw_mode='vector', asm_obj=out) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\equations.py", line 634, in evaluate term_mode=term_mode, asm_obj=asm_obj) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\equations.py", line 853, in evaluate ret_status=True) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\terms\terms.py", line 1402, in evaluate diff_var, **kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\terms\terms.py", line 1280, in eval_real status = self.call_function(out, fargs) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\terms\terms.py", line 1257, in call_function status = self.function(out, *fargs) File "sfepy\terms\extmods\terms.pyx", line 1331, in sfepy.terms.extmods.terms.dw_lin_elastic File "sfepy\discrete\common\extmods\_fmfield.pyx", line 5, in sfepy.discrete.common.extmods._fmfield.array2fmfield4 ValueError: Buffer has wrong number of dimensions (expected 4, got 3)
Hi Tuomas,
On 04/17/2018 11:18 AM, Tuomas Turpeinen wrote:
I have an older code that I am trying to update to up-to-date -version of SfePy. The code has been running with the SfePy 2014.4. Now when updating to Anaconda, python 3.6 and SfePy 2018.1 the same script gives me the error message below. Is this a problem with my script or a bug in SfePy?
Not sure, 2014.4 is indeed rather old.
Can you send the problem description file and the mesh (small, if possible), so that I could try it? Otherwise it looks that the shape of the material argument of the elastic term is wrong. What are the shapes of variable_lam.val, variable_mu.val?
r.
Thank you for you help! -Tuomas
sfepy: guessing abaqus sfepy: reading mesh [tri3, quad4, tetra4, hexa8] (Z:\Projektit\Sfepy\data\models\mesh.inp)... sfepy: ...done in 0.22 s sfepy: creating regions... sfepy: Omega sfepy: Left sfepy: Right sfepy: Center sfepy: CenterBottom sfepy: ...done in 0.12 s sfepy: equation "balance_of_forces": sfepy: dw_lin_elastic_iso.i.Omega( variable_lam.val, variable_mu.val, v, u ) = dw_point_load.0.Center(Load.force, v) sfepy: using solvers: ts: no ts nls: newton ls: ls sfepy: updating variables... sfepy: ...done sfepy: setting up dof connectivities... sfepy: ...done in 0.01 s sfepy: matrix shape: (55308, 55308) sfepy: assembling matrix graph... sfepy: ...done in 0.38 s sfepy: matrix structural nonzeros: 1846422 (-1.49e-03% fill) sfepy: updating variables... sfepy: ...done sfepy: updating materials... sfepy: variable_mu sfepy: Load sfepy: variable_lam sfepy: ...done in 0.07 s sfepy: giving up! Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\simple.py", line 177, in <module> main() File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\script\simple.py", line 174, in main app() File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\applications\application.py", line 29, in call_basic return self.call(**kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\applications\pde_solver_app.py", line 218, in call post_process_hook_final=self.post_process_hook_final) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\problem.py", line 1383, in solve status=status) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\solvers\ts_solvers.py", line 34, in _standard_ts_call status=status, **kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\solvers\ts_solvers.py", line 75, in __call__ vec = nls(vec0) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\solvers\nls.py", line 257, in __call__ vec_r = fun(vec_x) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\evaluate.py", line 76, in eval_residual vec_r = self.problem.equations.eval_residuals(vec) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\equations.py", line 701, in eval_residuals self.evaluate(mode='weak', dw_mode='vector', asm_obj=out) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\equations.py", line 634, in evaluate term_mode=term_mode, asm_obj=asm_obj) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\discrete\equations.py", line 853, in evaluate ret_status=True) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\terms\terms.py", line 1402, in evaluate diff_var, **kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\terms\terms.py", line 1280, in eval_real status = self.call_function(out, fargs) File "C:\ProgramData\Anaconda3\lib\site-packages\sfepy\terms\terms.py", line 1257, in call_function status = self.function(out, *fargs) File "sfepy\terms\extmods\terms.pyx", line 1331, in sfepy.terms.extmods.terms.dw_lin_elastic File "sfepy\discrete\common\extmods\_fmfield.pyx", line 5, in sfepy.discrete.common.extmods._fmfield.array2fmfield4 ValueError: Buffer has wrong number of dimensions (expected 4, got 3)
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
participants (2)
-
Robert Cimrman
-
Tuomas Turpeinen