Skip to content

Commit

Permalink
Merge pull request #217 from Deltares/feature/DStability2024.02
Browse files Browse the repository at this point in the history
Feature/d stability2024.02
  • Loading branch information
zantDelta authored Jan 20, 2025
2 parents 2fb75b4 + 95b1818 commit b72dce7
Show file tree
Hide file tree
Showing 13 changed files with 391 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def calculate_fragility_curve(
)
)
dm.set_model(bishop_analysis_method)
dm.datastructure.calculationsettings[
0
].CalculationType = CalculationTypeEnum.PROBABILISTIC
dm.datastructure.calculationsettings[0].CalculationType = (
CalculationTypeEnum.PROBABILISTIC
)

# Re-calculate to get Reliability Index
dm.serialize(Path(output_file))
Expand Down
1 change: 1 addition & 0 deletions geolib/geometry/one.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
For profiles used in 1D applications, see :class:`~geolib.soils.layers.ProfileLayer`
"""

from math import isclose
from typing import Optional

Expand Down
2 changes: 1 addition & 1 deletion geolib/models/base_data_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class BaseDataClass(BaseModel):
validate_assignment=True,
arbitrary_types_allowed=True,
validate_default=True,
ser_json_inf_nan='constants',
ser_json_inf_nan="constants",
extra=settings.extra_fields,
)
12 changes: 6 additions & 6 deletions geolib/models/dstability/dstability_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,12 +567,12 @@ def add_layer_and_connect_points(
linestring1, linestring2 = self.connect_layers(layer, new_layer)

# Update the points of the layers
current_layers[
current_layers.index(layer)
].Points = self.to_dstability_points(linestring1)
current_layers[
current_layers.index(new_layer)
].Points = self.to_dstability_points(linestring2)
current_layers[current_layers.index(layer)].Points = (
self.to_dstability_points(linestring1)
)
current_layers[current_layers.index(new_layer)].Points = (
self.to_dstability_points(linestring2)
)

def to_shapely_linestring(self, points: List[PersistablePoint]) -> LineString:
converted_points = [(p.X, p.Z) for p in points]
Expand Down
199 changes: 150 additions & 49 deletions geolib/models/dstability/internal.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions geolib/models/dstability/loads.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This module handles the four types of loads in DStability.
"""

import abc
from typing import Optional

Expand Down
1 change: 1 addition & 0 deletions geolib/models/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Make a mapping between the possible metadata options and names for each model.
"""

from datetime import datetime
from pathlib import Path
from typing import Optional
Expand Down
3 changes: 2 additions & 1 deletion geolib/soils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Module containing the common soil object definition.
"""


from .soil import (
BjerrumParameters,
ConeResistance,
Expand All @@ -18,6 +17,8 @@
ModulusSubgradeReaction,
MohrCoulombParameters,
ShearStrengthModelTypePhreaticLevel,
SigmaTauParameters,
SigmaTauTablePoint,
Soil,
SoilClassificationParameters,
SoilState,
Expand Down
Loading

0 comments on commit b72dce7

Please sign in to comment.