Skip to content

What is the defined output of <mesh>.points_in_domain() when input is empty? #22

@jcgraciosa

Description

@jcgraciosa

What should we define as the output of .points_in_domain() when the input is empty (i.e. [])?
Currently, it returns False.
Do we stick with this behaviour?
This is relevant when doing migrate with the basic swarm and a rank has no particles in it:

swarm_coord_array = swarm.dm.getField("DMSwarmPIC_coor").reshape((-1, swarm.dim)) # [] if rank has no particles
in_or_not = swarm.mesh.points_in_domain(swarm_coord_array) # in_or_not is False if swarm_coord_array is []
swarm.dm.restoreField("DMSwarmPIC_coor")

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