Skip to content

issue in mesh2mesh_swarm due to recent pykdtree switch #325

Description

@gthyagi

@lmoresi

Could you please look into this error?

File "/Users/tgol0006/manual_install_pkg/petsc_venv_uw3_21125/venv_uw3/lib/python3.11/site-packages/underworld3/adaptivity.py", line 403, in mesh2mesh_meshVariable
    tmp_swarm1 = mesh2mesh_swarm(
                 ^^^^^^^^^^^^^^^^
  File "/Users/tgol0006/manual_install_pkg/petsc_venv_uw3_21125/venv_uw3/lib/python3.11/site-packages/underworld3/adaptivity.py", line 271, in mesh2mesh_swarm
    found1 = np.where(cell >= 0)[0]
             ^^^^^^^^^^^^^^^^^^^
ValueError: Calling nonzero on 0d arrays is not allowed. Use np.atleast_1d(scalar).nonzero() instead. If the context of this error is of the form `arr[nonzero(cond)]`, just use `arr[cond]`.

I am using dev branch.

box_3d_refined_iso_visc.py.txt

box_3d_refined_around_fault.msh.zip

fault_surface.msh.zip

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions