This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
TableCollection.py
151 lines (113 loc) · 3.94 KB
/
TableCollection.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
from ..TableCollection.DataTable import DataTable
from ..TableCollection.ParameterTable import ParameterTable
from ..TableCollection.PropertyTable import PropertyTable
class TableCollection:
"""A TableCollection is an object used to define the containers that encapsulate the
ParameterTable and PropertyTable objects.
Attributes
----------
propertyTables: dict[str, PropertyTable]
A repository of the :py:class:`~abaqus.TableCollection.PropertyTable.PropertyTable` object.
parameterTables: dict[str, ParameterTable]
A repository of the :py:class:`~abaqus.TableCollection.ParameterTable.ParameterTable` object
dataTables: list[DataTable]
sequence of the :py:class:`~abaqus.Field.DataTable.DataTable` object
Notes
-----
This object can be accessed by:
.. code-block:: python
mdb.models[name].tableCollections[name]
The corresponding analysis keywords are:
- *TABLE COLLECTION
"""
# A repository of the PropertyTable object.
propertyTables: dict[str, PropertyTable] = dict[str, PropertyTable]()
# A repository of the ParameterTable object
parameterTables: dict[str, ParameterTable] = dict[str, ParameterTable]()
# sequence of the DataTable object
dataTables: list[DataTable] = []
def __init__(self, name: str):
"""This method creates a TableCollection object and places it in the tableCollections
repository.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].TableCollection
Parameters
----------
name
A String specifying the repository key.
Returns
-------
A TableCollection object.
"""
pass
def DataTable(self, label: str) -> DataTable:
"""This method creates a DataTable object and places it in the dataTables array.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].TableCollection
Parameters
----------
label
A String specifying a unique label name for the current ParameterTable object.
Returns
-------
A DataTable object.
Raises
------
AbaqusException.
"""
dataTable = DataTable(label)
self.dataTables.append(dataTable)
return dataTable
def ParameterTable(self, name: str) -> ParameterTable:
"""This method creates a ParameterTable object and places it in the parameterTables
repository.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].TableCollection
Parameters
----------
name
A String specifying the repository key.
Returns
-------
A ParameterTable object.
"""
self.parameterTables[name] = parameterTable = ParameterTable(name)
return parameterTable
def PropertyTable(
self, name: str, properties: str, variables: str = ""
) -> PropertyTable:
"""This method creates a PropertyTable object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].TableCollection
Parameters
----------
name
A String specifying the repository key.
properties
A string array specifying the multiple properties to build the parameter table type.
variables
A String array specifying multiple independent variables. The default value is an empty
array.
Returns
-------
A PropertyTable object.
Raises
------
RangeError.
"""
self.propertyTables[name] = propertyTable = PropertyTable(
name, properties, variables
)
return propertyTable