Skip to content

Commit

Permalink
Merge branch 'development' into Quick_Start_Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoresi authored Oct 4, 2024
2 parents ed60fc4 + 2e9ed15 commit 60b02aa
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 24 deletions.
1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- main # Occurs on protected branch through PR
- development
- Quick_Start_Docs # Testing branch (delete later)

name: Quarto Publish

Expand Down
15 changes: 1 addition & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,7 @@
import numpy
import petsc4py

if os.environ.get("CC") is None:
import warnings

warnings.warn(
"CC environment variable not set. Using mpi4py's compiler configuration"
)
# Get CC from mpi4py
import mpi4py

conf = mpi4py.get_config()
os.environ["CC"] = conf["mpicc"]

# PETSc version check - 3.16 or higher
# PETSc version check - 3.18 or higher
from petsc4py import PETSc

petscVer = PETSc.Sys().getVersion()
Expand All @@ -35,7 +23,6 @@
)
raise RuntimeError(msg)


def configure():

INCLUDE_DIRS = []
Expand Down
2 changes: 1 addition & 1 deletion src/underworld3/function/_function.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ def dm_swarm_get_migrate_type(swarm):

return mtype

def dm_swarm_set_migrate_type(swarm, mtype:PETSc.DMSwarm.MigrateType):
def dm_swarm_set_migrate_type(swarm, mtype:PETsc.DMSwarm.MigrateType):

cdef DM dm = swarm.dm
cdef PetscErrorCode ierr
Expand Down
14 changes: 8 additions & 6 deletions src/underworld3/meshing.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ class boundary_normals_3D(Enum):

def box_return_coords_to_bounds(coords):

epsilon = 1.0e-3

x00s = coords[:, 0] < minCoords[0]
x01s = coords[:, 0] > maxCoords[0]
x10s = coords[:, 1] < minCoords[1]
Expand All @@ -215,14 +217,14 @@ def box_return_coords_to_bounds(coords):
x20s = coords[:, 2] < minCoords[2]
x21s = coords[:, 2] > maxCoords[2]

coords[x00s, 0] = minCoords[0]
coords[x01s, 0] = maxCoords[0]
coords[x10s, 1] = minCoords[1]
coords[x11s, 1] = maxCoords[1]
coords[x00s, 0] = minCoords[0] + epsilon
coords[x01s, 0] = maxCoords[0] - epsilon
coords[x10s, 1] = minCoords[1] + epsilon
coords[x11s, 1] = maxCoords[1] - epsilon

if dim == 3:
coords[x20s, 2] = minCoords[2]
coords[x21s, 2] = maxCoords[2]
coords[x20s, 2] = minCoords[2] + epsilon
coords[x21s, 2] = maxCoords[2] - epsilon

return coords

Expand Down
3 changes: 3 additions & 0 deletions src/underworld3/swarm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from posixpath import pardir
import petsc4py.PETSc as PETSc

import numpy as np
Expand Down Expand Up @@ -1935,6 +1936,8 @@ def __init__(
nswarm,
vtype=trackedVariable.vtype,
_proxy=False,
# proxy_degree=trackedVariable.degree,
# proxy_continuous=trackedVariable.continuous,
varsymbol=symbol,
)

Expand Down
2 changes: 0 additions & 2 deletions src/underworld3/systems/ddt.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def update_pre_solve(

# We use the u_star variable as a working value here so we have to work backwards
# so we don't over-write the history terms
#

for i in range(self.order - 1, -1, -1):
with self._nswarm_psi.access(self._nswarm_psi._X0):
Expand Down Expand Up @@ -314,7 +313,6 @@ def update_pre_solve(
# the data when we put it back onto the nodes

with self._nswarm_psi.access():

orig_index = self._nswarm_psi._nI0.data.copy().reshape(-1)

with self.mesh.access(self._workVar):
Expand Down
2 changes: 2 additions & 0 deletions tests/parallel/ptest_002_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
print(s_values.data[0:10,0])
s_values.data[:, 0] = 1.0 # uw.function.evalf(sympy.sympify(1), s_values.coords)

print(f"{uw.mpi.rank} - solve projection", flush=True)
mesh1.dm.view()

scalar_projection.solve()

Expand Down

0 comments on commit 60b02aa

Please sign in to comment.