Skip to content

Conversation

@erikvansebille
Copy link
Member

This PR adds an explicit XLinear_Velocity interpolator, effectively moving the code from inside field.py. This improves transparency what is being done in interpolation.

if self._vector_interp_method is None:
u = self.U._interp_method(particle_positions, grid_positions, self.U)
v = self.V._interp_method(particle_positions, grid_positions, self.V)
if "3D" in self.vector_type:
w = self.W._interp_method(particle_positions, grid_positions, self.W)
else:
w = 0.0
else:
(u, v, w) = self._vector_interp_method(particle_positions, grid_positions, self)

First of all, do you agree this would be a good change?

A few more more things to do

  • base the choice between Grid_Velcoity and XLinear_Velocity would be based on grid metadata, in FieldSet creation. @VeckoTheGecko, could you help?
  • Make similar functions for UxGrids. @fluidnumerics-joe, could you pick that up?
  • Remove the code linked above from field.py (so that VectorFields can't have _vector_interp_method=None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants