Skip to content

Commit

Permalink
Update stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed Dec 5, 2024
1 parent 3e816e0 commit cd28bae
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 49 deletions.
84 changes: 43 additions & 41 deletions python/basix/_basixcpp.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,27 @@ class ElementFamily(enum.IntEnum):
iso = 13

class FiniteElement_float32:
def tabulate(self, arg0: int, arg1: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None), order='C')], /) -> Annotated[ArrayLike, dict(dtype='float32', )]: ...
def tabulate(self, arg0: int, arg1: Annotated[ArrayLike, dict(dtype='float32', shape=(None, None), order='C', writable=False)], /) -> Annotated[ArrayLike, dict(dtype='float32')]: ...

def __eq__(self, arg: object, /) -> bool: ...

def hash(self) -> int: ...

def permute_subentity_closure(self, arg0: Annotated[ArrayLike, dict(dtype='int32', shape=(None), order='C')], arg1: int, arg2: CellType, /) -> Annotated[ArrayLike, dict(dtype='int32', )]: ...
def permute_subentity_closure(self, arg0: Annotated[ArrayLike, dict(dtype='int32', shape=(None), order='C')], arg1: int, arg2: CellType, /) -> Annotated[ArrayLike, dict(dtype='int32')]: ...

def permute_subentity_closure_inv(self, arg0: Annotated[ArrayLike, dict(dtype='int32', shape=(None), order='C')], arg1: int, arg2: CellType, /) -> Annotated[ArrayLike, dict(dtype='int32', )]: ...
def permute_subentity_closure_inv(self, arg0: Annotated[ArrayLike, dict(dtype='int32', shape=(None), order='C')], arg1: int, arg2: CellType, /) -> Annotated[ArrayLike, dict(dtype='int32')]: ...

def push_forward(self, arg0: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None, None), order='C')], arg1: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None, None), order='C')], arg2: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None), order='C')], arg3: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None, None), order='C')], /) -> Annotated[ArrayLike, dict(dtype='float32', )]: ...
def push_forward(self, arg0: Annotated[ArrayLike, dict(dtype='float32', shape=(None, None, None), order='C', writable=False)], arg1: Annotated[ArrayLike, dict(dtype='float32', shape=(None, None, None), order='C', writable=False)], arg2: Annotated[ArrayLike, dict(dtype='float32', shape=(None), order='C', writable=False)], arg3: Annotated[ArrayLike, dict(dtype='float32', shape=(None, None, None), order='C', writable=False)], /) -> Annotated[ArrayLike, dict(dtype='float32')]: ...

def pull_back(self, arg0: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None, None), order='C')], arg1: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None, None), order='C')], arg2: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None), order='C')], arg3: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None, None), order='C')], /) -> Annotated[ArrayLike, dict(dtype='float32', )]: ...
def pull_back(self, arg0: Annotated[ArrayLike, dict(dtype='float32', shape=(None, None, None), order='C', writable=False)], arg1: Annotated[ArrayLike, dict(dtype='float32', shape=(None, None, None), order='C', writable=False)], arg2: Annotated[ArrayLike, dict(dtype='float32', shape=(None), order='C', writable=False)], arg3: Annotated[ArrayLike, dict(dtype='float32', shape=(None, None, None), order='C', writable=False)], /) -> Annotated[ArrayLike, dict(dtype='float32')]: ...

def T_apply(self, arg0: Annotated[ArrayLike, dict(dtype='float32', shape=(None), order='C')], arg1: int, arg2: int, /) -> None: ...

def Tt_apply_right(self, arg0: Annotated[ArrayLike, dict(dtype='float32', shape=(None), order='C')], arg1: int, arg2: int, /) -> None: ...

def Tt_inv_apply(self, arg0: Annotated[ArrayLike, dict(dtype='float32', shape=(None), order='C')], arg1: int, arg2: int, /) -> None: ...

def base_transformations(self) -> Annotated[ArrayLike, dict(dtype='float32', )]: ...
def base_transformations(self) -> Annotated[ArrayLike, dict(dtype='float32')]: ...

def entity_transformations(self) -> dict: ...

Expand Down Expand Up @@ -165,26 +165,26 @@ class FiniteElement_float32:
def sobolev_space(self) -> SobolevSpace: ...

@property
def points(self) -> Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None), )]: ...
def points(self) -> Annotated[ArrayLike, dict(dtype='float32', shape=(None, None), writable=False)]: ...

@property
def interpolation_matrix(self) -> Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None), )]: ...
def interpolation_matrix(self) -> Annotated[ArrayLike, dict(dtype='float32', shape=(None, None), writable=False)]: ...

@property
def dual_matrix(self) -> Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None), )]: ...
def dual_matrix(self) -> Annotated[ArrayLike, dict(dtype='float32', shape=(None, None), writable=False)]: ...

@property
def coefficient_matrix(self) -> Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None), )]:
def coefficient_matrix(self) -> Annotated[ArrayLike, dict(dtype='float32', shape=(None, None), writable=False)]:
"""Coefficient matrix."""

@property
def wcoeffs(self) -> Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None), )]: ...
def wcoeffs(self) -> Annotated[ArrayLike, dict(dtype='float32', shape=(None, None), writable=False)]: ...

@property
def M(self) -> list[list[Annotated[ArrayLike, dict(dtype='float32', writable=False, )]]]: ...
def M(self) -> list[list[Annotated[ArrayLike, dict(dtype='float32', writable=False)]]]: ...

@property
def x(self) -> list[list[Annotated[ArrayLike, dict(dtype='float32', writable=False, )]]]: ...
def x(self) -> list[list[Annotated[ArrayLike, dict(dtype='float32', writable=False)]]]: ...

@property
def has_tensor_product_factorisation(self) -> bool: ...
Expand All @@ -199,27 +199,27 @@ class FiniteElement_float32:
def dtype(self) -> str: ...

class FiniteElement_float64:
def tabulate(self, arg0: int, arg1: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), order='C')], /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def tabulate(self, arg0: int, arg1: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), order='C', writable=False)], /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def __eq__(self, arg: object, /) -> bool: ...

def hash(self) -> int: ...

def permute_subentity_closure(self, arg0: Annotated[ArrayLike, dict(dtype='int32', shape=(None), order='C')], arg1: int, arg2: CellType, /) -> Annotated[ArrayLike, dict(dtype='int32', )]: ...
def permute_subentity_closure(self, arg0: Annotated[ArrayLike, dict(dtype='int32', shape=(None), order='C')], arg1: int, arg2: CellType, /) -> Annotated[ArrayLike, dict(dtype='int32')]: ...

def permute_subentity_closure_inv(self, arg0: Annotated[ArrayLike, dict(dtype='int32', shape=(None), order='C')], arg1: int, arg2: CellType, /) -> Annotated[ArrayLike, dict(dtype='int32', )]: ...
def permute_subentity_closure_inv(self, arg0: Annotated[ArrayLike, dict(dtype='int32', shape=(None), order='C')], arg1: int, arg2: CellType, /) -> Annotated[ArrayLike, dict(dtype='int32')]: ...

def push_forward(self, arg0: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None, None), order='C')], arg1: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None, None), order='C')], arg2: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None), order='C')], arg3: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None, None), order='C')], /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def push_forward(self, arg0: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None, None), order='C', writable=False)], arg1: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None, None), order='C', writable=False)], arg2: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', writable=False)], arg3: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None, None), order='C', writable=False)], /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def pull_back(self, arg0: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None, None), order='C')], arg1: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None, None), order='C')], arg2: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None), order='C')], arg3: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None, None), order='C')], /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def pull_back(self, arg0: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None, None), order='C', writable=False)], arg1: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None, None), order='C', writable=False)], arg2: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', writable=False)], arg3: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None, None), order='C', writable=False)], /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def T_apply(self, arg0: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C')], arg1: int, arg2: int, /) -> None: ...

def Tt_apply_right(self, arg0: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C')], arg1: int, arg2: int, /) -> None: ...

def Tt_inv_apply(self, arg0: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C')], arg1: int, arg2: int, /) -> None: ...

def base_transformations(self) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def base_transformations(self) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def entity_transformations(self) -> dict: ...

Expand Down Expand Up @@ -289,26 +289,26 @@ class FiniteElement_float64:
def sobolev_space(self) -> SobolevSpace: ...

@property
def points(self) -> Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), )]: ...
def points(self) -> Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), writable=False)]: ...

@property
def interpolation_matrix(self) -> Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), )]: ...
def interpolation_matrix(self) -> Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), writable=False)]: ...

@property
def dual_matrix(self) -> Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), )]: ...
def dual_matrix(self) -> Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), writable=False)]: ...

@property
def coefficient_matrix(self) -> Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), )]:
def coefficient_matrix(self) -> Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), writable=False)]:
"""Coefficient matrix."""

@property
def wcoeffs(self) -> Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), )]: ...
def wcoeffs(self) -> Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), writable=False)]: ...

@property
def M(self) -> list[list[Annotated[ArrayLike, dict(dtype='float64', writable=False, )]]]: ...
def M(self) -> list[list[Annotated[ArrayLike, dict(dtype='float64', writable=False)]]]: ...

@property
def x(self) -> list[list[Annotated[ArrayLike, dict(dtype='float64', writable=False, )]]]: ...
def x(self) -> list[list[Annotated[ArrayLike, dict(dtype='float64', writable=False)]]]: ...

@property
def has_tensor_product_factorisation(self) -> bool: ...
Expand Down Expand Up @@ -434,35 +434,37 @@ class SobolevSpace(enum.IntEnum):

HDivDiv = 13

def cell_facet_jacobians(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def cell_edge_jacobians(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def cell_facet_normals(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def cell_facet_jacobians(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def cell_facet_normals(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def cell_facet_orientations(arg: CellType, /) -> list[int]: ...

def cell_facet_outward_normals(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def cell_facet_outward_normals(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def cell_facet_reference_volumes(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def cell_facet_reference_volumes(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def cell_volume(arg: CellType, /) -> float: ...

@overload
def compute_interpolation_operator(arg0: FiniteElement_float32, arg1: FiniteElement_float32, /) -> Annotated[ArrayLike, dict(dtype='float32', )]: ...
def compute_interpolation_operator(arg0: FiniteElement_float32, arg1: FiniteElement_float32, /) -> Annotated[ArrayLike, dict(dtype='float32')]: ...

@overload
def compute_interpolation_operator(arg0: FiniteElement_float64, arg1: FiniteElement_float64, /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def compute_interpolation_operator(arg0: FiniteElement_float64, arg1: FiniteElement_float64, /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def create_custom_element_float32(cell_type: CellType, value_shape: Sequence[int], wcoeffs: Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None), order='C')], x: Sequence[Sequence[Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None), order='C')]]], M: Sequence[Sequence[Annotated[ArrayLike, dict(dtype='float32', writable=False, shape=(None, None, None, None), order='C')]]], interpolation_nderivs: int, map_type: MapType, sobolev_space: SobolevSpace, discontinuous: bool, embedded_subdegree: int, embedded_superdegree: int, poly_type: PolysetType) -> FiniteElement_float32: ...
def create_custom_element_float32(cell_type: CellType, value_shape: Sequence[int], wcoeffs: Annotated[ArrayLike, dict(dtype='float32', shape=(None, None), order='C', writable=False)], x: Sequence[Sequence[Annotated[ArrayLike, dict(dtype='float32', shape=(None, None), order='C', writable=False)]]], M: Sequence[Sequence[Annotated[ArrayLike, dict(dtype='float32', shape=(None, None, None, None), order='C', writable=False)]]], interpolation_nderivs: int, map_type: MapType, sobolev_space: SobolevSpace, discontinuous: bool, embedded_subdegree: int, embedded_superdegree: int, poly_type: PolysetType) -> FiniteElement_float32: ...

def create_custom_element_float64(cell_type: CellType, value_shape: Sequence[int], wcoeffs: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), order='C')], x: Sequence[Sequence[Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), order='C')]]], M: Sequence[Sequence[Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None, None, None), order='C')]]], interpolation_nderivs: int, map_type: MapType, sobolev_space: SobolevSpace, discontinuous: bool, embedded_subdegree: int, embedded_superdegree: int, poly_type: PolysetType) -> FiniteElement_float64: ...
def create_custom_element_float64(cell_type: CellType, value_shape: Sequence[int], wcoeffs: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), order='C', writable=False)], x: Sequence[Sequence[Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), order='C', writable=False)]]], M: Sequence[Sequence[Annotated[ArrayLike, dict(dtype='float64', shape=(None, None, None, None), order='C', writable=False)]]], interpolation_nderivs: int, map_type: MapType, sobolev_space: SobolevSpace, discontinuous: bool, embedded_subdegree: int, embedded_superdegree: int, poly_type: PolysetType) -> FiniteElement_float64: ...

def create_element(arg0: ElementFamily, arg1: CellType, arg2: int, arg3: LagrangeVariant, arg4: DPCVariant, arg5: bool, arg6: Sequence[int], arg7: str, /) -> FiniteElement_float32 | FiniteElement_float64: ...

def create_lattice(arg0: CellType, arg1: int, arg2: LatticeType, arg3: bool, arg4: LatticeSimplexMethod, /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def create_lattice(arg0: CellType, arg1: int, arg2: LatticeType, arg3: bool, arg4: LatticeSimplexMethod, /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def create_tp_element(arg0: ElementFamily, arg1: CellType, arg2: int, arg3: LagrangeVariant, arg4: DPCVariant, arg5: bool, arg6: str, /) -> FiniteElement_float32 | FiniteElement_float64: ...

def geometry(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def geometry(arg: CellType, /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

@overload
def index(arg: int, /) -> int: ...
Expand All @@ -473,25 +475,25 @@ def index(arg0: int, arg1: int, /) -> int: ...
@overload
def index(arg0: int, arg1: int, arg2: int, /) -> int: ...

def make_quadrature(arg0: QuadratureType, arg1: CellType, arg2: PolysetType, arg3: int, /) -> tuple[Annotated[ArrayLike, dict(dtype='float64', )], Annotated[ArrayLike, dict(dtype='float64', )]]: ...
def make_quadrature(arg0: QuadratureType, arg1: CellType, arg2: PolysetType, arg3: int, /) -> tuple[Annotated[ArrayLike, dict(dtype='float64')], Annotated[ArrayLike, dict(dtype='float64')]]: ...

def polynomials_dim(arg0: PolynomialType, arg1: CellType, arg2: int, /) -> int: ...

def restriction(arg0: PolysetType, arg1: CellType, arg2: CellType, /) -> PolysetType: ...

def sobolev_space_intersection(arg0: SobolevSpace, arg1: SobolevSpace, /) -> SobolevSpace: ...

def subentity_types(arg: CellType, /) -> list[list[CellType]]: ...

def sub_entity_connectivity(arg: CellType, /) -> list[list[list[list[int]]]]: ...

def sub_entity_geometry(arg0: CellType, arg1: int, arg2: int, /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def sub_entity_geometry(arg0: CellType, arg1: int, arg2: int, /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def subentity_types(arg: CellType, /) -> list[list[CellType]]: ...

def superset(arg0: CellType, arg1: PolysetType, arg2: PolysetType, /) -> PolysetType: ...

def tabulate_polynomial_set(celltype: CellType, polytype: PolysetType, d: int, n: int, x: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), order='C')]) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...

def tabulate_polynomials(arg0: PolynomialType, arg1: CellType, arg2: int, arg3: Annotated[ArrayLike, dict(dtype='float64', writable=False, shape=(None, None), order='C')], /) -> Annotated[ArrayLike, dict(dtype='float64', )]: ...
def tabulate_polynomials(arg0: PolynomialType, arg1: CellType, arg2: int, arg3: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), order='C', writable=False)], /) -> Annotated[ArrayLike, dict(dtype='float64')]: ...

def topology(arg: CellType, /) -> list[list[list[int]]]: ...

Expand Down
14 changes: 6 additions & 8 deletions python/wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,14 +510,12 @@ NB_MODULE(_basixcpp, m)
{ return cell::volume<double>(cell_type); });
m.def("cell_facet_normals", [](cell::type cell_type)
{ return as_nbarrayp(cell::facet_normals<double>(cell_type)); });
m.def("cell_facet_reference_volumes",
[](cell::type cell_type) {
return as_nbarray(cell::facet_reference_volumes<double>(cell_type));
});
m.def("cell_facet_outward_normals",
[](cell::type cell_type) {
return as_nbarrayp(cell::facet_outward_normals<double>(cell_type));
});
m.def(
"cell_facet_reference_volumes", [](cell::type cell_type)
{ return as_nbarray(cell::facet_reference_volumes<double>(cell_type)); });
m.def(
"cell_facet_outward_normals", [](cell::type cell_type)
{ return as_nbarrayp(cell::facet_outward_normals<double>(cell_type)); });
m.def("cell_facet_orientations",
[](cell::type cell_type)
{
Expand Down

0 comments on commit cd28bae

Please sign in to comment.