On 23.06.2015 18:59, Andreas Kloeckner wrote:
Dmitry Grebennikov <dmitry.ew(a)gmail.com> writes:
> Could you please explain what is the content of mesh.element_volumes?
> I tried to get the values of it with:
> 1) for i in mesh.element_volumes:
> 2) np.array(mesh.element_volumes)
> but received Traceback:
> File "<stdin>", line 1, in <module>
> RuntimeError: Array unallocated
> What is the reason of such behavior?
element_volumes is not allocated by default (since it is not needed in
the default case). Calling element_volumes.setup() should do that for
I've just tried to call:
volumes = np.array(mesh.element_volumes)
array([ 6.92455981e-310, 6.92455981e-310, 6.92456161e-310, ...,
1.97626258e-323, 0.00000000e+000, 0.00000000e+000])
So there are near-zero values, and it doesn't correspond to the actual
volumes of tetrahedra of mine mesh.
Doing something wrong again?