Does PyFR have a utility, or some other recommended way, to sample .pyfrs files at certain locations within the solution domain? I am aware that solution-plugin-sampler exists, but I do not necessarily know the exact locations at which I should sample the solution in advance.
In short, I have a bunch of .pyfrs files. I want to sample each file at certain coordinates, ideally programmatically (can be a shell script, python code etc). Is this possible, or would I have to re-run the simulations?
There is no prescribed way, but what you could do is write some code that reads in the pyfrs and pyfrm files and then modify the sampler plugin code to sample the read in data.
Dear @WillT and @fdw , thanks for the suggestions. I’ll try both. Seems like @fdw 's approach is more flexible, as it would also permit sampling the gradients, however, I’d prefer not to introduce a big program like paraview as a hard dependency of my codebase if possible. Is there a way to obtain the gradients via SamplerPlugin, perhaps by changing the solns = intg.soln line in the __call__ method to solns = intg.grad_soln ?
Something close to that should do the job. Although, if you want to do any serious post-processing you’ll likely need ParaView, so it might be better to introduce the dependency sooner rather than later.