Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jhdark committed Nov 6, 2023
1 parent 849de04 commit 3f81828
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion festim/exports/surface_flux.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from dolfinx import fem
import festim as F
import ufl
import csv


class SurfaceFlux(F.SurfaceQuantity):
Expand Down
5 changes: 5 additions & 0 deletions festim/exports/surface_quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class SurfaceQuantity:
field (festim.Species): species for which the surface flux is computed
surface (festim.SurfaceSubdomain1D): surface subdomain
filename (str): name of the file to which the surface flux is exported
t (list): list of time values
data (list): list of values of the surface quantity
"""

def __init__(self, field, surface, filename: str = None) -> None:
Expand Down Expand Up @@ -64,6 +66,9 @@ def field(self, value):
self._field = value

def write(self, t):
"""If the filename doesnt exist yet, create it and write the header,
then append the time and value to the file"""

if not os.path.isfile(self.filename):
title = "Flux surface {}: {}".format(self.surface.id, self.field.name)

Expand Down

0 comments on commit 3f81828

Please sign in to comment.