Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtaining solution for user-defined set of points #138

Open
cissic opened this issue Nov 10, 2017 · 1 comment
Open

Obtaining solution for user-defined set of points #138

cissic opened this issue Nov 10, 2017 · 1 comment

Comments

@cissic
Copy link

cissic commented Nov 10, 2017

Could anybody tell me if there is possibility in Agros of obtaining (and exporting) the values of solution in some user-defined set of points or mesh nodes.
Currently, using graphical interface, I can see the value of the function by clicking point-by-point on the solution plot. This is very inconvenient.
I tried to use python console but I couldn't find any documentation on which function/structure could be used for this.
Any help appreciated...

@stevennoyce
Copy link

I have the same question.

I'll share what I have been able to do so far. I have used two methods and am looking for a third.

  1. You can use the "Chart" tab, define a line, and either graph or export to a CSV any number of values along that line. This is a way to obtain and export user defined points, but not arbitrary located points necessarily.
  2. If using python as I prefer to do, you can use the provided PythonLab interface to create a script from your model, then you can call the local_values() method on the field of interest, for example magnetic.local_values(x,y)['Brx']. You can run a for loop over your points of interest to grab the corresponding values.
  3. My related question is if the local_values() method which only takes one point is the only approach. It turns out that running a for loop over a modest number of points to pull out a matrix representation of a solution field is a fairly slow operation. Given that the interface shows a fairly high resolution image of the solution, I'm curious if there is a way for python scripts to get access to this data more efficiently. For instance, is there a method similar to local_values() that can take a matrix of points instead of a single point, and return matrices of values at those points?

I know this question is fairly old, but since people can find it via searches I wanted to provide what I have found. I would also love if anyone has more details of a better approach or thoughts on my third point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants