I presume it's possible to probe cell data in a function call or during post_processing. I'm interested in extrapolating stresses averaged in the elements to the nodes.
Could I apply var.evaluate_at(...)?
In [49]: from sfepy.fem.evaluate import eval_term_op In [52]: stress = eval_term_op(vec, 'de_cauchy_stress.i1.Omega(solid.D,u)', pb) In [54]: var Out[54]: FieldVariable:s In [59]: stress Out[59]: array([[[[ 2.38035802], [-19.45504858], [ 2.5780901 ]]], ...
In [68]: var.data_from_data(stress)
In [71]: var.evaluate_at(nm.array[0.0,0.0])
TypeError Traceback (most recent call last)
/home/grassy/sfepy_dev/sfepy/sfepy/interactive/__init__.pyc in <module>() ----> 1 2 3 4 5
TypeError: 'builtin_function_or_method' object is unsubscriptable
In [77]: var.data Out[77]: deque([array([ 2.38035802, -19.45504858, 2.5780901 , ..., -1.92049253, -1.47623867, 1.56398786])])
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To post to this group, send email to sfepy...@googlegroups.com. To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
On 04/19/10 16:48, freevryheid wrote:
I presume it's possible to probe cell data in a function call or during post_processing. I'm interested in extrapolating stresses averaged in the elements to the nodes.
Could I apply var.evaluate_at(...)?
Yes. This is one possibility. I am just now working on another method.
In [49]: from sfepy.fem.evaluate import eval_term_op In [52]: stress = eval_term_op(vec, 'de_cauchy_stress.i1.Omega(solid.D,u)', pb) In [54]: var Out[54]: FieldVariable:s In [59]: stress Out[59]: array([[[[ 2.38035802], [-19.45504858], [ 2.5780901 ]]], ...
In [68]: var.data_from_data(stress)
In [71]: var.evaluate_at(nm.array[0.0,0.0])
I guess nm.array([[0.0, 0.0]]) would help. You are trying to index nm.array, which is a class.
TypeError Traceback (most recent call last)
/home/grassy/sfepy_dev/sfepy/sfepy/interactive/__init__.pyc in <module>() ----> 1 2 3 4 5
TypeError: 'builtin_function_or_method' object is unsubscriptable
In [77]: var.data Out[77]: deque([array([ 2.38035802, -19.45504858, 2.5780901 , ..., -1.92049253, -1.47623867, 1.56398786])])
cheers, r.
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To post to this group, send email to sfepy...@googlegroups.com. To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
On 04/20/10 10:36, Robert Cimrman wrote:
On 04/19/10 16:48, freevryheid wrote:
I presume it's possible to probe cell data in a function call or during post_processing. I'm interested in extrapolating stresses averaged in the elements to the nodes.
Could I apply var.evaluate_at(...)?
Yes. This is one possibility. I am just now working on another method.
As for the other method, see my new comment at [1]
r.
[1] http://code.google.com/p/sfepy/issues/detail?id=45
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To post to this group, send email to sfepy...@googlegroups.com. To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
participants (2)
-
freevryheid
-
Robert Cimrman