Skip to content

Commit

Permalink
fixed the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Oct 23, 2024
1 parent 60b9b2e commit 6a1456b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
10 changes: 3 additions & 7 deletions test_implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ def half(x):
my_model.subdomains = [bottom_domain, top_domain, top_surface, bottom_surface]

# we should be able to automate this
my_model.interfaces = [
F.Interface(
my_model.mesh.mesh, my_model.facet_meshtags, 5, (bottom_domain, top_domain)
)
]
my_model.interfaces = [F.Interface(5, (bottom_domain, top_domain))]
my_model.surface_to_volume = {top_surface: top_domain, bottom_surface: bottom_domain}

H = F.Species("H", mobile=True)
Expand Down Expand Up @@ -123,8 +119,8 @@ def half(x):
]

my_model.boundary_conditions = [
F.DirichletBC(top_surface, value=0.05, species=H),
F.DirichletBC(bottom_surface, value=0.2, species=H),
F.FixedConcentrationBC(top_surface, value=0.05, species=H),
F.FixedConcentrationBC(bottom_surface, value=0.2, species=H),
]


Expand Down
6 changes: 1 addition & 5 deletions test_implementation_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ def half(x):
my_model.subdomains = [bottom_domain, top_domain, top_surface, bottom_surface]

# we should be able to automate this
my_model.interfaces = [
F.Interface(
my_model.mesh.mesh, my_model.facet_meshtags, 5, (bottom_domain, top_domain)
)
]
my_model.interfaces = [F.Interface(5, (bottom_domain, top_domain))]
my_model.surface_to_volume = {top_surface: top_domain, bottom_surface: bottom_domain}

H = F.Species("H", mobile=True)
Expand Down
8 changes: 2 additions & 6 deletions test_implementation_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@

# the ids here are arbitrary in 1D, you can put anything as long as it's not the same as the surfaces
my_model.interfaces = [
F.Interface(
my_model.mesh.mesh, my_model.facet_meshtags, 6, (left_domain, middle_domain)
),
F.Interface(
my_model.mesh.mesh, my_model.facet_meshtags, 7, (middle_domain, right_domain)
),
F.Interface(6, (left_domain, middle_domain)),
F.Interface(7, (middle_domain, right_domain)),
]
my_model.subdomains = [
left_domain,
Expand Down
8 changes: 2 additions & 6 deletions test_implementation_transient.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@
# the ids here are arbitrary in 1D, you can put anything as long as it's not the same as the surfaces
# TODO remove mesh and meshtags from these arguments
my_model.interfaces = [
F.Interface(
my_model.mesh.mesh, my_model.facet_meshtags, 6, (left_domain, middle_domain)
),
F.Interface(
my_model.mesh.mesh, my_model.facet_meshtags, 7, (middle_domain, right_domain)
),
F.Interface(6, (left_domain, middle_domain)),
F.Interface(7, (middle_domain, right_domain)),
]

my_model.subdomains = [
Expand Down

0 comments on commit 6a1456b

Please sign in to comment.