underworld3 icon indicating copy to clipboard operation
underworld3 copied to clipboard

Change in return type of getField() function in PETSc version 3.22.1

Open jcgraciosa opened this issue 1 year ago • 5 comments

Branch tested: development PETSc version: 3.22.1 Python version: 3.12.7 Issue description:

Accessing the swarm fields using getField() no longer returns the field of interest as an array. Instead, it returns a tuple with the:

  • first element corresponding to the field of interest as an array and,
  • second element corresponding to the dimensions (I think).

I think this change may have a lot of effects moving forward.

To test:

import underworld3 as uw
mesh = uw.meshing.UnstructuredSimplexBox(minCoords=(0, 0), maxCoords=(1, 1), cellSize = 1/8)   

jcgraciosa avatar Nov 18 '24 11:11 jcgraciosa