I am trying to port my python adapter to precice 2, and I am following the guide here: https://github.com/precice/python-bindings/blob/develop/docs/MigrationGuide.md
afaik, in the new python bindings, data like interface grid, forces and diplacements are now 2D numpy arrays. This seems to work for the mesh grid and when I try to write: i.,e.
interface.write_block_vector_data(self.forceID, self.nodeVertexIDs, self.force)
but, if I try something like:
I got: File “precice.pyx”, line 1015, in precice.Interface.read_block_vector_data
ValueError: Buffer has wrong number of dimensions (expected 1, got 2)
should I ravel/reshape the array?
Sorry, I made the wrong call.
It should be displacement = interface.read_block_vector_data(self.displacementID, self.nodeVertexIDs)