Vtk import and real mesh volume

40 views
Skip to first unread message

henri meric

unread,
Feb 25, 2012, 4:09:01 PM2/25/12
to sfepy-devel
Hi every one,

I would like to know how to get the volume of a mesh
the mesh is built with meshpy (not my work) and save as a vtk
I need as a first step to get the volume of the mesh

I can't find a way to do it quickly.

Hope anyone would be able to help me.

thanks

Vladimír Lukeš

unread,
Feb 25, 2012, 6:51:07 PM2/25/12
to sfepy...@googlegroups.com
Hi,

define function

def get_volume(pb):
volume = pb.evaluate('d_volume.5.V(u)')

and set it as the pre_process_hook function in options

options = {
'pre_process_hook' : 'get_volume',
}


Regards
Vladimir

Reply all
Reply to author
Forward
0 new messages