Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 146 additions & 34 deletions .basedpyright/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1891,14 +1891,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownVariableType",
"range": {
"startColumn": 4,
"endColumn": 22,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -8261,6 +8253,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownVariableType",
"range": {
"startColumn": 29,
"endColumn": 32,
"lineCount": 1
}
},
{
"code": "reportUnknownParameterType",
"range": {
Expand Down Expand Up @@ -8309,6 +8309,30 @@
"lineCount": 1
}
},
{
"code": "reportUnknownVariableType",
"range": {
"startColumn": 16,
"endColumn": 29,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 39,
"endColumn": 42,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 44,
"endColumn": 79,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
Expand All @@ -8333,6 +8357,22 @@
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 31,
"endColumn": 76,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 32,
"endColumn": 47,
"lineCount": 1
}
},
{
"code": "reportUnknownVariableType",
"range": {
Expand Down Expand Up @@ -9707,14 +9747,6 @@
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 67,
"endColumn": 78,
"lineCount": 1
}
},
{
"code": "reportMissingTypeStubs",
"range": {
Expand Down Expand Up @@ -13129,6 +13161,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 47,
"endColumn": 54,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -13161,6 +13201,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 47,
"endColumn": 54,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -13193,6 +13241,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 47,
"endColumn": 54,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -13225,6 +13281,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 51,
"endColumn": 62,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -13257,6 +13321,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 47,
"endColumn": 54,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -13289,6 +13361,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 47,
"endColumn": 54,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -13321,6 +13401,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 47,
"endColumn": 54,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -13353,6 +13441,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 46,
"endColumn": 52,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down Expand Up @@ -17515,7 +17611,7 @@
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 30,
"endColumn": 72,
"endColumn": 70,
"lineCount": 1
}
},
Expand Down Expand Up @@ -18179,7 +18275,7 @@
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 36,
"endColumn": 65,
"endColumn": 63,
"lineCount": 1
}
},
Expand Down Expand Up @@ -20623,22 +20719,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 51,
"endColumn": 67,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 51,
"endColumn": 67,
"lineCount": 1
}
},
{
"code": "reportUnknownVariableType",
"range": {
Expand Down Expand Up @@ -23523,6 +23603,30 @@
"lineCount": 1
}
},
{
"code": "reportUnknownVariableType",
"range": {
"startColumn": 25,
"endColumn": 28,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 25,
"endColumn": 28,
"lineCount": 1
}
},
{
"code": "reportReturnType",
"range": {
"startColumn": 11,
"endColumn": 50,
"lineCount": 1
}
},
{
"code": "reportUnknownVariableType",
"range": {
Expand Down Expand Up @@ -26037,6 +26141,14 @@
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 36,
"endColumn": 38,
"lineCount": 1
}
},
{
"code": "reportUnknownVariableType",
"range": {
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ a.out
.pytest_cache
.pylintrc.yml
.run-pylint.py
.venv

test/nodal-dg
4 changes: 2 additions & 2 deletions meshmode/interop/firedrake/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def __init__(self, discr, fdrake_fspace, mm2fd_node_mapping, group_nr=None):
# Get meshmode unit nodes
mm_unit_nodes = element_grp.unit_nodes
# get firedrake unit nodes and map onto meshmode reference element
tdim = fdrake_fspace.mesh().topological_dimension()
tdim = fdrake_fspace.mesh().topological_dimension
fd_ref_cell_to_mm = get_affine_reference_simplex_mapping(tdim, True)
fd_unit_nodes = get_finat_element_unit_nodes(fdrake_fspace.finat_element)
fd_unit_nodes = fd_ref_cell_to_mm(fd_unit_nodes)
Expand Down Expand Up @@ -783,7 +783,7 @@ def build_connection_to_firedrake(discr, group_nr=None, comm=None):
export_mesh_to_firedrake(discr.mesh, group_nr, comm)
fspace = FunctionSpace(fd_mesh, "DG", el_group.order)
# get firedrake unit nodes and map onto meshmode reference element
dim = fspace.mesh().topological_dimension()
dim = fspace.mesh().topological_dimension
fd_ref_cell_to_mm = get_affine_reference_simplex_mapping(dim, True)
fd_unit_nodes = get_finat_element_unit_nodes(fspace.finat_element)
fd_unit_nodes = fd_ref_cell_to_mm(fd_unit_nodes)
Expand Down
14 changes: 7 additions & 7 deletions meshmode/interop/firedrake/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _get_firedrake_nodal_info(fdrake_mesh_topology, cells_to_use=None):
else:
num_cells = np.size(cells_to_use)
from pyop2.datatypes import IntType
vertex_indices = -np.ones((num_cells, top.ufl_cell().num_vertices()),
vertex_indices = -np.ones((num_cells, top.ufl_cell().num_vertices),
dtype=IntType)
# This will map fd cell ndx (or its new index as dictated by
# *cells_to_use* if *cells_to_use*
Expand Down Expand Up @@ -269,7 +269,7 @@ def _get_firedrake_facial_adjacency_groups(fdrake_mesh_topology,
fd_loc_fac_nr_to_mm = {}
# Figure out which vertex is excluded to get the corresponding
# firedrake local index
all_local_facet_nrs = set(range(top.ufl_cell().num_vertices()))
all_local_facet_nrs = set(range(top.ufl_cell().num_vertices))
for mm_local_facet_nr, face in enumerate(mm_face_vertex_indices):
fd_local_facet_nr = all_local_facet_nrs - set(face)
assert len(fd_local_facet_nr) == 1
Expand Down Expand Up @@ -439,8 +439,8 @@ def _get_firedrake_orientations(fdrake_mesh, unflipped_group, vertices,
*cells_to_use[i]*\ th element.
"""
# compute orientations
tdim = fdrake_mesh.topological_dimension()
gdim = fdrake_mesh.geometric_dimension()
tdim = fdrake_mesh.topological_dimension
gdim = fdrake_mesh.geometric_dimension

orient = None
if gdim == tdim:
Expand Down Expand Up @@ -600,9 +600,9 @@ def import_firedrake_mesh(fdrake_mesh, cells_to_use=None,
assert np.all(np.logical_and(cells_to_use >= 0,
cells_to_use < fdrake_mesh.num_cells()))

assert fdrake_mesh.ufl_cell().is_simplex(), "Mesh must use simplex cells"
gdim = fdrake_mesh.geometric_dimension()
tdim = fdrake_mesh.topological_dimension()
assert fdrake_mesh.ufl_cell().is_simplex, "Mesh must use simplex cells"
gdim = fdrake_mesh.geometric_dimension
tdim = fdrake_mesh.topological_dimension

assert gdim in [1, 2, 3], "Mesh must be in space of ambient dim 1, 2, or 3"
assert gdim - tdim in [0, 1], "Mesh co-dimension must be 0 or 1"
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ reportImportCycles = "none"

ignore = [
"doc/conf.py",
".venv",
]

[[tool.basedpyright.executionEnvironments]]
Expand Down
Loading
Loading