Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
remove value or none
Browse files Browse the repository at this point in the history
  • Loading branch information
samwaseda committed Aug 4, 2024
1 parent 57531b8 commit dda2415
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions elaston/linear_elasticity/linear_elasticity.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@
__date__ = "Aug 21, 2021"


def value_or_none(func):
def f(self):
if self.elastic_tensor is None:
return None
else:
return func(self)

return f


point_defect_explanation = """
According to the definition of the Green's function (cf. docstring of `get_greens_function`):
Expand Down Expand Up @@ -197,7 +187,6 @@ def elastic_tensor(self, C):
self._elastic_tensor = C

@property
@value_or_none
def elastic_tensor_voigt(self):
"""
Voigt notation of the elastic tensor, i.e. (i, j) = i, if i == j and
Expand All @@ -206,7 +195,6 @@ def elastic_tensor_voigt(self):
return tools.C_to_voigt(self.elastic_tensor)

@property
@value_or_none
def compliance_matrix(self):
"""Compliance matrix in Voigt notation."""
return np.linalg.inv(self.elastic_tensor_voigt)
Expand Down

0 comments on commit dda2415

Please sign in to comment.