Skip to content

Commit

Permalink
deprecated component
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Oct 4, 2023
1 parent 5e22c35 commit ade9d15
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions festim/initial_condition.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import warnings


class InitialCondition:
"""
Args:
field (int, str, optional): the field
("0", "solute", "T", "1",...). Defaults to 0.
value (float, str, optional): the value of the initial condition.
Defaults to 0.
component (int, str, optional): the field
("0", "solute", "T", "1",...). Soon to be deprecated. Defaults to None.
label (str, optional): label in the XDMF file. Defaults to None.
time_step ([type], optional): [description]. Defaults to None.
Expand All @@ -19,14 +14,11 @@ class InitialCondition:
"""

def __init__(
self, field=0, value=0.0, component=None, label=None, time_step=None
self, field=0, value=0.0, label=None, time_step=None
) -> None:
# TODO make an inherited class InitialConditionXDMF
self.field = field
self.value = value
if component is not None:
self.field = component
warnings.warn("components key will be deprecated", DeprecationWarning)
self.label = label
self.time_step = time_step
if type(self.value) == str:
Expand Down

0 comments on commit ade9d15

Please sign in to comment.