A free face is based on mesh topology definition and is the face of an element that is not used by any other element. So , yes it is the outer faces or not connected to other element faces of the mesh. It does not take into account any type of other connection than mesh element face to another element face. If you describe what you mean,or want to find, for your "free faces" then maybe the logic to get this can be found.
Thank you for your prompt rely! Please look at my function.
What I mean is that if I choose whole elements in the wire for fem_u_get_free_faces, it will return all the faces of elements which is in the outside of the wire (include free faces and non free faces).
What I do now for the hex elems is to again filter out all the non free face of the returned faces by only selecting faces which have nodes that connected with 4 elems around.
This solution makes thing complicated and only works for hex elems.
I'm uncertain what you mean by "choose whole elements in the wire", I'm sorry but "in the wire" is the bit that is not clear to me.
The fem_u_get_free_faces returns the list of free faces considering only those elements given in the input argument. It is not considering the free faces of the "whole model".
It would help if you described what you want the PCL to do in a little more detail.
Are you trying to get freefaces with respect to the whole model or just the element group in the input argument?
The output arguments:
fflist, elm_ids, face_ids, no_face
what should fflist look like?
do elm_ids and face_ids have the same size and maybe look like:
elm_ids = [1,2,4,5,5,6]
face_ids = [2,3,1,2,4,1]
no_face=6
i.e. this refers to faces: elm1.1, 2.3, 4.1, 5.2, 5.4, 6.1
element 5 has 2 freefaces so it occurs twice in the elm list.
trying to run your PCL there are a couple of missing functions.
id_list_from_picklist is self explanatory and I have my own version.
find_elem_as_node2(node_list(j), t_no_elem, t_elemlist) what does this do?
following on my last email, I'm going to assume that the issue was that you only want elements from your list that have free faces when considering all the model.
I have updated you code and attached it.
Firstly it gets all the solid elements in the db and then gets their free faces.
It then loops through this and if an element matches one in your input list it keeps the information. At the end it has the list of free faces (with respect to the whole model) for your input elements.
I'm not claiming this is the most efficient or best method and the code needs some polishing up with status checks and error traps.
Apologies if this is not what you wanted, just try to explain again.
It's very useful if you ever want to use the select menus to define points etc on the fly and get the XYZ location etc. but it is rather cumbersome to work with.