Skip to content

Commit

Permalink
Fix for boundary marker error
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoresi committed Oct 22, 2024
1 parent 2793481 commit 82f54e3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
15 changes: 13 additions & 2 deletions src/underworld3/discretisation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from typing import Optional, Tuple, Union
from enum import Enum

import os
import numpy
import sympy
Expand Down Expand Up @@ -189,10 +191,19 @@ def __init__(
% (plex_or_meshfile, ext[1:])
)

if boundaries is None:
class replacement_boundaries(Enum):
Null_Boundary = 666
All_Boundaries = 1001

boundaries = replacement_boundaries

self.filename = filename
self.boundaries = boundaries
self.boundary_normals = boundary_normals



# options.delValue("dm_plex_gmsh_mark_vertices")
# options.delValue("dm_plex_gmsh_multiple_tags")
# options.delValue("dm_plex_gmsh_use_regions")
Expand Down Expand Up @@ -229,8 +240,8 @@ def __init__(
# Load this up on the stacked BC label
if label_is:
stacked_bc_label.setStratumIS(b.value, label_is)



uw.mpi.barrier()

Expand Down
4 changes: 2 additions & 2 deletions src/underworld3/systems/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ def __init__(

self._v = self._v_projector.Unknowns.u

# If we add smoothing, it should be small relative to actual diffusion (self.viscosity)
self._v_projector.smoothing = 0
# If we add smoothing, it should be small
self._v_projector.smoothing = 1.0e-6

## This function is the one we will typically over-ride to build specific solvers.
## This example is a poisson-like problem with isotropic coefficients
Expand Down

0 comments on commit 82f54e3

Please sign in to comment.