-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
bugSomething isn't workingSomething isn't workingfenicsxIssue that is related to the fenicsx supportIssue that is related to the fenicsx support
Description
Describe the bug
Running a 1D sim, then changing the mesh, and running the sim again (after re-initialising) crashes.
To Reproduce
import festim as F
import numpy as np
my_model = F.HydrogenTransportProblem()
my_model.mesh = F.Mesh1D(vertices=np.linspace(0, 1, 100))
mat = F.Material(D_0=1e-4, E_D=0)
vol = F.VolumeSubdomain1D(id=1, material=mat, borders=[0, 1])
left = F.SurfaceSubdomain1D(id=1, x=0)
right = F.SurfaceSubdomain1D(id=2, x=1)
my_model.subdomains = [left, right, vol]
H = F.Species("H")
my_model.species = [H]
my_model.temperature = 400
my_model.boundary_conditions = [
F.FixedConcentrationBC(subdomain=left, value=1.0, species=H),
F.FixedConcentrationBC(subdomain=right, value=1.0, species=H),
]
my_model.settings = F.Settings(atol=1e-10, rtol=1e-10, transient=False)
my_model.initialise()
my_model.run()
print(my_model.facet_meshtags)
print("First run done")
my_model.volume_meshtags = None
my_model.facet_meshtags = None
my_model.mesh = F.Mesh1D(vertices=np.linspace(0, 1, 1000))
my_model.initialise()
print(my_model.facet_meshtags)
my_model.run()Not setting the meshtags to None produces another error, setting them to none makes the solver not converge
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfenicsxIssue that is related to the fenicsx supportIssue that is related to the fenicsx support