Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
3 changes: 0 additions & 3 deletions scripts/deprecated_pattern_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ src/underworld3/tests/test_adaptivity_metrics.py:access-context
src/underworld3/discretisation/discretisation_mesh.py:mesh-data

# --- hedging-name (Charter S3) ---------------------------------------------
# `_maybe_install_snes_update` is the Charter S3 example of the banned form;
# renaming it is library-code churn outside the guardrails PR's scope.
src/underworld3/cython/petsc_generic_snes_solvers.pyx:hedging-name
# Four `_do_move()` local closures in the mesh-mover machinery.
src/underworld3/discretisation/discretisation_mesh.py:hedging-name
src/underworld3/meshing/_ot_adapt.py:hedging-name
Expand Down
40 changes: 1 addition & 39 deletions src/underworld3/cython/petsc_discretisation.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def petsc_dm_find_labeled_points_local(dm, label_name, sectionIndex=False, verbo

label = dm.getLabel(label_name)
if not label:
uw.pprint(0, f"Label {label_name} is not present on the dm")
uw.pprint(f"Label {label_name} is not present on the dm")
return np.array([0])

pointIS = dm.getStratumIS("depth",0)
Expand Down Expand Up @@ -245,44 +245,6 @@ def petsc_dm_find_labeled_points_local(dm, label_name, sectionIndex=False, verbo
return IndicesP


## Todo !

"""
def petsc_dm_get_periodicity(incoming_dm):

dim = incoming_dm.getDimension()

cdef PetscInt c_dim = dim
cdef PetscReal c_maxCell[3]
cdef PetscReal c_Lstart[3]
cdef PetscReal c_L[3]
cdef DM dm = incoming_dm


ierr = DMGetPeriodicity(dm.dm, &c_maxCell[0], &c_Lstart[0], &c_L[0]); CHKERRQ(ierr)

maxCell = np.asarray(c_maxCell)

maxx = maxCell[0]
maxy = maxCell[1]
maxz = maxCell[2]

Lstartx = c_Lstart[0]
Lstarty = c_Lstart[1]
Lstartz = c_Lstart[2]

Lx = c_L[0]
Ly = c_L[1]
Lz = c_L[2]


print(f"Max x - {maxx}, y - {maxy}, z - {maxz}" )
print(f"Ls x - {Lstartx}, y - {Lstarty}, z - {Lstartz}" )
print(f"L x - {Lx}, y - {Ly}, z - {Lz}" )

return
"""

def petsc_dm_set_periodicity(incoming_dm, maxCell, Lstart, L):
"""
Wrapper for PETSc DMSetPeriodicity:
Expand Down
Loading
Loading