Skip to content

Commit

Permalink
black for festim
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Jun 29, 2023
1 parent cbf6f77 commit 2178806
Show file tree
Hide file tree
Showing 20 changed files with 0 additions and 24 deletions.
1 change: 0 additions & 1 deletion festim/boundary_conditions/boundary_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class BoundaryCondition:
"""

def __init__(self, surfaces, field) -> None:

if not isinstance(surfaces, list):
surfaces = [surfaces]
self.surfaces = surfaces
Expand Down
1 change: 0 additions & 1 deletion festim/boundary_conditions/dirichlets/custom_dc.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def fun(T, solute, param1):
"""

def __init__(self, surfaces, function, field=0, **prms) -> None:

super().__init__(surfaces, field=field, value=None)
self.function = function
self.prms = prms
Expand Down
1 change: 0 additions & 1 deletion festim/boundary_conditions/dirichlets/dirichlet_bc.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ class BoundaryConditionExpression(f.UserExpression):
"""

def __init__(self, T, eval_function, **kwargs):

super().__init__()

self._T = T
Expand Down
1 change: 0 additions & 1 deletion festim/concentration/traps/extrinsic_trap.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def __init__(
id=None,
**kwargs,
):

super().__init__(
k_0,
E_k,
Expand Down
1 change: 0 additions & 1 deletion festim/concentration/traps/trap.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class Trap(Concentration):
"""

def __init__(self, k_0, E_k, p_0, E_p, materials, density, id=None):

super().__init__()
self.id = id
self.k_0 = k_0
Expand Down
3 changes: 0 additions & 3 deletions festim/exports/derived_quantities/derived_quantities.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def __init__(
nb_iterations_between_compute: int = 1,
nb_iterations_between_exports: int = None,
) -> None:

self.filename = filename
self.nb_iterations_between_compute = nb_iterations_between_compute
self.nb_iterations_between_exports = nb_iterations_between_exports
Expand Down Expand Up @@ -82,7 +81,6 @@ def assign_properties_to_quantities(self, materials):
quantity.H = materials.H

def compute(self, t):

# TODO need to support for soret flag in surface flux
row = [t]
for quantity in self.derived_quantities:
Expand Down Expand Up @@ -182,7 +180,6 @@ def filter(

# iterate through derived_quantities
for quantity in self.derived_quantities:

# initialise flags to False
match_surface, match_volume, match_field, match_instance = (
False,
Expand Down
1 change: 0 additions & 1 deletion festim/exports/derived_quantities/derived_quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class DerivedQuantity(Export):
"""

def __init__(self, field) -> None:

super().__init__(field=field)
self.dx = None
self.ds = None
Expand Down
1 change: 0 additions & 1 deletion festim/exports/derived_quantities/maximum_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class MaximumSurface(DerivedQuantity):
"""

def __init__(self, field, surface) -> None:

super().__init__(field)
self.surface = surface
self.title = "Maximum {} surface {}".format(self.field, self.surface)
Expand Down
1 change: 0 additions & 1 deletion festim/exports/derived_quantities/minimum_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class MinimumSurface(DerivedQuantity):
"""

def __init__(self, field, surface) -> None:

super().__init__(field)
self.surface = surface
self.title = "Minimum {} surface {}".format(self.field, self.surface)
Expand Down
1 change: 0 additions & 1 deletion festim/exports/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def __init__(self, exports=[]) -> None:
def write(self, label_to_function, dt):
for export in self.exports:
if isinstance(export, festim.DerivedQuantities):

# compute derived quantities
if export.is_compute(self.nb_iterations):
# check if function has to be projected
Expand Down
1 change: 0 additions & 1 deletion festim/exports/trap_density_xdmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class TrapDensityXDMF(XDMFExport):
"""

def __init__(self, trap, **kwargs) -> None:

super().__init__(
field="1", **kwargs
) # field is "1" just to make the code not crash
Expand Down
2 changes: 0 additions & 2 deletions festim/exports/txt_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class TXTExport(festim.Export):
"""

def __init__(self, field, times, label, folder) -> None:

super().__init__(field=field)
self.times = sorted(times)
self.label = label
Expand All @@ -40,7 +39,6 @@ def when_is_next_time(self, current_time):
return None

def write(self, current_time, dt):

# create a DG1 functionspace
V_DG1 = f.FunctionSpace(self.function.function_space().mesh(), "DG", 1)

Expand Down
2 changes: 0 additions & 2 deletions festim/exports/xdmf_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class XDMFExport(Export):
def __init__(
self, field, label=None, filename=None, mode=1, checkpoint=True, folder=None
) -> None:

super().__init__(field=field)
self.label = label
self.folder = folder
Expand Down Expand Up @@ -123,7 +122,6 @@ def write(self, t):
self.function.rename(self.label, "label")

if self.checkpoint:

# warn users if checkpoint is True and 1D
dimension = self.function.function_space().mesh().topology().dim()
if dimension == 1:
Expand Down
1 change: 0 additions & 1 deletion festim/generic_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def __init__(
exports=None,
log_level=40,
):

self.log_level = log_level

self.settings = settings
Expand Down
1 change: 0 additions & 1 deletion festim/initial_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class InitialCondition:
def __init__(
self, field=0, value=0.0, component=None, label=None, time_step=None
) -> None:

# TODO make an inherited class InitialConditionXDMF
self.field = field
self.value = value
Expand Down
1 change: 0 additions & 1 deletion festim/materials/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def __init__(
solubility_law="sievert",
name=None,
) -> None:

self.id = id
self.name = name
self.D_0 = D_0
Expand Down
1 change: 0 additions & 1 deletion festim/materials/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class Materials:
"""

def __init__(self, materials=[]):

self.materials = materials
self.D = None
self.S = None
Expand Down
1 change: 0 additions & 1 deletion festim/meshing/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class Mesh:
def __init__(
self, mesh=None, volume_markers=None, surface_markers=None, type="cartesian"
) -> None:

self.mesh = mesh
self.volume_markers = volume_markers
self.surface_markers = surface_markers
Expand Down
1 change: 0 additions & 1 deletion festim/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def __init__(
update_jacobian=True,
linear_solver=None,
):

# TODO maybe transient and final_time are redundant
self.transient = transient
self.final_time = final_time
Expand Down
1 change: 0 additions & 1 deletion festim/stepsize.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def __init__(
stepsize_stop_max=None,
dt_min=None,
) -> None:

self.adaptive_stepsize = None
if stepsize_change_ratio is not None:
self.adaptive_stepsize = {
Expand Down

0 comments on commit 2178806

Please sign in to comment.