j: Next unread message
k: Previous unread message
j a: Jump to all threads
j l: Jump to MailingList overview
On 06/11/2012 05:17 PM, steve wrote:
So.. I broke down and "template"ized a set of boundary condition functions in a separate file that can be imported into the problem description. It works pretty well I guess. My app can render the template and run the sfepy process to get the fields. First result attached. Noticed the "needle point" boundary which was the one I was hoping to handle with group ids.. but it's pretty easy to cook up a python function to find the nodes.
Now. I've got a vtk file full of lovely field data. In my relaxation version I interpolate over my rectangular grid to find the electric field and compute particle trajectories. So... I've found the vtk module and can read in data from the output file. I'm playing with various ways to interpolate and estimate the field at various positions in the domain, but I'm guessing this problem has been solved before. Is it best to re-map the data onto a rectangular grid, or is there some way to quickly find the nodes nearest some particular spatial coordinates and interpolate directly from the irregular grid data?
Yes, check out . I would use PointsProbe to get the data in a grid, instead of LineProbe mentioned in the Primer text. The text show how to make matplotlib plots of data over given lines. If you need more control, you will need to manually create the probe as in gen_lines(), and then use the code from get_it() in probe_hook() to sample the data. For this a ProblemDefinition instance is needed (called "problem" there), but I guess you have it in your code already. Anyway, ask in case of problems.