Skip to content

Commit

Permalink
Fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlhicks committed Jul 10, 2024
1 parent ae62c58 commit d6d59f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion q3d/firedrakeplus/computation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from firedrake import SpatialCoordinate, Function, assemble, dx, ds
from firedrake.__future__ import interpolate

from q3d.uflplus import *
import q3d.printoff as pr
Expand Down
10 changes: 5 additions & 5 deletions q3d/firedrakeplus/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,17 @@ def _define_bcs(bdy_cond : str):

strong_boundary = settings.options.strong_boundary

bdy_cond = Function(H1_vec)
bdy_cond.interpolate(eval(bdy_cond))
bc = Function(H1_vec)
bc.interpolate(eval(bdy_cond))

if strong_boundary is None or strong_boundary == 'none':
bcs = None
if strong_boundary == 'all':
bcs = [DirichletBC(H1_vec, bdy_cond, "on_boundary")]
bcs = [DirichletBC(H1_vec, bc, "on_boundary")]
elif isinstance(strong_boundary,int):
bcs = [DirichletBC(H1_vec, bdy_cond, [strong_boundary])]
bcs = [DirichletBC(H1_vec, bc, [strong_boundary])]
elif isinstance(strong_boundary,list):
bcs = [DirichletBC(H1_vec, bdy_cond, strong_boundary)]
bcs = [DirichletBC(H1_vec, bc, strong_boundary)]

return bcs

Expand Down
1 change: 1 addition & 0 deletions q3d/uflplus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from ufl import *
from ufl.classes import * # allows for evaluating UFL cache strings into UFL objects
from firedrake.ufl_expr import * # overwrites some of ufl.classes using Firedrake-specific UFL object defintinions. Needed for Firedrake solvers to work properly
from firedrake.__future__ import interpolate
from ufl.operators import ListTensor, Zero # used for type hints/checking for UFL objects

from q3d.uflplus.fy import qvectorfy, qtensorfy
Expand Down

0 comments on commit d6d59f9

Please sign in to comment.