Access mesh groups in imported .med file #920
Replies: 2 comments 3 replies
-
MeshTet1 refers to the geometry representation and ElementTetP1 to the basis functions used to represent the unknown fields. In general these are different and independent of each other. skfem has no built-in support for node groups while there is a built-in support for facet groups. However, if there is something specific you are trying to accomplish then we might be able to help. I think you can consider node groups as arrays of indices referring to the rows/columns of the system matrix. You might need to use Basis.get_dofs or Basis.dofs to map node indices to DOF indices first. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for the quick reply. Concerning the main issue: the program I am developing should be able to take as an input a .med mesh generated by a user with a predefined set of groups and then compute a solution. Since the geometry may vary quite a lot, I don't see a way to consistently find the nodes I need using Basis.get_dofs or Basis.dofs, but I am open to any suggestion :)! My current solution using meshio is working but doesn't look very nice, plus I have to load the mesh twice. Concerning the bonus questions: do you have any good literature that may help me understand how the assembly process works and what MeshTet1 and ElementTetP1 correspond to? I guess I may find this information anywhere on FEM books, but sometimes a good reference is better than a thousand bad ones! |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
Main issue
I am new to scikit-fem and I have a somehow basic question. I use this module to load .med meshes I make in SALOME. The problem is that I can't find a way to access the named nodes groups I created in SALOME. I can do it using meshio but then I have to find the nodes in the mesh imported with scikit-fem by triangulation in 3D space. Is there a better and faster way to do that?
This is how I import my mesh (taken from an example on read the docs):
m = skfem.MeshTet1.load('my_mesh.med')
e1 = skfem.ElementTetP1
e = skfem.ElementVector(e1)
Bonus questions
skfem.Mesh3D
. Does this way of importing a mesh automatically detects the type of elements and work for meshes with more than one element type?MeshTet1
and a second time withElementTetP1
. Is this redundancy needed?Thank you very much for the great work and have a great dey!
Beta Was this translation helpful? Give feedback.
All reactions