First time here? Checkout the FAQ!
0 votes
by (630 points)

The *.lon files give the fibre orientation per element. I wrote a script to find from the coordinates of a point of the mesh, the fibre orientation. However, this takes forever to calculate, since first the index of the point must be found and then the element containing this index. Doing this for all points in a mesh takes a very long time.

I tried looking into meshtool elem2node, but got a segmentation fault here and I am not 100 percent sure I used it in the correct way.

Is there an efficient, built-in way to get this information?

Thanks a lot in advance!



1 Answer

+1 vote
by (7.8k points)
selected by
Best answer


Meshtool should do this for you. I am not sure what steps led to your segfault. I suggest the following steps:

# extract fibers, this call will create mymesh.fib.vec
meshtool extract fibers -msh mymesh.elem -odat mymesh -mode 1
# interpolate fibers elem-to-node
meshtool interpolate elem2node -omsh mymesh.elem -idat mymesh.fib.vec -odat test.fib.nod.vec

Hope that helps,


by (630 points)
Hi Aurel!

Is it possible that meshtool has no command "extract fibers" ? When I type this, I get wrong usage error and when I check the help of meshtool, it is not listed. The only thing resembling this is "generate fibres" but I guess this is generating fibres in the mesh.

To be sure, I checked the git repo and it seems like I am up to date with the master branch.

Thanks for helping!

by (7.8k points)

You are using an old meshtool version. I assume it is the one provided with openCARP. You can build a new version from

Best, Aurel
by (630 points)
Yep, that was it. Thank you!
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance