Skip to content

Commit

Permalink
added the export stage in .run()
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Oct 18, 2023
1 parent b96c636 commit d10b5e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions festim/hydrogen_transport_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ def run(self, final_time: float):

self.solver.solve(self.u)

# post processing

mobile_xdmf.write_function(self.u, float(self.t))

surface_flux = form(D * dot(grad(cm), n) * self.ds(2))
Expand All @@ -301,6 +303,10 @@ def run(self, final_time: float):
flux_values.append(flux)
times.append(float(self.t))

for export in self.exports:
if isinstance(export, F.VTXExport):
export.writer.write(float(self.t))

# update previous solution
self.u_n.x.array[:] = self.u.x.array[:]

Expand Down

0 comments on commit d10b5e0

Please sign in to comment.