Hello,
is it possible to create a field that is assing to mesh elements (nodes/faces/cells), similar to what we get when we use controls/volume/scaled jacobian and that in python we can get the scaled jacobian of a specific cell by its ID. I am looking to do this in python, but i did not find anything in this regards in the documentation, if there is not, i thought about creating a dictionary, something like this:
node_field = {node_id: some_value for node_id in mesh.GetNodesId()}
is there any more efficient way?
also if i go the route using a dictionary object, is there any possible way to visualize it?
thanks in advance,
What is the aim here? To store the data in study or med files? I do not know how to store it in FIELDS module, however MEDCOUPLING has an interface on storing fields on meshes to MED files.
And I suggest you store the fields as simple arrays. 1D array where the indices corresponds to the element ID of the desired element type.
hello gregor,
thanks for the answer, i am playing with a new algorithm for meshing, and it uses some fields (values and vectors) defined on the nodes of a tetra mesh, that i am creating using the information of the mesh giving by smesh. but would like to be able to see it easily, as obviously when we do this kind of things we have bugs. similar with what we have in paraview, for the moment, for the vectors i am creating them in geom for better inspeciton, for the field with a magnitude i did not get my head around outside of separating the nodes on layers of values and creating vertexes on geom for each layer or creating smesh groups of nodes with this divisions. but would love to be able to set something like when we display the scaled jacobian on the mesh.
would love to not go back and forward between geom and smesh and simply be able to do everything inside of it.
To visualize it “easily” as a helping view during a dialog you are preparing, not sure. I use extensively the MED format to store fields on mesh structures and then visualizing it in ParaView. This involves saving it to a file though.
What you want though, sounds like you would have to go into the source code of SMESH/GEOM in order to add additional visualizations.
I did GUI development, but more of adding dialogs than using the visualizations that are available to use in SALOME framework.
1 Like
thanks for your answer,
yeah, i could go thought paraview file, but as you mention it is something exporting a file, opening or even if it is paravis it is far from optimal…. i thought of asking if there was something i was missing (as it happens to me a lot in salome lol) but i guess this is not possible…