-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Problem
Move this static method out of the class and make it a module-level function. This will make it easier to test and reuse.
Proposed solution
def fiber_volume(radius: float) -> float:
"""calculate the fiber volume of the current fiber
Parameters
----------
radius : float
radius
Returns
-------
vol:float
volume of current fiber(disk)
"""
return (4 / 3) * np.pi * radius**3Assignees:
Labels:
rvesimulator/src/rvesimulator/microstructure/shpere_particles.py
Lines 366 to 380 in ea31752
| @staticmethod | |
| def fiber_volume(radius: float) -> float: | |
| """calculate the fiber volume of the current fiber | |
| Parameters | |
| ---------- | |
| radius : float | |
| radius | |
| Returns | |
| ------- | |
| vol:float | |
| volume of current fiber(disk) | |
| """ | |
| return (4 / 3) * np.pi * radius**3 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels