• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haiiliin / abqpy / 8433139069

26 Mar 2024 08:44AM UTC coverage: 73.951% (+0.1%) from 73.831%
8433139069

push

github

haiiliin
pre-commit update

40 of 67 new or added lines in 57 files covered. (59.7%)

5 existing lines in 5 files now uncovered.

24153 of 32661 relevant lines covered (73.95%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/src/abaqus/Adaptivity/AdaptivityStep.py
1
from __future__ import annotations
1✔
2

3
from typing_extensions import Literal
1✔
4

5
from abqpy.decorators import abaqus_class_doc, abaqus_method_doc
1✔
6

7
from ..Region.Region import Region
1✔
8
from ..Step.StepBase import StepBase
1✔
9
from ..UtilityAndView.abaqusConstants import abaqusConstants as C
1✔
10
from .AdaptiveMeshConstraintState import AdaptiveMeshConstraintState
1✔
11
from .AdaptiveMeshDomain import AdaptiveMeshDomain
1✔
12
from .DisplacementAdaptiveMeshConstraintState import (
1✔
13
    DisplacementAdaptiveMeshConstraintState,
14
)
15
from .VelocityAdaptiveMeshConstraintState import VelocityAdaptiveMeshConstraintState
1✔
16

17

18
@abaqus_class_doc
1✔
19
class AdaptivityStep(StepBase):
1✔
20
    """The Step object stores the parameters that determine the context of the step. The Step object is the
21
    abstract base type for other Step objects. The Step object has no explicit constructor. The methods and
22
    members of the Step object are common to all objects derived from the Step.
23

24
    .. note::
25
        This object can be accessed by::
26

27
            import step
28
            mdb.models[name].steps[name]
29
    """
30

31
    @abaqus_method_doc
1✔
32
    def AdaptiveMeshConstraintState(
1✔
33
        self,
34
        amplitudeState: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
35
        status: (
36
            Literal[
37
                C.NOT_YET_ACTIVE,
38
                C.PROPAGATED_FROM_BASE_STATE,
39
                C.DEACTIVATED_FROM_BASE_STATE,
40
                C.DEACTIVATED,
41
                C.MODIFIED_FROM_BASE_STATE,
42
                C.PROPAGATED,
43
                C.NO_LONGER_ACTIVE,
44
                C.CREATED,
45
                C.INSTANCE_NOT_APPLICABLE,
46
                C.BUILT_INTO_MODES,
47
                C.TYPE_NOT_APPLICABLE,
48
                C.MODIFIED,
49
            ]
50
            | None
51
        ) = None,
52
        amplitude: str = "",
53
    ) -> AdaptiveMeshConstraintState:
54
        """The AdaptiveMeshConstraintState object is the abstract base type for other Arbitrary Lagrangian
55
        Eularian (ALE) style AdaptiveMeshConstraintState objects. The AdaptiveMeshConstraintState object has no
56
        explicit constructor or methods. The members of the AdaptiveMeshConstraintState object are common to all
57
        objects derived from the AdaptiveMeshConstraintState object.
58

59
        .. note::
60
            This function can be accessed by::
61

62
                mdb.models[name].steps[name].AdaptiveMeshConstraintState
63

64
        Parameters
65
        ----------
66
        amplitudeState
67
            A SymbolicConstant specifying the propagation state of the amplitude reference. Possible values are
68

69
            - UNSET
70
            - SET
71
            - UNCHANGED
72
            - FREED
73
            - MODIFIED
74
        status
75
            A SymbolicConstant specifying the propagation state of the AdaptiveMeshConstraintState  object. Possible
76
            values are:
77

78
            - NOT_YET_ACTIVE
79
            - CREATED
80
            - PROPAGATED
81
            - MODIFIED
82
            - DEACTIVATED
83
            - NO_LONGER_ACTIVE
84
            - TYPE_NOT_APPLICABLE
85
            - INSTANCE_NOT_APPLICABLE
86
            - PROPAGATED_FROM_BASE_STATE
87
            - MODIFIED_FROM_BASE_STATE
88
            - DEACTIVATED_FROM_BASE_STATE
89
            - BUILT_INTO_MODES
90
        amplitude
91
            A String specifying the name of the amplitude reference. The String is empty if the  adaptive mesh
92
            constraint has no amplitude reference.
93
        """
94
        self.adaptiveMeshConstraintStates[amplitude] = adaptiveMeshConstraintState = AdaptiveMeshConstraintState(
×
95
            amplitudeState, status, amplitude
96
        )
97
        return adaptiveMeshConstraintState
×
98

99
    @abaqus_method_doc
1✔
100
    def DisplacementAdaptiveMeshConstraintState(
1✔
101
        self,
102
        u1: float | None = None,
103
        u2: float | None = None,
104
        u3: float | None = None,
105
        ur1: float | None = None,
106
        ur2: float | None = None,
107
        ur3: float | None = None,
108
        u1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
109
        u2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
110
        u3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
111
        ur1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
112
        ur2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
113
        ur3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
114
        amplitudeState: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
115
        status: (
116
            Literal[
117
                C.NOT_YET_ACTIVE,
118
                C.PROPAGATED_FROM_BASE_STATE,
119
                C.DEACTIVATED_FROM_BASE_STATE,
120
                C.DEACTIVATED,
121
                C.MODIFIED_FROM_BASE_STATE,
122
                C.PROPAGATED,
123
                C.NO_LONGER_ACTIVE,
124
                C.CREATED,
125
                C.INSTANCE_NOT_APPLICABLE,
126
                C.BUILT_INTO_MODES,
127
                C.TYPE_NOT_APPLICABLE,
128
                C.MODIFIED,
129
            ]
130
            | None
131
        ) = None,
132
        amplitude: str = "",
133
    ) -> DisplacementAdaptiveMeshConstraintState:
134
        """The DisplacementAdaptiveMeshConstraintState object stores the propagating data for an Arbitrary
135
        Lagrangian Eularian (ALE) style displacement/rotation adaptive mesh constraint in a step. One instance
136
        of this object is created internally by the DisplacementAdaptiveMeshConstraint object for each step. The
137
        instance is also deleted internally by the DisplacementAdaptiveMeshConstraint object. The
138
        DisplacementAdaptiveMeshConstraintState object has no constructor or methods. The
139
        DisplacementAdaptiveMeshConstraintState object is derived from the AdaptiveMeshConstraintState object.
140

141
        .. note::
142
            This function can be accessed by::
143

144
                mdb.models[name].steps[name].DisplacementAdaptiveMeshConstraintState
145

146
        Parameters
147
        ----------
148
        u1
149
            A Float or a Complex specifying the displacement component in the 1-direction.
150
        u2
151
            A Float or a Complex specifying the displacement component in the 2-direction.
152
        u3
153
            A Float or a Complex specifying the displacement component in the 3-direction.
154
        ur1
155
            A Float or a Complex specifying the rotational displacement component about the  1-direction.
156
        ur2
157
            A Float or a Complex specifying the rotational displacement component about the  2-direction.
158
        ur3
159
            A Float or a Complex specifying the rotational displacement component about the  3-direction.
160
        u1State
161
            A SymbolicConstant specifying the propagation state of the displacement component in the  1-direction.
162
            Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED.
163
        u2State
164
            A SymbolicConstant specifying the propagation state of the displacement component in the  2-direction.
165
            Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED.
166
        u3State
167
            A SymbolicConstant specifying the propagation state of the displacement component in the  3-direction.
168
            Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED.
169
        ur1State
170
            A SymbolicConstant specifying the propagation state of the rotational displacement  component about the
171
            1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and  MODIFIED.
172
        ur2State
173
            A SymbolicConstant specifying the propagation state of the rotational displacement  component about the
174
            2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and  MODIFIED.
175
        ur3State
176
            A SymbolicConstant specifying the propagation state of the rotational displacement  component about the
177
            3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and  MODIFIED.
178
        amplitudeState
179
            A SymbolicConstant specifying the propagation state of the amplitude reference. Possible  values are UNSET,
180
            SET, UNCHANGED, FREED, and MODIFIED.
181
        status
182
            A SymbolicConstant specifying the propagation state of the AdaptiveMeshConstraintState  object. Possible
183
            values are:
184

185
            - NOT_YET_ACTIVE
186
            - CREATED
187
            - PROPAGATED
188
            - MODIFIED
189
            - DEACTIVATED
190
            - NO_LONGER_ACTIVE
191
            - TYPE_NOT_APPLICABLE
192
            - INSTANCE_NOT_APPLICABLE
193
            - PROPAGATED_FROM_BASE_STATE
194
            - MODIFIED_FROM_BASE_STATE
195
            - DEACTIVATED_FROM_BASE_STATE
196
            - BUILT_INTO_MODES
197
        amplitude
198
            A String specifying the name of the amplitude reference. The String is empty if the  adaptive mesh
199
            constraint has no amplitude reference.
200
        """
NEW
201
        self.adaptiveMeshConstraintStates[amplitude] = adaptiveMeshConstraintState = (
×
202
            DisplacementAdaptiveMeshConstraintState(
203
                u1,
204
                u2,
205
                u3,
206
                ur1,
207
                ur2,
208
                ur3,
209
                u1State,
210
                u2State,
211
                u3State,
212
                ur1State,
213
                ur2State,
214
                ur3State,
215
                amplitudeState,
216
                status,
217
                amplitude,
218
            )
219
        )
220
        return adaptiveMeshConstraintState
×
221

222
    @abaqus_method_doc
1✔
223
    def VelocityAdaptiveMeshConstraintState(
1✔
224
        self,
225
        v1: float | None = None,
226
        v2: float | None = None,
227
        v3: float | None = None,
228
        vr1: float | None = None,
229
        vr2: float | None = None,
230
        vr3: float | None = None,
231
        v1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
232
        v2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
233
        v3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
234
        vr1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
235
        vr2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
236
        vr3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
237
        amplitudeState: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None,
238
        status: (
239
            Literal[
240
                C.NOT_YET_ACTIVE,
241
                C.PROPAGATED_FROM_BASE_STATE,
242
                C.DEACTIVATED_FROM_BASE_STATE,
243
                C.DEACTIVATED,
244
                C.MODIFIED_FROM_BASE_STATE,
245
                C.PROPAGATED,
246
                C.NO_LONGER_ACTIVE,
247
                C.CREATED,
248
                C.INSTANCE_NOT_APPLICABLE,
249
                C.BUILT_INTO_MODES,
250
                C.TYPE_NOT_APPLICABLE,
251
                C.MODIFIED,
252
            ]
253
            | None
254
        ) = None,
255
        amplitude: str = "",
256
    ) -> VelocityAdaptiveMeshConstraintState:
257
        """The VelocityAdaptiveMeshConstraintState object stores the propagating data for an Arbitrary
258
        Lagrangian Eularian (ALE) style velocity adaptive mesh constraint in a step. One instance of this object
259
        is created internally by the VelocityAdaptiveMeshConstraint object for each step. The instance is also
260
        deleted internally by the VelocityAdaptiveMeshConstraint object. The VelocityAdaptiveMeshConstraintState
261
        object has no constructor or methods. The VelocityAdaptiveMeshConstraintState object is derived from the
262
        AdaptiveMeshConstraintState object.
263

264
        .. note::
265
            This function can be accessed by::
266

267
                mdb.models[name].steps[name].VelocityAdaptiveMeshConstraintState
268

269
        Parameters
270
        ----------
271
        v1
272
            A Float specifying the velocity component in the 1-direction.
273
        v2
274
            A Float specifying the velocity component in the 2-direction.
275
        v3
276
            A Float specifying the velocity component in the 3-direction.
277
        vr1
278
            A Float specifying the rotational velocity component about the 1-direction.
279
        vr2
280
            A Float specifying the rotational velocity component about the 2-direction.
281
        vr3
282
            A Float specifying the rotational velocity component about the 3-direction.
283
        v1State
284
            A SymbolicConstant specifying the propagation state of the velocity component in the  1-direction.
285
            Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED.
286
        v2State
287
            A SymbolicConstant specifying the propagation state of the velocity component in the  2-direction.
288
            Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED.
289
        v3State
290
            A SymbolicConstant specifying the propagation state of the velocity component in the  3-direction.
291
            Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED.
292
        vr1State
293
            A SymbolicConstant specifying the propagation state of the rotational velocity component  about the
294
            1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED.
295
        vr2State
296
            A SymbolicConstant specifying the propagation state of the rotational velocity component  about the
297
            2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED.
298
        vr3State
299
            A SymbolicConstant specifying the propagation state of the rotational velocity component  about the
300
            3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED.
301
        amplitudeState
302
            A SymbolicConstant specifying the propagation state of the amplitude reference. Possible  values are UNSET,
303
            SET, UNCHANGED, FREED, and MODIFIED.
304
        status
305
            A SymbolicConstant specifying the propagation state of the AdaptiveMeshConstraintState  object. Possible
306
            values  are:
307

308
            - NOT_YET_ACTIVE
309
            - CREATED
310
            - PROPAGATED
311
            - MODIFIED
312
            - DEACTIVATED
313
            - NO_LONGER_ACTIVE
314
            - TYPE_NOT_APPLICABLE
315
            - INSTANCE_NOT_APPLICABLE
316
            - PROPAGATED_FROM_BASE_STATE
317
            - MODIFIED_FROM_BASE_STATE
318
            - DEACTIVATED_FROM_BASE_STATE
319
            - BUILT_INTO_MODES
320
        amplitude
321
            A String specifying the name of the amplitude reference. The String is empty if the  adaptive mesh
322
            constraint has no amplitude reference.
323
        """
NEW
324
        self.adaptiveMeshConstraintStates[amplitude] = adaptiveMeshConstraintState = (
×
325
            VelocityAdaptiveMeshConstraintState(
326
                v1,
327
                v2,
328
                v3,
329
                vr1,
330
                vr2,
331
                vr3,
332
                v1State,
333
                v2State,
334
                v3State,
335
                vr1State,
336
                vr2State,
337
                vr3State,
338
                amplitudeState,
339
                status,
340
                amplitude,
341
            )
342
        )
343
        return adaptiveMeshConstraintState
×
344

345
    @abaqus_method_doc
1✔
346
    def AdaptiveMeshDomain(
1✔
347
        self,
348
        region: Region,
349
        controls: str = "",
350
        frequency: int = 10,
351
        initialMeshSweeps: int = 5,
352
        meshSweeps: int = 1,
353
    ) -> AdaptiveMeshDomain:
354
        """The AdaptiveMeshDomain object defines the region and controls that govern an Arbitrary Lagrangian
355
        Eularian (ALE) style adaptive smoothing mesh domain.
356

357
        This method creates an AdaptiveMeshDomain object.
358

359
        .. note::
360
            This function can be accessed by::
361

362
                mdb.models[name].steps[name].AdaptiveMeshDomain
363

364
        Parameters
365
        ----------
366
        region
367
            A Region object specifying the region to which the adaptive mesh domain is applied.
368
        controls
369
            A String specifying the name of an AdaptiveMeshControl object.
370
        frequency
371
            An Int specifying the frequency in increments at which adaptive meshing will be
372
            performed. The default value is 10.
373
        initialMeshSweeps
374
            An Int specifying the number of mesh sweeps to be performed at the beginning of the
375
            first step in which this adaptive mesh definition is active. The default value is 5.
376
        meshSweeps
377
            An Int specifying the number of mesh sweeps to be performed in each adaptive mesh
378
            increment. The default value is 1.
379

380
        Returns
381
        -------
382
        AdaptiveMeshDomain
383
            An AdaptiveMeshDomain object
384
        """
385
        self.adaptiveMeshDomains[controls] = adaptiveMeshDomain = AdaptiveMeshDomain(
×
386
            region, controls, frequency, initialMeshSweeps, meshSweeps
387
        )
388
        return adaptiveMeshDomain
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc