Skip to content

Test edge coordinates #4

Description

@Fuad-HH

Test this function:

def get_edge_coordinates(self) -> np.ndarray:
if not kokkos_runtime.is_running():
raise RuntimeError("Kokkos not running...")
try:
n_edges = self.num_entities(1)
edge_coordinates = np.empty(n_edges*4, dtype=np.float64)
_dll.capi_get_edge_coordinates(self.mesh, edge_coordinates, n_edges*4)
return edge_coordinates
except Exception as exception:
raise RuntimeError(f"Error getting edge coordinates: {exception}")
def get_number_of_edges_inside_wall(self) -> int:
if not kokkos_runtime.is_running():
raise RuntimeError("Kokkos not running...")
try:
return _dll.capi_get_number_of_edges_inside_wall(self.mesh)
except Exception as exception:
raise RuntimeError(f"Error getting number of edges: {exception}")

The edge IDs don't match. I tried to do an O(n^2) test, but it was taking too much time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions