Coverage for mpcforces_extractor\datastructure\loads.py: 100%
21 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-06 21:34 +0100
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-06 21:34 +0100
1from typing import List
4class Moment:
5 """
6 Simple representation of a moment from the .fem file
7 """
9 id: int
10 node_id: int
11 system_id: int
12 compenents: List[float]
14 def __init__(
15 self,
16 *,
17 moment_id: int,
18 node_id: int,
19 system_id: int,
20 scale_factor: float,
21 compenents_from_file: List[str],
22 ):
23 self.id = moment_id
24 self.node_id = node_id
25 self.system_id = system_id
26 self.compenents = [
27 scale_factor * float(compenent) for compenent in compenents_from_file
28 ]
31class Force:
32 """
33 Simple representation of a force from the .fem file
34 """
36 id: int
37 node_id: int
38 system_id: int
39 compenents: List[float]
41 def __init__(
42 self,
43 *,
44 force_id: int,
45 node_id: int,
46 system_id: int,
47 scale_factor: float,
48 compenents_from_file: List[str],
49 ):
50 self.id = force_id
51 self.node_id = node_id
52 self.system_id = system_id
53 self.compenents = [
54 scale_factor * float(compenent) for compenent in compenents_from_file
55 ]