Import coordinates

Hello, I want to import the coordinates of a bunch of points, and store the coordinates in an array as global variables. Is it possible? could anyone give me some suggestions?

Thaks a lot.

Not without modifying the code. From then it really depends what you want to do with the points. There is a big difference between using the points in say a Python plugin compared with code on the backend.

Regards, Freddie.

Yes, I want to modify the code. Can you give me some ideas?

The first thing you need to do is figure out how exactly what you want to do fits within the high-order FR framework. Only once you’ve done this and come up with a formulation which does not impact the order of accuracy is it sensible to start thinking about how to code up the functionality.

Regards, Freddie.

Thanks.
I want to use the coordinates of solution points in the physical space, how can I use the dictionary vars to get all solution points coordinates in other py file? Are there any examples for my reference?

Best regards

It depends what Python file and in what context.

However, a quick search shows several values which make use of these coordinates:

for example.

Regards, Freddie.

In this way, x = plocs[0], y = plocs[1], z = plocs[2], are these right?

And when I use the physical coor of solution point, is it necessary to enter the element type?

The element type is handled in the loop, eles is an element object for a single element type.

As to where x, y and z are in that array, I imagine you’re right but check the shape of the array.