DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
OversetCart.CartUtil Namespace Reference

Functions

 segments_intersect_polygon_edge (polygon, x0, x1, y0, y1, closed=True)
 
 points_in_polygon_winding (polygon, x, y, closed=True)
 
 single_elem_intersection_mask_2D (np.ndarray origin, float h, np.ndarray ijks, np.ndarray elem, closed=True)
 
 single_elem_grid_points_mask_2D (np.ndarray origin, float h, np.ndarray ijks, np.ndarray elem, closed=True)
 
 single_elem_box_range_2D (np.ndarray origin, float h, np.ndarray elem, grid_eps=1e-10)
 
 single_elem_get_box_intersection_2D (np.ndarray origin, float h, np.ndarray elem, closed=True)
 
 single_elem_get_grid_point_2D (np.ndarray origin, float h, np.ndarray elem, closed=True)
 
 points_get_grid_cells_2D (np.ndarray origin, float h, np.ndarray coords)
 

Variables

 elem_test = np.array([[0.5, 2.5, 0.5], [0.5, 0.5, 2.5]], dtype=np.float64)
 
 elem_test_1 = np.array([[0.5, 2.5, 0.5], [0.5, 0.5, 0.6]], dtype=np.float64)
 
 origin_test = np.array([0.0, 0.0], dtype=np.float64)
 
 time_result
 

Function Documentation

◆ points_get_grid_cells_2D()

OversetCart.CartUtil.points_get_grid_cells_2D ( np.ndarray  origin,
float  h,
np.ndarray  coords 
)

Definition at line 235 of file CartUtil.py.

Here is the caller graph for this function:

◆ points_in_polygon_winding()

OversetCart.CartUtil.points_in_polygon_winding (   polygon,
  x,
  y,
  closed = True 
)

Definition at line 60 of file CartUtil.py.

Here is the caller graph for this function:

◆ segments_intersect_polygon_edge()

OversetCart.CartUtil.segments_intersect_polygon_edge (   polygon,
  x0,
  x1,
  y0,
  y1,
  closed = True 
)

Definition at line 8 of file CartUtil.py.

Here is the caller graph for this function:

◆ single_elem_box_range_2D()

OversetCart.CartUtil.single_elem_box_range_2D ( np.ndarray  origin,
float  h,
np.ndarray  elem,
  grid_eps = 1e-10 
)

Definition at line 171 of file CartUtil.py.

Here is the caller graph for this function:

◆ single_elem_get_box_intersection_2D()

OversetCart.CartUtil.single_elem_get_box_intersection_2D ( np.ndarray  origin,
float  h,
np.ndarray  elem,
  closed = True 
)
get element intersecting boxes

Args:
    origin (np.ndarray): _description_
    h (float): _description_
    elem (np.ndarray): _description_
    closed (bool, optional): _description_. Defaults to True.

Returns:
    np.ndarray: ijks of the touched cells

Definition at line 188 of file CartUtil.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ single_elem_get_grid_point_2D()

OversetCart.CartUtil.single_elem_get_grid_point_2D ( np.ndarray  origin,
float  h,
np.ndarray  elem,
  closed = True 
)
get grid point ijks inside the element
Args:
    origin (np.ndarray): _description_
    h (float): _description_
    elem (np.ndarray): _description_
    closed (bool, optional): _description_. Defaults to True.

Returns:
    np.ndarray: _description_

Definition at line 211 of file CartUtil.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ single_elem_grid_points_mask_2D()

OversetCart.CartUtil.single_elem_grid_points_mask_2D ( np.ndarray  origin,
float  h,
np.ndarray  ijks,
np.ndarray  elem,
  closed = True 
)
Parameters:
origin: (2,) array
h: float
ijks: (2, ...) integer array
elem: is a 2D polygon, 2D coords of shape (2+, n_point)

Definition at line 147 of file CartUtil.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ single_elem_intersection_mask_2D()

OversetCart.CartUtil.single_elem_intersection_mask_2D ( np.ndarray  origin,
float  h,
np.ndarray  ijks,
np.ndarray  elem,
  closed = True 
)
Parameters:
origin: (2,) array
h: float
ijks: (2, ...) integer array
elem: is a 2D polygon, 2D coords of shape (2+, n_point)

Definition at line 90 of file CartUtil.py.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ elem_test

OversetCart.CartUtil.elem_test = np.array([[0.5, 2.5, 0.5], [0.5, 0.5, 2.5]], dtype=np.float64)

Definition at line 244 of file CartUtil.py.

◆ elem_test_1

OversetCart.CartUtil.elem_test_1 = np.array([[0.5, 2.5, 0.5], [0.5, 0.5, 0.6]], dtype=np.float64)

Definition at line 245 of file CartUtil.py.

◆ origin_test

OversetCart.CartUtil.origin_test = np.array([0.0, 0.0], dtype=np.float64)

Definition at line 246 of file CartUtil.py.

◆ time_result

OversetCart.CartUtil.time_result
Initial value:
1= timeit.timeit(
2 lambda: single_elem_get_box_intersection_2D(origin_test, 1.0, elem_test),
3 number=100,
4 )

Definition at line 267 of file CartUtil.py.