I’m trying to get the solution on a boundary surface, but when I try to view it (together with the extracted mesh) there are “holes” between elements. I guess that I’m only getting the spts projected onto the surface but I’m missing the interface points.
The code is basically the one from the fluidforce plugin
for etype, fidx in self._m0:
# Get the interpolation operator
m0 = self._m0[etype, fidx]
nfpts, nupts = m0.shape
# Extract the relevant elements from the solution
uupts = solns[etype][..., self._eidxs[etype, fidx]]
# Interpolate to the face
ufpts = m0 @ uupts.reshape(nupts, -1)
ufpts = ufpts.reshape(nfpts, nvars, -1)
ufpts = ufpts.swapaxes(0, 1)
And the resultant extracted surface is attached below
To fix the panel gaps, you might like to set the points you are interpolating to be either gauss-legendre-lobatto for quads/hexs, or alpha-opt for tris/tests.
@WillT It works as expected, I really forgot that I was using GL points instead of GLL…!
One last thing I need: say that my solver order is 4, hence a quad has 25 spts. How can I change the qdeg to be such that my number of points on the surface maches the number of spts?
This is not something that the current code does by default, as it can only be done if the flux points are a subset of the solution points. But you might be able to modify the code to pull out the solution points on a face.