From d7be4b4727eaedbd4bc5e6ac730f0bc99841d6ff Mon Sep 17 00:00:00 2001 From: Hailin Wang Date: Sat, 19 Aug 2023 16:17:22 +0800 Subject: [PATCH] [typing] Fix wrong mypy typing annotations (#4879) * Fix mypy abqpy issues * Mypy typings * Update typing annotations for SymbolicConstants * Fixing typings * Add future annotations * Use list/dict/tuple instead of List/Dict/Tuple * Fix Optional typings * Add future annotations * Update xyPlot.py * Update .pre-commit-config.yaml * Fix list typings for Python 3.7/3.8 * Fixing more typings * Fix more typings * Update conf.py * Update .pre-commit-config.yaml * Revert "Update conf.py" This reverts commit e8449ae0c02d0b44e5469e908aeeb273b64c4dc0. * Update conf.py * Revert "Update conf.py" This reverts commit 3be44d0a51faf61ecd85dee3830d07ff3ca1e68c. * Docs Not -W --- .github/workflows/docs.yml | 2 +- .pre-commit-config.yaml | 6 + docs/Makefile | 2 +- pyproject.toml | 4 + src/ababltin.py | 2 + .../caePrefsAccess.py | 17 +- .../Adaptivity/AdaptiveMeshConstraint.py | 8 +- .../Adaptivity/AdaptiveMeshConstraintState.py | 39 +- src/abaqus/Adaptivity/AdaptivityIteration.py | 18 +- src/abaqus/Adaptivity/AdaptivityModel.py | 12 +- src/abaqus/Adaptivity/AdaptivityProcess.py | 10 +- src/abaqus/Adaptivity/AdaptivityStep.py | 150 +++--- .../DisplacementAdaptiveMeshConstraint.py | 12 +- ...DisplacementAdaptiveMeshConstraintState.py | 87 ++-- src/abaqus/Adaptivity/RemeshingRule.py | 8 +- src/abaqus/Adaptivity/RuleResult.py | 6 +- .../VelocityAdaptiveMeshConstraint.py | 71 ++- .../VelocityAdaptiveMeshConstraintState.py | 87 ++-- src/abaqus/Amplitude/AmplitudeModel.py | 29 +- src/abaqus/Amplitude/AmplitudeOdb.py | 2 + src/abaqus/Amplitude/Correlation.py | 4 +- .../Amplitude/EquallySpacedAmplitude.py | 2 + src/abaqus/Amplitude/TabularAmplitude.py | 17 +- src/abaqus/Animation/AVIOptions.py | 10 +- src/abaqus/Animation/AnimationController.py | 4 +- src/abaqus/Animation/AnimationOptions.py | 18 +- src/abaqus/Animation/AnimationSession.py | 8 +- src/abaqus/Animation/ImageAnimationOptions.py | 8 +- src/abaqus/Animation/Movie.py | 26 +- src/abaqus/Animation/QuickTimeOptions.py | 6 +- src/abaqus/Annotation/AnimationUserData.py | 2 + src/abaqus/Annotation/Annotation.py | 4 +- src/abaqus/Annotation/Arrow.py | 8 +- src/abaqus/Annotation/Text.py | 8 +- src/abaqus/Assembly/Assembly.py | 6 +- src/abaqus/Assembly/AssemblyBase.py | 65 +-- src/abaqus/Assembly/AssemblyFeature.py | 8 +- src/abaqus/Assembly/AssemblyModel.py | 4 +- src/abaqus/Assembly/ConnectorOrientation.py | 19 +- .../Assembly/ConnectorOrientationArray.py | 2 + src/abaqus/Assembly/ModelInstance.py | 10 +- src/abaqus/Assembly/PartInstance.py | 48 +- src/abaqus/Assembly/PartInstanceArray.py | 2 + src/abaqus/BasicGeometry/Cell.py | 12 +- src/abaqus/BasicGeometry/CellArray.py | 61 +-- src/abaqus/BasicGeometry/Edge.py | 42 +- src/abaqus/BasicGeometry/EdgeArray.py | 64 +-- src/abaqus/BasicGeometry/Face.py | 104 ++-- src/abaqus/BasicGeometry/FaceArray.py | 59 +-- src/abaqus/BasicGeometry/IgnoredEdge.py | 10 +- src/abaqus/BasicGeometry/IgnoredEdgeArray.py | 30 +- src/abaqus/BasicGeometry/IgnoredVertex.py | 6 +- .../BasicGeometry/IgnoredVertexArray.py | 30 +- src/abaqus/BasicGeometry/ModelDotArray.py | 2 + src/abaqus/BasicGeometry/ReferencePoint.py | 2 + .../BasicGeometry/ReferencePointArray.py | 2 + src/abaqus/BasicGeometry/ReferencePoints.py | 8 +- src/abaqus/BasicGeometry/Transform.py | 2 +- src/abaqus/BasicGeometry/Vertex.py | 22 +- src/abaqus/BasicGeometry/VertexArray.py | 60 +-- .../BeamSectionProfileModel.py | 6 +- src/abaqus/BeamSectionProfile/Profile.py | 2 +- .../BoundaryCondition/AccelerationBC.py | 12 +- .../BoundaryCondition/AccelerationBCState.py | 30 +- .../AccelerationBaseMotionBC.py | 10 +- .../AccelerationBaseMotionBCState.py | 6 +- .../BoundaryCondition/AcousticPressureBC.py | 8 +- .../AcousticPressureBCState.py | 10 +- .../BoundaryCondition/BoundaryCondition.py | 6 +- .../BoundaryConditionModel.py | 50 +- .../BoundaryConditionState.py | 6 +- .../BoundaryCondition/ConcentrationBC.py | 8 +- .../BoundaryCondition/ConcentrationBCState.py | 10 +- .../BoundaryCondition/ConnAccelerationBC.py | 8 +- .../ConnAccelerationBCState.py | 30 +- .../BoundaryCondition/ConnDisplacementBC.py | 8 +- .../ConnDisplacementBCState.py | 30 +- .../BoundaryCondition/ConnVelocityBC.py | 8 +- .../BoundaryCondition/ConnVelocityBCState.py | 30 +- .../BoundaryCondition/DisplacementBC.py | 12 +- .../BoundaryCondition/DisplacementBCState.py | 30 +- .../DisplacementBaseMotionBC.py | 10 +- .../DisplacementBaseMotionBCState.py | 6 +- .../BoundaryCondition/ElectricPotentialBC.py | 8 +- .../ElectricPotentialBCState.py | 10 +- src/abaqus/BoundaryCondition/EulerianBC.py | 6 +- .../BoundaryCondition/EulerianBCState.py | 12 +- .../BoundaryCondition/EulerianMotionBC.py | 34 +- .../EulerianMotionBCState.py | 12 +- .../FluidCavityPressureBC.py | 8 +- .../FluidCavityPressureBCState.py | 10 +- .../MagneticVectorPotentialBC.py | 20 +- .../BoundaryCondition/MaterialFlowBC.py | 8 +- .../BoundaryCondition/MaterialFlowBCState.py | 10 +- .../BoundaryCondition/PorePressureBC.py | 8 +- .../BoundaryCondition/PorePressureBCState.py | 10 +- .../BoundaryCondition/RetainedNodalDofsBC.py | 6 +- .../BoundaryCondition/SecondaryBaseBC.py | 8 +- .../BoundaryCondition/SecondaryBaseBCState.py | 6 +- src/abaqus/BoundaryCondition/SubmodelBC.py | 22 +- .../BoundaryCondition/SubmodelBCState.py | 22 +- src/abaqus/BoundaryCondition/TemperatureBC.py | 8 +- .../BoundaryCondition/TemperatureBCState.py | 14 +- src/abaqus/BoundaryCondition/TypeBC.py | 34 +- src/abaqus/BoundaryCondition/TypeBCState.py | 10 +- src/abaqus/BoundaryCondition/VelocityBC.py | 12 +- .../BoundaryCondition/VelocityBCState.py | 30 +- .../BoundaryCondition/VelocityBaseMotionBC.py | 10 +- .../VelocityBaseMotionBCState.py | 6 +- src/abaqus/Calibration/Behavior.py | 8 +- src/abaqus/Calibration/Calibration.py | 6 +- src/abaqus/Canvas/AttributeColorMap.py | 14 +- src/abaqus/Canvas/CanvasSession.py | 4 +- src/abaqus/Canvas/DrawingArea.py | 8 +- src/abaqus/Canvas/ImageOptions.py | 6 +- src/abaqus/Canvas/Layer.py | 4 +- src/abaqus/Canvas/MovieOptions.py | 6 +- src/abaqus/Canvas/ViewportBase.py | 32 +- src/abaqus/Connector/CDCTermArray.py | 2 + .../Connector/ConnectorBehaviorOption.py | 8 +- .../Connector/ConnectorBehaviorOptionArray.py | 2 + src/abaqus/Connector/ConnectorDamage.py | 16 +- src/abaqus/Connector/ConnectorFailure.py | 18 +- src/abaqus/Connector/ConnectorFriction.py | 16 +- src/abaqus/Connector/ConnectorLock.py | 18 +- src/abaqus/Connector/ConnectorPlasticity.py | 6 +- .../Connector/ConnectorPotentialArray.py | 2 + src/abaqus/Connector/ConnectorSection.py | 34 +- src/abaqus/Connector/ConnectorStop.py | 8 +- src/abaqus/Connector/TangentialBehavior.py | 14 +- src/abaqus/Constraint/ConstraintModel.py | 18 +- src/abaqus/Constraint/Coupling.py | 10 +- src/abaqus/Constraint/EmbeddedRegion.py | 8 +- src/abaqus/Constraint/MultipointConstraint.py | 8 +- src/abaqus/Constraint/RigidBody.py | 26 +- src/abaqus/CustomKernel/RepositorySupport.py | 6 +- src/abaqus/Datum/DatumAxis.py | 4 +- src/abaqus/Datum/DatumCsys.py | 16 +- src/abaqus/Datum/DatumPlane.py | 4 +- src/abaqus/Datum/DatumPoint.py | 4 +- src/abaqus/DisplayGroup/DisplayGroup.py | 4 +- src/abaqus/DisplayGroup/DisplayGroupArray.py | 2 + .../DisplayGroup/LeafFromConstraintNames.py | 4 +- src/abaqus/DisplayGroup/LeafFromDatums.py | 6 +- .../DisplayGroup/LeafFromDisplayGroup.py | 4 +- .../DisplayGroup/LeafFromElementLabels.py | 4 +- .../DisplayGroup/LeafFromElementSets.py | 4 +- .../DisplayGroup/LeafFromElementVarRange.py | 8 +- src/abaqus/DisplayGroup/LeafFromGeometry.py | 4 +- src/abaqus/DisplayGroup/LeafFromInstance.py | 4 +- .../LeafFromInstanceElementLabels.py | 4 +- .../LeafFromInstanceNodeLabels.py | 4 +- .../DisplayGroup/LeafFromMeshElementLabels.py | 6 +- .../DisplayGroup/LeafFromMeshNodeLabels.py | 6 +- .../DisplayGroup/LeafFromMeshSurfaceSets.py | 6 +- .../DisplayGroup/LeafFromModelElemLabels.py | 4 +- .../DisplayGroup/LeafFromModelNodeLabels.py | 4 +- src/abaqus/DisplayGroup/LeafFromNodeLabels.py | 4 +- src/abaqus/DisplayGroup/LeafFromNodeSets.py | 4 +- .../DisplayGroup/LeafFromNodeVarRange.py | 8 +- .../DisplayGroup/LeafFromOdbEdgePick.py | 4 +- .../DisplayGroup/LeafFromOdbElementLayups.py | 4 +- .../LeafFromOdbElementMaterials.py | 4 +- .../DisplayGroup/LeafFromOdbElementPick.py | 4 +- .../DisplayGroup/LeafFromOdbElementPlies.py | 4 +- .../LeafFromOdbElementSections.py | 4 +- .../DisplayGroup/LeafFromOdbElementTypes.py | 4 +- .../DisplayGroup/LeafFromOdbNodePick.py | 4 +- .../DisplayGroup/LeafFromPartElementLabels.py | 4 +- .../DisplayGroup/LeafFromPartInstance.py | 4 +- .../DisplayGroup/LeafFromPartNodeLabels.py | 4 +- .../DisplayGroup/LeafFromReferencePoint.py | 4 +- src/abaqus/DisplayGroup/LeafFromSets.py | 6 +- .../DisplayGroup/LeafFromSurfaceSets.py | 4 +- .../DisplayGroup/LeafFromSurfaceVarRange.py | 8 +- .../DisplayOptions/AssemblyDisplayOptions.py | 6 +- src/abaqus/DisplayOptions/GraphicsOptions.py | 32 +- src/abaqus/DisplayOptions/LightArray.py | 2 + .../DisplayOptions/PartDisplayOptions.py | 6 +- .../ViewportAnnotationOptions.py | 10 +- src/abaqus/EditMesh/MeshEditAssembly.py | 22 +- src/abaqus/EditMesh/MeshEditPart.py | 42 +- .../EngineeringFeature/AssembledFastener.py | 8 +- .../EngineeringFeature/DataImperfection.py | 7 +- .../EngineeringFeature/DiscreteFastener.py | 10 +- .../EngineeringFeature/EngineeringFeature.py | 35 +- .../EngineeringFeatureBase.py | 14 +- .../EngineeringFeature/FileImperfection.py | 5 +- .../EngineeringFeature/InputImperfection.py | 5 +- .../EngineeringFeature/PointFastener.py | 28 +- .../EngineeringFeature/PointMassInertia.py | 8 +- .../SpringDashpotToGround.py | 8 +- .../TwoPointSpringDashpot.py | 8 +- src/abaqus/EngineeringFeature/XFEMCrack.py | 14 +- src/abaqus/Feature/Feature.py | 173 ++++--- src/abaqus/Field/AnalyticalField.py | 33 +- src/abaqus/Field/DataTable.py | 8 +- src/abaqus/Field/DataTableArray.py | 2 + src/abaqus/Field/DiscreteField.py | 8 +- src/abaqus/Field/ExpressionField.py | 9 +- src/abaqus/Field/FieldModel.py | 8 +- src/abaqus/Field/MappedField.py | 13 +- src/abaqus/Field/OdbMeshRegionData.py | 31 +- src/abaqus/FieldReport/FieldReportSession.py | 15 +- .../FieldReport/FreeBodyReportOptions.py | 6 +- src/abaqus/FieldReport/OdbFieldVarList.py | 2 + src/abaqus/FieldReport/writeFieldReport.py | 6 +- src/abaqus/FieldReport/writeFreeBodyReport.py | 8 +- src/abaqus/Filter/ButterworthFilter.py | 8 +- src/abaqus/Filter/Chebyshev1Filter.py | 8 +- src/abaqus/Filter/Chebyshev2Filter.py | 8 +- src/abaqus/Filter/Filter.py | 6 +- src/abaqus/Filter/FilterModel.py | 10 +- src/abaqus/Filter/FilterOdb.py | 10 +- src/abaqus/Filter/OperatorFilter.py | 8 +- src/abaqus/InputFileParser/Keyword.py | 4 +- .../Interaction/AcousticImpedanceState.py | 6 +- src/abaqus/Interaction/ActuatorSensorState.py | 4 +- src/abaqus/Interaction/CavityRadiation.py | 50 +- .../Interaction/CavityRadiationState.py | 20 +- .../ConcentratedFilmConditionState.py | 22 +- .../ConcentratedRadiationToAmbientState.py | 18 +- src/abaqus/Interaction/ContactDamage.py | 14 +- src/abaqus/Interaction/ContactDamping.py | 6 +- src/abaqus/Interaction/ContactExp.py | 32 +- src/abaqus/Interaction/ContactProperty.py | 22 +- src/abaqus/Interaction/ContactStd.py | 50 +- .../Interaction/ContactTangentialBehavior.py | 12 +- src/abaqus/Interaction/CyclicSymmetryState.py | 12 +- src/abaqus/Interaction/ElasticFoundation.py | 4 +- .../Interaction/ElasticFoundationState.py | 8 +- src/abaqus/Interaction/ExpContactControl.py | 8 +- src/abaqus/Interaction/ExpInitialization.py | 32 +- src/abaqus/Interaction/FilmConditionState.py | 18 +- src/abaqus/Interaction/FluidCavityProperty.py | 14 +- src/abaqus/Interaction/FluidCavityState.py | 4 +- src/abaqus/Interaction/FluidExchangeState.py | 4 +- .../Interaction/FluidInflatorProperty.py | 10 +- src/abaqus/Interaction/FluidInflatorState.py | 4 +- src/abaqus/Interaction/FractureCriterion.py | 2 + src/abaqus/Interaction/GeometricProperties.py | 14 +- src/abaqus/Interaction/IncidentWave.py | 20 +- .../Interaction/IncidentWaveProperty.py | 110 ++--- src/abaqus/Interaction/IncidentWaveState.py | 4 +- .../InteractionContactControlModel.py | 12 +- .../InteractionContactInitializationModel.py | 20 +- .../InteractionContactStabilizationModel.py | 4 +- src/abaqus/Interaction/InteractionModel.py | 102 ++-- .../Interaction/InteractionPropertyModel.py | 46 +- src/abaqus/Interaction/InteractionState.py | 4 +- src/abaqus/Interaction/ModelChange.py | 8 +- src/abaqus/Interaction/NormalBehavior.py | 8 +- src/abaqus/Interaction/PressurePenetration.py | 6 +- .../Interaction/PressurePenetrationState.py | 18 +- .../Interaction/RadiationToAmbientState.py | 14 +- src/abaqus/Interaction/RegionPairs.py | 6 +- src/abaqus/Interaction/SelfContactExpState.py | 8 +- src/abaqus/Interaction/SelfContactStdState.py | 8 +- src/abaqus/Interaction/StdContactControl.py | 26 +- src/abaqus/Interaction/StdInitialization.py | 26 +- src/abaqus/Interaction/StdStabilization.py | 8 +- .../Interaction/StdXplCosimulationState.py | 4 +- .../SurfaceCrushTriggerAssignment.py | 2 + .../Interaction/SurfaceFeatureAssignment.py | 2 + .../Interaction/SurfaceFrictionAssignment.py | 2 + .../Interaction/SurfaceOffsetAssignment.py | 6 +- .../Interaction/SurfaceThicknessAssignment.py | 8 +- .../Interaction/SurfaceToSurfaceContactExp.py | 28 +- .../Interaction/SurfaceToSurfaceContactStd.py | 44 +- .../Interaction/SurfaceToSurfaceExpState.py | 8 +- .../Interaction/SurfaceToSurfaceStdState.py | 26 +- .../SurfaceVertexCriteriaAssignment.py | 2 + .../Interaction/XFEMCrackGrowthState.py | 6 +- src/abaqus/Job/Coexecution.py | 8 +- src/abaqus/Job/Job.py | 6 +- src/abaqus/Job/JobFromInputFile.py | 12 +- src/abaqus/Job/JobMdb.py | 12 +- src/abaqus/Job/Message.py | 6 +- src/abaqus/Job/MessageArray.py | 2 + src/abaqus/Job/ModelJob.py | 16 +- src/abaqus/Job/OptimizationProcess.py | 16 +- src/abaqus/Job/Queue.py | 13 +- src/abaqus/Load/BodyCharge.py | 4 +- src/abaqus/Load/BodyChargeState.py | 10 +- src/abaqus/Load/BodyConcentrationFlux.py | 4 +- src/abaqus/Load/BodyConcentrationFluxState.py | 10 +- src/abaqus/Load/BodyCurrent.py | 4 +- src/abaqus/Load/BodyCurrentState.py | 10 +- src/abaqus/Load/BodyForce.py | 16 +- src/abaqus/Load/BodyForceState.py | 18 +- src/abaqus/Load/BodyHeatFlux.py | 4 +- src/abaqus/Load/BodyHeatFluxState.py | 10 +- src/abaqus/Load/BoltLoad.py | 6 +- src/abaqus/Load/BoltLoadState.py | 14 +- src/abaqus/Load/ConcCharge.py | 4 +- src/abaqus/Load/ConcConcFlux.py | 4 +- src/abaqus/Load/ConcCurrent.py | 4 +- src/abaqus/Load/ConcCurrentState.py | 10 +- src/abaqus/Load/ConcPoreFluid.py | 4 +- src/abaqus/Load/ConcentratedChargeState.py | 10 +- .../ConcentratedConcentrationFluxState.py | 10 +- src/abaqus/Load/ConcentratedForce.py | 22 +- src/abaqus/Load/ConcentratedForceState.py | 18 +- src/abaqus/Load/ConcentratedHeatFlux.py | 4 +- src/abaqus/Load/ConcentratedHeatFluxState.py | 10 +- src/abaqus/Load/ConcentratedPoreFluidState.py | 10 +- src/abaqus/Load/ConnectorForce.py | 16 +- src/abaqus/Load/ConnectorForceState.py | 18 +- src/abaqus/Load/ConnectorMoment.py | 16 +- src/abaqus/Load/ConnectorMomentState.py | 18 +- src/abaqus/Load/CoriolisForce.py | 8 +- src/abaqus/Load/CoriolisForceState.py | 10 +- src/abaqus/Load/Gravity.py | 20 +- src/abaqus/Load/GravityState.py | 18 +- src/abaqus/Load/HydrostaticFluidFlowState.py | 10 +- src/abaqus/Load/InertiaRelief.py | 8 +- src/abaqus/Load/InertiaReliefState.py | 24 +- src/abaqus/Load/InwardVolAccel.py | 4 +- src/abaqus/Load/InwardVolAccelState.py | 10 +- src/abaqus/Load/LineLoad.py | 16 +- src/abaqus/Load/LineLoadState.py | 18 +- src/abaqus/Load/LoadModel.py | 62 +-- src/abaqus/Load/LoadState.py | 6 +- src/abaqus/Load/Moment.py | 22 +- src/abaqus/Load/MomentState.py | 18 +- src/abaqus/Load/PEGLoad.py | 16 +- src/abaqus/Load/PEGLoadState.py | 18 +- src/abaqus/Load/PipePressure.py | 10 +- src/abaqus/Load/PipePressureState.py | 18 +- src/abaqus/Load/Pressure.py | 8 +- src/abaqus/Load/PressureState.py | 18 +- src/abaqus/Load/RotationalBodyForce.py | 8 +- src/abaqus/Load/RotationalBodyForceState.py | 10 +- src/abaqus/Load/ShellEdgeLoad.py | 2 + src/abaqus/Load/ShellEdgeLoadState.py | 10 +- src/abaqus/Load/SubmodelSB.py | 8 +- src/abaqus/Load/SubmodelSBState.py | 12 +- src/abaqus/Load/SubstructureLoad.py | 4 +- src/abaqus/Load/SubstructureLoadState.py | 10 +- src/abaqus/Load/SurfaceCharge.py | 4 +- src/abaqus/Load/SurfaceChargeState.py | 10 +- src/abaqus/Load/SurfaceConcentrationFlux.py | 4 +- .../Load/SurfaceConcentrationFluxState.py | 10 +- src/abaqus/Load/SurfaceCurrent.py | 4 +- src/abaqus/Load/SurfaceCurrentState.py | 10 +- src/abaqus/Load/SurfaceHeatFlux.py | 4 +- src/abaqus/Load/SurfaceHeatFluxState.py | 10 +- src/abaqus/Load/SurfacePoreFluid.py | 4 +- src/abaqus/Load/SurfacePoreFluidState.py | 10 +- src/abaqus/Load/SurfaceTraction.py | 10 +- src/abaqus/Load/SurfaceTractionState.py | 10 +- .../HyperElastic/HyperFoam/Hyperfoam.py | 4 +- .../Elastic/HyperElastic/Hyperelastic.py | 2 + .../ViscoElastic/CombinedTestData.py | 4 +- .../Elastic/LowDensityFoam/LowDensityFoam.py | 6 +- .../Elastic/SuperElastic/SuperElasticity.py | 4 +- src/abaqus/Material/Gap/GapFlow.py | 4 +- .../Gasket/GasketThicknessBehavior.py | 4 +- src/abaqus/Material/Material.py | 22 +- src/abaqus/Material/MaterialBase.py | 2 +- .../Multiscale/MeanFieldHomogenization.py | 14 +- .../Material/Multiscale/MeanFieldInclusion.py | 6 +- .../Material/Multiscale/MeanFieldMatrix.py | 4 +- .../Material/Multiscale/MeanFieldVoid.py | 6 +- .../CriticalStateClay/ClayPlasticity.py | 4 +- .../Plastic/CrushStress/CrushStress.py | 2 + .../CrushStress/CrushStressVelocityFactor.py | 2 + .../Extended/TriaxialTestData.py | 4 +- .../Material/Plastic/Metal/ORNL/Ornl.py | 4 +- .../Metal/Porous/PorousMetalPlasticity.py | 4 +- .../MohrCoulomb/MohrCoulombPlasticity.py | 4 +- .../Material/Plastic/PlasticityCorrection.py | 2 + src/abaqus/Material/Plastic/TensileFailure.py | 6 +- .../DamageEvolution.py | 4 +- .../DamageInitiation.py | 26 +- .../DamageStabilizationCohesive.py | 4 +- .../Material/TestData/BiaxialTestData.py | 4 +- .../Material/TestData/BiaxialTestDataArray.py | 2 + .../Material/TestData/PlanarTestData.py | 4 +- .../Material/TestData/PlanarTestDataArray.py | 2 + src/abaqus/Material/TestData/ShearTestData.py | 4 +- .../Material/TestData/UniaxialTestData.py | 4 +- .../TestData/UniaxialTestDataArray.py | 2 + .../Material/TestData/VolumetricTestData.py | 6 +- src/abaqus/Material/evaluateMaterial.py | 28 +- src/abaqus/Mdb/Mdb.py | 8 +- src/abaqus/Mdb/MdbBase.py | 28 +- src/abaqus/Mdb/MdbCommands.py | 2 + src/abaqus/Mesh/ElemType.py | 20 +- src/abaqus/Mesh/MeshAssembly.py | 46 +- src/abaqus/Mesh/MeshEdgeArray.py | 6 +- src/abaqus/Mesh/MeshElement.py | 44 +- src/abaqus/Mesh/MeshElementArray.py | 44 +- src/abaqus/Mesh/MeshFace.py | 6 +- src/abaqus/Mesh/MeshFaceArray.py | 4 +- src/abaqus/Mesh/MeshNode.py | 26 +- src/abaqus/Mesh/MeshNodeArray.py | 48 +- src/abaqus/Mesh/MeshPart.py | 74 +-- src/abaqus/Mesh/MeshStats.py | 22 +- src/abaqus/Mesh/MesherOptions.py | 4 +- src/abaqus/Messaging/DataObject.py | 38 +- src/abaqus/Model/KeywordBlock.py | 6 +- src/abaqus/Model/ModelBase.py | 88 ++-- src/abaqus/Odb/AnalyticSurface.py | 6 +- src/abaqus/Odb/BeamOrientation.py | 6 +- src/abaqus/Odb/BeamOrientationArray.py | 2 + src/abaqus/Odb/FieldBulkData.py | 10 +- src/abaqus/Odb/FieldLocation.py | 4 +- src/abaqus/Odb/FieldLocationArray.py | 2 + src/abaqus/Odb/FieldOutput.py | 61 ++- src/abaqus/Odb/FieldValue.py | 40 +- src/abaqus/Odb/FieldValueArray.py | 2 + src/abaqus/Odb/HistoryOutput.py | 17 +- src/abaqus/Odb/HistoryPoint.py | 17 +- src/abaqus/Odb/HistoryRegion.py | 20 +- src/abaqus/Odb/JobData.py | 6 +- src/abaqus/Odb/OdbAssembly.py | 6 +- src/abaqus/Odb/OdbAssemblyBase.py | 20 +- src/abaqus/Odb/OdbBase.py | 18 +- src/abaqus/Odb/OdbCommands.py | 13 +- src/abaqus/Odb/OdbDatumCsys.py | 24 +- src/abaqus/Odb/OdbFrame.py | 19 +- src/abaqus/Odb/OdbFrameArray.py | 2 + src/abaqus/Odb/OdbInstance.py | 2 + src/abaqus/Odb/OdbInstanceBase.py | 20 +- src/abaqus/Odb/OdbMeshElement.py | 8 +- src/abaqus/Odb/OdbMeshElementArray.py | 2 + src/abaqus/Odb/OdbMeshNode.py | 6 +- src/abaqus/Odb/OdbMeshNodeArray.py | 2 + src/abaqus/Odb/OdbPart.py | 2 + src/abaqus/Odb/OdbPartBase.py | 26 +- src/abaqus/Odb/OdbPretensionSection.py | 4 +- src/abaqus/Odb/OdbPretensionSectionArray.py | 2 + src/abaqus/Odb/OdbRigidBody.py | 6 +- src/abaqus/Odb/OdbRigidBodyArray.py | 2 + src/abaqus/Odb/OdbSet.py | 6 +- src/abaqus/Odb/OdbStep.py | 6 +- src/abaqus/Odb/OdbStepBase.py | 28 +- src/abaqus/Odb/RebarOrientation.py | 6 +- src/abaqus/Odb/RebarOrientationArray.py | 2 + src/abaqus/Odb/SectionPointArray.py | 2 + src/abaqus/Odb/SectorDefinition.py | 6 +- src/abaqus/Odb/UserDataBase.py | 12 +- src/abaqus/OdbDisplay/CommonOptions.py | 14 +- src/abaqus/OdbDisplay/ContourOptions.py | 26 +- src/abaqus/OdbDisplay/DisplayBodyOptions.py | 6 +- src/abaqus/OdbDisplay/OdbDisplay.py | 46 +- src/abaqus/OdbDisplay/OrientationOptions.py | 4 +- src/abaqus/OdbDisplay/SuperimposeOptions.py | 8 +- src/abaqus/OdbDisplay/SymbolOptions.py | 22 +- src/abaqus/OdbDisplay/ViewCut.py | 22 +- src/abaqus/Optimization/BeadFilter.py | 8 +- src/abaqus/Optimization/BeadFixedRegion.py | 8 +- src/abaqus/Optimization/BeadPlanarSymmetry.py | 8 +- src/abaqus/Optimization/BeadPointSymmetry.py | 8 +- .../Optimization/BeadRotationalSymmetry.py | 8 +- src/abaqus/Optimization/BeadTask.py | 46 +- .../CombinedTermDesignResponse.py | 14 +- src/abaqus/Optimization/DesignDirection.py | 14 +- src/abaqus/Optimization/DrillControl.py | 14 +- src/abaqus/Optimization/FixedRegion.py | 8 +- src/abaqus/Optimization/ObjectiveFunction.py | 3 - .../Optimization/OptimizationObjective.py | 2 + .../OptimizationObjectiveArray.py | 2 + src/abaqus/Optimization/OptimizationTask.py | 88 ++-- .../Optimization/OptimizationTaskBase.py | 12 +- .../Optimization/OptimizationTaskModel.py | 46 +- src/abaqus/Optimization/ShapeDemoldControl.py | 8 +- .../Optimization/ShapePlanarSymmetry.py | 8 +- src/abaqus/Optimization/ShapePointSymmetry.py | 8 +- .../Optimization/ShapeRotationalSymmetry.py | 20 +- src/abaqus/Optimization/ShapeTask.py | 56 ++- .../Optimization/SingleTermDesignResponse.py | 20 +- src/abaqus/Optimization/SizingClusterAreas.py | 2 +- .../Optimization/SizingCyclicSymmetry.py | 8 +- .../Optimization/SizingPlanarSymmetry.py | 6 +- .../Optimization/SizingPointSymmetry.py | 8 +- .../Optimization/SizingRotationalSymmetry.py | 8 +- src/abaqus/Optimization/SizingTask.py | 12 +- src/abaqus/Optimization/SlideRegionControl.py | 20 +- src/abaqus/Optimization/StampControl.py | 14 +- src/abaqus/Optimization/StepOptionArray.py | 2 + .../Optimization/TopologyCyclicSymmetry.py | 8 +- .../Optimization/TopologyDemoldControl.py | 14 +- .../Optimization/TopologyMillingControl.py | 14 +- .../Optimization/TopologyOverhangControl.py | 10 +- .../Optimization/TopologyPlanarSymmetry.py | 8 +- .../Optimization/TopologyPointSymmetry.py | 8 +- src/abaqus/Optimization/TopologyRibDesign.py | 10 +- .../TopologyRotationalSymmetry.py | 8 +- src/abaqus/Optimization/TopologyTask.py | 62 +-- src/abaqus/Optimization/TurnControl.py | 14 +- src/abaqus/Part/AcisFile.py | 10 +- src/abaqus/Part/AcisMdb.py | 6 +- src/abaqus/Part/PartBase.py | 50 +- src/abaqus/Part/PartFeature.py | 466 +++++++++++------- src/abaqus/PathAndProbe/CurrentProbeValues.py | 6 +- src/abaqus/PathAndProbe/NodeQuery.py | 6 +- src/abaqus/PathAndProbe/Path.py | 6 +- src/abaqus/PathAndProbe/PathSession.py | 2 + src/abaqus/PathAndProbe/ProbeOptions.py | 29 +- src/abaqus/PathAndProbe/ProbeReport.py | 4 +- .../PathAndProbe/SelectedProbeValues.py | 6 +- src/abaqus/PlotOptions/BasicOptions.py | 28 +- src/abaqus/PlotOptions/DGCommonOptions.py | 4 +- src/abaqus/PlotOptions/DGContourOptions.py | 4 +- .../PlotOptions/DGDisplayBodyOptions.py | 4 +- .../PlotOptions/DGSuperimposeOptions.py | 4 +- src/abaqus/PlotOptions/DisplayOptions.py | 8 +- src/abaqus/PlotOptions/FreeBodyOptions.py | 6 +- src/abaqus/PlotOptions/HistoryVariable.py | 4 +- src/abaqus/PlotOptions/MdbData.py | 8 +- src/abaqus/PlotOptions/MdbDataFrameArray.py | 2 + .../PlotOptions/OdbContactDiagnostics.py | 4 +- src/abaqus/PlotOptions/OdbData.py | 38 +- src/abaqus/PlotOptions/OdbDataDatumCsys.py | 4 +- src/abaqus/PlotOptions/OdbDataFrameArray.py | 2 + src/abaqus/PlotOptions/OdbDiagnosticData.py | 8 +- .../PlotOptions/OdbDiagnosticIncrement.py | 4 +- src/abaqus/PlotOptions/OdbDiagnosticStep.py | 6 +- src/abaqus/PlotOptions/ViewCutOptions.py | 22 +- src/abaqus/PredefinedField/Field.py | 34 +- src/abaqus/PredefinedField/FieldState.py | 24 +- src/abaqus/PredefinedField/IMAField.py | 4 +- src/abaqus/PredefinedField/IMARegion.py | 4 +- .../PredefinedField/MaterialAssignment.py | 22 +- src/abaqus/PredefinedField/PorePressure.py | 36 +- .../PredefinedField/PredefinedFieldModel.py | 78 +-- .../PredefinedField/PredefinedFieldState.py | 4 +- src/abaqus/PredefinedField/Saturation.py | 4 +- src/abaqus/PredefinedField/Stress.py | 24 +- src/abaqus/PredefinedField/Temperature.py | 28 +- .../PredefinedField/TemperatureState.py | 26 +- src/abaqus/PredefinedField/VoidsRatio.py | 36 +- src/abaqus/Print/EpsOptions.py | 2 + src/abaqus/Print/PageSetupOptions.py | 2 + src/abaqus/Property/CompositeLayup.py | 18 +- src/abaqus/Property/CompositePly.py | 6 +- src/abaqus/Property/CompositePlyArray.py | 2 + src/abaqus/Property/MaterialOrientation.py | 32 +- .../Property/MaterialOrientationArray.py | 2 + src/abaqus/Property/PropertyPart.py | 14 +- src/abaqus/Property/SectionAssignment.py | 2 +- src/abaqus/Property/SectionAssignmentArray.py | 2 + src/abaqus/Region/Region.py | 30 +- src/abaqus/Region/RegionArray.py | 2 + src/abaqus/Region/RegionAssembly.py | 30 +- src/abaqus/Region/RegionPart.py | 170 ++----- src/abaqus/Region/Set.py | 49 +- src/abaqus/Region/Skin.py | 2 + src/abaqus/Region/Stringer.py | 2 + src/abaqus/Region/Surface.py | 10 +- src/abaqus/Section/BeamSection.py | 38 +- src/abaqus/Section/CohesiveSection.py | 8 +- src/abaqus/Section/CompositeShellSection.py | 25 +- src/abaqus/Section/ConnectorSection.py | 54 +- src/abaqus/Section/GasketSection.py | 2 + src/abaqus/Section/GeneralStiffnessSection.py | 12 +- src/abaqus/Section/GeometryShellSection.py | 12 +- src/abaqus/Section/HomogeneousShellSection.py | 23 +- src/abaqus/Section/HomogeneousSolidSection.py | 6 +- src/abaqus/Section/LayerPropertiesArray.py | 2 + src/abaqus/Section/MembraneSection.py | 6 +- src/abaqus/Section/Section.py | 8 +- src/abaqus/Section/SectionBase.py | 2 +- src/abaqus/Section/SectionLayer.py | 6 +- src/abaqus/Section/SectionLayerArray.py | 2 + src/abaqus/Section/SectionModel.py | 51 +- src/abaqus/Section/SectionOdb.py | 42 +- src/abaqus/Section/ShellSection.py | 4 +- src/abaqus/Section/SurfaceSection.py | 4 +- src/abaqus/Section/TransverseShearBeam.py | 12 +- src/abaqus/Session/Color.py | 4 +- src/abaqus/Session/Drawing.py | 6 +- src/abaqus/Session/JournalOptions.py | 8 +- src/abaqus/Session/SessionBase.py | 60 +-- src/abaqus/Sketcher/ConstrainedSketch.py | 36 +- src/abaqus/Sketcher/ConstrainedSketchBase.py | 12 +- .../AngularDimension.py | 6 +- .../ConstrainedSketchDimensionModel.py | 20 +- .../DistanceDimension.py | 6 +- .../HorizontalDimension.py | 6 +- .../ObliqueDimension.py | 6 +- .../RadialDimension.py | 10 +- .../VerticalDimension.py | 6 +- .../ConstrainedSketchGeometry/Arc3Points.py | 2 + .../ArcByCenterEnds.py | 2 + .../ArcByStartEndTangent.py | 2 + .../CircleByCenterPerimeter.py | 2 + .../ConstrainedSketchGeometry.py | 10 +- .../ConstrainedSketchGeometryArray.py | 6 +- .../ConstrainedSketchGeometryModel.py | 4 +- .../ConstructionCircleByCenterPerimeter.py | 2 + .../ConstructionLine.py | 2 + .../EllipseByCenterPerimeter.py | 2 + .../FilletByRadius.py | 2 + .../ConstrainedSketchGeometry/Line.py | 2 + .../ConstrainedSketchGeometry/Spot.py | 2 + .../getPointAtDistance.py | 2 + .../ConstrainedSketchImageOptions.py | 2 + .../ConstrainedSketchOptions.py | 15 +- .../ConstrainedSketcherOptions.py | 9 +- .../ConstrainedSketchVertex.py | 6 +- .../ConstrainedSketchVertexArray.py | 6 +- .../ConstrainedSketchVertexModel.py | 2 + .../Sketcher/ConstrainedSketchVertex/Spot.py | 2 + src/abaqus/Sketcher/SketchModel.py | 4 +- src/abaqus/Step/AnalysisStep.py | 26 +- src/abaqus/Step/AnnealStep.py | 32 +- src/abaqus/Step/BuckleStep.py | 46 +- src/abaqus/Step/ComplexFrequencyStep.py | 50 +- .../Step/CoupledTempDisplacementStep.py | 50 +- src/abaqus/Step/CoupledThermalElectricStep.py | 44 +- .../CoupledThermalElectricalStructuralStep.py | 50 +- src/abaqus/Step/DirectCyclicStep.py | 44 +- src/abaqus/Step/EmagTimeHarmonicStep.py | 26 +- src/abaqus/Step/ExplicitDynamicsStep.py | 40 +- src/abaqus/Step/FrequencyStep.py | 70 +-- src/abaqus/Step/GeostaticStep.py | 50 +- src/abaqus/Step/HeatTransferStep.py | 52 +- src/abaqus/Step/ImplicitDynamicsStep.py | 52 +- src/abaqus/Step/InitialStep.py | 26 +- src/abaqus/Step/MassDiffusionStep.py | 44 +- src/abaqus/Step/ModalDynamicsStep.py | 46 +- src/abaqus/Step/RandomResponseStep.py | 54 +- src/abaqus/Step/ResponseSpectrumStep.py | 46 +- src/abaqus/Step/SoilsStep.py | 56 +-- .../Step/StaticLinearPerturbationStep.py | 26 +- src/abaqus/Step/StaticRiksStep.py | 54 +- src/abaqus/Step/StaticStep.py | 50 +- src/abaqus/Step/SteadyStateDirectStep.py | 26 +- src/abaqus/Step/SteadyStateModalStep.py | 54 +- src/abaqus/Step/SteadyStateSubspaceStep.py | 26 +- src/abaqus/Step/StepBase.py | 28 +- src/abaqus/Step/StepModel.py | 192 ++++---- src/abaqus/Step/SubspaceDynamicsStep.py | 26 +- src/abaqus/Step/SubstructureGenerateStep.py | 38 +- .../Step/TempDisplacementDynamicsStep.py | 40 +- src/abaqus/Step/ViscoStep.py | 44 +- .../CompositeDampingComponent.py | 6 +- .../CompositeDampingComponentArray.py | 2 + src/abaqus/StepMiscellaneous/Control.py | 2 + .../DirectDampingByFrequencyComponent.py | 6 +- .../DirectDampingByFrequencyComponentArray.py | 2 + .../DirectDampingComponent.py | 8 +- .../DirectDampingComponentArray.py | 2 + .../EmagTimeHarmonicFrequency.py | 8 +- .../EmagTimeHarmonicFrequencyArray.py | 2 + src/abaqus/StepMiscellaneous/MassScaling.py | 18 +- .../StepMiscellaneous/MassScalingArray.py | 2 + .../RandomResponseFrequency.py | 10 +- .../RandomResponseFrequencyArray.py | 2 + .../RayleighDampingByFrequencyComponent.py | 8 +- ...ayleighDampingByFrequencyComponentArray.py | 2 + .../RayleighDampingComponent.py | 10 +- .../RayleighDampingComponentArray.py | 2 + .../ResponseSpectrumComponent.py | 12 +- .../ResponseSpectrumComponentArray.py | 2 + src/abaqus/StepMiscellaneous/SolverControl.py | 2 + .../SteadyStateDirectFrequency.py | 8 +- .../SteadyStateDirectFrequencyArray.py | 2 + .../SteadyStateModalFrequency.py | 8 +- .../SteadyStateModalFrequencyArray.py | 2 + .../SteadyStateSubspaceFrequency.py | 8 +- .../SteadyStateSubspaceFrequencyArray.py | 2 + .../StructuralDampingByFrequencyComponent.py | 6 +- ...ucturalDampingByFrequencyComponentArray.py | 2 + .../StructuralDampingComponent.py | 8 +- .../StructuralDampingComponentArray.py | 2 + .../SubstructureGenerateFrequency.py | 6 +- .../SubstructureGenerateFrequencyArray.py | 2 + .../SubstructureGenerateModes.py | 8 +- .../SubstructureGenerateModesArray.py | 2 + src/abaqus/StepOutput/FieldOutputRequest.py | 15 +- .../StepOutput/FieldOutputRequestState.py | 24 +- src/abaqus/StepOutput/HistoryOutputRequest.py | 28 +- .../StepOutput/HistoryOutputRequestState.py | 22 +- .../StepOutput/IntegratedOutputSection.py | 14 +- src/abaqus/StepOutput/OutputModel.py | 22 +- src/abaqus/TableCollection/DataTableArray.py | 2 + .../TableCollection/ParameterColumnArray.py | 2 + src/abaqus/TableCollection/PropertyTable.py | 10 +- .../TableCollection/PropertyTableData.py | 14 +- src/abaqus/TableCollection/TableCollection.py | 8 +- .../TableCollectionAssembly.py | 4 +- .../TextRepresentation/TextReprOptions.py | 8 +- src/abaqus/TextRepresentation/textRepr.py | 26 +- src/abaqus/UtilityAndView/AbaqusBoolean.py | 31 +- .../UtilityAndView/BackwardCompatibility.py | 4 +- src/abaqus/UtilityAndView/Delete.py | 4 +- src/abaqus/UtilityAndView/Method.py | 6 +- src/abaqus/UtilityAndView/Repository.py | 4 +- src/abaqus/UtilityAndView/Status.py | 2 + src/abaqus/UtilityAndView/SymbolicConstant.py | 41 +- src/abaqus/UtilityAndView/Upgrade.py | 6 +- src/abaqus/UtilityAndView/User.py | 2 + src/abaqus/UtilityAndView/View.py | 42 +- src/abaqus/UtilityAndView/abaqusConstants.py | 2 + src/abaqus/XY/Area.py | 2 + src/abaqus/XY/Axis.py | 10 +- src/abaqus/XY/AxisArray.py | 2 + src/abaqus/XY/AxisData.py | 36 +- src/abaqus/XY/Chart.py | 16 +- src/abaqus/XY/DefaultChartOptions.py | 26 +- src/abaqus/XY/Legend.py | 6 +- src/abaqus/XY/Title.py | 6 +- src/abaqus/XY/XYCurve.py | 8 +- src/abaqus/XY/XYCurveArray.py | 2 + src/abaqus/XY/XYData.py | 124 ++--- src/abaqus/XY/XYPlot.py | 117 ++++- src/abaqus/XY/XYPlotBase.py | 8 +- src/abaqus/XY/XYSession.py | 120 +++-- src/abaqus/XY/XYSessionBase.py | 10 +- src/abaqus/XY/writeXYReport.py | 2 + src/abaqus/_OptionsBase.py | 5 +- src/abaqus/__init__.py | 2 + src/abaqus/builtin.py | 20 +- src/abaqusConstants.py | 2 + src/abqpy/cli.py | 20 +- src/animation.py | 1 + src/annotationToolset.py | 1 + src/assembly.py | 1 + src/caeModules.py | 2 + src/caePrefsAccess.py | 2 + src/calibration.py | 1 + src/connector.py | 1 + src/connectorBehavior.py | 2 + src/customKernel.py | 2 + src/deleteObjectCallback.py | 1 + src/displayGroupMdbToolset.py | 2 + src/displayGroupOdbToolset.py | 2 + src/driverUtils.py | 3 + src/field.py | 1 + src/fields.py | 1 + src/inpParser.py | 2 + src/interaction.py | 1 + src/job.py | 2 + src/load.py | 2 + src/material.py | 2 + src/mesh.py | 2 + src/meshEdit.py | 1 + src/methodCallback.py | 1 + src/monitorManager.py | 1 + src/odbAccess.py | 2 + src/odbConnectorBehavior.py | 2 + src/odbMaterial.py | 1 + src/odbSection.py | 1 + src/optimization.py | 2 + src/part.py | 2 + src/redentABQ.py | 2 + src/regionToolset.py | 2 + src/section.py | 2 + src/sketch.py | 5 +- src/step.py | 2 + src/symbolicConstants.py | 2 + src/textRepr.py | 2 + src/upgradeScript.py | 1 + src/visualization.py | 2 + src/xyPlot.py | 39 +- 759 files changed, 6206 insertions(+), 5538 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fd725923ac..f13a6e6520 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -62,7 +62,7 @@ jobs: run: | sphinx-build -M ${{ matrix.builder }} ${{ env.SPHINXOPTS }} docs/source docs/build/${{ matrix.builder }}/${{ matrix.language }} env: - SPHINXOPTS: -D language=${{ matrix.language }} -j auto -W + SPHINXOPTS: -D language=${{ matrix.language }} -j auto - name: Upload artifacts if: github.event_name != 'pull_request' uses: actions/upload-artifact@v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 645c1be183..4ea85ed944 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,3 +20,9 @@ repos: hooks: - id: isort args: ["--profile", "black"] + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: "v1.5.1" + hooks: + - id: mypy + files: ^src/ diff --git a/docs/Makefile b/docs/Makefile index 9bde455334..6bf2bc2a65 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,7 +3,7 @@ # You can set these variables from the command line, and also # from the environment for the first two. -SPHINXOPTS ?= -j auto -W +SPHINXOPTS ?= -j auto SPHINXBUILD ?= sphinx-build SOURCEDIR = source BUILDDIR = build diff --git a/pyproject.toml b/pyproject.toml index 3d6074a29c..0d214cd99d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ dev = [ "crowdin-api-client", "docformatter", "flake8", + "mypy", "pofmt", "polib", "pre-commit", @@ -109,3 +110,6 @@ wrap-descriptions = 108 blank = false in-place = true black = true + +[tool.mypy] +ignore_missing_imports = true diff --git a/src/ababltin.py b/src/ababltin.py index 43f9af6a9e..6c6977b811 100644 --- a/src/ababltin.py +++ b/src/ababltin.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import re import sys diff --git a/src/abaqus/AbaqusCAEDisplayPreferences/caePrefsAccess.py b/src/abaqus/AbaqusCAEDisplayPreferences/caePrefsAccess.py index 99be0179b1..de058e4be1 100644 --- a/src/abaqus/AbaqusCAEDisplayPreferences/caePrefsAccess.py +++ b/src/abaqus/AbaqusCAEDisplayPreferences/caePrefsAccess.py @@ -1,4 +1,6 @@ -from typing import List, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -34,12 +36,11 @@ def getGuiPrefsFileName() -> str: str A String with the default file name for the GUI preferences file. """ - # TODO: Implement this function - ... + return "" @abaqus_function_doc -def getDisplayNamesInGuiPreferences(fileName: str) -> List[str]: +def getDisplayNamesInGuiPreferences(fileName: str) -> list[str]: """The abaqus_2021.gpr file stores a separate guiPreferences record for each display that you use. This function returns a list of every displayName recorded in the preferences file. @@ -55,11 +56,10 @@ def getDisplayNamesInGuiPreferences(fileName: str) -> List[str]: Returns ------- - List[str] + list[str] A list of Strings of displayNames. """ - # TODO: Implement this function - ... + return [] @abaqus_function_doc @@ -95,8 +95,7 @@ def printValuesList( A String displaying the path, name, and value for all of the options in the object that you select. """ - # TODO: Implement this function - ... + return "" @abaqus_function_doc diff --git a/src/abaqus/Adaptivity/AdaptiveMeshConstraint.py b/src/abaqus/Adaptivity/AdaptiveMeshConstraint.py index 552132e80e..3735efade5 100644 --- a/src/abaqus/Adaptivity/AdaptiveMeshConstraint.py +++ b/src/abaqus/Adaptivity/AdaptiveMeshConstraint.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -29,7 +29,7 @@ class AdaptiveMeshConstraint: #: A SymbolicConstant specifying the category of the adaptive mesh constraint. Possible #: values are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the adaptive mesh constraint is applied. region: Region = Region() @@ -37,7 +37,7 @@ class AdaptiveMeshConstraint: #: None or a DatumCsys object specifying the local coordinate system of the adaptive mesh #: constraint's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[DatumCsys] = None + localCsys: DatumCsys | None = DatumCsys() @abaqus_method_doc def __init__( @@ -45,7 +45,7 @@ def __init__( name: str, category: Literal[C.THERMAL, C.MECHANICAL], region: Region, - localCsys: Optional[DatumCsys] = None, + localCsys: DatumCsys | None = None, ): """The AdaptiveMeshConstraint object is the abstract base type for other Arbitrary Lagrangian Eularian (ALE) style AdaptiveMeshConstraint objects. The AdaptiveMeshConstraint object has no explicit diff --git a/src/abaqus/Adaptivity/AdaptiveMeshConstraintState.py b/src/abaqus/Adaptivity/AdaptiveMeshConstraintState.py index c12f0aa4f5..54bee0234c 100644 --- a/src/abaqus/Adaptivity/AdaptiveMeshConstraintState.py +++ b/src/abaqus/Adaptivity/AdaptiveMeshConstraintState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -24,7 +24,7 @@ class AdaptiveMeshConstraintState: #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the AdaptiveMeshConstraintState #: object. Possible values are: @@ -41,7 +41,7 @@ class AdaptiveMeshConstraintState: #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: adaptive mesh constraint has no amplitude reference. @@ -50,23 +50,22 @@ class AdaptiveMeshConstraintState: @abaqus_method_doc def __init__( self, - amplitudeState: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - status: Optional[ - Literal[ - C.NOT_YET_ACTIVE, - C.PROPAGATED_FROM_BASE_STATE, - C.DEACTIVATED_FROM_BASE_STATE, - C.DEACTIVATED, - C.MODIFIED_FROM_BASE_STATE, - C.PROPAGATED, - C.NO_LONGER_ACTIVE, - C.CREATED, - C.INSTANCE_NOT_APPLICABLE, - C.BUILT_INTO_MODES, - C.TYPE_NOT_APPLICABLE, - C.MODIFIED, - ] - ] = None, + amplitudeState: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + status: Literal[ + C.NOT_YET_ACTIVE, + C.PROPAGATED_FROM_BASE_STATE, + C.DEACTIVATED_FROM_BASE_STATE, + C.DEACTIVATED, + C.MODIFIED_FROM_BASE_STATE, + C.PROPAGATED, + C.NO_LONGER_ACTIVE, + C.CREATED, + C.INSTANCE_NOT_APPLICABLE, + C.BUILT_INTO_MODES, + C.TYPE_NOT_APPLICABLE, + C.MODIFIED, + ] + | None = None, amplitude: str = "", ): """The AdaptiveMeshConstraintState object is the abstract base type for other Arbitrary Lagrangian diff --git a/src/abaqus/Adaptivity/AdaptivityIteration.py b/src/abaqus/Adaptivity/AdaptivityIteration.py index 2100fc1e9a..d3aa47389a 100644 --- a/src/abaqus/Adaptivity/AdaptivityIteration.py +++ b/src/abaqus/Adaptivity/AdaptivityIteration.py @@ -1,11 +1,9 @@ from __future__ import annotations -from typing import Dict - from abqpy.decorators import abaqus_class_doc, abaqus_method_doc -from .ErrorIndicatorResult import ErrorIndicatorResult -from .RuleResult import RuleResult +from .ErrorIndicatorResult import ErrorIndicatorResult as ErrorIndicatorResultType +from .RuleResult import RuleResult as RuleResultType @abaqus_class_doc @@ -23,7 +21,7 @@ class AdaptivityIteration: #: A repository of RuleResult objects specifying the calculated results from sizing #: functions corresponding to the RemeshingRule objects for this iteration of an adaptivity #: process. - ruleResults: Dict[str, RuleResult] = {} + ruleResults: dict[str, RuleResultType] = {} #: An Int specifying the sequence number for this iteration in the adaptivity process. iteration: int @@ -81,7 +79,7 @@ def __init__( ... @abaqus_method_doc - def ErrorIndicatorResult(self, name: str, results: str) -> ErrorIndicatorResult: + def ErrorIndicatorResult(self, name: str, results: str) -> ErrorIndicatorResultType: """This method creates an ErrorIndicatorResult with data for an error indicator variable in a RemeshingRule for a given adaptivity iteration. @@ -108,18 +106,18 @@ def ErrorIndicatorResult(self, name: str, results: str) -> ErrorIndicatorResult: ------ AbaqusException """ - self.ruleResults[name] = ruleResult = ErrorIndicatorResult(name, results) + self.ruleResults[name] = ruleResult = ErrorIndicatorResultType(name, results) return ruleResult @abaqus_method_doc def RuleResult( self, name: str, - indicatorResults: Dict[str, ErrorIndicatorResult], + indicatorResults: dict[str, ErrorIndicatorResultType], numElems: int, minSizeElemCount: int, satisfiedVars: tuple = (), - ) -> RuleResult: + ) -> RuleResultType: """This method creates a RuleResult with data for a RemeshingRule for a given adaptivity iteration. .. note:: @@ -153,7 +151,7 @@ def RuleResult( ------ AbaqusException """ - self.ruleResults[name] = ruleResult = RuleResult( + self.ruleResults[name] = ruleResult = RuleResultType( name, indicatorResults, numElems, minSizeElemCount, satisfiedVars ) return ruleResult diff --git a/src/abaqus/Adaptivity/AdaptivityModel.py b/src/abaqus/Adaptivity/AdaptivityModel.py index 9caff01f21..456b0df0f4 100644 --- a/src/abaqus/Adaptivity/AdaptivityModel.py +++ b/src/abaqus/Adaptivity/AdaptivityModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -65,7 +67,7 @@ def AdaptiveMeshConstraint( name: str, category: Literal[C.THERMAL, C.MECHANICAL], region: Region, - localCsys: Optional[DatumCsys] = None, + localCsys: DatumCsys | None = None, ) -> AdaptiveMeshConstraint: """The AdaptiveMeshConstraint object is the abstract base type for other Arbitrary Lagrangian Eularian (ALE) style AdaptiveMeshConstraint objects. The AdaptiveMeshConstraint object has no explicit @@ -214,7 +216,7 @@ def DisplacementAdaptiveMeshConstraint( ur3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, motionType: Literal[C.USER_DEFINED, C.INDEPENDENT, C.FOLLOW] = INDEPENDENT, - localCsys: Optional[DatumCsys] = None, + localCsys: DatumCsys | None = None, ) -> DisplacementAdaptiveMeshConstraint: """This method creates a DisplacementAdaptiveMeshConstraint object. @@ -310,7 +312,7 @@ def RemeshingRule( specifyMaxSize: Boolean = ON, coarseningFactor: Literal[C.NOT_ALLOWED, C.DEFAULT_LIMIT] = DEFAULT_LIMIT, refinementFactor: Literal[C.NOT_ALLOWED, C.DEFAULT_LIMIT] = DEFAULT_LIMIT, - elementCountLimit: Optional[int] = None, + elementCountLimit: int | None = None, ) -> RemeshingRule: """This method creates a RemeshingRule object. @@ -427,7 +429,7 @@ def VelocityAdaptiveMeshConstraint( vr2: Union[Literal[C.SET, C.UNSET], float] = UNSET, vr3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, - localCsys: Optional[DatumCsys] = None, + localCsys: DatumCsys | None = None, motionType: Literal[C.USER_DEFINED, C.INDEPENDENT, C.FOLLOW] = INDEPENDENT, ) -> VelocityAdaptiveMeshConstraint: """This method creates a VelocityAdaptiveMeshConstraint object. diff --git a/src/abaqus/Adaptivity/AdaptivityProcess.py b/src/abaqus/Adaptivity/AdaptivityProcess.py index 385ccfa68b..ff0b902f24 100644 --- a/src/abaqus/Adaptivity/AdaptivityProcess.py +++ b/src/abaqus/Adaptivity/AdaptivityProcess.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,11 +21,11 @@ class AdaptivityProcess: #: A SymbolicConstant specifying the status of the adaptivity process. Possible values are #: SUBMITTED, RUNNING, ABORTED, TERMINATED, and COMPLETED. - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A repository of AdaptivityIteration objects specifying the AdaptivityIteration objects #: received during running the adaptivity process. - iterations: Dict[int, AdaptivityIteration] = {} + iterations: dict[int, AdaptivityIteration] = {} #: A String specifying the name of the Adaptivity Process. name: str @@ -156,7 +156,7 @@ def AdaptivityIteration( AdaptivityIteration An AdaptivityIteration object. """ - self.iterations[iteration] = iteration = AdaptivityIteration( + self.iterations[iteration] = adaptivityIteration = AdaptivityIteration( iteration, jobName, modelName, odbPath, remeshingErrors ) - return iteration + return adaptivityIteration diff --git a/src/abaqus/Adaptivity/AdaptivityStep.py b/src/abaqus/Adaptivity/AdaptivityStep.py index 4f01df5402..aefcbbe21c 100644 --- a/src/abaqus/Adaptivity/AdaptivityStep.py +++ b/src/abaqus/Adaptivity/AdaptivityStep.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -31,23 +31,22 @@ class AdaptivityStep(StepBase): @abaqus_method_doc def AdaptiveMeshConstraintState( self, - amplitudeState: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - status: Optional[ - Literal[ - C.NOT_YET_ACTIVE, - C.PROPAGATED_FROM_BASE_STATE, - C.DEACTIVATED_FROM_BASE_STATE, - C.DEACTIVATED, - C.MODIFIED_FROM_BASE_STATE, - C.PROPAGATED, - C.NO_LONGER_ACTIVE, - C.CREATED, - C.INSTANCE_NOT_APPLICABLE, - C.BUILT_INTO_MODES, - C.TYPE_NOT_APPLICABLE, - C.MODIFIED, - ] - ] = None, + amplitudeState: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + status: Literal[ + C.NOT_YET_ACTIVE, + C.PROPAGATED_FROM_BASE_STATE, + C.DEACTIVATED_FROM_BASE_STATE, + C.DEACTIVATED, + C.MODIFIED_FROM_BASE_STATE, + C.PROPAGATED, + C.NO_LONGER_ACTIVE, + C.CREATED, + C.INSTANCE_NOT_APPLICABLE, + C.BUILT_INTO_MODES, + C.TYPE_NOT_APPLICABLE, + C.MODIFIED, + ] + | None = None, amplitude: str = "", ) -> AdaptiveMeshConstraintState: """The AdaptiveMeshConstraintState object is the abstract base type for other Arbitrary Lagrangian @@ -98,35 +97,34 @@ def AdaptiveMeshConstraintState( @abaqus_method_doc def DisplacementAdaptiveMeshConstraintState( self, - u1: Optional[float] = None, - u2: Optional[float] = None, - u3: Optional[float] = None, - ur1: Optional[float] = None, - ur2: Optional[float] = None, - ur3: Optional[float] = None, - u1State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - u2State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - u3State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - ur1State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - ur2State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - ur3State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - amplitudeState: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - status: Optional[ - Literal[ - C.NOT_YET_ACTIVE, - C.PROPAGATED_FROM_BASE_STATE, - C.DEACTIVATED_FROM_BASE_STATE, - C.DEACTIVATED, - C.MODIFIED_FROM_BASE_STATE, - C.PROPAGATED, - C.NO_LONGER_ACTIVE, - C.CREATED, - C.INSTANCE_NOT_APPLICABLE, - C.BUILT_INTO_MODES, - C.TYPE_NOT_APPLICABLE, - C.MODIFIED, - ] - ] = None, + u1: float | None = None, + u2: float | None = None, + u3: float | None = None, + ur1: float | None = None, + ur2: float | None = None, + ur3: float | None = None, + u1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + u2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + u3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + ur1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + ur2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + ur3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + amplitudeState: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + status: Literal[ + C.NOT_YET_ACTIVE, + C.PROPAGATED_FROM_BASE_STATE, + C.DEACTIVATED_FROM_BASE_STATE, + C.DEACTIVATED, + C.MODIFIED_FROM_BASE_STATE, + C.PROPAGATED, + C.NO_LONGER_ACTIVE, + C.CREATED, + C.INSTANCE_NOT_APPLICABLE, + C.BUILT_INTO_MODES, + C.TYPE_NOT_APPLICABLE, + C.MODIFIED, + ] + | None = None, amplitude: str = "", ) -> DisplacementAdaptiveMeshConstraintState: """The DisplacementAdaptiveMeshConstraintState object stores the propagating data for an Arbitrary @@ -220,35 +218,34 @@ def DisplacementAdaptiveMeshConstraintState( @abaqus_method_doc def VelocityAdaptiveMeshConstraintState( self, - v1: Optional[float] = None, - v2: Optional[float] = None, - v3: Optional[float] = None, - vr1: Optional[float] = None, - vr2: Optional[float] = None, - vr3: Optional[float] = None, - v1State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - v2State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - v3State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - vr1State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - vr2State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - vr3State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - amplitudeState: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - status: Optional[ - Literal[ - C.NOT_YET_ACTIVE, - C.PROPAGATED_FROM_BASE_STATE, - C.DEACTIVATED_FROM_BASE_STATE, - C.DEACTIVATED, - C.MODIFIED_FROM_BASE_STATE, - C.PROPAGATED, - C.NO_LONGER_ACTIVE, - C.CREATED, - C.INSTANCE_NOT_APPLICABLE, - C.BUILT_INTO_MODES, - C.TYPE_NOT_APPLICABLE, - C.MODIFIED, - ] - ] = None, + v1: float | None = None, + v2: float | None = None, + v3: float | None = None, + vr1: float | None = None, + vr2: float | None = None, + vr3: float | None = None, + v1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + v2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + v3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + vr1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + vr2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + vr3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + amplitudeState: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + status: Literal[ + C.NOT_YET_ACTIVE, + C.PROPAGATED_FROM_BASE_STATE, + C.DEACTIVATED_FROM_BASE_STATE, + C.DEACTIVATED, + C.MODIFIED_FROM_BASE_STATE, + C.PROPAGATED, + C.NO_LONGER_ACTIVE, + C.CREATED, + C.INSTANCE_NOT_APPLICABLE, + C.BUILT_INTO_MODES, + C.TYPE_NOT_APPLICABLE, + C.MODIFIED, + ] + | None = None, amplitude: str = "", ) -> VelocityAdaptiveMeshConstraintState: """The VelocityAdaptiveMeshConstraintState object stores the propagating data for an Arbitrary @@ -318,7 +315,6 @@ def VelocityAdaptiveMeshConstraintState( A String specifying the name of the amplitude reference. The String is empty if the adaptive mesh constraint has no amplitude reference. """ - super().__init__(amplitudeState, status, amplitude) self.adaptiveMeshConstraintStates[ amplitude ] = adaptiveMeshConstraintState = VelocityAdaptiveMeshConstraintState( diff --git a/src/abaqus/Adaptivity/DisplacementAdaptiveMeshConstraint.py b/src/abaqus/Adaptivity/DisplacementAdaptiveMeshConstraint.py index db50e24c91..b13eff1fde 100644 --- a/src/abaqus/Adaptivity/DisplacementAdaptiveMeshConstraint.py +++ b/src/abaqus/Adaptivity/DisplacementAdaptiveMeshConstraint.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -33,7 +35,7 @@ class DisplacementAdaptiveMeshConstraint(AdaptiveMeshConstraint): #: A SymbolicConstant specifying the category of the adaptive mesh constraint. Possible #: values are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the adaptive mesh constraint is applied. region: Region = Region() @@ -41,7 +43,7 @@ class DisplacementAdaptiveMeshConstraint(AdaptiveMeshConstraint): #: None or a DatumCsys object specifying the local coordinate system of the adaptive mesh #: constraint's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: DatumCsys | None = DatumCsys() @abaqus_method_doc def __init__( @@ -57,7 +59,7 @@ def __init__( ur3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, motionType: Literal[C.USER_DEFINED, C.INDEPENDENT, C.FOLLOW] = INDEPENDENT, - localCsys: Optional[DatumCsys] = None, + localCsys: DatumCsys | None = None, ): """This method creates a DisplacementAdaptiveMeshConstraint object. @@ -130,7 +132,7 @@ def setValues( ur3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, motionType: Literal[C.USER_DEFINED, C.INDEPENDENT, C.FOLLOW] = INDEPENDENT, - localCsys: Optional[str] = None, + localCsys: str | None = None, ): """This method modifies the data for an existing DisplacementAdaptiveMeshConstraint object in the step where it is created. diff --git a/src/abaqus/Adaptivity/DisplacementAdaptiveMeshConstraintState.py b/src/abaqus/Adaptivity/DisplacementAdaptiveMeshConstraintState.py index bfc008c888..9eb3edc767 100644 --- a/src/abaqus/Adaptivity/DisplacementAdaptiveMeshConstraintState.py +++ b/src/abaqus/Adaptivity/DisplacementAdaptiveMeshConstraintState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -30,63 +30,63 @@ class DisplacementAdaptiveMeshConstraintState(AdaptiveMeshConstraintState): """ #: A Float or a Complex specifying the displacement component in the 1-direction. - u1: Optional[float] = None + u1: float | None = None #: A Float or a Complex specifying the displacement component in the 2-direction. - u2: Optional[float] = None + u2: float | None = None #: A Float or a Complex specifying the displacement component in the 3-direction. - u3: Optional[float] = None + u3: float | None = None #: A Float or a Complex specifying the rotational displacement component about the #: 1-direction. - ur1: Optional[float] = None + ur1: float | None = None #: A Float or a Complex specifying the rotational displacement component about the #: 2-direction. - ur2: Optional[float] = None + ur2: float | None = None #: A Float or a Complex specifying the rotational displacement component about the #: 3-direction. - ur3: Optional[float] = None + ur3: float | None = None #: A SymbolicConstant specifying the propagation state of the displacement component in the #: 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - u1State: Optional[SymbolicConstant] = None + u1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the displacement component in the #: 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - u2State: Optional[SymbolicConstant] = None + u2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the displacement component in the #: 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - u3State: Optional[SymbolicConstant] = None + u3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational displacement #: component about the 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ur1State: Optional[SymbolicConstant] = None + ur1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational displacement #: component about the 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ur2State: Optional[SymbolicConstant] = None + ur2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational displacement #: component about the 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ur3State: Optional[SymbolicConstant] = None + ur3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the AdaptiveMeshConstraintState #: object. Possible values #: are: NOT_YET_ACTIVE, CREATED, PROPAGATED, MODIFIED, DEACTIVATED, NO_LONGER_ACTIVE, TYPE_NOT_APPLICABLE #: INSTANCE_NOT_APPLICABLE, PROPAGATED_FROM_BASE_STATE, MODIFIED_FROM_BASE_STATE, DEACTIVATED_FROM_BASE_STATE, #: BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: adaptive mesh constraint has no amplitude reference. @@ -95,35 +95,34 @@ class DisplacementAdaptiveMeshConstraintState(AdaptiveMeshConstraintState): @abaqus_method_doc def __init__( self, - u1: Optional[float] = None, - u2: Optional[float] = None, - u3: Optional[float] = None, - ur1: Optional[float] = None, - ur2: Optional[float] = None, - ur3: Optional[float] = None, - u1State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - u2State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - u3State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - ur1State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - ur2State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - ur3State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - amplitudeState: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - status: Optional[ - Literal[ - C.NOT_YET_ACTIVE, - C.PROPAGATED_FROM_BASE_STATE, - C.DEACTIVATED_FROM_BASE_STATE, - C.DEACTIVATED, - C.MODIFIED_FROM_BASE_STATE, - C.PROPAGATED, - C.NO_LONGER_ACTIVE, - C.CREATED, - C.INSTANCE_NOT_APPLICABLE, - C.BUILT_INTO_MODES, - C.TYPE_NOT_APPLICABLE, - C.MODIFIED, - ] - ] = None, + u1: float | None = None, + u2: float | None = None, + u3: float | None = None, + ur1: float | None = None, + ur2: float | None = None, + ur3: float | None = None, + u1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + u2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + u3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + ur1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + ur2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + ur3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + amplitudeState: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + status: Literal[ + C.NOT_YET_ACTIVE, + C.PROPAGATED_FROM_BASE_STATE, + C.DEACTIVATED_FROM_BASE_STATE, + C.DEACTIVATED, + C.MODIFIED_FROM_BASE_STATE, + C.PROPAGATED, + C.NO_LONGER_ACTIVE, + C.CREATED, + C.INSTANCE_NOT_APPLICABLE, + C.BUILT_INTO_MODES, + C.TYPE_NOT_APPLICABLE, + C.MODIFIED, + ] + | None = None, amplitude: str = "", ): """ diff --git a/src/abaqus/Adaptivity/RemeshingRule.py b/src/abaqus/Adaptivity/RemeshingRule.py index 650098fae8..f661bebbf4 100644 --- a/src/abaqus/Adaptivity/RemeshingRule.py +++ b/src/abaqus/Adaptivity/RemeshingRule.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -114,7 +114,7 @@ class RemeshingRule: #: None or an Int specifying an approximate limit on the number of elements that will be #: created during remeshing. Use None to indicate there is not upper limit. The default #: value is None. - elementCountLimit: Optional[int] = None + elementCountLimit: int | None = None @abaqus_method_doc def __init__( @@ -136,7 +136,7 @@ def __init__( specifyMaxSize: Boolean = ON, coarseningFactor: Literal[C.NOT_ALLOWED, C.DEFAULT_LIMIT] = DEFAULT_LIMIT, refinementFactor: Literal[C.NOT_ALLOWED, C.DEFAULT_LIMIT] = DEFAULT_LIMIT, - elementCountLimit: Optional[int] = None, + elementCountLimit: int | None = None, ): """This method creates a RemeshingRule object. @@ -254,7 +254,7 @@ def setValues( specifyMaxSize: Boolean = ON, coarseningFactor: Literal[C.NOT_ALLOWED, C.DEFAULT_LIMIT] = DEFAULT_LIMIT, refinementFactor: Literal[C.NOT_ALLOWED, C.DEFAULT_LIMIT] = DEFAULT_LIMIT, - elementCountLimit: Optional[int] = None, + elementCountLimit: int | None = None, ): """This method modifies the RemeshingRule object. diff --git a/src/abaqus/Adaptivity/RuleResult.py b/src/abaqus/Adaptivity/RuleResult.py index 8882647da8..046d61646d 100644 --- a/src/abaqus/Adaptivity/RuleResult.py +++ b/src/abaqus/Adaptivity/RuleResult.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -25,7 +25,7 @@ class RuleResult: #: A repository of ErrorIndicatorResult objects specifying the calculated results from the #: sizing function corresponding to the error indicator variables for the Remeshing Rule. - indicatorResults: Dict[str, ErrorIndicatorResult] + indicatorResults: dict[str, ErrorIndicatorResult] #: An Int specifying the number of elements before remeshing in the region of the Remeshing #: Rule. @@ -43,7 +43,7 @@ class RuleResult: def __init__( self, name: str, - indicatorResults: Dict[str, ErrorIndicatorResult], + indicatorResults: dict[str, ErrorIndicatorResult], numElems: int, minSizeElemCount: int, satisfiedVars: tuple = (), diff --git a/src/abaqus/Adaptivity/VelocityAdaptiveMeshConstraint.py b/src/abaqus/Adaptivity/VelocityAdaptiveMeshConstraint.py index f3ab56b9ab..bec54e2a42 100644 --- a/src/abaqus/Adaptivity/VelocityAdaptiveMeshConstraint.py +++ b/src/abaqus/Adaptivity/VelocityAdaptiveMeshConstraint.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -6,17 +8,8 @@ from ..Datum.DatumCsys import DatumCsys from ..Region.Region import Region -from ..UtilityAndView.abaqusConstants import ( - FOLLOW, - FREED, - INDEPENDENT, - MECHANICAL, - SET, - THERMAL, - UNCHANGED, - UNSET, - USER_DEFINED, -) +from ..UtilityAndView.abaqusConstants import INDEPENDENT, MECHANICAL, UNSET +from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .AdaptiveMeshConstraint import AdaptiveMeshConstraint @@ -38,7 +31,7 @@ class VelocityAdaptiveMeshConstraint(AdaptiveMeshConstraint): #: A SymbolicConstant specifying the category of the adaptive mesh constraint. Possible #: values are MECHANICAL and THERMAL. - category: Optional[Literal[MECHANICAL, THERMAL]] = None + category: Literal[C.MECHANICAL, C.THERMAL] #: A Region object specifying the region to which the adaptive mesh constraint is applied. region: Region = Region() @@ -46,7 +39,7 @@ class VelocityAdaptiveMeshConstraint(AdaptiveMeshConstraint): #: None or a DatumCsys object specifying the local coordinate system of the adaptive mesh #: constraint's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[DatumCsys] = None + localCsys: DatumCsys | None = DatumCsys() @abaqus_method_doc def __init__( @@ -54,15 +47,15 @@ def __init__( name: str, createStepName: str, region: Region, - v1: Union[float, Literal[SET, UNSET]] = UNSET, - v2: Union[float, Literal[SET, UNSET]] = UNSET, - v3: Union[float, Literal[SET, UNSET]] = UNSET, - vr1: Union[float, Literal[SET, UNSET]] = UNSET, - vr2: Union[float, Literal[SET, UNSET]] = UNSET, - vr3: Union[float, Literal[SET, UNSET]] = UNSET, - amplitude: Union[str, Literal[UNSET]] = UNSET, - localCsys: Optional[DatumCsys] = None, - motionType: Literal[INDEPENDENT, FOLLOW, USER_DEFINED] = INDEPENDENT, + v1: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + v2: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + v3: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + vr1: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + vr2: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + vr3: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + amplitude: Union[str, Literal[C.UNSET]] = UNSET, + localCsys: DatumCsys | None = None, + motionType: Literal[C.INDEPENDENT, C.FOLLOW, C.USER_DEFINED] = INDEPENDENT, ): """This method creates a VelocityAdaptiveMeshConstraint object. @@ -127,15 +120,15 @@ def __init__( @abaqus_method_doc def setValues( self, - v1: Union[float, Literal[SET, UNSET]] = UNSET, - v2: Union[float, Literal[SET, UNSET]] = UNSET, - v3: Union[float, Literal[SET, UNSET]] = UNSET, - vr1: Union[float, Literal[SET, UNSET]] = UNSET, - vr2: Union[float, Literal[SET, UNSET]] = UNSET, - vr3: Union[float, Literal[SET, UNSET]] = UNSET, - amplitude: Union[str, Literal[UNSET]] = UNSET, - localCsys: Optional[DatumCsys] = None, - motionType: Literal[INDEPENDENT, FOLLOW, USER_DEFINED] = INDEPENDENT, + v1: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + v2: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + v3: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + vr1: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + vr2: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + vr3: Union[float, Literal[C.SET, C.UNSET]] = UNSET, + amplitude: Union[str, Literal[C.UNSET]] = UNSET, + localCsys: DatumCsys | None = None, + motionType: Literal[C.INDEPENDENT, C.FOLLOW, C.USER_DEFINED] = INDEPENDENT, ): """This method modifies the data for an existing VelocityAdaptiveMeshConstraint object in the step where it is created. @@ -185,13 +178,13 @@ def setValues( def setValuesInStep( self, stepName: str, - v1: Union[float, Literal[SET, UNSET]] = ..., - v2: Union[float, Literal[SET, UNSET]] = ..., - v3: Union[float, Literal[SET, UNSET]] = ..., - vr1: Union[float, Literal[SET, UNSET]] = ..., - vr2: Union[float, Literal[SET, UNSET]] = ..., - vr3: Union[float, Literal[SET, UNSET]] = ..., - amplitude: Union[str, Literal[UNCHANGED, FREED]] = ..., + v1: Union[float, Literal[C.SET, C.UNSET]] = C.UNSET, + v2: Union[float, Literal[C.SET, C.UNSET]] = C.UNSET, + v3: Union[float, Literal[C.SET, C.UNSET]] = C.UNSET, + vr1: Union[float, Literal[C.SET, C.UNSET]] = C.UNSET, + vr2: Union[float, Literal[C.SET, C.UNSET]] = C.UNSET, + vr3: Union[float, Literal[C.SET, C.UNSET]] = C.UNSET, + amplitude: Union[str, Literal[C.UNCHANGED, C.FREED]] = C.UNCHANGED, ): """This method modifies the propagating data for an existing VelocityAdaptiveMeshConstraint object in the specified step. diff --git a/src/abaqus/Adaptivity/VelocityAdaptiveMeshConstraintState.py b/src/abaqus/Adaptivity/VelocityAdaptiveMeshConstraintState.py index bde9882b65..471b1d370f 100644 --- a/src/abaqus/Adaptivity/VelocityAdaptiveMeshConstraintState.py +++ b/src/abaqus/Adaptivity/VelocityAdaptiveMeshConstraintState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -30,57 +30,57 @@ class VelocityAdaptiveMeshConstraintState(AdaptiveMeshConstraintState): """ #: A Float specifying the velocity component in the 1-direction. - v1: Optional[float] = None + v1: float | None = None #: A Float specifying the velocity component in the 2-direction. - v2: Optional[float] = None + v2: float | None = None #: A Float specifying the velocity component in the 3-direction. - v3: Optional[float] = None + v3: float | None = None #: A Float specifying the rotational velocity component about the 1-direction. - vr1: Optional[float] = None + vr1: float | None = None #: A Float specifying the rotational velocity component about the 2-direction. - vr2: Optional[float] = None + vr2: float | None = None #: A Float specifying the rotational velocity component about the 3-direction. - vr3: Optional[float] = None + vr3: float | None = None #: A SymbolicConstant specifying the propagation state of the velocity component in the #: 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - v1State: Optional[SymbolicConstant] = None + v1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the velocity component in the #: 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - v2State: Optional[SymbolicConstant] = None + v2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the velocity component in the #: 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - v3State: Optional[SymbolicConstant] = None + v3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational velocity component #: about the 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - vr1State: Optional[SymbolicConstant] = None + vr1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational velocity component #: about the 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - vr2State: Optional[SymbolicConstant] = None + vr2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational velocity component #: about the 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - vr3State: Optional[SymbolicConstant] = None + vr3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the AdaptiveMeshConstraintState #: object. Possible values #: are: NOT_YET_ACTIVE, CREATED, PROPAGATED, MODIFIED, DEACTIVATED, NO_LONGER_ACTIVE, TYPE_NOT_APPLICABLE #: INSTANCE_NOT_APPLICABLE, PROPAGATED_FROM_BASE_STATE, MODIFIED_FROM_BASE_STATE, DEACTIVATED_FROM_BASE_STATE, #: BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: adaptive mesh constraint has no amplitude reference. @@ -89,35 +89,34 @@ class VelocityAdaptiveMeshConstraintState(AdaptiveMeshConstraintState): @abaqus_method_doc def __init__( self, - v1: Optional[float] = None, - v2: Optional[float] = None, - v3: Optional[float] = None, - vr1: Optional[float] = None, - vr2: Optional[float] = None, - vr3: Optional[float] = None, - v1State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - v2State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - v3State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - vr1State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - vr2State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - vr3State: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - amplitudeState: Optional[Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED]] = None, - status: Optional[ - Literal[ - C.NOT_YET_ACTIVE, - C.PROPAGATED_FROM_BASE_STATE, - C.DEACTIVATED_FROM_BASE_STATE, - C.DEACTIVATED, - C.MODIFIED_FROM_BASE_STATE, - C.PROPAGATED, - C.NO_LONGER_ACTIVE, - C.CREATED, - C.INSTANCE_NOT_APPLICABLE, - C.BUILT_INTO_MODES, - C.TYPE_NOT_APPLICABLE, - C.MODIFIED, - ] - ] = None, + v1: float | None = None, + v2: float | None = None, + v3: float | None = None, + vr1: float | None = None, + vr2: float | None = None, + vr3: float | None = None, + v1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + v2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + v3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + vr1State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + vr2State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + vr3State: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + amplitudeState: Literal[C.UNSET, C.SET, C.FREED, C.UNCHANGED, C.MODIFIED] | None = None, + status: Literal[ + C.NOT_YET_ACTIVE, + C.PROPAGATED_FROM_BASE_STATE, + C.DEACTIVATED_FROM_BASE_STATE, + C.DEACTIVATED, + C.MODIFIED_FROM_BASE_STATE, + C.PROPAGATED, + C.NO_LONGER_ACTIVE, + C.CREATED, + C.INSTANCE_NOT_APPLICABLE, + C.BUILT_INTO_MODES, + C.TYPE_NOT_APPLICABLE, + C.MODIFIED, + ] + | None = None, amplitude: str = "", ): """The VelocityAdaptiveMeshConstraintState object stores the propagating data for an Arbitrary diff --git a/src/abaqus/Amplitude/AmplitudeModel.py b/src/abaqus/Amplitude/AmplitudeModel.py index 6ce7927869..4e2cb5828e 100644 --- a/src/abaqus/Amplitude/AmplitudeModel.py +++ b/src/abaqus/Amplitude/AmplitudeModel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence, Union from typing_extensions import Literal @@ -13,7 +15,6 @@ OFF, SOLVER_DEFAULT, STEP, - TOTAL, Boolean, ) from ..UtilityAndView.abaqusConstants import abaqusConstants as C @@ -40,7 +41,7 @@ class AmplitudeModel(ModelBase): """ @abaqus_method_doc - def ActuatorAmplitude(self, name: str, timeSpan: Literal[STEP, TOTAL] = STEP) -> ActuatorAmplitude: + def ActuatorAmplitude(self, name: str, timeSpan: Literal[C.STEP, C.TOTAL] = STEP) -> ActuatorAmplitude: """This method creates a ActuatorAmplitude object. .. note:: @@ -78,7 +79,7 @@ def DecayAmplitude( maximum: float, start: float, decayTime: float, - timeSpan: Literal[STEP, TOTAL] = STEP, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, ) -> DecayAmplitude: """This method creates a DecayAmplitude object. @@ -124,8 +125,8 @@ def EquallySpacedAmplitude( fixedInterval: float, data: tuple, begin: float = 0, - smooth: Union[Literal[SOLVER_DEFAULT], float] = SOLVER_DEFAULT, - timeSpan: Literal[STEP, TOTAL] = STEP, + smooth: Union[Literal[C.SOLVER_DEFAULT], float] = SOLVER_DEFAULT, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, ) -> EquallySpacedAmplitude: """This method creates an EquallySpacedAmplitude object. @@ -178,7 +179,7 @@ def ModulatedAmplitude( start: float, frequency1: float, frequency2: float, - timeSpan: Literal[STEP, TOTAL] = STEP, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, ) -> ModulatedAmplitude: """This method creates a ModulatedAmplitude object. @@ -231,7 +232,7 @@ def PeriodicAmplitude( start: float, a_0: float, data: tuple, - timeSpan: Literal[STEP, TOTAL] = STEP, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, ) -> PeriodicAmplitude: """This method creates a PeriodicAmplitude object. @@ -279,7 +280,7 @@ def PsdDefinition( referenceGravityAcceleration: float = 1, referenecePower: float = 0, user: Boolean = OFF, - timeSpan: Literal[STEP, TOTAL] = STEP, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, amplitude: str = "", ) -> PsdDefinition: """This method creates a PsdDefinition object. @@ -343,7 +344,9 @@ def PsdDefinition( return amplitud @abaqus_method_doc - def SmoothStepAmplitude(self, name: str, data: tuple, timeSpan: Literal[STEP, TOTAL] = STEP) -> SmoothStepAmplitude: + def SmoothStepAmplitude( + self, name: str, data: tuple, timeSpan: Literal[C.STEP, C.TOTAL] = STEP + ) -> SmoothStepAmplitude: """This method creates a SmoothStepAmplitude object. .. note:: @@ -383,7 +386,7 @@ def SolutionDependentAmplitude( initial: float = 1, minimum: float = 0, maximum: float = 1000, - timeSpan: Literal[STEP, TOTAL] = STEP, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, ) -> SolutionDependentAmplitude: """This method creates a SolutionDependentAmplitude object. @@ -437,7 +440,7 @@ def SpectrumAmplitude( timeIncrement: float = 0, gravity: float = 1, criticalDamping: Boolean = OFF, - timeSpan: Literal[STEP, TOTAL] = STEP, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, amplitude: str = "", ) -> SpectrumAmplitude: """This method creates a SpectrumAmplitude object. @@ -519,8 +522,8 @@ def TabularAmplitude( self, name: str, data: Sequence[Sequence[float]], - smooth: Union[Literal[SOLVER_DEFAULT], float] = SOLVER_DEFAULT, - timeSpan: Literal[STEP, TOTAL] = STEP, + smooth: Union[Literal[C.SOLVER_DEFAULT], float] = SOLVER_DEFAULT, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, ) -> TabularAmplitude: """This method creates a TabularAmplitude object. diff --git a/src/abaqus/Amplitude/AmplitudeOdb.py b/src/abaqus/Amplitude/AmplitudeOdb.py index 62f784f815..ad4a729701 100644 --- a/src/abaqus/Amplitude/AmplitudeOdb.py +++ b/src/abaqus/Amplitude/AmplitudeOdb.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Amplitude/Correlation.py b/src/abaqus/Amplitude/Correlation.py index b58bcaf8a3..96306512ee 100644 --- a/src/abaqus/Amplitude/Correlation.py +++ b/src/abaqus/Amplitude/Correlation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -29,7 +29,7 @@ class Correlation(Amplitude): #: A tuple of tuples of Floats specifying the real and imaginary part of the scaling #: factor. If **approach** = MOVING_NOISE, then **data** represents the noise velocity components #: 1, 2, and 3. - data: Optional[float] = None + data: float | None = None #: A SymbolicConstant specifying the time span of the amplitude. Possible values are STEP #: and TOTAL. The default value is STEP. diff --git a/src/abaqus/Amplitude/EquallySpacedAmplitude.py b/src/abaqus/Amplitude/EquallySpacedAmplitude.py index b419e877bc..9e5d4417fb 100644 --- a/src/abaqus/Amplitude/EquallySpacedAmplitude.py +++ b/src/abaqus/Amplitude/EquallySpacedAmplitude.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Amplitude/TabularAmplitude.py b/src/abaqus/Amplitude/TabularAmplitude.py index 3f0da954d7..bc719d40cc 100644 --- a/src/abaqus/Amplitude/TabularAmplitude.py +++ b/src/abaqus/Amplitude/TabularAmplitude.py @@ -1,10 +1,13 @@ +from __future__ import annotations + from typing import Sequence, Union from typing_extensions import Literal from abqpy.decorators import abaqus_class_doc, abaqus_method_doc -from ..UtilityAndView.abaqusConstants import SOLVER_DEFAULT, STEP, TOTAL +from ..UtilityAndView.abaqusConstants import SOLVER_DEFAULT, STEP +from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .Amplitude import Amplitude from .BaselineCorrection import BaselineCorrection @@ -41,19 +44,19 @@ class TabularAmplitude(Amplitude): #: Possible float values are between 0 and 0.5. If **smooth** = SOLVER_DEFAULT, the default #: degree of smoothing will be determined by the solver. The default value is #: SOLVER_DEFAULT. - smooth: Union[Literal[SOLVER_DEFAULT], float] = SOLVER_DEFAULT + smooth: Union[Literal[C.SOLVER_DEFAULT], float] = SOLVER_DEFAULT #: A SymbolicConstant specifying the time span of the amplitude. Possible values are STEP #: and TOTAL. The default value is STEP. - timeSpan: Literal[STEP, TOTAL] = STEP + timeSpan: Literal[C.STEP, C.TOTAL] = STEP @abaqus_method_doc def __init__( self, name: str, data: Sequence[Sequence[float]], - smooth: Union[Literal[SOLVER_DEFAULT], float] = SOLVER_DEFAULT, - timeSpan: Literal[STEP, TOTAL] = STEP, + smooth: Union[Literal[C.SOLVER_DEFAULT], float] = SOLVER_DEFAULT, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, ): """This method creates a TabularAmplitude object. @@ -94,8 +97,8 @@ def __init__( @abaqus_method_doc def setValues( self, - smooth: Union[Literal[SOLVER_DEFAULT], float] = SOLVER_DEFAULT, - timeSpan: Literal[STEP, TOTAL] = STEP, + smooth: Union[Literal[C.SOLVER_DEFAULT], float] = SOLVER_DEFAULT, + timeSpan: Literal[C.STEP, C.TOTAL] = STEP, ): """This method modifies the TabularAmplitude object. diff --git a/src/abaqus/Animation/AVIOptions.py b/src/abaqus/Animation/AVIOptions.py index 072087c3f9..fa84038ae4 100644 --- a/src/abaqus/Animation/AVIOptions.py +++ b/src/abaqus/Animation/AVIOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -35,7 +35,7 @@ class AVIOptions(_OptionsBase): #: An Int specifying the quality of the compression as a percentage when the #: **compressionMethod** is set to CODEC. - compressionQuality: Optional[int] = None + compressionQuality: int | None = None #: A String specifying the system specific options defining the CODEC when the #: **compressionMethod** is set to CODEC. @@ -50,16 +50,16 @@ class AVIOptions(_OptionsBase): #: **sizeDefinition** = USER_DEFINED. Possible values are Ints in the range (*minWidth*, #: **minHeight**) ≤ (width, height) ≤ (*maxWidth*, **maxHeight**). The default value is the #: screen size. - imageSize: Optional[int] = None + imageSize: int | None = None @abaqus_method_doc def setValues( self, compressionMethod: Literal[C.CODEC, C.RLE8, C.RAW32, C.AVI, C.RAW8] = RLE8, - compressionQuality: Optional[int] = None, + compressionQuality: int | None = None, codecOptions: str = "", sizeDefinition: Literal[C.USER_DEFINED, C.SIZE_ON_SCREEN] = SIZE_ON_SCREEN, - imageSize: Optional[int] = None, + imageSize: int | None = None, ): """This method modifies the AVIOptions object. diff --git a/src/abaqus/Animation/AnimationController.py b/src/abaqus/Animation/AnimationController.py index 012dd29a50..84b61fb018 100644 --- a/src/abaqus/Animation/AnimationController.py +++ b/src/abaqus/Animation/AnimationController.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -67,7 +67,7 @@ def decrementFrame(self): ... @abaqus_method_doc - def showFrame(self, frame: Optional[int] = None, value: Optional[float] = None): + def showFrame(self, frame: int | None = None, value: float | None = None): """This method renders the specified frame of the animation. Parameters diff --git a/src/abaqus/Animation/AnimationOptions.py b/src/abaqus/Animation/AnimationOptions.py index fd175bc508..d5031ecc62 100644 --- a/src/abaqus/Animation/AnimationOptions.py +++ b/src/abaqus/Animation/AnimationOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -59,7 +59,7 @@ class AnimationOptions(_OptionsBase): #: A Float specifying the maximum time for time based time history animation when #: **maxTimeAutoCompute** = False. - maxTime: Optional[float] = None + maxTime: float | None = None #: A Boolean specifying whether the animation maximum time value should be computed from #: the active frames when **timeHistoryMode** is set to TIME_BASED. The default value is ON. @@ -68,11 +68,11 @@ class AnimationOptions(_OptionsBase): #: A Float specifying the maximum time when **timeHistoryMode** is set to TIME_BASED and the #: **maxTimeAutoCompute** value is True. This value is computed as the maximum time of all #: active frames displayed in viewports where the animation is active. - maxTimeAutoValue: Optional[float] = None + maxTimeAutoValue: float | None = None #: A Float specifying the minimum time for time based time history animation when #: **minTimeAutoCompute** = False. - minTime: Optional[float] = None + minTime: float | None = None #: A Boolean specifying whether the animation minimum time value should be computed from #: the active frames when **timeHistoryMode** is set to TIME_BASED. The default value is ON. @@ -81,11 +81,11 @@ class AnimationOptions(_OptionsBase): #: A Float specifying the minimum time when **timeHistoryMode** is set to TIME_BASED and the #: **minTimeAutoCompute** value is True. This value is computed as the minimum time of all #: active frames displayed in viewports where the animation is active. - minTimeAutoValue: Optional[float] = None + minTimeAutoValue: float | None = None #: A Float specifying the time increment for frame selection when **timeHistoryMode** is set #: to TIME_BASED. - timeIncrement: Optional[float] = None + timeIncrement: float | None = None #: A Boolean specifying whether to use the highlight method to draw the time tracker line #: and symbols. The default value is ON. @@ -146,11 +146,11 @@ def setValues( relativeScaling: Literal[C.HARMONIC, C.SCALE_FACTOR, C.HALF_CYCLE, C.FULL_CYCLE] = HALF_CYCLE, numScaleFactorFrames: int = 7, timeHistoryMode: Literal[C.FRAME_BASED, C.TIME_BASED] = FRAME_BASED, - maxTime: Optional[float] = None, + maxTime: float | None = None, maxTimeAutoCompute: Boolean = ON, - minTime: Optional[float] = None, + minTime: float | None = None, minTimeAutoCompute: Boolean = ON, - timeIncrement: Optional[float] = None, + timeIncrement: float | None = None, xyUseHighlightMethod: Boolean = ON, xyShowLine: Boolean = ON, xyLineStyle: Literal[C.DASHED, C.SOLID, C.DOT_DASH, C.DOTTED] = SOLID, diff --git a/src/abaqus/Animation/AnimationSession.py b/src/abaqus/Animation/AnimationSession.py index 6b7fe60e0e..c1c7d2feb0 100644 --- a/src/abaqus/Animation/AnimationSession.py +++ b/src/abaqus/Animation/AnimationSession.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -49,9 +51,9 @@ def Movie( name: str, fileName: str, startFrame: int = 0, - endFrame: Optional[int] = None, + endFrame: int | None = None, timelineStartFrame: int = 0, - timelineEndFrame: Optional[int] = None, + timelineEndFrame: int | None = None, timelineStartTime: float = 0, timelineEndTime: Union[Literal[C.END_FRAME_TIME], float] = END_FRAME_TIME, ) -> Movie: diff --git a/src/abaqus/Animation/ImageAnimationOptions.py b/src/abaqus/Animation/ImageAnimationOptions.py index bbc15f5b62..41923c870e 100644 --- a/src/abaqus/Animation/ImageAnimationOptions.py +++ b/src/abaqus/Animation/ImageAnimationOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -22,7 +22,7 @@ class ImageAnimationOptions(_OptionsBase): #: An Int specifying the frame rate to record on the saved animation file. The effective #: frame rate in frames per second will be obtained by dividing the given frame rate by the #: time scale. - frameRate: Optional[int] = None + frameRate: int | None = None #: An Int specifying the time scale to apply to the frame rate. vpDecorations: Boolean = ON @@ -36,8 +36,8 @@ class ImageAnimationOptions(_OptionsBase): @abaqus_method_doc def setValues( self, - frameRate: Optional[int] = None, - timeScale: Optional[int] = None, + frameRate: int | None = None, + timeScale: int | None = None, vpDecorations: Boolean = ON, vpBackground: Boolean = OFF, compass: Boolean = OFF, diff --git a/src/abaqus/Animation/Movie.py b/src/abaqus/Animation/Movie.py index b351abdeee..bd2a0eaf3a 100644 --- a/src/abaqus/Animation/Movie.py +++ b/src/abaqus/Animation/Movie.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -22,19 +24,19 @@ class Movie(_OptionsBase): """ #: An Int specifying the width of the movie in pixels. - width: Optional[int] = None + width: int | None = None #: An Int specifying the height of the movie in pixels. - height: Optional[int] = None + height: int | None = None #: An Int specifying the total number of frames on the movie file. - numFrames: Optional[int] = None + numFrames: int | None = None #: A Float specifying the duration of the movie in seconds. - duration: Optional[float] = None + duration: float | None = None #: An Int specifying the memory taken by the movie frames as selected. - memory: Optional[int] = None + memory: int | None = None #: A String specifying the repository name for the movie. name: str @@ -49,7 +51,7 @@ class Movie(_OptionsBase): #: An Int specifying the last frame to be displayed from this movie. A negative number will #: indicate reverse numbering: -1 is the last frame of the movie. The default value is −1. - endFrame: Optional[int] = None + endFrame: int | None = None #: An Int specifying the global timeline frame number that corresponds to **startFrame**. A #: value of 0 will indicate the first frame to be displayed in the viewport. The default @@ -59,7 +61,7 @@ class Movie(_OptionsBase): #: An Int specifying the global timeline frame number that corresponds to **endFrame**. A #: negative number will indicate reverse numbering: -1 indicates the last frame to be #: displayed in the viewport. The default value is −1. - timelineEndFrame: Optional[int] = None + timelineEndFrame: int | None = None #: A Float specifying the global timeline time that corresponds to the time of #: **startFrame**. The default value is 0.0. @@ -76,9 +78,9 @@ def __init__( name: str, fileName: str, startFrame: int = 0, - endFrame: Optional[int] = None, + endFrame: int | None = None, timelineStartFrame: int = 0, - timelineEndFrame: Optional[int] = None, + timelineEndFrame: int | None = None, timelineStartTime: float = 0, timelineEndTime: Union[Literal[C.END_FRAME_TIME], float] = END_FRAME_TIME, ): @@ -145,9 +147,9 @@ def __init__( def setValues( self, startFrame: int = 0, - endFrame: Optional[int] = None, + endFrame: int | None = None, timelineStartFrame: int = 0, - timelineEndFrame: Optional[int] = None, + timelineEndFrame: int | None = None, timelineStartTime: float = 0, timelineEndTime: Union[Literal[C.END_FRAME_TIME], float] = END_FRAME_TIME, ): diff --git a/src/abaqus/Animation/QuickTimeOptions.py b/src/abaqus/Animation/QuickTimeOptions.py index 1cd16572db..7496bcbaf8 100644 --- a/src/abaqus/Animation/QuickTimeOptions.py +++ b/src/abaqus/Animation/QuickTimeOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -45,14 +45,14 @@ class QuickTimeOptions(_OptionsBase): #: resolution.The minimum width and height are normally < 50 pixels. The values of the maximum #: width (*maxWidth*) and height (*maxHeight*) depend on the graphics capabilities of the system. #: The maximum width and height will be at least as large as the screen dimensions. - imageSize: Optional[int] = None + imageSize: int | None = None @abaqus_method_doc def setValues( self, compressionMethod: Literal[C.RLE24, C.RAW24] = RLE24, sizeDefinition: Literal[C.USER_DEFINED, C.SIZE_ON_SCREEN] = SIZE_ON_SCREEN, - imageSize: Optional[int] = None, + imageSize: int | None = None, ): """This method modifies the QuickTimeOptions object. diff --git a/src/abaqus/Annotation/AnimationUserData.py b/src/abaqus/Annotation/AnimationUserData.py index 2297942310..1ca11fe21f 100644 --- a/src/abaqus/Annotation/AnimationUserData.py +++ b/src/abaqus/Annotation/AnimationUserData.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence, Union from typing_extensions import Literal diff --git a/src/abaqus/Annotation/Annotation.py b/src/abaqus/Annotation/Annotation.py index 113623c3bb..0d78c6426e 100644 --- a/src/abaqus/Annotation/Annotation.py +++ b/src/abaqus/Annotation/Annotation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -70,7 +70,7 @@ def moveAfter(self, name: str): ... @abaqus_method_doc - def translate(self, x: Optional[float] = None, y: Optional[float] = None): + def translate(self, x: float | None = None, y: float | None = None): """This method translates the Annotation object on the viewport plane. Parameters diff --git a/src/abaqus/Annotation/Arrow.py b/src/abaqus/Annotation/Arrow.py index 78c208b4f0..a12bae039d 100644 --- a/src/abaqus/Annotation/Arrow.py +++ b/src/abaqus/Annotation/Arrow.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -310,7 +312,7 @@ def __init__( self.lineThickness = lineThickness @abaqus_method_doc - def translateStartPoint(self, x: Optional[float] = None, y: Optional[float] = None): + def translateStartPoint(self, x: float | None = None, y: float | None = None): """This method translates the start point of the Arrow object on the viewport plane. Parameters @@ -324,7 +326,7 @@ def translateStartPoint(self, x: Optional[float] = None, y: Optional[float] = No ... @abaqus_method_doc - def translateEndPoint(self, x: Optional[float] = None, y: Optional[float] = None): + def translateEndPoint(self, x: float | None = None, y: float | None = None): """This method translates the end point of the Arrow object on the viewport plane. Parameters diff --git a/src/abaqus/Annotation/Text.py b/src/abaqus/Annotation/Text.py index 745d4429c6..aa8dc1dbdd 100644 --- a/src/abaqus/Annotation/Text.py +++ b/src/abaqus/Annotation/Text.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -32,10 +34,10 @@ class Text(Annotation, _OptionsBase): """ #: A Float specifying the width in millimeters of the Text object. - width: Optional[float] = None + width: float | None = None #: A Float specifying the height in millimeters of the Text object. - height: Optional[float] = None + height: float | None = None #: A String specifying the annotation repository key. name: str diff --git a/src/abaqus/Assembly/Assembly.py b/src/abaqus/Assembly/Assembly.py index 00b25cc848..d0323ed51c 100644 --- a/src/abaqus/Assembly/Assembly.py +++ b/src/abaqus/Assembly/Assembly.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -32,11 +32,11 @@ class Assembly(MeshEditAssembly, MeshAssembly, PropertyAssembly, RegionAssembly, def ConnectorOrientation( self, region: Set, - localCsys1: Optional[DatumCsys] = None, + localCsys1: DatumCsys | None = None, axis1: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle1: float = 0, orient2sameAs1: Boolean = ON, - localCsys2: Optional[DatumCsys] = None, + localCsys2: DatumCsys | None = None, axis2: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle2: float = 0, ) -> ConnectorOrientation: diff --git a/src/abaqus/Assembly/AssemblyBase.py b/src/abaqus/Assembly/AssemblyBase.py index f155535de5..d54fd17974 100644 --- a/src/abaqus/Assembly/AssemblyBase.py +++ b/src/abaqus/Assembly/AssemblyBase.py @@ -1,4 +1,6 @@ -from typing import Dict, List, Optional, Sequence, Tuple, Union, overload +from __future__ import annotations + +from typing import Sequence, Union, overload from typing_extensions import Literal @@ -33,6 +35,7 @@ OFF, ON, SUPPRESS, + THREE_D, Boolean, ) from ..UtilityAndView.abaqusConstants import abaqusConstants as C @@ -57,13 +60,13 @@ class AssemblyBase(AssemblyFeature): #: An Int specifying that feature parameters have been modified but that the assembly has #: not been regenerated. Possible values are 0 and 1. - isOutOfDate: Optional[int] = None + isOutOfDate: int | None = None #: A Float specifying which gives an indication when the assembly was last modified. - timeStamp: Optional[float] = None + timeStamp: float | None = None #: An Int specifying whether the assembly is locked or not. Possible values are 0 and 1. - isLocked: Optional[int] = None + isLocked: int | None = None #: A Boolean specifying whether the positioning constraints in the assembly should be #: regenerated together before regenerating other assembly features. The default value is @@ -88,57 +91,57 @@ class AssemblyBase(AssemblyFeature): nodes: MeshNodeArray = MeshNodeArray([]) #: A repository of PartInstance objects. - instances: Dict[str, PartInstance] = {} + instances: dict[str, PartInstance] = {} #: A repository of Datum objects specifying all Datum objects in the assembly. - datums: List[Datum] = [] + datums: list[Datum] = [] #: A repository of Feature objects specifying all Feature objects in the assembly. - features: Dict[str, AssemblyFeature] = {} + features: dict[str, AssemblyFeature] = {} #: A repository of Feature objects specifying all Feature objects in the assembly.The #: Feature objects in the featuresById repository are the same as the Feature objects in #: the features repository. However, the key to the objects in the featuresById repository #: is an integer specifying the **ID**, whereas the key to the objects in the features #: repository is a string specifying the **name**. - featuresById: Dict[str, AssemblyFeature] = {} + featuresById: dict[str, AssemblyFeature] = {} #: A repository of Surface objects specifying for more information, see [Region #: commands](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-m-RegPyc-sb.htm?ContextScope=all). - surfaces: Dict[str, Surface] = {} + surfaces: dict[str, Surface] = {} #: A repository of Surface objects specifying for more information, see [Region #: commands](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-m-RegPyc-sb.htm?ContextScope=all). - allSurfaces: Dict[str, Surface] = {} + allSurfaces: dict[str, Surface] = {} #: A repository of Surface objects specifying picked regions. - allInternalSurfaces: Dict[str, Surface] = {} + allInternalSurfaces: dict[str, Surface] = {} #: A repository of Set objects. - sets: Dict[str, Set] = {} + sets: dict[str, Set] = {} #: A repository of Set objects specifying for more information, see [Region #: commands](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-m-RegPyc-sb.htm?ContextScope=all). - allSets: Dict[str, Set] = {} + allSets: dict[str, Set] = {} #: A repository of Set objects specifying picked regions. - allInternalSets: Dict[str, Set] = {} + allInternalSets: dict[str, Set] = {} #: A repository of Skin objects specifying the skins created on the assembly. - skins: Dict[str, Skin] = {} + skins: dict[str, Skin] = {} #: A repository of Stringer objects specifying the stringers created on the assembly. - stringers: Dict[str, Stringer] = {} + stringers: dict[str, Stringer] = {} #: A repository of ReferencePoint objects. - referencePoints: Dict[str, ReferencePoint] = {} + referencePoints: dict[str, ReferencePoint] = {} #: A repository of ModelInstance objects. - modelInstances: Dict[str, ModelInstance] = {} + modelInstances: dict[str, ModelInstance] = {} #: A PartInstance object specifying the PartInstances and A ModelInstance object specifying #: the ModelInstances. - allInstances: Dict[str, Union[PartInstance, ModelInstance]] = {} + allInstances: dict[str, Union[PartInstance, ModelInstance]] = {} #: An EngineeringFeature object. engineeringFeatures: EngineeringFeature = EngineeringFeature() @@ -276,7 +279,7 @@ def InstanceFromBooleanCut( PartInstance A PartInstance object. """ - return PartInstance(name, Part()) + return PartInstance(name, Part("", THREE_D)) @abaqus_method_doc def InstanceFromBooleanMerge( @@ -287,7 +290,7 @@ def InstanceFromBooleanMerge( originalInstances: Literal[C.SUPPRESS, C.DELETE] = SUPPRESS, domain: Literal[C.MESH, C.BOTH, C.GEOMETRY] = GEOMETRY, mergeNodes: Literal[C.MESH, C.ALL, C.BOUNDARY_ONLY, C.NONE] = BOUNDARY_ONLY, - nodeMergingTolerance: Optional[float] = None, + nodeMergingTolerance: float | None = None, removeDuplicateElements: Boolean = True, ): """This method creates a PartInstance in the instances repository after merging two or more part @@ -334,7 +337,7 @@ def InstanceFromBooleanMerge( PartInstance A PartInstance object. """ - return PartInstance(name, Part()) + return PartInstance(name, Part("", THREE_D)) @abaqus_method_doc def LinearInstancePattern( @@ -383,7 +386,7 @@ def LinearInstancePattern( Sequence[PartInstance] A sequence of PartInstance objects. """ - return [PartInstance(name, Part()) for name in instanceList] + return [PartInstance(name, Part("", THREE_D)) for name in instanceList] @abaqus_method_doc def RadialInstancePattern( @@ -427,7 +430,7 @@ def RadialInstancePattern( Sequence[PartInstance] A sequence of PartInstance objects. """ - return [PartInstance(name, Part()) for name in instanceList] + return [PartInstance(name, Part("", THREE_D)) for name in instanceList] @abaqus_method_doc def backup(self): @@ -492,7 +495,7 @@ def getMassProperties( specifyThickness: Boolean = False, thickness: str = "", miAboutCenterOfMass: Boolean = True, - miAboutPoint: Tuple[float, float, float] = ..., + miAboutPoint: tuple[float, float, float] = ..., ): """This method returns the mass properties of the assembly, or instances or regions. Only beams, trusses, shells, solids, point, nonstructural mass, and rotary inertia elements are supported. @@ -650,7 +653,7 @@ def getCoordinates(self, entity: str, csys: DatumCsys = DatumCsys()): Returns ------- - Tuple[float, float] + tuple[float, float] A tuple of three Floats representing the coordinates of the specified point. """ ... @@ -868,7 +871,7 @@ def projectReferencesOntoSketch( self, sketch: ConstrainedSketch, filter: Literal[C.ALL_EDGES, C.COPLANAR_EDGES] = ALL_EDGES, - upToFeature: Optional[AssemblyFeature] = None, + upToFeature: AssemblyFeature | None = None, edges: Sequence[Edge] = (), vertices: Sequence[Vertex] = (), ): @@ -1040,7 +1043,7 @@ def unlinkInstances(self, instances: Sequence[PartInstance]): ... @abaqus_method_doc - def writeAcisFile(self, fileName: str, version: Optional[float] = None): + def writeAcisFile(self, fileName: str, version: float | None = None): """This method exports the assembly to a named file in ACIS part (SAT) or assembly (ASAT) format. Parameters @@ -1094,8 +1097,8 @@ def unlock(self): def setMeshNumberingControl( self, instances: Sequence[PartInstance], - startNodeLabel: Optional[int] = None, - startElemLabel: Optional[int] = None, + startNodeLabel: int | None = None, + startElemLabel: int | None = None, ): """This method changes the start node and/or element labels on the specified independent part instances before or after Abaqus/CAE generates the meshes. For the meshed instances, Abaqus/CAE changes the node @@ -1118,7 +1121,7 @@ def copyMeshPattern( elements: Sequence[MeshElement] = (), faces: Sequence[Face] = (), elemFaces: Sequence[MeshFace] = (), - targetFace: Optional[MeshFace] = None, + targetFace: MeshFace | None = None, nodes: Sequence[MeshNode] = (), coordinates: tuple = (), ): diff --git a/src/abaqus/Assembly/AssemblyFeature.py b/src/abaqus/Assembly/AssemblyFeature.py index cc28118f0b..6262d7ebbc 100644 --- a/src/abaqus/Assembly/AssemblyFeature.py +++ b/src/abaqus/Assembly/AssemblyFeature.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -35,8 +37,8 @@ def AttachmentLines( targetFaces: Sequence[Face], targetElementFaces: Sequence[MeshFace], projectionMethod: SymbolicConstant = PROJECT_BY_PROXIMITY, - projectionDirStartPt: Optional[float] = None, - projectionDirEndPt: Optional[float] = None, + projectionDirStartPt: float | None = None, + projectionDirEndPt: float | None = None, sourceToTargetProjMethod: SymbolicConstant = PROJECT_BY_NUMBER, numProjections: str = "", projectionDistance: str = "", diff --git a/src/abaqus/Assembly/AssemblyModel.py b/src/abaqus/Assembly/AssemblyModel.py index b4c76cb420..ea3aff8160 100644 --- a/src/abaqus/Assembly/AssemblyModel.py +++ b/src/abaqus/Assembly/AssemblyModel.py @@ -60,7 +60,7 @@ def convertAllSketches(self, regenerate: Boolean = True, convertReversedSketches Returns ------- - List[str] + list[str] A list of strings describing any warnings or errors encountered during the conversion process. """ @@ -80,7 +80,7 @@ def linkInstances(self, instancesMap: tuple): Returns ------- - List[str] + list[str] A list of strings describing any warnings or errors encountered during the conversion process. """ diff --git a/src/abaqus/Assembly/ConnectorOrientation.py b/src/abaqus/Assembly/ConnectorOrientation.py index 52e62e292d..b1227aa342 100644 --- a/src/abaqus/Assembly/ConnectorOrientation.py +++ b/src/abaqus/Assembly/ConnectorOrientation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -23,21 +23,12 @@ class ConnectorOrientation: session.odbs[name].rootAssembly.connectorOrientations[i] """ - region: Set - localCsys1: DatumCsys = DatumCsys() - axis1: SymbolicConstant = (AXIS_1,) - angle1: float = 0 - orient2sameAs1: Boolean = ON - localCsys2: DatumCsys = DatumCsys() - axis2: SymbolicConstant = AXIS_1 - angle2: float = 0 - #: A Set object specifying the region to which the orientation is assigned. region: Set #: A DatumCsys object specifying the local coordinate system of the first connector point. #: This value may be None, indicating the global coordinate system. - localCsys1: Optional[DatumCsys] = None + localCsys1: DatumCsys | None = DatumCsys() #: A SymbolicConstant specifying the axis of a datum coordinate system about which an #: additional rotation is applied. Possible values are AXIS_1, AXIS_2, and AXIS_3. The @@ -53,7 +44,7 @@ class ConnectorOrientation: #: A DatumCsys object specifying the local coordinate system of the second connector point. #: This value may be None, indicating the global coordinate system. - localCsys2: Optional[DatumCsys] = None + localCsys2: DatumCsys | None = DatumCsys() #: A SymbolicConstant specifying the axis of a datum coordinate system about which an #: additional rotation is applied. Possible values are AXIS_1, AXIS_2, and AXIS_3. The @@ -67,11 +58,11 @@ class ConnectorOrientation: def __init__( self, region: Set, - localCsys1: Optional[DatumCsys] = None, + localCsys1: DatumCsys | None = None, axis1: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle1: float = 0, orient2sameAs1: Boolean = ON, - localCsys2: Optional[DatumCsys] = None, + localCsys2: DatumCsys | None = None, axis2: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle2: float = 0, ): diff --git a/src/abaqus/Assembly/ConnectorOrientationArray.py b/src/abaqus/Assembly/ConnectorOrientationArray.py index f6a82e68eb..b47bce8478 100644 --- a/src/abaqus/Assembly/ConnectorOrientationArray.py +++ b/src/abaqus/Assembly/ConnectorOrientationArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .ConnectorOrientation import ConnectorOrientation diff --git a/src/abaqus/Assembly/ModelInstance.py b/src/abaqus/Assembly/ModelInstance.py index 8975f190fa..79b7da37bc 100644 --- a/src/abaqus/Assembly/ModelInstance.py +++ b/src/abaqus/Assembly/ModelInstance.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -32,12 +32,12 @@ class ModelInstance: #: A repository of Set objects specifying the sets created on the assembly. For more #: information, see [Region #: commands](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-m-RegPyc-sb.htm?ContextScope=all). - sets: Dict[str, Set] = {} + sets: dict[str, Set] = {} #: A repository of Surface objects specifying the surfaces created on the assembly. For #: more information, see [Region #: commands](https://help.3ds.com/2022/english/DSSIMULIA_Established/SIMACAEKERRefMap/simaker-m-RegPyc-sb.htm?ContextScope=all). - surfaces: Dict[str, Surface] = {} + surfaces: dict[str, Surface] = {} #: A VertexArray object. vertices: VertexArray = VertexArray([]) @@ -52,10 +52,10 @@ class ModelInstance: nodes: MeshNodeArray = MeshNodeArray([]) #: A repository of Datum objects. - datums: Dict[str, Datum] = {} + datums: dict[str, Datum] = {} #: A repository of ReferencePoint objects. - referencePoints: Dict[str, ReferencePoint] = {} + referencePoints: dict[str, ReferencePoint] = {} @abaqus_method_doc def __init__(self, name: str, model: Model, autoOffset: Boolean = OFF): diff --git a/src/abaqus/Assembly/PartInstance.py b/src/abaqus/Assembly/PartInstance.py index 89ce90cb71..4f2e1e5ba6 100644 --- a/src/abaqus/Assembly/PartInstance.py +++ b/src/abaqus/Assembly/PartInstance.py @@ -1,6 +1,6 @@ -from typing import Dict, List, Optional, Sequence, Tuple +from __future__ import annotations -from typing_extensions import Literal +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -23,15 +23,7 @@ from ..Region.Skin import Skin from ..Region.Stringer import Stringer from ..Region.Surface import Surface -from ..UtilityAndView.abaqusConstants import ( - BOUNDARY_ONLY, - GEOMETRY, - OFF, - SUPPRESS, - Boolean, - SymbolicConstant, -) -from ..UtilityAndView.abaqusConstants import abaqusConstants as C +from ..UtilityAndView.abaqusConstants import OFF, Boolean, SymbolicConstant @abaqus_class_doc @@ -66,42 +58,42 @@ class PartInstance: #: A SymbolicConstant specifying the part type. Possible values are DEFORMABLE_BODY, #: EULERIAN, DISCRETE_RIGID_SURFACE, and ANALYTIC_RIGID_SURFACE. - analysisType: Optional[SymbolicConstant] = None + analysisType: SymbolicConstant #: An Int specifying the reference node number. This member is valid only if #: **analysisType** = DISCRETE_RIGID_SURFACE or ANALYTIC_RIGID_SURFACE. - referenceNode: Optional[int] = None + referenceNode: int | None = None #: A Part object specifying the instanced part. - part: Optional[Part] = None + part: Part | None = None #: A repository of Set objects specifying the sets created on the part. For more #: information, see Region commands. - sets: Dict[str, Set] = {} + sets: dict[str, Set] = {} #: A repository of Surface objects specifying the surfaces created on the part. For more #: information, see Region commands. - surfaces: Dict[str, Surface] = {} + surfaces: dict[str, Surface] = {} #: A repository of Skin objects specifying the skins created on the part. For more #: information, see Region commands. - skins: Dict[str, Skin] = {} + skins: dict[str, Skin] = {} #: A repository of Stringer objects specifying the stringers created on the part. For more #: information, see Region commands. - stringers: Dict[str, Stringer] = {} + stringers: dict[str, Stringer] = {} #: A VertexArray object. vertices: VertexArray = VertexArray([]) #: An IgnoredVertexArray object. - ignoredVertices: IgnoredVertexArray = [] + ignoredVertices: IgnoredVertexArray = IgnoredVertexArray([]) #: An EdgeArray object. edges: EdgeArray = EdgeArray([]) #: An IgnoredEdgeArray object. - ignoredEdges: IgnoredEdgeArray = [] + ignoredEdges: IgnoredEdgeArray = IgnoredEdgeArray([]) #: A FaceArray object. faces: FaceArray = FaceArray([]) @@ -110,7 +102,7 @@ class PartInstance: cells: CellArray = CellArray([]) #: A repository of Datum objects. - datums: List[Datum] = [] + datums: list[Datum] = [] #: A MeshElementArray object. elements: MeshElementArray = MeshElementArray([]) @@ -122,7 +114,7 @@ class PartInstance: #: For a given element and a given face index within that element, the corresponding #: MeshFace object can be retrieved from the repository by using the key calculated as # (i*8 + j), where i and j are zero-based element and face indices, respectively. - elemFaces: Dict[str, MeshFace] = {} + elemFaces: dict[str, MeshFace] = {} #: A MeshFaceArray object. elementFaces: MeshFaceArray = MeshFaceArray([]) @@ -132,13 +124,13 @@ class PartInstance: #: corresponding MeshEdge object can be retrieved from the repository by using the key #: calculated as (i*32 + j*4 + k), where i, j, and k are zero-based element, face, and edge #: indices, respectively. - elemEdges: Dict[str, MeshEdge] = {} + elemEdges: dict[str, MeshEdge] = {} #: A MeshEdgeArray object. elementEdges: MeshEdgeArray = MeshEdgeArray([]) #: A repository of ReferencePoint objects. - referencePoints: Dict[str, ReferencePoint] = {} + referencePoints: dict[str, ReferencePoint] = {} #: A String specifying the name of the part from which the instance was created. partName: str = "" @@ -189,7 +181,7 @@ def __init__(self, name: str, part: Part, autoOffset: Boolean = OFF, dependent: self.elementEdges = part.elementEdges @abaqus_method_doc - def checkGeometry(self, detailed: Boolean = OFF, level: Optional[int] = None): + def checkGeometry(self, detailed: Boolean = OFF, level: int | None = None): """This method checks the validity of the geometry of the part instance and prints a count of all topological entities on the part instance (faces, edges, vertices, etc.). @@ -276,16 +268,16 @@ def getRotation(self): ... @abaqus_method_doc - def getTranslation(self) -> Tuple[float, float, float]: + def getTranslation(self) -> tuple[float, float, float]: """This method returns a tuple of three Floats representing translation in the **X**, **Y**, and **Z** directions. Returns ------- - Tuple[float, float, float] + tuple[float, float, float] A tuple of three Floats representing the translation. """ - ... + return (0.0, 0.0, 0.0) @abaqus_method_doc def replace(self, instanceOf: Part, applyConstraints: Boolean = True): diff --git a/src/abaqus/Assembly/PartInstanceArray.py b/src/abaqus/Assembly/PartInstanceArray.py index d5969ce422..ba34e44a28 100644 --- a/src/abaqus/Assembly/PartInstanceArray.py +++ b/src/abaqus/Assembly/PartInstanceArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .PartInstance import PartInstance diff --git a/src/abaqus/BasicGeometry/Cell.py b/src/abaqus/BasicGeometry/Cell.py index d9c6031d8e..62adb3eb3b 100644 --- a/src/abaqus/BasicGeometry/Cell.py +++ b/src/abaqus/BasicGeometry/Cell.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -29,7 +29,7 @@ class Cell: """ #: An Int specifying the index of the cell in the CellArray. - index: Optional[int] = None + index: int | None = None #: A Boolean specifying whether the cell belongs to the reference representation of the #: Part or Instance. @@ -37,14 +37,14 @@ class Cell: #: A tuple of Floats specifying the **X**, **Y**, and **Z** coordinates of a point located on #: the cell. - pointOn: Optional[float] = None + pointOn: float | None = None #: A tuple of Floats specifying the name of the feature that created this cell. - featureName: Optional[float] = None + featureName: float | None = None #: A tuple of Floats specifying the name of the part instance for this cell (if #: applicable). - instanceName: Optional[float] = None + instanceName: float | None = None @abaqus_method_doc def getSize(self, printResults: Boolean = True): @@ -136,7 +136,7 @@ def getCADAttributes(self): Returns ------- - List[str] + list[str] An array of String. """ ... diff --git a/src/abaqus/BasicGeometry/CellArray.py b/src/abaqus/BasicGeometry/CellArray.py index 1a717b990c..d6128d863b 100644 --- a/src/abaqus/BasicGeometry/CellArray.py +++ b/src/abaqus/BasicGeometry/CellArray.py @@ -1,11 +1,12 @@ from __future__ import annotations -from typing import Dict, List, Sequence, Tuple, Union, overload +from typing import List, Sequence, Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..UtilityAndView.abaqusConstants import Boolean from .Cell import Cell +from .Face import Face from .FaceArray import FaceArray @@ -33,7 +34,7 @@ class CellArray(List[Cell]): """ @abaqus_method_doc - def __init__(self, cells: List[Cell]) -> None: + def __init__(self, cells: list[Cell]) -> None: """This method creates a CellArray object. .. note:: @@ -57,31 +58,31 @@ def __init__(self, cells: List[Cell]) -> None: @abaqus_method_doc def findAt( self, - coordinates: Tuple[float, float, float], + coordinates: tuple[float, float, float], printWarning: Boolean = True, - ) -> Cell: + ) -> Cell: # type: ignore ... @overload @abaqus_method_doc def findAt( self, - coordinates: Tuple[Tuple[float, float, float],], + coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[Cell]: + ) -> list[Cell]: # type: ignore ... @overload @abaqus_method_doc def findAt( self, - *coordinates: Tuple[Tuple[float, float, float],], + *coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[Cell]: + ) -> list[Cell]: # type: ignore ... @abaqus_method_doc - def findAt(self, *args, **kwargs) -> Union[Cell, List[Cell]]: + def findAt(self, *args, **kwargs) -> Union[Cell, list[Cell]]: # type: ignore """This method returns the object or objects in the CellArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any entity that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is @@ -129,20 +130,20 @@ def getExteriorFaces(self) -> FaceArray: FaceArray A FaceArray object representing the faces on the exterior of the cells. """ - ... + return FaceArray([Face()]) @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: str) -> Cell: + def getSequenceFromMask(self, mask: str) -> Cell: # type: ignore ... @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: Sequence[str]) -> List[Cell]: + def getSequenceFromMask(self, mask: Sequence[str]) -> list[Cell]: # type: ignore ... @abaqus_method_doc - def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[Cell, List[Cell]]: + def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[Cell, list[Cell]]: # type: ignore """This method returns the object or objects in the CellArray identified using the specified **mask**. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When large number of objects are involved, this method is highly efficient. @@ -162,7 +163,7 @@ def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[Cell, Li Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return Cell() if isinstance(mask, str) else [Cell()] @abaqus_method_doc def getMask(self) -> str: @@ -173,17 +174,17 @@ def getMask(self) -> str: str A String specifying the object or objects. """ - ... + return "" @abaqus_method_doc def getByBoundingBox( self, - xMin: float = ..., - yMin: float = ..., - zMin: float = ..., - xMax: float = ..., - yMax: float = ..., - zMax: float = ..., + xMin: float = 0, + yMin: float = 0, + zMin: float = 0, + xMax: float = 0, + yMax: float = 0, + zMax: float = 0, ) -> CellArray: """This method returns an array of cell objects that lie within the specified bounding box. @@ -207,13 +208,13 @@ def getByBoundingBox( CellArray A CellArray object, which is a sequence of Cell objects. """ - ... + return CellArray([Cell()]) @abaqus_method_doc def getByBoundingCylinder( self, - center1: Tuple[float, float, float], - center2: Tuple[float, float, float], + center1: tuple[float, float, float], + center2: tuple[float, float, float], radius: float, ) -> CellArray: """This method returns an array of cell objects that lie within the specified bounding cylinder. @@ -234,10 +235,10 @@ def getByBoundingCylinder( CellArray A CellArray object, which is a sequence of Cell objects. """ - ... + return CellArray([Cell()]) @abaqus_method_doc - def getByBoundingSphere(self, center: Tuple[float, float, float], radius: float) -> CellArray: + def getByBoundingSphere(self, center: tuple[float, float, float], radius: float) -> CellArray: """This method returns an array of cell objects that lie within the specified bounding sphere. Parameters @@ -252,16 +253,16 @@ def getByBoundingSphere(self, center: Tuple[float, float, float], radius: float) CellArray A CellArray object, which is a sequence of Cell objects. """ - ... + return CellArray([Cell()]) @abaqus_method_doc - def getBoundingBox(self) -> Dict[str, Tuple[float, float, float]]: + def getBoundingBox(self) -> dict[str, tuple[float, float, float]]: """This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the cell sequence. Returns ------- - Dict[str, Tuple[float, float, float]] + dict[str, tuple[float, float, float]] A Dictionary object with the following items: - **low**: a tuple of three floats representing the minimum **X** -, **Y** -, and **Z** -boundary @@ -269,4 +270,4 @@ def getBoundingBox(self) -> Dict[str, Tuple[float, float, float]]: - **high**: a tuple of three floats representing the maximum **X** -, **Y** -, and **Z** -boundary values of the bounding box. """ - ... + return {"low": (0.0, 0.0, 0.0), "high": (0.0, 0.0, 0.0)} diff --git a/src/abaqus/BasicGeometry/Edge.py b/src/abaqus/BasicGeometry/Edge.py index 6a38ea3034..65b2c91d62 100644 --- a/src/abaqus/BasicGeometry/Edge.py +++ b/src/abaqus/BasicGeometry/Edge.py @@ -1,9 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Dict, Optional, Tuple +from typing import TYPE_CHECKING from abqpy.decorators import abaqus_class_doc, abaqus_method_doc +from ..Mesh.MeshElement import MeshElement +from ..Mesh.MeshNode import MeshNode from ..UtilityAndView.abaqusConstants import OFF, Boolean if TYPE_CHECKING: # to avoid circular imports @@ -47,7 +49,7 @@ class Edge: """ #: An Int specifying the index of the edge in the EdgeArray. - index: Optional[int] = None + index: int | None = None #: A Boolean specifying whether the edge belongs to the reference representation of the #: Part or Instance. @@ -55,14 +57,14 @@ class Edge: #: A tuple of Floats specifying the **X**, **Y**, and **Z** coordinates of a point located on #: the edge. - pointOn: Optional[float] = None + pointOn: float | None = None #: A tuple of Floats specifying the name of the feature that created this edge. - featureName: Optional[float] = None + featureName: float | None = None #: A tuple of Floats specifying the name of the part instance for this edge (if #: applicable). - instanceName: Optional[float] = None + instanceName: float | None = None @abaqus_method_doc def isTangentFlipped(self) -> Boolean: @@ -74,10 +76,10 @@ def isTangentFlipped(self) -> Boolean: Boolean A Boolean value of True if the tangent is flipped and False if not. """ - ... + return True @abaqus_method_doc - def getCurvature(self, parameter: float, point: Tuple[float, float, float]) -> Dict: + def getCurvature(self, parameter: float, point: tuple[float, float, float]) -> dict[str, float]: """This method returns curvature information at a location on the edge. Parameters @@ -102,18 +104,18 @@ def getCurvature(self, parameter: float, point: Tuple[float, float, float]) -> D ------ The given edge is straight """ - ... + return {"evaluationPoint": 0.0, "curvature": 0.0, "radius": 0.0, "tangent": 0.0} @abaqus_method_doc - def getFaces(self) -> Tuple[int]: + def getFaces(self) -> tuple[int]: """This method returns a sequence consisting of the face ids of the faces which share this edge. Returns ------- - Tuple[int] + tuple[int] A tuple of integers. """ - ... + return (0,) @abaqus_method_doc def getAdjacentEdges(self) -> EdgeArray: @@ -124,7 +126,7 @@ def getAdjacentEdges(self) -> EdgeArray: EdgeArray An EdgeArray object, which is a sequence of Edge objects. """ - ... + return EdgeArray([Edge()]) @abaqus_method_doc def getEdgesByEdgeAngle(self, angle: str) -> EdgeArray: @@ -141,7 +143,7 @@ def getEdgesByEdgeAngle(self, angle: str) -> EdgeArray: EdgeArray An EdgeArray object, which is a sequence of Edgeobjects. """ - ... + return EdgeArray([Edge()]) @abaqus_method_doc def getNodes(self) -> MeshNodeArray: @@ -152,7 +154,7 @@ def getNodes(self) -> MeshNodeArray: MeshNodeArray A MeshNodeArray object, which is a sequence of MeshNode objects. """ - ... + return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))]) @abaqus_method_doc def getElements(self) -> MeshElementArray: @@ -163,7 +165,7 @@ def getElements(self) -> MeshElementArray: MeshElementArray A MeshElementArray object which is a sequence of MeshElement objects. """ - ... + return MeshElementArray([MeshElement()]) @abaqus_method_doc def getRadius(self) -> float: @@ -178,7 +180,7 @@ def getRadius(self) -> float: ------ The given edges is not circular """ - ... + return 0.0 @abaqus_method_doc def getSize(self, printResults: bool = True) -> float: @@ -194,10 +196,10 @@ def getSize(self, printResults: bool = True) -> float: float A Float. """ - ... + return 0.0 @abaqus_method_doc - def getVertices(self) -> Tuple[int]: + def getVertices(self) -> tuple[int]: """This method returns a sequence of indices of the vertices that bound this edge. The first index refers to the vertex where the normalized curve parameter = 0.0, and the second index refers to the vertex where the normalized curve parameter = 1.0. If the @@ -205,8 +207,8 @@ def getVertices(self) -> Tuple[int]: Returns ------- - Tuple[int] + tuple[int] A tuple of integers. """ - ... + return (0,) diff --git a/src/abaqus/BasicGeometry/EdgeArray.py b/src/abaqus/BasicGeometry/EdgeArray.py index 0059a4d09e..de442a01ac 100644 --- a/src/abaqus/BasicGeometry/EdgeArray.py +++ b/src/abaqus/BasicGeometry/EdgeArray.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Sequence, Tuple, Union, overload +from typing import List, Sequence, Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -44,7 +44,7 @@ class EdgeArray(List[Edge]): """ @abaqus_method_doc - def __init__(self, edges: List[Edge]) -> None: + def __init__(self, edges: list[Edge]) -> None: """This method creates an EdgeArray object. .. note:: @@ -68,7 +68,7 @@ def __init__(self, edges: List[Edge]) -> None: @abaqus_method_doc def findAt( self, - coordinates: Tuple[float, float, float], + coordinates: tuple[float, float, float], printWarning: Boolean = True, ) -> Edge: ... @@ -77,22 +77,22 @@ def findAt( @abaqus_method_doc def findAt( self, - coordinates: Tuple[Tuple[float, float, float],], + coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[Edge]: + ) -> list[Edge]: ... @overload @abaqus_method_doc def findAt( self, - *coordinates: Tuple[Tuple[float, float, float],], + *coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[Edge]: + ) -> list[Edge]: ... @abaqus_method_doc - def findAt(self, *args, **kwargs) -> Union[Edge, List[Edge]]: + def findAt(self, *args, **kwargs) -> Union[Edge, list[Edge]]: """This method returns the object or objects in the EdgeArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any edge that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is found, findAt @@ -130,7 +130,9 @@ def findAt(self, *args, **kwargs) -> Union[Edge, List[Edge]]: return Edge() if isinstance(first_arg[0], float) else [Edge()] @abaqus_method_doc - def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> Dict: + def getClosest( + self, coordinates: tuple, searchTolerance: str = "" + ) -> dict[int, tuple[Edge, tuple[float, float, float]]]: """This method returns an object or objects in the EdgeArray closest to the given set of points, where the given points need not lie on the edges in the EdgeArray. @@ -160,20 +162,20 @@ def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> Dict: specifies the **X**, **Y**, and **Z** location of the closest point on the Edge to the given point. See program listing above. """ - ... + return {0: (Edge(), (0.0, 0.0, 0.0))} @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: str) -> Edge: + def getSequenceFromMask(self, mask: str) -> Edge: # type: ignore ... @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: Sequence[str]) -> List[Edge]: + def getSequenceFromMask(self, mask: Sequence[str]) -> list[Edge]: # type: ignore ... @abaqus_method_doc - def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[Edge, List[Edge]]: + def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[Edge, list[Edge]]: # type: ignore """This method returns the object or objects in the EdgeArray identified using the specified **mask**. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When a large number of objects are involved, this method is highly efficient. @@ -193,7 +195,7 @@ def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[Edge, Li Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return Edge() if isinstance(mask, str) else [Edge()] @abaqus_method_doc def getMask(self): @@ -204,17 +206,17 @@ def getMask(self): str A String specifying the object or objects. """ - ... + return "" @abaqus_method_doc def getByBoundingBox( self, - xMin: float = ..., - yMin: float = ..., - zMin: float = ..., - xMax: float = ..., - yMax: float = ..., - zMax: float = ..., + xMin: float = 0, + yMin: float = 0, + zMin: float = 0, + xMax: float = 0, + yMax: float = 0, + zMax: float = 0, ) -> EdgeArray: """This method returns an array of edge objects that lie within the specified bounding box. @@ -238,13 +240,13 @@ def getByBoundingBox( EdgeArray An EdgeArray object, which is a sequence of Edge objects. """ - ... + return EdgeArray([Edge()]) @abaqus_method_doc def getByBoundingCylinder( self, - center1: Tuple[float, float, float], - center2: Tuple[float, float, float], + center1: tuple[float, float, float], + center2: tuple[float, float, float], radius: float, ) -> EdgeArray: """This method returns an array of edge objects that lie within the specified bounding cylinder. @@ -265,14 +267,14 @@ def getByBoundingCylinder( EdgeArray An EdgeArray object, which is a sequence of Edge objects. """ - ... + return EdgeArray([Edge()]) @abaqus_method_doc def getByBoundingSphere( self, - center: Tuple[float, float, float], + center: tuple[float, float, float], radius: float, - ) -> Dict[str, Tuple[float, float, float]]: + ) -> EdgeArray: """This method returns an array of edge objects that lie within the specified bounding sphere. Parameters @@ -287,16 +289,16 @@ def getByBoundingSphere( EdgeArray An EdgeArray object, which is a sequence of Edge objects. """ - ... + return EdgeArray([Edge()]) @abaqus_method_doc - def getBoundingBox(self) -> Dict[str, Tuple[float, float, float]]: + def getBoundingBox(self) -> dict[str, tuple[float, float, float]]: """This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the edge sequence. Returns ------- - Dict[str, Tuple[float, float, float]] + dict[str, tuple[float, float, float]] A Dictionary object with the following items: - **low**: a tuple of three floats representing the minimum **X** -, **Y** -, and **Z** -boundary @@ -304,4 +306,4 @@ def getBoundingBox(self) -> Dict[str, Tuple[float, float, float]]: - **high**: a tuple of three floats representing the maximum **X** -, **Y** -, and **Z** -boundary values of the bounding box. """ - ... + return {"low": (0.0, 0.0, 0.0), "high": (0.0, 0.0, 0.0)} diff --git a/src/abaqus/BasicGeometry/Face.py b/src/abaqus/BasicGeometry/Face.py index 16e7bb747b..05dd00d57a 100644 --- a/src/abaqus/BasicGeometry/Face.py +++ b/src/abaqus/BasicGeometry/Face.py @@ -1,12 +1,23 @@ -from typing import Optional, Tuple +from __future__ import annotations + +from typing import TYPE_CHECKING, Sequence from typing_extensions import Literal from abqpy.decorators import abaqus_class_doc, abaqus_method_doc +from ..Mesh.MeshElement import MeshElement +from ..Mesh.MeshFace import MeshFace +from ..Mesh.MeshNode import MeshNode from ..UtilityAndView.abaqusConstants import BOTH_SIDES, OFF, Boolean from ..UtilityAndView.abaqusConstants import abaqusConstants as C +if TYPE_CHECKING: # to avoid circular imports + from ..Mesh.MeshElementArray import MeshElementArray + from ..Mesh.MeshFaceArray import MeshFaceArray + from ..Mesh.MeshNodeArray import MeshNodeArray + from .FaceArray import FaceArray + @abaqus_class_doc class Face: @@ -41,7 +52,7 @@ class Face: """ #: An Int specifying the index of the face in the FaceArray. - index: Optional[int] = None + index: int | None = None #: A Boolean specifying whether the face belongs to the reference representation of the #: Part or Instance. @@ -51,17 +62,17 @@ class Face: #: specifies the **X**, **Y**, and **Z** coordinates of a point located on the face and the #: **X**, **Y**, and **Z** components of the normal to the face.For a face of a solid **pointOn** #: specifies the **X**, **Y**, and **Z** coordinates of a point located on the face. - pointOn: Optional[float] = None + pointOn: float | None = None #: A tuple of Floats specifying the name of the feature that created this face. - featureName: Optional[float] = None + featureName: float | None = None #: A tuple of Floats specifying the name of the part instance for this face (if #: applicable). - instanceName: Optional[float] = None + instanceName: float | None = None @abaqus_method_doc - def getCentroid(self): + def getCentroid(self) -> Sequence[float]: """This method returns the centroid of a face. Returns @@ -70,10 +81,10 @@ def getCentroid(self): A sequence of Floats specifying the **X**, **Y**, and **Z** coordinates of the centroid of the face. """ - ... + return (0.0, 0.0, 0.0) @abaqus_method_doc - def getCurvature(self, point: Tuple[float, float, float], uParam: float, vParam: float): + def getCurvature(self, point: tuple[float, float, float], uParam: float, vParam: float) -> dict[str, float]: """This method returns information about the curvature at a location on the face. Parameters @@ -92,17 +103,24 @@ def getCurvature(self, point: Tuple[float, float, float], uParam: float, vParam: Returns ------- - dict + dict[str, float] A dictionary with keys 'evaluationPoint', 'principalAxis1', 'principalAxis2', 'curvature1', 'curvature2' and 'gaussianCurvature'. Where the evaluationPoint specifies the location at which the curvature was evaluated. 'principalAxis1' and 'principalAxis2' refer to the vectors specifying the two principal axes of the face. 'curvature1' and 'curvature2' specify the curvatures along the two principal axes. """ - ... + return { + "evaluationPoint": 0.0, + "principalAxis1": 0.0, + "principalAxis2": 0.0, + "curvature1": 0.0, + "curvature2": 0.0, + "gaussianCurvature": 0.0, + } @abaqus_method_doc - def getElements(self): + def getElements(self) -> "MeshElementArray": """This method returns an array of element objects that are associated with the face. Returns @@ -110,10 +128,12 @@ def getElements(self): MeshElementArray A MeshElementArray object which is a sequence of MeshElement objects. """ - ... + from ..Mesh.MeshElementArray import MeshElementArray + + return MeshElementArray([MeshElement()]) @abaqus_method_doc - def getElementFaces(self, faceSide: Literal[C.SIDE2, C.SIDE1, C.BOTH_SIDES] = BOTH_SIDES): + def getElementFaces(self, faceSide: Literal[C.SIDE2, C.SIDE1, C.BOTH_SIDES] = BOTH_SIDES) -> "MeshFaceArray": """This method returns an array of mesh face objects. Each mesh face object contains the element label and the side of the element that lies on the geometric face. @@ -129,10 +149,12 @@ def getElementFaces(self, faceSide: Literal[C.SIDE2, C.SIDE1, C.BOTH_SIDES] = BO MeshFaceArray A MeshFaceArray object which is a sequence of MeshFace objects. """ - ... + from ..Mesh.MeshFaceArray import MeshFaceArray + + return MeshFaceArray([MeshFace()]) @abaqus_method_doc - def getNodes(self, faceSide: Literal[C.SIDE2, C.BOTH_SIDES] = BOTH_SIDES): + def getNodes(self, faceSide: Literal[C.SIDE2, C.BOTH_SIDES] = BOTH_SIDES) -> "MeshNodeArray": """This method returns an array of mesh node objects. Each mesh node object contains the label of the node that lies on the geometric face. @@ -150,10 +172,12 @@ def getNodes(self, faceSide: Literal[C.SIDE2, C.BOTH_SIDES] = BOTH_SIDES): MeshNodeArray A MeshNodeArray object which is a sequence of MeshNode objects. """ - ... + from ..Mesh.MeshNodeArray import MeshNodeArray + + return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))]) @abaqus_method_doc - def getNormal(self, point: Tuple[float, float, float] = ()): + def getNormal(self, point: tuple[float, float, float]) -> Sequence[float]: """This method returns the normal to a face at the location specified by the **pointOn** member. The normal at a different location on the face can be obtained by specifying the optional **point** argument. @@ -176,10 +200,10 @@ def getNormal(self, point: Tuple[float, float, float] = ()): An exception is raised if the optional argument **point** is provided but the point cannot be projected onto the face. """ - ... + return (0.0, 0.0, 0.0) @abaqus_method_doc - def getSize(self, printResults: str = True): + def getSize(self, printResults: Boolean = True) -> float: """This method returns a Float indicating the area of the face. Parameters @@ -192,10 +216,10 @@ def getSize(self, printResults: str = True): float A Float. """ - ... + return 0.0 @abaqus_method_doc - def getEdges(self): + def getEdges(self) -> Sequence[int]: """This method returns a sequence consisting of the edge ids of the edges on the face. Returns @@ -203,10 +227,10 @@ def getEdges(self): Sequence[int] A tuple of integers. """ - ... + return (0,) @abaqus_method_doc - def getVertices(self): + def getVertices(self) -> Sequence[int]: """This method returns a sequence consisting of the vertex ids of the vertices of the face. Returns @@ -214,10 +238,10 @@ def getVertices(self): Sequence[int] A tuple of integers. """ - ... + return (0,) @abaqus_method_doc - def getCells(self): + def getCells(self) -> Sequence[int]: """This method returns a sequence consisting of the cell ids of the cells to which this face belongs. Returns @@ -225,10 +249,10 @@ def getCells(self): Sequence[int] A tuple of integers. """ - ... + return (0,) @abaqus_method_doc - def getAdjacentFaces(self): + def getAdjacentFaces(self) -> "FaceArray": """This method returns an array of face objects that share at least one edge of the face. Returns @@ -236,10 +260,12 @@ def getAdjacentFaces(self): FaceArray A FaceArray object which is a sequence of Face objects. """ - ... + from .FaceArray import FaceArray + + return FaceArray([Face()]) @abaqus_method_doc - def getFacesByFaceAngle(self, angle: str): + def getFacesByFaceAngle(self, angle: str) -> "FaceArray": """This method returns an array of Face objects that are obtained by recursively finding adjacent faces that are at an angle of less than or equal to the specified angle. @@ -253,10 +279,12 @@ def getFacesByFaceAngle(self, angle: str): FaceArray A FaceArray object, which is a sequence of Face objects. """ - ... + from .FaceArray import FaceArray + + return FaceArray([Face()]) @abaqus_method_doc - def getFacesByCurvature(self): + def getFacesByCurvature(self) -> "FaceArray": """This method returns an array of Face objects that are obtained by recursively finding adjacent faces that share the same curvature. @@ -265,10 +293,12 @@ def getFacesByCurvature(self): FaceArray A FaceArray object, which is a sequence of Face objects. """ - ... + from .FaceArray import FaceArray + + return FaceArray([Face()]) @abaqus_method_doc - def isNormalFlipped(self): + def isNormalFlipped(self) -> Boolean: """This method determines whether the normal to the face is flipped from its default direction by the use of the flipNormal method on a Part object. @@ -277,16 +307,16 @@ def isNormalFlipped(self): Boolean A Boolean value of True if the normal is flipped and False if not. """ - ... + return True @abaqus_method_doc - def getCADAttributes(self): + def getCADAttributes(self) -> list[str]: """This method returns an array of CAD attribute strings associated with the Face when the part was created from CAD data. Returns ------- - List[str] + list[str] An array of String. """ - ... + return [""] diff --git a/src/abaqus/BasicGeometry/FaceArray.py b/src/abaqus/BasicGeometry/FaceArray.py index 752edb1d47..a13a82ea5b 100644 --- a/src/abaqus/BasicGeometry/FaceArray.py +++ b/src/abaqus/BasicGeometry/FaceArray.py @@ -1,10 +1,11 @@ from __future__ import annotations -from typing import Dict, List, Sequence, Tuple, Union, overload +from typing import List, Sequence, Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..UtilityAndView.abaqusConstants import Boolean +from .Edge import Edge from .EdgeArray import EdgeArray from .Face import Face @@ -43,7 +44,7 @@ class FaceArray(List[Face]): """ @abaqus_method_doc - def __init__(self, faces: List[Face]) -> None: + def __init__(self, faces: list[Face]) -> None: """This method creates a FaceArray object. .. note:: @@ -67,7 +68,7 @@ def __init__(self, faces: List[Face]) -> None: @abaqus_method_doc def findAt( self, - coordinates: Tuple[float, float, float], + coordinates: tuple[float, float, float], printWarning: Boolean = True, ) -> Face: ... @@ -76,22 +77,22 @@ def findAt( @abaqus_method_doc def findAt( self, - coordinates: Tuple[Tuple[float, float, float],], + coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[Face]: + ) -> list[Face]: ... @overload @abaqus_method_doc def findAt( self, - *coordinates: Tuple[Tuple[float, float, float],], + *coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[Face]: + ) -> list[Face]: ... @abaqus_method_doc - def findAt(self, *args, **kwargs) -> Union[Face, List[Face]]: + def findAt(self, *args, **kwargs) -> Union[Face, list[Face]]: """This method returns the object or objects in the FaceArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any face that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is found, findAt @@ -143,20 +144,20 @@ def getExteriorEdges(self) -> EdgeArray: EdgeArray An EdgeArray object specifying the exterior edges. """ - ... + return EdgeArray([Edge()]) @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: str) -> Face: + def getSequenceFromMask(self, mask: str) -> Face: # type: ignore ... @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: Sequence[str]) -> List[Face]: + def getSequenceFromMask(self, mask: Sequence[str]) -> list[Face]: # type: ignore ... @abaqus_method_doc - def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[Face, List[Face]]: + def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[Face, list[Face]]: # type: ignore """This method returns the object or objects in the FaceArray identified using the specified **mask**. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When a large number of objects are involved, this method is highly efficient. @@ -171,7 +172,7 @@ def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[Face, Li Face A Face object or a sequence of Face objects. """ - ... + return Face() if isinstance(mask, str) else [Face()] @abaqus_method_doc def getMask(self) -> str: @@ -182,17 +183,17 @@ def getMask(self) -> str: str A String specifying the object or objects. """ - ... + return "" @abaqus_method_doc def getByBoundingBox( self, - xMin: float = ..., - yMin: float = ..., - zMin: float = ..., - xMax: float = ..., - yMax: float = ..., - zMax: float = ..., + xMin: float = 0, + yMin: float = 0, + zMin: float = 0, + xMax: float = 0, + yMax: float = 0, + zMax: float = 0, ) -> FaceArray: """This method returns an array of face objects that lie within the specified bounding box. @@ -216,7 +217,7 @@ def getByBoundingBox( FaceArray A FaceArray object, which is a sequence of Face objects. """ - ... + return FaceArray([Face()]) @abaqus_method_doc def getByBoundingCylinder(self, center1: tuple, center2: tuple, radius: str) -> FaceArray: @@ -238,7 +239,7 @@ def getByBoundingCylinder(self, center1: tuple, center2: tuple, radius: str) -> FaceArray A FaceArray object, which is a sequence of Face objects. """ - ... + return FaceArray([Face()]) @abaqus_method_doc def getByBoundingSphere(self, center: tuple, radius: str) -> FaceArray: @@ -256,16 +257,16 @@ def getByBoundingSphere(self, center: tuple, radius: str) -> FaceArray: FaceArray A FaceArray object, which is a sequence of Face objects. """ - ... + return FaceArray([Face()]) @abaqus_method_doc - def getBoundingBox(self) -> Dict[str, Sequence[float]]: + def getBoundingBox(self) -> dict[str, Sequence[float]]: """This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the face sequence. Returns ------- - Dict[str, Sequence[float]] + dict[str, Sequence[float]] A Dictionary object with the following items: - **low**: a tuple of three floats representing the minimum **X** -, **Y** -, and **Z** -boundary @@ -273,10 +274,12 @@ def getBoundingBox(self) -> Dict[str, Sequence[float]]: - **high**: a tuple of three floats representing the maximum **X** -, **Y** -, and **Z** -boundary values of the bounding box. """ - ... + return {"low": (0.0, 0.0, 0.0), "high": (0.0, 0.0, 0.0)} @abaqus_method_doc - def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> Dict: + def getClosest( + self, coordinates: tuple, searchTolerance: str = "" + ) -> dict[int, tuple[Face, tuple[float, float, float]]]: """This method returns an object or objects in the FaceArray closest to the given set of points, where the given points need not lie on the faces in the FaceArray. @@ -311,4 +314,4 @@ def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> Dict: Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return {0: (Face(), (0.0, 0.0, 0.0))} diff --git a/src/abaqus/BasicGeometry/IgnoredEdge.py b/src/abaqus/BasicGeometry/IgnoredEdge.py index f8058d85a8..2b635ebd1d 100644 --- a/src/abaqus/BasicGeometry/IgnoredEdge.py +++ b/src/abaqus/BasicGeometry/IgnoredEdge.py @@ -1,4 +1,4 @@ -from typing import Optional, Tuple +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -19,14 +19,14 @@ class IgnoredEdge: """ #: An Int specifying the index of the IgnoredEdge in the IgnoredEdgeArray. - index: Optional[int] = None + index: int | None = None #: A tuple of Floats specifying the **X**, **Y**, and **Z** coordinates of a point located on #: the edge. - pointOn: Optional[float] = None + pointOn: float | None = None @abaqus_method_doc - def getSize(self, printResults: str = True): + def getSize(self, printResults: bool = True): """This method returns a Float indicating the length of the edge. Parameters @@ -57,7 +57,7 @@ def getRadius(self): ... @abaqus_method_doc - def getCurvature(self, parameter: float, point: Tuple[float, float, float]): + def getCurvature(self, parameter: float, point: tuple[float, float, float]): """This method returns curvature information at a location on the IgnoredEdge object. Parameters diff --git a/src/abaqus/BasicGeometry/IgnoredEdgeArray.py b/src/abaqus/BasicGeometry/IgnoredEdgeArray.py index 2e8f0cf437..7b981af814 100644 --- a/src/abaqus/BasicGeometry/IgnoredEdgeArray.py +++ b/src/abaqus/BasicGeometry/IgnoredEdgeArray.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Sequence, Tuple, Union, overload +from typing import List, Sequence, Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -25,29 +25,29 @@ class IgnoredEdgeArray(List[IgnoredEdge]): @overload @abaqus_method_doc - def findAt(self, coordinates: Tuple[float, float, float], printWarning: Boolean = True) -> IgnoredEdge: + def findAt(self, coordinates: tuple[float, float, float], printWarning: Boolean = True) -> IgnoredEdge: ... @overload @abaqus_method_doc def findAt( self, - coordinates: Tuple[Tuple[float, float, float],], + coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[IgnoredEdge]: + ) -> list[IgnoredEdge]: ... @overload @abaqus_method_doc def findAt( self, - *coordinates: Tuple[Tuple[float, float, float],], + *coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[IgnoredEdge]: + ) -> list[IgnoredEdge]: ... @abaqus_method_doc - def findAt(self, *args, **kwargs) -> Union[IgnoredEdge, List[IgnoredEdge]]: + def findAt(self, *args, **kwargs) -> Union[IgnoredEdge, list[IgnoredEdge]]: """This method returns the object or objects in the IgnoredEdgeArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any IgnoredEdge that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is @@ -87,16 +87,16 @@ def findAt(self, *args, **kwargs) -> Union[IgnoredEdge, List[IgnoredEdge]]: @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: str) -> IgnoredEdge: + def getSequenceFromMask(self, mask: str) -> IgnoredEdge: # type: ignore ... @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: Sequence[str]) -> List[IgnoredEdge]: + def getSequenceFromMask(self, mask: Sequence[str]) -> list[IgnoredEdge]: # type: ignore ... @abaqus_method_doc - def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[IgnoredEdge, List[IgnoredEdge]]: + def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[IgnoredEdge, list[IgnoredEdge]]: # type: ignore """This method returns the object or objects in the IgnoredEdgeArray identified using the specified **mask**. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When large number of objects are involved, this method is highly efficient. @@ -111,7 +111,7 @@ def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[IgnoredE IgnoredEdge An IgnoredEdge object or a sequence of IgnoredEdge objects. """ - ... + return IgnoredEdge() if isinstance(mask, str) else [IgnoredEdge()] @abaqus_method_doc def getMask(self): @@ -122,10 +122,12 @@ def getMask(self): str A String specifying the object or objects. """ - ... + return "" @abaqus_method_doc - def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> Dict: + def getClosest( + self, coordinates: tuple, searchTolerance: str = "" + ) -> dict[str, tuple[IgnoredEdge, tuple[float, float, float]]]: """This method returns a object or objects in the IgnoredEdgeArray closest to the given set of points, where the given points need not lie on the edges in the IgnoredEdgeArray. @@ -160,4 +162,4 @@ def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> Dict: Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return {"0": (IgnoredEdge(), (0.0, 0.0, 0.0))} diff --git a/src/abaqus/BasicGeometry/IgnoredVertex.py b/src/abaqus/BasicGeometry/IgnoredVertex.py index 3ad9839a5b..6028cb3a89 100644 --- a/src/abaqus/BasicGeometry/IgnoredVertex.py +++ b/src/abaqus/BasicGeometry/IgnoredVertex.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -19,7 +19,7 @@ class IgnoredVertex: """ #: An Int specifying the index of the IgnoredVertex in the IgnoredVertexArray. - index: Optional[int] = None + index: int | None = None #: A tuple of Floats specifying the **X**, **Y**, and **Z** coordinates of the vertex. - pointOn: Optional[float] = None + pointOn: float | None = None diff --git a/src/abaqus/BasicGeometry/IgnoredVertexArray.py b/src/abaqus/BasicGeometry/IgnoredVertexArray.py index 68ae4ffac6..7f75b3a075 100644 --- a/src/abaqus/BasicGeometry/IgnoredVertexArray.py +++ b/src/abaqus/BasicGeometry/IgnoredVertexArray.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Sequence, Tuple, Union, overload +from typing import List, Sequence, Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -25,29 +25,29 @@ class IgnoredVertexArray(List[IgnoredVertex]): @overload @abaqus_method_doc - def findAt(self, coordinates: Tuple[float, float, float], printWarning: Boolean = True) -> IgnoredVertex: + def findAt(self, coordinates: tuple[float, float, float], printWarning: Boolean = True) -> IgnoredVertex: ... @overload @abaqus_method_doc def findAt( self, - coordinates: Tuple[Tuple[float, float, float],], + coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[IgnoredVertex]: + ) -> list[IgnoredVertex]: ... @overload @abaqus_method_doc def findAt( self, - *coordinates: Tuple[Tuple[float, float, float],], + *coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[IgnoredVertex]: + ) -> list[IgnoredVertex]: ... @abaqus_method_doc - def findAt(self, *args, **kwargs) -> Union[IgnoredVertex, List[IgnoredVertex]]: + def findAt(self, *args, **kwargs) -> Union[IgnoredVertex, list[IgnoredVertex]]: """This method returns the object or objects in the IgnoredVertexArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any IgnoredVertex object that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If @@ -85,16 +85,16 @@ def findAt(self, *args, **kwargs) -> Union[IgnoredVertex, List[IgnoredVertex]]: @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: str) -> IgnoredVertex: + def getSequenceFromMask(self, mask: str) -> IgnoredVertex: # type: ignore ... @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: Sequence[str]) -> List[IgnoredVertex]: + def getSequenceFromMask(self, mask: Sequence[str]) -> list[IgnoredVertex]: # type: ignore ... @abaqus_method_doc - def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[IgnoredVertex, List[IgnoredVertex]]: + def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[IgnoredVertex, list[IgnoredVertex]]: """This method returns the object or objects in the IgnoredVertexArray identified using the specified **mask**. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When large number of objects are involved, this method is highly efficient. @@ -109,10 +109,10 @@ def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> Union[IgnoredV IgnoredVertex An IgnoredVertex object or a sequence of IgnoredVertex objects. """ - ... + return IgnoredVertex() if isinstance(mask, str) else [IgnoredVertex()] @abaqus_method_doc - def getMask(self): + def getMask(self) -> str: """This method returns a string specifying the object or objects. Returns @@ -120,10 +120,10 @@ def getMask(self): str A String specifying the object or objects. """ - ... + return "" @abaqus_method_doc - def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> Dict: + def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> dict[int, tuple[IgnoredVertex, tuple]]: """This method returns a object or objects in the IgnoredVertexArray closest to the given set of points, where the given points need not lie on the vertices in the IgnoredVertexArray. @@ -158,4 +158,4 @@ def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> Dict: Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return {0: (IgnoredVertex(), (0.0, 0.0, 0.0))} diff --git a/src/abaqus/BasicGeometry/ModelDotArray.py b/src/abaqus/BasicGeometry/ModelDotArray.py index b57f4bf82a..926240b05d 100644 --- a/src/abaqus/BasicGeometry/ModelDotArray.py +++ b/src/abaqus/BasicGeometry/ModelDotArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .ModelDot import ModelDot diff --git a/src/abaqus/BasicGeometry/ReferencePoint.py b/src/abaqus/BasicGeometry/ReferencePoint.py index e13ea1d576..012909a37e 100644 --- a/src/abaqus/BasicGeometry/ReferencePoint.py +++ b/src/abaqus/BasicGeometry/ReferencePoint.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/BasicGeometry/ReferencePointArray.py b/src/abaqus/BasicGeometry/ReferencePointArray.py index 4fcb01b0f9..4de6a18776 100644 --- a/src/abaqus/BasicGeometry/ReferencePointArray.py +++ b/src/abaqus/BasicGeometry/ReferencePointArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .ReferencePoint import ReferencePoint diff --git a/src/abaqus/BasicGeometry/ReferencePoints.py b/src/abaqus/BasicGeometry/ReferencePoints.py index 5ba45ae608..89403358bb 100644 --- a/src/abaqus/BasicGeometry/ReferencePoints.py +++ b/src/abaqus/BasicGeometry/ReferencePoints.py @@ -1,11 +1,13 @@ +from __future__ import annotations + from typing import Dict from .ReferencePoint import ReferencePoint -class ReferencePoints(Dict[int, ReferencePoint]): - def __getitem__(self, key: int) -> ReferencePoint: +class ReferencePoints(Dict[str, ReferencePoint]): + def __getitem__(self, key: str) -> ReferencePoint: if key in self.keys(): - return self.get(key) + return self.get(key) # type: ignore else: return ReferencePoint(point=(0.0, 0.0, 0.0)) diff --git a/src/abaqus/BasicGeometry/Transform.py b/src/abaqus/BasicGeometry/Transform.py index be328383fc..31a64b4d00 100644 --- a/src/abaqus/BasicGeometry/Transform.py +++ b/src/abaqus/BasicGeometry/Transform.py @@ -20,7 +20,7 @@ def matrix(self): Returns ------- - Tuple[float, float, float, float, float, float, float, float, float, float, float, float] + tuple[float, float, float, float, float, float, float, float, float, float, float, float] A tuple of 12 Floats. """ ... diff --git a/src/abaqus/BasicGeometry/Vertex.py b/src/abaqus/BasicGeometry/Vertex.py index 6ce4a4d0d6..54dec759bc 100644 --- a/src/abaqus/BasicGeometry/Vertex.py +++ b/src/abaqus/BasicGeometry/Vertex.py @@ -1,9 +1,11 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional, Tuple +from typing import TYPE_CHECKING from abqpy.decorators import abaqus_class_doc, abaqus_method_doc +from ..Mesh.MeshElement import MeshElement +from ..Mesh.MeshNode import MeshNode from ..UtilityAndView.abaqusConstants import OFF, Boolean if TYPE_CHECKING: # to avoid circular imports @@ -37,32 +39,32 @@ class Vertex: """ #: An Int specifying the index of the ConstrainedSketchVertex in the VertexArray. - index: Optional[int] = None + index: int #: A Boolean specifying whether the vertex belongs to the reference representation of the #: Part or Instance. isReferenceRep: Boolean = OFF #: A tuple of Floats specifying the **X** -, **Y** -, and **Z** -coordinates of the vertex. - pointOn: Tuple[float, float, float] + pointOn: tuple[float, float, float] #: A tuple of Floats specifying the name of the feature that created this vertex. - featureName: Optional[float] = None + featureName: tuple[float, ...] #: A tuple of Floats specifying the name of the part instance for this vertex (if #: applicable). - instanceName: Optional[float] = None + instanceName: tuple[float, ...] @abaqus_method_doc - def getEdges(self) -> Tuple[int]: + def getEdges(self) -> tuple[int]: """This method returns a sequence consisting of the edge ids of the edges which share this vertex. Returns ------- - Tuple[int] + tuple[int] A tuple of integers. """ - ... + return (0,) @abaqus_method_doc def getNodes(self) -> MeshNodeArray: @@ -73,7 +75,7 @@ def getNodes(self) -> MeshNodeArray: MeshNodeArray A MeshNodeArray object which is a sequence of MeshNode objects. """ - ... + return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))]) @abaqus_method_doc def getElements(self) -> MeshElementArray: @@ -84,4 +86,4 @@ def getElements(self) -> MeshElementArray: MeshElementArray A MeshElementArray object which is a sequence of MeshElement objects. """ - ... + return MeshElementArray([MeshElement()]) diff --git a/src/abaqus/BasicGeometry/VertexArray.py b/src/abaqus/BasicGeometry/VertexArray.py index da201715b0..416db1f70a 100644 --- a/src/abaqus/BasicGeometry/VertexArray.py +++ b/src/abaqus/BasicGeometry/VertexArray.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import List, Sequence, Tuple, Union, overload +from typing import List, Sequence, Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -38,7 +38,7 @@ class VertexArray(List[Vertex]): """ @abaqus_method_doc - def __init__(self, vertices: List[Vertex]): + def __init__(self, vertices: list[Vertex]): """This method creates a VertexArray object. .. note:: @@ -62,7 +62,7 @@ def __init__(self, vertices: List[Vertex]): @abaqus_method_doc def findAt( self, - coordinates: Tuple[float, float, float], + coordinates: tuple[float, float, float], printWarning: Boolean = True, ) -> ConstrainedSketchVertex: ... @@ -71,22 +71,22 @@ def findAt( @abaqus_method_doc def findAt( self, - coordinates: Tuple[Tuple[float, float, float],], + coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[ConstrainedSketchVertex]: + ) -> list[ConstrainedSketchVertex]: ... @overload @abaqus_method_doc def findAt( self, - *coordinates: Tuple[Tuple[float, float, float],], + *coordinates: tuple[tuple[float, float, float],], printWarning: Boolean = True, - ) -> List[ConstrainedSketchVertex]: + ) -> list[ConstrainedSketchVertex]: ... @abaqus_method_doc - def findAt(self, *args, **kwargs) -> Union[ConstrainedSketchVertex, List[ConstrainedSketchVertex]]: + def findAt(self, *args, **kwargs) -> Union[ConstrainedSketchVertex, list[ConstrainedSketchVertex]]: """This method returns the object or objects in the VertexArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any ConstrainedSketchVertex object that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary @@ -124,18 +124,18 @@ def findAt(self, *args, **kwargs) -> Union[ConstrainedSketchVertex, List[Constra @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: str) -> ConstrainedSketchVertex: + def getSequenceFromMask(self, mask: str) -> ConstrainedSketchVertex: # type: ignore ... @overload @abaqus_method_doc - def getSequenceFromMask(self, mask: Sequence[str]) -> List[ConstrainedSketchVertex]: + def getSequenceFromMask(self, mask: Sequence[str]) -> list[ConstrainedSketchVertex]: # type: ignore ... @abaqus_method_doc def getSequenceFromMask( self, mask: Union[str, Sequence[str]] - ) -> Union[ConstrainedSketchVertex, List[ConstrainedSketchVertex]]: + ) -> Union[ConstrainedSketchVertex, list[ConstrainedSketchVertex]]: # type: ignore """This method returns the object or objects in the VertexArray identified using the specified **mask**. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When a large number of objects are involved, this method is highly efficient. @@ -147,10 +147,10 @@ def getSequenceFromMask( Returns ------- - ConstrainedSketchVertex + ConstrainedSketchVertex | list[ConstrainedSketchVertex] A ConstrainedSketchVertex object or a sequence of ConstrainedSketchVertex objects.. """ - ... + return ConstrainedSketchVertex() if isinstance(mask, str) else [ConstrainedSketchVertex()] @abaqus_method_doc def getMask(self) -> str: @@ -161,17 +161,17 @@ def getMask(self) -> str: str A String specifying the object or objects. """ - ... + return "" @abaqus_method_doc def getByBoundingBox( self, - xMin: float = ..., - yMin: float = ..., - zMin: float = ..., - xMax: float = ..., - yMax: float = ..., - zMax: float = ..., + xMin: float = 0, + yMin: float = 0, + zMin: float = 0, + xMax: float = 0, + yMax: float = 0, + zMax: float = 0, ) -> VertexArray: """This method returns an array of vertex objects that lie within the specified bounding box. @@ -195,10 +195,10 @@ def getByBoundingBox( VertexArray A VertexArray object, which is a sequence of ConstrainedSketchVertex objects.. """ - ... + return VertexArray([Vertex()]) @abaqus_method_doc - def getByBoundingCylinder(self, center1: tuple, center2: tuple, radius: str): + def getByBoundingCylinder(self, center1: tuple, center2: tuple, radius: str) -> VertexArray: """This method returns an array of vertex objects that lie within the specified bounding cylinder. Parameters @@ -217,10 +217,10 @@ def getByBoundingCylinder(self, center1: tuple, center2: tuple, radius: str): VertexArray A VertexArray object, which is a sequence of ConstrainedSketchVertex objects.. """ - ... + return VertexArray([Vertex()]) @abaqus_method_doc - def getByBoundingSphere(self, center: tuple, radius: str): + def getByBoundingSphere(self, center: tuple, radius: str) -> VertexArray: """This method returns an array of vertex objects that lie within the specified bounding sphere. Parameters @@ -235,16 +235,16 @@ def getByBoundingSphere(self, center: tuple, radius: str): VertexArray A VertexArray object, which is a sequence of ConstrainedSketchVertex objects.. """ - ... + return VertexArray([Vertex()]) @abaqus_method_doc - def getBoundingBox(self): + def getBoundingBox(self) -> dict[str, tuple[float, float, float]]: """This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the vertex sequence. Returns ------- - Dict[str, Tuple[float, float, float]] + dict[str, tuple[float, float, float]] A Dictionary object with the following items: - **low**: a tuple of three floats representing the minimum **X** -, **Y** -, and **Z** -boundary @@ -252,10 +252,10 @@ def getBoundingBox(self): - **high**: a tuple of three floats representing the maximum **X** -, **Y** -, and **Z** -boundary values of the bounding box. """ - ... + return {"low": (0.0, 0.0, 0.0), "high": (0.0, 0.0, 0.0)} @abaqus_method_doc - def getClosest(self, coordinates: tuple, searchTolerance: str = ""): + def getClosest(self, coordinates: tuple, searchTolerance: str = "") -> dict[int, tuple[Vertex, tuple]]: """This method returns a object or objects in the VertexArray closest to the given set of points, where the given points need not lie on ConstrainedSketchVertex objects in the VertexArray. @@ -290,4 +290,4 @@ def getClosest(self, coordinates: tuple, searchTolerance: str = ""): Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return {0: (Vertex(), (0.0, 0.0, 0.0))} diff --git a/src/abaqus/BeamSectionProfile/BeamSectionProfileModel.py b/src/abaqus/BeamSectionProfile/BeamSectionProfileModel.py index dbea07d643..a117f9cf23 100644 --- a/src/abaqus/BeamSectionProfile/BeamSectionProfileModel.py +++ b/src/abaqus/BeamSectionProfile/BeamSectionProfileModel.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -47,10 +47,10 @@ def beamProfilesFromOdb(self, fileName: str): Returns ------- - List[Profile] + list[Profile] A list of Profile objects. """ - profiles: Dict[str, Profile] = {} + profiles: dict[str, Profile] = {} self.profiles.update(profiles) return profiles diff --git a/src/abaqus/BeamSectionProfile/Profile.py b/src/abaqus/BeamSectionProfile/Profile.py index cf7e8ac17f..dd46b918fc 100644 --- a/src/abaqus/BeamSectionProfile/Profile.py +++ b/src/abaqus/BeamSectionProfile/Profile.py @@ -37,7 +37,7 @@ def beamProfilesFromOdb(self, fileName: str): Returns ------- - List[Profile] + list[Profile] A list of Profile objects. """ ... diff --git a/src/abaqus/BoundaryCondition/AccelerationBC.py b/src/abaqus/BoundaryCondition/AccelerationBC.py index 49b1117e8b..7480334efd 100644 --- a/src/abaqus/BoundaryCondition/AccelerationBC.py +++ b/src/abaqus/BoundaryCondition/AccelerationBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -36,7 +38,7 @@ class AccelerationBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -44,7 +46,7 @@ class AccelerationBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -60,7 +62,7 @@ def __init__( ar2: Union[Literal[C.SET, C.UNSET], float] = UNSET, ar3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, - localCsys: Optional[str] = None, + localCsys: str | None = None, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, ): """This method creates an AccelerationBC object. @@ -136,7 +138,7 @@ def setValues( ar2: Union[Literal[C.SET, C.UNSET], float] = UNSET, ar3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, - localCsys: Optional[str] = None, + localCsys: str | None = None, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, ): """This method modifies the data for an existing AccelerationBC object in the step where it is created. diff --git a/src/abaqus/BoundaryCondition/AccelerationBCState.py b/src/abaqus/BoundaryCondition/AccelerationBCState.py index 186f8d12a0..d0e21feb48 100644 --- a/src/abaqus/BoundaryCondition/AccelerationBCState.py +++ b/src/abaqus/BoundaryCondition/AccelerationBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,53 +25,53 @@ class AccelerationBCState(BoundaryConditionState): """ #: A Float specifying the acceleration component in the 1-direction. - a1: Optional[float] = None + a1: float | None = None #: A Float specifying the acceleration component in the 2-direction. - a2: Optional[float] = None + a2: float | None = None #: A Float specifying the acceleration component in the 3-direction. - a3: Optional[float] = None + a3: float | None = None #: A Float specifying the rotational acceleration component about the 1-direction. - ar1: Optional[float] = None + ar1: float | None = None #: A Float specifying the rotational acceleration component about the 2-direction. - ar2: Optional[float] = None + ar2: float | None = None #: A Float specifying the rotational acceleration component about the 3-direction. - ar3: Optional[float] = None + ar3: float | None = None #: A SymbolicConstant specifying the propagation state of the acceleration component in the #: 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - a1State: Optional[SymbolicConstant] = None + a1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the acceleration component in the #: 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - a2State: Optional[SymbolicConstant] = None + a2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the acceleration component in the #: 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - a3State: Optional[SymbolicConstant] = None + a3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational acceleration #: component about the 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ar1State: Optional[SymbolicConstant] = None + ar1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational acceleration #: component about the 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ar2State: Optional[SymbolicConstant] = None + ar2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational acceleration #: component about the 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ar3State: Optional[SymbolicConstant] = None + ar3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -87,7 +87,7 @@ class AccelerationBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/AccelerationBaseMotionBC.py b/src/abaqus/BoundaryCondition/AccelerationBaseMotionBC.py index bf63f54230..ef80de37f7 100644 --- a/src/abaqus/BoundaryCondition/AccelerationBaseMotionBC.py +++ b/src/abaqus/BoundaryCondition/AccelerationBaseMotionBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -46,7 +46,7 @@ class AccelerationBaseMotionBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -54,7 +54,7 @@ class AccelerationBaseMotionBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -64,7 +64,7 @@ def __init__( dof: Literal[C.U3, C.UR2, C.U1, C.UR3, C.UR1, C.U2], amplitudeScaleFactor: float = 1, centerOfRotation: tuple = (), - correlation: Optional[Correlation] = None, + correlation: Correlation | None = None, secondaryBase: str = "", useComplex: Boolean = OFF, amplitude: str = UNSET, @@ -116,7 +116,7 @@ def setValues( self, amplitudeScaleFactor: float = 1, centerOfRotation: tuple = (), - correlation: Optional[Correlation] = None, + correlation: Correlation | None = None, secondaryBase: str = "", useComplex: Boolean = OFF, amplitude: str = UNSET, diff --git a/src/abaqus/BoundaryCondition/AccelerationBaseMotionBCState.py b/src/abaqus/BoundaryCondition/AccelerationBaseMotionBCState.py index ea00558e95..7ab84aa7c7 100644 --- a/src/abaqus/BoundaryCondition/AccelerationBaseMotionBCState.py +++ b/src/abaqus/BoundaryCondition/AccelerationBaseMotionBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,7 +27,7 @@ class AccelerationBaseMotionBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -43,7 +43,7 @@ class AccelerationBaseMotionBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/AcousticPressureBC.py b/src/abaqus/BoundaryCondition/AcousticPressureBC.py index 7a146871a3..cde98e6649 100644 --- a/src/abaqus/BoundaryCondition/AcousticPressureBC.py +++ b/src/abaqus/BoundaryCondition/AcousticPressureBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,7 +45,7 @@ class AcousticPressureBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -51,7 +53,7 @@ class AcousticPressureBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/AcousticPressureBCState.py b/src/abaqus/BoundaryCondition/AcousticPressureBCState.py index 8b1d42f84a..cff1e1d2a4 100644 --- a/src/abaqus/BoundaryCondition/AcousticPressureBCState.py +++ b/src/abaqus/BoundaryCondition/AcousticPressureBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class AcousticPressureBCState(BoundaryConditionState): """ #: A Float specifying the acoustic pressure magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the acoustic pressure magnitude. #: Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -50,7 +50,7 @@ class AcousticPressureBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/BoundaryCondition.py b/src/abaqus/BoundaryCondition/BoundaryCondition.py index e756111cbb..6339cab5f3 100644 --- a/src/abaqus/BoundaryCondition/BoundaryCondition.py +++ b/src/abaqus/BoundaryCondition/BoundaryCondition.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -24,7 +24,7 @@ class BoundaryCondition: #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -32,7 +32,7 @@ class BoundaryCondition: #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def deactivate(self, stepName: str): diff --git a/src/abaqus/BoundaryCondition/BoundaryConditionModel.py b/src/abaqus/BoundaryCondition/BoundaryConditionModel.py index e18186e2d5..7142d26039 100644 --- a/src/abaqus/BoundaryCondition/BoundaryConditionModel.py +++ b/src/abaqus/BoundaryCondition/BoundaryConditionModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -83,7 +85,7 @@ def AccelerationBaseMotionBC( dof: Literal[C.U3, C.UR2, C.U1, C.UR3, C.UR1, C.U2], amplitudeScaleFactor: float = 1, centerOfRotation: tuple = (), - correlation: Optional[Correlation] = None, + correlation: Correlation | None = None, secondaryBase: str = "", useComplex: Boolean = OFF, amplitude: str = UNSET, @@ -156,7 +158,7 @@ def AccelerationBC( ar2: Union[Literal[C.SET, C.UNSET], float] = UNSET, ar3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, - localCsys: Optional[str] = None, + localCsys: str | None = None, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, ) -> AccelerationBC: """This method creates an AccelerationBC object. @@ -689,7 +691,7 @@ def DisplacementBaseMotionBC( dof: Literal[C.U3, C.UR2, C.U1, C.UR3, C.UR1, C.U2], amplitudeScaleFactor: float = 1, centerOfRotation: tuple = (), - correlation: Optional[Correlation] = None, + correlation: Correlation | None = None, secondaryBase: str = "", useComplex: Boolean = OFF, amplitude: str = UNSET, @@ -764,7 +766,7 @@ def DisplacementBC( fixed: Boolean = OFF, amplitude: str = UNSET, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM, C.DISCRETE_FIELD] = UNIFORM, - localCsys: Optional[str] = None, + localCsys: str | None = None, buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, @@ -978,22 +980,22 @@ def EulerianMotionBC( createStepName: str, instanceName: str, followRegion: Boolean = ON, - region: Optional[Region] = None, + region: Region | None = None, materialName: str = "", ctrPosition1: Literal[C.FREE, C.FIXED] = FREE, posPosition1: Literal[C.FREE, C.FIXED] = FREE, negPosition1: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio1: Optional[float] = None, + expansionRatio1: float | None = None, contractRatio1: float = 0, ctrPosition2: Literal[C.FREE, C.FIXED] = FREE, posPosition2: Literal[C.FREE, C.FIXED] = FREE, negPosition2: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio2: Optional[float] = None, + expansionRatio2: float | None = None, contractRatio2: float = 0, ctrPosition3: Literal[C.FREE, C.FIXED] = FREE, posPosition3: Literal[C.FREE, C.FIXED] = FREE, negPosition3: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio3: Optional[float] = None, + expansionRatio3: float | None = None, contractRatio3: float = 0, allowContraction: Boolean = ON, aspectLimit: float = 10, @@ -1183,12 +1185,12 @@ def MagneticVectorPotentialBC( name: str, createStepName: str, region: Region, - component1: Optional[Literal[C.SET, C.UNSET]] = None, + component1: Literal[C.SET, C.UNSET] | None = None, component2: Literal[C.SET, C.UNSET] = UNSET, component3: Literal[C.SET, C.UNSET] = UNSET, amplitude: str = UNSET, distributionType: Literal[C.USER_DEFINED, C.UNIFORM] = UNIFORM, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> MagneticVectorPotentialBC: """This method creates a MagneticVectorPotentialBC object. @@ -1477,11 +1479,11 @@ def SubmodelBC( timeScale: Boolean, shellThickness: float, globalDrivingRegion: str = "", - absoluteExteriorTolerance: Optional[float] = None, + absoluteExteriorTolerance: float | None = None, exteriorTolerance: float = 0, - localCsys: Optional[str] = None, + localCsys: str | None = None, globalIncrement: int = 0, - centerZoneSize: Optional[float] = None, + centerZoneSize: float | None = None, intersectionOnly: Boolean = OFF, ) -> SubmodelBC: """This method creates a SubmodelBC object. @@ -1645,7 +1647,7 @@ def VelocityBaseMotionBC( dof: Literal[C.U3, C.UR2, C.U1, C.UR3, C.UR1, C.U2], amplitudeScaleFactor: float = 1, centerOfRotation: tuple = (), - correlation: Optional[Correlation] = None, + correlation: Correlation | None = None, secondaryBase: str = "", useComplex: Boolean = OFF, amplitude: str = UNSET, @@ -1718,7 +1720,7 @@ def VelocityBC( vr2: Union[Literal[C.SET, C.UNSET], float] = UNSET, vr3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, - localCsys: Optional[str] = None, + localCsys: str | None = None, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, ) -> VelocityBC: """This method creates a VelocityBC object. @@ -1808,7 +1810,7 @@ def EncastreBC( buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> TypeBC: """This method creates an encastre TypeBC object. @@ -1857,7 +1859,7 @@ def PinnedBC( buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> TypeBC: """This method creates a pinned TypeBC object. @@ -1906,7 +1908,7 @@ def XsymmBC( buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> TypeBC: """This method creates a TypeBC object that specifies symmetry about the **X** axis. @@ -1955,7 +1957,7 @@ def YsymmBC( buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> TypeBC: """This method creates a TypeBC object that specifies symmetry about the **Y** axis. @@ -2004,7 +2006,7 @@ def ZsymmBC( buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> TypeBC: """This method creates a TypeBC object that specifies symmetry about the **Z** axis. @@ -2053,7 +2055,7 @@ def XasymmBC( buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> TypeBC: """This method creates a TypeBC object that specifies antisymmetry about the **X** axis. @@ -2102,7 +2104,7 @@ def YasymmBC( buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> TypeBC: """This method creates a TypeBC object that specifies antisymmetry about the **Y** axis. @@ -2151,7 +2153,7 @@ def ZasymmBC( buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> TypeBC: """This method creates a TypeBC object that specifies antisymmetry about the **Z** axis. diff --git a/src/abaqus/BoundaryCondition/BoundaryConditionState.py b/src/abaqus/BoundaryCondition/BoundaryConditionState.py index cad0b70511..e42f21b2a2 100644 --- a/src/abaqus/BoundaryCondition/BoundaryConditionState.py +++ b/src/abaqus/BoundaryCondition/BoundaryConditionState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -20,7 +20,7 @@ class BoundaryConditionState: #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -36,7 +36,7 @@ class BoundaryConditionState: #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/ConcentrationBC.py b/src/abaqus/BoundaryCondition/ConcentrationBC.py index f20aac11d5..d744054ea0 100644 --- a/src/abaqus/BoundaryCondition/ConcentrationBC.py +++ b/src/abaqus/BoundaryCondition/ConcentrationBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,7 +45,7 @@ class ConcentrationBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -51,7 +53,7 @@ class ConcentrationBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/ConcentrationBCState.py b/src/abaqus/BoundaryCondition/ConcentrationBCState.py index 43f8ef460a..740c2216df 100644 --- a/src/abaqus/BoundaryCondition/ConcentrationBCState.py +++ b/src/abaqus/BoundaryCondition/ConcentrationBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class ConcentrationBCState(BoundaryConditionState): """ #: A Float specifying the concentration magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the concentration magnitude. #: Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -49,7 +49,7 @@ class ConcentrationBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/ConnAccelerationBC.py b/src/abaqus/BoundaryCondition/ConnAccelerationBC.py index 6707b7b751..b85ffcd2bc 100644 --- a/src/abaqus/BoundaryCondition/ConnAccelerationBC.py +++ b/src/abaqus/BoundaryCondition/ConnAccelerationBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,7 +45,7 @@ class ConnAccelerationBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -51,7 +53,7 @@ class ConnAccelerationBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/ConnAccelerationBCState.py b/src/abaqus/BoundaryCondition/ConnAccelerationBCState.py index a249bf6860..e866a14c20 100644 --- a/src/abaqus/BoundaryCondition/ConnAccelerationBCState.py +++ b/src/abaqus/BoundaryCondition/ConnAccelerationBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,61 +27,61 @@ class ConnAccelerationBCState(BoundaryConditionState): #: A Float specifying the connector acceleration component in the connector's local #: 1-direction. - a1: Optional[float] = None + a1: float | None = None #: A Float specifying the connector acceleration component in the connector's local #: 2-direction. - a2: Optional[float] = None + a2: float | None = None #: A Float specifying the connector acceleration component in the connector's local #: 3-direction. - a3: Optional[float] = None + a3: float | None = None #: A Float specifying the connector acceleration component in the connector's local #: 4-direction. - ar1: Optional[float] = None + ar1: float | None = None #: A Float specifying the connector acceleration component in the connector's local #: 5-direction. - ar2: Optional[float] = None + ar2: float | None = None #: A Float specifying the connector acceleration component in the connector's local #: 6-direction. - ar3: Optional[float] = None + ar3: float | None = None #: A SymbolicConstant specifying the propagation state of the connector acceleration #: component in the connector's local 1-direction. Possible values are UNSET, SET, #: UNCHANGED, FREED, and MODIFIED. - a1State: Optional[SymbolicConstant] = None + a1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the connector acceleration #: component in the connector's local 2-direction. Possible values are UNSET, SET, #: UNCHANGED, FREED, and MODIFIED. - a2State: Optional[SymbolicConstant] = None + a2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the connector acceleration #: component in the connector's local 3-direction. Possible values are UNSET, SET, #: UNCHANGED, FREED, and MODIFIED. - a3State: Optional[SymbolicConstant] = None + a3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the connector acceleration #: component in the connector's local 4-direction. Possible values are UNSET, SET, #: UNCHANGED, FREED, and MODIFIED. - ar1State: Optional[SymbolicConstant] = None + ar1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the connector acceleration #: component in the connector's local 5-direction. Possible values are UNSET, SET, #: UNCHANGED, FREED, and MODIFIED. - ar2State: Optional[SymbolicConstant] = None + ar2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the connector acceleration #: component in the connector's local 6-direction. Possible values are UNSET, SET, #: UNCHANGED, FREED, and MODIFIED. - ar3State: Optional[SymbolicConstant] = None + ar3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -97,7 +97,7 @@ class ConnAccelerationBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/ConnDisplacementBC.py b/src/abaqus/BoundaryCondition/ConnDisplacementBC.py index 96cf788e2e..53504a816c 100644 --- a/src/abaqus/BoundaryCondition/ConnDisplacementBC.py +++ b/src/abaqus/BoundaryCondition/ConnDisplacementBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -60,7 +62,7 @@ class ConnDisplacementBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -68,7 +70,7 @@ class ConnDisplacementBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/ConnDisplacementBCState.py b/src/abaqus/BoundaryCondition/ConnDisplacementBCState.py index ab57b3bd20..1a1b1eb8f0 100644 --- a/src/abaqus/BoundaryCondition/ConnDisplacementBCState.py +++ b/src/abaqus/BoundaryCondition/ConnDisplacementBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,61 +27,61 @@ class ConnDisplacementBCState(BoundaryConditionState): #: A Float or a Complex specifying the displacement component in the connector's local #: 1-direction. - u1: Optional[float] = None + u1: float | None = None #: A Float or a Complex specifying the displacement component in the connector's local #: 2-direction. - u2: Optional[float] = None + u2: float | None = None #: A Float or a Complex specifying the displacement component in the connector's local #: 3-direction. - u3: Optional[float] = None + u3: float | None = None #: A Float or a Complex specifying the rotational component in the connector's local #: 4-direction. - ur1: Optional[float] = None + ur1: float | None = None #: A Float or a Complex specifying the rotational component in the connector's local #: 5-direction. - ur2: Optional[float] = None + ur2: float | None = None #: A Float or a Complex specifying the rotational component in the connector's local #: 6-direction. - ur3: Optional[float] = None + ur3: float | None = None #: A SymbolicConstant specifying the propagation state of the displacement component in the #: connector's local 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - u1State: Optional[SymbolicConstant] = None + u1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the displacement component in the #: connector's local 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - u2State: Optional[SymbolicConstant] = None + u2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the displacement component in the #: connector's local 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - u3State: Optional[SymbolicConstant] = None + u3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational component in the #: connector's local 4-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ur1State: Optional[SymbolicConstant] = None + ur1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational component in the #: connector's local 5-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ur2State: Optional[SymbolicConstant] = None + ur2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational component in the #: connector's local 6-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ur3State: Optional[SymbolicConstant] = None + ur3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -97,7 +97,7 @@ class ConnDisplacementBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/ConnVelocityBC.py b/src/abaqus/BoundaryCondition/ConnVelocityBC.py index 95eb4a9d2d..9c350dd1e2 100644 --- a/src/abaqus/BoundaryCondition/ConnVelocityBC.py +++ b/src/abaqus/BoundaryCondition/ConnVelocityBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,7 +45,7 @@ class ConnVelocityBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -51,7 +53,7 @@ class ConnVelocityBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/ConnVelocityBCState.py b/src/abaqus/BoundaryCondition/ConnVelocityBCState.py index fbc362f961..3733fb8d18 100644 --- a/src/abaqus/BoundaryCondition/ConnVelocityBCState.py +++ b/src/abaqus/BoundaryCondition/ConnVelocityBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,59 +25,59 @@ class ConnVelocityBCState(BoundaryConditionState): """ #: A Float specifying the velocity component in the connector's local 1-direction. - v1: Optional[float] = None + v1: float | None = None #: A Float specifying the velocity component in the connector's local 2-direction. - v2: Optional[float] = None + v2: float | None = None #: A Float specifying the velocity component in the connector's local 3-direction. - v3: Optional[float] = None + v3: float | None = None #: A Float specifying the rotational velocity component in the connector's local #: 4-direction. - vr1: Optional[float] = None + vr1: float | None = None #: A Float specifying the rotational velocity component in the connector's local #: 5-direction. - vr2: Optional[float] = None + vr2: float | None = None #: A Float specifying the rotational velocity component in the connector's local #: 6-direction. - vr3: Optional[float] = None + vr3: float | None = None #: A SymbolicConstant specifying the propagation state of the velocity component in the #: connector's local 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - v1State: Optional[SymbolicConstant] = None + v1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the velocity component in the #: connector's local 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - v2State: Optional[SymbolicConstant] = None + v2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the velocity component in the #: connector's local 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - v3State: Optional[SymbolicConstant] = None + v3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational velocity component #: in the connector's local 4-direction. Possible values are UNSET, SET, UNCHANGED, FREED, #: and MODIFIED. - vr1State: Optional[SymbolicConstant] = None + vr1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational velocity component #: in the connector's local 5-direction. Possible values are UNSET, SET, UNCHANGED, FREED, #: and MODIFIED. - vr2State: Optional[SymbolicConstant] = None + vr2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational velocity component #: in the connector's local 6-direction. Possible values are UNSET, SET, UNCHANGED, FREED, #: and MODIFIED. - vr3State: Optional[SymbolicConstant] = None + vr3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -93,7 +93,7 @@ class ConnVelocityBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/DisplacementBC.py b/src/abaqus/BoundaryCondition/DisplacementBC.py index fa8df19cbc..66538b29bb 100644 --- a/src/abaqus/BoundaryCondition/DisplacementBC.py +++ b/src/abaqus/BoundaryCondition/DisplacementBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -55,7 +57,7 @@ class DisplacementBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -63,7 +65,7 @@ class DisplacementBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -81,7 +83,7 @@ def __init__( fixed: Boolean = OFF, amplitude: str = UNSET, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM, C.DISCRETE_FIELD] = UNIFORM, - localCsys: Optional[str] = None, + localCsys: str | None = None, buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, @@ -172,7 +174,7 @@ def setValues( fixed: Boolean = OFF, amplitude: str = UNSET, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM, C.DISCRETE_FIELD] = UNIFORM, - localCsys: Optional[str] = None, + localCsys: str | None = None, buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, diff --git a/src/abaqus/BoundaryCondition/DisplacementBCState.py b/src/abaqus/BoundaryCondition/DisplacementBCState.py index eebdd60bea..52b0afffa5 100644 --- a/src/abaqus/BoundaryCondition/DisplacementBCState.py +++ b/src/abaqus/BoundaryCondition/DisplacementBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,56 +25,56 @@ class DisplacementBCState(BoundaryConditionState): """ #: A Float or a Complex specifying the displacement component in the 1-direction. - u1: Optional[float] = None + u1: float | None = None #: A Float or a Complex specifying the displacement component in the 2-direction. - u2: Optional[float] = None + u2: float | None = None #: A Float or a Complex specifying the displacement component in the 3-direction. - u3: Optional[float] = None + u3: float | None = None #: A Float or a Complex specifying the rotational displacement component about the #: 1-direction. - ur1: Optional[float] = None + ur1: float | None = None #: A Float or a Complex specifying the rotational displacement component about the #: 2-direction. - ur2: Optional[float] = None + ur2: float | None = None #: A Float or a Complex specifying the rotational displacement component about the #: 3-direction. - ur3: Optional[float] = None + ur3: float | None = None #: A SymbolicConstant specifying the propagation state of the displacement component in the #: 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - u1State: Optional[SymbolicConstant] = None + u1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the displacement component in the #: 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - u2State: Optional[SymbolicConstant] = None + u2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the displacement component in the #: 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - u3State: Optional[SymbolicConstant] = None + u3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational displacement #: component about the 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ur1State: Optional[SymbolicConstant] = None + ur1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational displacement #: component about the 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ur2State: Optional[SymbolicConstant] = None + ur2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational displacement #: component about the 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and #: MODIFIED. - ur3State: Optional[SymbolicConstant] = None + ur3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -90,7 +90,7 @@ class DisplacementBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/DisplacementBaseMotionBC.py b/src/abaqus/BoundaryCondition/DisplacementBaseMotionBC.py index 1a18fc0830..6013f49589 100644 --- a/src/abaqus/BoundaryCondition/DisplacementBaseMotionBC.py +++ b/src/abaqus/BoundaryCondition/DisplacementBaseMotionBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -46,7 +46,7 @@ class DisplacementBaseMotionBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -54,7 +54,7 @@ class DisplacementBaseMotionBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -64,7 +64,7 @@ def __init__( dof: Literal[C.U3, C.UR2, C.U1, C.UR3, C.UR1, C.U2], amplitudeScaleFactor: float = 1, centerOfRotation: tuple = (), - correlation: Optional[Correlation] = None, + correlation: Correlation | None = None, secondaryBase: str = "", useComplex: Boolean = OFF, amplitude: str = UNSET, @@ -116,7 +116,7 @@ def setValues( self, amplitudeScaleFactor: float = 1, centerOfRotation: tuple = (), - correlation: Optional[Correlation] = None, + correlation: Correlation | None = None, secondaryBase: str = "", useComplex: Boolean = OFF, amplitude: str = UNSET, diff --git a/src/abaqus/BoundaryCondition/DisplacementBaseMotionBCState.py b/src/abaqus/BoundaryCondition/DisplacementBaseMotionBCState.py index c0ba777f38..4a0925c49a 100644 --- a/src/abaqus/BoundaryCondition/DisplacementBaseMotionBCState.py +++ b/src/abaqus/BoundaryCondition/DisplacementBaseMotionBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,7 +27,7 @@ class DisplacementBaseMotionBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -43,7 +43,7 @@ class DisplacementBaseMotionBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/ElectricPotentialBC.py b/src/abaqus/BoundaryCondition/ElectricPotentialBC.py index 430d993875..9dbe8dff6c 100644 --- a/src/abaqus/BoundaryCondition/ElectricPotentialBC.py +++ b/src/abaqus/BoundaryCondition/ElectricPotentialBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,7 +45,7 @@ class ElectricPotentialBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -51,7 +53,7 @@ class ElectricPotentialBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/ElectricPotentialBCState.py b/src/abaqus/BoundaryCondition/ElectricPotentialBCState.py index ff14bcf07c..0c8b6e8176 100644 --- a/src/abaqus/BoundaryCondition/ElectricPotentialBCState.py +++ b/src/abaqus/BoundaryCondition/ElectricPotentialBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class ElectricPotentialBCState(BoundaryConditionState): """ #: A Float specifying the electrical potential magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the electrical potential #: magnitude. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -50,7 +50,7 @@ class ElectricPotentialBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/EulerianBC.py b/src/abaqus/BoundaryCondition/EulerianBC.py index 79eff272c3..ee891edc15 100644 --- a/src/abaqus/BoundaryCondition/EulerianBC.py +++ b/src/abaqus/BoundaryCondition/EulerianBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -45,7 +45,7 @@ class EulerianBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -53,7 +53,7 @@ class EulerianBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/EulerianBCState.py b/src/abaqus/BoundaryCondition/EulerianBCState.py index 2a8e2d982d..70affd44fd 100644 --- a/src/abaqus/BoundaryCondition/EulerianBCState.py +++ b/src/abaqus/BoundaryCondition/EulerianBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -35,7 +35,7 @@ class EulerianBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the definition member. Possible #: values are UNSET, SET, and UNCHANGED. - definitionState: Optional[SymbolicConstant] = None + definitionState: SymbolicConstant #: A SymbolicConstant specifying the material flow conditions to be defined. Possible #: values are FREE, NONE, and VOID. The default value is FREE. @@ -43,7 +43,7 @@ class EulerianBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the definition member. Possible #: values are UNSET, SET, and UNCHANGED. - inflowTypeState: Optional[SymbolicConstant] = None + inflowTypeState: SymbolicConstant #: A SymbolicConstant specifying the material flow conditions to be defined. Possible #: values are ZERO_PRESSURE, FREE, NON_REFLECTING, and EQUILIBRIUM. The default value is @@ -52,11 +52,11 @@ class EulerianBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the definition member. Possible #: values are UNSET, SET, and UNCHANGED. - outflowTypeState: Optional[SymbolicConstant] = None + outflowTypeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -72,7 +72,7 @@ class EulerianBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/EulerianMotionBC.py b/src/abaqus/BoundaryCondition/EulerianMotionBC.py index 29ad7581bb..df5d2bf90f 100644 --- a/src/abaqus/BoundaryCondition/EulerianMotionBC.py +++ b/src/abaqus/BoundaryCondition/EulerianMotionBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -74,17 +74,17 @@ class EulerianMotionBC(BoundaryCondition): #: None or a Float specifying the upper bounds on the allowable scaling of the mesh in the #: 1 direction. If **expansionRatio1** = None, then there is no upper limit. The default value #: is None. - expansionRatio1: Optional[float] = None + expansionRatio1: float | None = None #: None or a Float specifying the upper bounds on the allowable scaling of the mesh in the #: 2 direction. If **expansionRatio2** = None, then there is no upper limit. The default value #: is None. - expansionRatio2: Optional[float] = None + expansionRatio2: float | None = None #: None or a Float specifying the upper bounds on the allowable scaling of the mesh in the #: 3 direction. If **expansionRatio3** = None, then there is no upper limit. The default value #: is None. - expansionRatio3: Optional[float] = None + expansionRatio3: float | None = None #: A Float specifying the lower bounds on the allowable scaling of the mesh in the 1 #: direction. The default value is 0.0. @@ -127,7 +127,7 @@ class EulerianMotionBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -135,7 +135,7 @@ class EulerianMotionBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -144,22 +144,22 @@ def __init__( createStepName: str, instanceName: str, followRegion: Boolean = ON, - region: Optional[Region] = None, + region: Region | None = None, materialName: str = "", ctrPosition1: Literal[C.FREE, C.FIXED] = FREE, posPosition1: Literal[C.FREE, C.FIXED] = FREE, negPosition1: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio1: Optional[float] = None, + expansionRatio1: float | None = None, contractRatio1: float = 0, ctrPosition2: Literal[C.FREE, C.FIXED] = FREE, posPosition2: Literal[C.FREE, C.FIXED] = FREE, negPosition2: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio2: Optional[float] = None, + expansionRatio2: float | None = None, contractRatio2: float = 0, ctrPosition3: Literal[C.FREE, C.FIXED] = FREE, posPosition3: Literal[C.FREE, C.FIXED] = FREE, negPosition3: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio3: Optional[float] = None, + expansionRatio3: float | None = None, contractRatio3: float = 0, allowContraction: Boolean = ON, aspectLimit: float = 10, @@ -272,22 +272,22 @@ def setValues( self, instanceName: str, followRegion: Boolean = ON, - region: Optional[Region] = None, + region: Region | None = None, materialName: str = "", ctrPosition1: Literal[C.FREE, C.FIXED] = FREE, posPosition1: Literal[C.FREE, C.FIXED] = FREE, negPosition1: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio1: Optional[float] = None, + expansionRatio1: float | None = None, contractRatio1: float = 0, ctrPosition2: Literal[C.FREE, C.FIXED] = FREE, posPosition2: Literal[C.FREE, C.FIXED] = FREE, negPosition2: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio2: Optional[float] = None, + expansionRatio2: float | None = None, contractRatio2: float = 0, ctrPosition3: Literal[C.FREE, C.FIXED] = FREE, posPosition3: Literal[C.FREE, C.FIXED] = FREE, negPosition3: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio3: Optional[float] = None, + expansionRatio3: float | None = None, contractRatio3: float = 0, allowContraction: Boolean = ON, aspectLimit: float = 10, @@ -389,17 +389,17 @@ def setValuesInStep( ctrPosition1: Literal[C.FREE, C.FIXED] = FREE, posPosition1: Literal[C.FREE, C.FIXED] = FREE, negPosition1: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio1: Optional[float] = None, + expansionRatio1: float | None = None, contractRatio1: float = 0, ctrPosition2: Literal[C.FREE, C.FIXED] = FREE, posPosition2: Literal[C.FREE, C.FIXED] = FREE, negPosition2: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio2: Optional[float] = None, + expansionRatio2: float | None = None, contractRatio2: float = 0, ctrPosition3: Literal[C.FREE, C.FIXED] = FREE, posPosition3: Literal[C.FREE, C.FIXED] = FREE, negPosition3: Literal[C.FREE, C.FIXED] = FREE, - expansionRatio3: Optional[float] = None, + expansionRatio3: float | None = None, contractRatio3: float = 0, allowContraction: Boolean = ON, aspectLimit: float = 10, diff --git a/src/abaqus/BoundaryCondition/EulerianMotionBCState.py b/src/abaqus/BoundaryCondition/EulerianMotionBCState.py index 713fad54e4..a66a34c750 100644 --- a/src/abaqus/BoundaryCondition/EulerianMotionBCState.py +++ b/src/abaqus/BoundaryCondition/EulerianMotionBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -70,17 +70,17 @@ class EulerianMotionBCState(BoundaryConditionState): #: None or a Float specifying the upper bounds on the allowable scaling of the mesh in the #: 1 direction. If **expansionRatio1** = None, then there is no upper limit. The default value #: is None. - expansionRatio1: Optional[float] = None + expansionRatio1: float | None = None #: None or a Float specifying the upper bounds on the allowable scaling of the mesh in the #: 2 direction. If **expansionRatio2** = None, then there is no upper limit. The default value #: is None. - expansionRatio2: Optional[float] = None + expansionRatio2: float | None = None #: None or a Float specifying the upper bounds on the allowable scaling of the mesh in the #: 3 direction. If **expansionRatio3** = None, then there is no upper limit. The default value #: is None. - expansionRatio3: Optional[float] = None + expansionRatio3: float | None = None #: A Float specifying the lower bounds on the allowable scaling of the mesh in the 1 #: direction. The default value is 0.0. @@ -116,7 +116,7 @@ class EulerianMotionBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -132,7 +132,7 @@ class EulerianMotionBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/FluidCavityPressureBC.py b/src/abaqus/BoundaryCondition/FluidCavityPressureBC.py index 7a290bc70a..2f5eaa1750 100644 --- a/src/abaqus/BoundaryCondition/FluidCavityPressureBC.py +++ b/src/abaqus/BoundaryCondition/FluidCavityPressureBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -36,7 +38,7 @@ class FluidCavityPressureBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -44,7 +46,7 @@ class FluidCavityPressureBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/FluidCavityPressureBCState.py b/src/abaqus/BoundaryCondition/FluidCavityPressureBCState.py index dd4b6ca85b..b6bcada0ca 100644 --- a/src/abaqus/BoundaryCondition/FluidCavityPressureBCState.py +++ b/src/abaqus/BoundaryCondition/FluidCavityPressureBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class FluidCavityPressureBCState(BoundaryConditionState): """ #: A Float specifying the fluid cavity pressure magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the fluid cavity pressure #: magnitude. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -50,7 +50,7 @@ class FluidCavityPressureBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/MagneticVectorPotentialBC.py b/src/abaqus/BoundaryCondition/MagneticVectorPotentialBC.py index cdf4b7f8ac..46c8184b24 100644 --- a/src/abaqus/BoundaryCondition/MagneticVectorPotentialBC.py +++ b/src/abaqus/BoundaryCondition/MagneticVectorPotentialBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -31,7 +31,7 @@ class MagneticVectorPotentialBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -39,7 +39,7 @@ class MagneticVectorPotentialBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -47,12 +47,12 @@ def __init__( name: str, createStepName: str, region: Region, - component1: Optional[Literal[C.SET, C.UNSET]] = None, + component1: Literal[C.SET, C.UNSET] | None = None, component2: Literal[C.SET, C.UNSET] = UNSET, component3: Literal[C.SET, C.UNSET] = UNSET, amplitude: str = UNSET, distributionType: Literal[C.USER_DEFINED, C.UNIFORM] = UNIFORM, - localCsys: Optional[str] = None, + localCsys: str | None = None, ): """This method creates a MagneticVectorPotentialBC object. @@ -104,12 +104,12 @@ def __init__( @abaqus_method_doc def setValues( self, - component1: Optional[Literal[C.SET, C.UNSET]] = None, + component1: Literal[C.SET, C.UNSET] | None = None, component2: Literal[C.SET, C.UNSET] = UNSET, component3: Literal[C.SET, C.UNSET] = UNSET, amplitude: str = UNSET, distributionType: Literal[C.USER_DEFINED, C.UNIFORM] = UNIFORM, - localCsys: Optional[str] = None, + localCsys: str | None = None, ): """This method modifies the data for an existing MagneticVectorPotentialBC object in the step where it is created. @@ -147,9 +147,9 @@ def setValues( def setValuesInStep( self, stepName: str, - component1: Optional[Literal[C.SET, C.UNCHANGED]] = None, - component2: Optional[Literal[C.SET, C.UNCHANGED]] = None, - component3: Optional[Literal[C.UNCHANGED]] = None, + component1: Literal[C.SET, C.UNCHANGED] | None = None, + component2: Literal[C.SET, C.UNCHANGED] | None = None, + component3: Literal[C.UNCHANGED] | None = None, amplitude: str = "", ): """This method modifies the propagating data for an existing MagneticVectorPotentialBC object in the diff --git a/src/abaqus/BoundaryCondition/MaterialFlowBC.py b/src/abaqus/BoundaryCondition/MaterialFlowBC.py index 890bc24a27..4e0805cbf9 100644 --- a/src/abaqus/BoundaryCondition/MaterialFlowBC.py +++ b/src/abaqus/BoundaryCondition/MaterialFlowBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,7 +45,7 @@ class MaterialFlowBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -51,7 +53,7 @@ class MaterialFlowBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/MaterialFlowBCState.py b/src/abaqus/BoundaryCondition/MaterialFlowBCState.py index ee2080e3ac..1d6a3402a9 100644 --- a/src/abaqus/BoundaryCondition/MaterialFlowBCState.py +++ b/src/abaqus/BoundaryCondition/MaterialFlowBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class MaterialFlowBCState(BoundaryConditionState): """ #: A Float specifying the material flow magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the material flow magnitude. #: Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -50,7 +50,7 @@ class MaterialFlowBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/PorePressureBC.py b/src/abaqus/BoundaryCondition/PorePressureBC.py index f64369a98d..31b046ce2b 100644 --- a/src/abaqus/BoundaryCondition/PorePressureBC.py +++ b/src/abaqus/BoundaryCondition/PorePressureBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,7 +45,7 @@ class PorePressureBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -51,7 +53,7 @@ class PorePressureBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/PorePressureBCState.py b/src/abaqus/BoundaryCondition/PorePressureBCState.py index c689c10d63..f6dbe8827f 100644 --- a/src/abaqus/BoundaryCondition/PorePressureBCState.py +++ b/src/abaqus/BoundaryCondition/PorePressureBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class PorePressureBCState(BoundaryConditionState): """ #: A Float specifying the pore pressure magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the pore pressure magnitude. #: Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -49,7 +49,7 @@ class PorePressureBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/RetainedNodalDofsBC.py b/src/abaqus/BoundaryCondition/RetainedNodalDofsBC.py index 7c652b2ce4..aa4238d633 100644 --- a/src/abaqus/BoundaryCondition/RetainedNodalDofsBC.py +++ b/src/abaqus/BoundaryCondition/RetainedNodalDofsBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -24,7 +24,7 @@ class RetainedNodalDofsBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -32,7 +32,7 @@ class RetainedNodalDofsBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/SecondaryBaseBC.py b/src/abaqus/BoundaryCondition/SecondaryBaseBC.py index 3d7d3bf195..fe515f2a6b 100644 --- a/src/abaqus/BoundaryCondition/SecondaryBaseBC.py +++ b/src/abaqus/BoundaryCondition/SecondaryBaseBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -24,7 +24,7 @@ class SecondaryBaseBC(BoundaryCondition): name: str = "" #: A tuple of tuples of Ints specifying the constrained degrees-of-freedom. - dofs: Optional[int] = None + dofs: int | None = None #: A RegionArray object specifying the region to which the boundary condition is applied. #: Note that the usual **region** is ignored. The default value is MODEL. @@ -32,7 +32,7 @@ class SecondaryBaseBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -40,7 +40,7 @@ class SecondaryBaseBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__(self, name: str, createStepName: str, regions: RegionArray, dofs: tuple): diff --git a/src/abaqus/BoundaryCondition/SecondaryBaseBCState.py b/src/abaqus/BoundaryCondition/SecondaryBaseBCState.py index 8bc30d8ee3..e9601c0fbc 100644 --- a/src/abaqus/BoundaryCondition/SecondaryBaseBCState.py +++ b/src/abaqus/BoundaryCondition/SecondaryBaseBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,7 +26,7 @@ class SecondaryBaseBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -42,7 +42,7 @@ class SecondaryBaseBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/SubmodelBC.py b/src/abaqus/BoundaryCondition/SubmodelBC.py index 44211caf4a..6e27d50857 100644 --- a/src/abaqus/BoundaryCondition/SubmodelBC.py +++ b/src/abaqus/BoundaryCondition/SubmodelBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -29,7 +29,7 @@ class SubmodelBC(BoundaryCondition): #: None or a Float specifying the absolute value by which a driven node of the submodel can #: lie outside the region of the elements of the global model. The default value is None. - absoluteExteriorTolerance: Optional[float] = None + absoluteExteriorTolerance: float | None = None #: None or a Float specifying the fraction of the average element size in the global model #: by which a driven node of the submodel can lie outside the region of the elements of the @@ -43,7 +43,7 @@ class SubmodelBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -51,7 +51,7 @@ class SubmodelBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -64,11 +64,11 @@ def __init__( timeScale: Boolean, shellThickness: float, globalDrivingRegion: str = "", - absoluteExteriorTolerance: Optional[float] = None, + absoluteExteriorTolerance: float | None = None, exteriorTolerance: float = 0, - localCsys: Optional[str] = None, + localCsys: str | None = None, globalIncrement: int = 0, - centerZoneSize: Optional[float] = None, + centerZoneSize: float | None = None, intersectionOnly: Boolean = OFF, ): """This method creates a SubmodelBC object. @@ -143,11 +143,11 @@ def __init__( def setValues( self, globalDrivingRegion: str = "", - absoluteExteriorTolerance: Optional[float] = None, + absoluteExteriorTolerance: float | None = None, exteriorTolerance: float = 0, - localCsys: Optional[str] = None, + localCsys: str | None = None, globalIncrement: int = 0, - centerZoneSize: Optional[float] = None, + centerZoneSize: float | None = None, ): """This method modifies the data for an existing SubmodelBC object in the step where it is created. @@ -187,7 +187,7 @@ def setValuesInStep( dof: tuple = (), globalStep: str = "", globalIncrement: int = 0, - centerZoneSize: Optional[float] = None, + centerZoneSize: float | None = None, ): """This method modifies the propagating data for an existing SubmodelBC object in the specified step. diff --git a/src/abaqus/BoundaryCondition/SubmodelBCState.py b/src/abaqus/BoundaryCondition/SubmodelBCState.py index a4afd2f165..cceec74cc4 100644 --- a/src/abaqus/BoundaryCondition/SubmodelBCState.py +++ b/src/abaqus/BoundaryCondition/SubmodelBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,28 +27,28 @@ class SubmodelBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the **dof** member. Possible values #: are SET and UNCHANGED. - dofState: Optional[SymbolicConstant] = None + dofState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **globalStep** member. Possible #: values are SET and UNCHANGED. - globalStepState: Optional[SymbolicConstant] = None + globalStepState: SymbolicConstant #: An Int specifying the increment number in the global model step at which the solution #: will be used to specify the values of the driven variables. This argument is applicable #: only for linear perturbation steps. - globalIncrement: Optional[int] = None + globalIncrement: int | None = None #: A SymbolicConstant specifying the propagation state of the **globalIncrement** member. #: Possible values are SET and UNCHANGED. - globalIncrementState: Optional[SymbolicConstant] = None + globalIncrementState: SymbolicConstant #: None or a Float specifying the thickness of the center zone size around the shell #: midsurface. The default value is None. - centerZoneSize: Optional[float] = None + centerZoneSize: float | None = None #: A SymbolicConstant specifying the propagation state of the **centerZoneSize** member. #: Possible values are SET and UNCHANGED. - centerZoneSizefState: Optional[SymbolicConstant] = None + centerZoneSizefState: SymbolicConstant #: None or a Float specifying a scaling value applied to the applied displacements at the #: interface. The default value is 1.0. @@ -56,7 +56,7 @@ class SubmodelBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the **scale** member. Possible #: values are SET and UNCHANGED. - scaleState: Optional[SymbolicConstant] = None + scaleState: SymbolicConstant #: A String specifying the step in the global model from which Abaqus reads the values of #: the variables that will drive the submodel analysis. The String indicates the position @@ -66,11 +66,11 @@ class SubmodelBCState(BoundaryConditionState): #: A tuple of Ints specifying the degrees of freedom to which the boundary condition is #: applied. - dof: Optional[int] = None + dof: int | None = None #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -86,7 +86,7 @@ class SubmodelBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/TemperatureBC.py b/src/abaqus/BoundaryCondition/TemperatureBC.py index f4003f5eb1..7d13c285cc 100644 --- a/src/abaqus/BoundaryCondition/TemperatureBC.py +++ b/src/abaqus/BoundaryCondition/TemperatureBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,7 +45,7 @@ class TemperatureBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -51,7 +53,7 @@ class TemperatureBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/BoundaryCondition/TemperatureBCState.py b/src/abaqus/BoundaryCondition/TemperatureBCState.py index c8bac679ee..fe9f36accd 100644 --- a/src/abaqus/BoundaryCondition/TemperatureBCState.py +++ b/src/abaqus/BoundaryCondition/TemperatureBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,23 +25,23 @@ class TemperatureBCState(BoundaryConditionState): """ #: A Float specifying the temperature magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the temperature magnitude. #: Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **dof** member. Possible values #: are SET and UNCHANGED. - dofState: Optional[SymbolicConstant] = None + dofState: SymbolicConstant #: A tuple of Ints specifying the degrees of freedom to which the boundary condition is #: applied. - dof: Optional[int] = None + dof: int | None = None #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -57,7 +57,7 @@ class TemperatureBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/TypeBC.py b/src/abaqus/BoundaryCondition/TypeBC.py index 8f37286fb2..1e08cf5f7f 100644 --- a/src/abaqus/BoundaryCondition/TypeBC.py +++ b/src/abaqus/BoundaryCondition/TypeBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -32,7 +32,7 @@ class TypeBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -40,7 +40,7 @@ class TypeBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -51,7 +51,7 @@ def __init__( buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> None: """This method creates an TypeBC object. @@ -97,7 +97,7 @@ def EncastreBC( createStepName: str, region: Region, buckleCase: SymbolicConstant = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> "TypeBC": """This method creates an encastre TypeBC object. @@ -137,7 +137,7 @@ def PinnedBC( createStepName: str, region: Region, buckleCase: SymbolicConstant = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> "TypeBC": """This method creates a pinned TypeBC object. @@ -177,7 +177,7 @@ def XsymmBC( createStepName: str, region: Region, buckleCase: SymbolicConstant = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> "TypeBC": """This method creates a TypeBC object that specifies symmetry about the **X** axis. @@ -217,7 +217,7 @@ def YsymmBC( createStepName: str, region: Region, buckleCase: SymbolicConstant = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> "TypeBC": """This method creates a TypeBC object that specifies symmetry about the **Y** axis. @@ -257,7 +257,7 @@ def ZsymmBC( createStepName: str, region: Region, buckleCase: SymbolicConstant = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> "TypeBC": """This method creates a TypeBC object that specifies symmetry about the **Z** axis. @@ -297,7 +297,7 @@ def XasymmBC( createStepName: str, region: Region, buckleCase: SymbolicConstant = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> "TypeBC": """This method creates a TypeBC object that specifies antisymmetry about the **X** axis. @@ -337,7 +337,7 @@ def YasymmBC( createStepName: str, region: Region, buckleCase: SymbolicConstant = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> "TypeBC": """This method creates a TypeBC object that specifies antisymmetry about the **Y** axis. @@ -377,7 +377,7 @@ def ZasymmBC( createStepName: str, region: Region, buckleCase: SymbolicConstant = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ) -> "TypeBC": """This method creates a TypeBC object that specifies antisymmetry about the **Z** axis. @@ -414,13 +414,11 @@ def ZasymmBC( def setValues( self, region: Region, - typeName: Optional[ - Literal[C.YASYMM, C.ENCASTRE, C.ZASYMM, C.ZSYMM, C.YSYMM, C.XSYMM, C.PINNED, C.XASYMM] - ] = None, + typeName: Literal[C.YASYMM, C.ENCASTRE, C.ZASYMM, C.ZSYMM, C.YSYMM, C.XSYMM, C.PINNED, C.XASYMM] | None = None, buckleCase: Literal[ C.STRESS_PERTURBATION, C.NOT_APPLICABLE, C.BUCKLING_MODES, C.BUCKLE, C.PERTURBATION_AND_BUCKLING ] = NOT_APPLICABLE, - localCsys: Optional[str] = None, + localCsys: str | None = None, ): """This method modifies the data for an existing TypeBC object in the step where it is created. @@ -446,9 +444,7 @@ def setValues( def setValuesInStep( self, stepName: str, - typeName: Optional[ - Literal[C.YASYMM, C.ENCASTRE, C.ZASYMM, C.ZSYMM, C.YSYMM, C.XSYMM, C.PINNED, C.XASYMM] - ] = None, + typeName: Literal[C.YASYMM, C.ENCASTRE, C.ZASYMM, C.ZSYMM, C.YSYMM, C.XSYMM, C.PINNED, C.XASYMM] | None = None, ): """This method always returns a value error for a TypeBC; it is inherited from the BoundaryCondition object. diff --git a/src/abaqus/BoundaryCondition/TypeBCState.py b/src/abaqus/BoundaryCondition/TypeBCState.py index 1b5427461e..f6371cc249 100644 --- a/src/abaqus/BoundaryCondition/TypeBCState.py +++ b/src/abaqus/BoundaryCondition/TypeBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class TypeBCState(BoundaryConditionState): #: A SymbolicConstant specifying the predefined boundary condition type. Possible values #: are XSYMM, YSYMM, ZSYMM, XASYMM, YASYMM, ZASYMM, PINNED, and ENCASTRE. - typeName: Optional[SymbolicConstant] = None + typeName: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the predefined boundary condition #: type. The only possible value is UNCHANGED. - typeNameState: Optional[SymbolicConstant] = None + typeNameState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -50,7 +50,7 @@ class TypeBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/VelocityBC.py b/src/abaqus/BoundaryCondition/VelocityBC.py index c087d8bb5b..932af541d0 100644 --- a/src/abaqus/BoundaryCondition/VelocityBC.py +++ b/src/abaqus/BoundaryCondition/VelocityBC.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -36,7 +38,7 @@ class VelocityBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -44,7 +46,7 @@ class VelocityBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -60,7 +62,7 @@ def __init__( vr2: Union[Literal[C.SET, C.UNSET], float] = UNSET, vr3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, - localCsys: Optional[str] = None, + localCsys: str | None = None, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, ): """This method creates a VelocityBC object. @@ -136,7 +138,7 @@ def setValues( vr2: Union[Literal[C.SET, C.UNSET], float] = UNSET, vr3: Union[Literal[C.SET, C.UNSET], float] = UNSET, amplitude: str = UNSET, - localCsys: Optional[str] = None, + localCsys: str | None = None, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, ): """This method modifies the data for an existing VelocityBC object in the step where it is created. diff --git a/src/abaqus/BoundaryCondition/VelocityBCState.py b/src/abaqus/BoundaryCondition/VelocityBCState.py index 32978d99ff..4e9c5a8309 100644 --- a/src/abaqus/BoundaryCondition/VelocityBCState.py +++ b/src/abaqus/BoundaryCondition/VelocityBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,50 +25,50 @@ class VelocityBCState(BoundaryConditionState): """ #: A Float specifying the velocity component in the 1-direction. - v1: Optional[float] = None + v1: float | None = None #: A Float specifying the velocity component in the 2-direction. - v2: Optional[float] = None + v2: float | None = None #: A Float specifying the velocity component in the 3-direction. - v3: Optional[float] = None + v3: float | None = None #: A Float specifying the rotational velocity component about the 1-direction. - vr1: Optional[float] = None + vr1: float | None = None #: A Float specifying the rotational velocity component about the 2-direction. - vr2: Optional[float] = None + vr2: float | None = None #: A Float specifying the rotational velocity component about the 3-direction. - vr3: Optional[float] = None + vr3: float | None = None #: A SymbolicConstant specifying the propagation state of the velocity component in the #: 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - v1State: Optional[SymbolicConstant] = None + v1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the velocity component in the #: 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - v2State: Optional[SymbolicConstant] = None + v2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the velocity component in the #: 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - v3State: Optional[SymbolicConstant] = None + v3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational velocity component #: about the 1-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - vr1State: Optional[SymbolicConstant] = None + vr1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational velocity component #: about the 2-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - vr2State: Optional[SymbolicConstant] = None + vr2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the rotational velocity component #: about the 3-direction. Possible values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - vr3State: Optional[SymbolicConstant] = None + vr3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -84,7 +84,7 @@ class VelocityBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/BoundaryCondition/VelocityBaseMotionBC.py b/src/abaqus/BoundaryCondition/VelocityBaseMotionBC.py index 1f06025736..ec74c1c3a8 100644 --- a/src/abaqus/BoundaryCondition/VelocityBaseMotionBC.py +++ b/src/abaqus/BoundaryCondition/VelocityBaseMotionBC.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -46,7 +46,7 @@ class VelocityBaseMotionBC(BoundaryCondition): #: A SymbolicConstant specifying the category of the boundary condition. Possible values #: are MECHANICAL and THERMAL. - category: Optional[SymbolicConstant] = None + category: SymbolicConstant #: A Region object specifying the region to which the boundary condition is applied. region: Region = Region() @@ -54,7 +54,7 @@ class VelocityBaseMotionBC(BoundaryCondition): #: None or a DatumCsys object specifying the local coordinate system of the boundary #: condition's degrees of freedom. If **localCsys** = None, the degrees of freedom are defined #: in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None @abaqus_method_doc def __init__( @@ -64,7 +64,7 @@ def __init__( dof: Literal[C.U3, C.UR2, C.U1, C.UR3, C.UR1, C.U2], amplitudeScaleFactor: float = 1, centerOfRotation: tuple = (), - correlation: Optional[Correlation] = None, + correlation: Correlation | None = None, secondaryBase: str = "", useComplex: Boolean = OFF, amplitude: str = UNSET, @@ -116,7 +116,7 @@ def setValues( self, amplitudeScaleFactor: float = 1, centerOfRotation: tuple = (), - correlation: Optional[Correlation] = None, + correlation: Correlation | None = None, secondaryBase: str = "", useComplex: Boolean = OFF, amplitude: str = UNSET, diff --git a/src/abaqus/BoundaryCondition/VelocityBaseMotionBCState.py b/src/abaqus/BoundaryCondition/VelocityBaseMotionBCState.py index 6c241de29c..4b4d805e93 100644 --- a/src/abaqus/BoundaryCondition/VelocityBaseMotionBCState.py +++ b/src/abaqus/BoundaryCondition/VelocityBaseMotionBCState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,7 +27,7 @@ class VelocityBaseMotionBCState(BoundaryConditionState): #: A SymbolicConstant specifying the propagation state of the amplitude reference. Possible #: values are UNSET, SET, UNCHANGED, FREED, and MODIFIED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the BoundaryConditionState object. Possible values are: #: @@ -43,7 +43,7 @@ class VelocityBaseMotionBCState(BoundaryConditionState): #: - MODIFIED_FROM_BASE_STATE #: - DEACTIVATED_FROM_BASE_STATE #: - BUILT_INTO_MODES - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the #: boundary condition has no amplitude reference. diff --git a/src/abaqus/Calibration/Behavior.py b/src/abaqus/Calibration/Behavior.py index 15134157f9..e87d0796c0 100644 --- a/src/abaqus/Calibration/Behavior.py +++ b/src/abaqus/Calibration/Behavior.py @@ -1,4 +1,4 @@ -from typing import Tuple +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -84,12 +84,12 @@ def setValues( biWeight: str = "", uMullinsReload: str = "", uMullinsUnload: str = "", - uPYieldPoint: Tuple[float, float, float] = (), + uPYieldPoint: tuple[float, float, float] = (0.0, 0.0, 0.0), uPermSet: str = "", uPrimary: str = "", bMullinsReload: str = "", bMullinsUnload: str = "", - bPYieldPoint: Tuple[float, float, float] = (), + bPYieldPoint: tuple[float, float, float] = (0.0, 0.0, 0.0), bPermSet: str = "", bPrimary: str = "", ): @@ -285,7 +285,7 @@ def compute_plasticPoints( Returns ------- - Sequence[Tuple[float]] + Sequence[tuple[float]] A sequence of coordinates of the Plastic points.. """ ... diff --git a/src/abaqus/Calibration/Calibration.py b/src/abaqus/Calibration/Calibration.py index 181db0c1d4..87779c2cab 100644 --- a/src/abaqus/Calibration/Calibration.py +++ b/src/abaqus/Calibration/Calibration.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -19,10 +19,10 @@ class Calibration: """ #: A DataSet object. - dataSets: Optional[DataSet] = None + dataSets: DataSet | None = None #: A Behavior object. - behaviors: Optional[Behavior] = None + behaviors: Behavior | None = None #: A String specifying the name of the new calibration. name: str diff --git a/src/abaqus/Canvas/AttributeColorMap.py b/src/abaqus/Canvas/AttributeColorMap.py index 800644b06d..41fe72e770 100644 --- a/src/abaqus/Canvas/AttributeColorMap.py +++ b/src/abaqus/Canvas/AttributeColorMap.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,24 +21,24 @@ class AttributeColorMap(_OptionsBase): #: A SymbolicConstant specifying the type of AttributeColorMap . Possible values are #: MATERIAL_MAP, SECTION_MAP, PART_MAP, ELSET_MAP, AVERAGING_REGION_MAP, and ELTYPE_MAP. - mapType: Optional[SymbolicConstant] = None + mapType: SymbolicConstant #: A Dictionary object specifying a color mapping. Each key is of String type and specifies #: an attribute in the map; the corresponding values specify the color definition to apply #: to that attribute in the form (0|1, wire color, edge color, face color). The 0|1 defines #: the active status for the attribute. For example: # `overrides = {'Part-1':(1,'#00FF00', '#00CCFF', '#00FF00')}` - overrides: Optional[dict] = None + overrides: dict | None = None #: A Dictionary object specifying a custom color mapping similar to overrides. For #: example: `defaultOverrides = {'Copper':(1,''#00FF00', '#00CCFF', '#00FF00')}` #: The color mapping can contain keys that have not been #: created. When the key is created, it gets the appropriate values from this mapping. - defaultOverrides: Optional[dict] = None + defaultOverrides: dict | None = None #: A Dictionary object specifying the color settings of each attribute as described in the #: :meth:`abaqus.Canvas.AttributeColorMap.updateOverrides` method. - attributeColors: Optional[dict] = None + attributeColors: dict | None = None @abaqus_method_doc def setDefaults(self): @@ -47,7 +47,7 @@ def setDefaults(self): ... @abaqus_method_doc - def setValues(self, overrides: Optional[dict] = None, defaultOverrides: Optional[dict] = None): + def setValues(self, overrides: dict | None = None, defaultOverrides: dict | None = None): """This method modifies the AttributeColorMap object. Parameters @@ -67,7 +67,7 @@ def setValues(self, overrides: Optional[dict] = None, defaultOverrides: Optional super().setValues(overrides=overrides, defaultOverrides=defaultOverrides) @abaqus_method_doc - def updateOverrides(self, overrides: Optional[dict] = None, defaultOverrides: Optional[dict] = None): + def updateOverrides(self, overrides: dict | None = None, defaultOverrides: dict | None = None): """This method specifies additional overrides to be added to the current object definition. Parameters diff --git a/src/abaqus/Canvas/CanvasSession.py b/src/abaqus/Canvas/CanvasSession.py index 8dfc221496..4818d85cce 100644 --- a/src/abaqus/Canvas/CanvasSession.py +++ b/src/abaqus/Canvas/CanvasSession.py @@ -1,4 +1,4 @@ -from typing import Tuple +from __future__ import annotations from typing_extensions import Literal @@ -16,7 +16,7 @@ class CanvasSession(SessionBase): def Viewport( self, name: str, - origin: Tuple[float, float] = (0.0, 0.0), + origin: tuple[float, float] = (0.0, 0.0), width: float = 120.0, height: float = 80.0, border: Boolean = ON, diff --git a/src/abaqus/Canvas/DrawingArea.py b/src/abaqus/Canvas/DrawingArea.py index 47fa7c8ce3..d5ee821c8d 100644 --- a/src/abaqus/Canvas/DrawingArea.py +++ b/src/abaqus/Canvas/DrawingArea.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc @@ -15,10 +17,10 @@ class DrawingArea: """ #: A Float specifying the width in millimeters. - width: Optional[float] = None + width: float | None = None #: A Float specifying the height in millimeters. - height: Optional[float] = None + height: float | None = None #: A pair of Floats specifying the coordinates of the bottom left hand corner in #: millimeters. diff --git a/src/abaqus/Canvas/ImageOptions.py b/src/abaqus/Canvas/ImageOptions.py index a0285d29bd..015129f23e 100644 --- a/src/abaqus/Canvas/ImageOptions.py +++ b/src/abaqus/Canvas/ImageOptions.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -124,7 +126,7 @@ def setValues( yScale: float = 1.0, origin: Sequence[float] = (0.0, 0.0), translucency: float = 1.0, - options: Optional["ImageOptions"] = None, + options: "ImageOptions" | None = None, ): """This method modifies the ImageOptions object. diff --git a/src/abaqus/Canvas/Layer.py b/src/abaqus/Canvas/Layer.py index 0e22c8ae46..01d305deab 100644 --- a/src/abaqus/Canvas/Layer.py +++ b/src/abaqus/Canvas/Layer.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -25,7 +25,7 @@ class Layer: displayedObject: Displayable = Displayable() #: A View object specifying the object that controls viewing of the layer. - view: Optional[View] = None + view: View | None = None #: An OdbDisplay object specifying the display options for the Odb object. odbDisplay: OdbDisplay = OdbDisplay() diff --git a/src/abaqus/Canvas/MovieOptions.py b/src/abaqus/Canvas/MovieOptions.py index 872b02cafa..06b769b27a 100644 --- a/src/abaqus/Canvas/MovieOptions.py +++ b/src/abaqus/Canvas/MovieOptions.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -125,7 +127,7 @@ def setValues( yScale: float = 1.0, origin: Sequence[float] = (0.0, 0.0), translucency: float = 1.0, - options: Optional[str] = None, + options: str | None = None, ): """This method modifies the MovieOptions object. diff --git a/src/abaqus/Canvas/ViewportBase.py b/src/abaqus/Canvas/ViewportBase.py index 4cf89a67e4..e1623d344d 100644 --- a/src/abaqus/Canvas/ViewportBase.py +++ b/src/abaqus/Canvas/ViewportBase.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Sequence, Tuple, overload +from __future__ import annotations + +from typing import Sequence, overload from typing_extensions import Literal @@ -83,28 +85,28 @@ class ViewportBase(_OptionsBase): #: A SymbolicConstant specifying the display mode of the viewport. Possible values #: are:SINGLE, specifying a single **displayedObject**.OVERLAY, specifying one or more layers #: to be displayed simultaneously—each layer contains one **displayedObject**. - displayMode: Optional[SymbolicConstant] = None + displayMode: SymbolicConstant #: A SymbolicConstant specifying which layer or layers will be controlled by the view #: manipulation tools when **displayMode** = OVERLAY. Possible values are ALL and CURRENT. - viewManipLayers: Optional[SymbolicConstant] = None + viewManipLayers: SymbolicConstant #: A Float specifying a factor to be used in offsetting layers in the screen Z direction. #: Possible values are -1 to 1. A negative value reverses the apparent order in which the #: layers are plotted. - layerOffset: Optional[float] = None + layerOffset: float | None = None #: A SymbolicConstant specifying the current state of a viewport. Possible values are #: NORMAL, MAXIMIZED, and MINIMIZED. - windowState: Optional[SymbolicConstant] = None + windowState: SymbolicConstant #: A Float specifying the width in millimeters of the current viewport, regardless of the #: value of **windowState**. - currentWidth: Optional[float] = None + currentWidth: float | None = None #: A Float specifying the height in millimeters of the current viewport, regardless of the #: value of **windowState**, and including the title bar. - currentHeight: Optional[float] = None + currentHeight: float | None = None #: A Boolean specifying whether the viewport is linked for synchronization. The default #: value is ON. @@ -209,7 +211,7 @@ class ViewportBase(_OptionsBase): #: A Float specifying the translucency that will be applied to objects colored using #: **initialColor** and it needs to be set along with **initialColor**. If **initialColor** is #: set to 'As is' then translucency will have no effect. - translucency: Optional[float] = None + translucency: float | None = None #: A Boolean specifying whether an animation is connected to the viewport. animationConnect: Boolean = OFF @@ -266,7 +268,7 @@ class ViewportBase(_OptionsBase): #: - "initialColor" #: - "Layup" #: - "Ply" - colorMappings: Dict[str, AttributeColorMap] = {} + colorMappings: dict[str, AttributeColorMap] = {} #: A String specifying the color that will be applied to all objects in the viewport at the #: start of color coding. The possible values are 'As is', 'Default' or a string with a @@ -286,7 +288,7 @@ class ViewportBase(_OptionsBase): #: A repository of Layer objects specifying the key to the repository is a String with the #: name of the layer. - layers: Dict[str, Layer] = {} + layers: dict[str, Layer] = {} #: A View object specifying the object that controls viewing of the #: viewport content. @@ -350,7 +352,7 @@ class ViewportBase(_OptionsBase): def __init__( self, name: str, - origin: Tuple[float, float] = (0.0, 0.0), + origin: tuple[float, float] = (0.0, 0.0), width: float = 120.0, height: float = 80.0, border: Boolean = ON, @@ -687,12 +689,12 @@ def forceRefresh(self): @abaqus_method_doc def setValues( self, - displayedObject: Optional[Displayable] = None, - displayMode: Optional[Literal[C.SINGLE, C.OVERLAY]] = None, + displayedObject: Displayable | None = None, + displayMode: Literal[C.SINGLE, C.OVERLAY] | None = None, visibleLayers: Sequence[str] = (), - viewManipLayers: Optional[Literal[C.ALL, C.CURRENT]] = None, + viewManipLayers: Literal[C.ALL, C.CURRENT] | None = None, currentLayer: str = "", - layerOffset: Optional[float] = None, + layerOffset: float | None = None, ): """This method modifies the Viewport object. The arguments to setValues are the same as the arguments to the Viewport method, except for the **name** argument. In addition, the setValues method has the diff --git a/src/abaqus/Connector/CDCTermArray.py b/src/abaqus/Connector/CDCTermArray.py index 83a9445264..e0c888fe30 100644 --- a/src/abaqus/Connector/CDCTermArray.py +++ b/src/abaqus/Connector/CDCTermArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .CDCTerm import CDCTerm diff --git a/src/abaqus/Connector/ConnectorBehaviorOption.py b/src/abaqus/Connector/ConnectorBehaviorOption.py index 0127bacc56..bf10ae15bc 100644 --- a/src/abaqus/Connector/ConnectorBehaviorOption.py +++ b/src/abaqus/Connector/ConnectorBehaviorOption.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -77,10 +77,10 @@ def TangentialBehavior( temperatureDependency: Boolean = OFF, dependencies: int = 0, exponentialDecayDefinition: Literal[C.TEST_DATA, C.COEFFICIENTS] = COEFFICIENTS, - shearStressLimit: Optional[float] = None, + shearStressLimit: float | None = None, maximumElasticSlip: Literal[C.FRACTION, C.ABSOLUTE_DISTANCE] = FRACTION, - fraction: Optional[float] = None, - absoluteDistance: Optional[float] = None, + fraction: float | None = None, + absoluteDistance: float | None = None, table: tuple = (), ) -> TangentialBehavior: """This method creates a TangentialBehavior object. diff --git a/src/abaqus/Connector/ConnectorBehaviorOptionArray.py b/src/abaqus/Connector/ConnectorBehaviorOptionArray.py index 72b0e9e756..9ded73904c 100644 --- a/src/abaqus/Connector/ConnectorBehaviorOptionArray.py +++ b/src/abaqus/Connector/ConnectorBehaviorOptionArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .ConnectorBehaviorOption import ConnectorBehaviorOption diff --git a/src/abaqus/Connector/ConnectorDamage.py b/src/abaqus/Connector/ConnectorDamage.py index eae2abc4aa..d2b22054a3 100644 --- a/src/abaqus/Connector/ConnectorDamage.py +++ b/src/abaqus/Connector/ConnectorDamage.py @@ -1,4 +1,6 @@ -from typing import Optional +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -197,17 +199,17 @@ class ConnectorDamage(ConnectorBehaviorOption): #: A ConnectorPotentialArray object specifying one ConnectorPotential object for each #: initiation potential contribution. This member can be specified only if #: **coupling** = COUPLED and if **criterion** = FORCE or MOTION. - initiationPotentials: Optional[ConnectorPotentialArray] = None + initiationPotentials: ConnectorPotentialArray #: A ConnectorPotentialArray object specifying one ConnectorPotential object for each #: evolution potential contribution). This member can be specified only if #: **coupling** = COUPLED, if **evolution** = ON, if **evolutionType** = MOTION, and if #: **criterion** = FORCE or MOTION. - evolutionPotentials: Optional[ConnectorPotentialArray] = None + evolutionPotentials: ConnectorPotentialArray = [] #: A sequence of sequences of Floats specifying the initiation properties. The default #: value is an empty sequence.Items in the **initiationTable** data are described below. - initiationTable: tuple = () + initiationTable: Sequence[Sequence[float]] = () #: A sequence of sequences of Floats specifying the evolution properties. The default value #: is an empty sequence.Items in the **evolutionTable** data are described below. This @@ -218,7 +220,7 @@ class ConnectorDamage(ConnectorBehaviorOption): #: Possible values are 1 ≤ **components** ≤ 6. Only available components can be specified. #: This argument is applicable only if **evolution** = ON and **useAffected** = ON. The default #: value is an empty sequence. - affectedComponents: tuple = () + affectedComponents: Sequence[int] = () #: A sequence of Ints specifying the components of relative motion for which the behavior #: is defined. Possible values are 1 ≤ **components** ≤ 6. Only available components can be @@ -244,8 +246,8 @@ def __init__( evolutionDependencies: int = 0, evolutionPotentialOperator: Literal[C.SUM, C.MOTION, C.MOTION_TYPE, C.COUPLED, C.FORCE, C.MAXIMUM] = SUM, evolutionPotentialExponent: float = 2, - initiationPotentials: Optional[ConnectorPotentialArray] = None, - evolutionPotentials: Optional[ConnectorPotentialArray] = None, + initiationPotentials: ConnectorPotentialArray | None = None, + evolutionPotentials: ConnectorPotentialArray | None = None, initiationTable: tuple = (), evolutionTable: tuple = (), affectedComponents: tuple = (), diff --git a/src/abaqus/Connector/ConnectorFailure.py b/src/abaqus/Connector/ConnectorFailure.py index c3061bc8b5..ae192bcf11 100644 --- a/src/abaqus/Connector/ConnectorFailure.py +++ b/src/abaqus/Connector/ConnectorFailure.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -34,21 +34,21 @@ class ConnectorFailure(ConnectorBehaviorOption): #: None or a Float specifying the lower bound for the connector's relative position for all #: specified components, or no lower bound. The default value is None. - minMotion: Optional[float] = None + minMotion: float | None = None #: None or a Float specifying the upper bound for the connector's relative position for all #: specified components, or no upper bound. The default value is None. - maxMotion: Optional[float] = None + maxMotion: float | None = None #: None or a Float specifying the lower bound of the force or moment in the directions of #: the specified components at which locking occurs, or no lower bound. The default value #: is None. - minForce: Optional[float] = None + minForce: float | None = None #: None or a Float specifying the upper bound of the force or moment in the directions of #: the specified components at which locking occurs, or no upper bound. The default value #: is None. - maxForce: Optional[float] = None + maxForce: float | None = None #: A sequence of Ints specifying the components of relative motion for which the behavior #: is defined. Possible values are 1 ≤ **components** ≤ 6. Only available components can be @@ -59,10 +59,10 @@ class ConnectorFailure(ConnectorBehaviorOption): def __init__( self, releaseComponent: Literal[C.ALL] = ALL, - minMotion: Optional[float] = None, - maxMotion: Optional[float] = None, - minForce: Optional[float] = None, - maxForce: Optional[float] = None, + minMotion: float | None = None, + maxMotion: float | None = None, + minForce: float | None = None, + maxForce: float | None = None, components: tuple = (), ): """This method creates a connector failure behavior option for a ConnectorSection object. diff --git a/src/abaqus/Connector/ConnectorFriction.py b/src/abaqus/Connector/ConnectorFriction.py index c05e898dba..0e52abce33 100644 --- a/src/abaqus/Connector/ConnectorFriction.py +++ b/src/abaqus/Connector/ConnectorFriction.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -48,7 +48,7 @@ class ConnectorFriction(ConnectorBehaviorOption): #: force component direction. This argument applies only if #: **frictionModel** = USER_CUSTOMIZED, if **useContactForceComponent** = ON, and if #: **contactForceStyle** = DERIVED_COMPONENT. - derivedComponent: DerivedComponent = DerivedComponent() + derivedComponent: DerivedComponent = DerivedComponent() # type: ignore #: A ConnectorOptions object specifying the ConnectorOptions used to define tabular options #: for this ConnectorBehaviorOption. @@ -68,12 +68,12 @@ class ConnectorFriction(ConnectorBehaviorOption): #: Possible values are 1 ≤ **tangentDirection** ≤ 6, indicating an available component of #: relative motion. This argument applies only if **frictionModel** = USER_CUSTOMIZED and if #: **slipStyle** = SPECIFY. The default value is None. - tangentDirection: Optional[int] = None + tangentDirection: int | None = None #: None or a Float specifying the stick stiffness associated with the frictional behavior #: in the direction specified by **tangentDirection**. If this argument is omitted, Abaqus #: computes an appropriate number for the stick stiffness. The default value is None. - stickStiffness: Optional[float] = None + stickStiffness: float | None = None #: A SymbolicConstant specifying the type of the **independentComponents**. Possible values #: are POSITION, MOTION, and NO_INDEPENDENT_COMPONENTS. The default value is @@ -123,7 +123,7 @@ class ConnectorFriction(ConnectorBehaviorOption): #: A ConnectorPotentialArray object specifying one ConnectorPotential object for each force #: potential contribution. This member can be specified only if #: **frictionModel** = USER_CUSTOMIZED, and if **slipStyle** = COMPUTE. - connectorPotentials: Optional[ConnectorPotentialArray] = None + connectorPotentials: ConnectorPotentialArray = [] #: A sequence of sequences of Floats specifying friction properties. The default value is #: an empty sequence.If **frictionModel** = PREDEFINED, each sequence of the table data @@ -161,8 +161,8 @@ def __init__( self, frictionModel: Literal[C.PREDEFINED, C.USER_CUSTOMIZED] = PREDEFINED, slipStyle: Literal[C.COMPUTE, C.SPECIFY, C.USER_CUSTOMIZED] = SPECIFY, - tangentDirection: Optional[int] = None, - stickStiffness: Optional[float] = None, + tangentDirection: int | None = None, + stickStiffness: float | None = None, componentType: Literal[C.POSITION, C.MOTION, C.NO_INDEPENDENT_COMPONENTS] = NO_INDEPENDENT_COMPONENTS, slipDependency: Boolean = OFF, temperatureDependency: Boolean = OFF, @@ -172,7 +172,7 @@ def __init__( contactForceComponent: int = 0, forcePotentialOperator: Literal[C.SUM, C.COMPUTE, C.USER_CUSTOMIZED, C.MAXIMUM] = SUM, forcePotentialExponent: float = 2, - connectorPotentials: Optional[ConnectorPotentialArray] = None, + connectorPotentials: ConnectorPotentialArray | None = None, table: tuple = (), independentComponents: tuple = (), ): diff --git a/src/abaqus/Connector/ConnectorLock.py b/src/abaqus/Connector/ConnectorLock.py index 39507a1b87..4736cd9232 100644 --- a/src/abaqus/Connector/ConnectorLock.py +++ b/src/abaqus/Connector/ConnectorLock.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -35,21 +35,21 @@ class ConnectorLock(ConnectorBehaviorOption): #: None or a Float specifying the lower bound for the connector's relative position for all #: specified components, or no lower bound. The default value is None. - minMotion: Optional[float] = None + minMotion: float | None = None #: None or a Float specifying the upper bound for the connector's relative position for all #: specified components, or no upper bound. The default value is None. - maxMotion: Optional[float] = None + maxMotion: float | None = None #: None or a Float specifying the lower bound of the force or moment in the directions of #: the specified components at which locking occurs, or no lower bound. The default value #: is None. - minForce: Optional[float] = None + minForce: float | None = None #: None or a Float specifying the upper bound of the force or moment in the directions of #: the specified components at which locking occurs, or no upper bound. The default value #: is None. - maxForce: Optional[float] = None + maxForce: float | None = None #: A sequence of Ints specifying the components of relative motion for which the behavior #: is defined. Possible values are 1 ≤ **components** ≤ 6. Only available components can be @@ -60,10 +60,10 @@ class ConnectorLock(ConnectorBehaviorOption): def __init__( self, lockingComponent: Literal[C.ALL] = ALL, - minMotion: Optional[float] = None, - maxMotion: Optional[float] = None, - minForce: Optional[float] = None, - maxForce: Optional[float] = None, + minMotion: float | None = None, + maxMotion: float | None = None, + minForce: float | None = None, + maxForce: float | None = None, components: tuple = (), ): """This method creates a connector lock behavior option for a ConnectorSection. diff --git a/src/abaqus/Connector/ConnectorPlasticity.py b/src/abaqus/Connector/ConnectorPlasticity.py index b14c824e93..fec515947b 100644 --- a/src/abaqus/Connector/ConnectorPlasticity.py +++ b/src/abaqus/Connector/ConnectorPlasticity.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -150,7 +150,7 @@ class ConnectorPlasticity(ConnectorBehaviorOption): #: A ConnectorPotentialArray object specifying one ConnectorPotential object for each force #: potential contribution. This member can be specified only if **coupling** = COUPLED. - connectorPotentials: Optional[ConnectorPotentialArray] = None + connectorPotentials: ConnectorPotentialArray = [] #: A sequence of sequences of Floats specifying isotropic plasticity properties. Items in #: the **isotropicTable** data are described below. This argument is applicable only if @@ -182,7 +182,7 @@ def __init__( kinematicDependencies: int = 0, forcePotentialOperator: Literal[C.SUM, C.COUPLED, C.MAXIMUM] = SUM, forcePotentialExponent: float = 2, - connectorPotentials: Optional[ConnectorPotentialArray] = None, + connectorPotentials: ConnectorPotentialArray | None = None, isotropicTable: tuple = (), kinematicTable: tuple = (), components: tuple = (), diff --git a/src/abaqus/Connector/ConnectorPotentialArray.py b/src/abaqus/Connector/ConnectorPotentialArray.py index e5d1983fc7..c056cac425 100644 --- a/src/abaqus/Connector/ConnectorPotentialArray.py +++ b/src/abaqus/Connector/ConnectorPotentialArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .ConnectorPotential import ConnectorPotential diff --git a/src/abaqus/Connector/ConnectorSection.py b/src/abaqus/Connector/ConnectorSection.py index 73e89d81fe..68c9e9bbd6 100644 --- a/src/abaqus/Connector/ConnectorSection.py +++ b/src/abaqus/Connector/ConnectorSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -59,8 +59,8 @@ def ConnectorDamage( evolutionDependencies: int = 0, evolutionPotentialOperator: Literal[C.SUM, C.MOTION, C.MOTION_TYPE, C.COUPLED, C.FORCE, C.MAXIMUM] = SUM, evolutionPotentialExponent: float = 2, - initiationPotentials: Optional[ConnectorPotentialArray] = None, - evolutionPotentials: Optional[ConnectorPotentialArray] = None, + initiationPotentials: ConnectorPotentialArray | None = None, + evolutionPotentials: ConnectorPotentialArray | None = None, initiationTable: tuple = (), evolutionTable: tuple = (), affectedComponents: tuple = (), @@ -331,10 +331,10 @@ def ConnectorElasticity( def ConnectorFailure( self, releaseComponent: Literal[C.ALL] = ALL, - minMotion: Optional[float] = None, - maxMotion: Optional[float] = None, - minForce: Optional[float] = None, - maxForce: Optional[float] = None, + minMotion: float | None = None, + maxMotion: float | None = None, + minForce: float | None = None, + maxForce: float | None = None, components: tuple = (), ): """This method creates a connector failure behavior option for a ConnectorSection object. @@ -390,8 +390,8 @@ def ConnectorFriction( self, frictionModel: Literal[C.PREDEFINED, C.USER_CUSTOMIZED] = PREDEFINED, slipStyle: Literal[C.COMPUTE, C.SPECIFY, C.USER_CUSTOMIZED] = SPECIFY, - tangentDirection: Optional[int] = None, - stickStiffness: Optional[float] = None, + tangentDirection: int | None = None, + stickStiffness: float | None = None, componentType: Literal[C.POSITION, C.MOTION, C.NO_INDEPENDENT_COMPONENTS] = NO_INDEPENDENT_COMPONENTS, slipDependency: Boolean = OFF, temperatureDependency: Boolean = OFF, @@ -401,7 +401,7 @@ def ConnectorFriction( contactForceComponent: int = 0, forcePotentialOperator: Literal[C.SUM, C.COMPUTE, C.USER_CUSTOMIZED, C.MAXIMUM] = SUM, forcePotentialExponent: float = 2, - connectorPotentials: Optional[ConnectorPotentialArray] = None, + connectorPotentials: ConnectorPotentialArray | None = None, table: tuple = (), independentComponents: tuple = (), ): @@ -522,10 +522,10 @@ def ConnectorFriction( def ConnectorLock( self, lockingComponent: Literal[C.ALL] = ALL, - minMotion: Optional[float] = None, - maxMotion: Optional[float] = None, - minForce: Optional[float] = None, - maxForce: Optional[float] = None, + minMotion: float | None = None, + maxMotion: float | None = None, + minForce: float | None = None, + maxForce: float | None = None, components: tuple = (), ): """This method creates a connector lock behavior option for a ConnectorSection. @@ -591,7 +591,7 @@ def ConnectorPlasticity( kinematicDependencies: int = 0, forcePotentialOperator: Literal[C.SUM, C.COUPLED, C.MAXIMUM] = SUM, forcePotentialExponent: float = 2, - connectorPotentials: Optional[ConnectorPotentialArray] = None, + connectorPotentials: ConnectorPotentialArray | None = None, isotropicTable: tuple = (), kinematicTable: tuple = (), components: tuple = (), @@ -737,9 +737,7 @@ def ConnectorPotential( return option @abaqus_method_doc - def ConnectorStop( - self, minMotion: Optional[float] = None, maxMotion: Optional[float] = None, components: tuple = () - ): + def ConnectorStop(self, minMotion: float | None = None, maxMotion: float | None = None, components: tuple = ()): """This method creates a connector stop behavior option for a ConnectorSection object. .. note:: diff --git a/src/abaqus/Connector/ConnectorStop.py b/src/abaqus/Connector/ConnectorStop.py index 85f358f2cc..06ee893fa3 100644 --- a/src/abaqus/Connector/ConnectorStop.py +++ b/src/abaqus/Connector/ConnectorStop.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -25,11 +25,11 @@ class ConnectorStop(ConnectorBehaviorOption): #: None or a Float specifying the lower bound for the connector's relative position for all #: specified components, or no lower bound. The default value is None. - minMotion: Optional[float] = None + minMotion: float | None = None #: None or a Float specifying the upper bound for the connector's relative position for all #: specified components, or no upper bound. The default value is None. - maxMotion: Optional[float] = None + maxMotion: float | None = None #: A sequence of Ints specifying the components of relative motion for which the behavior #: is defined. Possible values are 1 ≤ **components** ≤ 6. Only available components can be @@ -37,7 +37,7 @@ class ConnectorStop(ConnectorBehaviorOption): components: tuple = () @abaqus_method_doc - def __init__(self, minMotion: Optional[float] = None, maxMotion: Optional[float] = None, components: tuple = ()): + def __init__(self, minMotion: float | None = None, maxMotion: float | None = None, components: tuple = ()): """This method creates a connector stop behavior option for a ConnectorSection object. .. note:: diff --git a/src/abaqus/Connector/TangentialBehavior.py b/src/abaqus/Connector/TangentialBehavior.py index 7daadd7a3a..03598ceb62 100644 --- a/src/abaqus/Connector/TangentialBehavior.py +++ b/src/abaqus/Connector/TangentialBehavior.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -78,7 +78,7 @@ class TangentialBehavior: #: None or a Float specifying no upper limit or the friction coefficient shear stress #: limit. The default value is None. - shearStressLimit: Optional[float] = None + shearStressLimit: float | None = None #: A SymbolicConstant specifying the method for modifying the allowable elastic slip. #: Possible values are FRACTION and ABSOLUTE_DISTANCE. The default value is FRACTION.This @@ -88,11 +88,11 @@ class TangentialBehavior: #: A Float specifying the ratio of the allowable maximum elastic slip to a characteristic #: model dimension. The default value is 10⁻⁴.This argument applies only to Abaqus/Standard #: analyses. - fraction: Optional[float] = None + fraction: float | None = None #: None or a Float specifying the absolute magnitude of the allowable elastic slip. The #: default value is None.This argument applies only to Abaqus/Standard analyses. - absoluteDistance: Optional[float] = None + absoluteDistance: float | None = None #: A sequence of sequences of Floats specifying the tangential properties. Items in the #: table data are described below. The default value is an empty sequence. @@ -107,10 +107,10 @@ def __init__( temperatureDependency: Boolean = OFF, dependencies: int = 0, exponentialDecayDefinition: Literal[C.TEST_DATA, C.COEFFICIENTS] = COEFFICIENTS, - shearStressLimit: Optional[float] = None, + shearStressLimit: float | None = None, maximumElasticSlip: Literal[C.FRACTION, C.ABSOLUTE_DISTANCE] = FRACTION, - fraction: Optional[float] = None, - absoluteDistance: Optional[float] = None, + fraction: float | None = None, + absoluteDistance: float | None = None, table: tuple = (), ): """This method creates a TangentialBehavior object. diff --git a/src/abaqus/Constraint/ConstraintModel.py b/src/abaqus/Constraint/ConstraintModel.py index 8ad1339884..3e77abeef1 100644 --- a/src/abaqus/Constraint/ConstraintModel.py +++ b/src/abaqus/Constraint/ConstraintModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -76,7 +78,7 @@ def Coupling( influenceRadius: Union[Literal[C.WHOLE_SURFACE], float], couplingType: Literal[C.STRUCTURAL, C.DISTRIBUTING, C.KINEMATIC], adjust: Boolean = OFF, - localCsys: Optional[str] = None, + localCsys: str | None = None, u1: Boolean = ON, u2: Boolean = ON, u3: Boolean = ON, @@ -210,7 +212,7 @@ def EmbeddedRegion( name: str, embeddedRegion: Region, hostRegion: Region, - weightFactorTolerance: Optional[float] = None, + weightFactorTolerance: float | None = None, toleranceMethod: Literal[C.FRACTIONAL, C.BOTH, C.ABSOLUTE] = BOTH, absoluteTolerance: float = 0, fractionalTolerance: float = 0, @@ -303,7 +305,7 @@ def MultipointConstraint( surface: Region, controlPoint: Region, mpcType: Literal[C.USER_MPC, C.BEAM_MPC, C.ELBOW_MPC, C.TIE_MPC, C.MPC, C.PIN_MPC, C.LINK_MPC], - csys: Optional[str] = None, + csys: str | None = None, userType: int = 0, userMode: Literal[C.DOF_MODE_MPC, C.USER_MPC, C.NODE_MODE_MPC] = DOF_MODE_MPC, ) -> MultipointConstraint: @@ -355,10 +357,10 @@ def RigidBody( self, name: str, refPointRegion: Region, - bodyRegion: Optional[str] = None, - tieRegion: Optional[str] = None, - pinRegion: Optional[str] = None, - surfaceRegion: Optional[str] = None, + bodyRegion: str | None = None, + tieRegion: str | None = None, + pinRegion: str | None = None, + surfaceRegion: str | None = None, refPointAtCOM: Boolean = OFF, isothermal: Boolean = OFF, ) -> RigidBody: diff --git a/src/abaqus/Constraint/Coupling.py b/src/abaqus/Constraint/Coupling.py index e809ff5adc..33a486aa25 100644 --- a/src/abaqus/Constraint/Coupling.py +++ b/src/abaqus/Constraint/Coupling.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -54,7 +56,7 @@ class Coupling(Constraint): #: None or a DatumCsys object specifying the initial orientation of the local coordinate #: system for the coupling's degrees of freedom. If **localCsys** = None, the coupling is #: defined in the global coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None #: A Boolean specifying if the displacement component in the 1-direction is constrained to #: the reference node for a kinematic coupling constraint. The default value is ON.The **u1** @@ -108,7 +110,7 @@ def __init__( influenceRadius: Union[Literal[C.WHOLE_SURFACE], float], couplingType: Literal[C.STRUCTURAL, C.DISTRIBUTING, C.KINEMATIC], adjust: Boolean = OFF, - localCsys: Optional[str] = None, + localCsys: str | None = None, u1: Boolean = ON, u2: Boolean = ON, u3: Boolean = ON, @@ -193,7 +195,7 @@ def __init__( def setValues( self, adjust: Boolean = OFF, - localCsys: Optional[str] = None, + localCsys: str | None = None, u1: Boolean = ON, u2: Boolean = ON, u3: Boolean = ON, diff --git a/src/abaqus/Constraint/EmbeddedRegion.py b/src/abaqus/Constraint/EmbeddedRegion.py index 774375d852..97b45c996e 100644 --- a/src/abaqus/Constraint/EmbeddedRegion.py +++ b/src/abaqus/Constraint/EmbeddedRegion.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -42,7 +42,7 @@ class EmbeddedRegion(Constraint): #: A Float specifying a small value below which the weighting factors will be zeroed out. #: The default value is 10⁻⁶. - weightFactorTolerance: Optional[float] = None + weightFactorTolerance: float | None = None #: A SymbolicConstant specifying the method used to determine the embedded element #: tolerance. Possible values are ABSOLUTE, FRACTIONAL, and BOTH. The default value is @@ -68,7 +68,7 @@ def __init__( name: str, embeddedRegion: Region, hostRegion: Region, - weightFactorTolerance: Optional[float] = None, + weightFactorTolerance: float | None = None, toleranceMethod: Literal[C.FRACTIONAL, C.BOTH, C.ABSOLUTE] = BOTH, absoluteTolerance: float = 0, fractionalTolerance: float = 0, @@ -118,7 +118,7 @@ def __init__( @abaqus_method_doc def setValues( self, - weightFactorTolerance: Optional[float] = None, + weightFactorTolerance: float | None = None, toleranceMethod: Literal[C.FRACTIONAL, C.BOTH, C.ABSOLUTE] = BOTH, absoluteTolerance: float = 0, fractionalTolerance: float = 0, diff --git a/src/abaqus/Constraint/MultipointConstraint.py b/src/abaqus/Constraint/MultipointConstraint.py index 6bd2b11559..d65009831b 100644 --- a/src/abaqus/Constraint/MultipointConstraint.py +++ b/src/abaqus/Constraint/MultipointConstraint.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -54,7 +54,7 @@ class MultipointConstraint(Constraint): #: system for the MultipointConstraint's degrees of freedom. If **localCsys** = None, the #: MultipointConstraint is defined in the global coordinate system. The default value is #: None. - csys: Optional[str] = None + csys: str | None = None #: An Int specifying to differentiate between different constraint types in a user-defined #: MultipointConstraint. The default value is 0.The **userType** argument applies only when @@ -73,7 +73,7 @@ def __init__( surface: Region, controlPoint: Region, mpcType: Literal[C.USER_MPC, C.BEAM_MPC, C.ELBOW_MPC, C.TIE_MPC, C.MPC, C.PIN_MPC, C.LINK_MPC], - csys: Optional[str] = None, + csys: str | None = None, userType: int = 0, userMode: Literal[C.DOF_MODE_MPC, C.USER_MPC, C.NODE_MODE_MPC] = DOF_MODE_MPC, ): @@ -120,7 +120,7 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[str] = None, + csys: str | None = None, userType: int = 0, userMode: Literal[C.DOF_MODE_MPC, C.USER_MPC, C.NODE_MODE_MPC] = DOF_MODE_MPC, ): diff --git a/src/abaqus/Constraint/RigidBody.py b/src/abaqus/Constraint/RigidBody.py index bb5e5f6fdd..fb83849291 100644 --- a/src/abaqus/Constraint/RigidBody.py +++ b/src/abaqus/Constraint/RigidBody.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -36,19 +36,19 @@ class RigidBody(Constraint): #: None or a Region object specifying the elements constrained to the movement of the #: reference point. The default value is None. - bodyRegion: Optional[str] = None + bodyRegion: str | None = None #: None or a Region object specifying the nodes tied to the movement of the reference #: point. The default value is None. - tieRegion: Optional[str] = None + tieRegion: str | None = None #: None or a Region object specifying the nodes pinned to the movement of the reference #: point. The default value is None. - pinRegion: Optional[str] = None + pinRegion: str | None = None #: None or a Region object specifying the analytic surface constrained to the movement of #: the reference point. The default value is None. - surfaceRegion: Optional[str] = None + surfaceRegion: str | None = None #: A Boolean specifying whether the analysis product should recompute the reference point #: position to be at the center of mass. The default value is OFF. @@ -63,10 +63,10 @@ def __init__( self, name: str, refPointRegion: Region, - bodyRegion: Optional[str] = None, - tieRegion: Optional[str] = None, - pinRegion: Optional[str] = None, - surfaceRegion: Optional[str] = None, + bodyRegion: str | None = None, + tieRegion: str | None = None, + pinRegion: str | None = None, + surfaceRegion: str | None = None, refPointAtCOM: Boolean = OFF, isothermal: Boolean = OFF, ): @@ -112,10 +112,10 @@ def __init__( @abaqus_method_doc def setValues( self, - bodyRegion: Optional[str] = None, - tieRegion: Optional[str] = None, - pinRegion: Optional[str] = None, - surfaceRegion: Optional[str] = None, + bodyRegion: str | None = None, + tieRegion: str | None = None, + pinRegion: str | None = None, + surfaceRegion: str | None = None, refPointAtCOM: Boolean = OFF, isothermal: Boolean = OFF, ): diff --git a/src/abaqus/CustomKernel/RepositorySupport.py b/src/abaqus/CustomKernel/RepositorySupport.py index 4b77111852..fea3bf7ab3 100644 --- a/src/abaqus/CustomKernel/RepositorySupport.py +++ b/src/abaqus/CustomKernel/RepositorySupport.py @@ -1,4 +1,6 @@ -from typing import Callable, List, Union +from __future__ import annotations + +from typing import Callable, Union from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -37,7 +39,7 @@ def __init__(self): super().__init__() @abaqus_method_doc - def Repository(self, name: str, constructors: Union[Callable, List[Callable]]) -> None: + def Repository(self, name: str, constructors: Union[Callable, list[Callable]]) -> None: """This method installs a repository on the class. The repository is an instance of a RegisteredDictionary class. Refer to RegisteredDictionary for details on its methods. The objects stored in the repository are assumed to have an attribute called **name** that stores the key used to access diff --git a/src/abaqus/Datum/DatumAxis.py b/src/abaqus/Datum/DatumAxis.py index 7c0c805dc1..9321a0ffeb 100644 --- a/src/abaqus/Datum/DatumAxis.py +++ b/src/abaqus/Datum/DatumAxis.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -24,7 +24,7 @@ class DatumAxis(Datum): #: A tuple of Floats specifying the **X**, **Y**, and **Z** coordinates of a point located on #: the datum. - pointOn: Optional[float] = None + pointOn: float | None = None #: A tuple of Floats specifying a sequence of three Floats specifying the direction of the #: axis. diff --git a/src/abaqus/Datum/DatumCsys.py b/src/abaqus/Datum/DatumCsys.py index 9bd115e5a7..eee9fd3ff5 100644 --- a/src/abaqus/Datum/DatumCsys.py +++ b/src/abaqus/Datum/DatumCsys.py @@ -1,4 +1,4 @@ -from typing import Optional, Tuple +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -32,7 +32,7 @@ class DatumCsys(Datum): #: A SymbolicConstant specifying the type of the coordinate system. Possible values are #: CARTESIAN, CYLINDRICAL, and SPHERICAL. - coordSysType: Optional[SymbolicConstant] = None + coordSysType: SymbolicConstant #: A DatumPoint object specifying the origin of the coordinate system. origin: DatumPoint = DatumPoint() @@ -47,7 +47,7 @@ class DatumCsys(Datum): axis3: DatumAxis = DatumAxis() @abaqus_method_doc - def globalToLocal(self, coordinates: Tuple[float, float, float]) -> Tuple[float, float, float]: + def globalToLocal(self, coordinates: tuple[float, float, float]) -> tuple[float, float, float]: """This method transforms specified coordinates in the global coordinate system into this local coordinate system. @@ -61,13 +61,13 @@ def globalToLocal(self, coordinates: Tuple[float, float, float]) -> Tuple[float, Returns ------- - Tuple[float, float, float] + tuple[float, float, float] A tuple of three Floats representing the coordinates in this local coordinate system. """ - ... + return (0.0, 0.0, 0.0) @abaqus_method_doc - def localToGlobal(self, coordinates: Tuple[float, float, float]) -> Tuple[float, float, float]: + def localToGlobal(self, coordinates: tuple[float, float, float]) -> tuple[float, float, float]: """This method transforms specified coordinates in this local coordinate system into the global coordinate system. @@ -81,7 +81,7 @@ def localToGlobal(self, coordinates: Tuple[float, float, float]) -> Tuple[float, Returns ------- - Tuple[float, float, float] + tuple[float, float, float] A tuple of three Floats representing the coordinates in this global coordinate system. """ - ... + return (0.0, 0.0, 0.0) diff --git a/src/abaqus/Datum/DatumPlane.py b/src/abaqus/Datum/DatumPlane.py index b118434903..761082ab62 100644 --- a/src/abaqus/Datum/DatumPlane.py +++ b/src/abaqus/Datum/DatumPlane.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -24,7 +24,7 @@ class DatumPlane(Datum): #: A tuple of Floats specifying the **X**, **Y**, and **Z** coordinates of a point located on #: the datum. - pointOn: Optional[float] = None + pointOn: float | None = None #: A tuple of Floats specifying a sequence of three Floats specifying the normal. normal: tuple = () diff --git a/src/abaqus/Datum/DatumPoint.py b/src/abaqus/Datum/DatumPoint.py index 5204a2ef21..a75578bee8 100644 --- a/src/abaqus/Datum/DatumPoint.py +++ b/src/abaqus/Datum/DatumPoint.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -24,4 +24,4 @@ class DatumPoint(Datum): #: A tuple of Floats specifying the **X**, **Y**, and **Z** coordinates of a point located on #: the datum. - pointOn: Optional[float] = None + pointOn: float | None = None diff --git a/src/abaqus/DisplayGroup/DisplayGroup.py b/src/abaqus/DisplayGroup/DisplayGroup.py index f94d88336c..23b270ca1e 100644 --- a/src/abaqus/DisplayGroup/DisplayGroup.py +++ b/src/abaqus/DisplayGroup/DisplayGroup.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -36,7 +36,7 @@ class DisplayGroup: #: A SymbolicConstant specifying the module in which the display group has been created. #: The possible values are PART, ASSEMBLY, PART_ASSEMBLY, ODB, and ALL. - module: Optional[SymbolicConstant] = None + module: SymbolicConstant #: A String specifying the name of the model to which the display group belongs when the #: module is part- or assembly-based. diff --git a/src/abaqus/DisplayGroup/DisplayGroupArray.py b/src/abaqus/DisplayGroup/DisplayGroupArray.py index c543bb4922..d4452d6e55 100644 --- a/src/abaqus/DisplayGroup/DisplayGroupArray.py +++ b/src/abaqus/DisplayGroup/DisplayGroupArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .DisplayGroup import DisplayGroup diff --git a/src/abaqus/DisplayGroup/LeafFromConstraintNames.py b/src/abaqus/DisplayGroup/LeafFromConstraintNames.py index ff5aad008b..6b488cd1e7 100644 --- a/src/abaqus/DisplayGroup/LeafFromConstraintNames.py +++ b/src/abaqus/DisplayGroup/LeafFromConstraintNames.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -27,7 +27,7 @@ class LeafFromConstraintNames(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are TIE, #: SHELL_TO_SOLID_COUPLING, DISTRIBUTING_COUPLING, KINEMATIC_COUPLING, RIGID_BODY, and MPC. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__( diff --git a/src/abaqus/DisplayGroup/LeafFromDatums.py b/src/abaqus/DisplayGroup/LeafFromDatums.py index 7e4e15b032..a47361e4fc 100644 --- a/src/abaqus/DisplayGroup/LeafFromDatums.py +++ b/src/abaqus/DisplayGroup/LeafFromDatums.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +23,7 @@ class LeafFromDatums(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, datumSeq: Sequence[Datum]): diff --git a/src/abaqus/DisplayGroup/LeafFromDisplayGroup.py b/src/abaqus/DisplayGroup/LeafFromDisplayGroup.py index 4aeb2c4a9f..1caaeb21ea 100644 --- a/src/abaqus/DisplayGroup/LeafFromDisplayGroup.py +++ b/src/abaqus/DisplayGroup/LeafFromDisplayGroup.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -23,7 +23,7 @@ class LeafFromDisplayGroup(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A DisplayGroupArray object. displayGroup: DisplayGroupArray diff --git a/src/abaqus/DisplayGroup/LeafFromElementLabels.py b/src/abaqus/DisplayGroup/LeafFromElementLabels.py index a1350f10e8..74b938fd8a 100644 --- a/src/abaqus/DisplayGroup/LeafFromElementLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromElementLabels.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromElementLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A String specifying the name of the part instance to which **elementLabels** refers. partInstanceName: str diff --git a/src/abaqus/DisplayGroup/LeafFromElementSets.py b/src/abaqus/DisplayGroup/LeafFromElementSets.py index 7eb29a13f9..ec1f9c8c7b 100644 --- a/src/abaqus/DisplayGroup/LeafFromElementSets.py +++ b/src/abaqus/DisplayGroup/LeafFromElementSets.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromElementSets(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A sequence of Strings specifying element sets or a String specifying a single element #: set. diff --git a/src/abaqus/DisplayGroup/LeafFromElementVarRange.py b/src/abaqus/DisplayGroup/LeafFromElementVarRange.py index db2a4f09c6..31dd46b498 100644 --- a/src/abaqus/DisplayGroup/LeafFromElementVarRange.py +++ b/src/abaqus/DisplayGroup/LeafFromElementVarRange.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -26,11 +26,11 @@ class LeafFromElementVarRange(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A Float specifying the minimum value for the variable range. The default value is #: −3.40282346639E38. - minimumRange: Optional[float] = None + minimumRange: float | None = None #: A Float specifying the maximum value for the variable range. The default value is #: 3.40282346639e+038. @@ -43,7 +43,7 @@ class LeafFromElementVarRange(Leaf): @abaqus_method_doc def __init__( self, - minimumRange: Optional[float] = None, + minimumRange: float | None = None, maximumRange: float = 3, insideRange: Boolean = ON, ): diff --git a/src/abaqus/DisplayGroup/LeafFromGeometry.py b/src/abaqus/DisplayGroup/LeafFromGeometry.py index ebc43fb4d7..5e2704a8b5 100644 --- a/src/abaqus/DisplayGroup/LeafFromGeometry.py +++ b/src/abaqus/DisplayGroup/LeafFromGeometry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromGeometry(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, edgeSeq: tuple = (), faceSeq: tuple = (), cellSeq: tuple = ()): diff --git a/src/abaqus/DisplayGroup/LeafFromInstance.py b/src/abaqus/DisplayGroup/LeafFromInstance.py index 0288620a72..41c945c3db 100644 --- a/src/abaqus/DisplayGroup/LeafFromInstance.py +++ b/src/abaqus/DisplayGroup/LeafFromInstance.py @@ -1,5 +1,3 @@ -from typing import Optional - from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..Assembly.PartInstance import PartInstance @@ -22,7 +20,7 @@ class LeafFromInstance(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, instances: PartInstance): diff --git a/src/abaqus/DisplayGroup/LeafFromInstanceElementLabels.py b/src/abaqus/DisplayGroup/LeafFromInstanceElementLabels.py index 7f3ec29e3e..0ac76a69d5 100644 --- a/src/abaqus/DisplayGroup/LeafFromInstanceElementLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromInstanceElementLabels.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromInstanceElementLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, elementLabels: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromInstanceNodeLabels.py b/src/abaqus/DisplayGroup/LeafFromInstanceNodeLabels.py index 25d5c8bcb9..af1f0bc586 100644 --- a/src/abaqus/DisplayGroup/LeafFromInstanceNodeLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromInstanceNodeLabels.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromInstanceNodeLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, nodeLabels: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromMeshElementLabels.py b/src/abaqus/DisplayGroup/LeafFromMeshElementLabels.py index 7ce16f05db..e64cf777f0 100644 --- a/src/abaqus/DisplayGroup/LeafFromMeshElementLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromMeshElementLabels.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -22,7 +24,7 @@ class LeafFromMeshElementLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, elementSeq: Sequence[MeshElement]): diff --git a/src/abaqus/DisplayGroup/LeafFromMeshNodeLabels.py b/src/abaqus/DisplayGroup/LeafFromMeshNodeLabels.py index ffb6a8b911..b2e9460505 100644 --- a/src/abaqus/DisplayGroup/LeafFromMeshNodeLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromMeshNodeLabels.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -22,7 +24,7 @@ class LeafFromMeshNodeLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, nodeSeq: Sequence[MeshNode]): diff --git a/src/abaqus/DisplayGroup/LeafFromMeshSurfaceSets.py b/src/abaqus/DisplayGroup/LeafFromMeshSurfaceSets.py index 8c33f5705c..cb6c57c0a7 100644 --- a/src/abaqus/DisplayGroup/LeafFromMeshSurfaceSets.py +++ b/src/abaqus/DisplayGroup/LeafFromMeshSurfaceSets.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -22,7 +24,7 @@ class LeafFromMeshSurfaceSets(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, surfaceSets: Sequence[Surface]): diff --git a/src/abaqus/DisplayGroup/LeafFromModelElemLabels.py b/src/abaqus/DisplayGroup/LeafFromModelElemLabels.py index 771275fcf9..b55b4ced4d 100644 --- a/src/abaqus/DisplayGroup/LeafFromModelElemLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromModelElemLabels.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromModelElemLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A sequence of Strings specifying expressions that denote element labels per part #: instance in the model. Each part instance element expression is a sequence of a String diff --git a/src/abaqus/DisplayGroup/LeafFromModelNodeLabels.py b/src/abaqus/DisplayGroup/LeafFromModelNodeLabels.py index 7426e7acc5..b9087c3aef 100644 --- a/src/abaqus/DisplayGroup/LeafFromModelNodeLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromModelNodeLabels.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromModelNodeLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A sequence of Strings specifying expressions that denote node labels per part instance #: in the model. Each part instance node expression is a sequence of a String specifying diff --git a/src/abaqus/DisplayGroup/LeafFromNodeLabels.py b/src/abaqus/DisplayGroup/LeafFromNodeLabels.py index 3be926cbe7..4019f06b40 100644 --- a/src/abaqus/DisplayGroup/LeafFromNodeLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromNodeLabels.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromNodeLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A String specifying the name of the part instance to which **nodeLabels** refers. partInstanceName: str diff --git a/src/abaqus/DisplayGroup/LeafFromNodeSets.py b/src/abaqus/DisplayGroup/LeafFromNodeSets.py index b1725cd60e..40f708d497 100644 --- a/src/abaqus/DisplayGroup/LeafFromNodeSets.py +++ b/src/abaqus/DisplayGroup/LeafFromNodeSets.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromNodeSets(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A sequence of Strings specifying node sets or a String specifying a single node set. nodeSets: tuple diff --git a/src/abaqus/DisplayGroup/LeafFromNodeVarRange.py b/src/abaqus/DisplayGroup/LeafFromNodeVarRange.py index 8d68f6ccdb..cf8d023f6b 100644 --- a/src/abaqus/DisplayGroup/LeafFromNodeVarRange.py +++ b/src/abaqus/DisplayGroup/LeafFromNodeVarRange.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -26,11 +26,11 @@ class LeafFromNodeVarRange(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A Float specifying the minimum value for the variable range. The default value is #: −3.40282346639E38. - minimumRange: Optional[float] = None + minimumRange: float | None = None #: A Float specifying the maximum value for the variable range. The default value is #: 3.40282346639e+038. @@ -43,7 +43,7 @@ class LeafFromNodeVarRange(Leaf): @abaqus_method_doc def __init__( self, - minimumRange: Optional[float] = None, + minimumRange: float | None = None, maximumRange: float = 3, insideRange: Boolean = ON, ): diff --git a/src/abaqus/DisplayGroup/LeafFromOdbEdgePick.py b/src/abaqus/DisplayGroup/LeafFromOdbEdgePick.py index 1cf16a3927..f2fb03c93f 100644 --- a/src/abaqus/DisplayGroup/LeafFromOdbEdgePick.py +++ b/src/abaqus/DisplayGroup/LeafFromOdbEdgePick.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromOdbEdgePick(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, edgePick: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromOdbElementLayups.py b/src/abaqus/DisplayGroup/LeafFromOdbElementLayups.py index 8550ad009b..25cd107c9d 100644 --- a/src/abaqus/DisplayGroup/LeafFromOdbElementLayups.py +++ b/src/abaqus/DisplayGroup/LeafFromOdbElementLayups.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromOdbElementLayups(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, elementLayups: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromOdbElementMaterials.py b/src/abaqus/DisplayGroup/LeafFromOdbElementMaterials.py index 8ccccc64bb..73e5107a34 100644 --- a/src/abaqus/DisplayGroup/LeafFromOdbElementMaterials.py +++ b/src/abaqus/DisplayGroup/LeafFromOdbElementMaterials.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromOdbElementMaterials(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, elementMaterials: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromOdbElementPick.py b/src/abaqus/DisplayGroup/LeafFromOdbElementPick.py index b4ef13958c..19c2edcaaf 100644 --- a/src/abaqus/DisplayGroup/LeafFromOdbElementPick.py +++ b/src/abaqus/DisplayGroup/LeafFromOdbElementPick.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromOdbElementPick(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, elementPick: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromOdbElementPlies.py b/src/abaqus/DisplayGroup/LeafFromOdbElementPlies.py index f75a6d19b4..3183db8541 100644 --- a/src/abaqus/DisplayGroup/LeafFromOdbElementPlies.py +++ b/src/abaqus/DisplayGroup/LeafFromOdbElementPlies.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromOdbElementPlies(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, elementPlies: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromOdbElementSections.py b/src/abaqus/DisplayGroup/LeafFromOdbElementSections.py index 4b18832f5f..cd8a43a717 100644 --- a/src/abaqus/DisplayGroup/LeafFromOdbElementSections.py +++ b/src/abaqus/DisplayGroup/LeafFromOdbElementSections.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromOdbElementSections(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, elementSections: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromOdbElementTypes.py b/src/abaqus/DisplayGroup/LeafFromOdbElementTypes.py index e12bf7e190..de8b28c0c2 100644 --- a/src/abaqus/DisplayGroup/LeafFromOdbElementTypes.py +++ b/src/abaqus/DisplayGroup/LeafFromOdbElementTypes.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromOdbElementTypes(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, elementTypes: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromOdbNodePick.py b/src/abaqus/DisplayGroup/LeafFromOdbNodePick.py index c9047911f4..208d83608b 100644 --- a/src/abaqus/DisplayGroup/LeafFromOdbNodePick.py +++ b/src/abaqus/DisplayGroup/LeafFromOdbNodePick.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromOdbNodePick(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, nodePick: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromPartElementLabels.py b/src/abaqus/DisplayGroup/LeafFromPartElementLabels.py index e3d03d2ee6..04a90e2486 100644 --- a/src/abaqus/DisplayGroup/LeafFromPartElementLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromPartElementLabels.py @@ -1,5 +1,3 @@ -from typing import Optional - from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..Part.Part import Part @@ -22,7 +20,7 @@ class LeafFromPartElementLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, part: Part, elementLabels: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromPartInstance.py b/src/abaqus/DisplayGroup/LeafFromPartInstance.py index 1e6ff65faf..f69abbda76 100644 --- a/src/abaqus/DisplayGroup/LeafFromPartInstance.py +++ b/src/abaqus/DisplayGroup/LeafFromPartInstance.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromPartInstance(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A sequence of Strings specifying the names of the part instances. partInstanceName: tuple diff --git a/src/abaqus/DisplayGroup/LeafFromPartNodeLabels.py b/src/abaqus/DisplayGroup/LeafFromPartNodeLabels.py index 5e3547bae6..e94cadd162 100644 --- a/src/abaqus/DisplayGroup/LeafFromPartNodeLabels.py +++ b/src/abaqus/DisplayGroup/LeafFromPartNodeLabels.py @@ -1,5 +1,3 @@ -from typing import Optional - from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..Part.Part import Part @@ -22,7 +20,7 @@ class LeafFromPartNodeLabels(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, part: Part, nodeLabels: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromReferencePoint.py b/src/abaqus/DisplayGroup/LeafFromReferencePoint.py index 08b3c70cdb..0f5c91ae04 100644 --- a/src/abaqus/DisplayGroup/LeafFromReferencePoint.py +++ b/src/abaqus/DisplayGroup/LeafFromReferencePoint.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromReferencePoint(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, refPtSeq: tuple): diff --git a/src/abaqus/DisplayGroup/LeafFromSets.py b/src/abaqus/DisplayGroup/LeafFromSets.py index 68bc9d856f..71c872616b 100644 --- a/src/abaqus/DisplayGroup/LeafFromSets.py +++ b/src/abaqus/DisplayGroup/LeafFromSets.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +23,7 @@ class LeafFromSets(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant @abaqus_method_doc def __init__(self, sets: Sequence[Set]): diff --git a/src/abaqus/DisplayGroup/LeafFromSurfaceSets.py b/src/abaqus/DisplayGroup/LeafFromSurfaceSets.py index 1e8acb8e0a..47d89cb4ab 100644 --- a/src/abaqus/DisplayGroup/LeafFromSurfaceSets.py +++ b/src/abaqus/DisplayGroup/LeafFromSurfaceSets.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ class LeafFromSurfaceSets(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A sequence of Strings specifying surface sets, or a String specifying a single surface #: set. diff --git a/src/abaqus/DisplayGroup/LeafFromSurfaceVarRange.py b/src/abaqus/DisplayGroup/LeafFromSurfaceVarRange.py index 4e3d03a0ef..d7d00d6c9b 100644 --- a/src/abaqus/DisplayGroup/LeafFromSurfaceVarRange.py +++ b/src/abaqus/DisplayGroup/LeafFromSurfaceVarRange.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -26,11 +26,11 @@ class LeafFromSurfaceVarRange(Leaf): #: A SymbolicConstant specifying the leaf type. Possible values are EMPTY_LEAF, #: DEFAULT_MODEL, ALL_ELEMENTS, ALL_NODES, and ALL_SURFACES. - leafType: Optional[SymbolicConstant] = None + leafType: SymbolicConstant #: A Float specifying the minimum value for the variable range. The default value is #: −3.40282346639E38. - minimumRange: Optional[float] = None + minimumRange: float | None = None #: A Float specifying the maximum value for the variable range. The default value is #: 3.40282346639e+038. @@ -43,7 +43,7 @@ class LeafFromSurfaceVarRange(Leaf): @abaqus_method_doc def __init__( self, - minimumRange: Optional[float] = None, + minimumRange: float | None = None, maximumRange: float = 3, insideRange: Boolean = ON, ): diff --git a/src/abaqus/DisplayOptions/AssemblyDisplayOptions.py b/src/abaqus/DisplayOptions/AssemblyDisplayOptions.py index 39c3750faf..c7b43d981d 100644 --- a/src/abaqus/DisplayOptions/AssemblyDisplayOptions.py +++ b/src/abaqus/DisplayOptions/AssemblyDisplayOptions.py @@ -1,4 +1,6 @@ -from typing import Dict, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -117,7 +119,7 @@ class AssemblyDisplayOptions: displayGroup: DisplayGroup = DisplayGroup("dg", Leaf(EMPTY_LEAF)) #: A repository of DisplayGroupInstance objects. - displayGroupInstances: Dict[str, DisplayGroupInstance] = {} + displayGroupInstances: dict[str, DisplayGroupInstance] = {} #: An EngineeringFeatureDisplayOptions object. engineeringFeatureOptions: EngineeringFeatureDisplayOptions = EngineeringFeatureDisplayOptions() diff --git a/src/abaqus/DisplayOptions/GraphicsOptions.py b/src/abaqus/DisplayOptions/GraphicsOptions.py index 2ec5368ab6..bd5d2f0258 100644 --- a/src/abaqus/DisplayOptions/GraphicsOptions.py +++ b/src/abaqus/DisplayOptions/GraphicsOptions.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -58,7 +60,7 @@ class GraphicsOptions: #: A SymbolicConstant specifying the graphics driver to use. Abaqus/CAE currently uses #: OpenGL exclusively so the only possible value is OPEN_GL. OPEN_GL takes advantage of #: graphics adapter hardware acceleration. - graphicsDriver: Optional[SymbolicConstant] = None + graphicsDriver: SymbolicConstant #: A Boolean specifying whether double buffering is used. The default value is ON.Double #: buffering controls where Abaqus/CAE draws its graphics. When **doubleBuffering** = OFF, @@ -101,20 +103,20 @@ class GraphicsOptions: #: **polygonOffsetConstant** argument affects the behavior of only the OpenGL driver. #: Possible values are 0.0 ≤ **polygonOffsetConstant** ≤ 100.0. The default value is #: platform dependent and is typically between 0.0 and 2.0. - polygonOffsetConstant: Optional[float] = None + polygonOffsetConstant: float | None = None #: A Float specifying the factor that multiplies the slope of each line before the line is #: added to the vertexes of a polygon face. The **polygonOffsetSlope** argument affects the #: behavior of only the OpenGL driver. Possible values are 0.0 ≤ **polygonOffsetSlope** ≤ #: 100.0. The default value is platform dependent and is typically between 0.0 and 2.0. - polygonOffsetSlope: Optional[float] = None + polygonOffsetSlope: float | None = None #: A Float specifying the offset added when drawing the faces of a polygon. #: **printPolygonOffsetConstant** is similar to **polygonOffsetConstant**; however, #: **printPolygonOffsetConstant** is used when printing and **polygonOffsetConstant** is used #: for display. Some systems, especially Windows, use different OpenGL drivers for printing #: and display, and you may have to use different offset values for each driver. - printPolygonOffsetConstant: Optional[float] = None + printPolygonOffsetConstant: float | None = None #: A Float specifying the factor that multiplies the slope of each line before the line is #: added to the vertexes of a polygon face. **printPolygonOffsetSlope** is similar to @@ -122,7 +124,7 @@ class GraphicsOptions: #: **polygonOffsetSlope** is used for display. Some systems, especially Windows, use #: different OpenGL drivers for printing and display, and you may have to use different #: offset values for each driver. - printPolygonOffsetSlope: Optional[float] = None + printPolygonOffsetSlope: float | None = None #: A Boolean specifying how the three-dimensional vertices of the model are processed. When #: **vertexArrays** = OFF, each vertex of the model is processed separately. When @@ -220,7 +222,7 @@ class GraphicsOptions: #: A SymbolicConstant specifying the highlight method. For the GraphicsOptions object, #: possible values of the member are HARDWARE_OVERLAY, XOR, SOFTWARE_OVERLAY, and BLEND. - highlightMethod: Optional[SymbolicConstant] = None + highlightMethod: SymbolicConstant #: A Boolean specifying if the graphics hardware supports hardware overlay. hardwareOverlayAvailable: Boolean = OFF @@ -245,7 +247,7 @@ class GraphicsOptions: #: None or a GraphicsOptions object specifying the object from which values are to be #: copied. If other arguments are also supplied to setValues, they will override the values #: in the **options** member. The default value is None. - options: Optional[str] = None + options: str | None = None #: A tuple of SymbolicConstants specifying a hint used to modify the highlight method. #: Possible values are:HARDWARE_OVERLAY, specifying a hint of hardware overlay. The best @@ -264,7 +266,7 @@ class GraphicsOptions: #: alternative.You can use a single value to set the first element of the list, or you can #: use a tuple with one to four unique values. Abaqus sets any remaining elements of the #: tuple to unique values based on the default order. - highlightMethodHint: SymbolicConstant = (HARDWARE_OVERLAY, XOR, SOFTWARE_OVERLAY, BLEND) + highlightMethodHint: tuple[SymbolicConstant, ...] = (HARDWARE_OVERLAY, XOR, SOFTWARE_OVERLAY, BLEND) #: A String specifying one of the two background colors for all viewport windows. The #: initial color is black. A list of valid color strings is in the **colors** map in the @@ -279,7 +281,7 @@ class GraphicsOptions: @abaqus_method_doc def setValues( self, - graphicsDriver: Optional[Literal[C.OPEN_GL]] = None, + graphicsDriver: Literal[C.OPEN_GL] | None = None, doubleBuffering: Boolean = ON, displayLists: Boolean = ON, highlightMethodHint: Sequence[Literal[C.SOFTWARE_OVERLAY, C.HARDWARE_OVERLAY, C.XOR]] = ( @@ -291,10 +293,10 @@ def setValues( dragMode: Literal[C.FAST, C.AS_IS] = AS_IS, antiAlias: Boolean = ON, autoFitAfterRotate: Boolean = OFF, - polygonOffsetConstant: Optional[float] = None, - polygonOffsetSlope: Optional[float] = None, - printPolygonOffsetConstant: Optional[float] = None, - printPolygonOffsetSlope: Optional[float] = None, + polygonOffsetConstant: float | None = None, + polygonOffsetSlope: float | None = None, + printPolygonOffsetConstant: float | None = None, + printPolygonOffsetSlope: float | None = None, vertexArrays: Boolean = ON, vertexArraysInDisplayLists: Boolean = ON, viewManipDisplayListThreshold: int = 40, @@ -312,7 +314,7 @@ def setValues( backingStore: Boolean = ON, shadersAvailable: Boolean = OFF, translucencyMode: int = 4, - options: Optional[str] = None, + options: str | None = None, contourRangeTexturePrecision: float = 0, ): """This method modifies the GraphicsOptions object. diff --git a/src/abaqus/DisplayOptions/LightArray.py b/src/abaqus/DisplayOptions/LightArray.py index 31dd6bb1ae..bbbdf62e23 100644 --- a/src/abaqus/DisplayOptions/LightArray.py +++ b/src/abaqus/DisplayOptions/LightArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .Light import Light diff --git a/src/abaqus/DisplayOptions/PartDisplayOptions.py b/src/abaqus/DisplayOptions/PartDisplayOptions.py index 771ea16e61..1e13d99b6a 100644 --- a/src/abaqus/DisplayOptions/PartDisplayOptions.py +++ b/src/abaqus/DisplayOptions/PartDisplayOptions.py @@ -1,4 +1,6 @@ -from typing import Dict, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -56,7 +58,7 @@ class PartDisplayOptions: displayGroup: DisplayGroup = DisplayGroup("dg", Leaf(EMPTY_LEAF)) #: A repository of DisplayGroupInstance objects. - displayGroupInstances: Dict[str, DisplayGroupInstance] = {} + displayGroupInstances: dict[str, DisplayGroupInstance] = {} #: An EngineeringFeatureDisplayOptions object. engineeringFeatureOptions: EngineeringFeatureDisplayOptions = EngineeringFeatureDisplayOptions() diff --git a/src/abaqus/DisplayOptions/ViewportAnnotationOptions.py b/src/abaqus/DisplayOptions/ViewportAnnotationOptions.py index 0e825814b1..c328fcd4b8 100644 --- a/src/abaqus/DisplayOptions/ViewportAnnotationOptions.py +++ b/src/abaqus/DisplayOptions/ViewportAnnotationOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -40,7 +40,7 @@ class ViewportAnnotationOptions: def setValues( self, triad: Boolean = ON, - triadPosition: Optional[int] = None, + triadPosition: int | None = None, triadColor: str = "", triadLabels: Literal[C.NUMBERS, C.LETTERS] = NUMBERS, triadFont: str = "", @@ -49,21 +49,21 @@ def setValues( legendMinMax: Boolean = OFF, legendBox: Boolean = ON, legendDecimalPlaces: int = 3, - legendPosition: Optional[int] = None, + legendPosition: int | None = None, legendFont: str = "", legendTextColor: str = "", legendBackgroundStyle: Literal[C.OTHER, C.MATCH, C.TRANSPARENT] = TRANSPARENT, legendBackgroundColor: str = "", title: Boolean = ON, titleBox: Boolean = OFF, - titlePosition: Optional[int] = None, + titlePosition: int | None = None, titleFont: str = "", titleTextColor: str = "", titleBackgroundStyle: Literal[C.OTHER, C.MATCH, C.TRANSPARENT] = TRANSPARENT, titleBackgroundColor: str = "", state: Boolean = ON, stateBox: Boolean = OFF, - statePosition: Optional[int] = None, + statePosition: int | None = None, stateFont: str = "", stateTextColor: str = "", stateBackgroundStyle: Literal[C.OTHER, C.MATCH, C.TRANSPARENT] = TRANSPARENT, diff --git a/src/abaqus/EditMesh/MeshEditAssembly.py b/src/abaqus/EditMesh/MeshEditAssembly.py index 983fe715c9..68769c42b4 100644 --- a/src/abaqus/EditMesh/MeshEditAssembly.py +++ b/src/abaqus/EditMesh/MeshEditAssembly.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, overload +from __future__ import annotations + +from typing import Sequence, overload from typing_extensions import Literal @@ -85,14 +87,14 @@ def projectNode(self, nodes: Sequence[MeshNode], projectionReference: str): def editNode( self, nodes: Sequence[MeshNode], - coordinate1: Optional[float] = None, - coordinate2: Optional[float] = None, - coordinate3: Optional[float] = None, + coordinate1: float | None = None, + coordinate2: float | None = None, + coordinate3: float | None = None, coordinates: Sequence[float] = (), - offset1: Optional[float] = None, - offset2: Optional[float] = None, - offset3: Optional[float] = None, - localCsys: Optional[DatumCsys] = None, + offset1: float | None = None, + offset2: float | None = None, + offset3: float | None = None, + localCsys: DatumCsys | None = None, projectToGeometry: Boolean = ON, ): """This method changes the coordinates of the given nodes on a part instance. @@ -145,7 +147,7 @@ def editNode( def mergeNodes( self, nodes: Sequence[MeshNode], - tolerance: Optional[float] = None, + tolerance: float | None = None, removeDuplicateElements: Boolean = True, ): """Merge the nodes of a part instance. The nodes must have been generated using the bottom-up meshing @@ -233,7 +235,7 @@ def generateMeshByOffset( numLayers: int, offsetDirection: str = OUTWARD, initialOffset: float = 0.0, - shareNodes: str = False, + shareNodes: Boolean = False, deleteBaseElements: Boolean = False, constantThicknessCorners: Boolean = False, extendElementSets: Boolean = False, diff --git a/src/abaqus/EditMesh/MeshEditPart.py b/src/abaqus/EditMesh/MeshEditPart.py index 32fc8e8161..48abaf36e6 100644 --- a/src/abaqus/EditMesh/MeshEditPart.py +++ b/src/abaqus/EditMesh/MeshEditPart.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, overload +from __future__ import annotations + +from typing import Sequence, overload from typing_extensions import Literal @@ -53,7 +55,7 @@ def cleanMesh( growEdges: Boolean = OFF, elements: str = "", refEdge: str = "", - thicknessDir: Optional[float] = None, + thicknessDir: float | None = None, moveLayers: Boolean = False, ): """This method is used to collapse short element edges and delete collapsed elements, or grow short @@ -158,14 +160,14 @@ def deleteNode(self, nodes: Sequence[MeshNode], deleteUnreferencedNodes: Boolean def editNode( self, nodes: Sequence[MeshNode], - coordinate1: Optional[float] = None, - coordinate2: Optional[float] = None, - coordinate3: Optional[float] = None, + coordinate1: float | None = None, + coordinate2: float | None = None, + coordinate3: float | None = None, coordinates: Sequence[float] = (), - offset1: Optional[float] = None, - offset2: Optional[float] = None, - offset3: Optional[float] = None, - localCsys: Optional[DatumCsys] = None, + offset1: float | None = None, + offset2: float | None = None, + offset3: float | None = None, + localCsys: DatumCsys | None = None, projectToGeometry: Boolean = ON, ): """This method changes the coordinates of the given nodes on an orphan mesh part or on an Abaqus native @@ -231,7 +233,7 @@ def projectNode(self, nodes: Sequence[MeshNode], projectionReference: str): ... @abaqus_method_doc - def generateMesh(self, elemShape: Optional[SymbolicConstant] = None): + def generateMesh(self, elemShape: SymbolicConstant | None = None): """This method generates a new mesh on an orphan mesh part based on the original mesh. Parameters @@ -254,7 +256,7 @@ def generateMeshByOffset( numLayers: int, offsetDirection: str = OUTWARD, initialOffset: float = 0.0, - shareNodes: str = False, + shareNodes: Boolean = False, deleteBaseElements: Boolean = False, constantThicknessCorners: Boolean = False, extendElementSets: Boolean = False, @@ -320,7 +322,7 @@ def mergeElement(self, edge: str, elements: str): def mergeNodes( self, nodes: Sequence[Node], - tolerance: Optional[float] = None, + tolerance: float | None = None, removeDuplicateElements: Boolean = True, keepHighLabels: Boolean = False, ): @@ -400,9 +402,9 @@ def removeElementSize(self): def renumberElement( self, elements: tuple = (), - startLabel: Optional[int] = None, - increment: Optional[int] = None, - offset: Optional[int] = None, + startLabel: int | None = None, + increment: int | None = None, + offset: int | None = None, labels: str = "", ): """This method assigns new labels to orphan mesh elements. @@ -440,9 +442,9 @@ def renumberElement( def renumberNode( self, nodes: tuple = (), - startLabel: Optional[int] = None, - increment: Optional[int] = None, - offset: Optional[int] = None, + startLabel: int | None = None, + increment: int | None = None, + offset: int | None = None, labels: str = "", ): """This method assigns new labels to orphan mesh nodes. @@ -520,8 +522,8 @@ def subdivideElement( self, elements: str = "", divisionNumber: int = 2, - face: Optional[MeshFace] = None, - edge: Optional[MeshEdge] = None, + face: MeshFace | None = None, + edge: MeshEdge | None = None, ): """Subdivide a selection of elements on an orphan mesh part in one or more directions. diff --git a/src/abaqus/EngineeringFeature/AssembledFastener.py b/src/abaqus/EngineeringFeature/AssembledFastener.py index 2f14a0a220..12e2eabde9 100644 --- a/src/abaqus/EngineeringFeature/AssembledFastener.py +++ b/src/abaqus/EngineeringFeature/AssembledFastener.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -63,7 +63,7 @@ class AssembledFastener(Fastener): #: None or a DatumCsys object specifying the local coordinate system. If **localCsys** = None, #: the global coordinate system is used. When this member is queried, it returns an Int. #: The default value is None.This argument applies only when **orientMethod** = CSYS. - localCsys: Optional[int] = None + localCsys: int | None = None #: A String specifying the name of the property generation script. The default value is an #: empty string. @@ -80,7 +80,7 @@ def __init__( assignedSurfaces: tuple, propertyPrefix: str, orientMethod: Literal[C.NORMALS, C.CSYS] = NORMALS, - localCsys: Optional[int] = None, + localCsys: int | None = None, scriptName: str = "", ): """This method creates an AssembledFastener object. Although the constructor is available both for parts @@ -137,7 +137,7 @@ def __init__( def setValues( self, orientMethod: Literal[C.NORMALS, C.CSYS] = NORMALS, - localCsys: Optional[int] = None, + localCsys: int | None = None, scriptName: str = "", ): """This method modifies the AssembledFastener object. diff --git a/src/abaqus/EngineeringFeature/DataImperfection.py b/src/abaqus/EngineeringFeature/DataImperfection.py index eba87a7195..0a97aa843b 100644 --- a/src/abaqus/EngineeringFeature/DataImperfection.py +++ b/src/abaqus/EngineeringFeature/DataImperfection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence, Union from typing_extensions import Literal @@ -77,7 +79,10 @@ def __init__( DataImperfection A DataImperfection object. """ - super().__init__(name) + super().__init__() + self.name = name + self.imperfectionTable = imperfectionTable + self.system = system def setValues( self, diff --git a/src/abaqus/EngineeringFeature/DiscreteFastener.py b/src/abaqus/EngineeringFeature/DiscreteFastener.py index de2254bb83..bf7d764492 100644 --- a/src/abaqus/EngineeringFeature/DiscreteFastener.py +++ b/src/abaqus/EngineeringFeature/DiscreteFastener.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -77,7 +79,7 @@ class DiscreteFastener(Fastener): #: None or a DatumCsys object specifying the local coordinate system of fastener couplings. #: If **localCsys** = None, couplings are defined in the global coordinate system. When this #: member is queried, it returns an Int. The default value is None. - localCsys: Optional[int] = None + localCsys: int | None = None @abaqus_method_doc def __init__( @@ -90,7 +92,7 @@ def __init__( ur3: Boolean = ON, coupling: Literal[C.STRUCTURAL, C.CONTINUUM] = CONTINUUM, weightingMethod: Literal[C.QUADRATIC, C.UNIFORM, C.CUBIC, C.LINEAR] = UNIFORM, - localCsys: Optional[int] = None, + localCsys: int | None = None, ): """This method creates a DiscreteFastener object. Although the constructor is available both for parts and for the assembly, DiscreteFastener objects are currently supported only under the assembly. @@ -150,7 +152,7 @@ def setValues( ur3: Boolean = ON, coupling: Literal[C.STRUCTURAL, C.CONTINUUM] = CONTINUUM, weightingMethod: Literal[C.QUADRATIC, C.UNIFORM, C.CUBIC, C.LINEAR] = UNIFORM, - localCsys: Optional[int] = None, + localCsys: int | None = None, ): """This method modifies the DiscreteFastener object. diff --git a/src/abaqus/EngineeringFeature/EngineeringFeature.py b/src/abaqus/EngineeringFeature/EngineeringFeature.py index 9912fdd1a8..64fc22f8cf 100644 --- a/src/abaqus/EngineeringFeature/EngineeringFeature.py +++ b/src/abaqus/EngineeringFeature/EngineeringFeature.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -23,6 +25,7 @@ UNIFORM, Boolean, R, + SymbolicConstant, ) from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .AssembledFastener import AssembledFastener @@ -55,7 +58,7 @@ def AssembledFastener( assignedSurfaces: tuple, propertyPrefix: str, orientMethod: Literal[C.NORMALS, C.CSYS] = NORMALS, - localCsys: Optional[int] = None, + localCsys: int | None = None, scriptName: str = "", ) -> AssembledFastener: """This method creates an AssembledFastener object. Although the constructor is available both for parts @@ -274,7 +277,7 @@ def DiscreteFastener( ur3: Boolean = ON, coupling: Literal[C.STRUCTURAL, C.CONTINUUM] = CONTINUUM, weightingMethod: Literal[C.QUADRATIC, C.UNIFORM, C.CUBIC, C.LINEAR] = UNIFORM, - localCsys: Optional[int] = None, + localCsys: int | None = None, ) -> DiscreteFastener: """This method creates a DiscreteFastener object. Although the constructor is available both for parts and for the assembly, DiscreteFastener objects are currently supported only under the assembly. @@ -425,8 +428,8 @@ def PointFastener( name: str, region: Region, physicalRadius: float, - directionVector: Optional[tuple] = None, - targetSurfaces: RegionArray = MODEL, + directionVector: tuple | None = None, + targetSurfaces: RegionArray | SymbolicConstant = MODEL, ur1: Boolean = ON, ur2: Boolean = ON, ur3: Boolean = ON, @@ -438,14 +441,14 @@ def PointFastener( weightingMethod: Literal[C.QUADRATIC, C.UNIFORM, C.CUBIC, C.LINEAR] = UNIFORM, additionalMass: float = 0, adjustOrientation: Boolean = ON, - localCsys: Optional[int] = None, + localCsys: int | None = None, connectionType: Literal[C.CONNECTOR, C.BEAM_MPC] = CONNECTOR, sectionName: str = "", - connectorOrientationLocalCsys1: Optional[int] = None, + connectorOrientationLocalCsys1: int | None = None, axis1: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle1: float = 0, orient2SameAs1: Boolean = ON, - connectorOrientationLocalCsys2: Optional[int] = None, + connectorOrientationLocalCsys2: int | None = None, axis2: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle2: float = 0, unsorted: Boolean = OFF, @@ -612,7 +615,7 @@ def PointMassInertia( i12: float = 0, i13: float = 0, i23: float = 0, - localCsys: Optional[str] = None, + localCsys: str | None = None, alpha: float = 0, composite: float = 0, ) -> PointMassInertia: @@ -699,7 +702,7 @@ def SpringDashpotToGround( name: str, region: Region, dof: int, - orientation: Optional[str] = None, + orientation: str | None = None, springBehavior: Boolean = OFF, dashpotBehavior: Boolean = OFF, springStiffness: float = 0, @@ -766,7 +769,7 @@ def TwoPointSpringDashpot( axis: Literal[C.FIXED_DOF, C.NODAL_LINE], dof1: int = 0, dof2: int = 0, - orientation: Optional[str] = None, + orientation: str | None = None, springBehavior: Boolean = OFF, dashpotBehavior: Boolean = OFF, springStiffness: float = 0, @@ -844,8 +847,8 @@ def XFEMCrack( name: str, crackDomain: Region, allowCrackGrowth: Boolean = ON, - crackLocation: Optional[Region] = None, - singularityCalcRadius: Optional[float] = None, + crackLocation: Region | None = None, + singularityCalcRadius: float | None = None, interactionProperty: str = "", elemId: tuple = (), nodeId: tuple = (), @@ -966,7 +969,7 @@ def FileImperfection( FileImperfection A FileImperfection object. """ - self.fileImperfections[name] = fileImperfection = FileImperfection( + self.imperfections[name] = fileImperfection = FileImperfection( name, file, step, linearSuperpositions, region, increment ) return fileImperfection @@ -1000,7 +1003,7 @@ def InputImperfection( InputImperfection A InputImperfection object. """ - self.inputImperfections[name] = inputImperfection = InputImperfection(name, file, system) + self.imperfections[name] = inputImperfection = InputImperfection(name, file, system) return inputImperfection def DataImperfection( @@ -1033,5 +1036,5 @@ def DataImperfection( DataImperfection A DataImperfection object. """ - self.dataImperfections[name] = dataImperfection = DataImperfection(name, imperfectionTable, system) + self.imperfections[name] = dataImperfection = DataImperfection(name, imperfectionTable, system) return dataImperfection diff --git a/src/abaqus/EngineeringFeature/EngineeringFeatureBase.py b/src/abaqus/EngineeringFeature/EngineeringFeatureBase.py index 1b814cea99..d6017e9cc3 100644 --- a/src/abaqus/EngineeringFeature/EngineeringFeatureBase.py +++ b/src/abaqus/EngineeringFeature/EngineeringFeatureBase.py @@ -1,4 +1,6 @@ -from typing import Dict, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -25,19 +27,19 @@ class EngineeringFeatureBase: """ #: A repository of Inertia objects. - inertias: Dict[str, Inertia] = {} + inertias: dict[str, Inertia] = {} #: A repository of Crack objects. - cracks: Dict[str, Crack] = {} + cracks: dict[str, Crack] = {} #: A repository of Fastener objects. - fasteners: Dict[str, Fastener] = {} + fasteners: dict[str, Fastener] = {} #: A repository of SpringDashpot objects. - springDashpots: Dict[str, SpringDashpot] = {} + springDashpots: dict[str, SpringDashpot] = {} #: A repository of Imperfection objects. - imperfections: Dict[str, Imperfection] = {} + imperfections: dict[str, Imperfection] = {} @abaqus_method_doc def assignSeam(self, regions: Sequence[Region]): diff --git a/src/abaqus/EngineeringFeature/FileImperfection.py b/src/abaqus/EngineeringFeature/FileImperfection.py index 27ad9fa141..7d4ecaaac3 100644 --- a/src/abaqus/EngineeringFeature/FileImperfection.py +++ b/src/abaqus/EngineeringFeature/FileImperfection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from ..Region.Region import Region @@ -95,7 +97,8 @@ def __init__( FileImperfection A FileImperfection object. """ - super().__init__(name) + super().__init__() + self.name = name def setValues( self, diff --git a/src/abaqus/EngineeringFeature/InputImperfection.py b/src/abaqus/EngineeringFeature/InputImperfection.py index 65c5a44714..3048974854 100644 --- a/src/abaqus/EngineeringFeature/InputImperfection.py +++ b/src/abaqus/EngineeringFeature/InputImperfection.py @@ -66,7 +66,10 @@ def __init__( InputImperfection A InputImperfection object. """ - super().__init__(name) + super().__init__() + self.name = name + self.file = file + self.system = system def setValues( self, diff --git a/src/abaqus/EngineeringFeature/PointFastener.py b/src/abaqus/EngineeringFeature/PointFastener.py index 5411e7e47a..403f0d5285 100644 --- a/src/abaqus/EngineeringFeature/PointFastener.py +++ b/src/abaqus/EngineeringFeature/PointFastener.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -58,7 +60,7 @@ class PointFastener(Fastener): #: A VertexArray object of length 2 specifying the direction of projection. Instead of #: through a ConstrainedSketchVertex, each point may be specified through a tuple of coordinates. The #: default value is None. - directionVector: Optional[tuple] = None + directionVector: tuple | None = None #: A RegionArray object specifying surfaces to be fastened. The default value is MODEL. targetSurfaces: RegionArray = MODEL @@ -122,7 +124,7 @@ class PointFastener(Fastener): #: None or a DatumCsys object specifying the local coordinate system. If **localCsys** = None, #: the global coordinate system is used. When this member is queried, it returns an Int. #: The default value is None. - localCsys: Optional[int] = None + localCsys: int | None = None #: A SymbolicConstant specifying the fastener connection type. Possible values are #: CONNECTOR and BEAM_MPC. The default value is CONNECTOR. @@ -136,7 +138,7 @@ class PointFastener(Fastener): #: point in generated connectors. If **connectorOrientationLocalCsys1** = None, the degrees of #: freedom are defined in the global coordinate system. When this member is queried, it #: returns an Int. The default value is None. - connectorOrientationLocalCsys1: Optional[int] = None + connectorOrientationLocalCsys1: int | None = None #: A SymbolicConstant specifying the axis of a datum coordinate system about which an #: additional rotation is applied for the first point in generated connectors. Possible @@ -156,7 +158,7 @@ class PointFastener(Fastener): #: connector point in generated connectors. If **connectorOrientationLocalCsys2** = None, the #: degrees of freedom are defined in the global coordinate system. When this member is #: queried, it returns an Int. The default value is None. - connectorOrientationLocalCsys2: Optional[int] = None + connectorOrientationLocalCsys2: int | None = None #: A SymbolicConstant specifying the axis of a datum coordinate system about which an #: additional rotation is applied for the second point in generated connectors. Possible @@ -178,7 +180,7 @@ def __init__( name: str, region: Region, physicalRadius: float, - directionVector: Optional[tuple] = None, + directionVector: tuple | None = None, targetSurfaces: RegionArray = MODEL, ur1: Boolean = ON, ur2: Boolean = ON, @@ -191,14 +193,14 @@ def __init__( weightingMethod: Literal[C.QUADRATIC, C.UNIFORM, C.CUBIC, C.LINEAR] = UNIFORM, additionalMass: float = 0, adjustOrientation: Boolean = ON, - localCsys: Optional[int] = None, + localCsys: int | None = None, connectionType: Literal[C.CONNECTOR, C.BEAM_MPC] = CONNECTOR, sectionName: str = "", - connectorOrientationLocalCsys1: Optional[int] = None, + connectorOrientationLocalCsys1: int | None = None, axis1: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle1: float = 0, orient2SameAs1: Boolean = ON, - connectorOrientationLocalCsys2: Optional[int] = None, + connectorOrientationLocalCsys2: int | None = None, axis2: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle2: float = 0, unsorted: Boolean = OFF, @@ -324,7 +326,7 @@ def __init__( @abaqus_method_doc def setValues( self, - directionVector: Optional[tuple] = None, + directionVector: tuple | None = None, targetSurfaces: RegionArray = MODEL, ur1: Boolean = ON, ur2: Boolean = ON, @@ -337,14 +339,14 @@ def setValues( weightingMethod: Literal[C.QUADRATIC, C.UNIFORM, C.CUBIC, C.LINEAR] = UNIFORM, additionalMass: float = 0, adjustOrientation: Boolean = ON, - localCsys: Optional[int] = None, + localCsys: int | None = None, connectionType: Literal[C.CONNECTOR, C.BEAM_MPC] = CONNECTOR, sectionName: str = "", - connectorOrientationLocalCsys1: Optional[int] = None, + connectorOrientationLocalCsys1: int | None = None, axis1: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle1: float = 0, orient2SameAs1: Boolean = ON, - connectorOrientationLocalCsys2: Optional[int] = None, + connectorOrientationLocalCsys2: int | None = None, axis2: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle2: float = 0, unsorted: Boolean = OFF, diff --git a/src/abaqus/EngineeringFeature/PointMassInertia.py b/src/abaqus/EngineeringFeature/PointMassInertia.py index 94cc0fe0fc..be0a45b122 100644 --- a/src/abaqus/EngineeringFeature/PointMassInertia.py +++ b/src/abaqus/EngineeringFeature/PointMassInertia.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -75,7 +75,7 @@ class PointMassInertia(Inertia): #: mass terms (when specified), and the rotary inertia (when specified). If #: **localCsys** = None, the anisotropic mass and rotary inertia data are defined in the global #: coordinate system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None #: A Float specifying the alpha damping magnitude. The default value is 0.0.This argument #: applies only to Abaqus/Standard analyses. @@ -100,7 +100,7 @@ def __init__( i12: float = 0, i13: float = 0, i23: float = 0, - localCsys: Optional[str] = None, + localCsys: str | None = None, alpha: float = 0, composite: float = 0, ): @@ -177,7 +177,7 @@ def setValues( i12: float = 0, i13: float = 0, i23: float = 0, - localCsys: Optional[str] = None, + localCsys: str | None = None, alpha: float = 0, composite: float = 0, ): diff --git a/src/abaqus/EngineeringFeature/SpringDashpotToGround.py b/src/abaqus/EngineeringFeature/SpringDashpotToGround.py index 9fccda24c4..26ba0f1bb5 100644 --- a/src/abaqus/EngineeringFeature/SpringDashpotToGround.py +++ b/src/abaqus/EngineeringFeature/SpringDashpotToGround.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -44,7 +44,7 @@ class SpringDashpotToGround(SpringDashpot): #: None or a DatumCsys object specifying the local directions for the spring and/or #: dashpot. If **orientation** = None, the spring and/or dashpot data are defined in the global #: coordinate system. The default value is None. - orientation: Optional[str] = None + orientation: str | None = None #: A Boolean specifying whether to apply spring behavior to the selected points. The #: default value is OFF.At least one of the arguments **springBehavior** = ON or @@ -70,7 +70,7 @@ def __init__( name: str, region: Region, dof: int, - orientation: Optional[str] = None, + orientation: str | None = None, springBehavior: Boolean = OFF, dashpotBehavior: Boolean = OFF, springStiffness: float = 0, @@ -122,7 +122,7 @@ def __init__( @abaqus_method_doc def setValues( self, - orientation: Optional[str] = None, + orientation: str | None = None, springBehavior: Boolean = OFF, dashpotBehavior: Boolean = OFF, springStiffness: float = 0, diff --git a/src/abaqus/EngineeringFeature/TwoPointSpringDashpot.py b/src/abaqus/EngineeringFeature/TwoPointSpringDashpot.py index 99b0272038..1ced9bcc31 100644 --- a/src/abaqus/EngineeringFeature/TwoPointSpringDashpot.py +++ b/src/abaqus/EngineeringFeature/TwoPointSpringDashpot.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -59,7 +59,7 @@ class TwoPointSpringDashpot(SpringDashpot): #: dashpot. If **orientation** = None, the spring and/or dashpot data are defined in the global #: coordinate system. The default value is None.The **orientation** argument applies only #: when **axis** = FIXED_DOFS. - orientation: Optional[str] = None + orientation: str | None = None #: A Boolean specifying whether to apply spring behavior to the selected point pairs. The #: default value is OFF.At least one of the arguments **springBehavior** = ON or @@ -87,7 +87,7 @@ def __init__( axis: Literal[C.FIXED_DOF, C.NODAL_LINE], dof1: int = 0, dof2: int = 0, - orientation: Optional[str] = None, + orientation: str | None = None, springBehavior: Boolean = OFF, dashpotBehavior: Boolean = OFF, springStiffness: float = 0, @@ -152,7 +152,7 @@ def setValues( self, dof1: int = 0, dof2: int = 0, - orientation: Optional[str] = None, + orientation: str | None = None, springBehavior: Boolean = OFF, dashpotBehavior: Boolean = OFF, springStiffness: float = 0, diff --git a/src/abaqus/EngineeringFeature/XFEMCrack.py b/src/abaqus/EngineeringFeature/XFEMCrack.py index a3eb73ae2b..982faeee81 100644 --- a/src/abaqus/EngineeringFeature/XFEMCrack.py +++ b/src/abaqus/EngineeringFeature/XFEMCrack.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -43,12 +43,12 @@ class XFEMCrack(Crack): #: A Region object specifying the initial crack location. This parameter is required when #: **allowCrackGrowth** = OFF. - crackLocation: Optional[Region] = None + crackLocation: Region | None = None #: None or a Float specifying the radius from the crack tips within which the elements are #: used for crack singularity calculations. This argument applies only when #: **allowCrackGrowth** = OFF. The default value is None. - singularityCalcRadius: Optional[float] = None + singularityCalcRadius: float | None = None #: A String specifying the name of the ContactProperty object that defines the contact #: properties for the crack surfaces. The default value is an empty string. @@ -86,8 +86,8 @@ def __init__( name: str, crackDomain: Region, allowCrackGrowth: Boolean = ON, - crackLocation: Optional[Region] = None, - singularityCalcRadius: Optional[float] = None, + crackLocation: Region | None = None, + singularityCalcRadius: float | None = None, interactionProperty: str = "", elemId: tuple = (), nodeId: tuple = (), @@ -157,8 +157,8 @@ def __init__( def setValues( self, allowCrackGrowth: Boolean = ON, - crackLocation: Optional[Region] = None, - singularityCalcRadius: Optional[float] = None, + crackLocation: Region | None = None, + singularityCalcRadius: float | None = None, interactionProperty: str = "", elemId: tuple = (), nodeId: tuple = (), diff --git a/src/abaqus/Feature/Feature.py b/src/abaqus/Feature/Feature.py index 676782db1e..ffef837424 100644 --- a/src/abaqus/Feature/Feature.py +++ b/src/abaqus/Feature/Feature.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Sequence, Tuple, Union, overload +from typing import Sequence, Union, overload from typing_extensions import Literal @@ -10,6 +10,7 @@ from ..BasicGeometry.Edge import Edge from ..BasicGeometry.Face import Face from ..BasicGeometry.InterestingPoint import InterestingPoint +from ..BasicGeometry.ReferencePoint import ReferencePoint from ..BasicGeometry.Transform import Transform from ..BasicGeometry.Vertex import Vertex from ..Datum.Datum import Datum @@ -54,7 +55,7 @@ class Feature: name: str = "" #: An Int specifying the ID of the feature. - id: Optional[int] = None + id: int | None = None @abaqus_method_doc def AttachmentPoints( @@ -64,8 +65,8 @@ def AttachmentPoints( projectionMethod: Literal[C.PROJECT_BY_PROXIMITY, C.PROJECT_BY_DIRECTION] = PROJECT_BY_PROXIMITY, projectOnFaces: Sequence[Face] = (), projectOnElementFaces: Sequence[MeshFace] = (), - projectionDirStartPt: Optional[float] = None, - projectionDirEndPt: Optional[float] = None, + projectionDirStartPt: float | None = None, + projectionDirEndPt: float | None = None, setName: str = "", ) -> Feature: """This method creates an attachment points Feature. Attachment points may be created using datum @@ -112,7 +113,7 @@ def AttachmentPoints( feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def AttachmentPointsAlongDirection( @@ -120,7 +121,7 @@ def AttachmentPointsAlongDirection( name: str, startPoint: float, pointCreationMethod: Literal[C.AUTO_FIT, C.NUM_PTS_ALONG_DIR, C.NUM_PTS_BETWEEN_PTS], - endPoint: Optional[float] = None, + endPoint: float | None = None, direction: str = "", spacing: str = "", numPtsAlongDir: str = "", @@ -130,8 +131,8 @@ def AttachmentPointsAlongDirection( projectionMethod: Literal[C.PROJECT_BY_PROXIMITY, C.PROJECT_BY_DIRECTION] = PROJECT_BY_PROXIMITY, projectOnFaces: Sequence[Face] = (), projectOnElementFaces: Sequence[MeshFace] = (), - projectionDirStartPt: Optional[float] = None, - projectionDirEndPt: Optional[float] = None, + projectionDirStartPt: float | None = None, + projectionDirEndPt: float | None = None, flipDirection: Boolean = OFF, setName: str = "", ) -> Feature: @@ -206,7 +207,7 @@ def AttachmentPointsAlongDirection( feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def AttachmentPointsOffsetFromEdges( @@ -215,24 +216,44 @@ def AttachmentPointsOffsetFromEdges( edges: tuple, startPoint: str = "", flipDirection: str = "", - pointCreationMethod: Literal[C.BY_NUMBER, C.BY_SPACING] = ..., + pointCreationMethod: Literal[C.BY_NUMBER, C.BY_SPACING] = C.BY_NUMBER, numberOfPoints: str = "", spacingBetweenPoints: str = "", offsetFromStartPoint: float = 0, offsetFromEndPoint: float = 0, spacingMethod: Literal[C.AUTO_FIT_PTS, C.SPECIFY_NUM_PTS] = AUTO_FIT_PTS, - patterningMethod: Literal[C.PATTERN_ORTHOGONALLY, C.PATTERN_ALONG_DIRECTION] = ..., + patterningMethod: Literal[C.PATTERN_ORTHOGONALLY, C.PATTERN_ALONG_DIRECTION] = C.PATTERN_ORTHOGONALLY, referenceFace: str = "", - startPointForPatternDirection: Sequence[float] = ..., - endPointForPatternDirection: Sequence[float] = ..., + startPointForPatternDirection: ConstrainedSketchVertex + | Datum + | ReferencePoint + | MeshNode + | InterestingPoint + | Sequence[float] = (0.0, 0.0, 0.0), + endPointForPatternDirection: ConstrainedSketchVertex + | Datum + | ReferencePoint + | MeshNode + | InterestingPoint + | Sequence[float] = (0.0, 0.0, 0.0), offsetFromEdges: str = "", numberOfRows: int = 1, spacingBetweenRows: str = "", projectionMethod: Literal[C.PROJECT_BY_PROXIMITY, C.PROJECT_BY_DIRECTION] = PROJECT_BY_PROXIMITY, projectOnFaces: Sequence[Face] = (), projectOnElementFaces: Sequence[MeshFace] = (), - projectionDirStartPt: Sequence[float] = ..., - projectionDirEndPt: Sequence[float] = ..., + projectionDirStartPt: ConstrainedSketchVertex + | Datum + | ReferencePoint + | MeshNode + | InterestingPoint + | Sequence[float] = (0.0, 0.0, 0.0), + projectionDirEndPt: ConstrainedSketchVertex + | Datum + | ReferencePoint + | MeshNode + | InterestingPoint + | Sequence[float] = (0.0, 0.0, 0.0), setName: str = "", ) -> Feature: """This method creates a Feature object by creating attachment points along or offset from one or more @@ -330,7 +351,7 @@ def AttachmentPointsOffsetFromEdges( feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def DatumAxisByCylFace(self, face: str) -> Feature: @@ -356,7 +377,7 @@ def DatumAxisByCylFace(self, face: str) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumAxisByNormalToPlane(self, plane: str, point: int) -> Feature: @@ -385,7 +406,7 @@ def DatumAxisByNormalToPlane(self, plane: str, point: int) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumAxisByParToEdge(self, edge: str, point: int) -> Feature: @@ -414,7 +435,7 @@ def DatumAxisByParToEdge(self, edge: str, point: int) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumAxisByPrincipalAxis(self, principalAxis: Literal[C.XAXIS, C.YAXIS, C.ZAXIS]) -> Feature: @@ -441,7 +462,7 @@ def DatumAxisByPrincipalAxis(self, principalAxis: Literal[C.XAXIS, C.YAXIS, C.ZA ------ AbaqusException """ - ... + return Feature() @overload @abaqus_method_doc @@ -513,7 +534,7 @@ def DatumAxisByRotation(self, line: str, point: int, angle: float) -> Feature: @abaqus_method_doc def DatumAxisByRotation(self, *args, **kwargs) -> Feature: - ... + return Feature() def DatumAxisByThreePoint(self, point1: int, point2: int, point3: int) -> Feature: """This method creates a Feature object and a DatumAxis object normal to the circle described by three @@ -546,7 +567,7 @@ def DatumAxisByThreePoint(self, point1: int, point2: int, point3: int) -> Featur ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumAxisByThruEdge(self, edge: str) -> Feature: @@ -572,7 +593,7 @@ def DatumAxisByThruEdge(self, edge: str) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumAxisByTwoPlane(self, plane1: str, plane2: str) -> Feature: @@ -600,7 +621,7 @@ def DatumAxisByTwoPlane(self, plane1: str, plane2: str) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumAxisByTwoPoint(self, point1: int, point2: int) -> Feature: @@ -628,7 +649,7 @@ def DatumAxisByTwoPoint(self, point1: int, point2: int) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumCsysByDefault( @@ -662,7 +683,7 @@ def DatumCsysByDefault( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumCsysByOffset( @@ -710,7 +731,7 @@ def DatumCsysByOffset( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumCsysByThreePoints( @@ -767,7 +788,7 @@ def DatumCsysByThreePoints( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumCsysByTwoLines( @@ -809,7 +830,7 @@ def DatumCsysByTwoLines( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumPlaneByPrincipalPlane( @@ -841,7 +862,7 @@ def DatumPlaneByPrincipalPlane( ------ AbaqusException """ - ... + return Feature() @overload @abaqus_method_doc @@ -908,7 +929,7 @@ def DatumPlaneByOffset(self, plane: str, point: int) -> Feature: @abaqus_method_doc def DatumPlaneByOffset(self, *args, **kwargs) -> Feature: - ... + return Feature() def DatumPlaneByRotation(self, plane: str, axis: str, angle: float) -> Feature: """This method creates a Feature object and a DatumPlane object by rotating a plane about the specified @@ -938,7 +959,7 @@ def DatumPlaneByRotation(self, plane: str, axis: str, angle: float) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumPlaneByThreePoints(self, point1: int, point2: int, point3: int) -> Feature: @@ -968,7 +989,7 @@ def DatumPlaneByThreePoints(self, point1: int, point2: int, point3: int) -> Feat ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumPlaneByLinePoint(self, line: str, point: int) -> Feature: @@ -997,7 +1018,7 @@ def DatumPlaneByLinePoint(self, line: str, point: int) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumPlaneByPointNormal(self, point: int, normal: str) -> Feature: @@ -1026,7 +1047,7 @@ def DatumPlaneByPointNormal(self, point: int, normal: str) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumPlaneByTwoPoint(self, point1: int, point2: int) -> Feature: @@ -1055,10 +1076,10 @@ def DatumPlaneByTwoPoint(self, point1: int, point2: int) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc - def DatumPointByCoordinate(self, coords: Tuple[float, float, float]) -> Feature: + def DatumPointByCoordinate(self, coords: tuple[float, float, float]) -> Feature: """This method creates a Feature object and a DatumPoint object at the point defined by the specified coordinates. @@ -1079,7 +1100,7 @@ def DatumPointByCoordinate(self, coords: Tuple[float, float, float]) -> Feature: feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def DatumPointByOffset(self, point: int, vector: tuple) -> Feature: @@ -1104,7 +1125,7 @@ def DatumPointByOffset(self, point: int, vector: tuple) -> Feature: feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def DatumPointByMidPoint(self, point1: int, point2: int) -> Feature: @@ -1128,7 +1149,7 @@ def DatumPointByMidPoint(self, point1: int, point2: int) -> Feature: feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def DatumPointByOnFace(self, face: str, edge1: str, offset1: float, edge2: str, offset2: float) -> Feature: @@ -1163,7 +1184,7 @@ def DatumPointByOnFace(self, face: str, edge1: str, offset1: float, edge2: str, ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumPointByEdgeParam(self, edge: Edge, parameter: float) -> Feature: @@ -1194,7 +1215,7 @@ def DatumPointByEdgeParam(self, edge: Edge, parameter: float) -> Feature: AbaqusException RangeError """ - ... + return Feature() @abaqus_method_doc def DatumPointByProjOnEdge(self, point: int, edge: str) -> Feature: @@ -1223,7 +1244,7 @@ def DatumPointByProjOnEdge(self, point: int, edge: str) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def DatumPointByProjOnFace(self, point: int, face: Face) -> Feature: @@ -1253,7 +1274,7 @@ def DatumPointByProjOnFace(self, point: int, face: Face) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def MakeSketchTransform( @@ -1302,7 +1323,7 @@ def MakeSketchTransform( Up direction is parallel to plane normal, If the sketchUpEdge is parallel to the sketchPlane. """ - ... + return Transform() @abaqus_method_doc def PartitionCellByDatumPlane(self, cells: Sequence[Cell], datumPlane: DatumPlane) -> Feature: @@ -1330,7 +1351,7 @@ def PartitionCellByDatumPlane(self, cells: Sequence[Cell], datumPlane: DatumPlan ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionCellByExtendFace(self, cells: Sequence[Cell], extendFace: str) -> Feature: @@ -1359,7 +1380,7 @@ def PartitionCellByExtendFace(self, cells: Sequence[Cell], extendFace: str) -> F ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionCellByExtrudeEdge( @@ -1397,7 +1418,7 @@ def PartitionCellByExtrudeEdge( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionCellByPatchNCorners(self, cell: Cell, cornerPoints: tuple) -> Feature: @@ -1426,7 +1447,7 @@ def PartitionCellByPatchNCorners(self, cell: Cell, cornerPoints: tuple) -> Featu ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionCellByPatchNEdges(self, cell: str, edges: Sequence[Edge]) -> Feature: @@ -1455,7 +1476,7 @@ def PartitionCellByPatchNEdges(self, cell: str, edges: Sequence[Edge]) -> Featur ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionCellByPlaneNormalToEdge( @@ -1490,7 +1511,7 @@ def PartitionCellByPlaneNormalToEdge( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionCellByPlanePointNormal( @@ -1525,7 +1546,7 @@ def PartitionCellByPlanePointNormal( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionCellByPlaneThreePoints(self, cells: Sequence[Cell], point1: int, point2: int, point3: int) -> Feature: @@ -1558,7 +1579,7 @@ def PartitionCellByPlaneThreePoints(self, cells: Sequence[Cell], point1: int, po ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionCellBySweepEdge(self, cells: Sequence[Cell], edges: Sequence[Edge], sweepPath: Edge) -> Feature: @@ -1591,7 +1612,7 @@ def PartitionCellBySweepEdge(self, cells: Sequence[Cell], edges: Sequence[Edge], ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionEdgeByDatumPlane(self, edges: Sequence[Edge], datumPlane: DatumPlane) -> Feature: @@ -1619,7 +1640,7 @@ def PartitionEdgeByDatumPlane(self, edges: Sequence[Edge], datumPlane: DatumPlan ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionEdgeByParam(self, edges: Sequence[Edge], parameter: float) -> Feature: @@ -1648,7 +1669,7 @@ def PartitionEdgeByParam(self, edges: Sequence[Edge], parameter: float) -> Featu ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionEdgeByPoint(self, edge: Edge, point: int) -> Feature: @@ -1676,7 +1697,7 @@ def PartitionEdgeByPoint(self, edge: Edge, point: int) -> Feature: ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionFaceByAuto(self, face: Face) -> Feature: @@ -1699,7 +1720,7 @@ def PartitionFaceByAuto(self, face: Face) -> Feature: feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def PartitionFaceByCurvedPathEdgeParams( @@ -1738,7 +1759,7 @@ def PartitionFaceByCurvedPathEdgeParams( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionFaceByCurvedPathEdgePoints( @@ -1775,7 +1796,7 @@ def PartitionFaceByCurvedPathEdgePoints( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionFaceByDatumPlane(self, faces: Sequence[Face], datumPlane: DatumPlane) -> Feature: @@ -1799,7 +1820,7 @@ def PartitionFaceByDatumPlane(self, faces: Sequence[Face], datumPlane: DatumPlan feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def PartitionFaceByExtendFace(self, faces: Sequence[Face], extendFace: Face) -> Feature: @@ -1825,7 +1846,7 @@ def PartitionFaceByExtendFace(self, faces: Sequence[Face], extendFace: Face) -> feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def PartitionFaceByIntersectFace(self, faces: Sequence[Face], cuttingFaces: Sequence[Face]) -> Feature: @@ -1849,7 +1870,7 @@ def PartitionFaceByIntersectFace(self, faces: Sequence[Face], cuttingFaces: Sequ feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def PartitionFaceByProjectingEdges( @@ -1882,7 +1903,7 @@ def PartitionFaceByProjectingEdges( feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def PartitionFaceByShortestPath(self, faces: Sequence[Face], point1: int, point2: int) -> Feature: @@ -1914,7 +1935,7 @@ def PartitionFaceByShortestPath(self, faces: Sequence[Face], point1: int, point2 ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionFaceBySketch( @@ -1955,7 +1976,7 @@ def PartitionFaceBySketch( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionFaceBySketchDistance( @@ -2006,7 +2027,7 @@ def PartitionFaceBySketchDistance( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionFaceBySketchRefPoint( @@ -2054,7 +2075,7 @@ def PartitionFaceBySketchRefPoint( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def PartitionFaceBySketchThruAll( @@ -2102,7 +2123,7 @@ def PartitionFaceBySketchThruAll( ------ AbaqusException """ - ... + return Feature() @abaqus_method_doc def ReferencePoint( @@ -2155,7 +2176,7 @@ def RemoveWireEdges(self, wireEdgeList: Sequence[Edge]) -> Feature: feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def WirePolyLine( @@ -2205,7 +2226,7 @@ def WirePolyLine( feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def isSuppressed(self) -> bool: @@ -2216,7 +2237,7 @@ def isSuppressed(self) -> bool: Boolean A Boolean value of True if the feature is suppressed and False if it is not suppressed. """ - ... + return True @abaqus_method_doc def restore(self) -> None: @@ -2240,11 +2261,11 @@ def resume(self) -> None: @abaqus_method_doc def setValues( self, - parameter: float = ..., - parameter1: float = ..., - parameter2: float = ..., + parameter: float = 0, + parameter1: float = 0, + parameter2: float = 0, sketch: ConstrainedSketch = ..., - distance: float = ..., + distance: float = 0, ) -> None: """This method modifies the Feature object. diff --git a/src/abaqus/Field/AnalyticalField.py b/src/abaqus/Field/AnalyticalField.py index f9ff354155..f7aa9c830b 100644 --- a/src/abaqus/Field/AnalyticalField.py +++ b/src/abaqus/Field/AnalyticalField.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -41,7 +41,7 @@ class AnalyticalField(Field): #: None or a DatumCsys object specifying the local coordinate system of the field. If #: **localCsys** = None, the field is defined in the global coordinate system. The default #: value is None. - localCsys: DatumCsys = DatumCsys() + localCsys: DatumCsys | None = DatumCsys() #: A String specifying the description of the field. The default value is an empty string. description: str = "" @@ -103,22 +103,21 @@ def OdbMeshRegionData( numericForm: Literal[C.COMPLEX_PHASE, C.COMPLEX_MAG_AT_ANGLE, C.REAL, C.IMAGINARY, C.COMPLEX_MAGNITUDE] = REAL, complexAngle: float = 0, sectionPoint: str = "", - refinementType: Optional[Literal[C.COMPONENT, C.NO_REFINEMENT, C.INVARIANT]] = None, + refinementType: Literal[C.COMPONENT, C.NO_REFINEMENT, C.INVARIANT] | None = None, refinementLabel: str = "", - displayOutputPosition: Optional[ - Literal[ - C.ELEMENT_NODAL, - C.ELEMENT_FACE, - C.WHOLE_ELEMENT, - C.NODAL, - C.INTEGRATION_POINT, - C.ELEMENT_CENTROID, - C.WHOLE_MODEL, - C.GENERAL_PARTICLE, - C.WHOLE_PART_INSTANCE, - C.WHOLE_REGION, - ] - ] = None, + displayOutputPosition: Literal[ + C.ELEMENT_NODAL, + C.ELEMENT_FACE, + C.WHOLE_ELEMENT, + C.NODAL, + C.INTEGRATION_POINT, + C.ELEMENT_CENTROID, + C.WHOLE_MODEL, + C.GENERAL_PARTICLE, + C.WHOLE_PART_INSTANCE, + C.WHOLE_REGION, + ] + | None = None, ) -> OdbMeshRegionData: """This method creates an OdbMeshRegionData object. diff --git a/src/abaqus/Field/DataTable.py b/src/abaqus/Field/DataTable.py index 8448c8a91b..336ce195bd 100644 --- a/src/abaqus/Field/DataTable.py +++ b/src/abaqus/Field/DataTable.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,7 +16,7 @@ class DataTable: #: An Int specifying the width of the data. Valid widths are 1, 6, 21, corresponding to #: scalar data, orientations and 4D tensors. - dataWidth: Optional[int] = None + dataWidth: int | None = None #: A String specifying the index. name: str = "" @@ -25,7 +25,7 @@ class DataTable: instanceName: str = "" #: A tuple of Ints specifying the domain node, element or integration point identifiers. - domain: Optional[int] = None + domain: int | None = None #: A tuple of Floats specifying the data within the domain. - table: Optional[float] = None + table: float | None = None diff --git a/src/abaqus/Field/DataTableArray.py b/src/abaqus/Field/DataTableArray.py index d9b41df6b9..f1f0d90e53 100644 --- a/src/abaqus/Field/DataTableArray.py +++ b/src/abaqus/Field/DataTableArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .DataTable import DataTable diff --git a/src/abaqus/Field/DiscreteField.py b/src/abaqus/Field/DiscreteField.py index 68f4876e93..1aed0adb8f 100644 --- a/src/abaqus/Field/DiscreteField.py +++ b/src/abaqus/Field/DiscreteField.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -50,7 +50,7 @@ class DiscreteField(Field): dataWidth: int = 1 #: A DataTableArray object. - data: Optional[DataTableArray] = None + data: DataTableArray | None = None #: A String specifying the description of the field. The default value is an empty string. description: str = "" @@ -72,7 +72,7 @@ def __init__( fieldType: Literal[C.PRESCRIBEDCONDITION_DOF, C.SCALAR, C.ORIENTATION], location: Literal[C.NODES, C.ELEMENTS] = NODES, dataWidth: int = 1, - data: Optional[DataTableArray] = None, + data: DataTableArray | None = None, description: str = "", orientationType: Literal[C.CYLINDRICAL, C.CARTESIAN, C.SPHERICAL] = CARTESIAN, partLevelOrientation: Boolean = OFF, @@ -216,7 +216,7 @@ def setValues( self, location: Literal[C.NODES, C.ELEMENTS] = NODES, dataWidth: int = 1, - data: Optional[DataTableArray] = None, + data: DataTableArray | None = None, description: str = "", orientationType: Literal[C.CYLINDRICAL, C.CARTESIAN, C.SPHERICAL] = CARTESIAN, partLevelOrientation: Boolean = OFF, diff --git a/src/abaqus/Field/ExpressionField.py b/src/abaqus/Field/ExpressionField.py index 86fc5060cd..07b00e94f5 100644 --- a/src/abaqus/Field/ExpressionField.py +++ b/src/abaqus/Field/ExpressionField.py @@ -1,5 +1,6 @@ -from typing import Optional +from __future__ import annotations +from abaqus.Datum.DatumCsys import DatumCsys from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from .AnalyticalField import AnalyticalField @@ -27,13 +28,13 @@ class ExpressionField(AnalyticalField): #: None or a DatumCsys object specifying the local coordinate system of the field. If #: **localCsys** = None, the field is defined in the global coordinate system. The default #: value is None. - localCsys: Optional[str] = None + localCsys: DatumCsys | None = None #: A String specifying the description of the field. The default value is an empty string. description: str = "" @abaqus_method_doc - def __init__(self, name: str, expression: str, localCsys: Optional[str] = None, description: str = ""): + def __init__(self, name: str, expression: str, localCsys: str | None = None, description: str = ""): """This method creates an ExpressionField object. .. note:: @@ -67,7 +68,7 @@ def __init__(self, name: str, expression: str, localCsys: Optional[str] = None, super().__init__() @abaqus_method_doc - def setValues(self, localCsys: Optional[str] = None, description: str = ""): + def setValues(self, localCsys: str | None = None, description: str = ""): """This method modifies the ExpressionField object. Parameters diff --git a/src/abaqus/Field/FieldModel.py b/src/abaqus/Field/FieldModel.py index 7af59a2cf6..fde685c60d 100644 --- a/src/abaqus/Field/FieldModel.py +++ b/src/abaqus/Field/FieldModel.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -33,7 +33,7 @@ def DiscreteField( fieldType: Literal[C.PRESCRIBEDCONDITION_DOF, C.SCALAR, C.ORIENTATION], location: Literal[C.NODES, C.ELEMENTS] = NODES, dataWidth: int = 1, - data: Optional[DataTableArray] = None, + data: DataTableArray | None = None, description: str = "", orientationType: Literal[C.CYLINDRICAL, C.CARTESIAN, C.SPHERICAL] = CARTESIAN, partLevelOrientation: Boolean = OFF, @@ -95,7 +95,7 @@ def DiscreteField( @abaqus_method_doc def ExpressionField( - self, name: str, expression: str, localCsys: Optional[str] = None, description: str = "" + self, name: str, expression: str, localCsys: str | None = None, description: str = "" ) -> ExpressionField: """This method creates an ExpressionField object. @@ -149,7 +149,7 @@ def MappedField( gridPointData: tuple = (), xyzPointData: tuple = (), coordinateScalingFactors: tuple = (), - localCsys: Optional[str] = None, + localCsys: str | None = None, description: str = "", ) -> MappedField: """This method creates an MappedField object. diff --git a/src/abaqus/Field/MappedField.py b/src/abaqus/Field/MappedField.py index 721b3c2e9a..81902d2401 100644 --- a/src/abaqus/Field/MappedField.py +++ b/src/abaqus/Field/MappedField.py @@ -1,7 +1,8 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal +from abaqus.Datum.DatumCsys import DatumCsys from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..UtilityAndView.abaqusConstants import ( @@ -104,16 +105,16 @@ class MappedField(AnalyticalField): xyzPointData: tuple = () #: An OdbMeshRegionData object specifying the external source data from ODB mesh region. - odbMeshRegionData: Optional[OdbMeshRegionData] = None + odbMeshRegionData: OdbMeshRegionData = OdbMeshRegionData("", "") #: A tuple of Floats specifying the scaling factors for the global 1, 2 and 3 directions. #: The default value is (1.0, 1.0, 1.0). - coordinateScalingFactors: Optional[float] = None + coordinateScalingFactors: tuple[float, float, float] = (1.0, 1.0, 1.0) #: None or a DatumCsys object specifying the local coordinate system of the field. If #: **localCsys** = None, the field is defined in the global coordinate system. The default #: value is None. - localCsys: Optional[str] = None + localCsys: DatumCsys | None = None #: A String specifying the description of the field. The default value is an empty string. description: str = "" @@ -137,7 +138,7 @@ def __init__( gridPointData: tuple = (), xyzPointData: tuple = (), coordinateScalingFactors: tuple = (), - localCsys: Optional[str] = None, + localCsys: str | None = None, description: str = "", ): """This method creates an MappedField object. @@ -245,7 +246,7 @@ def setValues( gridPointData: tuple = (), xyzPointData: tuple = (), coordinateScalingFactors: tuple = (), - localCsys: Optional[str] = None, + localCsys: str | None = None, description: str = "", ): """This method modifies the MappedField object. diff --git a/src/abaqus/Field/OdbMeshRegionData.py b/src/abaqus/Field/OdbMeshRegionData.py index a83b0b5037..26e7cb45bf 100644 --- a/src/abaqus/Field/OdbMeshRegionData.py +++ b/src/abaqus/Field/OdbMeshRegionData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -216,22 +216,21 @@ def __init__( numericForm: Literal[C.COMPLEX_PHASE, C.COMPLEX_MAG_AT_ANGLE, C.REAL, C.IMAGINARY, C.COMPLEX_MAGNITUDE] = REAL, complexAngle: float = 0, sectionPoint: str = "", - refinementType: Optional[Literal[C.COMPONENT, C.NO_REFINEMENT, C.INVARIANT]] = None, + refinementType: Literal[C.COMPONENT, C.NO_REFINEMENT, C.INVARIANT] | None = None, refinementLabel: str = "", - displayOutputPosition: Optional[ - Literal[ - C.ELEMENT_NODAL, - C.ELEMENT_FACE, - C.WHOLE_ELEMENT, - C.NODAL, - C.INTEGRATION_POINT, - C.ELEMENT_CENTROID, - C.WHOLE_MODEL, - C.GENERAL_PARTICLE, - C.WHOLE_PART_INSTANCE, - C.WHOLE_REGION, - ] - ] = None, + displayOutputPosition: Literal[ + C.ELEMENT_NODAL, + C.ELEMENT_FACE, + C.WHOLE_ELEMENT, + C.NODAL, + C.INTEGRATION_POINT, + C.ELEMENT_CENTROID, + C.WHOLE_MODEL, + C.GENERAL_PARTICLE, + C.WHOLE_PART_INSTANCE, + C.WHOLE_REGION, + ] + | None = None, ): """This method creates an OdbMeshRegionData object. diff --git a/src/abaqus/FieldReport/FieldReportSession.py b/src/abaqus/FieldReport/FieldReportSession.py index 99d789611f..c116ab5055 100644 --- a/src/abaqus/FieldReport/FieldReportSession.py +++ b/src/abaqus/FieldReport/FieldReportSession.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -48,10 +48,9 @@ def writeFieldReport( C.GENERAL_PARTICLE, C.WHOLE_PART_INSTANCE, ], - numericForm: Optional[ - Literal[C.COMPLEX_PHASE, C.COMPLEX_MAG_AT_ANGLE, C.REAL, C.IMAGINARY, C.COMPLEX_MAGNITUDE] - ] = None, - complexAngle: Optional[float] = None, + numericForm: Literal[C.COMPLEX_PHASE, C.COMPLEX_MAG_AT_ANGLE, C.REAL, C.IMAGINARY, C.COMPLEX_MAGNITUDE] + | None = None, + complexAngle: float | None = None, stepFrame: Literal[C.ALL, C.SPECIFY] = SPECIFY, ): """This method writes a FieldOutput object to a user-defined ASCII file. @@ -128,10 +127,10 @@ def writeFreeBodyReport( self, fileName: str, append: Boolean, - step: Optional[int] = None, - frame: Optional[int] = None, + step: int | None = None, + frame: int | None = None, stepFrame: Literal[C.ALL, C.SPECIFY] = SPECIFY, - odb: Optional[Odb] = None, + odb: Odb | None = None, ): """This method writes a FreeBody object to a user-defined ASCII file. diff --git a/src/abaqus/FieldReport/FreeBodyReportOptions.py b/src/abaqus/FieldReport/FreeBodyReportOptions.py index 32d71b6893..76a6d09975 100644 --- a/src/abaqus/FieldReport/FreeBodyReportOptions.py +++ b/src/abaqus/FieldReport/FreeBodyReportOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -27,8 +27,8 @@ class FreeBodyReportOptions: def setValues( self, numDigits: int = 3, - forceThreshold: Optional[float] = None, - momentThreshold: Optional[float] = None, + forceThreshold: float | None = None, + momentThreshold: float | None = None, numberFormat: Literal[C.SCIENTIFIC, C.ENGINEERING, C.FIXED] = SCIENTIFIC, reportFormat: Literal[C.COMMA_SEPARATED_VALUES, C.NORMAL_ANNOTATED] = NORMAL_ANNOTATED, csysType: Literal[C.LOCAL, C.GLOBAL] = GLOBAL, diff --git a/src/abaqus/FieldReport/OdbFieldVarList.py b/src/abaqus/FieldReport/OdbFieldVarList.py index 589d07479d..78037f3565 100644 --- a/src/abaqus/FieldReport/OdbFieldVarList.py +++ b/src/abaqus/FieldReport/OdbFieldVarList.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from abqpy.decorators import abaqus_class_doc diff --git a/src/abaqus/FieldReport/writeFieldReport.py b/src/abaqus/FieldReport/writeFieldReport.py index a502544b5f..0e97cf43c4 100644 --- a/src/abaqus/FieldReport/writeFieldReport.py +++ b/src/abaqus/FieldReport/writeFieldReport.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_function_doc @@ -22,8 +22,8 @@ def writeFieldReport( outputPosition: SymbolicConstant, displayGroup: DisplayGroup, variable: SymbolicConstant, - numericForm: Optional[SymbolicConstant] = None, - complexAngle: Optional[float] = None, + numericForm: SymbolicConstant | None = None, + complexAngle: float | None = None, stepFrame: SymbolicConstant = SPECIFY, ): """This function writes a FieldOutput object to a user-defined ASCII file. diff --git a/src/abaqus/FieldReport/writeFreeBodyReport.py b/src/abaqus/FieldReport/writeFreeBodyReport.py index 01047feda1..bbf00f47b9 100644 --- a/src/abaqus/FieldReport/writeFreeBodyReport.py +++ b/src/abaqus/FieldReport/writeFreeBodyReport.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_function_doc @@ -14,10 +14,10 @@ def writeFreeBodyReport( fileName: str, append: Boolean, - step: Optional[int] = None, - frame: Optional[int] = None, + step: int | None = None, + frame: int | None = None, stepFrame: SymbolicConstant = SPECIFY, - odb: Optional[Odb] = None, + odb: Odb | None = None, ): """This method writes a FreeBody object to a user-defined ASCII file. diff --git a/src/abaqus/Filter/ButterworthFilter.py b/src/abaqus/Filter/ButterworthFilter.py index 40a7ac14b0..d93c14b355 100644 --- a/src/abaqus/Filter/ButterworthFilter.py +++ b/src/abaqus/Filter/ButterworthFilter.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -51,7 +51,7 @@ class ButterworthFilter(Filter): #: None or a Float specifying the threshold limit, an upper or lower bound for output #: values depending on the operation, or a bound for stopping the analysis when Halt is #: used. The default value is None. - limit: Optional[float] = None + limit: float | None = None #: A SymbolicConstant specifying the invariant to which filtering is applied. Possible #: values are NONE, FIRST, and SECOND. The default value is NONE. @@ -65,7 +65,7 @@ def __init__( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ): """This method creates a ButterworthFilter object. @@ -120,7 +120,7 @@ def setValues( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ): """This method modifies the ButterworthFilter object. diff --git a/src/abaqus/Filter/Chebyshev1Filter.py b/src/abaqus/Filter/Chebyshev1Filter.py index 458561b751..9366ba5377 100644 --- a/src/abaqus/Filter/Chebyshev1Filter.py +++ b/src/abaqus/Filter/Chebyshev1Filter.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -55,7 +55,7 @@ class Chebyshev1Filter(Filter): #: None or a Float specifying the threshold limit, an upper or lower bound for output #: values depending on the operation, or a bound for stopping the analysis when Halt is #: used. The default value is None. - limit: Optional[float] = None + limit: float | None = None #: A SymbolicConstant specifying the invariant to which filtering is applied. Possible #: values are NONE, FIRST, and SECOND. The default value is NONE. @@ -70,7 +70,7 @@ def __init__( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ): """This method creates a Chebyshev1Filter object. @@ -129,7 +129,7 @@ def setValues( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ): """This method modifies the Chebyshev1Filter object. diff --git a/src/abaqus/Filter/Chebyshev2Filter.py b/src/abaqus/Filter/Chebyshev2Filter.py index 55d4c61ef9..81dcb2ed10 100644 --- a/src/abaqus/Filter/Chebyshev2Filter.py +++ b/src/abaqus/Filter/Chebyshev2Filter.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -55,7 +55,7 @@ class Chebyshev2Filter(Filter): #: None or a Float specifying the threshold limit, an upper or lower bound for output #: values depending on the operation, or a bound for stopping the analysis when Halt is #: used. The default value is None. - limit: Optional[float] = None + limit: float | None = None #: A SymbolicConstant specifying the invariant to which filtering is applied. Possible #: values are NONE, FIRST, and SECOND. The default value is NONE. @@ -70,7 +70,7 @@ def __init__( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ): """This method creates a Chebyshev2Filter object. @@ -129,7 +129,7 @@ def setValues( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ): """This method modifies the Chebyshev2Filter object. diff --git a/src/abaqus/Filter/Filter.py b/src/abaqus/Filter/Filter.py index 9d84ce598e..ff7743d086 100644 --- a/src/abaqus/Filter/Filter.py +++ b/src/abaqus/Filter/Filter.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,7 +25,7 @@ class Filter: #: A Float specifying the attenuation point of the filter. Possible values are non-negative #: numbers. Order is not available for OperatorFilter. - cutoffFrequency: Optional[float] = None + cutoffFrequency: float | None = None #: An Int specifying the highest power of the filter transfer function. Possible values are #: non-negative numbers less than or equal to 20. Order is not available for @@ -43,7 +43,7 @@ class Filter: #: None or a Float specifying the threshold limit, an upper or lower bound for output #: values depending on the operation, or a bound for stopping the analysis when Halt is #: used. The default value is None. - limit: Optional[float] = None + limit: float | None = None #: A SymbolicConstant specifying the invariant to which filtering is applied. Possible #: values are NONE, FIRST, and SECOND. The default value is NONE. diff --git a/src/abaqus/Filter/FilterModel.py b/src/abaqus/Filter/FilterModel.py index 5c70365e84..c8af09ddeb 100644 --- a/src/abaqus/Filter/FilterModel.py +++ b/src/abaqus/Filter/FilterModel.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -31,7 +31,7 @@ def ButterworthFilter( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ) -> ButterworthFilter: """This method creates a ButterworthFilter object. @@ -92,7 +92,7 @@ def Chebyshev1Filter( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ) -> Chebyshev1Filter: """This method creates a Chebyshev1Filter object. @@ -163,7 +163,7 @@ def Chebyshev2Filter( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ) -> Chebyshev2Filter: """This method creates a Chebyshev2Filter object. @@ -233,7 +233,7 @@ def OperatorFilter( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ) -> OperatorFilter: """This method creates an OperatorFilter object. diff --git a/src/abaqus/Filter/FilterOdb.py b/src/abaqus/Filter/FilterOdb.py index 4d963f0d8d..a49e3a33dd 100644 --- a/src/abaqus/Filter/FilterOdb.py +++ b/src/abaqus/Filter/FilterOdb.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -32,7 +32,7 @@ def ButterworthFilter( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ) -> ButterworthFilter: """This method creates a ButterworthFilter object. @@ -93,7 +93,7 @@ def Chebyshev1Filter( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ) -> Chebyshev1Filter: """This method creates a Chebyshev1Filter object. @@ -164,7 +164,7 @@ def Chebyshev2Filter( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ) -> Chebyshev2Filter: """This method creates a Chebyshev2Filter object. @@ -234,7 +234,7 @@ def OperatorFilter( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ) -> OperatorFilter: """This method creates an OperatorFilter object. diff --git a/src/abaqus/Filter/OperatorFilter.py b/src/abaqus/Filter/OperatorFilter.py index c3a0f48b33..2a04758abd 100644 --- a/src/abaqus/Filter/OperatorFilter.py +++ b/src/abaqus/Filter/OperatorFilter.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -51,7 +51,7 @@ class OperatorFilter(Filter): #: None or a Float specifying the threshold limit, an upper or lower bound for output #: values depending on the operation, or a bound for stopping the analysis when Halt is #: used. The default value is None. - limit: Optional[float] = None + limit: float | None = None #: A SymbolicConstant specifying the invariant to which filtering is applied. Possible #: values are NONE, FIRST, and SECOND. The default value is NONE. @@ -65,7 +65,7 @@ def __init__( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ): """This method creates an OperatorFilter object. @@ -120,7 +120,7 @@ def setValues( order: int = 2, operation: Literal[C.MIN, C.MAX, C.NONE, C.ABS] = NONE, halt: Boolean = OFF, - limit: Optional[float] = None, + limit: float | None = None, invariant: Literal[C.FIRST, C.SECOND, C.NONE] = NONE, ): """This method modifies the OperatorFilter object. diff --git a/src/abaqus/InputFileParser/Keyword.py b/src/abaqus/InputFileParser/Keyword.py index 555c021808..424aac7052 100644 --- a/src/abaqus/InputFileParser/Keyword.py +++ b/src/abaqus/InputFileParser/Keyword.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -18,7 +18,7 @@ class Keyword: name: str = "" #: A Dictionary of Strings specifying the keyword parameters. - parameter: Optional[dict] = None + parameter: dict | None = None #: A sequence of sequences or an AbaqusNDarray object specifying the keyword data. The type #: of the leaf objects depends on the keyword. The AbaqusNDarray object is returned only if diff --git a/src/abaqus/Interaction/AcousticImpedanceState.py b/src/abaqus/Interaction/AcousticImpedanceState.py index 22e29bc26e..1c3eff24e3 100644 --- a/src/abaqus/Interaction/AcousticImpedanceState.py +++ b/src/abaqus/Interaction/AcousticImpedanceState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,7 +26,7 @@ class AcousticImpedanceState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **interactionProperty** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - interactionPropertyState: Optional[SymbolicConstant] = None + interactionPropertyState: SymbolicConstant #: A String specifying the name of the AcousticImpedanceProp object associated with this #: interaction. @@ -44,4 +44,4 @@ class AcousticImpedanceState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/ActuatorSensorState.py b/src/abaqus/Interaction/ActuatorSensorState.py index 20287dd0bd..f5088c7af8 100644 --- a/src/abaqus/Interaction/ActuatorSensorState.py +++ b/src/abaqus/Interaction/ActuatorSensorState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -32,4 +32,4 @@ class ActuatorSensorState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/CavityRadiation.py b/src/abaqus/Interaction/CavityRadiation.py index 6589751958..8d579b7f29 100644 --- a/src/abaqus/Interaction/CavityRadiation.py +++ b/src/abaqus/Interaction/CavityRadiation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -38,7 +38,7 @@ class CavityRadiation(Interaction): #: None or a Float specifying the reference ambient temperature value, θ0θ0. Specifying a #: value indicates an open cavity. The default value is None. - ambientTemp: Optional[float] = None + ambientTemp: float | None = None #: A Float specifying the facet area ratio above which the infinitesimal-to-finite area #: approximation is used for viewfactor calculations. The default value is 64.0. @@ -90,12 +90,12 @@ class CavityRadiation(Interaction): #: None or a Float specifying the Z value indicating the symmetry reference line in #: axisymmetric models. This argument applies only for axisymmetric models, and when #: **periodicSymmetries** = 1. The default value is None. - periodicSymZ: Optional[float] = None + periodicSymZ: float | None = None #: None or a Float specifying the Z value indicating the periodic distance in axisymmetric #: models. This argument applies only for axisymmetric models, and when #: **periodicSymmetries** = 1. The default value is None. - periodicDistZ: Optional[float] = None + periodicDistZ: float | None = None #: An Int specifying the number of reflection symmetries will be applied. The default value #: is 0. @@ -104,7 +104,7 @@ class CavityRadiation(Interaction): #: None or a Float specifying the Z value indicating the symmetry reference line in #: axisymmetric models. This argument applies only for axisymmetric models, and when #: **reflectionSymmetries** = 1. The default value is None. - reflectionSymZ: Optional[float] = None + reflectionSymZ: float | None = None #: A String specifying the name of the step in which the cavity radiation interaction #: should be created. @@ -156,10 +156,10 @@ def __init__( createStepName: str, surfaces: RegionArray, surfaceEmissivities: tuple, - ambientTemp: Optional[float] = None, + ambientTemp: float | None = None, blocking: Literal[C.NO_BLOCKING, C.BLOCKING_ALL, C.PARTIAL_BLOCKING] = BLOCKING_ALL, - blockingSurfaces: Optional[RegionArray] = None, - rangeOfView: Optional[float] = None, + blockingSurfaces: RegionArray | None = None, + rangeOfView: float | None = None, surfaceReflection: Boolean = ON, viewfactorAccurTol: float = 0, minInfinitesimalRatio: float = 64, @@ -167,9 +167,9 @@ def __init__( minLumpedAreaDS: float = 5, cyclicSymmetry: Boolean = OFF, cyclicImages: int = 2, - cyclicRotPt: Optional[ModelDot] = None, - cyclicRotEndPt: Optional[ModelDot] = None, - cyclicSymPt: Optional[ModelDot] = None, + cyclicRotPt: ModelDot | None = None, + cyclicRotEndPt: ModelDot | None = None, + cyclicSymPt: ModelDot | None = None, periodicSymmetries: int = 0, periodicImages_1: int = 2, periodicImages_2: int = 2, @@ -182,15 +182,15 @@ def __init__( periodicDistance_1: tuple = (), periodicDistance_2: tuple = (), periodicDistance_3: tuple = (), - periodicSymZ: Optional[float] = None, - periodicDistZ: Optional[float] = None, + periodicSymZ: float | None = None, + periodicDistZ: float | None = None, reflectionSymmetries: int = 0, reflectionSymAxis_1: str = "", reflectionSymAxis_2: str = "", reflectionSymPlane_1: str = "", reflectionSymPlane_2: str = "", reflectionSymPlane_3: str = "", - reflectionSymZ: Optional[float] = None, + reflectionSymZ: float | None = None, ): """This method creates a CavityRadiation object. @@ -364,10 +364,10 @@ def __init__( def setValues( self, surfaceEmissivities: tuple = (), - ambientTemp: Optional[float] = None, + ambientTemp: float | None = None, blocking: Literal[C.NO_BLOCKING, C.BLOCKING_ALL, C.PARTIAL_BLOCKING] = BLOCKING_ALL, - blockingSurfaces: Optional[RegionArray] = None, - rangeOfView: Optional[float] = None, + blockingSurfaces: RegionArray | None = None, + rangeOfView: float | None = None, surfaceReflection: Boolean = ON, viewfactorAccurTol: float = 0, minInfinitesimalRatio: float = 64, @@ -375,9 +375,9 @@ def setValues( minLumpedAreaDS: float = 5, cyclicSymmetry: Boolean = OFF, cyclicImages: int = 2, - cyclicRotPt: Optional[ModelDot] = None, - cyclicRotEndPt: Optional[ModelDot] = None, - cyclicSymPt: Optional[ModelDot] = None, + cyclicRotPt: ModelDot | None = None, + cyclicRotEndPt: ModelDot | None = None, + cyclicSymPt: ModelDot | None = None, periodicSymmetries: int = 0, periodicImages_1: int = 2, periodicImages_2: int = 2, @@ -390,15 +390,15 @@ def setValues( periodicDistance_1: tuple = (), periodicDistance_2: tuple = (), periodicDistance_3: tuple = (), - periodicSymZ: Optional[float] = None, - periodicDistZ: Optional[float] = None, + periodicSymZ: float | None = None, + periodicDistZ: float | None = None, reflectionSymmetries: int = 0, reflectionSymAxis_1: str = "", reflectionSymAxis_2: str = "", reflectionSymPlane_1: str = "", reflectionSymPlane_2: str = "", reflectionSymPlane_3: str = "", - reflectionSymZ: Optional[float] = None, + reflectionSymZ: float | None = None, ): """This method modifies the data for an existing CavityRadiation object in the step where it is created. @@ -555,8 +555,8 @@ def setValuesInStep( self, stepName: str, blocking: Literal[C.NO_BLOCKING, C.BLOCKING_ALL, C.PARTIAL_BLOCKING] = BLOCKING_ALL, - blockingSurfaces: Optional[RegionArray] = None, - rangeOfView: Optional[float] = None, + blockingSurfaces: RegionArray | None = None, + rangeOfView: float | None = None, surfaceReflection: Boolean = ON, viewfactorAccurTol: float = 0, ): diff --git a/src/abaqus/Interaction/CavityRadiationState.py b/src/abaqus/Interaction/CavityRadiationState.py index 3029ccff3b..b76bbd7af6 100644 --- a/src/abaqus/Interaction/CavityRadiationState.py +++ b/src/abaqus/Interaction/CavityRadiationState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,24 +26,24 @@ class CavityRadiationState(InteractionState): #: A SymbolicConstant specifying the blocking checks to be performed in the viewfactor #: calculations. Possible values are BLOCKING_ALL, NO_BLOCKING, and PARTIAL_BLOCKING. - blocking: Optional[SymbolicConstant] = None + blocking: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the blocking member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - blockingState: Optional[SymbolicConstant] = None + blockingState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **blockingSurfaces** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - blockingSurfacesState: Optional[SymbolicConstant] = None + blockingSurfacesState: SymbolicConstant #: A Float specifying the distance beyond which factors need not be calculated because #: surfaces are judged to be too far apart to “see” each other (due to blocking by other #: surfaces). - rangeOfView: Optional[float] = None + rangeOfView: float | None = None #: A SymbolicConstant specifying the propagation state of the **rangeOfView** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - rangeOfViewState: Optional[SymbolicConstant] = None + rangeOfViewState: SymbolicConstant #: A Boolean specifying whether reflection must be included in the cavity radiation #: calculations. The default value is ON. @@ -51,14 +51,14 @@ class CavityRadiationState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **surfaceReflection** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - surfaceReflectionState: Optional[SymbolicConstant] = None + surfaceReflectionState: SymbolicConstant #: A Float specifying the acceptable tolerance for the viewfactor calculations. - viewfactorAccuracyTol: Optional[float] = None + viewfactorAccuracyTol: float | None = None #: A SymbolicConstant specifying the propagation state of the **viewfactorAccuracyTol** #: member. Possible values are UNSET, SET, UNCHANGED, and FREED. - viewfactorAccuracyTolState: Optional[SymbolicConstant] = None + viewfactorAccuracyTolState: SymbolicConstant #: A tuple of Strings specifying the surfaces that provide blocking inside the cavity. blockingSurfaces: tuple = () @@ -66,4 +66,4 @@ class CavityRadiationState(InteractionState): #: A SymbolicConstant specifying the propagation state of the InteractionState object. #: Possible values #: are:NOT_YET_ACTIVECREATEDPROPAGATEDMODIFIEDDEACTIVATEDNO_LONGER_ACTIVETYPE_NOT_APPLICABLEINSTANCE_NOT_APPLICABLEBUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/ConcentratedFilmConditionState.py b/src/abaqus/Interaction/ConcentratedFilmConditionState.py index 2b2e05f98c..4e2ec94b36 100644 --- a/src/abaqus/Interaction/ConcentratedFilmConditionState.py +++ b/src/abaqus/Interaction/ConcentratedFilmConditionState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,37 +27,37 @@ class ConcentratedFilmConditionState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **interactionProperty** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - interactionPropertyState: Optional[SymbolicConstant] = None + interactionPropertyState: SymbolicConstant #: A Float specifying the sink temperature. - sinkTemperature: Optional[float] = None + sinkTemperature: float | None = None #: A SymbolicConstant specifying the propagation state of the **sinkTemperature** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - sinkTemperatureState: Optional[SymbolicConstant] = None + sinkTemperatureState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **sinkAmplitude** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - sinkAmplitudeState: Optional[SymbolicConstant] = None + sinkAmplitudeState: SymbolicConstant #: A Float specifying the film coefficient. - filmCoeff: Optional[float] = None + filmCoeff: float | None = None #: A SymbolicConstant specifying the propagation state of the **filmCoeff** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - filmCoeffState: Optional[SymbolicConstant] = None + filmCoeffState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **filmCoeffAmplitude** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - filmCoeffAmplitudeState: Optional[SymbolicConstant] = None + filmCoeffAmplitudeState: SymbolicConstant #: A Float specifying the area associated with the node where the concentrated film #: condition is applied. - nodalArea: Optional[float] = None + nodalArea: float | None = None #: A SymbolicConstant specifying the propagation state of the **nodalArea** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - nodalAreaState: Optional[SymbolicConstant] = None + nodalAreaState: SymbolicConstant #: A String specifying the FilmConditionProp object associated with this interaction. interactionProperty: str = "" @@ -82,4 +82,4 @@ class ConcentratedFilmConditionState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/ConcentratedRadiationToAmbientState.py b/src/abaqus/Interaction/ConcentratedRadiationToAmbientState.py index 9cb5e7a823..0de0b07a28 100644 --- a/src/abaqus/Interaction/ConcentratedRadiationToAmbientState.py +++ b/src/abaqus/Interaction/ConcentratedRadiationToAmbientState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,30 +26,30 @@ class ConcentratedRadiationToAmbientState(InteractionState): """ #: A Float specifying the ambient temperature. - ambientTemperature: Optional[float] = None + ambientTemperature: float | None = None #: A SymbolicConstant specifying the propagation state of the **ambientTemperature** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - ambientTemperatureState: Optional[SymbolicConstant] = None + ambientTemperatureState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **ambientTemperatureAmp** #: member. Possible values are UNSET, SET, UNCHANGED, and FREED. - ambientTemperatureAmpState: Optional[SymbolicConstant] = None + ambientTemperatureAmpState: SymbolicConstant #: A Float specifying the emissivity. - emissivity: Optional[float] = None + emissivity: float | None = None #: A SymbolicConstant specifying the propagation state of the **emissivity** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - emissivityState: Optional[SymbolicConstant] = None + emissivityState: SymbolicConstant #: A Float specifying the area associated with the node where the concentrated radiation is #: applied. - nodalArea: Optional[float] = None + nodalArea: float | None = None #: A SymbolicConstant specifying the propagation state of the **nodalArea** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - nodalAreaState: Optional[SymbolicConstant] = None + nodalAreaState: SymbolicConstant #: A String specifying the name of the Amplitude object that gives the variation of the #: ambient temperature with time. @@ -67,4 +67,4 @@ class ConcentratedRadiationToAmbientState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/ContactDamage.py b/src/abaqus/Interaction/ContactDamage.py index 3557835125..0e51daa746 100644 --- a/src/abaqus/Interaction/ContactDamage.py +++ b/src/abaqus/Interaction/ContactDamage.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -196,7 +196,7 @@ class ContactDamage: #: None or a Float specifying the exponent in the power-law or BK criterion that defines #: the variation of fracture energy with mode mix. This argument is valid only when #: **useEvolution** = ON and when **mixedModeType** = POWER_LAW or BK. The default value is None. - exponent: Optional[float] = None + exponent: float | None = None #: A Boolean specifying whether the evolution data depend on temperature. This argument is #: valid only when **useEvolution** = ON. The default value is OFF. @@ -212,16 +212,16 @@ class ContactDamage: #: None or a Float specifying the viscosity coefficient. This argument is valid only when #: **useStabilization** = ON. The default value is None. - viscosityCoef: Optional[float] = None + viscosityCoef: float | None = None #: A tuple of tuples of Floats specifying the values defining the damage initiation. The #: items in the table data are described below. - initTable: Optional[float] = None + initTable: float | None = None #: A tuple of tuples of Floats specifying the values defining the damage evolution. The #: items in the table data are described below. This argument is valid only when #: **useEvolution** = ON. - evolTable: Optional[float] = None + evolTable: float | None = None @abaqus_method_doc def __init__( @@ -236,12 +236,12 @@ def __init__( useMixedMode: Boolean = OFF, mixedModeType: Literal[C.BK, C.ENERGY, C.POWER_LAW, C.TABULAR] = TABULAR, modeMixRatio: Literal[C.TRACTION, C.ENERGY, C.TABULAR] = ENERGY, - exponent: Optional[float] = None, + exponent: float | None = None, evolTempDep: Boolean = OFF, evolDependencies: int = 0, evolTable: tuple = (), useStabilization: Boolean = OFF, - viscosityCoef: Optional[float] = None, + viscosityCoef: float | None = None, ): """This method creates a ContactDamage object. diff --git a/src/abaqus/Interaction/ContactDamping.py b/src/abaqus/Interaction/ContactDamping.py index 0f93390006..424e3307af 100644 --- a/src/abaqus/Interaction/ContactDamping.py +++ b/src/abaqus/Interaction/ContactDamping.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -60,7 +62,7 @@ class ContactDamping: #: A tuple of pairs of Floats specifying the damping properties. The items in the table #: data are described below. - table: Optional[float] = None + table: float | None = None @abaqus_method_doc def __init__( diff --git a/src/abaqus/Interaction/ContactExp.py b/src/abaqus/Interaction/ContactExp.py index 0a31db8da5..c4a058fd24 100644 --- a/src/abaqus/Interaction/ContactExp.py +++ b/src/abaqus/Interaction/ContactExp.py @@ -1,4 +1,6 @@ -from typing import Optional, Union, overload +from __future__ import annotations + +from typing import Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -94,16 +96,16 @@ def __init__( createStepName: str, useAllstar: Boolean = OFF, globalSmoothing: Boolean = ON, - includedPairs: Optional[RegionPairs] = None, - excludedPairs: Optional[RegionPairs] = None, - contactPropertyAssignments: Optional[ContactPropertyAssignment] = None, - surfaceThicknessAssignments: Optional[SurfaceThicknessAssignment] = None, - surfaceOffsetAssignments: Optional[SurfaceOffsetAssignment] = None, - surfaceFeatureAssignments: Optional[SurfaceFeatureAssignment] = None, - smoothingAssignments: Optional[SmoothingAssignment] = None, + includedPairs: RegionPairs | None = None, + excludedPairs: RegionPairs | None = None, + contactPropertyAssignments: ContactPropertyAssignment | None = None, + surfaceThicknessAssignments: SurfaceThicknessAssignment | None = None, + surfaceOffsetAssignments: SurfaceOffsetAssignment | None = None, + surfaceFeatureAssignments: SurfaceFeatureAssignment | None = None, + smoothingAssignments: SmoothingAssignment | None = None, surfaceCrushTriggerAssignments: SurfaceCrushTriggerAssignment = SurfaceCrushTriggerAssignment(), surfaceFrictionAssignments: SurfaceFrictionAssignment = SurfaceFrictionAssignment(), - mainSecondaryAssignments: Optional[MainSecondaryAssignment] = None, + mainSecondaryAssignments: MainSecondaryAssignment | None = None, polarityAssignments: PolarityAssignments = PolarityAssignments(), ): """This method creates a ContactExp object. @@ -186,15 +188,15 @@ def __init__( surfaceCrushTriggerAssignments: SurfaceCrushTriggerAssignment = SurfaceCrushTriggerAssignment(), surfaceFrictionAssignments: SurfaceFrictionAssignment = SurfaceFrictionAssignment(), useAllstar: Boolean = OFF, - includedPairs: Optional[SymbolicConstant] = None, - excludedPairs: Optional[SymbolicConstant] = None, - contactPropertyAssignments: Optional[SymbolicConstant] = None, + includedPairs: SymbolicConstant | None = None, + excludedPairs: SymbolicConstant | None = None, + contactPropertyAssignments: SymbolicConstant | None = None, surfaceThicknessAssignments: Union[SymbolicConstant, float] = ORIGINAL, surfaceOffsetAssignments: Union[SymbolicConstant, float] = GLOBAL, surfaceFeatureAssignments: Union[SymbolicConstant, float] = PERIMETER, - smoothingAssignments: Optional[SymbolicConstant] = None, - mainSecondaryAssignments: Optional[SymbolicConstant] = None, - polarityAssignments: Optional[SymbolicConstant] = None, + smoothingAssignments: SymbolicConstant | None = None, + mainSecondaryAssignments: SymbolicConstant | None = None, + polarityAssignments: SymbolicConstant | None = None, ): """This method creates a ContactExp object. diff --git a/src/abaqus/Interaction/ContactProperty.py b/src/abaqus/Interaction/ContactProperty.py index 89bdccf1ab..d8303c100c 100644 --- a/src/abaqus/Interaction/ContactProperty.py +++ b/src/abaqus/Interaction/ContactProperty.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -83,7 +85,7 @@ class ContactProperty(InteractionProperty): heatGeneration: GapHeatGeneration = GapHeatGeneration() #: A Radiation object. - radiation: Optional[Radiation] = None + radiation: Radiation | None = None #: A GeometricProperties object. geometricProperties: GeometricProperties = GeometricProperties() @@ -125,11 +127,11 @@ def TangentialBehavior( dependencies: int = 0, exponentialDecayDefinition: Literal[C.TEST_DATA, C.COEFFICIENTS] = COEFFICIENTS, table: tuple = (), - shearStressLimit: Optional[float] = None, + shearStressLimit: float | None = None, maximumElasticSlip: Literal[C.FRACTION, C.ABSOLUTE_DISTANCE] = FRACTION, fraction: float = 0, absoluteDistance: float = 0, - elasticSlipStiffness: Optional[float] = None, + elasticSlipStiffness: float | None = None, nStateDependentVars: int = 0, useProperties: Boolean = OFF, ): @@ -213,7 +215,7 @@ def NormalBehavior( contactStiffness: Union[Literal[C.AUGMENTED_LAGRANGE, C.PENALTY, C.DEFAULT, C.HARD, C.LINEAR], float] = DEFAULT, pressureOverclosure: Literal[C.EXPONENTIAL, C.TABULAR, C.HARD, C.LINEAR, C.SCALE_FACTOR] = HARD, allowSeparation: Boolean = ON, - maxStiffness: Optional[float] = None, + maxStiffness: float | None = None, table: tuple = (), constraintEnforcementMethod: Literal[C.AUGMENTED_LAGRANGE, C.DEFAULT, C.DIRECT, C.PENALTY] = DEFAULT, overclosureFactor: float = 0, @@ -370,12 +372,12 @@ def Damage( useMixedMode: Boolean = OFF, mixedModeType: Literal[C.BK, C.ENERGY, C.POWER_LAW, C.TABULAR] = TABULAR, modeMixRatio: Literal[C.TRACTION, C.ENERGY, C.TABULAR] = ENERGY, - exponent: Optional[float] = None, + exponent: float | None = None, evolTempDep: Boolean = OFF, evolDependencies: int = 0, evolTable: tuple = (), useStabilization: Boolean = OFF, - viscosityCoef: Optional[float] = None, + viscosityCoef: float | None = None, ): """This method creates a ContactDamage object. @@ -733,12 +735,12 @@ def Radiation(self, mainEmissivity: float, secondaryEmissivity: float, table: tu def GeometricProperties( self, contactArea: float = 1, - padThickness: Optional[float] = None, - trackingThickness: Optional[float] = None, + padThickness: float | None = None, + trackingThickness: float | None = None, dependentVariables: int = 0, numProperties: int = 0, useUnsymmetricEqunProcedure: Boolean = OFF, - modelType: Optional[SymbolicConstant] = None, + modelType: SymbolicConstant | None = None, ): """This method creates a GeometricProperties object. diff --git a/src/abaqus/Interaction/ContactStd.py b/src/abaqus/Interaction/ContactStd.py index dbbd5d61c3..a060303e5e 100644 --- a/src/abaqus/Interaction/ContactStd.py +++ b/src/abaqus/Interaction/ContactStd.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union, overload +from __future__ import annotations + +from typing import Sequence, Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -109,20 +111,20 @@ def __init__( createStepName: str, useAllstar: Boolean = OFF, globalSmoothing: Boolean = ON, - includedPairs: Optional[RegionPairs] = None, - excludedPairs: Optional[RegionPairs] = None, - contactPropertyAssignments: Optional[ContactPropertyAssignment] = None, - surfaceThicknessAssignments: Optional[SurfaceThicknessAssignment] = None, - surfaceOffsetAssignments: Optional[SurfaceOffsetAssignment] = None, - surfaceFeatureAssignments: Optional[SurfaceFeatureAssignment] = None, + includedPairs: RegionPairs | None = None, + excludedPairs: RegionPairs | None = None, + contactPropertyAssignments: ContactPropertyAssignment | None = None, + surfaceThicknessAssignments: SurfaceThicknessAssignment | None = None, + surfaceOffsetAssignments: SurfaceOffsetAssignment | None = None, + surfaceFeatureAssignments: SurfaceFeatureAssignment | None = None, surfaceBeamSmoothingAssignments: SurfaceBeamSmoothingAssignment = SurfaceBeamSmoothingAssignment(), surfaceVertexCriteriaAssignments: SurfaceVertexCriteriaAssignment = SurfaceVertexCriteriaAssignment(), - slidingFormulationAssignments: Optional[Sequence[SlidingFormulationAssignment]] = None, - mainSecondaryAssignments: Optional[MainSecondaryAssignment] = None, - initializationAssignments: Optional[InitializationAssignment] = None, - stabilizationAssignments: Optional[StabilizationAssignment] = None, - smoothingAssignments: Optional[SmoothingAssignment] = None, - slidingTransitionAssignments: Optional[SlidingTransitionAssignment] = None, + slidingFormulationAssignments: Sequence[SlidingFormulationAssignment] | None = None, + mainSecondaryAssignments: MainSecondaryAssignment | None = None, + initializationAssignments: InitializationAssignment | None = None, + stabilizationAssignments: StabilizationAssignment | None = None, + smoothingAssignments: SmoothingAssignment | None = None, + slidingTransitionAssignments: SlidingTransitionAssignment | None = None, ): """This method creates a ContactStd object. @@ -206,7 +208,7 @@ def __init__( ContactStd A ContactStd object. """ - super().__init__() + ... @overload @abaqus_method_doc @@ -217,19 +219,19 @@ def __init__( globalSmoothing: Boolean = ON, surfaceBeamSmoothingAssignments: SurfaceBeamSmoothingAssignment = SurfaceBeamSmoothingAssignment(), surfaceVertexCriteriaAssignments: SurfaceVertexCriteriaAssignment = SurfaceVertexCriteriaAssignment(), - slidingFormulationAssignments: Optional[Sequence[SlidingFormulationAssignment]] = None, + slidingFormulationAssignments: Sequence[SlidingFormulationAssignment] | None = None, useAllstar: Boolean = OFF, - includedPairs: Optional[SymbolicConstant] = None, - excludedPairs: Optional[SymbolicConstant] = None, - contactPropertyAssignments: Optional[SymbolicConstant] = None, + includedPairs: SymbolicConstant | None = None, + excludedPairs: SymbolicConstant | None = None, + contactPropertyAssignments: SymbolicConstant | None = None, surfaceFeatureAssignments: Union[SymbolicConstant, float] = GLOBAL, surfaceThicknessAssignments: Union[SymbolicConstant, float] = GLOBAL, surfaceOffsetAssignments: Union[SymbolicConstant, float] = GLOBAL, - mainSecondaryAssignments: Optional[SymbolicConstant] = None, - initializationAssignments: Optional[SymbolicConstant] = None, - stabilizationAssignments: Optional[SymbolicConstant] = None, - smoothingAssignments: Optional[SymbolicConstant] = None, - slidingTransitionAssignments: Optional[SymbolicConstant] = None, + mainSecondaryAssignments: SymbolicConstant | None = None, + initializationAssignments: SymbolicConstant | None = None, + stabilizationAssignments: SymbolicConstant | None = None, + smoothingAssignments: SymbolicConstant | None = None, + slidingTransitionAssignments: SymbolicConstant | None = None, ): """This method creates a ContactStd object. @@ -359,7 +361,7 @@ def __init__( ContactStd A ContactStd object. """ - super().__init__() + ... def __init__(self, *args, **kwargs): ... diff --git a/src/abaqus/Interaction/ContactTangentialBehavior.py b/src/abaqus/Interaction/ContactTangentialBehavior.py index 2e1ecea8f1..9ebe6bb46f 100644 --- a/src/abaqus/Interaction/ContactTangentialBehavior.py +++ b/src/abaqus/Interaction/ContactTangentialBehavior.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -85,7 +85,7 @@ class ContactTangentialBehavior: #: None or a Float specifying the shear stress limit. If **shearStressLimit** = None, there is #: no upper limit. The default value is None. - shearStressLimit: Optional[float] = None + shearStressLimit: float | None = None #: A SymbolicConstant specifying what the maximum elastic slip will be. Possible values are #: FRACTION and ABSOLUTE_DISTANCE. The default value is FRACTION. @@ -100,7 +100,7 @@ class ContactTangentialBehavior: #: None or a Float specifying the elastic slip stiffness. If **elasticSlipStiffness** = None, #: there is no upper limit. The default value is None. - elasticSlipStiffness: Optional[float] = None + elasticSlipStiffness: float | None = None #: An Int specifying the number of state-dependent variables. The default value is 0. nStateDependentVars: int = 0 @@ -110,7 +110,7 @@ class ContactTangentialBehavior: #: A tuple of tuples of Floats specifying tangential behavior. The items in the table data #: are described below. - table: Optional[float] = None + table: float | None = None @abaqus_method_doc def __init__( @@ -125,11 +125,11 @@ def __init__( dependencies: int = 0, exponentialDecayDefinition: Literal[C.TEST_DATA, C.COEFFICIENTS] = COEFFICIENTS, table: tuple = (), - shearStressLimit: Optional[float] = None, + shearStressLimit: float | None = None, maximumElasticSlip: Literal[C.FRACTION, C.ABSOLUTE_DISTANCE] = FRACTION, fraction: float = 0, absoluteDistance: float = 0, - elasticSlipStiffness: Optional[float] = None, + elasticSlipStiffness: float | None = None, nStateDependentVars: int = 0, useProperties: Boolean = OFF, ): diff --git a/src/abaqus/Interaction/CyclicSymmetryState.py b/src/abaqus/Interaction/CyclicSymmetryState.py index 73d4a080e1..6b6011a7d0 100644 --- a/src/abaqus/Interaction/CyclicSymmetryState.py +++ b/src/abaqus/Interaction/CyclicSymmetryState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -35,7 +35,7 @@ class CyclicSymmetryState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **extractedNodalDiameter** #: member. Possible values are UNSET, SET, UNCHANGED, and FREED. - extractedNodalDiameterState: Optional[SymbolicConstant] = None + extractedNodalDiameterState: SymbolicConstant #: An Int specifying the lowest nodal diameter to be used in the eigenfrequency analysis. #: The default value is 0. @@ -43,7 +43,7 @@ class CyclicSymmetryState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **lowestNodalDiameter** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - lowestNodalDiameterState: Optional[SymbolicConstant] = None + lowestNodalDiameterState: SymbolicConstant #: An Int specifying the highest nodal diameter to be used in the eigenfrequency analysis. #: This argument value should be less than or equal to the half of the total number of @@ -52,7 +52,7 @@ class CyclicSymmetryState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **highestNodalDiameter** #: member. Possible values are UNSET, SET, UNCHANGED, and FREED. - highestNodalDiameterState: Optional[SymbolicConstant] = None + highestNodalDiameterState: SymbolicConstant #: An Int specifying the nodal diameter for which the modal-based steady-state dynamic #: analysis will be performed. This value should be greater than or equal to the lowest @@ -63,7 +63,7 @@ class CyclicSymmetryState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **excitiationNodalDiameter** #: member. Possible values are UNSET, SET, UNCHANGED, and FREED. - excitiationNodalDiameterState: Optional[SymbolicConstant] = None + excitiationNodalDiameterState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the InteractionState object. #: Possible values are: @@ -77,4 +77,4 @@ class CyclicSymmetryState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/ElasticFoundation.py b/src/abaqus/Interaction/ElasticFoundation.py index c4da7b7cae..963afe1337 100644 --- a/src/abaqus/Interaction/ElasticFoundation.py +++ b/src/abaqus/Interaction/ElasticFoundation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -70,7 +70,7 @@ def setValues(self, *args, **kwargs): ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, stiffness: Optional[float] = None): + def setValuesInStep(self, stepName: str, stiffness: float | None = None): """This method modifies the propagating data of an existing ElasticFoundation object in the specified step. diff --git a/src/abaqus/Interaction/ElasticFoundationState.py b/src/abaqus/Interaction/ElasticFoundationState.py index 44f1f21cab..71924ce630 100644 --- a/src/abaqus/Interaction/ElasticFoundationState.py +++ b/src/abaqus/Interaction/ElasticFoundationState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -21,11 +21,11 @@ class ElasticFoundationState(InteractionState): """ #: A Float specifying the foundation stiffness per area. - stiffness: Optional[float] = None + stiffness: float | None = None #: A SymbolicConstant specifying the propagation state of the stiffness member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - stiffnessState: Optional[SymbolicConstant] = None + stiffnessState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the InteractionState object. #: Possible values are: @@ -39,4 +39,4 @@ class ElasticFoundationState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/ExpContactControl.py b/src/abaqus/Interaction/ExpContactControl.py index 66e1ae1eb6..c3cb401dbc 100644 --- a/src/abaqus/Interaction/ExpContactControl.py +++ b/src/abaqus/Interaction/ExpContactControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -37,7 +37,7 @@ class ExpContactControl(ContactControl): #: An Int specifying the maximum number of increments between global contact searches. The #: **globTrkInc** argument applies only when **globTrkChoice** = SPECIFY. The default value is #: 100 for surface-to-surface contact and 4 for self-contact. - globTrkInc: Optional[int] = None + globTrkInc: int | None = None #: A Boolean specifying whether to use the more computationally efficient local tracking #: method. The default value is ON. @@ -61,7 +61,7 @@ def __init__( self, name: str, globTrkChoice: Literal[C.SPECIFY, C.DEFAULT] = DEFAULT, - globTrkInc: Optional[int] = None, + globTrkInc: int | None = None, fastLocalTrk: Boolean = ON, scalePenalty: float = 1, warpCheckPeriod: int = 20, @@ -115,7 +115,7 @@ def __init__( def setValues( self, globTrkChoice: Literal[C.SPECIFY, C.DEFAULT] = DEFAULT, - globTrkInc: Optional[int] = None, + globTrkInc: int | None = None, fastLocalTrk: Boolean = ON, scalePenalty: float = 1, warpCheckPeriod: int = 20, diff --git a/src/abaqus/Interaction/ExpInitialization.py b/src/abaqus/Interaction/ExpInitialization.py index 3a365603cb..ad726c9488 100644 --- a/src/abaqus/Interaction/ExpInitialization.py +++ b/src/abaqus/Interaction/ExpInitialization.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -38,22 +38,22 @@ class ExpInitialization(ContactInitialization): #: None or a Float specifying the interference distance. This argument is valid only when #: **overclosureType** = INTERFERENCE. The default value is None. - interferenceDistance: Optional[float] = None + interferenceDistance: float | None = None #: None or a Float specifying the initial clearance distance. This argument is valid only #: when **overclosureType** = CLEARANCE and must be specified in that case. The default value #: is None. - clearanceDistance: Optional[float] = None + clearanceDistance: float | None = None #: None or a Float specifying the distance tolerance within which initial openings will #: undergo strain-free adjustments. This argument is not valid when #: **overclosureType** = INTERFERENCE unless a value has been specified for #: **interferenceDistance**. The default value is None. - openingTolerance: Optional[float] = None + openingTolerance: float | None = None #: None or a Float specifying the distance tolerance within which initial overclosures will #: undergo strain-free adjustments. The default value is None. - overclosureTolerance: Optional[float] = None + overclosureTolerance: float | None = None #: A Boolean specifying whether to resolve clearances/overclosures by adjusting the nodal #: coordinates without creating strain in the model. **adjustNodalCoords** = True can be used @@ -68,7 +68,7 @@ class ExpInitialization(ContactInitialization): #: #: .. versionchanged:: 2022 #: The attribute ``slaveNodesetName`` was renamed to ``secondaryNodesetName``. - secondaryNodesetName: Optional[str] = None + secondaryNodesetName: str | None = None #: A Float specifying the fraction of the step time (between 0.0 and 1.0) in which the #: interference fit has to be solved. The default value is 1.0. This argument is valid only @@ -80,12 +80,12 @@ def __init__( self, name: str, overclosureType: Literal[C.INTERFERENCE, C.ADJUST, C.CLEARANCE] = ADJUST, - interferenceDistance: Optional[float] = None, - clearanceDistance: Optional[float] = None, - openingTolerance: Optional[float] = None, - overclosureTolerance: Optional[float] = None, + interferenceDistance: float | None = None, + clearanceDistance: float | None = None, + openingTolerance: float | None = None, + overclosureTolerance: float | None = None, adjustNodalCoords: Boolean = True, - secondaryNodesetName: Optional[str] = None, + secondaryNodesetName: str | None = None, stepFraction: float = 1, ): """This method creates an ExpInitialization object. @@ -150,12 +150,12 @@ def __init__( def setValues( self, overclosureType: Literal[C.INTERFERENCE, C.ADJUST, C.CLEARANCE] = ADJUST, - interferenceDistance: Optional[float] = None, - clearanceDistance: Optional[float] = None, - openingTolerance: Optional[float] = None, - overclosureTolerance: Optional[float] = None, + interferenceDistance: float | None = None, + clearanceDistance: float | None = None, + openingTolerance: float | None = None, + overclosureTolerance: float | None = None, adjustNodalCoords: Boolean = True, - secondaryNodesetName: Optional[str] = None, + secondaryNodesetName: str | None = None, stepFraction: float = 1, ): """This method modifies the ExpInitialization object. diff --git a/src/abaqus/Interaction/FilmConditionState.py b/src/abaqus/Interaction/FilmConditionState.py index 8b89fd5f5e..b4e28369b8 100644 --- a/src/abaqus/Interaction/FilmConditionState.py +++ b/src/abaqus/Interaction/FilmConditionState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,29 +27,29 @@ class FilmConditionState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **interactionProperty** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - interactionPropertyState: Optional[SymbolicConstant] = None + interactionPropertyState: SymbolicConstant #: A Float specifying the sink temperature. - sinkTemperature: Optional[float] = None + sinkTemperature: float | None = None #: A SymbolicConstant specifying the propagation state of the **sinkTemperature** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - sinkTemperatureState: Optional[SymbolicConstant] = None + sinkTemperatureState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **sinkAmplitude** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - sinkAmplitudeState: Optional[SymbolicConstant] = None + sinkAmplitudeState: SymbolicConstant #: A Float specifying the film coefficient. - filmCoeff: Optional[float] = None + filmCoeff: float | None = None #: A SymbolicConstant specifying the propagation state of the **filmCoeff** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - filmCoeffState: Optional[SymbolicConstant] = None + filmCoeffState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **filmCoeffAmplitude** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - filmCoeffAmplitudeState: Optional[SymbolicConstant] = None + filmCoeffAmplitudeState: SymbolicConstant #: A String specifying the FilmConditionProp object associated with this interaction. interactionProperty: str = "" @@ -74,4 +74,4 @@ class FilmConditionState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/FluidCavityProperty.py b/src/abaqus/Interaction/FluidCavityProperty.py index a9254489d4..3708047956 100644 --- a/src/abaqus/Interaction/FluidCavityProperty.py +++ b/src/abaqus/Interaction/FluidCavityProperty.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -45,12 +45,12 @@ class FluidCavityProperty(ContactProperty): #: None or a Float specifying the reference fluid density. This argument is applicable only #: when **definition** = HYDRAULIC, and is required in that case. The default value is None. - fluidDensity: Optional[float] = None + fluidDensity: float | None = None #: None or a Float specifying the molecular weight of the ideal gas species. This argument #: is applicable only when **definition** = PNEUMATIC, and is required in that case. The #: default value is None. - molecularWeight: Optional[float] = None + molecularWeight: float | None = None #: A Boolean specifying whether thermal expansion coefficients will be defined. This #: argument is applicable only when **definition** = HYDRAULIC. The default value is OFF. @@ -154,8 +154,8 @@ def __init__( self, name: str, definition: Literal[C.PNEUMATIC, C.HYDRAULIC] = HYDRAULIC, - fluidDensity: Optional[float] = None, - molecularWeight: Optional[float] = None, + fluidDensity: float | None = None, + molecularWeight: float | None = None, useExpansion: Boolean = OFF, expansionTempDep: Boolean = OFF, expansionDependencies: int = 0, @@ -287,8 +287,8 @@ def __init__( def setValues( self, definition: Literal[C.PNEUMATIC, C.HYDRAULIC] = HYDRAULIC, - fluidDensity: Optional[float] = None, - molecularWeight: Optional[float] = None, + fluidDensity: float | None = None, + molecularWeight: float | None = None, useExpansion: Boolean = OFF, expansionTempDep: Boolean = OFF, expansionDependencies: int = 0, diff --git a/src/abaqus/Interaction/FluidCavityState.py b/src/abaqus/Interaction/FluidCavityState.py index 152cfe338e..1ce87b9444 100644 --- a/src/abaqus/Interaction/FluidCavityState.py +++ b/src/abaqus/Interaction/FluidCavityState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -32,4 +32,4 @@ class FluidCavityState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/FluidExchangeState.py b/src/abaqus/Interaction/FluidExchangeState.py index c1489cc4c3..fb86492c46 100644 --- a/src/abaqus/Interaction/FluidExchangeState.py +++ b/src/abaqus/Interaction/FluidExchangeState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -32,4 +32,4 @@ class FluidExchangeState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/FluidInflatorProperty.py b/src/abaqus/Interaction/FluidInflatorProperty.py index 3b6309cc0b..eba4d3009e 100644 --- a/src/abaqus/Interaction/FluidInflatorProperty.py +++ b/src/abaqus/Interaction/FluidInflatorProperty.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -60,9 +60,9 @@ def __init__( definition: str, effectiveArea: float, tankVolume: float, - dischargeCoefficient: Optional[float] = None, + dischargeCoefficient: float | None = None, dataTable: tuple = (), - numFluids: Optional[int] = None, + numFluids: int | None = None, mixtureType: str = "", inflationTime: tuple = (), fluidbehaviorName: tuple = (), @@ -118,9 +118,9 @@ def __init__( @abaqus_method_doc def setValues( self, - dischargeCoefficient: Optional[float] = None, + dischargeCoefficient: float | None = None, dataTable: tuple = (), - numFluids: Optional[int] = None, + numFluids: int | None = None, mixtureType: str = "", inflationTime: tuple = (), fluidbehaviorName: tuple = (), diff --git a/src/abaqus/Interaction/FluidInflatorState.py b/src/abaqus/Interaction/FluidInflatorState.py index ae1bcfded8..d552eb89c3 100644 --- a/src/abaqus/Interaction/FluidInflatorState.py +++ b/src/abaqus/Interaction/FluidInflatorState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -35,4 +35,4 @@ class FluidInflatorState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/FractureCriterion.py b/src/abaqus/Interaction/FractureCriterion.py index ce0a2cc3b3..c8fc774db6 100644 --- a/src/abaqus/Interaction/FractureCriterion.py +++ b/src/abaqus/Interaction/FractureCriterion.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Interaction/GeometricProperties.py b/src/abaqus/Interaction/GeometricProperties.py index 7ad8f386b9..17a8e7dc51 100644 --- a/src/abaqus/Interaction/GeometricProperties.py +++ b/src/abaqus/Interaction/GeometricProperties.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -28,12 +28,12 @@ class GeometricProperties: #: None or a Float specifying the thickness of an interfacial layer between the contacting #: surfaces. If **padThickness** = None, there is no interfacial layer. The default value is #: None. - padThickness: Optional[float] = None + padThickness: float | None = None #: None or a Float specifying the thickness that determines the contacting surfaces to be #: tracked. The input value for this parameter cannot be negative. An internal default #: value is used if a zero value is input or if the parameter is omitted. - trackingThickness: Optional[float] = None + trackingThickness: float | None = None #: An Int specifying the number of state-dependent variables. The default value is 0. This #: argument is applicable only if **modelType** = MODELTYPE_USER or @@ -51,18 +51,18 @@ class GeometricProperties: useUnsymmetricEqunProcedure: Boolean = OFF #: A SymbolicConstant specifying the surface interaction model type. - modelType: Optional[SymbolicConstant] = None + modelType: SymbolicConstant @abaqus_method_doc def __init__( self, contactArea: float = 1, - padThickness: Optional[float] = None, - trackingThickness: Optional[float] = None, + padThickness: float | None = None, + trackingThickness: float | None = None, dependentVariables: int = 0, numProperties: int = 0, useUnsymmetricEqunProcedure: Boolean = OFF, - modelType: Optional[SymbolicConstant] = None, + modelType: SymbolicConstant | None = None, ): """This method creates a GeometricProperties object. diff --git a/src/abaqus/Interaction/IncidentWave.py b/src/abaqus/Interaction/IncidentWave.py index 5866b30cb6..c18854bc8d 100644 --- a/src/abaqus/Interaction/IncidentWave.py +++ b/src/abaqus/Interaction/IncidentWave.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -73,15 +73,15 @@ class IncidentWave(Interaction): #: None or a Float specifying the initial depth of the UNDEX bubble. The default value is #: None.This argument is valid only when **definition** = UNDEX. - initialDepth: Optional[float] = None + initialDepth: float | None = None #: A Float specifying the reference magnitude.This argument is not valid when #: **definition** = CONWEP. - referenceMagnitude: Optional[float] = None + referenceMagnitude: float | None = None #: A Float specifying the time of detonation, given in total time.This argument is valid #: only when **definition** = CONWEP. - detonationTime: Optional[float] = None + detonationTime: float | None = None #: A Float specifying the magnitude scale factor. The default value is 1.0.This argument is #: valid only when **definition** = CONWEP. @@ -100,9 +100,9 @@ def __init__( amplitude: str = "", imaginaryAmplitude: str = "", surfaceNormal: tuple = (), - initialDepth: Optional[float] = None, - referenceMagnitude: Optional[float] = None, - detonationTime: Optional[float] = None, + initialDepth: float | None = None, + referenceMagnitude: float | None = None, + detonationTime: float | None = None, magnitudeFactor: float = 1, ): """This method creates an IncidentWave object. @@ -176,9 +176,9 @@ def setValues( amplitude: str = "", imaginaryAmplitude: str = "", surfaceNormal: tuple = (), - initialDepth: Optional[float] = None, - referenceMagnitude: Optional[float] = None, - detonationTime: Optional[float] = None, + initialDepth: float | None = None, + referenceMagnitude: float | None = None, + detonationTime: float | None = None, magnitudeFactor: float = 1, ): """This method modifies the IncidentWave object. diff --git a/src/abaqus/Interaction/IncidentWaveProperty.py b/src/abaqus/Interaction/IncidentWaveProperty.py index 9f6a8934ec..27a6384695 100644 --- a/src/abaqus/Interaction/IncidentWaveProperty.py +++ b/src/abaqus/Interaction/IncidentWaveProperty.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -47,29 +47,29 @@ class IncidentWaveProperty(ContactProperty): #: A Float specifying the speed of sound in the fluid.This argument is not valid when #: **definition** = AIR_BLAST or when **definition** = SURFACE_BLAST. - soundSpeed: Optional[float] = None + soundSpeed: float | None = None #: A Float specifying the fluid mass density.This argument is not valid when #: **definition** = AIR_BLAST or when **definition** = SURFACE_BLAST. - fluidDensity: Optional[float] = None + fluidDensity: float | None = None #: None or a Float specifying the ratio of specific heats for gas. The default value is #: None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - specificHeatRatio: Optional[float] = None + specificHeatRatio: float | None = None #: None or a Float specifying the acceleration due to gravity. The default value is #: None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - gravity: Optional[float] = None + gravity: float | None = None #: None or a Float specifying the atmospheric pressure. The default value is None.This #: argument is valid only when **definition** = SPHERICAL and **propagationModel** = UNDEX_CHARGE. - atmosphericPressure: Optional[float] = None + atmosphericPressure: float | None = None #: None or a Float specifying the fluid drag coefficient. The default value is None.This #: argument is valid only when **definition** = SPHERICAL and **propagationModel** = UNDEX_CHARGE. - dragCoefficient: Optional[float] = None + dragCoefficient: float | None = None #: A Float specifying the fluid drag exponent. The default value is 2.0.This argument is #: valid only when **definition** = SPHERICAL and **propagationModel** = UNDEX_CHARGE. @@ -83,42 +83,42 @@ class IncidentWaveProperty(ContactProperty): #: None or a Float specifying the density of the charge material. The default value is #: None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - chargeDensity: Optional[float] = None + chargeDensity: float | None = None #: None or a Float specifying the mass of the charge material. The default value is #: None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - chargeMass: Optional[float] = None + chargeMass: float | None = None #: None or a Float specifying the charge material constant K. The default value is #: None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - constantK1: Optional[float] = None + constantK1: float | None = None #: None or a Float specifying the charge material constant k. The default value is #: None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - constantK2: Optional[float] = None + constantK2: float | None = None #: None or a Float specifying the charge material constant A. The default value is #: None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - constantA: Optional[float] = None + constantA: float | None = None #: None or a Float specifying the charge material constant B. The default value is #: None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - constantB: Optional[float] = None + constantB: float | None = None #: None or a Float specifying the charge material constant Kc. The default value is #: None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - constantKc: Optional[float] = None + constantKc: float | None = None #: None or a Float specifying the time duration for the bubble simulation. The default #: value is None.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - duration: Optional[float] = None + duration: float | None = None #: An Int specifying the maximum number of time steps for the bubble simulation. The #: default value is 1500.This argument is valid only when **definition** = SPHERICAL and @@ -128,12 +128,12 @@ class IncidentWaveProperty(ContactProperty): #: A Float specifying the relative step size control parameter. The default value is #: 1x10⁻¹¹.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - relativeStepControl: Optional[float] = None + relativeStepControl: float | None = None #: A Float specifying the absolute step size control parameter. The default value is #: 1x10⁻¹¹.This argument is valid only when **definition** = SPHERICAL and #: **propagationModel** = UNDEX_CHARGE. - absoluteStepControl: Optional[float] = None + absoluteStepControl: float | None = None #: A Float specifying the step size control exponent. The default value is 0.2.This #: argument is valid only when **definition** = SPHERICAL and **propagationModel** = UNDEX_CHARGE. @@ -156,11 +156,11 @@ class IncidentWaveProperty(ContactProperty): #: An Int specifying the seed number (N) for the diffuse source calculation. N2 sources #: will be used in the simulation.This argument is valid only when **definition** = DIFFUSE. - seedNumber: Optional[int] = None + seedNumber: int | None = None #: A Float specifying the equivalent mass of TNT, in any preferred mass unit.This argument #: is valid only when **definition** = AIR_BLAST or **definition** = SURFACE_BLAST. - massTNT: Optional[float] = None + massTNT: float | None = None #: A Float specifying the multiplication factor to convert from the preferred mass unit to #: kilograms. The default value is 1.0.This argument is valid only when @@ -188,31 +188,31 @@ def __init__( name: str, definition: Literal[C.PLANAR, C.SPHERICAL, C.DIFFUSE, C.SURFACE_BLAST, C.AIR_BLAST] = PLANAR, propagationModel: Literal[C.ACOUSTIC, C.SPHERICAL, C.GENERALIZED_DECAY, C.UNDEX_CHARGE] = ACOUSTIC, - soundSpeed: Optional[float] = None, - fluidDensity: Optional[float] = None, - specificHeatRatio: Optional[float] = None, - gravity: Optional[float] = None, - atmosphericPressure: Optional[float] = None, - dragCoefficient: Optional[float] = None, + soundSpeed: float | None = None, + fluidDensity: float | None = None, + specificHeatRatio: float | None = None, + gravity: float | None = None, + atmosphericPressure: float | None = None, + dragCoefficient: float | None = None, dragExponent: float = 2, waveEffects: Boolean = ON, - chargeDensity: Optional[float] = None, - chargeMass: Optional[float] = None, - constantK1: Optional[float] = None, - constantK2: Optional[float] = None, - constantA: Optional[float] = None, - constantB: Optional[float] = None, - constantKc: Optional[float] = None, - duration: Optional[float] = None, + chargeDensity: float | None = None, + chargeMass: float | None = None, + constantK1: float | None = None, + constantK2: float | None = None, + constantA: float | None = None, + constantB: float | None = None, + constantKc: float | None = None, + duration: float | None = None, maximumSteps: int = 1500, - relativeStepControl: Optional[float] = None, - absoluteStepControl: Optional[float] = None, + relativeStepControl: float | None = None, + absoluteStepControl: float | None = None, stepControlExponent: float = 0, genDecayA: float = 0, genDecayB: float = 0, genDecayC: float = 0, - seedNumber: Optional[int] = None, - massTNT: Optional[float] = None, + seedNumber: int | None = None, + massTNT: float | None = None, massFactor: float = 1, lengthFactor: float = 1, timeFactor: float = 1, @@ -357,31 +357,31 @@ def setValues( self, definition: Literal[C.PLANAR, C.SPHERICAL, C.DIFFUSE, C.SURFACE_BLAST, C.AIR_BLAST] = PLANAR, propagationModel: Literal[C.ACOUSTIC, C.SPHERICAL, C.GENERALIZED_DECAY, C.UNDEX_CHARGE] = ACOUSTIC, - soundSpeed: Optional[float] = None, - fluidDensity: Optional[float] = None, - specificHeatRatio: Optional[float] = None, - gravity: Optional[float] = None, - atmosphericPressure: Optional[float] = None, - dragCoefficient: Optional[float] = None, + soundSpeed: float | None = None, + fluidDensity: float | None = None, + specificHeatRatio: float | None = None, + gravity: float | None = None, + atmosphericPressure: float | None = None, + dragCoefficient: float | None = None, dragExponent: float = 2, waveEffects: Boolean = ON, - chargeDensity: Optional[float] = None, - chargeMass: Optional[float] = None, - constantK1: Optional[float] = None, - constantK2: Optional[float] = None, - constantA: Optional[float] = None, - constantB: Optional[float] = None, - constantKc: Optional[float] = None, - duration: Optional[float] = None, + chargeDensity: float | None = None, + chargeMass: float | None = None, + constantK1: float | None = None, + constantK2: float | None = None, + constantA: float | None = None, + constantB: float | None = None, + constantKc: float | None = None, + duration: float | None = None, maximumSteps: int = 1500, - relativeStepControl: Optional[float] = None, - absoluteStepControl: Optional[float] = None, + relativeStepControl: float | None = None, + absoluteStepControl: float | None = None, stepControlExponent: float = 0, genDecayA: float = 0, genDecayB: float = 0, genDecayC: float = 0, - seedNumber: Optional[int] = None, - massTNT: Optional[float] = None, + seedNumber: int | None = None, + massTNT: float | None = None, massFactor: float = 1, lengthFactor: float = 1, timeFactor: float = 1, diff --git a/src/abaqus/Interaction/IncidentWaveState.py b/src/abaqus/Interaction/IncidentWaveState.py index f913d8d5d8..6949d5f2b7 100644 --- a/src/abaqus/Interaction/IncidentWaveState.py +++ b/src/abaqus/Interaction/IncidentWaveState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,4 +27,4 @@ class IncidentWaveState(InteractionState): #: A SymbolicConstant specifying the propagation state of the InteractionState object. #: Possible values #: are:NOT_YET_ACTIVECREATEDPROPAGATEDMODIFIEDDEACTIVATEDNO_LONGER_ACTIVETYPE_NOT_APPLICABLEINSTANCE_NOT_APPLICABLEBUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/InteractionContactControlModel.py b/src/abaqus/Interaction/InteractionContactControlModel.py index 72972b67bc..ace82f5ab4 100644 --- a/src/abaqus/Interaction/InteractionContactControlModel.py +++ b/src/abaqus/Interaction/InteractionContactControlModel.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -26,7 +26,7 @@ def ExpContactControl( self, name: str, globTrkChoice: Literal[C.SPECIFY, C.DEFAULT] = DEFAULT, - globTrkInc: Optional[int] = None, + globTrkInc: int | None = None, fastLocalTrk: Boolean = ON, scalePenalty: float = 1, warpCheckPeriod: int = 20, @@ -91,9 +91,9 @@ def StdContactControl( name: str, stiffnessScaleFactor: float = 1, penetrationTolChoice: Literal[C.RELATIVE, C.ABSOLUTE] = RELATIVE, - relativePenetrationTolerance: Optional[float] = None, - absolutePenetrationTolerance: Optional[float] = None, - frictionOnset: Optional[Literal[C.IMMEDIATE, C.DELAYED]] = None, + relativePenetrationTolerance: float | None = None, + absolutePenetrationTolerance: float | None = None, + frictionOnset: Literal[C.IMMEDIATE, C.DELAYED] | None = None, automaticTolerances: Boolean = OFF, maxchp: int = 0, perrmx: float = 0, @@ -104,7 +104,7 @@ def StdContactControl( tangFraction: float = 1, eosFraction: float = 0, zeroDampingChoice: Literal[C.COMPUTE, C.AUTOMATIC, C.SPECIFY, C.COEFFICIENT] = COMPUTE, - zeroDamping: Optional[float] = None, + zeroDamping: float | None = None, enforceWithLagrangeMultipliers: Literal[C.ENFORCEMENT_OFF, C.DEFAULT, C.ENFORCEMENT_ON] = DEFAULT, ) -> StdContactControl: """This method creates an StdContactControl object. diff --git a/src/abaqus/Interaction/InteractionContactInitializationModel.py b/src/abaqus/Interaction/InteractionContactInitializationModel.py index 41311bd020..ea5340c683 100644 --- a/src/abaqus/Interaction/InteractionContactInitializationModel.py +++ b/src/abaqus/Interaction/InteractionContactInitializationModel.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -18,12 +18,12 @@ def ExpInitialization( self, name: str, overclosureType: Literal[C.INTERFERENCE, C.ADJUST, C.CLEARANCE] = ADJUST, - interferenceDistance: Optional[float] = None, - clearanceDistance: Optional[float] = None, - openingTolerance: Optional[float] = None, - overclosureTolerance: Optional[float] = None, + interferenceDistance: float | None = None, + clearanceDistance: float | None = None, + openingTolerance: float | None = None, + overclosureTolerance: float | None = None, adjustNodalCoords: Boolean = True, - secondaryNodesetName: Optional[str] = None, + secondaryNodesetName: str | None = None, stepFraction: float = 1, ) -> ExpInitialization: """This method creates an ExpInitialization object. @@ -100,10 +100,10 @@ def StdInitialization( self, name: str, overclosureType: Literal[C.INTERFERENCE, C.ADJUST, C.CLEARANCE] = ADJUST, - interferenceDistance: Optional[float] = None, - clearanceDistance: Optional[float] = None, - openingTolerance: Optional[float] = None, - overclosureTolerance: Optional[float] = None, + interferenceDistance: float | None = None, + clearanceDistance: float | None = None, + openingTolerance: float | None = None, + overclosureTolerance: float | None = None, ) -> StdInitialization: """This method creates a StdInitialization object. diff --git a/src/abaqus/Interaction/InteractionContactStabilizationModel.py b/src/abaqus/Interaction/InteractionContactStabilizationModel.py index 5a7b705a83..823af35340 100644 --- a/src/abaqus/Interaction/InteractionContactStabilizationModel.py +++ b/src/abaqus/Interaction/InteractionContactStabilizationModel.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -13,7 +13,7 @@ class InteractionContactStabilizationModel(ModelBase): def StdStabilization( self, name: str, - zeroDistance: Optional[float] = None, + zeroDistance: float | None = None, reductionFactor: float = 0, scaleFactor: float = 1, tangentialFactor: float = 0, diff --git a/src/abaqus/Interaction/InteractionModel.py b/src/abaqus/Interaction/InteractionModel.py index 204b28c753..647f318088 100644 --- a/src/abaqus/Interaction/InteractionModel.py +++ b/src/abaqus/Interaction/InteractionModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Tuple, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -105,7 +107,7 @@ def contactDetection( searchDomain: Literal[C.MODEL] = MODEL, defaultType: Literal[C.CONTACT, C.CONTACT_EXPLICIT, C.TIE, C.CONTACT_STANDARD] = CONTACT, interactionProperty: str = "", - separationTolerance: Optional[float] = None, + separationTolerance: float | None = None, extendByAngle: float = 20, mergeWithinAngle: float = 20, searchSingleInstances: Boolean = OFF, @@ -123,7 +125,7 @@ def contactDetection( includeNonOverlapping: Boolean = OFF, meshedGeometrySearchTechnique: Literal[C.USE_MESH, C.USE_GEOMETRY] = USE_GEOMETRY, useShellThickness: Boolean = ON, - surfaceSmoothing: Optional[Literal[C.AUTOMATIC, C.NONE]] = None, + surfaceSmoothing: Literal[C.AUTOMATIC, C.NONE] | None = None, ): """This method uses contact detection to create SurfaceToSurfaceContactStd, SurfaceToSurfaceContactExp, and Tie objects. @@ -221,13 +223,13 @@ def contactDetection( ... @abaqus_method_doc - def getSurfaceSeparation(self) -> Tuple[Tuple[str, str, float, bool]]: + def getSurfaceSeparation(self) -> tuple[tuple[str, str, float, bool]]: """This method returns a list of all possible contacts that can be created using the ContactDetection method. Returns ------- - Tuple[Tuple[str, str, float, bool]] + tuple[tuple[str, str, float, bool]] Tuple of tuples, where each tuple holds information, to be used in contact creation as follows: @@ -237,7 +239,7 @@ def getSurfaceSeparation(self) -> Tuple[Tuple[str, str, float, bool]]: surface. - A boolean specifying whether or not contact surfaces are overclosed. """ - ... + return (("main", "secondary", 0.0, False),) @abaqus_method_doc def AcousticImpedance( @@ -397,10 +399,10 @@ def CavityRadiation( createStepName: str, surfaces: RegionArray, surfaceEmissivities: tuple = (), - ambientTemp: Optional[float] = None, + ambientTemp: float | None = None, blocking: Literal[C.NO_BLOCKING, C.BLOCKING_ALL, C.PARTIAL_BLOCKING] = BLOCKING_ALL, - blockingSurfaces: Optional[RegionArray] = None, - rangeOfView: Optional[float] = None, + blockingSurfaces: RegionArray | None = None, + rangeOfView: float | None = None, surfaceReflection: Boolean = ON, viewfactorAccurTol: float = 0, minInfinitesimalRatio: float = 64, @@ -408,9 +410,9 @@ def CavityRadiation( minLumpedAreaDS: float = 5, cyclicSymmetry: Boolean = OFF, cyclicImages: int = 2, - cyclicRotPt: Optional[ModelDot] = None, - cyclicRotEndPt: Optional[ModelDot] = None, - cyclicSymPt: Optional[ModelDot] = None, + cyclicRotPt: ModelDot | None = None, + cyclicRotEndPt: ModelDot | None = None, + cyclicSymPt: ModelDot | None = None, periodicSymmetries: int = 0, periodicImages_1: int = 2, periodicImages_2: int = 2, @@ -423,15 +425,15 @@ def CavityRadiation( periodicDistance_1: tuple = (), periodicDistance_2: tuple = (), periodicDistance_3: tuple = (), - periodicSymZ: Optional[float] = None, - periodicDistZ: Optional[float] = None, + periodicSymZ: float | None = None, + periodicDistZ: float | None = None, reflectionSymmetries: int = 0, reflectionSymAxis_1: str = "", reflectionSymAxis_2: str = "", reflectionSymPlane_1: str = "", reflectionSymPlane_2: str = "", reflectionSymPlane_3: str = "", - reflectionSymZ: Optional[float] = None, + reflectionSymZ: float | None = None, ) -> CavityRadiation: """This method creates a CavityRadiation object. @@ -831,16 +833,16 @@ def ContactExp( createStepName: str, useAllstar: Boolean = OFF, globalSmoothing: Boolean = ON, - includedPairs: Optional[RegionPairs] = None, - excludedPairs: Optional[RegionPairs] = None, - contactPropertyAssignments: Optional[ContactPropertyAssignment] = None, - surfaceThicknessAssignments: Optional[SurfaceThicknessAssignment] = None, - surfaceOffsetAssignments: Optional[SurfaceOffsetAssignment] = None, - surfaceFeatureAssignments: Optional[SurfaceFeatureAssignment] = None, - smoothingAssignments: Optional[SmoothingAssignment] = None, + includedPairs: RegionPairs | None = None, + excludedPairs: RegionPairs | None = None, + contactPropertyAssignments: ContactPropertyAssignment | None = None, + surfaceThicknessAssignments: SurfaceThicknessAssignment | None = None, + surfaceOffsetAssignments: SurfaceOffsetAssignment | None = None, + surfaceFeatureAssignments: SurfaceFeatureAssignment | None = None, + smoothingAssignments: SmoothingAssignment | None = None, surfaceCrushTriggerAssignments: SurfaceCrushTriggerAssignment = SurfaceCrushTriggerAssignment(), surfaceFrictionAssignments: SurfaceFrictionAssignment = SurfaceFrictionAssignment(), - mainSecondaryAssignments: Optional[MainSecondaryAssignment] = None, + mainSecondaryAssignments: MainSecondaryAssignment | None = None, polarityAssignments: PolarityAssignments = PolarityAssignments(), ): """This method creates a ContactExp object. @@ -937,20 +939,20 @@ def ContactStd( createStepName: str, useAllstar: Boolean = OFF, globalSmoothing: Boolean = ON, - includedPairs: Optional[RegionPairs] = None, - excludedPairs: Optional[RegionPairs] = None, - contactPropertyAssignments: Optional[ContactPropertyAssignment] = None, - surfaceThicknessAssignments: Optional[SurfaceThicknessAssignment] = None, - surfaceOffsetAssignments: Optional[SurfaceOffsetAssignment] = None, - surfaceFeatureAssignments: Optional[SurfaceFeatureAssignment] = None, + includedPairs: RegionPairs | None = None, + excludedPairs: RegionPairs | None = None, + contactPropertyAssignments: ContactPropertyAssignment | None = None, + surfaceThicknessAssignments: SurfaceThicknessAssignment | None = None, + surfaceOffsetAssignments: SurfaceOffsetAssignment | None = None, + surfaceFeatureAssignments: SurfaceFeatureAssignment | None = None, surfaceBeamSmoothingAssignments: SurfaceBeamSmoothingAssignment = SurfaceBeamSmoothingAssignment(), surfaceVertexCriteriaAssignments: SurfaceVertexCriteriaAssignment = SurfaceVertexCriteriaAssignment(), - slidingFormulationAssignments: Optional[Sequence[SlidingFormulationAssignment]] = None, - mainSecondaryAssignments: Optional[MainSecondaryAssignment] = None, - initializationAssignments: Optional[InitializationAssignment] = None, - stabilizationAssignments: Optional[StabilizationAssignment] = None, - smoothingAssignments: Optional[SmoothingAssignment] = None, - slidingTransitionAssignments: Optional[SlidingTransitionAssignment] = None, + slidingFormulationAssignments: Sequence[SlidingFormulationAssignment] | None = None, + mainSecondaryAssignments: MainSecondaryAssignment | None = None, + initializationAssignments: InitializationAssignment | None = None, + stabilizationAssignments: StabilizationAssignment | None = None, + smoothingAssignments: SmoothingAssignment | None = None, + slidingTransitionAssignments: SlidingTransitionAssignment | None = None, ) -> ContactStd: """This method creates a ContactStd object. @@ -1464,9 +1466,9 @@ def IncidentWave( amplitude: str = "", imaginaryAmplitude: str = "", surfaceNormal: tuple = (), - initialDepth: Optional[float] = None, - referenceMagnitude: Optional[float] = None, - detonationTime: Optional[float] = None, + initialDepth: float | None = None, + referenceMagnitude: float | None = None, + detonationTime: float | None = None, magnitudeFactor: float = 1, ) -> IncidentWave: """This method creates an IncidentWave object. @@ -1556,7 +1558,7 @@ def ModelChange( createStepName: str, isRestart: Boolean = OFF, regionType: Literal[C.SKINS, C.GEOMETRY, C.ELEMENTS, C.STRINGERS] = GEOMETRY, - region: Optional[Region] = None, + region: Region | None = None, activeInStep: Boolean = OFF, includeStrain: Boolean = OFF, ) -> ModelChange: @@ -1934,13 +1936,13 @@ def SurfaceToSurfaceContactExp( weightingFactor: float = 0, contactControls: str = "", initialClearance: Union[Literal[C.OMIT, C.COMPUTED], float] = OMIT, - halfThreadAngle: Optional[str] = None, - pitch: Optional[str] = None, + halfThreadAngle: str | None = None, + pitch: str | None = None, majorBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, meanBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, - datumAxis: Optional[DatumAxis] = None, + datumAxis: DatumAxis | None = None, useReverseDatumAxis: Boolean = OFF, - clearanceRegion: Optional[Region] = None, + clearanceRegion: Region | None = None, ) -> SurfaceToSurfaceContactExp: """This method creates a SurfaceToSurfaceContactExp object. @@ -2055,23 +2057,23 @@ def SurfaceToSurfaceContactStd( extensionZone: float = 0, adjustMethod: Literal[C.SET, C.TOLERANCE, C.OVERCLOSED, C.NONE] = NONE, adjustTolerance: float = 0, - adjustSet: Optional[Region] = None, + adjustSet: Region | None = None, enforcement: Literal[C.NODE_TO_SURFACE, C.SURFACE_TO_SURFACE] = SURFACE_TO_SURFACE, thickness: Boolean = ON, contactControls: str = "", tied: Boolean = OFF, initialClearance: Union[Literal[C.OMIT, C.COMPUTED], float] = OMIT, - halfThreadAngle: Optional[str] = None, - pitch: Optional[str] = None, + halfThreadAngle: str | None = None, + pitch: str | None = None, majorBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, meanBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, - datumAxis: Optional[DatumAxis] = None, + datumAxis: DatumAxis | None = None, useReverseDatumAxis: Boolean = OFF, - clearanceRegion: Optional[Region] = None, + clearanceRegion: Region | None = None, surfaceSmoothing: Literal[C.AUTOMATIC, C.NONE] = NONE, - bondingSet: Optional[Region] = None, + bondingSet: Region | None = None, handedness: Literal[C.RIGHT, C.LEFT] = RIGHT, - normalAdjustment: Optional[Literal[C.AXIAL, C.LOCATION, C.COMPONENT, C.UNIFORM, C.DEPENDENT]] = None, + normalAdjustment: Literal[C.AXIAL, C.LOCATION, C.COMPONENT, C.UNIFORM, C.DEPENDENT] | None = None, ) -> SurfaceToSurfaceContactStd: """This method creates a SurfaceToSurfaceContactStd object. diff --git a/src/abaqus/Interaction/InteractionPropertyModel.py b/src/abaqus/Interaction/InteractionPropertyModel.py index ce039cf31c..5373c622f8 100644 --- a/src/abaqus/Interaction/InteractionPropertyModel.py +++ b/src/abaqus/Interaction/InteractionPropertyModel.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -211,8 +211,8 @@ def FluidCavityProperty( self, name: str, definition: Literal[C.PNEUMATIC, C.HYDRAULIC] = HYDRAULIC, - fluidDensity: Optional[float] = None, - molecularWeight: Optional[float] = None, + fluidDensity: float | None = None, + molecularWeight: float | None = None, useExpansion: Boolean = OFF, expansionTempDep: Boolean = OFF, expansionDependencies: int = 0, @@ -473,9 +473,9 @@ def FluidInflatorProperty( definition: str, effectiveArea: float, tankVolume: float, - dischargeCoefficient: Optional[float] = None, + dischargeCoefficient: float | None = None, dataTable: tuple = (), - numFluids: Optional[int] = None, + numFluids: int | None = None, mixtureType: str = "", inflationTime: tuple = (), fluidbehaviorName: tuple = (), @@ -550,31 +550,31 @@ def IncidentWaveProperty( name: str, definition: Literal[C.PLANAR, C.SPHERICAL, C.DIFFUSE, C.SURFACE_BLAST, C.AIR_BLAST] = PLANAR, propagationModel: Literal[C.ACOUSTIC, C.SPHERICAL, C.GENERALIZED_DECAY, C.UNDEX_CHARGE] = ACOUSTIC, - soundSpeed: Optional[float] = None, - fluidDensity: Optional[float] = None, - specificHeatRatio: Optional[float] = None, - gravity: Optional[float] = None, - atmosphericPressure: Optional[float] = None, - dragCoefficient: Optional[float] = None, + soundSpeed: float | None = None, + fluidDensity: float | None = None, + specificHeatRatio: float | None = None, + gravity: float | None = None, + atmosphericPressure: float | None = None, + dragCoefficient: float | None = None, dragExponent: float = 2, waveEffects: Boolean = ON, - chargeDensity: Optional[float] = None, - chargeMass: Optional[float] = None, - constantK1: Optional[float] = None, - constantK2: Optional[float] = None, - constantA: Optional[float] = None, - constantB: Optional[float] = None, - constantKc: Optional[float] = None, - duration: Optional[float] = None, + chargeDensity: float | None = None, + chargeMass: float | None = None, + constantK1: float | None = None, + constantK2: float | None = None, + constantA: float | None = None, + constantB: float | None = None, + constantKc: float | None = None, + duration: float | None = None, maximumSteps: int = 1500, - relativeStepControl: Optional[float] = None, - absoluteStepControl: Optional[float] = None, + relativeStepControl: float | None = None, + absoluteStepControl: float | None = None, stepControlExponent: float = 0, genDecayA: float = 0, genDecayB: float = 0, genDecayC: float = 0, - seedNumber: Optional[int] = None, - massTNT: Optional[float] = None, + seedNumber: int | None = None, + massTNT: float | None = None, massFactor: float = 1, lengthFactor: float = 1, timeFactor: float = 1, diff --git a/src/abaqus/Interaction/InteractionState.py b/src/abaqus/Interaction/InteractionState.py index a61bfef466..411e887492 100644 --- a/src/abaqus/Interaction/InteractionState.py +++ b/src/abaqus/Interaction/InteractionState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -30,4 +30,4 @@ class InteractionState: #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/ModelChange.py b/src/abaqus/Interaction/ModelChange.py index 94a48bf1b2..83f7e8b77f 100644 --- a/src/abaqus/Interaction/ModelChange.py +++ b/src/abaqus/Interaction/ModelChange.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -44,7 +44,7 @@ class ModelChange(Interaction): #: A Region object specifying the elements to be removed or reactivated. This argument is #: valid only when **isRestart** = False. - region: Optional[Region] = None + region: Region | None = None #: A Boolean specifying whether elements are being removed or reactivated. This argument is #: valid only when **isRestart** = False. The default value is OFF. @@ -62,7 +62,7 @@ def __init__( createStepName: str, isRestart: Boolean = OFF, regionType: Literal[C.SKINS, C.GEOMETRY, C.ELEMENTS, C.STRINGERS] = GEOMETRY, - region: Optional[Region] = None, + region: Region | None = None, activeInStep: Boolean = OFF, includeStrain: Boolean = OFF, ): @@ -110,7 +110,7 @@ def setValues( self, isRestart: Boolean = OFF, regionType: Literal[C.SKINS, C.GEOMETRY, C.ELEMENTS, C.STRINGERS] = GEOMETRY, - region: Optional[Region] = None, + region: Region | None = None, activeInStep: Boolean = OFF, includeStrain: Boolean = OFF, ): diff --git a/src/abaqus/Interaction/NormalBehavior.py b/src/abaqus/Interaction/NormalBehavior.py index 12756607a3..e1ffed9acd 100644 --- a/src/abaqus/Interaction/NormalBehavior.py +++ b/src/abaqus/Interaction/NormalBehavior.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -58,7 +60,7 @@ class NormalBehavior: #: None or a Float specifying the maximum stiffness. If **maxStiffness** = None, there is no #: upper limit. The default value is None. - maxStiffness: Optional[float] = None + maxStiffness: float | None = None #: A sequence of sequences of Floats specifying the normal behavior properties. This #: argument is valid only for **pressureOverclosure** = EXPONENTIAL or TABULAR. The items in @@ -119,7 +121,7 @@ def __init__( contactStiffness: Union[Literal[C.AUGMENTED_LAGRANGE, C.PENALTY, C.DEFAULT, C.HARD, C.LINEAR], float] = DEFAULT, pressureOverclosure: Literal[C.EXPONENTIAL, C.TABULAR, C.HARD, C.LINEAR, C.SCALE_FACTOR] = HARD, allowSeparation: Boolean = ON, - maxStiffness: Optional[float] = None, + maxStiffness: float | None = None, table: tuple = (), constraintEnforcementMethod: Literal[C.AUGMENTED_LAGRANGE, C.DEFAULT, C.DIRECT, C.PENALTY] = DEFAULT, overclosureFactor: float = 0, diff --git a/src/abaqus/Interaction/PressurePenetration.py b/src/abaqus/Interaction/PressurePenetration.py index f27dfd3183..2beef1679d 100644 --- a/src/abaqus/Interaction/PressurePenetration.py +++ b/src/abaqus/Interaction/PressurePenetration.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -132,8 +132,8 @@ def setValues(self, amplitude: str = UNSET, penetrationTime: float = 0): def setValuesInStep( self, stepName: str, - penetrationPressure: Optional[float] = None, - criticalPressure: Optional[float] = None, + penetrationPressure: float | None = None, + criticalPressure: float | None = None, amplitude: str = "", penetrationTime: float = 0, ): diff --git a/src/abaqus/Interaction/PressurePenetrationState.py b/src/abaqus/Interaction/PressurePenetrationState.py index 9d4a62e20d..b64d8ca8b4 100644 --- a/src/abaqus/Interaction/PressurePenetrationState.py +++ b/src/abaqus/Interaction/PressurePenetrationState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -28,27 +28,27 @@ class PressurePenetrationState(InteractionState): #: A Float specifying the fraction of the current step time over which the fluid pressure #: on newly penetrated contact surface segments is ramped up to the current magnitude. The #: default value is 10⁻³. - penetrationTime: Optional[float] = None + penetrationTime: float | None = None #: A SymbolicConstant specifying the propagation state of the **penetrationTime** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - penetrationTimeState: Optional[SymbolicConstant] = None + penetrationTimeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **criticalPressure** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - criticalPressureState: Optional[SymbolicConstant] = None + criticalPressureState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **penetrationPressure** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - penetrationPressureState: Optional[SymbolicConstant] = None + penetrationPressureState: SymbolicConstant #: A tuple of Floats specifying the fluid pressure magnitude. For steady state dynamic #: analyses, a tuple of Complexes specifying the fluid pressure magnitude. - penetrationPressure: Optional[float] = None + penetrationPressure: float | None = None #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. @@ -56,7 +56,7 @@ class PressurePenetrationState(InteractionState): #: A tuple of Floats specifying the critical contact pressure below which fluid penetration #: starts to occur. - criticalPressure: Optional[float] = None + criticalPressure: float | None = None #: A SymbolicConstant specifying the propagation state of the InteractionState object. #: Possible values are: @@ -70,4 +70,4 @@ class PressurePenetrationState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/RadiationToAmbientState.py b/src/abaqus/Interaction/RadiationToAmbientState.py index dd5503560e..2aea2013aa 100644 --- a/src/abaqus/Interaction/RadiationToAmbientState.py +++ b/src/abaqus/Interaction/RadiationToAmbientState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,22 +25,22 @@ class RadiationToAmbientState(InteractionState): """ #: A Float specifying the ambient temperature. - ambientTemperature: Optional[float] = None + ambientTemperature: float | None = None #: A SymbolicConstant specifying the propagation state of the **ambientTemperature** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - ambientTemperatureState: Optional[SymbolicConstant] = None + ambientTemperatureState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **ambientTemperatureAmp** #: member. Possible values are UNSET, SET, UNCHANGED, and FREED. - ambientTemperatureAmpState: Optional[SymbolicConstant] = None + ambientTemperatureAmpState: SymbolicConstant #: A Float specifying the emissivity. - emissivity: Optional[float] = None + emissivity: float | None = None #: A SymbolicConstant specifying the propagation state of the **emissivity** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - emissivityState: Optional[SymbolicConstant] = None + emissivityState: SymbolicConstant #: A String specifying the name of the Amplitude object that gives the variation of the #: ambient temperature with time. @@ -58,4 +58,4 @@ class RadiationToAmbientState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/RegionPairs.py b/src/abaqus/Interaction/RegionPairs.py index bdd4c736e3..ad7b240066 100644 --- a/src/abaqus/Interaction/RegionPairs.py +++ b/src/abaqus/Interaction/RegionPairs.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -31,8 +31,8 @@ def setValuesInStep( self, stepName: str, useAllstar: Boolean = OFF, - addPairs: Optional[Literal[C.SELF, C.GLOBAL]] = None, - removePairs: Optional[Literal[C.SELF, C.GLOBAL]] = None, + addPairs: Literal[C.SELF, C.GLOBAL] | None = None, + removePairs: Literal[C.SELF, C.GLOBAL] | None = None, ): """This method allows addition and removal of domain pairs in a given step. diff --git a/src/abaqus/Interaction/SelfContactExpState.py b/src/abaqus/Interaction/SelfContactExpState.py index 1d641770c4..69d26ca380 100644 --- a/src/abaqus/Interaction/SelfContactExpState.py +++ b/src/abaqus/Interaction/SelfContactExpState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -28,11 +28,11 @@ class SelfContactExpState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **interactionProperty** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - interactionPropertyState: Optional[SymbolicConstant] = None + interactionPropertyState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **contactControls** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - contactControlsState: Optional[SymbolicConstant] = None + contactControlsState: SymbolicConstant #: A String specifying the name of the ContactProperty object associated with this #: interaction. @@ -54,4 +54,4 @@ class SelfContactExpState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/SelfContactStdState.py b/src/abaqus/Interaction/SelfContactStdState.py index 3850334d0d..729f07fd6c 100644 --- a/src/abaqus/Interaction/SelfContactStdState.py +++ b/src/abaqus/Interaction/SelfContactStdState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -28,11 +28,11 @@ class SelfContactStdState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **interactionProperty** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - interactionPropertyState: Optional[SymbolicConstant] = None + interactionPropertyState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **contactControls** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - contactControlsState: Optional[SymbolicConstant] = None + contactControlsState: SymbolicConstant #: A String specifying the ContactProperty object associated with this interaction. interactionProperty: str = "" @@ -53,4 +53,4 @@ class SelfContactStdState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/StdContactControl.py b/src/abaqus/Interaction/StdContactControl.py index 5319fe1408..c08d6669c5 100644 --- a/src/abaqus/Interaction/StdContactControl.py +++ b/src/abaqus/Interaction/StdContactControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -55,7 +55,7 @@ class StdContactControl(ContactControl): #: by this argument. The default value is 10⁻³.The **relativePenetrationTolerance** argument #: applies only when **penetrationTolChoice** = RELATIVE. The **relativePenetrationTolerance** #: and **absolutePenetrationTolerance** arguments are mutually exclusive. - relativePenetrationTolerance: Optional[float] = None + relativePenetrationTolerance: float | None = None #: None or a Float specifying the allowable penetration. Only contact interactions defined #: with augmented Lagrangian surface behavior will be affected by this argument. The @@ -63,7 +63,7 @@ class StdContactControl(ContactControl): #: **penetrationTolChoice** = ABSOLUTE. The **relativePenetrationTolerance** and #: **absolutePenetrationTolerance** arguments are mutually exclusive. The default value is #: None. - absolutePenetrationTolerance: Optional[float] = None + absolutePenetrationTolerance: float | None = None #: A SymbolicConstant specifying when the application of friction occurs. Possible values #: are: @@ -72,7 +72,7 @@ class StdContactControl(ContactControl): #: - DELAYED, specifying the application of friction is delayed until the increment after #: #: contact occurs. - frictionOnset: Optional[SymbolicConstant] = None + frictionOnset: SymbolicConstant #: A Boolean specifying whether Abaqus/Standard should automatically compute an overclosure #: tolerance and a separation tolerance to prevent chattering in contact. The default value @@ -131,7 +131,7 @@ class StdContactControl(ContactControl): #: None or a Float specifying the clearance at which damping becomes zero. This argument is #: valid only when **zeroDampingChoice** = SPECIFY. This argument is valid only if #: **stabilizeChoice** = AUTOMATIC or COEFFICIENT. The default value is None. - zeroDamping: Optional[float] = None + zeroDamping: float | None = None #: A SymbolicConstant specifying whether to enforce the contact constraints with Lagrange #: multipliers. Possible values are DEFAULT, ENFORCEMENT_OFF, and ENFORCEMENT_ON. The @@ -144,9 +144,9 @@ def __init__( name: str, stiffnessScaleFactor: float = 1, penetrationTolChoice: Literal[C.RELATIVE, C.ABSOLUTE] = RELATIVE, - relativePenetrationTolerance: Optional[float] = None, - absolutePenetrationTolerance: Optional[float] = None, - frictionOnset: Optional[Literal[C.IMMEDIATE, C.DELAYED]] = None, + relativePenetrationTolerance: float | None = None, + absolutePenetrationTolerance: float | None = None, + frictionOnset: Literal[C.IMMEDIATE, C.DELAYED] | None = None, automaticTolerances: Boolean = OFF, maxchp: int = 0, perrmx: float = 0, @@ -157,7 +157,7 @@ def __init__( tangFraction: float = 1, eosFraction: float = 0, zeroDampingChoice: Literal[C.COMPUTE, C.AUTOMATIC, C.SPECIFY, C.COEFFICIENT] = COMPUTE, - zeroDamping: Optional[float] = None, + zeroDamping: float | None = None, enforceWithLagrangeMultipliers: Literal[C.ENFORCEMENT_OFF, C.DEFAULT, C.ENFORCEMENT_ON] = DEFAULT, ): """This method creates an StdContactControl object. @@ -271,9 +271,9 @@ def setValues( self, stiffnessScaleFactor: float = 1, penetrationTolChoice: Literal[C.RELATIVE, C.ABSOLUTE] = RELATIVE, - relativePenetrationTolerance: Optional[float] = None, - absolutePenetrationTolerance: Optional[float] = None, - frictionOnset: Optional[Literal[C.IMMEDIATE, C.DELAYED]] = None, + relativePenetrationTolerance: float | None = None, + absolutePenetrationTolerance: float | None = None, + frictionOnset: Literal[C.IMMEDIATE, C.DELAYED] | None = None, automaticTolerances: Boolean = OFF, maxchp: int = 0, perrmx: float = 0, @@ -284,7 +284,7 @@ def setValues( tangFraction: float = 1, eosFraction: float = 0, zeroDampingChoice: Literal[C.COMPUTE, C.AUTOMATIC, C.SPECIFY, C.COEFFICIENT] = COMPUTE, - zeroDamping: Optional[float] = None, + zeroDamping: float | None = None, enforceWithLagrangeMultipliers: Literal[C.ENFORCEMENT_OFF, C.DEFAULT, C.ENFORCEMENT_ON] = DEFAULT, ): """This method modifies the StdContactControl object. diff --git a/src/abaqus/Interaction/StdInitialization.py b/src/abaqus/Interaction/StdInitialization.py index 95a84daa56..c1f07cc3ff 100644 --- a/src/abaqus/Interaction/StdInitialization.py +++ b/src/abaqus/Interaction/StdInitialization.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -35,32 +35,32 @@ class StdInitialization(ContactInitialization): #: None or a Float specifying the interference distance. This argument is valid only when #: **overclosureType** = INTERFERENCE. The default value is None. - interferenceDistance: Optional[float] = None + interferenceDistance: float | None = None #: None or a Float specifying the initial clearance distance. This argument is valid only #: when **overclosureType** = CLEARANCE, and must be specified in that case. The default value #: is None. - clearanceDistance: Optional[float] = None + clearanceDistance: float | None = None #: None or a Float specifying the distance tolerance within which initial openings will #: undergo strain-free adjustments. This argument is not valid when #: **overclosureType** = INTERFERENCE unless a value has been specified for #: **interferenceDistance**. The default value is None. - openingTolerance: Optional[float] = None + openingTolerance: float | None = None #: None or a Float specifying the distance tolerance within which initial overclosures will #: undergo strain-free adjustments.. The default value is None. - overclosureTolerance: Optional[float] = None + overclosureTolerance: float | None = None @abaqus_method_doc def __init__( self, name: str, overclosureType: Literal[C.INTERFERENCE, C.ADJUST, C.CLEARANCE] = ADJUST, - interferenceDistance: Optional[float] = None, - clearanceDistance: Optional[float] = None, - openingTolerance: Optional[float] = None, - overclosureTolerance: Optional[float] = None, + interferenceDistance: float | None = None, + clearanceDistance: float | None = None, + openingTolerance: float | None = None, + overclosureTolerance: float | None = None, ): """This method creates a StdInitialization object. @@ -107,10 +107,10 @@ def __init__( def setValues( self, overclosureType: Literal[C.INTERFERENCE, C.ADJUST, C.CLEARANCE] = ADJUST, - interferenceDistance: Optional[float] = None, - clearanceDistance: Optional[float] = None, - openingTolerance: Optional[float] = None, - overclosureTolerance: Optional[float] = None, + interferenceDistance: float | None = None, + clearanceDistance: float | None = None, + openingTolerance: float | None = None, + overclosureTolerance: float | None = None, ): """This method modifies the StdInitialization object. diff --git a/src/abaqus/Interaction/StdStabilization.py b/src/abaqus/Interaction/StdStabilization.py index a963cfebb8..f7e89ba5aa 100644 --- a/src/abaqus/Interaction/StdStabilization.py +++ b/src/abaqus/Interaction/StdStabilization.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -27,7 +27,7 @@ class StdStabilization(ContactStabilization): #: None or a Float specifying the clearance distance at which the stabilization becomes #: zero. The default value is None. - zeroDistance: Optional[float] = None + zeroDistance: float | None = None #: A Float specifying the factor by which the analysis will reduce the contact #: stabilization coefficient per increment. The default value is 0.1. @@ -54,7 +54,7 @@ class StdStabilization(ContactStabilization): def __init__( self, name: str, - zeroDistance: Optional[float] = None, + zeroDistance: float | None = None, reductionFactor: float = 0, scaleFactor: float = 1, tangentialFactor: float = 0, @@ -106,7 +106,7 @@ def __init__( @abaqus_method_doc def setValues( self, - zeroDistance: Optional[float] = None, + zeroDistance: float | None = None, reductionFactor: float = 0, scaleFactor: float = 1, tangentialFactor: float = 0, diff --git a/src/abaqus/Interaction/StdXplCosimulationState.py b/src/abaqus/Interaction/StdXplCosimulationState.py index a4e95843a9..03f5e51eb9 100644 --- a/src/abaqus/Interaction/StdXplCosimulationState.py +++ b/src/abaqus/Interaction/StdXplCosimulationState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -38,4 +38,4 @@ class StdXplCosimulationState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/SurfaceCrushTriggerAssignment.py b/src/abaqus/Interaction/SurfaceCrushTriggerAssignment.py index 7231ddf10f..294fd4905f 100644 --- a/src/abaqus/Interaction/SurfaceCrushTriggerAssignment.py +++ b/src/abaqus/Interaction/SurfaceCrushTriggerAssignment.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Interaction/SurfaceFeatureAssignment.py b/src/abaqus/Interaction/SurfaceFeatureAssignment.py index dd7e5171c3..0fa1a4b78c 100644 --- a/src/abaqus/Interaction/SurfaceFeatureAssignment.py +++ b/src/abaqus/Interaction/SurfaceFeatureAssignment.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Interaction/SurfaceFrictionAssignment.py b/src/abaqus/Interaction/SurfaceFrictionAssignment.py index 343dee1e71..5842b23420 100644 --- a/src/abaqus/Interaction/SurfaceFrictionAssignment.py +++ b/src/abaqus/Interaction/SurfaceFrictionAssignment.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Interaction/SurfaceOffsetAssignment.py b/src/abaqus/Interaction/SurfaceOffsetAssignment.py index 6a0c8a4c36..9e4ac04578 100644 --- a/src/abaqus/Interaction/SurfaceOffsetAssignment.py +++ b/src/abaqus/Interaction/SurfaceOffsetAssignment.py @@ -1,4 +1,6 @@ -from typing import Sequence, Tuple, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -51,7 +53,7 @@ def changeValuesInStep(self, stepName: str, index: int, value: Union[Literal[C.S def appendInStep( self, stepName: str, - assignments: Sequence[Tuple[Union[Region, Material, Literal[C.SPOS, C.ORIGINAL, C.SNEG, C.GLOBAL]], float]], + assignments: Sequence[tuple[Union[Region, Material, Literal[C.SPOS, C.ORIGINAL, C.SNEG, C.GLOBAL]], float]], ): """This method allows addition of surface offset fraction assignments to new surfaces in a given step. diff --git a/src/abaqus/Interaction/SurfaceThicknessAssignment.py b/src/abaqus/Interaction/SurfaceThicknessAssignment.py index 08114930aa..3afbf121d2 100644 --- a/src/abaqus/Interaction/SurfaceThicknessAssignment.py +++ b/src/abaqus/Interaction/SurfaceThicknessAssignment.py @@ -1,4 +1,6 @@ -from typing import Tuple, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -56,8 +58,8 @@ def changeValuesInStep(self, stepName: str, index: int, value: Union[Literal[C.T def appendInStep( self, stepName: str, - assignments: Tuple[ - Tuple[ + assignments: tuple[ + tuple[ Union[Region, Material, Literal[C.THINNING, C.ORIGINAL, C.GLOBAL]], Union[SymbolicConstant, float], float, diff --git a/src/abaqus/Interaction/SurfaceToSurfaceContactExp.py b/src/abaqus/Interaction/SurfaceToSurfaceContactExp.py index 5ca2c534e5..f5afdf2003 100644 --- a/src/abaqus/Interaction/SurfaceToSurfaceContactExp.py +++ b/src/abaqus/Interaction/SurfaceToSurfaceContactExp.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -81,11 +83,11 @@ class SurfaceToSurfaceContactExp(Interaction): #: None or a sequence of Floats specifying the half thread angle used for bolt clearance. #: The default value is None. - halfThreadAngle: Optional[str] = None + halfThreadAngle: str | None = None #: None or a sequence of Floats specifying the pitch used for bolt clearance. The default #: value is None. - pitch: Optional[str] = None + pitch: str | None = None #: The SymbolicConstant COMPUTED or a Float specifying the major diameter of the bolt used #: for bolt clearance. The default value is COMPUTED. @@ -97,14 +99,14 @@ class SurfaceToSurfaceContactExp(Interaction): #: A DatumAxis object specifying the orientation of the bolt hole when specifying bolt #: clearance. - datumAxis: Optional[DatumAxis] = None + datumAxis: DatumAxis | None = None #: A Boolean specifying whether to reverse the bolt clearance direction given by the datum #: axis. The default value is OFF. useReverseDatumAxis: Boolean = OFF #: A Region object specifying the contact region for which clearance is specified. - clearanceRegion: Optional[Region] = None + clearanceRegion: Region | None = None @abaqus_method_doc def __init__( @@ -120,13 +122,13 @@ def __init__( weightingFactor: float = 0, contactControls: str = "", initialClearance: Union[Literal[C.OMIT, C.COMPUTED], float] = OMIT, - halfThreadAngle: Optional[str] = None, - pitch: Optional[str] = None, + halfThreadAngle: str | None = None, + pitch: str | None = None, majorBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, meanBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, - datumAxis: Optional[DatumAxis] = None, + datumAxis: DatumAxis | None = None, useReverseDatumAxis: Boolean = OFF, - clearanceRegion: Optional[Region] = None, + clearanceRegion: Region | None = None, ): """This method creates a SurfaceToSurfaceContactExp object. @@ -220,13 +222,13 @@ def setValues( weightingFactor: float = 0, contactControls: str = "", initialClearance: Union[Literal[C.OMIT, C.COMPUTED], float] = OMIT, - halfThreadAngle: Optional[str] = None, - pitch: Optional[str] = None, + halfThreadAngle: str | None = None, + pitch: str | None = None, majorBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, meanBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, - datumAxis: Optional[DatumAxis] = None, + datumAxis: DatumAxis | None = None, useReverseDatumAxis: Boolean = OFF, - clearanceRegion: Optional[Region] = None, + clearanceRegion: Region | None = None, ): """This method modifies the data for an existing SurfaceToSurfaceContactExp object in the step where it is created. diff --git a/src/abaqus/Interaction/SurfaceToSurfaceContactStd.py b/src/abaqus/Interaction/SurfaceToSurfaceContactStd.py index 464c959533..9d95184512 100644 --- a/src/abaqus/Interaction/SurfaceToSurfaceContactStd.py +++ b/src/abaqus/Interaction/SurfaceToSurfaceContactStd.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -125,7 +127,7 @@ class SurfaceToSurfaceContactStd(Interaction): adjustTolerance: float = 0 #: A Region object specifying the Set object to which the adjustment is to be applied. - adjustSet: Optional[Region] = None + adjustSet: Region | None = None #: A SymbolicConstant specifying the discretization method. Possible values are #: NODE_TO_SURFACE and SURFACE_TO_SURFACE. The default value is SURFACE_TO_SURFACE. @@ -151,11 +153,11 @@ class SurfaceToSurfaceContactStd(Interaction): #: None or a sequence of Floats specifying the half thread angle used for bolt clearance. #: The default value is None. - halfThreadAngle: Optional[str] = None + halfThreadAngle: str | None = None #: None or a sequence of Floats specifying the pitch used for bolt clearance. The default #: value is None. - pitch: Optional[str] = None + pitch: str | None = None #: The SymbolicConstant COMPUTED or a Float specifying the major diameter of the bolt used #: for bolt clearance. The default value is COMPUTED. @@ -167,14 +169,14 @@ class SurfaceToSurfaceContactStd(Interaction): #: A DatumAxis object specifying the orientation of the bolt hole when specifying bolt #: clearance. - datumAxis: Optional[DatumAxis] = None + datumAxis: DatumAxis | None = None #: A Boolean specifying whether to reverse the bolt clearance direction given by the datum #: axis. The default value is OFF. useReverseDatumAxis: Boolean = OFF #: A Region object specifying the contact region for which clearance is specified. - clearanceRegion: Optional[Region] = None + clearanceRegion: Region | None = None #: A SymbolicConstant specifying whether to use surface smoothing for geometric surfaces in #: SurfaceToSurfaceContactStd interactions. Possible values are AUTOMATIC and NONE. The @@ -183,7 +185,7 @@ class SurfaceToSurfaceContactStd(Interaction): #: A Region object specifying the secondary node sub-set for bonding, used only when the #: contact property CohesiveBehavior option specifies use. - bondingSet: Optional[Region] = None + bondingSet: Region | None = None #: A SymbolicConstant specifying the bolt handedness formulation. Possible values are RIGHT #: and LEFT. The default value is RIGHT. @@ -219,23 +221,23 @@ def __init__( extensionZone: float = 0, adjustMethod: Literal[C.SET, C.TOLERANCE, C.OVERCLOSED, C.NONE] = NONE, adjustTolerance: float = 0, - adjustSet: Optional[Region] = None, + adjustSet: Region | None = None, enforcement: Literal[C.NODE_TO_SURFACE, C.SURFACE_TO_SURFACE] = SURFACE_TO_SURFACE, thickness: Boolean = ON, contactControls: str = "", tied: Boolean = OFF, initialClearance: Union[Literal[C.OMIT, C.COMPUTED], float] = OMIT, - halfThreadAngle: Optional[str] = None, - pitch: Optional[str] = None, + halfThreadAngle: str | None = None, + pitch: str | None = None, majorBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, meanBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, - datumAxis: Optional[DatumAxis] = None, + datumAxis: DatumAxis | None = None, useReverseDatumAxis: Boolean = OFF, - clearanceRegion: Optional[Region] = None, + clearanceRegion: Region | None = None, surfaceSmoothing: Literal[C.AUTOMATIC, C.NONE] = NONE, - bondingSet: Optional[Region] = None, + bondingSet: Region | None = None, handedness: Literal[C.RIGHT, C.LEFT] = RIGHT, - normalAdjustment: Optional[Literal[C.AXIAL, C.LOCATION, C.COMPONENT, C.UNIFORM, C.DEPENDENT]] = None, + normalAdjustment: Literal[C.AXIAL, C.LOCATION, C.COMPONENT, C.UNIFORM, C.DEPENDENT] | None = None, ): """This method creates a SurfaceToSurfaceContactStd object. @@ -396,23 +398,23 @@ def setValues( extensionZone: float = 0, adjustMethod: Literal[C.SET, C.TOLERANCE, C.OVERCLOSED, C.NONE] = NONE, adjustTolerance: float = 0, - adjustSet: Optional[Region] = None, + adjustSet: Region | None = None, enforcement: Literal[C.NODE_TO_SURFACE, C.SURFACE_TO_SURFACE] = SURFACE_TO_SURFACE, thickness: Boolean = ON, contactControls: str = "", tied: Boolean = OFF, initialClearance: Union[Literal[C.OMIT, C.COMPUTED], float] = OMIT, - halfThreadAngle: Optional[str] = None, - pitch: Optional[str] = None, + halfThreadAngle: str | None = None, + pitch: str | None = None, majorBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, meanBoltDiameter: Union[Literal[C.COMPUTED], float] = COMPUTED, - datumAxis: Optional[DatumAxis] = None, + datumAxis: DatumAxis | None = None, useReverseDatumAxis: Boolean = OFF, - clearanceRegion: Optional[Region] = None, + clearanceRegion: Region | None = None, surfaceSmoothing: Literal[C.AUTOMATIC, C.NONE] = NONE, - bondingSet: Optional[Region] = None, + bondingSet: Region | None = None, handedness: Literal[C.RIGHT, C.LEFT] = RIGHT, - normalAdjustment: Optional[Literal[C.AXIAL, C.LOCATION, C.COMPONENT, C.UNIFORM, C.DEPENDENT]] = None, + normalAdjustment: Literal[C.AXIAL, C.LOCATION, C.COMPONENT, C.UNIFORM, C.DEPENDENT] | None = None, ): """This method modifies the data for an existing SurfaceToSurfaceContactStd object in the step where it is created. diff --git a/src/abaqus/Interaction/SurfaceToSurfaceExpState.py b/src/abaqus/Interaction/SurfaceToSurfaceExpState.py index 5b0e3cd4c5..800e6ebae8 100644 --- a/src/abaqus/Interaction/SurfaceToSurfaceExpState.py +++ b/src/abaqus/Interaction/SurfaceToSurfaceExpState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -28,11 +28,11 @@ class SurfaceToSurfaceExpState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **interactionProperty** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - interactionPropertyState: Optional[SymbolicConstant] = None + interactionPropertyState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **contactControls** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - contactControlsState: Optional[SymbolicConstant] = None + contactControlsState: SymbolicConstant #: A String specifying the name of the ContactProperty object associated with this #: interaction. @@ -54,4 +54,4 @@ class SurfaceToSurfaceExpState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/SurfaceToSurfaceStdState.py b/src/abaqus/Interaction/SurfaceToSurfaceStdState.py index a848ac05bb..859fc682e4 100644 --- a/src/abaqus/Interaction/SurfaceToSurfaceStdState.py +++ b/src/abaqus/Interaction/SurfaceToSurfaceStdState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -29,42 +29,42 @@ class SurfaceToSurfaceStdState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **interactionProperty** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - interactionPropertyState: Optional[SymbolicConstant] = None + interactionPropertyState: SymbolicConstant #: A SymbolicConstant specifying the interference type. Possible values are NONE, #: SHRINK_FIT, and UNIFORM. - interferenceType: Optional[SymbolicConstant] = None + interferenceType: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **interferenceType** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - interferenceTypeState: Optional[SymbolicConstant] = None + interferenceTypeState: SymbolicConstant #: A Float specifying the allowable overclosure. - overclosure: Optional[float] = None + overclosure: float | None = None #: A SymbolicConstant specifying the propagation state of the **overclosure** member. #: Possible values are COMPUTED and DIRECTION_COSINE. - overclosureState: Optional[SymbolicConstant] = None + overclosureState: SymbolicConstant #: A SymbolicConstant specifying the interference direction type. Possible values are #: COMPUTED and DIRECTION_COSINE. - interferenceDirectionType: Optional[SymbolicConstant] = None + interferenceDirectionType: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **interferenceDirectionType** #: member. Possible values are UNSET, SET, UNCHANGED, and FREED. - interferenceDirectionTypeState: Optional[SymbolicConstant] = None + interferenceDirectionTypeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **direction** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - directionState: Optional[SymbolicConstant] = None + directionState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **contactControls** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - contactControlsState: Optional[SymbolicConstant] = None + contactControlsState: SymbolicConstant #: A String specifying the name of the ContactProperty object associated with this #: interaction. @@ -82,7 +82,7 @@ class SurfaceToSurfaceStdState(InteractionState): #: - X-direction cosine of the interference direction vector. #: - Y-direction cosine of the interference direction vector. #: - Z-direction cosine of the interference direction vector. - direction: Optional[float] = None + direction: float | None = None #: A SymbolicConstant specifying the propagation state of the InteractionState object. #: Possible values are: @@ -96,4 +96,4 @@ class SurfaceToSurfaceStdState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Interaction/SurfaceVertexCriteriaAssignment.py b/src/abaqus/Interaction/SurfaceVertexCriteriaAssignment.py index 6e3e0dde6f..b59efa50dc 100644 --- a/src/abaqus/Interaction/SurfaceVertexCriteriaAssignment.py +++ b/src/abaqus/Interaction/SurfaceVertexCriteriaAssignment.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Interaction/XFEMCrackGrowthState.py b/src/abaqus/Interaction/XFEMCrackGrowthState.py index 5acc76e386..bd5566e55e 100644 --- a/src/abaqus/Interaction/XFEMCrackGrowthState.py +++ b/src/abaqus/Interaction/XFEMCrackGrowthState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -30,7 +30,7 @@ class XFEMCrackGrowthState(InteractionState): #: A SymbolicConstant specifying the propagation state of the **allowGrowth** member. #: Possible values are UNSET, SET, UNCHANGED, and FREED. - allowGrowthState: Optional[SymbolicConstant] = None + allowGrowthState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the InteractionState object. #: Possible values are: @@ -44,4 +44,4 @@ class XFEMCrackGrowthState(InteractionState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/Job/Coexecution.py b/src/abaqus/Job/Coexecution.py index 1cca1b1f22..47c7d0091d 100644 --- a/src/abaqus/Job/Coexecution.py +++ b/src/abaqus/Job/Coexecution.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -60,7 +60,7 @@ class Coexecution: #: SUBMITTED, RUNNING, ABORTED, TERMINATED, COMPLETED, CHECK_SUBMITTED, CHECK_RUNNING, and #: CHECK_COMPLETED.If the **message** member of all the jobs are empty, **status** is set to #: NONE. - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the queue to which to submit the co-execution. The #: default value is an empty string. Note: You can use the **queue** argument when creating a @@ -77,7 +77,7 @@ class Coexecution: atTime: str = "" #: A repository of Job objects specifying the jobs that comprise this co-execution. - jobs: Dict[str, Job] = {} + jobs: dict[str, Job] = {} #: A tuple of Strings specifying the names of the secondary models for the co-execution. #: @@ -90,7 +90,7 @@ class Coexecution: #: #: .. versionchanged:: 2022 #: The ``slaveAnalysisProducts`` attribute was changed to ``secondaryAnalysisProducts``. - secondaryAnalysisProducts: Optional[SymbolicConstant] = None + secondaryAnalysisProducts: SymbolicConstant #: A String specifying the name of the main model for the co-execution. #: diff --git a/src/abaqus/Job/Job.py b/src/abaqus/Job/Job.py index 3d7e945011..1f794fa9e5 100644 --- a/src/abaqus/Job/Job.py +++ b/src/abaqus/Job/Job.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -109,12 +109,12 @@ class Job: #: A SymbolicConstant specifying whether the job will be analyzed by Abaqus/Standard or #: Abaqus/Explicit. Possible values are STANDARD, EXPLICIT, and UNKNOWN.If the object has #: the type JobFromInputFile, **analysis** = UNKNOWN. - analysis: Optional[SymbolicConstant] = None + analysis: SymbolicConstant #: A SymbolicConstant specifying the status of the analysis. Possible values are SUBMITTED, #: RUNNING, ABORTED, TERMINATED, COMPLETED, CHECK_RUNNING, and CHECK_COMPLETED.If the #: **message** member is empty, **status** is set to NONE. - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the queue to which to submit the job. The default value #: is an empty string. Note: You can use the **queue** argument when creating a Job object on a diff --git a/src/abaqus/Job/JobFromInputFile.py b/src/abaqus/Job/JobFromInputFile.py index b7cc3fd889..f6f0ed2459 100644 --- a/src/abaqus/Job/JobFromInputFile.py +++ b/src/abaqus/Job/JobFromInputFile.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -43,14 +43,12 @@ class JobFromInputFile(Job): #: A SymbolicConstant specifying whether the job will be analyzed by Abaqus/Standard or #: Abaqus/Explicit. Possible values are STANDARD, EXPLICIT, and UNKNOWN.If the object has #: the type JobFromInputFile, **analysis** = UNKNOWN. - analysis: Optional[Literal[C.STANDARD, C.EXPLICIT, C.UNKNOWN]] = None + analysis: Literal[C.STANDARD, C.EXPLICIT, C.UNKNOWN] #: A SymbolicConstant specifying the status of the analysis. Possible values are SUBMITTED, #: RUNNING, ABORTED, TERMINATED, COMPLETED, CHECK_RUNNING, and CHECK_COMPLETED.If the #: **message** member is empty, **status** is set to NONE. - status: Optional[ - Literal[C.SUBMITTED, C.RUNNING, C.ABORTED, C.TERMINATED, C.COMPLETED, C.CHECK_RUNNING, C.CHECK_COMPLETED] - ] = None + status: Literal[C.SUBMITTED, C.RUNNING, C.ABORTED, C.TERMINATED, C.COMPLETED, C.CHECK_RUNNING, C.CHECK_COMPLETED] #: A MessageArray object specifying the messages received during an analysis. messages: MessageArray = [] @@ -159,10 +157,10 @@ def __init__( name: str, inputFileName: str, type: Literal[C.ANALYSIS, C.SYNTAXCHECK, C.RECOVER] = ANALYSIS, - queue: Optional[str] = "", + queue: str | None = "", waitHours: int = 0, waitMinutes: int = 0, - atTime: Optional[str] = "", + atTime: str | None = "", scratch: str = "", userSubroutine: str = "", numCpus: int = 1, diff --git a/src/abaqus/Job/JobMdb.py b/src/abaqus/Job/JobMdb.py index 7a3958ce30..72b2f3b34d 100644 --- a/src/abaqus/Job/JobMdb.py +++ b/src/abaqus/Job/JobMdb.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -40,10 +40,10 @@ def Job( model: str, description: str = "", type: Literal[C.ANALYSIS, C.SYNTAXCHECK, C.RECOVER, C.RESTART] = ANALYSIS, - queue: Optional[str] = "", + queue: str | None = "", waitHours: int = 0, waitMinutes: int = 0, - atTime: Optional[str] = "", + atTime: str | None = "", echoPrint: Boolean = OFF, contactPrint: Boolean = OFF, modelPrint: Boolean = OFF, @@ -209,10 +209,10 @@ def JobFromInputFile( name: str, inputFileName: str, type: Literal[C.ANALYSIS, C.SYNTAXCHECK, C.RECOVER] = ANALYSIS, - queue: Optional[str] = "", + queue: str | None = "", waitHours: int = 0, waitMinutes: int = 0, - atTime: Optional[str] = "", + atTime: str | None = "", scratch: str = "", userSubroutine: str = "", numCpus: int = 1, @@ -360,7 +360,7 @@ def OptimizationProcess( saveInitial: Boolean = True, saveFirst: Boolean = True, saveLast: Boolean = True, - saveEvery: Optional[int] = None, + saveEvery: int | None = None, ) -> OptimizationProcess: """This method creates an OptimizationProcess object. diff --git a/src/abaqus/Job/Message.py b/src/abaqus/Job/Message.py index dd56c8817b..b77047fd05 100644 --- a/src/abaqus/Job/Message.py +++ b/src/abaqus/Job/Message.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -43,9 +43,9 @@ class Message: #: - STATUS #: - STEP #: - WARNING - type: Optional[SymbolicConstant] = None + type: SymbolicConstant #: A Dictionary object specifying the data returned by the analysis product. The value #: depends on the message returned. For a list of the possible entries, see the members of #: DataObject. - data: Optional[dict] = None + data: dict | None = None diff --git a/src/abaqus/Job/MessageArray.py b/src/abaqus/Job/MessageArray.py index 0d9e9a041d..a8a45fd9c3 100644 --- a/src/abaqus/Job/MessageArray.py +++ b/src/abaqus/Job/MessageArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .Message import Message diff --git a/src/abaqus/Job/ModelJob.py b/src/abaqus/Job/ModelJob.py index 91f3f17943..fd5ebd5600 100644 --- a/src/abaqus/Job/ModelJob.py +++ b/src/abaqus/Job/ModelJob.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -126,26 +126,24 @@ class ModelJob(Job): #: A SymbolicConstant specifying whether the job will be analyzed by Abaqus/Standard or #: Abaqus/Explicit. Possible values are STANDARD, EXPLICIT, and UNKNOWN.If the object has #: the type JobFromInputFile, **analysis** = UNKNOWN. - analysis: Optional[Literal[C.STANDARD, C.EXPLICIT, C.UNKNOWN]] = None + analysis: Literal[C.STANDARD, C.EXPLICIT, C.UNKNOWN] #: A SymbolicConstant specifying the status of the analysis. Possible values are SUBMITTED, #: RUNNING, ABORTED, TERMINATED, COMPLETED, CHECK_RUNNING, and CHECK_COMPLETED.If the #: **message** member is empty, **status** is set to NONE. - status: Optional[ - Literal[C.SUBMITTED, C.RUNNING, C.ABORTED, C.TERMINATED, C.COMPLETED, C.CHECK_RUNNING, C.CHECK_COMPLETED] - ] = None + status: Literal[C.SUBMITTED, C.RUNNING, C.ABORTED, C.TERMINATED, C.COMPLETED, C.CHECK_RUNNING, C.CHECK_COMPLETED] #: A String specifying the name of the queue to which to submit the job. The default value #: is an empty string. Note: You can use the **queue** argument when creating a Job object on a #: Windows workstation; however, remote queues are available only on Linux platforms. - queue: Optional[str] = "" + queue: str = "" #: A String specifying the time at which to submit the job. If **queue** is empty, the string #: syntax must be valid for the Linux ``at`` command. If **queue** is set, the syntax must be #: valid according to the system administrator. The default value is an empty #: string. Note: You can use the **atTime** argument when creating a Job object on a Windows #: workstation; however, the ``at`` command is available only on Linux platforms. - atTime: Optional[str] = "" + atTime: str = "" #: A String specifying the location of the scratch directory. The default value is an empty #: string. @@ -168,10 +166,10 @@ def __init__( model: str, description: str = "", type: Literal[C.ANALYSIS, C.SYNTAXCHECK, C.RECOVER, C.RESTART] = ANALYSIS, - queue: Optional[str] = "", + queue: str | None = "", waitHours: int = 0, waitMinutes: int = 0, - atTime: Optional[str] = "", + atTime: str | None = "", echoPrint: Boolean = OFF, contactPrint: Boolean = OFF, modelPrint: Boolean = OFF, diff --git a/src/abaqus/Job/OptimizationProcess.py b/src/abaqus/Job/OptimizationProcess.py index 6bc4dc6892..dc5f3b61d2 100644 --- a/src/abaqus/Job/OptimizationProcess.py +++ b/src/abaqus/Job/OptimizationProcess.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -67,7 +67,7 @@ class OptimizationProcess: #: OPT_DATASAVE_SPECIFY_CYCLE. Abaqus saves file iterations for every nth iteration after #: iteration 1; if you set **saveEvery** = 3, Abaqus saves file iterations for cycles 1, 4, 7, #: and so on. The default value is None. - saveEvery: Optional[int] = None + saveEvery: int | None = None @abaqus_method_doc def __init__( @@ -82,7 +82,7 @@ def __init__( saveInitial: Boolean = True, saveFirst: Boolean = True, saveLast: Boolean = True, - saveEvery: Optional[int] = None, + saveEvery: int | None = None, ): """This method creates an OptimizationProcess object. @@ -172,11 +172,11 @@ def extract( self, outputFileName: str, designCycle: str, - isoValue: str = 0, - smoothCycles: str = 5, - reductionPercent: str = 0, + isoValue: float = 0, + smoothCycles: int = 5, + reductionPercent: float = 0, reductionAngle: str = "", - targetVolume: str = 0, + targetVolume: float = 0, extractFormat: tuple = OPT_EXTRACT_SMOOTH_ABAQUS_INPUT_FILE, resultFiltering: str = OFF, instances: str = "", @@ -230,7 +230,7 @@ def setValues( saveInitial: Boolean = True, saveFirst: Boolean = True, saveLast: Boolean = True, - saveEvery: Optional[int] = None, + saveEvery: int | None = None, ): """This method modifies the OptimizationProcess object. diff --git a/src/abaqus/Job/Queue.py b/src/abaqus/Job/Queue.py index e0c25a4d99..31f43e0608 100644 --- a/src/abaqus/Job/Queue.py +++ b/src/abaqus/Job/Queue.py @@ -1,6 +1,13 @@ from abqpy.decorators import abaqus_class_doc, abaqus_method_doc -from ..UtilityAndView.abaqusConstants import ALL, OFF, ON, Boolean, SymbolicConstant +from ..UtilityAndView.abaqusConstants import ( + ALL, + LINUX, + OFF, + ON, + Boolean, + SymbolicConstant, +) @abaqus_class_doc @@ -37,7 +44,7 @@ class Queue: #: A SymbolicConstant specifying the type of operating system on the remote machine. The #: default value is Linux. - remotePlatform: SymbolicConstant = "Linux" + remotePlatform: SymbolicConstant = LINUX #: A list of Strings specifying the files to be copied from the remote location to the #: local machine, or ALL. Strings specified in a list are the extensions of the job files @@ -61,7 +68,7 @@ def __init__( fileCopy: Boolean = ON, directory: str = "", driver: str = "", - remotePlatform: SymbolicConstant = "Linux", + remotePlatform: SymbolicConstant = LINUX, filesToCopy: str = ALL, deleteAfterCopy: Boolean = OFF, description: str = "", diff --git a/src/abaqus/Load/BodyCharge.py b/src/abaqus/Load/BodyCharge.py index 7b51484b7b..6eca1e7ae8 100644 --- a/src/abaqus/Load/BodyCharge.py +++ b/src/abaqus/Load/BodyCharge.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing BodyCharge object in the specified step. Parameters diff --git a/src/abaqus/Load/BodyChargeState.py b/src/abaqus/Load/BodyChargeState.py index b75277085c..215ef41849 100644 --- a/src/abaqus/Load/BodyChargeState.py +++ b/src/abaqus/Load/BodyChargeState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class BodyChargeState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class BodyChargeState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/BodyConcentrationFlux.py b/src/abaqus/Load/BodyConcentrationFlux.py index eb4596262a..e61e57ee02 100644 --- a/src/abaqus/Load/BodyConcentrationFlux.py +++ b/src/abaqus/Load/BodyConcentrationFlux.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -112,7 +112,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing BodyConcentrationFlux object in the specified step. diff --git a/src/abaqus/Load/BodyConcentrationFluxState.py b/src/abaqus/Load/BodyConcentrationFluxState.py index 3786cd311e..684c0a514a 100644 --- a/src/abaqus/Load/BodyConcentrationFluxState.py +++ b/src/abaqus/Load/BodyConcentrationFluxState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class BodyConcentrationFluxState(LoadState): """ #: A Float specifying the body concentration flux magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the body concentration flux #: magnitude. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -48,7 +48,7 @@ class BodyConcentrationFluxState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/BodyCurrent.py b/src/abaqus/Load/BodyCurrent.py index b4f3454dc2..aef5d0a355 100644 --- a/src/abaqus/Load/BodyCurrent.py +++ b/src/abaqus/Load/BodyCurrent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing BodyCurrent object in the specified step. Parameters diff --git a/src/abaqus/Load/BodyCurrentState.py b/src/abaqus/Load/BodyCurrentState.py index 26cdc81db9..842887fa1b 100644 --- a/src/abaqus/Load/BodyCurrentState.py +++ b/src/abaqus/Load/BodyCurrentState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class BodyCurrentState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class BodyCurrentState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/BodyForce.py b/src/abaqus/Load/BodyForce.py index 6947157bff..7318d61c82 100644 --- a/src/abaqus/Load/BodyForce.py +++ b/src/abaqus/Load/BodyForce.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -48,9 +50,9 @@ def __init__( region: Region, field: str = "", distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, ): """This method creates a BodyForce object. @@ -100,9 +102,9 @@ def setValues( self, field: str = "", distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, ): """This method modifies the data for an existing BodyForce object in the step where it is created. diff --git a/src/abaqus/Load/BodyForceState.py b/src/abaqus/Load/BodyForceState.py index 2702f87ba3..668ce70b06 100644 --- a/src/abaqus/Load/BodyForceState.py +++ b/src/abaqus/Load/BodyForceState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,29 +25,29 @@ class BodyForceState(LoadState): """ #: A Float or a Complex specifying the body force component in the 1-direction. - comp1: Optional[float] = None + comp1: float | None = None #: A Float or a Complex specifying the body force component in the 2-direction. - comp2: Optional[float] = None + comp2: float | None = None #: A Float or a Complex specifying the body force component in the 3-direction. - comp3: Optional[float] = None + comp3: float | None = None #: A SymbolicConstant specifying the propagation state of the body force component in the #: 1-direction. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - comp1State: Optional[SymbolicConstant] = None + comp1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the body force component in the #: 2-direction. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - comp2State: Optional[SymbolicConstant] = None + comp2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the body force component in the #: 3-direction. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - comp3State: Optional[SymbolicConstant] = None + comp3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -61,7 +61,7 @@ class BodyForceState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/BodyHeatFlux.py b/src/abaqus/Load/BodyHeatFlux.py index c672dd6dfa..984dd15b09 100644 --- a/src/abaqus/Load/BodyHeatFlux.py +++ b/src/abaqus/Load/BodyHeatFlux.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing BodyHeatFlux object in the specified step. Parameters diff --git a/src/abaqus/Load/BodyHeatFluxState.py b/src/abaqus/Load/BodyHeatFluxState.py index 9ac02c13c7..341d62442d 100644 --- a/src/abaqus/Load/BodyHeatFluxState.py +++ b/src/abaqus/Load/BodyHeatFluxState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class BodyHeatFluxState(LoadState): """ #: A Float specifying the Body heat flux magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the Body heat flux magnitude. #: Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class BodyHeatFluxState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/BoltLoad.py b/src/abaqus/Load/BoltLoad.py index 29ca39bcd0..a64f7cff0b 100644 --- a/src/abaqus/Load/BoltLoad.py +++ b/src/abaqus/Load/BoltLoad.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -104,7 +104,7 @@ def __init__( def setValues( self, boltMethod: Literal[C.APPLY_FORCE, C.ADJUST_LENGTH] = APPLY_FORCE, - datumAxis: Optional[DatumAxis] = None, + datumAxis: DatumAxis | None = None, amplitude: str = UNSET, preTenSecPartLevel: Boolean = False, ): @@ -136,7 +136,7 @@ def setValuesInStep( self, stepName: str, boltMethod: Literal[C.FIX_LENGTH, C.APPLY_FORCE, C.ADJUST_LENGTH] = APPLY_FORCE, - magnitude: Optional[float] = None, + magnitude: float | None = None, amplitude: str = "", ): """This method modifies the propagating data for an existing BoltLoad object in the specified step. diff --git a/src/abaqus/Load/BoltLoadState.py b/src/abaqus/Load/BoltLoadState.py index 2a9d98b9b8..92822c1b38 100644 --- a/src/abaqus/Load/BoltLoadState.py +++ b/src/abaqus/Load/BoltLoadState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,22 +27,22 @@ class BoltLoadState(LoadState): #: A SymbolicConstant specifying the type of bolt load. Possible values are APPLY_FORCE, #: ADJUST_LENGTH, and FIX_LENGTH. - boltMethod: Optional[SymbolicConstant] = None + boltMethod: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the bolt load type. Possible #: values are UNSET, SET, UNCHANGED, and MODIFIED. - boltMethodState: Optional[SymbolicConstant] = None + boltMethodState: SymbolicConstant #: A Float specifying the bolt load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the bolt load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -56,7 +56,7 @@ class BoltLoadState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/ConcCharge.py b/src/abaqus/Load/ConcCharge.py index 223a81aaf1..bdf93ee4e6 100644 --- a/src/abaqus/Load/ConcCharge.py +++ b/src/abaqus/Load/ConcCharge.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing ConcCharge object in the specified step. Parameters diff --git a/src/abaqus/Load/ConcConcFlux.py b/src/abaqus/Load/ConcConcFlux.py index 19f85ce336..c1314c0817 100644 --- a/src/abaqus/Load/ConcConcFlux.py +++ b/src/abaqus/Load/ConcConcFlux.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing ConcConcFlux object in the specified step. Parameters diff --git a/src/abaqus/Load/ConcCurrent.py b/src/abaqus/Load/ConcCurrent.py index c72537298e..20d96afbf9 100644 --- a/src/abaqus/Load/ConcCurrent.py +++ b/src/abaqus/Load/ConcCurrent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing ConcCurrent object in the specified step. Parameters diff --git a/src/abaqus/Load/ConcCurrentState.py b/src/abaqus/Load/ConcCurrentState.py index 6c87e61286..7c45a61197 100644 --- a/src/abaqus/Load/ConcCurrentState.py +++ b/src/abaqus/Load/ConcCurrentState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class ConcCurrentState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class ConcCurrentState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/ConcPoreFluid.py b/src/abaqus/Load/ConcPoreFluid.py index 9ebc10f736..292b67105b 100644 --- a/src/abaqus/Load/ConcPoreFluid.py +++ b/src/abaqus/Load/ConcPoreFluid.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing ConcPoreFluid object in the specified step. Parameters diff --git a/src/abaqus/Load/ConcentratedChargeState.py b/src/abaqus/Load/ConcentratedChargeState.py index f78ffe8b4f..2f0ad3f6a4 100644 --- a/src/abaqus/Load/ConcentratedChargeState.py +++ b/src/abaqus/Load/ConcentratedChargeState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class ConcentratedChargeState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class ConcentratedChargeState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/ConcentratedConcentrationFluxState.py b/src/abaqus/Load/ConcentratedConcentrationFluxState.py index 23b879428d..c6cb7640ba 100644 --- a/src/abaqus/Load/ConcentratedConcentrationFluxState.py +++ b/src/abaqus/Load/ConcentratedConcentrationFluxState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class ConcentratedConcentrationFluxState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -48,7 +48,7 @@ class ConcentratedConcentrationFluxState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/ConcentratedForce.py b/src/abaqus/Load/ConcentratedForce.py index 2380f88cbd..e145a3f28f 100644 --- a/src/abaqus/Load/ConcentratedForce.py +++ b/src/abaqus/Load/ConcentratedForce.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -44,7 +46,7 @@ class ConcentratedForce(Load): #: of freedom. If **localCsys** = None, the degrees of freedom are defined in the global #: coordinate system. When this member is queried, it returns an Int. The default value is #: None. - localCsys: Optional[int] = None + localCsys: int | None = None #: A String specifying the name of the AnalyticalField object associated with this load. #: The **field** argument applies only when **distributionType** = FIELD. The default value is an @@ -62,12 +64,12 @@ def __init__( region: Region, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - cf1: Optional[float] = None, - cf2: Optional[float] = None, - cf3: Optional[float] = None, + cf1: float | None = None, + cf2: float | None = None, + cf3: float | None = None, amplitude: str = UNSET, follower: Boolean = OFF, - localCsys: Optional[int] = None, + localCsys: int | None = None, ): """This method creates a ConcentratedForce object. @@ -125,12 +127,12 @@ def setValues( self, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - cf1: Optional[float] = None, - cf2: Optional[float] = None, - cf3: Optional[float] = None, + cf1: float | None = None, + cf2: float | None = None, + cf3: float | None = None, amplitude: str = UNSET, follower: Boolean = OFF, - localCsys: Optional[int] = None, + localCsys: int | None = None, ): """This method modifies the data for an existing ConcentratedForce object in the step where it is created. diff --git a/src/abaqus/Load/ConcentratedForceState.py b/src/abaqus/Load/ConcentratedForceState.py index 553dffe0c9..9537a1b6cd 100644 --- a/src/abaqus/Load/ConcentratedForceState.py +++ b/src/abaqus/Load/ConcentratedForceState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,33 +27,33 @@ class ConcentratedForceState(LoadState): #: A Float or a Complex specifying the concentrated force component in the 1-direction. #: Although **cf1**, **cf2**, and **cf3** are optional arguments, at least one of them must be #: nonzero. - cf1: Optional[float] = None + cf1: float | None = None #: A Float or a Complex specifying the concentrated force component in the 2-direction. - cf2: Optional[float] = None + cf2: float | None = None #: A Float or a Complex specifying the concentrated force component in the 3-direction. - cf3: Optional[float] = None + cf3: float | None = None #: A SymbolicConstant specifying the propagation state of the concentrated force component #: in the 1-direction. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - cf1State: Optional[SymbolicConstant] = None + cf1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the concentrated force component #: in the 2-direction. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - cf2State: Optional[SymbolicConstant] = None + cf2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the concentrated force component #: in the 3-direction. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - cf3State: Optional[SymbolicConstant] = None + cf3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/ConcentratedHeatFlux.py b/src/abaqus/Load/ConcentratedHeatFlux.py index 41ab595a8e..7ccd9c5128 100644 --- a/src/abaqus/Load/ConcentratedHeatFlux.py +++ b/src/abaqus/Load/ConcentratedHeatFlux.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -124,7 +124,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing ConcentratedHeatFlux object in the specified step. diff --git a/src/abaqus/Load/ConcentratedHeatFluxState.py b/src/abaqus/Load/ConcentratedHeatFluxState.py index c6bc29c9bf..81a65317e2 100644 --- a/src/abaqus/Load/ConcentratedHeatFluxState.py +++ b/src/abaqus/Load/ConcentratedHeatFluxState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class ConcentratedHeatFluxState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -48,7 +48,7 @@ class ConcentratedHeatFluxState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/ConcentratedPoreFluidState.py b/src/abaqus/Load/ConcentratedPoreFluidState.py index 80175fec1e..a079485edd 100644 --- a/src/abaqus/Load/ConcentratedPoreFluidState.py +++ b/src/abaqus/Load/ConcentratedPoreFluidState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class ConcentratedPoreFluidState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class ConcentratedPoreFluidState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/ConnectorForce.py b/src/abaqus/Load/ConnectorForce.py index ed797b1352..1673c074ef 100644 --- a/src/abaqus/Load/ConnectorForce.py +++ b/src/abaqus/Load/ConnectorForce.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -47,9 +49,9 @@ def __init__( region: str = "", fastenerName: str = "", fastenerSetName: str = "", - f1: Optional[float] = None, - f2: Optional[float] = None, - f3: Optional[float] = None, + f1: float | None = None, + f2: float | None = None, + f3: float | None = None, amplitude: str = UNSET, ): """This method creates a ConnectorForce object on a wire region. Alternatively, the load may also be @@ -106,9 +108,9 @@ def setValues( region: str = "", fastenerName: str = "", fastenerSetName: str = "", - f1: Optional[float] = None, - f2: Optional[float] = None, - f3: Optional[float] = None, + f1: float | None = None, + f2: float | None = None, + f3: float | None = None, amplitude: str = UNSET, ): """This method modifies the data for an existing ConnectorForce object in the step where it is created. diff --git a/src/abaqus/Load/ConnectorForceState.py b/src/abaqus/Load/ConnectorForceState.py index 4dd25d8c13..eea5ed49f5 100644 --- a/src/abaqus/Load/ConnectorForceState.py +++ b/src/abaqus/Load/ConnectorForceState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,34 +26,34 @@ class ConnectorForceState(LoadState): #: A Float or a Complex specifying the connector force component in the connector's local #: 1-direction. - f1: Optional[float] = None + f1: float | None = None #: A Float or a Complex specifying the connector force component in the connector's local #: 2-direction. - f2: Optional[float] = None + f2: float | None = None #: A Float or a Complex specifying the connector force component in the connector's local #: 3-direction. - f3: Optional[float] = None + f3: float | None = None #: A SymbolicConstant specifying the propagation state of the connector force component in #: the connector's local 1-direction. Possible values are UNSET, SET, UNCHANGED, and #: MODIFIED. - f1State: Optional[SymbolicConstant] = None + f1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the connector force component in #: the connector's local 2-direction. Possible values are UNSET, SET, UNCHANGED, and #: MODIFIED. - f2State: Optional[SymbolicConstant] = None + f2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the connector force component in #: the connector's local 3-direction. Possible values are UNSET, SET, UNCHANGED, and #: MODIFIED. - f3State: Optional[SymbolicConstant] = None + f3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -67,7 +67,7 @@ class ConnectorForceState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/ConnectorMoment.py b/src/abaqus/Load/ConnectorMoment.py index 2a0c5a17d7..698392e539 100644 --- a/src/abaqus/Load/ConnectorMoment.py +++ b/src/abaqus/Load/ConnectorMoment.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -47,9 +49,9 @@ def __init__( region: str = "", fastenerName: str = "", fastenerSetName: str = "", - m1: Optional[float] = None, - m2: Optional[float] = None, - m3: Optional[float] = None, + m1: float | None = None, + m2: float | None = None, + m3: float | None = None, amplitude: str = UNSET, ): """This method creates a ConnectorMoment object on a wire region. Alternatively, the load may also be @@ -105,9 +107,9 @@ def setValues( region: str = "", fastenerName: str = "", fastenerSetName: str = "", - m1: Optional[float] = None, - m2: Optional[float] = None, - m3: Optional[float] = None, + m1: float | None = None, + m2: float | None = None, + m3: float | None = None, amplitude: str = UNSET, ): """This method modifies the data for an existing ConnectorMoment object in the step where it is created. diff --git a/src/abaqus/Load/ConnectorMomentState.py b/src/abaqus/Load/ConnectorMomentState.py index 7c847577da..4169000666 100644 --- a/src/abaqus/Load/ConnectorMomentState.py +++ b/src/abaqus/Load/ConnectorMomentState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,31 +27,31 @@ class ConnectorMomentState(LoadState): #: A Float or a Complex specifying the connector moment component in the connector's local #: 4-direction. Although **m1**, **m2**, and **m3** are optional arguments, at least one of them #: must be nonzero. - m1: Optional[float] = None + m1: float | None = None #: A Float or a Complex specifying the connector moment component in the connector's local #: 5direction. - m2: Optional[float] = None + m2: float | None = None #: A Float or a Complex specifying the connector moment component in the connector's local #: 6-direction. - m3: Optional[float] = None + m3: float | None = None #: A SymbolicConstant specifying the propagation state of the load component in the #: connector's local 4-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - m1State: Optional[SymbolicConstant] = None + m1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component in the #: connector's local 5-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - m2State: Optional[SymbolicConstant] = None + m2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component in the #: connector's local 6-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - m3State: Optional[SymbolicConstant] = None + m3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -65,7 +65,7 @@ class ConnectorMomentState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/CoriolisForce.py b/src/abaqus/Load/CoriolisForce.py index 2e252ea790..2147441217 100644 --- a/src/abaqus/Load/CoriolisForce.py +++ b/src/abaqus/Load/CoriolisForce.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -30,10 +30,10 @@ class CoriolisForce(Load): distributionType: SymbolicConstant = UNIFORM #: A tuple of Floats specifying the first point on the axis of rotation for the load. - point1: Optional[float] = None + point1: float | None = None #: A tuple of Floats specifying the second point on the axis of rotation for the load. - point2: Optional[float] = None + point2: float | None = None #: A String specifying the name of the AnalyticalField object associated with this load. #: The **field** argument applies only when **distributionType** = FIELD. The default value is an @@ -123,7 +123,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing CoriolisForce object in the specified step. Parameters diff --git a/src/abaqus/Load/CoriolisForceState.py b/src/abaqus/Load/CoriolisForceState.py index aaad9faf95..97afc0a02f 100644 --- a/src/abaqus/Load/CoriolisForceState.py +++ b/src/abaqus/Load/CoriolisForceState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class CoriolisForceState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class CoriolisForceState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/Gravity.py b/src/abaqus/Load/Gravity.py index f00f4aa12b..d0d24ff292 100644 --- a/src/abaqus/Load/Gravity.py +++ b/src/abaqus/Load/Gravity.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,10 +45,10 @@ def __init__( createStepName: str, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - region: Optional[Region] = None, - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + region: Region | None = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, ): """This method creates a Gravity object. @@ -96,10 +98,10 @@ def setValues( self, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - region: Optional[Region] = None, - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + region: Region | None = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, ): """This method modifies the data for an existing Gravity object in the step where it is created. diff --git a/src/abaqus/Load/GravityState.py b/src/abaqus/Load/GravityState.py index 9a2b08e381..ae27480b83 100644 --- a/src/abaqus/Load/GravityState.py +++ b/src/abaqus/Load/GravityState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,29 +25,29 @@ class GravityState(LoadState): """ #: A Float or a Complex specifying the load component in the 1-direction. - comp1: Optional[float] = None + comp1: float | None = None #: A Float or a Complex specifying the load component in the 2-direction. - comp2: Optional[float] = None + comp2: float | None = None #: A Float or a Complex specifying the load component in the 3-direction. - comp3: Optional[float] = None + comp3: float | None = None #: A SymbolicConstant specifying the propagation state of the load component in the #: 1-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - comp1State: Optional[SymbolicConstant] = None + comp1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component in the #: 2-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - comp2State: Optional[SymbolicConstant] = None + comp2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component in the #: 3-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - comp3State: Optional[SymbolicConstant] = None + comp3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -61,7 +61,7 @@ class GravityState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/HydrostaticFluidFlowState.py b/src/abaqus/Load/HydrostaticFluidFlowState.py index 3b4f3a46e7..e8e9a0f366 100644 --- a/src/abaqus/Load/HydrostaticFluidFlowState.py +++ b/src/abaqus/Load/HydrostaticFluidFlowState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class HydrostaticFluidFlowState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -48,7 +48,7 @@ class HydrostaticFluidFlowState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/InertiaRelief.py b/src/abaqus/Load/InertiaRelief.py index c7385c6f5f..86d1bf3cea 100644 --- a/src/abaqus/Load/InertiaRelief.py +++ b/src/abaqus/Load/InertiaRelief.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -26,7 +26,7 @@ class InertiaRelief(Load): #: degrees of freedom for the inertia relief load. If **localCoordinates** = None, the free #: directions are defined in the global coordinate system. When this member is queried, it #: returns an Int. The default value is None. - localCoordinates: Optional[int] = None + localCoordinates: int | None = None #: A Region object specifying the region to which the load is applied. region: Region = Region() @@ -43,7 +43,7 @@ def __init__( ur2: Boolean = OFF, ur3: Boolean = OFF, referencePoint: tuple = (), - localCoordinates: Optional[int] = None, + localCoordinates: int | None = None, ): """This method creates an InertiaRelief object. @@ -101,7 +101,7 @@ def setValues( ur2: Boolean = OFF, ur3: Boolean = OFF, referencePoint: tuple = (), - localCoordinates: Optional[int] = None, + localCoordinates: int | None = None, ): """This method modifies the data for an existing InertiaRelief object in the step where it is created. diff --git a/src/abaqus/Load/InertiaReliefState.py b/src/abaqus/Load/InertiaReliefState.py index e2f5aef08c..a1f4888f8a 100644 --- a/src/abaqus/Load/InertiaReliefState.py +++ b/src/abaqus/Load/InertiaReliefState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -45,32 +45,32 @@ class InertiaReliefState(LoadState): #: A SymbolicConstant specifying the propagation state of the Boolean that identifies the #: local 1-direction as a free direction. Possible values are UNSET, SET, UNCHANGED, and #: MODIFIED. - u1State: Optional[SymbolicConstant] = None + u1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the Boolean that identifies the #: local 2-direction as a free direction. Possible values are UNSET, SET, UNCHANGED, and #: MODIFIED. - u2State: Optional[SymbolicConstant] = None + u2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the Boolean that identifies the #: local the 3-direction as a free direction. Possible values are UNSET, SET, UNCHANGED, #: and MODIFIED. - u3State: Optional[SymbolicConstant] = None + u3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the Boolean that identifies #: rotation about the local 1-direction as a free direction. Possible values are UNSET, #: SET, UNCHANGED, and MODIFIED. - ur1State: Optional[SymbolicConstant] = None + ur1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the Boolean that identifies the #: rotation about the local the 2-direction as a free direction. Possible values are UNSET, #: SET, UNCHANGED, and MODIFIED. - ur2State: Optional[SymbolicConstant] = None + ur2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the Boolean that identifies the #: rotation about the local the 3-direction as a free direction. Possible values are UNSET, #: SET, UNCHANGED, and MODIFIED. - ur3State: Optional[SymbolicConstant] = None + ur3State: SymbolicConstant #: A Boolean specifying whether the inertia relief loading should remain fixed at the #: current loading at the start of the step. The default value is OFF. @@ -79,11 +79,11 @@ class InertiaReliefState(LoadState): #: A SymbolicConstant specifying the propagation state of the Boolean that identifies #: whether the inertia relief load should remain fixed at current level at the start of the #: step. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - fixedState: Optional[SymbolicConstant] = None + fixedState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the reference point of the #: inertia relief load. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - referencePointState: Optional[SymbolicConstant] = None + referencePointState: SymbolicConstant #: A tuple of Floats specifying the point about which rotations are defined. The point can #: be specified only for certain combinations of free directions. The **referencePoint** @@ -91,11 +91,11 @@ class InertiaReliefState(LoadState): #: - The **X**, **Y** and **Z** coordinates of a fixed rotation point. #: - A point on the rotation axis. #: - A point on the symmetry line. - referencePoint: Optional[float] = None + referencePoint: float | None = None #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -109,7 +109,7 @@ class InertiaReliefState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/InwardVolAccel.py b/src/abaqus/Load/InwardVolAccel.py index 0611ae0022..874dcb09b6 100644 --- a/src/abaqus/Load/InwardVolAccel.py +++ b/src/abaqus/Load/InwardVolAccel.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing InwardVolAccel object in the specified step. diff --git a/src/abaqus/Load/InwardVolAccelState.py b/src/abaqus/Load/InwardVolAccelState.py index 2b3df4598a..a778516fa0 100644 --- a/src/abaqus/Load/InwardVolAccelState.py +++ b/src/abaqus/Load/InwardVolAccelState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class InwardVolAccelState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class InwardVolAccelState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/LineLoad.py b/src/abaqus/Load/LineLoad.py index 8e2e79fcb2..64183dbdcf 100644 --- a/src/abaqus/Load/LineLoad.py +++ b/src/abaqus/Load/LineLoad.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -49,9 +51,9 @@ def __init__( region: Region, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, system: Literal[C.LOCAL, C.GLOBAL] = GLOBAL, ): @@ -106,9 +108,9 @@ def setValues( self, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, system: Literal[C.LOCAL, C.GLOBAL] = GLOBAL, ): diff --git a/src/abaqus/Load/LineLoadState.py b/src/abaqus/Load/LineLoadState.py index 2fe9dc8779..53b7e14510 100644 --- a/src/abaqus/Load/LineLoadState.py +++ b/src/abaqus/Load/LineLoadState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,30 +26,30 @@ class LineLoadState(LoadState): #: A Float or a Complex specifying the load component in the global or the beam local #: 1-direction. - comp1: Optional[float] = None + comp1: float | None = None #: A Float or a Complex specifying the load component in the global or the beam local #: 2-direction. - comp2: Optional[float] = None + comp2: float | None = None #: A Float or a Complex specifying the load component in the global 3-direction. - comp3: Optional[float] = None + comp3: float | None = None #: A SymbolicConstant specifying the propagation state of the load component in the global #: or the beam local 1-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - comp1State: Optional[SymbolicConstant] = None + comp1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component in the global #: or the beam local 2-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - comp2State: Optional[SymbolicConstant] = None + comp2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component in the global #: 3-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - comp3State: Optional[SymbolicConstant] = None + comp3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -63,7 +63,7 @@ class LineLoadState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/LoadModel.py b/src/abaqus/Load/LoadModel.py index d5503a3235..d39ef940e8 100644 --- a/src/abaqus/Load/LoadModel.py +++ b/src/abaqus/Load/LoadModel.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -289,9 +289,9 @@ def BodyForce( region: Region, field: str = "", distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, ) -> BodyForce: """This method creates a BodyForce object. @@ -623,12 +623,12 @@ def ConcentratedForce( region: Region, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - cf1: Optional[float] = None, - cf2: Optional[float] = None, - cf3: Optional[float] = None, + cf1: float | None = None, + cf2: float | None = None, + cf3: float | None = None, amplitude: str = UNSET, follower: Boolean = OFF, - localCsys: Optional[int] = None, + localCsys: int | None = None, ) -> ConcentratedForce: """This method creates a ConcentratedForce object. @@ -815,9 +815,9 @@ def ConnectorForce( region: str = "", fastenerName: str = "", fastenerSetName: str = "", - f1: Optional[float] = None, - f2: Optional[float] = None, - f3: Optional[float] = None, + f1: float | None = None, + f2: float | None = None, + f3: float | None = None, amplitude: str = UNSET, ) -> ConnectorForce: """This method creates a ConnectorForce object on a wire region. Alternatively, the load may also be @@ -887,9 +887,9 @@ def ConnectorMoment( region: str = "", fastenerName: str = "", fastenerSetName: str = "", - m1: Optional[float] = None, - m2: Optional[float] = None, - m3: Optional[float] = None, + m1: float | None = None, + m2: float | None = None, + m3: float | None = None, amplitude: str = UNSET, ) -> ConnectorMoment: """This method creates a ConnectorMoment object on a wire region. Alternatively, the load may also be @@ -1022,10 +1022,10 @@ def Gravity( createStepName: str, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - region: Optional[Region] = None, - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + region: Region | None = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, ) -> Gravity: """This method creates a Gravity object. @@ -1093,7 +1093,7 @@ def InertiaRelief( ur2: Boolean = OFF, ur3: Boolean = OFF, referencePoint: tuple = (), - localCoordinates: Optional[int] = None, + localCoordinates: int | None = None, ) -> InertiaRelief: """This method creates an InertiaRelief object. @@ -1212,9 +1212,9 @@ def LineLoad( region: Region, distributionType: Literal[C.USER_DEFINED, C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, system: Literal[C.LOCAL, C.GLOBAL] = GLOBAL, ) -> LineLoad: @@ -1282,12 +1282,12 @@ def Moment( name: str, createStepName: str, region: Region, - cm1: Optional[float] = None, - cm2: Optional[float] = None, - cm3: Optional[float] = None, + cm1: float | None = None, + cm2: float | None = None, + cm3: float | None = None, amplitude: str = UNSET, follower: Boolean = OFF, - localCsys: Optional[int] = None, + localCsys: int | None = None, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", ) -> Moment: @@ -1363,9 +1363,9 @@ def PEGLoad( region: Region, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, ) -> PEGLoad: """This method creates a PEGLoad object. @@ -1765,7 +1765,7 @@ def SubmodelSB( region: Region, globalStep: str, globalDrivingRegion: str = "", - absoluteExteriorTolerance: Optional[float] = None, + absoluteExteriorTolerance: float | None = None, exteriorTolerance: float = 0, globalIncrement: int = 0, ) -> SubmodelSB: @@ -2192,7 +2192,7 @@ def SurfaceTraction( amplitude: str = UNSET, angle: float = 0, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - localCsys: Optional[int] = None, + localCsys: int | None = None, userCsys: str = "", directionVector: tuple = (), follower: Boolean = ON, diff --git a/src/abaqus/Load/LoadState.py b/src/abaqus/Load/LoadState.py index 386f15a1f5..4ec0104408 100644 --- a/src/abaqus/Load/LoadState.py +++ b/src/abaqus/Load/LoadState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -20,7 +20,7 @@ class LoadState: #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -34,7 +34,7 @@ class LoadState: #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/Moment.py b/src/abaqus/Load/Moment.py index eb2c8e50b0..d374e8de9d 100644 --- a/src/abaqus/Load/Moment.py +++ b/src/abaqus/Load/Moment.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -43,7 +45,7 @@ class Moment(Load): #: local coordinate system of the load. If **localCsys** = None, the load is defined in the #: global coordinate system. When this member is queried, it returns an Int. The default #: value is None. - localCsys: Optional[int] = None + localCsys: int | None = None #: A String specifying the name of the AnalyticalField object associated with this load. #: The **field** argument applies only when **distributionType** = FIELD. The default value is an @@ -59,12 +61,12 @@ def __init__( name: str, createStepName: str, region: Region, - cm1: Optional[float] = None, - cm2: Optional[float] = None, - cm3: Optional[float] = None, + cm1: float | None = None, + cm2: float | None = None, + cm3: float | None = None, amplitude: str = UNSET, follower: Boolean = OFF, - localCsys: Optional[int] = None, + localCsys: int | None = None, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", ): @@ -122,12 +124,12 @@ def __init__( @abaqus_method_doc def setValues( self, - cm1: Optional[float] = None, - cm2: Optional[float] = None, - cm3: Optional[float] = None, + cm1: float | None = None, + cm2: float | None = None, + cm3: float | None = None, amplitude: str = UNSET, follower: Boolean = OFF, - localCsys: Optional[int] = None, + localCsys: int | None = None, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", ): diff --git a/src/abaqus/Load/MomentState.py b/src/abaqus/Load/MomentState.py index 4cbeb157e1..a70015eb60 100644 --- a/src/abaqus/Load/MomentState.py +++ b/src/abaqus/Load/MomentState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,29 +25,29 @@ class MomentState(LoadState): """ #: A Float or a Complex specifying the load component in the 4-direction. - cm1: Optional[float] = None + cm1: float | None = None #: A Float or a Complex specifying the load component in the 5-direction. - cm2: Optional[float] = None + cm2: float | None = None #: A Float or a Complex specifying the load component in the 6-direction. - cm3: Optional[float] = None + cm3: float | None = None #: A SymbolicConstant specifying the propagation state of the load component in the #: 4-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - cm1State: Optional[SymbolicConstant] = None + cm1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component in the #: 5-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - cm2State: Optional[SymbolicConstant] = None + cm2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component in the #: 6-direction. Possible values are UNSET, SET, UNCHANGED, and FREED. - cm3State: Optional[SymbolicConstant] = None + cm3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -61,7 +61,7 @@ class MomentState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/PEGLoad.py b/src/abaqus/Load/PEGLoad.py index c3630a9e6f..def805d7fe 100644 --- a/src/abaqus/Load/PEGLoad.py +++ b/src/abaqus/Load/PEGLoad.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -44,9 +46,9 @@ def __init__( region: Region, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, ): """This method creates a PEGLoad object. @@ -96,9 +98,9 @@ def setValues( self, distributionType: Literal[C.FIELD, C.UNIFORM] = UNIFORM, field: str = "", - comp1: Optional[float] = None, - comp2: Optional[float] = None, - comp3: Optional[float] = None, + comp1: float | None = None, + comp2: float | None = None, + comp3: float | None = None, amplitude: str = UNSET, ): """This method modifies the data for an existing PEGLoad object in the step where it is created. diff --git a/src/abaqus/Load/PEGLoadState.py b/src/abaqus/Load/PEGLoadState.py index c8e98907e1..e6f52bcc29 100644 --- a/src/abaqus/Load/PEGLoadState.py +++ b/src/abaqus/Load/PEGLoadState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,29 +25,29 @@ class PEGLoadState(LoadState): """ #: A Float or a Complex specifying the load component at dof 1 of reference node 1. - comp1: Optional[float] = None + comp1: float | None = None #: A Float or a Complex specifying the load component at dof 1 of reference node 2. - comp2: Optional[float] = None + comp2: float | None = None #: A Float or a Complex specifying the load component at dof 2 of reference node 2. - comp3: Optional[float] = None + comp3: float | None = None #: A SymbolicConstant specifying the propagation state of the load component at dof 1 of #: reference node 1. Possible values are UNSET, SET, UNCHANGED, and FREED. - comp1State: Optional[SymbolicConstant] = None + comp1State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component at dof 1 of #: reference node 2. Possible values are UNSET, SET, UNCHANGED, and FREED. - comp2State: Optional[SymbolicConstant] = None + comp2State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the load component at dof 2 of #: reference node 2. Possible values are UNSET, SET, UNCHANGED, and FREED. - comp3State: Optional[SymbolicConstant] = None + comp3State: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -61,7 +61,7 @@ class PEGLoadState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/PipePressure.py b/src/abaqus/Load/PipePressure.py index fdd61afbbd..880b8e8aba 100644 --- a/src/abaqus/Load/PipePressure.py +++ b/src/abaqus/Load/PipePressure.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -34,7 +34,7 @@ class PipePressure(Load): side: SymbolicConstant = INTERNAL #: A Float specifying the effective inner or outer diameter. - diameter: Optional[float] = None + diameter: float | None = None #: A String specifying the name of the AnalyticalField object associated with this load. #: The **field** argument applies only when **distributionType** = FIELD. The default value is an @@ -140,9 +140,9 @@ def setValues( def setValuesInStep( self, stepName: str, - magnitude: Optional[float] = None, - hZero: Optional[float] = None, - hReference: Optional[float] = None, + magnitude: float | None = None, + hZero: float | None = None, + hReference: float | None = None, amplitude: str = "", ): """This method modifies the propagating data for an existing PipePressure object in the specified step. diff --git a/src/abaqus/Load/PipePressureState.py b/src/abaqus/Load/PipePressureState.py index 46c7997fd3..4f2b94e658 100644 --- a/src/abaqus/Load/PipePressureState.py +++ b/src/abaqus/Load/PipePressureState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,31 +26,31 @@ class PipePressureState(LoadState): """ #: A Float or a Complex specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A Float specifying the height of the zero pressure level when the pipe pressure #: **distributionType** = HYDROSTATIC. - hZero: Optional[float] = None + hZero: float | None = None #: A SymbolicConstant specifying the propagation state of **hZero**. Possible values are #: UNSET, SET, UNCHANGED, and FREED. - hZeroState: Optional[SymbolicConstant] = None + hZeroState: SymbolicConstant #: A Float specifying the height of the reference pressure level when the pipe pressure #: **distributionType** = HYDROSTATIC. - hReference: Optional[float] = None + hReference: float | None = None #: A SymbolicConstant specifying the propagation state of **hReference**. Possible values are #: UNSET, SET, UNCHANGED, and FREED. - hReferenceState: Optional[SymbolicConstant] = None + hReferenceState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -64,7 +64,7 @@ class PipePressureState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/Pressure.py b/src/abaqus/Load/Pressure.py index 1cd37f89d9..3058b0b280 100644 --- a/src/abaqus/Load/Pressure.py +++ b/src/abaqus/Load/Pressure.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -136,9 +136,9 @@ def setValues( def setValuesInStep( self, stepName: str, - magnitude: Optional[float] = None, - hZero: Optional[float] = None, - hReference: Optional[float] = None, + magnitude: float | None = None, + hZero: float | None = None, + hReference: float | None = None, amplitude: str = "", ): """This method modifies the propagating data for an existing Pressure object in the specified step. diff --git a/src/abaqus/Load/PressureState.py b/src/abaqus/Load/PressureState.py index f1e1432184..c22b4670fe 100644 --- a/src/abaqus/Load/PressureState.py +++ b/src/abaqus/Load/PressureState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,31 +26,31 @@ class PressureState(LoadState): """ #: A Float or a Complex specifying the pressure magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the pressure magnitude. Possible #: values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A Float specifying the height of the zero pressure level when the pressure #: **distributionType** = HYDROSTATIC. - hZero: Optional[float] = None + hZero: float | None = None #: A SymbolicConstant specifying the propagation state of **hZero**. Possible values are #: UNSET, SET, UNCHANGED, and FREED. - hZeroState: Optional[SymbolicConstant] = None + hZeroState: SymbolicConstant #: A Float specifying the height of the reference pressure level when the pressure #: **distributionType** = HYDROSTATIC. - hReference: Optional[float] = None + hReference: float | None = None #: A SymbolicConstant specifying the propagation state of **hReference**. Possible values are #: UNSET, SET, UNCHANGED, and FREED. - hReferenceState: Optional[SymbolicConstant] = None + hReferenceState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -64,7 +64,7 @@ class PressureState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/RotationalBodyForce.py b/src/abaqus/Load/RotationalBodyForce.py index f7ea7617ee..eed3c4f7b2 100644 --- a/src/abaqus/Load/RotationalBodyForce.py +++ b/src/abaqus/Load/RotationalBodyForce.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -46,10 +46,10 @@ class RotationalBodyForce(Load): rotaryAcceleration: Boolean = OFF #: A tuple of Floats specifying the first point on the axis of rotation for the load. - point1: Optional[float] = None + point1: float | None = None #: A tuple of Floats specifying the second point on the axis of rotation for the load. - point2: Optional[float] = None + point2: float | None = None #: A String specifying the name of the AnalyticalField object associated with this load. #: The **field** argument applies only when **distributionType** = FIELD. The default value is an @@ -160,7 +160,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing RotationalBodyForce object in the specified step. diff --git a/src/abaqus/Load/RotationalBodyForceState.py b/src/abaqus/Load/RotationalBodyForceState.py index f3a5ed05ce..bb88aa7e64 100644 --- a/src/abaqus/Load/RotationalBodyForceState.py +++ b/src/abaqus/Load/RotationalBodyForceState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class RotationalBodyForceState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class RotationalBodyForceState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/ShellEdgeLoad.py b/src/abaqus/Load/ShellEdgeLoad.py index 810be0c5b9..5c26cafe1e 100644 --- a/src/abaqus/Load/ShellEdgeLoad.py +++ b/src/abaqus/Load/ShellEdgeLoad.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Load/ShellEdgeLoadState.py b/src/abaqus/Load/ShellEdgeLoadState.py index ca1cb89d81..ffdd9679b9 100644 --- a/src/abaqus/Load/ShellEdgeLoadState.py +++ b/src/abaqus/Load/ShellEdgeLoadState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class ShellEdgeLoadState(LoadState): """ #: A Float or a Complex specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -48,7 +48,7 @@ class ShellEdgeLoadState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/SubmodelSB.py b/src/abaqus/Load/SubmodelSB.py index 82057d51ce..088f4f815c 100644 --- a/src/abaqus/Load/SubmodelSB.py +++ b/src/abaqus/Load/SubmodelSB.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -24,7 +24,7 @@ class SubmodelSB(Load): #: None or a Float specifying the absolute value by which a driven node of the submodel can #: lie outside the region of the elements of the global model. The default value is None. - absoluteExteriorTolerance: Optional[float] = None + absoluteExteriorTolerance: float | None = None #: None or a Float specifying the fraction of the average element size in the global model #: by which a driven node of the submodel can lie outside the region of the elements of the @@ -47,7 +47,7 @@ def __init__( region: Region, globalStep: str, globalDrivingRegion: str = "", - absoluteExteriorTolerance: Optional[float] = None, + absoluteExteriorTolerance: float | None = None, exteriorTolerance: float = 0, globalIncrement: int = 0, ): @@ -99,7 +99,7 @@ def __init__( def setValues( self, globalDrivingRegion: str = "", - absoluteExteriorTolerance: Optional[float] = None, + absoluteExteriorTolerance: float | None = None, exteriorTolerance: float = 0, globalIncrement: int = 0, ): diff --git a/src/abaqus/Load/SubmodelSBState.py b/src/abaqus/Load/SubmodelSBState.py index fb77bace00..a4e348a3a1 100644 --- a/src/abaqus/Load/SubmodelSBState.py +++ b/src/abaqus/Load/SubmodelSBState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,16 +27,16 @@ class SubmodelSBState(LoadState): #: A SymbolicConstant specifying the propagation state of the **globalStep** member. Possible #: values are SET and UNCHANGED. - globalStepState: Optional[SymbolicConstant] = None + globalStepState: SymbolicConstant #: An Int specifying the increment number in the global model step at which the solution #: will be used to specify the values of the driven variables. This argument is applicable #: only for linear perturbation steps. - globalIncrement: Optional[int] = None + globalIncrement: int | None = None #: A SymbolicConstant specifying the propagation state of the **globalIncrement** member. #: Possible values are SET and UNCHANGED. - globalIncrementState: Optional[SymbolicConstant] = None + globalIncrementState: SymbolicConstant #: A String specifying the step in the global model from which Abaqus reads the values of #: the variables that will drive the submodel analysis. The String indicates the position @@ -46,7 +46,7 @@ class SubmodelSBState(LoadState): #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -60,7 +60,7 @@ class SubmodelSBState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/SubstructureLoad.py b/src/abaqus/Load/SubstructureLoad.py index 59e05d28d4..b2c9a4a9d0 100644 --- a/src/abaqus/Load/SubstructureLoad.py +++ b/src/abaqus/Load/SubstructureLoad.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -85,7 +85,7 @@ def setValuesInStep( self, stepName: str, loadCaseNames: str = "", - magnitude: Optional[float] = None, + magnitude: float | None = None, amplitude: str = "", ): """This method modifies the propagating data for an existing SubstructureLoad object in the specified diff --git a/src/abaqus/Load/SubstructureLoadState.py b/src/abaqus/Load/SubstructureLoadState.py index 2b80a22cc6..582182d599 100644 --- a/src/abaqus/Load/SubstructureLoadState.py +++ b/src/abaqus/Load/SubstructureLoadState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -28,15 +28,15 @@ class SubstructureLoadState(LoadState): loadCaseNames: tuple = () #: A Float or a Complex specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -50,7 +50,7 @@ class SubstructureLoadState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/SurfaceCharge.py b/src/abaqus/Load/SurfaceCharge.py index 4ec729ba10..70b229faa8 100644 --- a/src/abaqus/Load/SurfaceCharge.py +++ b/src/abaqus/Load/SurfaceCharge.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing SurfaceCharge object in the specified step. Parameters diff --git a/src/abaqus/Load/SurfaceChargeState.py b/src/abaqus/Load/SurfaceChargeState.py index 3671386786..090fb017d8 100644 --- a/src/abaqus/Load/SurfaceChargeState.py +++ b/src/abaqus/Load/SurfaceChargeState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class SurfaceChargeState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class SurfaceChargeState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/SurfaceConcentrationFlux.py b/src/abaqus/Load/SurfaceConcentrationFlux.py index 4e439cb2db..25b457a8bf 100644 --- a/src/abaqus/Load/SurfaceConcentrationFlux.py +++ b/src/abaqus/Load/SurfaceConcentrationFlux.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -115,7 +115,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing SurfaceConcentrationFlux object in the specified step. diff --git a/src/abaqus/Load/SurfaceConcentrationFluxState.py b/src/abaqus/Load/SurfaceConcentrationFluxState.py index 9df578686a..0d59c436a6 100644 --- a/src/abaqus/Load/SurfaceConcentrationFluxState.py +++ b/src/abaqus/Load/SurfaceConcentrationFluxState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class SurfaceConcentrationFluxState(LoadState): """ #: A Float specifying the surface concentration flux magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the surface concentration flux #: magnitude. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -48,7 +48,7 @@ class SurfaceConcentrationFluxState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/SurfaceCurrent.py b/src/abaqus/Load/SurfaceCurrent.py index efb301f547..9aabd2a802 100644 --- a/src/abaqus/Load/SurfaceCurrent.py +++ b/src/abaqus/Load/SurfaceCurrent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing SurfaceCurrent object in the specified step. diff --git a/src/abaqus/Load/SurfaceCurrentState.py b/src/abaqus/Load/SurfaceCurrentState.py index 25df83cbab..9cac35051b 100644 --- a/src/abaqus/Load/SurfaceCurrentState.py +++ b/src/abaqus/Load/SurfaceCurrentState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class SurfaceCurrentState(LoadState): """ #: A Float specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class SurfaceCurrentState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/SurfaceHeatFlux.py b/src/abaqus/Load/SurfaceHeatFlux.py index 566735e880..e50840e23f 100644 --- a/src/abaqus/Load/SurfaceHeatFlux.py +++ b/src/abaqus/Load/SurfaceHeatFlux.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -111,7 +111,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing SurfaceHeatFlux object in the specified step. diff --git a/src/abaqus/Load/SurfaceHeatFluxState.py b/src/abaqus/Load/SurfaceHeatFluxState.py index 3daa2dc766..80313a1326 100644 --- a/src/abaqus/Load/SurfaceHeatFluxState.py +++ b/src/abaqus/Load/SurfaceHeatFluxState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class SurfaceHeatFluxState(LoadState): """ #: A Float specifying the surface heat flux magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the surface heat flux magnitude. #: Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class SurfaceHeatFluxState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/SurfacePoreFluid.py b/src/abaqus/Load/SurfacePoreFluid.py index c040c33ac9..ecc7dcaaf6 100644 --- a/src/abaqus/Load/SurfacePoreFluid.py +++ b/src/abaqus/Load/SurfacePoreFluid.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -112,7 +112,7 @@ def setValues( ... @abaqus_method_doc - def setValuesInStep(self, stepName: str, magnitude: Optional[float] = None, amplitude: str = ""): + def setValuesInStep(self, stepName: str, magnitude: float | None = None, amplitude: str = ""): """This method modifies the propagating data for an existing SurfacePoreFluid object in the specified step. diff --git a/src/abaqus/Load/SurfacePoreFluidState.py b/src/abaqus/Load/SurfacePoreFluidState.py index 2a28478334..82b481398e 100644 --- a/src/abaqus/Load/SurfacePoreFluidState.py +++ b/src/abaqus/Load/SurfacePoreFluidState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,15 +25,15 @@ class SurfacePoreFluidState(LoadState): """ #: A Float specifying the surface pore fluid flow magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the surface pore fluid flow #: magnitude. Possible values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -47,7 +47,7 @@ class SurfacePoreFluidState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Load/SurfaceTraction.py b/src/abaqus/Load/SurfaceTraction.py index 7b69b21fce..2aebdb745c 100644 --- a/src/abaqus/Load/SurfaceTraction.py +++ b/src/abaqus/Load/SurfaceTraction.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -76,7 +78,7 @@ class SurfaceTraction(Load): #: of freedom. If **localCsys** = None, the degrees of freedom are defined in the global #: coordinate system or by the **userCsys** parameter if defined. When this member is #: queried, it returns an Int. The default value is None. - localCsys: Optional[int] = None + localCsys: int | None = None #: A VertexArray object of length 2 specifying the direction of the load. Instead of #: through a ConstrainedSketchVertex, each point may be specified through a tuple of coordinates. If @@ -99,7 +101,7 @@ def __init__( amplitude: str = UNSET, angle: float = 0, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - localCsys: Optional[int] = None, + localCsys: int | None = None, userCsys: str = "", directionVector: tuple = (), follower: Boolean = ON, @@ -184,7 +186,7 @@ def setValues( amplitude: str = UNSET, angle: float = 0, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - localCsys: Optional[int] = None, + localCsys: int | None = None, userCsys: str = "", directionVector: tuple = (), follower: Boolean = ON, diff --git a/src/abaqus/Load/SurfaceTractionState.py b/src/abaqus/Load/SurfaceTractionState.py index 07fce5e94a..829e8695d4 100644 --- a/src/abaqus/Load/SurfaceTractionState.py +++ b/src/abaqus/Load/SurfaceTractionState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,15 +26,15 @@ class SurfaceTractionState(LoadState): """ #: A Float or a Complex specifying the load magnitude. - magnitude: Optional[float] = None + magnitude: float | None = None #: A SymbolicConstant specifying the propagation state of the load magnitude. Possible #: values are UNSET, SET, UNCHANGED, and MODIFIED. - magnitudeState: Optional[SymbolicConstant] = None + magnitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitude** member. Possible #: values are UNSET, SET, UNCHANGED, and FREED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the LoadState object. Possible #: values are: @@ -48,7 +48,7 @@ class SurfaceTractionState(LoadState): #: - TYPE_NOT_APPLICABLE #: - INSTANCE_NOT_APPLICABLE #: - BUILT_INTO_BASE_STATE - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A String specifying the name of the amplitude reference. The String is empty if the load #: has no amplitude reference. diff --git a/src/abaqus/Material/Elastic/HyperElastic/HyperFoam/Hyperfoam.py b/src/abaqus/Material/Elastic/HyperElastic/HyperFoam/Hyperfoam.py index 4632baaef2..9762fc6601 100644 --- a/src/abaqus/Material/Elastic/HyperElastic/HyperFoam/Hyperfoam.py +++ b/src/abaqus/Material/Elastic/HyperElastic/HyperFoam/Hyperfoam.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -57,7 +57,7 @@ class Hyperfoam: def __init__( self, testData: Boolean = OFF, - poisson: Optional[float] = None, + poisson: float | None = None, n: int = 1, temperatureDependency: Boolean = OFF, moduli: Literal[C.INSTANTANEOUS, C.LONG_TERM] = LONG_TERM, diff --git a/src/abaqus/Material/Elastic/HyperElastic/Hyperelastic.py b/src/abaqus/Material/Elastic/HyperElastic/Hyperelastic.py index 67cf6e6a08..770893d68a 100644 --- a/src/abaqus/Material/Elastic/HyperElastic/Hyperelastic.py +++ b/src/abaqus/Material/Elastic/HyperElastic/Hyperelastic.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Material/Elastic/HyperElastic/ViscoElastic/CombinedTestData.py b/src/abaqus/Material/Elastic/HyperElastic/ViscoElastic/CombinedTestData.py index f92cdd1f2c..32f309a247 100644 --- a/src/abaqus/Material/Elastic/HyperElastic/ViscoElastic/CombinedTestData.py +++ b/src/abaqus/Material/Elastic/HyperElastic/ViscoElastic/CombinedTestData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -36,7 +36,7 @@ class CombinedTestData: """ @abaqus_method_doc - def __init__(self, table: tuple, volinf: Optional[float] = None, shrinf: Optional[float] = None): + def __init__(self, table: tuple, volinf: float | None = None, shrinf: float | None = None): r"""This method creates a CombinedTestData object. .. note:: diff --git a/src/abaqus/Material/Elastic/LowDensityFoam/LowDensityFoam.py b/src/abaqus/Material/Elastic/LowDensityFoam/LowDensityFoam.py index e0ed36ec98..9d670f5e76 100644 --- a/src/abaqus/Material/Elastic/LowDensityFoam/LowDensityFoam.py +++ b/src/abaqus/Material/Elastic/LowDensityFoam/LowDensityFoam.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -36,10 +36,10 @@ class LowDensityFoam: def __init__( self, elementRemoval: Boolean = OFF, - maxAllowablePrincipalStress: Optional[float] = None, + maxAllowablePrincipalStress: float | None = None, extrapolateStressStrainCurve: Boolean = OFF, strainRateType: Literal[C.PRINCIPAL, C.VOLUMETRIC] = VOLUMETRIC, - mu0: Optional[float] = None, + mu0: float | None = None, mu1: float = 0, alpha: float = 2, ): diff --git a/src/abaqus/Material/Elastic/SuperElastic/SuperElasticity.py b/src/abaqus/Material/Elastic/SuperElastic/SuperElasticity.py index a1ac0ec7d0..333df3be3b 100644 --- a/src/abaqus/Material/Elastic/SuperElastic/SuperElasticity.py +++ b/src/abaqus/Material/Elastic/SuperElastic/SuperElasticity.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -48,7 +48,7 @@ class SuperElasticity: superElasticHardeningModifications: SuperElasticHardeningModifications = SuperElasticHardeningModifications(((),)) @abaqus_method_doc - def __init__(self, table: tuple, nonassociated: Optional[float] = None): + def __init__(self, table: tuple, nonassociated: float | None = None): """This method creates a SuperElasticity object. .. note:: diff --git a/src/abaqus/Material/Gap/GapFlow.py b/src/abaqus/Material/Gap/GapFlow.py index b9f3f548f3..b834ae5325 100644 --- a/src/abaqus/Material/Gap/GapFlow.py +++ b/src/abaqus/Material/Gap/GapFlow.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -64,7 +64,7 @@ class GapFlow: def __init__( self, table: tuple, - kmax: Optional[float] = None, + kmax: float | None = None, temperatureDependency: Boolean = OFF, dependencies: int = 0, type: Literal[C.BINGHAM_PLASTIC, C.POWER_LAW, C.HERSCHEL_BULKLEY, C.NEWTONIAN] = NEWTONIAN, diff --git a/src/abaqus/Material/Gasket/GasketThicknessBehavior.py b/src/abaqus/Material/Gasket/GasketThicknessBehavior.py index c3dd4d80f5..6adf2fe905 100644 --- a/src/abaqus/Material/Gasket/GasketThicknessBehavior.py +++ b/src/abaqus/Material/Gasket/GasketThicknessBehavior.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -96,7 +96,7 @@ def __init__( table: tuple, temperatureDependency: Boolean = OFF, dependencies: int = 0, - tensileStiffnessFactor: Optional[float] = None, + tensileStiffnessFactor: float | None = None, type: Literal[C.DAMAGE, C.ELASTIC_PLASTIC] = ELASTIC_PLASTIC, unloadingDependencies: int = 0, unloadingTemperatureDependency: Boolean = OFF, diff --git a/src/abaqus/Material/Material.py b/src/abaqus/Material/Material.py index 04fb5a7aa5..9397297864 100644 --- a/src/abaqus/Material/Material.py +++ b/src/abaqus/Material/Material.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -317,7 +319,7 @@ def CastIronPlasticity( def ClayPlasticity( self, table: tuple, - intercept: Optional[float] = None, + intercept: float | None = None, hardening: Literal[C.EXPONENTIAL, C.TABULAR] = EXPONENTIAL, temperatureDependency: Boolean = OFF, dependencies: int = 0, @@ -1214,7 +1216,7 @@ def FluidLeakoff( def GapFlow( self, table: tuple, - kmax: Optional[float] = None, + kmax: float | None = None, temperatureDependency: Boolean = OFF, dependencies: int = 0, type: Literal[C.NEWTONIAN, C.POWER_LAW, C.BINGHAM_PLASTIC, C.HERSCHEL_BULKLEY] = NEWTONIAN, @@ -1293,7 +1295,7 @@ def GasketThicknessBehavior( table: tuple, temperatureDependency: Boolean = OFF, dependencies: int = 0, - tensileStiffnessFactor: Optional[float] = None, + tensileStiffnessFactor: float | None = None, type: Literal[C.ELASTIC_PLASTIC, C.DAMAGE] = ELASTIC_PLASTIC, unloadingDependencies: int = 0, unloadingTemperatureDependency: Boolean = OFF, @@ -1582,7 +1584,7 @@ def Hyperelastic( def Hyperfoam( self, testData: Boolean = OFF, - poisson: Optional[float] = None, + poisson: float | None = None, n: int = 1, temperatureDependency: Boolean = OFF, moduli: Literal[C.LONG_TERM, C.INSTANTANEOUS] = LONG_TERM, @@ -1741,10 +1743,10 @@ def LatentHeat(self, table: tuple) -> LatentHeat: def LowDensityFoam( self, elementRemoval: Boolean = OFF, - maxAllowablePrincipalStress: Optional[float] = None, + maxAllowablePrincipalStress: float | None = None, extrapolateStressStrainCurve: Boolean = OFF, strainRateType: Literal[C.VOLUMETRIC, C.PRINCIPAL] = VOLUMETRIC, - mu0: Optional[float] = None, + mu0: float | None = None, mu1: float = 0, alpha: float = 2, ) -> LowDensityFoam: @@ -1870,7 +1872,7 @@ def MagneticPermeability( def MohrCoulombPlasticity( self, table: tuple, - deviatoricEccentricity: Optional[float] = None, + deviatoricEccentricity: float | None = None, meridionalEccentricity: float = 0, temperatureDependency: Boolean = OFF, dependencies: int = 0, @@ -2260,7 +2262,7 @@ def PorousElastic( def PorousMetalPlasticity( self, table: tuple, - relativeDensity: Optional[float] = None, + relativeDensity: float | None = None, temperatureDependency: Boolean = OFF, dependencies: int = 0, ) -> PorousMetalPlasticity: @@ -3910,7 +3912,7 @@ def HashinDamageInitiation( @abaqus_method_doc def MeanFieldHomogenization( self, - angleSubdivision: Optional[int] = None, + angleSubdivision: int | None = None, formulation: Literal[C.MT, C.REUSS, C.VOIGT, C.INVERSED_MT, C.BALANCED, C.UNSPECIFIED] = MT, isotropization: Literal[C.ALLISO, C.EISO, C.PISO] = ALLISO, uniformMatrixStrain: Literal[C.NO, C.YES] = NO, diff --git a/src/abaqus/Material/MaterialBase.py b/src/abaqus/Material/MaterialBase.py index 66ad864ca8..d79977eee8 100644 --- a/src/abaqus/Material/MaterialBase.py +++ b/src/abaqus/Material/MaterialBase.py @@ -367,7 +367,7 @@ def materialsFromOdb(self, fileName: str): Returns ------- - List[Material] + list[Material] A list of Material objects. """ ... diff --git a/src/abaqus/Material/Multiscale/MeanFieldHomogenization.py b/src/abaqus/Material/Multiscale/MeanFieldHomogenization.py index 269f4d8733..c0b63b262e 100644 --- a/src/abaqus/Material/Multiscale/MeanFieldHomogenization.py +++ b/src/abaqus/Material/Multiscale/MeanFieldHomogenization.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -34,7 +34,7 @@ class MeanFieldHomogenization: @abaqus_method_doc def __init__( self, - angleSubdivision: Optional[int] = None, + angleSubdivision: int | None = None, formulation: Literal[C.VOIGT, C.REUSS, C.MT, C.UNSPECIFIED, C.BALANCED, C.INVERSED_MT] = MT, isotropization: Literal[C.EISO, C.PISO, C.ALLISO] = ALLISO, uniformMatrixStrain: Literal[C.YES, C.NO] = NO, @@ -78,7 +78,7 @@ def MeanFieldInclusion( name: str, table: tuple, material: str = "", - isotropizationCoefficient: Optional[float] = None, + isotropizationCoefficient: float | None = None, volumeFractionType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, volumeFractionFieldName: str = "", aspectRatioType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, @@ -86,7 +86,7 @@ def MeanFieldInclusion( orientationTensorType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, orientationTensorFieldName: str = "", shape: Literal[C.SPHERE, C.PENNY, C.PROLATE, C.OBLATE, C.CYLINDER, C.ELLIPTIC_CYLINDER] = SPHERE, - direction: Optional[Literal[C.RANDOM3D, C.ORIENTATION_TENSOR, C.FIXED]] = None, + direction: Literal[C.RANDOM3D, C.ORIENTATION_TENSOR, C.FIXED] | None = None, strainConcentrationTensor: tuple = (), temperatureGradientConcentrationTensor: tuple = (), ): @@ -162,7 +162,7 @@ def MeanFieldInclusion( ) @abaqus_method_doc - def MeanFieldMatrix(self, name: str, material: str = "", isotropizationCoefficient: Optional[float] = None): + def MeanFieldMatrix(self, name: str, material: str = "", isotropizationCoefficient: float | None = None): """This method creates a MeanFieldMatrix object. .. note:: @@ -197,7 +197,7 @@ def MeanFieldVoid( name: str, table: tuple, material: str = "", - isotropizationCoefficient: Optional[float] = None, + isotropizationCoefficient: float | None = None, volumeFractionType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, volumeFractionFieldName: str = "", aspectRatioType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, @@ -205,7 +205,7 @@ def MeanFieldVoid( orientationTensorType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, orientationTensorFieldName: str = "", shape: Literal[C.SPHERE, C.PENNY, C.PROLATE, C.OBLATE, C.CYLINDER, C.ELLIPTIC_CYLINDER] = SPHERE, - direction: Optional[Literal[C.RANDOM3D, C.ORIENTATION_TENSOR, C.FIXED]] = None, + direction: Literal[C.RANDOM3D, C.ORIENTATION_TENSOR, C.FIXED] | None = None, strainConcentrationTensor: tuple = (), temperatureGradientConcentrationTensor: tuple = (), ): diff --git a/src/abaqus/Material/Multiscale/MeanFieldInclusion.py b/src/abaqus/Material/Multiscale/MeanFieldInclusion.py index 0181f447eb..ef0b4ea164 100644 --- a/src/abaqus/Material/Multiscale/MeanFieldInclusion.py +++ b/src/abaqus/Material/Multiscale/MeanFieldInclusion.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -42,7 +42,7 @@ def __init__( name: str, table: tuple, material: str = "", - isotropizationCoefficient: Optional[float] = None, + isotropizationCoefficient: float | None = None, volumeFractionType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, volumeFractionFieldName: str = "", aspectRatioType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, @@ -50,7 +50,7 @@ def __init__( orientationTensorType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, orientationTensorFieldName: str = "", shape: Literal[C.SPHERE, C.PENNY, C.PROLATE, C.OBLATE, C.CYLINDER, C.ELLIPTIC_CYLINDER] = SPHERE, - direction: Optional[Literal[C.RANDOM3D, C.ORIENTATION_TENSOR, C.FIXED]] = None, + direction: Literal[C.RANDOM3D, C.ORIENTATION_TENSOR, C.FIXED] | None = None, strainConcentrationTensor: tuple = (), temperatureGradientConcentrationTensor: tuple = (), ): diff --git a/src/abaqus/Material/Multiscale/MeanFieldMatrix.py b/src/abaqus/Material/Multiscale/MeanFieldMatrix.py index b4ade90398..ff6f9b7137 100644 --- a/src/abaqus/Material/Multiscale/MeanFieldMatrix.py +++ b/src/abaqus/Material/Multiscale/MeanFieldMatrix.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -24,7 +24,7 @@ class MeanFieldMatrix: """ @abaqus_method_doc - def __init__(self, name: str, material: str = "", isotropizationCoefficient: Optional[float] = None): + def __init__(self, name: str, material: str = "", isotropizationCoefficient: float | None = None): """This method creates a MeanFieldMatrix object. .. note:: diff --git a/src/abaqus/Material/Multiscale/MeanFieldVoid.py b/src/abaqus/Material/Multiscale/MeanFieldVoid.py index 30c61d7df3..a253f62b75 100644 --- a/src/abaqus/Material/Multiscale/MeanFieldVoid.py +++ b/src/abaqus/Material/Multiscale/MeanFieldVoid.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -42,7 +42,7 @@ def __init__( name: str, table: tuple, material: str = "", - isotropizationCoefficient: Optional[float] = None, + isotropizationCoefficient: float | None = None, volumeFractionType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, volumeFractionFieldName: str = "", aspectRatioType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, @@ -50,7 +50,7 @@ def __init__( orientationTensorType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, orientationTensorFieldName: str = "", shape: Literal[C.SPHERE, C.PENNY, C.PROLATE, C.OBLATE, C.CYLINDER, C.ELLIPTIC_CYLINDER] = SPHERE, - direction: Optional[Literal[C.RANDOM3D, C.ORIENTATION_TENSOR, C.FIXED]] = None, + direction: Literal[C.RANDOM3D, C.ORIENTATION_TENSOR, C.FIXED] | None = None, strainConcentrationTensor: tuple = (), temperatureGradientConcentrationTensor: tuple = (), ): diff --git a/src/abaqus/Material/Plastic/CriticalStateClay/ClayPlasticity.py b/src/abaqus/Material/Plastic/CriticalStateClay/ClayPlasticity.py index f6373b8114..72903af081 100644 --- a/src/abaqus/Material/Plastic/CriticalStateClay/ClayPlasticity.py +++ b/src/abaqus/Material/Plastic/CriticalStateClay/ClayPlasticity.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -61,7 +61,7 @@ class ClayPlasticity: def __init__( self, table: tuple, - intercept: Optional[float] = None, + intercept: float | None = None, hardening: Literal[C.EXPONENTIAL, C.TABULAR] = EXPONENTIAL, temperatureDependency: Boolean = OFF, dependencies: int = 0, diff --git a/src/abaqus/Material/Plastic/CrushStress/CrushStress.py b/src/abaqus/Material/Plastic/CrushStress/CrushStress.py index b12ed1b6a4..6be91e58d3 100644 --- a/src/abaqus/Material/Plastic/CrushStress/CrushStress.py +++ b/src/abaqus/Material/Plastic/CrushStress/CrushStress.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Material/Plastic/CrushStress/CrushStressVelocityFactor.py b/src/abaqus/Material/Plastic/CrushStress/CrushStressVelocityFactor.py index 2d2f5cd67a..7da4712cfa 100644 --- a/src/abaqus/Material/Plastic/CrushStress/CrushStressVelocityFactor.py +++ b/src/abaqus/Material/Plastic/CrushStress/CrushStressVelocityFactor.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Material/Plastic/DruckerPrager/Extended/TriaxialTestData.py b/src/abaqus/Material/Plastic/DruckerPrager/Extended/TriaxialTestData.py index 5675bc3b54..1377535281 100644 --- a/src/abaqus/Material/Plastic/DruckerPrager/Extended/TriaxialTestData.py +++ b/src/abaqus/Material/Plastic/DruckerPrager/Extended/TriaxialTestData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -26,7 +26,7 @@ class TriaxialTestData: """ @abaqus_method_doc - def __init__(self, table: tuple, a: Optional[float] = None, b: Optional[float] = None, pt: Optional[float] = None): + def __init__(self, table: tuple, a: float | None = None, b: float | None = None, pt: float | None = None): """This method creates a TriaxialTestData object. .. note:: diff --git a/src/abaqus/Material/Plastic/Metal/ORNL/Ornl.py b/src/abaqus/Material/Plastic/Metal/ORNL/Ornl.py index d40b9a8185..06b74bc9cd 100644 --- a/src/abaqus/Material/Plastic/Metal/ORNL/Ornl.py +++ b/src/abaqus/Material/Plastic/Metal/ORNL/Ornl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -25,7 +25,7 @@ class Ornl: """ @abaqus_method_doc - def __init__(self, a: float = 0, h: Optional[float] = None, reset: Boolean = OFF): + def __init__(self, a: float = 0, h: float | None = None, reset: Boolean = OFF): """This method creates an Ornl object. .. note:: diff --git a/src/abaqus/Material/Plastic/Metal/Porous/PorousMetalPlasticity.py b/src/abaqus/Material/Plastic/Metal/Porous/PorousMetalPlasticity.py index 9fa0f72913..2bc774f3a3 100644 --- a/src/abaqus/Material/Plastic/Metal/Porous/PorousMetalPlasticity.py +++ b/src/abaqus/Material/Plastic/Metal/Porous/PorousMetalPlasticity.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -44,7 +44,7 @@ class PorousMetalPlasticity: def __init__( self, table: tuple, - relativeDensity: Optional[float] = None, + relativeDensity: float | None = None, temperatureDependency: Boolean = OFF, dependencies: int = 0, ): diff --git a/src/abaqus/Material/Plastic/MohrCoulomb/MohrCoulombPlasticity.py b/src/abaqus/Material/Plastic/MohrCoulomb/MohrCoulombPlasticity.py index cff67ee637..5df13bd583 100644 --- a/src/abaqus/Material/Plastic/MohrCoulomb/MohrCoulombPlasticity.py +++ b/src/abaqus/Material/Plastic/MohrCoulomb/MohrCoulombPlasticity.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -44,7 +44,7 @@ class MohrCoulombPlasticity: def __init__( self, table: tuple, - deviatoricEccentricity: Optional[float] = None, + deviatoricEccentricity: float | None = None, meridionalEccentricity: float = 0, temperatureDependency: Boolean = OFF, dependencies: int = 0, diff --git a/src/abaqus/Material/Plastic/PlasticityCorrection.py b/src/abaqus/Material/Plastic/PlasticityCorrection.py index 456d9f9b68..c52af63c83 100644 --- a/src/abaqus/Material/Plastic/PlasticityCorrection.py +++ b/src/abaqus/Material/Plastic/PlasticityCorrection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from typing_extensions import Literal diff --git a/src/abaqus/Material/Plastic/TensileFailure.py b/src/abaqus/Material/Plastic/TensileFailure.py index e0d46fae8b..27cc90bc88 100644 --- a/src/abaqus/Material/Plastic/TensileFailure.py +++ b/src/abaqus/Material/Plastic/TensileFailure.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -45,8 +45,8 @@ def tensileFailure( dependencies: int = 0, temperatureDependency: Boolean = OFF, elementDeletion: Boolean = True, - pressure: Optional[Literal[C.BRITTLE, C.DUCTILE]] = None, - shear: Optional[Literal[C.BRITTLE, C.DUCTILE]] = None, + pressure: Literal[C.BRITTLE, C.DUCTILE] | None = None, + shear: Literal[C.BRITTLE, C.DUCTILE] | None = None, ): """This method creates a tensileFailure object. diff --git a/src/abaqus/Material/ProgressiveDamageFailure/DamageEvolution.py b/src/abaqus/Material/ProgressiveDamageFailure/DamageEvolution.py index e33a6102bf..d3a26bfdeb 100644 --- a/src/abaqus/Material/ProgressiveDamageFailure/DamageEvolution.py +++ b/src/abaqus/Material/ProgressiveDamageFailure/DamageEvolution.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -174,7 +174,7 @@ def __init__( dependencies: int = 0, mixedModeBehavior: Literal[C.MODE_INDEPENDENT, C.TABULAR, C.POWER_LAW, C.BK] = MODE_INDEPENDENT, modeMixRatio: Literal[C.TRACTION, C.ENERGY] = ENERGY, - power: Optional[float] = None, + power: float | None = None, softening: Literal[C.LINEAR, C.EXPONENTIAL, C.TABULAR] = LINEAR, ) -> None: """This method creates a DamageEvolution object. diff --git a/src/abaqus/Material/ProgressiveDamageFailure/DamageInitiation.py b/src/abaqus/Material/ProgressiveDamageFailure/DamageInitiation.py index 2b8a91054e..40afd683f4 100644 --- a/src/abaqus/Material/ProgressiveDamageFailure/DamageInitiation.py +++ b/src/abaqus/Material/ProgressiveDamageFailure/DamageInitiation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -236,13 +236,13 @@ class DamageInitiation: direction: SymbolicConstant = NMORI #: A tuple of tuples of Floats specifying the items described in the "Table data" section. - table: Optional[float] = None + table: float | None = None #: A DamageEvolution object. - damageEvolution: Optional[DamageEvolution] = None + damageEvolution: DamageEvolution | None = None #: A DamageStabilization object. - damageStabilization: Optional[DamageStabilization] = None + damageStabilization: DamageStabilization | None = None #: A DamageStabilizationCohesive object. damageStabilizationCohesive: DamageStabilizationCohesive = DamageStabilizationCohesive() @@ -1591,7 +1591,7 @@ def DamageEvolution( dependencies: int = 0, mixedModeBehavior: Literal[C.MODE_INDEPENDENT, C.TABULAR, C.POWER_LAW, C.BK] = MODE_INDEPENDENT, modeMixRatio: Literal[C.TRACTION, C.ENERGY] = ENERGY, - power: Optional[float] = None, + power: float | None = None, softening: Literal[C.LINEAR, C.EXPONENTIAL, C.TABULAR] = LINEAR, ) -> DamageEvolution: """This method creates a DamageEvolution object. @@ -1659,10 +1659,20 @@ def DamageEvolution( ------ RangeError """ - ... + return DamageEvolution( + type=type, + table=table, + degradation=degradation, + temperatureDependency=temperatureDependency, + dependencies=dependencies, + mixedModeBehavior=mixedModeBehavior, + modeMixRatio=modeMixRatio, + power=power, + softening=softening, + ) @abaqus_method_doc - def DamageStabilizationCohesive(self, cohesiveCoeff: Optional[float] = None) -> DamageStabilizationCohesive: + def DamageStabilizationCohesive(self, cohesiveCoeff: float | None = None) -> DamageStabilizationCohesive: """This method creates a DamageStabilizationCohesive object. .. note:: @@ -1711,4 +1721,4 @@ def DamageStabilizationCohesive(self, cohesiveCoeff: Optional[float] = None) -> ------ RangeError """ - ... + return DamageStabilizationCohesive(cohesiveCoeff=cohesiveCoeff) diff --git a/src/abaqus/Material/ProgressiveDamageFailure/DamageStabilizationCohesive.py b/src/abaqus/Material/ProgressiveDamageFailure/DamageStabilizationCohesive.py index 0b152318d8..1722f5b890 100644 --- a/src/abaqus/Material/ProgressiveDamageFailure/DamageStabilizationCohesive.py +++ b/src/abaqus/Material/ProgressiveDamageFailure/DamageStabilizationCohesive.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -48,7 +48,7 @@ class DamageStabilizationCohesive: """ @abaqus_method_doc - def __init__(self, cohesiveCoeff: Optional[float] = None): + def __init__(self, cohesiveCoeff: float | None = None): """This method creates a DamageStabilizationCohesive object. .. note:: diff --git a/src/abaqus/Material/TestData/BiaxialTestData.py b/src/abaqus/Material/TestData/BiaxialTestData.py index 0d96632bb3..13b5d5c68d 100644 --- a/src/abaqus/Material/TestData/BiaxialTestData.py +++ b/src/abaqus/Material/TestData/BiaxialTestData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -30,7 +30,7 @@ class BiaxialTestData: def __init__( self, table: tuple, - smoothing: Optional[int] = None, + smoothing: int | None = None, lateralNominalStrain: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, diff --git a/src/abaqus/Material/TestData/BiaxialTestDataArray.py b/src/abaqus/Material/TestData/BiaxialTestDataArray.py index dc661492ea..b51448b931 100644 --- a/src/abaqus/Material/TestData/BiaxialTestDataArray.py +++ b/src/abaqus/Material/TestData/BiaxialTestDataArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .BiaxialTestData import BiaxialTestData diff --git a/src/abaqus/Material/TestData/PlanarTestData.py b/src/abaqus/Material/TestData/PlanarTestData.py index 86cbb04739..b428ed4461 100644 --- a/src/abaqus/Material/TestData/PlanarTestData.py +++ b/src/abaqus/Material/TestData/PlanarTestData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -42,7 +42,7 @@ class PlanarTestData: def __init__( self, table: tuple, - smoothing: Optional[int] = None, + smoothing: int | None = None, lateralNominalStrain: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, diff --git a/src/abaqus/Material/TestData/PlanarTestDataArray.py b/src/abaqus/Material/TestData/PlanarTestDataArray.py index 873360c7b9..ebe48d3dd6 100644 --- a/src/abaqus/Material/TestData/PlanarTestDataArray.py +++ b/src/abaqus/Material/TestData/PlanarTestDataArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .PlanarTestData import PlanarTestData diff --git a/src/abaqus/Material/TestData/ShearTestData.py b/src/abaqus/Material/TestData/ShearTestData.py index f9b29b31f3..7b73c83de2 100644 --- a/src/abaqus/Material/TestData/ShearTestData.py +++ b/src/abaqus/Material/TestData/ShearTestData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -34,7 +34,7 @@ class ShearTestData: """ @abaqus_method_doc - def __init__(self, table: tuple, shrinf: Optional[float] = None): + def __init__(self, table: tuple, shrinf: float | None = None): r"""This method creates a ShearTestData object. .. note:: diff --git a/src/abaqus/Material/TestData/UniaxialTestData.py b/src/abaqus/Material/TestData/UniaxialTestData.py index 1a61f80427..a78f649cd8 100644 --- a/src/abaqus/Material/TestData/UniaxialTestData.py +++ b/src/abaqus/Material/TestData/UniaxialTestData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -51,7 +51,7 @@ class UniaxialTestData: def __init__( self, table: tuple, - smoothing: Optional[int] = None, + smoothing: int | None = None, lateralNominalStrain: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, diff --git a/src/abaqus/Material/TestData/UniaxialTestDataArray.py b/src/abaqus/Material/TestData/UniaxialTestDataArray.py index 35531f508e..6e7a2b82c2 100644 --- a/src/abaqus/Material/TestData/UniaxialTestDataArray.py +++ b/src/abaqus/Material/TestData/UniaxialTestDataArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .UniaxialTestData import UniaxialTestData diff --git a/src/abaqus/Material/TestData/VolumetricTestData.py b/src/abaqus/Material/TestData/VolumetricTestData.py index 3e179b0853..503f0f4684 100644 --- a/src/abaqus/Material/TestData/VolumetricTestData.py +++ b/src/abaqus/Material/TestData/VolumetricTestData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -50,8 +50,8 @@ class VolumetricTestData: def __init__( self, table: tuple, - volinf: Optional[float] = None, - smoothing: Optional[int] = None, + volinf: float | None = None, + smoothing: int | None = None, temperatureDependency: Boolean = OFF, dependencies: int = 0, ): diff --git a/src/abaqus/Material/evaluateMaterial.py b/src/abaqus/Material/evaluateMaterial.py index 265ff347ec..f0c76d061b 100644 --- a/src/abaqus/Material/evaluateMaterial.py +++ b/src/abaqus/Material/evaluateMaterial.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -26,18 +28,18 @@ def evaluateMaterial( simulationName: str, dataSource: Sequence[Literal[C.TEST_DATA, C.COEFFICIENTS]], strainEnergyPotentials: Sequence[Literal[C.POLY_N1]], - marlowData: Optional[SymbolicConstant] = None, - marlowDataType: Optional[SymbolicConstant] = None, - testDataTypes: Optional[SymbolicConstant] = None, - uniaxialStrainRange: Optional[float] = None, - biaxialStrainRange: Optional[float] = None, - planarStrainRange: Optional[float] = None, - volumeRatioRange: Optional[float] = None, - simpleShearStrainRange: Optional[float] = None, - viscoDataSource: Optional[SymbolicConstant] = None, - viscoTestDataTypes: Optional[SymbolicConstant] = None, - relaxationTime: Optional[float] = None, - creepTime: Optional[float] = None, + marlowData: SymbolicConstant | None = None, + marlowDataType: SymbolicConstant | None = None, + testDataTypes: SymbolicConstant | None = None, + uniaxialStrainRange: float | None = None, + biaxialStrainRange: float | None = None, + planarStrainRange: float | None = None, + volumeRatioRange: float | None = None, + simpleShearStrainRange: float | None = None, + viscoDataSource: SymbolicConstant | None = None, + viscoTestDataTypes: SymbolicConstant | None = None, + relaxationTime: float | None = None, + creepTime: float | None = None, ): """This method evaluates the behavior of a hyperelastic material under standard test conditions. diff --git a/src/abaqus/Mdb/Mdb.py b/src/abaqus/Mdb/Mdb.py index f3f1c4ac11..317697b56e 100644 --- a/src/abaqus/Mdb/Mdb.py +++ b/src/abaqus/Mdb/Mdb.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -27,11 +27,11 @@ def Model( self, name: str, description: str = "", - stefanBoltzmann: Optional[float] = None, - absoluteZero: Optional[float] = None, + stefanBoltzmann: float | None = None, + absoluteZero: float | None = None, waveFormulation: Literal[C.SCATTERED, C.NOT_SET, C.TOTAL] = NOT_SET, modelType: Literal[C.STANDARD_EXPLICIT, C.ELECTROMAGNETIC] = STANDARD_EXPLICIT, - universalGas: Optional[float] = None, + universalGas: float | None = None, copyConstraints: Boolean = ON, copyConnectors: Boolean = ON, copyInteractions: Boolean = ON, diff --git a/src/abaqus/Mdb/MdbBase.py b/src/abaqus/Mdb/MdbBase.py index fbff324a71..472d338766 100644 --- a/src/abaqus/Mdb/MdbBase.py +++ b/src/abaqus/Mdb/MdbBase.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Union from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -31,36 +31,36 @@ class MdbBase: """ #: An Int specifying the release number of the Mdb object in memory. - version: Optional[int] = None + version: int | None = None #: A Float specifying the value of a counter associated with the Mdb object. The counter #: indicates when the Mdb object was last changed. - lastChangedCount: Optional[float] = None + lastChangedCount: float | None = None #: A repository of Job objects. - jobs: Dict[str, Union[Job, ModelJob, JobFromInputFile]] = {} + jobs: dict[str, Union[Job, ModelJob, JobFromInputFile]] = {} #: A repository of AdaptivityProcess objects. - adaptivityProcesses: Dict[str, AdaptivityProcess] = {} + adaptivityProcesses: dict[str, AdaptivityProcess] = {} #: A repository of Coexecution objects. - coexecutions: Dict[str, Coexecution] = {} + coexecutions: dict[str, Coexecution] = {} #: A repository of OptimizationProcess objects. - optimizationProcesses: Dict[str, OptimizationProcess] = {} + optimizationProcesses: dict[str, OptimizationProcess] = {} #: A MeshEditOptions object specifying the undo/redo behavior when editing meshes on parts #: or part instances. meshEditOptions: MeshEditOptions = MeshEditOptions() #: A repository of Model objects. - models: Dict[str, Model] = {} + models: dict[str, Model] = {} #: A RepositorySupport object. customData: RepositorySupport = RepositorySupport() #: A repository of Annotation objects. - annotations: Dict[str, Annotation] = {} + annotations: dict[str, Annotation] = {} @abaqus_method_doc def __init__(self, pathName: str = ""): @@ -108,7 +108,7 @@ def importDxf(self, fileName: str) -> Mdb: Mdb A Mdb object """ - ... + return Mdb() @abaqus_method_doc def openMdb(self, pathName: str) -> Mdb: @@ -146,7 +146,7 @@ def openMdb(self, pathName: str) -> Mdb: cannot open file; If the command fails to open the model database file for reasons not mentioned above """ - ... + return Mdb(pathName) @abaqus_method_doc def close(self): @@ -238,13 +238,13 @@ def closeAuxMdb(self): ... @abaqus_method_doc - def getAuxMdbModelNames(self) -> List[str]: + def getAuxMdbModelNames(self) -> list[str]: """This method returns a list of model names present in the auxiliary Mdb which had been opened earlier using the openAuxMdb command. Returns ------- - List[str] + list[str] A list of model names present in the auxiliaryMdb Raises @@ -253,7 +253,7 @@ def getAuxMdbModelNames(self) -> List[str]: The auxiliary Mdb was not opened; If the auxiliary Mdb was not opened earlier """ - ... + return [] @abaqus_method_doc def copyAuxMdbModel(self, fromName: str, toName: str = ""): diff --git a/src/abaqus/Mdb/MdbCommands.py b/src/abaqus/Mdb/MdbCommands.py index f929912ae5..5d7e73ace2 100644 --- a/src/abaqus/Mdb/MdbCommands.py +++ b/src/abaqus/Mdb/MdbCommands.py @@ -10,6 +10,8 @@ * CombineOptResults """ +from __future__ import annotations + from typing import Sequence, Union from typing_extensions import Literal diff --git a/src/abaqus/Mesh/ElemType.py b/src/abaqus/Mesh/ElemType.py index 94d294ffe3..8df7ada2f2 100644 --- a/src/abaqus/Mesh/ElemType.py +++ b/src/abaqus/Mesh/ElemType.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -134,7 +136,7 @@ class ElemType: #: A Float specifying the maximum degradation option for damage control. The default value #: is −1.0. - maxDegradation: Optional[float] = None + maxDegradation: float | None = None #: A Float specifying the viscosity option. The default value is 0.0.This argument is #: applicable only to some Abaqus/Standard elements. @@ -162,21 +164,21 @@ class ElemType: #: #: .. versionadded:: 2019 #: The ``nodeOffset`` attribute was added. - nodeOffset: Optional[int] = None + nodeOffset: int | None = None #: A Float specifying the linear kinematic conversion value.This argument is applicable #: only to some Abaqus/Explicit elements. #: #: .. versionadded:: 2022 #: The ``linearKinematicCtrl`` attribute was added. - linearKinematicCtrl: Optional[float] = None + linearKinematicCtrl: float | None = None #: A Float specifying the initial gap opening.This parameter is applicable only to some #: Abaqus/Standard elements. #: #: .. versionadded:: 2022 #: The ``initialGapOpening`` attribute was added. - initialGapOpening: Optional[float] = None + initialGapOpening: float | None = None @abaqus_method_doc def __init__( @@ -202,14 +204,14 @@ def __init__( particleConversionThreshold: float = 0, particleConversionPPD: int = 1, particleConversionKernel: Literal[C.QUADRATIC, C.CUBIC, C.QUINTIC] = CUBIC, - maxDegradation: Optional[float] = None, + maxDegradation: float | None = None, viscosity: float = 0, linearBulkViscosity: float = 1, quadraticBulkViscosity: float = 1, numFourierModes: int = 1, - nodeOffset: Optional[int] = None, - linearKinematicCtrl: Optional[float] = None, - initialGapOpening: Optional[float] = None, + nodeOffset: int | None = None, + linearKinematicCtrl: float | None = None, + initialGapOpening: float | None = None, ): """This method creates an ElemType object. diff --git a/src/abaqus/Mesh/MeshAssembly.py b/src/abaqus/Mesh/MeshAssembly.py index f6da6566a8..5d97641198 100644 --- a/src/abaqus/Mesh/MeshAssembly.py +++ b/src/abaqus/Mesh/MeshAssembly.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -85,20 +87,20 @@ def createVirtualTopology( self, regions: Sequence[Face], mergeShortEdges: Boolean = False, - shortEdgeThreshold: Optional[float] = None, + shortEdgeThreshold: float | None = None, mergeSmallFaces: Boolean = False, - smallFaceAreaThreshold: Optional[float] = None, + smallFaceAreaThreshold: float | None = None, mergeSliverFaces: Boolean = False, - faceAspectRatioThreshold: Optional[float] = None, + faceAspectRatioThreshold: float | None = None, mergeSmallAngleFaces: Boolean = False, - smallFaceCornerAngleThreshold: Optional[float] = None, + smallFaceCornerAngleThreshold: float | None = None, mergeThinStairFaces: Boolean = False, - thinStairFaceThreshold: Optional[float] = None, + thinStairFaceThreshold: float | None = None, ignoreRedundantEntities: Boolean = False, cornerAngleTolerance: float = 30, applyBlendControls: Boolean = False, - blendSubtendedAngleTolerance: Optional[float] = None, - blendRadiusTolerance: Optional[float] = None, + blendSubtendedAngleTolerance: float | None = None, + blendRadiusTolerance: float | None = None, ): """This method creates a virtual topology feature by automatically merging faces and edges based on a set of geometric parameters. The edges and vertices that are being merged will be ignored during mesh @@ -255,7 +257,7 @@ def generateBottomUpExtrudedMesh( geometrySourceSide: str = "", elemFacesSourceSide: Sequence[MeshFace] = (), elemSourceSide: tuple = (), - depth: Optional[float] = None, + depth: float | None = None, targetSide: str = "", biasRatio: float = 1, extendElementSets: Boolean = False, @@ -311,8 +313,8 @@ def generateBottomUpSweptMesh( geometryConnectingSides: str = "", elemFacesConnectingSides: Sequence[MeshFace] = (), elemConnectingSides: tuple = (), - targetSide: Optional[Face] = None, - numberOfLayers: Optional[int] = None, + targetSide: Face | None = None, + numberOfLayers: int | None = None, extendElementSets: Boolean = False, ): """This method generates solid elements by sweeping a 2D mesh, either on an orphan mesh or within a cell @@ -835,8 +837,8 @@ def seedEdgeBySize( self, edges: Sequence[Edge], size: float, - deviationFactor: Optional[float] = None, - minSizeFactor: Optional[float] = None, + deviationFactor: float | None = None, + minSizeFactor: float | None = None, constraint: Literal[C.FREE] = FREE, ): """This method seeds the given edges either uniformly or following edge curvature distribution, based on @@ -869,8 +871,8 @@ def seedPartInstance( self, regions: Sequence[PartInstance], size: float, - deviationFactor: Optional[float] = None, - minSizeFactor: Optional[float] = None, + deviationFactor: float | None = None, + minSizeFactor: float | None = None, constraint: Literal[C.FREE] = FREE, ): """This method assigns global edge seeds to the given part instances. @@ -978,11 +980,11 @@ def setLogicalCorners(self, region: str, corners: str): def setMeshControls( self, regions: tuple, - elemShape: Optional[Literal[C.HEX_DOMINATED, C.WEDGE, C.TET, C.QUAD_DOMINATED, C.HEX, C.QUAD, C.TRI]] = None, - technique: Optional[Literal[C.BOTTOM_UP, C.STRUCTURED, C.FREE, C.SWEEP, C.SYSTEM_ASSIGN]] = None, - algorithm: Optional[Literal[C.NON_DEFAULT, C.MEDIAL_AXIS, C.ADVANCING_FRONT]] = None, + elemShape: Literal[C.HEX_DOMINATED, C.WEDGE, C.TET, C.QUAD_DOMINATED, C.HEX, C.QUAD, C.TRI] | None = None, + technique: Literal[C.BOTTOM_UP, C.STRUCTURED, C.FREE, C.SWEEP, C.SYSTEM_ASSIGN] | None = None, + algorithm: Literal[C.NON_DEFAULT, C.MEDIAL_AXIS, C.ADVANCING_FRONT] | None = None, minTransition: Boolean = ON, - sizeGrowth: Optional[Literal[C.MODERATE, C.MAXIMUM]] = None, + sizeGrowth: Literal[C.MODERATE, C.MAXIMUM] | None = None, allowMapped: Boolean = OFF, ): """This method sets the mesh control parameters for the specified regions. @@ -1089,8 +1091,8 @@ def verifyMeshQuality( C.ASPECT_RATIO, C.SMALL_ANGLE, ], - threshold: Optional[float] = None, - elemShape: Optional[Literal[C.LINE, C.WEDGE, C.TET, C.HEX, C.QUAD, C.TRI]] = None, + threshold: float | None = None, + elemShape: Literal[C.LINE, C.WEDGE, C.TET, C.HEX, C.QUAD, C.TRI] | None = None, regions: tuple = (), ): """This method tests the quality of part instance meshes and returns poor-quality elements. @@ -1158,7 +1160,7 @@ def verifyMeshQuality( Returns ------- - Dict[str, int | float | MeshElement] + dict[str, int | float | MeshElement] A Dictionary object containing values for some number of the following keys: failedElements, warningElements, naElements (sequences of MeshElement objects); numElements (Int); average, worst (Float); worstElement (MeshElement object) . diff --git a/src/abaqus/Mesh/MeshEdgeArray.py b/src/abaqus/Mesh/MeshEdgeArray.py index 7af04f7ad4..eed06dac0f 100644 --- a/src/abaqus/Mesh/MeshEdgeArray.py +++ b/src/abaqus/Mesh/MeshEdgeArray.py @@ -22,7 +22,7 @@ class MeshEdgeArray(List[MeshEdge]): """ @abaqus_method_doc - def __init__(self, elemEdges: List[MeshEdge]): + def __init__(self, elemEdges: list[MeshEdge]): """This method creates a MeshEdgeArray object. .. note:: @@ -65,7 +65,7 @@ def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> MeshEdgeArray: Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return MeshEdgeArray([MeshEdge()]) @abaqus_method_doc def getMask(self): @@ -76,4 +76,4 @@ def getMask(self): str A String specifying the object or objects. """ - ... + return "" diff --git a/src/abaqus/Mesh/MeshElement.py b/src/abaqus/Mesh/MeshElement.py index fee45fb98e..fe8cd243a4 100644 --- a/src/abaqus/Mesh/MeshElement.py +++ b/src/abaqus/Mesh/MeshElement.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional, Sequence, Tuple +from typing import TYPE_CHECKING, Sequence from typing_extensions import Literal @@ -53,10 +53,10 @@ class MeshElement: """ #: An Int specifying the element label. - label: Optional[int] = None + label: int | None = None #: A SymbolicConstant specifying the Abaqus element code. - type: Optional[SymbolicConstant] = None + type: SymbolicConstant #: A String specifying the name of the part instance that owns this element. instanceName: str = "" @@ -64,7 +64,7 @@ class MeshElement: #: A tuple of Ints specifying the internal node indices that define the nodal connectivity. #: It is important to note the difference with OdbMeshElement object of ODB where the #: connectivity is node labels instead of node indices. - connectivity: Tuple[int, ...] = () + connectivity: tuple[int, ...] = () @abaqus_method_doc def Element( @@ -84,7 +84,7 @@ def Element( C.HEX8, C.HEX20, ], - label: int = ..., + label: int = 0, ) -> MeshElement: """This method creates an element on an orphan mesh part from a sequence of nodes. @@ -108,40 +108,48 @@ def Element( element: MeshElement A MeshElement object. """ - ... + return MeshElement() @abaqus_method_doc - def getNodes(self) -> Tuple[MeshNode]: + def getNodes(self) -> tuple[MeshNode]: """This method returns a tuple of node objects of the element. Returns ------- - Tuple[MeshNode] + tuple[MeshNode] A tuple of MeshNode objects. """ - ... + return ( + MeshNode( + ( + 0.0, + 0.0, + 0.0, + ) + ), + ) @abaqus_method_doc - def getElemEdges(self) -> Tuple[MeshEdge]: + def getElemEdges(self) -> tuple[MeshEdge]: """This method returns a tuple of unique element edge objects on the element. Returns ------- - Tuple[MeshEdge] + tuple[MeshEdge] A tuple of MeshEdge objects. """ - ... + return (MeshEdge(),) @abaqus_method_doc - def getElemFaces(self) -> Tuple[MeshFace]: + def getElemFaces(self) -> tuple[MeshFace]: """This method returns a tuple of unique element face objects on the element. Returns ------- - Tuple[MeshFace] + tuple[MeshFace] A tuple of MeshFace objects. """ - ... + return (MeshFace(),) @abaqus_method_doc def getAdjacentElements(self) -> MeshElementArray: @@ -152,7 +160,7 @@ def getAdjacentElements(self) -> MeshElementArray: MeshElementArray A MeshElementArray object which is a sequence of MeshElement objects. """ - ... + return MeshElementArray([MeshElement()]) @abaqus_method_doc def getElementsByFeatureEdge(self, angle: float) -> MeshElementArray: @@ -169,10 +177,10 @@ def getElementsByFeatureEdge(self, angle: float) -> MeshElementArray: MeshElementArray A MeshElementArray object, which is a sequence of MeshElement objects. """ - ... + return MeshElementArray([MeshElement()]) @abaqus_method_doc - def setValues(self, label: Optional[int] = None) -> None: + def setValues(self, label: int | None = None) -> None: """This method modifies the MeshElement object. Parameters diff --git a/src/abaqus/Mesh/MeshElementArray.py b/src/abaqus/Mesh/MeshElementArray.py index 4788044e4d..739ce175ca 100644 --- a/src/abaqus/Mesh/MeshElementArray.py +++ b/src/abaqus/Mesh/MeshElementArray.py @@ -1,7 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Dict, List, Sequence, Tuple, Union +from typing import TYPE_CHECKING, List, Sequence, Union +from abaqus.BasicGeometry.Edge import Edge +from abaqus.BasicGeometry.Face import Face from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from .MeshElement import MeshElement @@ -46,7 +48,7 @@ class MeshElementArray(List[MeshElement]): """ @abaqus_method_doc - def __init__(self, elements: List[MeshElement]) -> None: + def __init__(self, elements: list[MeshElement]) -> None: """This method creates a MeshElementArray object. .. note:: @@ -80,7 +82,7 @@ def getFromLabel(self, label: int) -> MeshElement: MeshElement A MeshElement object. """ - ... + return MeshElement() @abaqus_method_doc def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> MeshElementArray: @@ -98,7 +100,7 @@ def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> MeshElementArr MeshElementArray A MeshElementArray object. """ - ... + return MeshElementArray([MeshElement()]) @abaqus_method_doc def getMask(self) -> str: @@ -109,17 +111,17 @@ def getMask(self) -> str: str A String specifying the object or objects. """ - ... + return "" @abaqus_method_doc def getByBoundingBox( self, - xMin: float = ..., - yMin: float = ..., - zMin: float = ..., - xMax: float = ..., - yMax: float = ..., - zMax: float = ..., + xMin: float = 0, + yMin: float = 0, + zMin: float = 0, + xMax: float = 0, + yMax: float = 0, + zMax: float = 0, ) -> MeshElementArray: """This method returns an array of element objects that lie within the specified bounding box. @@ -143,7 +145,7 @@ def getByBoundingBox( MeshElementArray A MeshElementArray object, which is a sequence of MeshElement objects. """ - ... + return MeshElementArray([MeshElement()]) @abaqus_method_doc def getByBoundingCylinder(self, center1: tuple, center2: tuple, radius: str) -> MeshElementArray: @@ -164,10 +166,10 @@ def getByBoundingCylinder(self, center1: tuple, center2: tuple, radius: str) -> MeshElementArray A MeshElementArray object, which is a sequence of MeshElement objects. """ - ... + return MeshElementArray([MeshElement()]) @abaqus_method_doc - def getByBoundingSphere(self, center: Tuple[float, float, float], radius: float) -> MeshElementArray: + def getByBoundingSphere(self, center: tuple[float, float, float], radius: float) -> MeshElementArray: """This method returns an array of element objects that lie within the specified bounding sphere. Parameters @@ -182,16 +184,16 @@ def getByBoundingSphere(self, center: Tuple[float, float, float], radius: float) MeshElementArray A MeshElementArray object, which is a sequence of MeshElement objects. """ - ... + return MeshElementArray([MeshElement()]) @abaqus_method_doc - def getBoundingBox(self) -> Dict[str, Tuple[float, float, float]]: + def getBoundingBox(self) -> dict[str, tuple[float, float, float]]: """This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the element sequence. Returns ------- - Dict[str, Tuple[float, float, float]] + dict[str, tuple[float, float, float]] A Dictionary object with the following items: - **low**: a tuple of three floats representing the minimum x, y, and z boundary values of @@ -199,7 +201,7 @@ def getBoundingBox(self) -> Dict[str, Tuple[float, float, float]]: - **high**: a tuple of three floats representing the maximum x, y, and z boundary values of the bounding box. """ - ... + return {"low": (0.0, 0.0, 0.0), "high": (0.0, 0.0, 0.0)} @abaqus_method_doc def sequenceFromLabels(self, labels: Sequence[int]) -> MeshElementArray: @@ -220,7 +222,7 @@ def sequenceFromLabels(self, labels: Sequence[int]) -> MeshElementArray: Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return MeshElementArray([MeshElement()]) @abaqus_method_doc def getExteriorEdges(self) -> EdgeArray: @@ -235,7 +237,7 @@ def getExteriorEdges(self) -> EdgeArray: EdgeArray An EdgeArray object specifying the exterior edges. """ - ... + return EdgeArray([Edge()]) @abaqus_method_doc def getExteriorFaces(self) -> FaceArray: @@ -250,4 +252,4 @@ def getExteriorFaces(self) -> FaceArray: FaceArray A FaceArray object representing the faces on the exterior of the cells. """ - ... + return FaceArray([Face()]) diff --git a/src/abaqus/Mesh/MeshFace.py b/src/abaqus/Mesh/MeshFace.py index 21692800db..8b37056c85 100644 --- a/src/abaqus/Mesh/MeshFace.py +++ b/src/abaqus/Mesh/MeshFace.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -22,10 +22,10 @@ class MeshFace: """ #: An Int specifying an Int specifying the element label. - label: Optional[int] = None + label: int | None = None #: An Int specifying a symbolic constant specifying the side of the element. - face: Optional[int] = None + face: int | None = None @abaqus_method_doc def getElemEdges(self): diff --git a/src/abaqus/Mesh/MeshFaceArray.py b/src/abaqus/Mesh/MeshFaceArray.py index 6ea3abfac2..c219af15ee 100644 --- a/src/abaqus/Mesh/MeshFaceArray.py +++ b/src/abaqus/Mesh/MeshFaceArray.py @@ -22,7 +22,7 @@ class MeshFaceArray(List[MeshFace]): """ @abaqus_method_doc - def __init__(self, elemFaces: List[MeshFace]): + def __init__(self, elemFaces: list[MeshFace]): """This method creates a MeshFaceArray object. .. note:: @@ -65,7 +65,7 @@ def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> MeshFaceArray: Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return MeshFaceArray([]) @abaqus_method_doc def getMask(self): diff --git a/src/abaqus/Mesh/MeshNode.py b/src/abaqus/Mesh/MeshNode.py index 4d67062e24..7775c0afc5 100644 --- a/src/abaqus/Mesh/MeshNode.py +++ b/src/abaqus/Mesh/MeshNode.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Optional, Tuple +from typing import TYPE_CHECKING from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -57,14 +57,14 @@ class MeshNode: instanceName: str = "" #: A tuple of three Floats specifying the coordinates of the new node. - coordinates: Tuple[float, float, float] + coordinates: tuple[float, float, float] @abaqus_method_doc def __init__( self, - coordinates: Tuple[float, float, float], - localCsys: Optional[DatumCsys] = None, - label: Optional[int] = None, + coordinates: tuple[float, float, float], + localCsys: DatumCsys | None = None, + label: int | None = None, ) -> None: """This method creates a node on an orphan mesh part. @@ -91,7 +91,7 @@ def __init__( ... @abaqus_method_doc - def getElemEdges(self) -> Tuple[MeshEdge, ...]: + def getElemEdges(self) -> tuple[MeshEdge, ...]: """This method returns a tuple of element edge objects that share the node. Returns @@ -99,10 +99,10 @@ def getElemEdges(self) -> Tuple[MeshEdge, ...]: edges: Sequence[MeshEdge] A tuple of MeshEdge objects """ - ... + return (MeshEdge(),) @abaqus_method_doc - def getElemFaces(self) -> Tuple[MeshFace, ...]: + def getElemFaces(self) -> tuple[MeshFace, ...]: """This method returns a tuple of element face objects that share the node. Returns @@ -110,10 +110,10 @@ def getElemFaces(self) -> Tuple[MeshFace, ...]: faces: Sequence[MeshFace] A tuple of MeshFace objects """ - ... + return (MeshFace(),) @abaqus_method_doc - def getElements(self) -> Tuple[MeshElement, ...]: + def getElements(self) -> tuple[MeshElement, ...]: """This method returns a tuple of element objects that share the node. Returns @@ -121,7 +121,7 @@ def getElements(self) -> Tuple[MeshElement, ...]: elements: Sequence[MeshElement] A tuple of MeshElement objects """ - ... + return (MeshElement(),) @abaqus_method_doc def getNodesByFeatureEdge(self, angle: float) -> MeshNodeArray: @@ -138,10 +138,10 @@ def getNodesByFeatureEdge(self, angle: float) -> MeshNodeArray: nodes: MeshNodeArray A MeshNodeArray object, which is a sequence of MeshNode objects """ - ... + return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))]) @abaqus_method_doc - def setValues(self, label: Optional[int] = None) -> None: + def setValues(self, label: int | None = None) -> None: """This method modifies the MeshNode object. Parameters diff --git a/src/abaqus/Mesh/MeshNodeArray.py b/src/abaqus/Mesh/MeshNodeArray.py index 994eb0326b..430ff55f94 100644 --- a/src/abaqus/Mesh/MeshNodeArray.py +++ b/src/abaqus/Mesh/MeshNodeArray.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Sequence, Tuple, Union +from typing import List, Sequence, Union from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -43,7 +43,7 @@ class MeshNodeArray(List[MeshNode]): """ @abaqus_method_doc - def __init__(self, nodes: List[MeshNode]) -> None: + def __init__(self, nodes: list[MeshNode]) -> None: """This method creates a MeshNodeArray object. .. note:: @@ -77,7 +77,7 @@ def getFromLabel(self, label: int) -> MeshNode: MeshNode A MeshNode object. """ - ... + return MeshNode((0.0, 0.0, 0.0)) @abaqus_method_doc def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> MeshNodeArray: @@ -95,7 +95,7 @@ def getSequenceFromMask(self, mask: Union[str, Sequence[str]]) -> MeshNodeArray: MeshNodeArray A MeshNodeArray object. """ - ... + return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))]) @abaqus_method_doc def getMask(self) -> str: @@ -106,17 +106,17 @@ def getMask(self) -> str: str A String specifying the object or objects. """ - ... + return "" @abaqus_method_doc def getByBoundingBox( self, - xMin: float = ..., - yMin: float = ..., - zMin: float = ..., - xMax: float = ..., - yMax: float = ..., - zMax: float = ..., + xMin: float = 0, + yMin: float = 0, + zMin: float = 0, + xMax: float = 0, + yMax: float = 0, + zMax: float = 0, ) -> MeshNodeArray: """This method returns an array of nodes that lie within the specified bounding box. @@ -140,13 +140,13 @@ def getByBoundingBox( MeshNodeArray A MeshNodeArray object, which is a sequence of MeshNode objects. """ - ... + return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))]) @abaqus_method_doc def getByBoundingCylinder( self, - center1: Tuple[float, float, float], - center2: Tuple[float, float, float], + center1: tuple[float, float, float], + center2: tuple[float, float, float], radius: float, ) -> MeshNodeArray: """This method returns an array of node objects that lie within the specified bounding cylinder. @@ -166,7 +166,7 @@ def getByBoundingCylinder( MeshNodeArray A MeshNodeArray object, which is a sequence of MeshNode objects. """ - ... + return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))]) @abaqus_method_doc def getByBoundingSphere(self, center: tuple, radius: str) -> MeshNodeArray: @@ -184,16 +184,16 @@ def getByBoundingSphere(self, center: tuple, radius: str) -> MeshNodeArray: MeshNodeArray A MeshNodeArray object, which is a sequence of MeshNode objects. """ - ... + return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))]) @abaqus_method_doc - def getBoundingBox(self) -> Dict[str, Tuple[float, float, float]]: + def getBoundingBox(self) -> dict[str, tuple[float, float, float]]: """This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the node sequence. Returns ------- - Dict[str, Tuple[float, float, float]] + dict[str, tuple[float, float, float]] A Dictionary object with the following items: - **low**: a tuple of three floats representing the minimum x, y and z boundary values of @@ -204,12 +204,12 @@ def getBoundingBox(self) -> Dict[str, Tuple[float, float, float]]: Raises ------ """ - ... + return {"low": (0.0, 0.0, 0.0), "high": (0.0, 0.0, 0.0)} @abaqus_method_doc def getClosest( - self, coordinates: str, numToFind: int = 1, searchTolerance: float = ... - ) -> Union[MeshNode, List[MeshNode]]: + self, coordinates: tuple, numToFind: int = 1, searchTolerance: float = 0.0 + ) -> Union[MeshNode, list[MeshNode]]: """This method returns the node or nodes closest to the given point or set of points. Parameters @@ -226,11 +226,11 @@ def getClosest( Returns ------- - MeshNode | List[MeshNode] + MeshNode | list[MeshNode] A MeshNode, or a list of MeshNode objects, or a list of lists of MeshNode objects, depending on the number of points given and the number of nodes requested. """ - ... + return MeshNode((0.0, 0.0, 0.0)) @abaqus_method_doc def sequenceFromLabels(self, labels: Sequence[int]) -> MeshNodeArray: @@ -251,4 +251,4 @@ def sequenceFromLabels(self, labels: Sequence[int]) -> MeshNodeArray: Error The mask results in an empty sequence, An exception occurs if the resulting sequence is empty. """ - ... + return MeshNodeArray([MeshNode((0.0, 0.0, 0.0))]) diff --git a/src/abaqus/Mesh/MeshPart.py b/src/abaqus/Mesh/MeshPart.py index eb0921b6c2..34e10a0f13 100644 --- a/src/abaqus/Mesh/MeshPart.py +++ b/src/abaqus/Mesh/MeshPart.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Sequence, Union +from typing import Sequence, Union from typing_extensions import Literal @@ -93,20 +93,20 @@ def createVirtualTopology( self, regions: Sequence[Face] = (), mergeShortEdges: Boolean = False, - shortEdgeThreshold: Optional[float] = None, + shortEdgeThreshold: float | None = None, mergeSmallFaces: Boolean = False, - smallFaceAreaThreshold: Optional[float] = None, + smallFaceAreaThreshold: float | None = None, mergeSliverFaces: Boolean = False, - faceAspectRatioThreshold: Optional[float] = None, + faceAspectRatioThreshold: float | None = None, mergeSmallAngleFaces: Boolean = False, - smallFaceCornerAngleThreshold: Optional[float] = None, + smallFaceCornerAngleThreshold: float | None = None, mergeThinStairFaces: Boolean = False, - thinStairFaceThreshold: Optional[float] = None, + thinStairFaceThreshold: float | None = None, ignoreRedundantEntities: Boolean = False, cornerAngleTolerance: float = 30, applyBlendControls: Boolean = False, - blendSubtendedAngleTolerance: Optional[float] = None, - blendRadiusTolerance: Optional[float] = None, + blendSubtendedAngleTolerance: float | None = None, + blendRadiusTolerance: float | None = None, ) -> Feature: """This method creates a virtual topology feature by automatically merging faces and edges based on a set of geometric parameters. The edges and vertices that are being merged will be ignored during mesh @@ -186,7 +186,7 @@ def createVirtualTopology( feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def deleteBoundaryLayerControls(self, regions: Sequence[Cell]): @@ -299,7 +299,7 @@ def generateBottomUpExtrudedMesh( geometrySourceSide: str = "", elemFacesSourceSide: Sequence[MeshFace] = (), elemSourceSide: tuple = (), - depth: Optional[float] = None, + depth: float | None = None, targetSide: str = "", biasRatio: float = 1, extendElementSets: Boolean = False, @@ -355,8 +355,8 @@ def generateBottomUpSweptMesh( geometryConnectingSides: str = "", elemFacesConnectingSides: Sequence[MeshFace] = (), elemConnectingSides: tuple = (), - targetSide: Optional[Face] = None, - numberOfLayers: Optional[int] = None, + targetSide: Face | None = None, + numberOfLayers: int | None = None, extendElementSets: Boolean = False, ): """This method generates solid elements by sweeping a 2D mesh, either on an orphan mesh or within a cell @@ -528,7 +528,7 @@ def getEdgeSeeds( A value of NONE indicates that the edge is not seeded. """ - ... + return 0.0 @abaqus_method_doc def getElementType( @@ -571,7 +571,7 @@ def getElementType( The region cannot be associated with element types or the **elemShape** is not consistent with the dimension of the **region**. """ - ... + return ElemType(C.C3D8R) @abaqus_method_doc def getIncompatibleMeshInterfaces(self, cells: Sequence[Cell] = ()) -> Sequence[Face]: @@ -587,7 +587,7 @@ def getIncompatibleMeshInterfaces(self, cells: Sequence[Cell] = ()) -> Sequence[ Sequence[Face] A sequence of Face objects. """ - ... + return (Face(),) @abaqus_method_doc def getMeshControl( @@ -655,7 +655,7 @@ def getMeshControl( TypeError The region cannot carry mesh controls. """ - ... + return False @abaqus_method_doc def getMeshStats(self, regions: Sequence[ConstrainedSketchGeometry]) -> MeshStats: @@ -671,7 +671,7 @@ def getMeshStats(self, regions: Sequence[ConstrainedSketchGeometry]) -> MeshStat MeshStats A MeshStats object. """ - ... + return MeshStats() @abaqus_method_doc def getPartSeeds( @@ -719,7 +719,7 @@ def getPartSeeds( Error Part does not contain native geometry, An exception occurs if the part does not contain native geometry. """ - ... + return 0.0 @abaqus_method_doc def getUnmeshedRegions(self) -> Union[Region, None]: @@ -731,7 +731,7 @@ def getUnmeshedRegions(self) -> Union[Region, None]: Region A Region object, or None. """ - ... + return Region() @abaqus_method_doc def ignoreEntity(self, entities: tuple) -> Feature: @@ -749,7 +749,7 @@ def ignoreEntity(self, entities: tuple) -> Feature: feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def restoreIgnoredEntity(self, entities: Sequence[IgnoredVertex]) -> Feature: @@ -766,7 +766,7 @@ def restoreIgnoredEntity(self, entities: Sequence[IgnoredVertex]) -> Feature: feature: Feature A Feature object """ - ... + return Feature() @abaqus_method_doc def seedEdgeByBias( @@ -776,10 +776,10 @@ def seedEdgeByBias( end2Edges: Sequence[Edge] = ..., centerEdges: Sequence[Edge] = ..., endEdges: Sequence[Edge] = ..., - ratio: float = ..., + ratio: float = 0, number: int = ..., - minSize: float = ..., - maxSize: float = ..., + minSize: float = 0, + maxSize: float = 0, constraint: Literal[C.FREE, C.FINER, C.FIXED] = ..., ): """This method seeds the given edges nonuniformly using the specified number of elements and bias ratio @@ -868,8 +868,8 @@ def seedEdgeBySize( self, edges: Sequence[Edge], size: float, - deviationFactor: Optional[float] = None, - minSizeFactor: Optional[float] = None, + deviationFactor: float | None = None, + minSizeFactor: float | None = None, constraint: Literal[C.FREE, C.FINER, C.FIXED] = ..., ): """This method seeds the given edges either uniformly or following edge curvature distribution, based on @@ -903,8 +903,8 @@ def seedEdgeBySize( def seedPart( self, size: float, - deviationFactor: Optional[float] = None, - minSizeFactor: Optional[float] = None, + deviationFactor: float | None = None, + minSizeFactor: float | None = None, constraint: Literal[C.FREE, C.FINER] = ..., ): """This method assigns global edge seeds to the given parts. @@ -1025,11 +1025,11 @@ def setLogicalCorners(self, region: str, corners: str): def setMeshControls( self, regions: tuple, - elemShape: Optional[Literal[C.HEX_DOMINATED, C.WEDGE, C.TET, C.QUAD_DOMINATED, C.HEX, C.QUAD, C.TRI]] = None, - technique: Optional[Literal[C.BOTTOM_UP, C.STRUCTURED, C.FREE, C.SWEEP, C.SYSTEM_ASSIGN]] = None, - algorithm: Optional[Literal[C.NON_DEFAULT, C.MEDIAL_AXIS, C.ADVANCING_FRONT]] = None, + elemShape: Literal[C.HEX_DOMINATED, C.WEDGE, C.TET, C.QUAD_DOMINATED, C.HEX, C.QUAD, C.TRI] | None = None, + technique: Literal[C.BOTTOM_UP, C.STRUCTURED, C.FREE, C.SWEEP, C.SYSTEM_ASSIGN] | None = None, + algorithm: Literal[C.NON_DEFAULT, C.MEDIAL_AXIS, C.ADVANCING_FRONT] | None = None, minTransition: Boolean = ON, - sizeGrowth: Optional[Literal[C.MODERATE, C.MAXIMUM]] = None, + sizeGrowth: Literal[C.MODERATE, C.MAXIMUM] | None = None, allowMapped: Boolean = OFF, ): """This method sets the mesh control parameters for the specified regions. @@ -1135,8 +1135,8 @@ def verifyMeshQuality( C.ASPECT_RATIO, C.SMALL_ANGLE, ], - threshold: Optional[float] = None, - elemShape: Optional[Literal[C.LINE, C.WEDGE, C.TET, C.HEX, C.QUAD, C.TRI]] = None, + threshold: float | None = None, + elemShape: Literal[C.LINE, C.WEDGE, C.TET, C.HEX, C.QUAD, C.TRI] | None = None, regions: tuple = (), ): """This method tests the mesh quality of a part and returns poor-quality elements. @@ -1204,7 +1204,7 @@ def verifyMeshQuality( Returns ------- - Dict[str, int | float, MeshElement] + dict[str, int | float, MeshElement] A Dictionary object containing values for some number of the following keys: failedElements, warningElements, naElements (sequences of MeshElement objects); numElements (Int); average, worst (Float); worstElement @@ -1216,8 +1216,8 @@ def verifyMeshQuality( def Node( self, coordinates: tuple, - localCsys: Optional[DatumCsys] = None, - label: Optional[int] = None, + localCsys: DatumCsys | None = None, + label: int | None = None, ): """This method creates a node on an orphan mesh part. diff --git a/src/abaqus/Mesh/MeshStats.py b/src/abaqus/Mesh/MeshStats.py index 07fe8d919b..e662a45727 100644 --- a/src/abaqus/Mesh/MeshStats.py +++ b/src/abaqus/Mesh/MeshStats.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -15,31 +15,31 @@ class MeshStats: """ #: An Int specifying the number of point elements. - numPointElems: Optional[int] = None + numPointElems: int | None = None #: An Int specifying the number of line elements. - numLineElems: Optional[int] = None + numLineElems: int | None = None #: An Int specifying the number of quadrilateral elements. - numQuadElems: Optional[int] = None + numQuadElems: int | None = None #: An Int specifying the number of triangular elements. - numTriElems: Optional[int] = None + numTriElems: int | None = None #: An Int specifying the number of hexahedral elements. - numHexElems: Optional[int] = None + numHexElems: int | None = None #: An Int specifying the number of wedge elements. - numWedgeElems: Optional[int] = None + numWedgeElems: int | None = None #: An Int specifying the number of tetrahedral elements. - numTetElems: Optional[int] = None + numTetElems: int | None = None #: An Int specifying the number of pyramid elements. - numPyramidElems: Optional[int] = None + numPyramidElems: int | None = None #: An Int specifying the number of nodes. - numNodes: Optional[int] = None + numNodes: int | None = None #: An Int specifying the number of regions that contain a mesh. - numMeshedRegions: Optional[int] = None + numMeshedRegions: int | None = None diff --git a/src/abaqus/Mesh/MesherOptions.py b/src/abaqus/Mesh/MesherOptions.py index 37cc837971..f4d8b983af 100644 --- a/src/abaqus/Mesh/MesherOptions.py +++ b/src/abaqus/Mesh/MesherOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -37,7 +37,7 @@ def setValues( quadAlgorithm: Literal[C.MEDIAL_AXIS, C.ADVANCING_FRONT] = ADVANCING_FRONT, allowMapped: Boolean = OFF, minTransition: Boolean = ON, - guiPreferredElements: Optional[SymbolicConstant] = None, + guiPreferredElements: SymbolicConstant | None = None, ): """This method modifies the MesherOptions object. diff --git a/src/abaqus/Messaging/DataObject.py b/src/abaqus/Messaging/DataObject.py index dd69c06bce..e0cedff749 100644 --- a/src/abaqus/Messaging/DataObject.py +++ b/src/abaqus/Messaging/DataObject.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,61 +16,61 @@ class DataObject: #: A SymbolicConstant specifying the phase of the analysis. Possible values are #: BATCHPRE_PHASE, PACKAGER_PHASE, STANDARD_PHASE, EXPLICIT_PHASE, CALCULATOR_PHASE, and #: UNKNOWN_PHASE. - phase: Optional[SymbolicConstant] = None + phase: SymbolicConstant #: An Int specifying the process ID of the analysis product. - processId: Optional[int] = None + processId: int | None = None #: An Int specifying the thread ID of the analysis product. Threads are used for parallel #: or multiprocessing; in most cases **threadId** is set to zero. - threadId: Optional[int] = None + threadId: int | None = None #: An Int specifying the time the message was sent in seconds since 00:00:00 UTC, January #: 1, 1970. - timeStamp: Optional[int] = None + timeStamp: int | None = None #: An Int specifying the number of attempts made to reach equilibrium during this step. - attempts: Optional[int] = None + attempts: int | None = None #: An Int specifying the degree of freedom requested for monitoring the output. - dof: Optional[int] = None + dof: int | None = None #: An Int specifying the number of equilibrium iterations made during this increment. - equilibrium: Optional[int] = None + equilibrium: int | None = None #: An Int specifying the increment of the analysis. - increment: Optional[int] = None + increment: int | None = None #: An Int specifying the number of iterations in the step. - iterations: Optional[int] = None + iterations: int | None = None #: An Int specifying the node number requested for monitoring output. - node: Optional[int] = None + node: int | None = None #: An Int specifying the number of severe discontinuity iterations completed during this #: increment. - severe: Optional[int] = None + severe: int | None = None #: An Int specifying the current step number. Step number 1 corresponds to the first step. - step: Optional[int] = None + step: int | None = None #: An Int specifying the ID of the step. - stepId: Optional[int] = None + stepId: int | None = None #: A Float specifying the step time corresponding to the current increment. - stepTime: Optional[float] = None + stepTime: float | None = None #: A Float specifying the total time corresponding to the monitor data. - time: Optional[float] = None + time: float | None = None #: A Float specifying the time increment used in the current step. - timeIncrement: Optional[float] = None + timeIncrement: float | None = None #: A Float specifying the total time completed in the analysis. - totalTime: Optional[float] = None + totalTime: float | None = None #: A Float specifying the current value of the degree of freedom requested for monitoring. - value: Optional[float] = None + value: float | None = None #: A String specifying the host name of the machine that is running the analysis. clientHost: str = "" diff --git a/src/abaqus/Model/KeywordBlock.py b/src/abaqus/Model/KeywordBlock.py index fe1dc02a83..8754755e17 100644 --- a/src/abaqus/Model/KeywordBlock.py +++ b/src/abaqus/Model/KeywordBlock.py @@ -1,4 +1,4 @@ -from typing import Optional, Tuple +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -25,7 +25,7 @@ class KeywordBlock: #: A Float specifying the value of the counter associated with the Mdb object at the most #: recent synchronization. - lastSynchCount: Optional[float] = None + lastSynchCount: float | None = None #: A tuple of Strings specifying a sequence of Strings that is identical to the information #: written to the Abaqus input file. Each String in the sequence represents an Abaqus input @@ -36,7 +36,7 @@ class KeywordBlock: #: synchVersions used the argument **storeNodesAndElements** = False, the entry for the #: keywords NODE and ELEMENT will contain only the keyword and its parameters, not the data #: lines. - sieBlocks: Tuple[str, ...] = () + sieBlocks: tuple[str, ...] = () @abaqus_method_doc def setValues(self, edited: Boolean = OFF): diff --git a/src/abaqus/Model/ModelBase.py b/src/abaqus/Model/ModelBase.py index 985d28e6da..487fad6970 100644 --- a/src/abaqus/Model/ModelBase.py +++ b/src/abaqus/Model/ModelBase.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -73,10 +73,10 @@ class ModelBase: name: str = "" #: None or a Float specifying the Stefan-Boltzmann constant. The default value is None. - stefanBoltzmann: Optional[float] = None + stefanBoltzmann: float | None = None #: None or a Float specifying the absolute zero constant. The default value is None. - absoluteZero: Optional[float] = None + absoluteZero: float | None = None #: A SymbolicConstant specifying the type of incident wave formulation to be used in #: acoustic problems. Possible values are NOT_SET, SCATTERED, and TOTAL. The default value @@ -84,7 +84,7 @@ class ModelBase: waveFormulation: SymbolicConstant = NOT_SET #: None or a Float specifying the universal gas constant. The default value is None. - universalGas: Optional[float] = None + universalGas: float | None = None #: A Boolean specifying whether an input file should be written without parts and #: assemblies. The default value is OFF. @@ -92,7 +92,7 @@ class ModelBase: #: An Int specifying the increment, interval, iteration or cycle where the restart analysis #: will start. To select the end of the step use the SymbolicConstant STEP_END. - restartIncrement: Optional[SymbolicConstant] = None + restartIncrement: int | SymbolicConstant #: A Boolean specifying that the step specified by **restartStep** should be terminated at #: the increment specified by **restartIncrement**. @@ -102,7 +102,7 @@ class ModelBase: shellToSolid: Boolean = OFF #: A Float specifying the time stamp that indicates when the model was last changed. - lastChangedCount: Optional[float] = None + lastChangedCount: float | None = None #: A String specifying the purpose and contents of the Model object. The default value is #: an empty string. @@ -136,40 +136,40 @@ class ModelBase: rootAssembly: Assembly = Assembly() #: A repository of Amplitude objects. - amplitudes: Dict[str, Amplitude] = {} + amplitudes: dict[str, Amplitude] = {} #: A repository of Profile objects. - profiles: Dict[str, Profile] = {} + profiles: dict[str, Profile] = {} #: A repository of BoundaryCondition objects. - boundaryConditions: Dict[str, BoundaryCondition] = {} + boundaryConditions: dict[str, BoundaryCondition] = {} #: A repository of ConstrainedSketchConstraint objects. - constraints: Dict[str, Constraint] = {} + constraints: dict[str, Constraint] = {} #: A repository of AnalyticalField objects. - analyticalFields: Dict[str, AnalyticalField] = {} + analyticalFields: dict[str, AnalyticalField] = {} #: A repository of DiscreteField objects. - discreteFields: Dict[str, DiscreteField] = {} + discreteFields: dict[str, DiscreteField] = {} #: A repository of PredefinedField objects. - predefinedFields: Dict[str, PredefinedField] = {} + predefinedFields: dict[str, PredefinedField] = {} #: A repository of Interaction objects. - interactions: Dict[str, Interaction] = {} + interactions: dict[str, Interaction] = {} #: A repository of InteractionProperty objects. - interactionProperties: Dict[str, ContactProperty] = {} + interactionProperties: dict[str, ContactProperty] = {} #: A repository of ContactControl objects. - contactControls: Dict[str, ContactControl] = {} + contactControls: dict[str, ContactControl] = {} #: A repository of ContactInitialization objects. - contactInitializations: Dict[str, ContactInitialization] = {} + contactInitializations: dict[str, ContactInitialization] = {} #: A repository of ContactStabilization objects. - contactStabilizations: Dict[str, ContactStabilization] = {} + contactStabilizations: dict[str, ContactStabilization] = {} #: A tuple of tuples of Strings specifying the linked child PartInstance name in the #: current model to the corresponding parent PartInstance name in a different model. @@ -180,84 +180,84 @@ class ModelBase: linkedParts: tuple = () #: A repository of Load objects. - loads: Dict[str, Load] = {} + loads: dict[str, Load] = {} #: A repository of Material objects. - materials: Dict[str, Material] = {} + materials: dict[str, Material] = {} #: A repository of Calibration objects. - calibrations: Dict[str, Calibration] = {} + calibrations: dict[str, Calibration] = {} #: A repository of Section objects. - sections: Dict[str, Section] = {} + sections: dict[str, Section] = {} #: A repository of RemeshingRule objects. - remeshingRules: Dict[str, RemeshingRule] = {} + remeshingRules: dict[str, RemeshingRule] = {} #: A repository of ConstrainedSketch objects. - sketches: Dict[str, ConstrainedSketch] = {} + sketches: dict[str, ConstrainedSketch] = {} #: A repository of Part objects. - parts: Dict[str, Part] = {} + parts: dict[str, Part] = {} #: A repository of Step objects. - steps: Dict[str, Step] = {} + steps: dict[str, Step] = {} #: A FeatureOptions object. featureOptions: FeatureOptions = FeatureOptions() #: A repository of AdaptiveMeshConstraint objects. - adaptiveMeshConstraints: Dict[str, AdaptiveMeshConstraint] = {} + adaptiveMeshConstraints: dict[str, AdaptiveMeshConstraint] = {} #: A repository of AdaptiveMeshControl objects. - adaptiveMeshControls: Dict[str, AdaptiveMeshControl] = {} + adaptiveMeshControls: dict[str, AdaptiveMeshControl] = {} #: A repository of TimePoint objects. - timePoints: Dict[str, TimePoint] = {} + timePoints: dict[str, TimePoint] = {} #: A repository of Filter objects. - filters: Dict[str, Filter] = {} + filters: dict[str, Filter] = {} #: A repository of IntegratedOutputSection objects. - integratedOutputSections: Dict[str, IntegratedOutputSection] = {} + integratedOutputSections: dict[str, IntegratedOutputSection] = {} #: A repository of FieldOutputRequest objects. - fieldOutputRequests: Dict[str, FieldOutputRequest] = {} + fieldOutputRequests: dict[str, FieldOutputRequest] = {} #: A repository of HistoryOutputRequest objects. - historyOutputRequests: Dict[str, HistoryOutputRequest] = {} + historyOutputRequests: dict[str, HistoryOutputRequest] = {} #: A repository of OptimizationTask objects. - optimizationTasks: Dict[str, OptimizationTask] = {} + optimizationTasks: dict[str, OptimizationTask] = {} #: A repository of TableCollection objects. #: #: .. versionadded:: 2020 #: The ``tableCollections`` attribute was added. - tableCollections: Dict[str, TableCollection] = {} + tableCollections: dict[str, TableCollection] = {} #: A repository of EventSeriesType objects. #: #: .. versionadded:: 2020 #: The ``eventSeriesTypes`` attribute was added. - eventSeriesTypes: Dict[str, EventSeriesType] = {} + eventSeriesTypes: dict[str, EventSeriesType] = {} #: A repository of EventSeriesData objects. #: #: .. versionadded:: 2020 #: The ``eventSeriesDatas`` attribute was added. - eventSeriesDatas: Dict[str, EventSeriesData] = {} + eventSeriesDatas: dict[str, EventSeriesData] = {} @abaqus_method_doc def __init__( self, name: str, description: str = "", - stefanBoltzmann: Optional[float] = None, - absoluteZero: Optional[float] = None, + stefanBoltzmann: float | None = None, + absoluteZero: float | None = None, waveFormulation: Literal[C.SCATTERED, C.NOT_SET, C.TOTAL] = NOT_SET, modelType: Literal[C.STANDARD_EXPLICIT, C.ELECTROMAGNETIC] = STANDARD_EXPLICIT, - universalGas: Optional[float] = None, + universalGas: float | None = None, copyConstraints: Boolean = ON, copyConnectors: Boolean = ON, copyInteractions: Boolean = ON, @@ -449,13 +449,13 @@ def setValues( self, description: str = "", noPartsInputFile: Boolean = OFF, - absoluteZero: Optional[float] = None, - stefanBoltzmann: Optional[float] = None, + absoluteZero: float | None = None, + stefanBoltzmann: float | None = None, waveFormulation: Literal[C.SCATTERED, C.NOT_SET, C.TOTAL] = NOT_SET, - universalGas: Optional[float] = None, + universalGas: float | None = None, restartJob: str = "", restartStep: str = "", - restartIncrement: Optional[Literal[C.STEP_END]] = None, + restartIncrement: Literal[C.STEP_END] | None = None, endRestartStep: Boolean = OFF, globalJob: str = "", shellToSolid: Boolean = OFF, diff --git a/src/abaqus/Odb/AnalyticSurface.py b/src/abaqus/Odb/AnalyticSurface.py index 0c1ebd0720..0f446545b4 100644 --- a/src/abaqus/Odb/AnalyticSurface.py +++ b/src/abaqus/Odb/AnalyticSurface.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,7 +25,7 @@ class AnalyticSurface: #: A SymbolicConstant specifying the type of AnalyticSurface object. Possible values are #: SEGMENTS, CYLINDER, and REVOLUTION. - type: Optional[SymbolicConstant] = None + type: SymbolicConstant #: A Float specifying radius of curvature to smooth discontinuities between adjoining #: segments. The default value is 0.0. @@ -37,4 +37,4 @@ class AnalyticSurface: #: A tuple of tuples of Floats specifying the global coordinates of points representing the #: local coordinate system, if used. - localCoordData: Optional[float] = None + localCoordData: float | None = None diff --git a/src/abaqus/Odb/BeamOrientation.py b/src/abaqus/Odb/BeamOrientation.py index be635e99bb..79fa00ad1c 100644 --- a/src/abaqus/Odb/BeamOrientation.py +++ b/src/abaqus/Odb/BeamOrientation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -22,11 +22,11 @@ class BeamOrientation: #: A SymbolicConstant specifying the orientation assignment method. Possible values are #: N1_COSINES, CSYS, and VECT. - method: Optional[SymbolicConstant] = None + method: SymbolicConstant #: An OdbSet object specifying a region for which the beam orientation is defined. region: OdbSet = OdbSet("set", ()) #: A tuple of Floats specifying direction cosines of the n1-direction of the beam #: cross-section. - vector: Optional[float] = None + vector: float | None = None diff --git a/src/abaqus/Odb/BeamOrientationArray.py b/src/abaqus/Odb/BeamOrientationArray.py index 7cc1928c2d..7c72162e3c 100644 --- a/src/abaqus/Odb/BeamOrientationArray.py +++ b/src/abaqus/Odb/BeamOrientationArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .BeamOrientation import BeamOrientation diff --git a/src/abaqus/Odb/FieldBulkData.py b/src/abaqus/Odb/FieldBulkData.py index b4acf96438..46f08c9b9d 100644 --- a/src/abaqus/Odb/FieldBulkData.py +++ b/src/abaqus/Odb/FieldBulkData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -30,18 +30,18 @@ class FieldBulkData: #: - ELEMENT_FACE. #: - CENTROID, specifying the value at the centroid obtained by extrapolating results #: calculated at the integration points. - position: Optional[SymbolicConstant] = None + position: SymbolicConstant #: A SymbolicConstant specifying the output type. Possible values are SCALAR, VECTOR, #: TENSOR_3D_FULL, TENSOR_3D_PLANAR, TENSOR_3D_SURFACE, TENSOR_2D_PLANAR, and #: TENSOR_2D_SURFACE. - type: Optional[SymbolicConstant] = None + type: SymbolicConstant #: An OdbInstance object specifying the part to which the labels belong. instance: OdbInstance = OdbInstance("instance", OdbPart("part", THREE_D, DEFORMABLE_BODY)) #: A SectionPoint object specifying the section point number of the current block of data. - sectionPoint: Optional[SectionPoint] = None + sectionPoint: SectionPoint | None = None #: A sequence of Ints specifying the element labels of the elements in the block. #: **elementLabels** is valid only if **position** = INTEGRATION_POINT, CENTROID, ELEMENT_NODAL, @@ -86,4 +86,4 @@ class FieldBulkData: #: outputs the quaternion form is q=(q0,q)q=(q0,q), which represents the rotation from #: local to global. If the underlying data are in double precision, an exception will be #: thrown. - localCoordSystem: Optional[float] = None + localCoordSystem: float | None = None diff --git a/src/abaqus/Odb/FieldLocation.py b/src/abaqus/Odb/FieldLocation.py index 47dda7f904..f1712cc9a1 100644 --- a/src/abaqus/Odb/FieldLocation.py +++ b/src/abaqus/Odb/FieldLocation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,7 +26,7 @@ class FieldLocation: #: obtained by extrapolating results calculated at the integration #: points.ELEMENT_FACE.CENTROID, specifying the value at the centroid obtained by #: extrapolating results calculated at the integration points. - position: Optional[SymbolicConstant] = None + position: SymbolicConstant #: A SectionPointArray object. sectionPoints: SectionPointArray = [] diff --git a/src/abaqus/Odb/FieldLocationArray.py b/src/abaqus/Odb/FieldLocationArray.py index a5cada655c..05d954c61b 100644 --- a/src/abaqus/Odb/FieldLocationArray.py +++ b/src/abaqus/Odb/FieldLocationArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .FieldLocation import FieldLocation diff --git a/src/abaqus/Odb/FieldOutput.py b/src/abaqus/Odb/FieldOutput.py index 98d5029160..7138be54fd 100644 --- a/src/abaqus/Odb/FieldOutput.py +++ b/src/abaqus/Odb/FieldOutput.py @@ -1,4 +1,6 @@ -from typing import Optional, overload +from __future__ import annotations + +from typing import Sequence, overload from typing_extensions import Literal @@ -10,6 +12,8 @@ from .FieldLocationArray import FieldLocationArray from .FieldValueArray import FieldValueArray from .OdbInstance import OdbInstance +from .OdbMeshElement import OdbMeshElement +from .OdbMeshNode import OdbMeshNode from .OdbSet import OdbSet from .SectionPoint import SectionPoint @@ -27,10 +31,10 @@ class FieldOutput: #: An Int specifying the dimension of vector or the first dimension (number of rows) of #: matrix. - dim: Optional[int] = None + dim: int | None = None #: An Int specifying the second dimension (number of columns) of matrix. - dim2: Optional[int] = None + dim2: int | None = None #: A Boolean specifying whether the data are complex. isComplex: Boolean = OFF @@ -41,7 +45,7 @@ class FieldOutput: #: A FieldValueArray object specifying the order of the objects in the array is determined #: by the Abaqus Scripting Interface; see the **data** argument to the addData method for a #: description of the order. - values: Optional[FieldValueArray] = None + values: FieldValueArray | None = None #: A String specifying the output variable name. name: str @@ -67,7 +71,7 @@ class FieldOutput: #: Possible values #: are:MAGNITUDEMISESTRESCAPRESSINV3MAX_PRINCIPALMID_PRINCIPALMIN_PRINCIPALMAX_INPLANE_PRINCIPALMIN_INPLANE_PRINCIPALOUTOFPLANE_PRINCIPALThe #: default value is an empty sequence. - validInvariants: Optional[SymbolicConstant] = None + validInvariants: SymbolicConstant #: A Boolean specifying whether the field is an engineering tensor or not. Setting #: isEngineeringTensor to true makes a tensor field behave as a strain like quantity where @@ -75,6 +79,7 @@ class FieldOutput: #: parameter applies only to tensor field outputs. The default value is OFF. isEngineeringTensor: Boolean = OFF + @overload @abaqus_method_doc def __init__( self, @@ -82,7 +87,7 @@ def __init__( description: str, type: SymbolicConstant, componentLabels: tuple = (), - validInvariants: Optional[SymbolicConstant] = None, + validInvariants: SymbolicConstant | None = None, isEngineeringTensor: Boolean = OFF, ): """This method creates a FieldOutput object. @@ -128,6 +133,7 @@ def __init__( """ ... + @overload @abaqus_method_doc def __init__(self, field: "FieldOutput", name: str = "", description: str = ""): """This method creates a FieldOutput object from an existing FieldOutput object of the same output @@ -166,7 +172,7 @@ def addData( instance: OdbInstance, labels: tuple, data: tuple, - sectionPoint: Optional[SectionPoint] = None, + sectionPoint: SectionPoint | None = None, localCoordSystem: tuple = (), ): """This method adds data to a FieldOutput object. @@ -253,8 +259,8 @@ def addData( position: SymbolicConstant, set: OdbSet, data: tuple, - sectionPoint: Optional[SectionPoint] = None, - conjugateData: Optional[float] = None, + sectionPoint: SectionPoint | None = None, + conjugateData: float | None = None, ): """This method adds data to a FieldOutput object. @@ -356,7 +362,8 @@ def getScalarField(self, *args, **kwargs): ... @overload - def getSubset(self, position: Optional[SymbolicConstant] = None, readOnly: Boolean = OFF): + @abaqus_method_doc + def getSubset(self, position: SymbolicConstant, readOnly: Boolean = OFF) -> "FieldOutput": """A FieldOutput object with a subset of the field values. Parameters @@ -391,7 +398,7 @@ def getSubset(self, position: Optional[SymbolicConstant] = None, readOnly: Boole @overload @abaqus_method_doc - def getSubset(self, region: str = ""): + def getSubset(self, region: OdbSet) -> "FieldOutput": """A FieldOutput object with a subset of the field values. Parameters @@ -409,7 +416,7 @@ def getSubset(self, region: str = ""): @overload @abaqus_method_doc - def getSubset(self, localCoordSystem: tuple = ()): + def getSubset(self, localCoordSystem: Sequence[Sequence[float]]) -> "FieldOutput": """A FieldOutput object with a subset of the field values. Parameters @@ -427,7 +434,7 @@ def getSubset(self, localCoordSystem: tuple = ()): @overload @abaqus_method_doc - def getSubset(self, sectionPoint: Optional[SectionPoint] = None): + def getSubset(self, sectionPoint: SectionPoint) -> "FieldOutput": """A FieldOutput object with a subset of the field values. Parameters @@ -444,7 +451,7 @@ def getSubset(self, sectionPoint: Optional[SectionPoint] = None): @overload @abaqus_method_doc - def getSubset(self, location: FieldLocation = FieldLocation()): + def getSubset(self, location: FieldLocation) -> "FieldOutput": """A FieldOutput object with a subset of the field values. Parameters @@ -461,7 +468,7 @@ def getSubset(self, location: FieldLocation = FieldLocation()): @overload @abaqus_method_doc - def getSubset(self, region: str = ""): + def getSubset(self, region: OdbMeshElement) -> "FieldOutput": """A FieldOutput object with a subset of the field values. Parameters @@ -478,7 +485,7 @@ def getSubset(self, region: str = ""): @overload @abaqus_method_doc - def getSubset(self, region: str = ""): + def getSubset(self, region: OdbMeshNode) -> "FieldOutput": """A FieldOutput object with a subset of the field values. Parameters @@ -495,7 +502,7 @@ def getSubset(self, region: str = ""): @overload @abaqus_method_doc - def getSubset(self, region: str = ""): + def getSubset(self, region: "FieldOutput") -> "FieldOutput": """A FieldOutput object with a subset of the field values. Parameters @@ -512,7 +519,7 @@ def getSubset(self, region: str = ""): @overload @abaqus_method_doc - def getSubset(self, elementType: str = ""): + def getSubset(self, elementType: str) -> "FieldOutput": """A FieldOutput object with a subset of the field values. Parameters @@ -529,11 +536,11 @@ def getSubset(self, elementType: str = ""): ... @abaqus_method_doc - def getSubset(self, *args, **kwargs): - ... + def getSubset(self, *args, **kwargs) -> "FieldOutput": + return FieldOutput("", "", C.SCALAR) @overload - def getTransformedField(self, datumCsys: str, projected22Axis: Optional[int] = None, projectionTol: str = ""): + def getTransformedField(self, datumCsys: str, projected22Axis: int | None = None, projectionTol: str = ""): """This method generates a new vector or tensor field containing the transformed component values of the parent field. The new field will hold values for the same nodes or elements as the parent field. Results will be transformed based on the orientations specified by the input DatumCsys object. Abaqus will @@ -573,8 +580,8 @@ def getTransformedField(self, datumCsys: str, projected22Axis: Optional[int] = N def getTransformedField( self, datumCsys: str, - deformationField: Optional["FieldOutput"] = None, - projected22Axis: Optional[int] = None, + deformationField: "FieldOutput" | None = None, + projected22Axis: int | None = None, projectionTol: str = "", ): """This method generates a new vector or tensor field containing the transformed component values of the @@ -619,9 +626,9 @@ def getTransformedField( def getTransformedField( self, datumCsys: str, - deformationField: Optional["FieldOutput"] = None, - rotationField: Optional["FieldOutput"] = None, - projected22Axis: Optional[int] = None, + deformationField: "FieldOutput" | None = None, + rotationField: "FieldOutput" | None = None, + projected22Axis: int | None = None, projectionTol: str = "", ): """This method generates a new vector or tensor field containing the transformed component values of the @@ -669,7 +676,7 @@ def getTransformedField( def getTransformedField(self, *args, **kwargs): ... - def getConnectorFieldXformedToNodeA(self, deformationField: Optional["FieldOutput"] = None): + def getConnectorFieldXformedToNodeA(self, deformationField: "FieldOutput" | None = None): """This method generates a new vector field containing the transformed component values of the parent connector field to the node A coordinate system. The new field will hold values for the same connector elements as the parent field. Some connection types such as Axial, Link, Slip Ring, and Radial Thrust diff --git a/src/abaqus/Odb/FieldValue.py b/src/abaqus/Odb/FieldValue.py index ebfad0a09f..fd75343427 100644 --- a/src/abaqus/Odb/FieldValue.py +++ b/src/abaqus/Odb/FieldValue.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -32,96 +32,96 @@ class FieldValue: #: radiation that are defined for the surface facets of an element. #: - CENTROID, specifying the value at the centroid obtained by extrapolating results #: calculated at the integration points. - position: Optional[SymbolicConstant] = None + position: SymbolicConstant #: A SymbolicConstant specifying the precision of the output in the element. Possible #: values are: #: #: - SINGLE_PRECISION, specifying that the output values are in single precision. #: - DOUBLE_PRECISION, specifying that the output values are in double precision. - precision: Optional[SymbolicConstant] = None + precision: SymbolicConstant #: An Int specifying the element label of the element containing the location. #: **elementLabel** is available only if **position** = INTEGRATION_POINT, CENTROID, #: ELEMENT_NODAL, or ELEMENT_FACE. - elementLabel: Optional[int] = None + elementLabel: int | None = None #: An Int specifying the node label of the node containing the location. **nodelabel** is #: available only if **position** = ELEMENT_NODAL or NODAL. - nodeLabel: Optional[int] = None + nodeLabel: int | None = None #: An Int specifying the integration point in the element. **integrationPoint** is available #: only if **position** = INTEGRATION_POINT. - integrationPoint: Optional[int] = None + integrationPoint: int | None = None #: A SymbolicConstant specifying the face of the element. **face** is available only if #: **position** = ELEMENT_FACE. - face: Optional[SymbolicConstant] = None + face: SymbolicConstant #: A SymbolicConstant specifying the output type. Possible values are SCALAR, VECTOR, #: TENSOR_3D_FULL, TENSOR_3D_PLANAR, TENSOR_3D_SURFACE, TENSOR_2D_PLANAR, and #: TENSOR_2D_SURFACE. - type: Optional[SymbolicConstant] = None + type: SymbolicConstant #: A Float specifying the length or magnitude of the vector. **magnitude** is valid only when #: **type** = VECTOR. - magnitude: Optional[float] = None + magnitude: float | None = None #: A Float specifying the calculated von Mises stress. The value is valid only when the #: **validInvariants** member includes MISES; otherwise, the value is indeterminate. #: Conjugate data will be ignored in invariant calculation. - mises: Optional[float] = None + mises: float | None = None #: A Float specifying the calculated Tresca stress. The value is valid only when the #: **validInvariants** member includes TRESCA; otherwise, the value is indeterminate. #: Conjugate data will be ignored in invariant calculation. - tresca: Optional[float] = None + tresca: float | None = None #: A Float specifying the calculated pressure stress. The value is valid only when the #: **validInvariants** member includes PRESS; otherwise, the value is indeterminate. #: Conjugate data will be ignored in invariant calculation. - press: Optional[float] = None + press: float | None = None #: A Float specifying the calculated third stress invariant. The value is valid only when #: the **validInvariants** member includes INV3; otherwise, the value is indeterminate. #: Conjugate data will be ignored in invariant calculation. - inv3: Optional[float] = None + inv3: float | None = None #: A Float specifying the calculated maximum principal stress. The value is valid only when #: the **validInvariants** member includes MAX_PRINCIPAL; otherwise, the value is #: indeterminate. Conjugate data will be ignored in invariant calculation. - maxPrincipal: Optional[float] = None + maxPrincipal: float | None = None #: A Float specifying the calculated intermediate principal stress. The value is valid only #: when the **validInvariants** member includes MID_PRINCIPAL; otherwise, the value is #: indeterminate. Conjugate data will be ignored in invariant calculation. - midPrincipal: Optional[float] = None + midPrincipal: float | None = None #: A Float specifying the minimum principal stress. The value is valid only when the #: **validInvariants** member includes MIN_PRINCIPAL; otherwise, the value is indeterminate. #: Conjugate data will be ignored in invariant calculation. - minPrincipal: Optional[float] = None + minPrincipal: float | None = None #: A Float specifying the maximum principal in-plane stress. The value is valid only when #: the **validInvariants** member includes MAX_INPLANE_PRINCIPAL; otherwise, the value is #: indeterminate. Conjugate data will be ignored in invariant calculation. - maxInPlanePrincipal: Optional[float] = None + maxInPlanePrincipal: float | None = None #: A Float specifying the calculated minimum principal in-plane stress. The value is valid #: only when the **validInvariants** member includes MIN_INPLANE_PRINCIPAL; otherwise, the #: value is indeterminate. Conjugate data will be ignored in invariant calculation. - minInPlanePrincipal: Optional[float] = None + minInPlanePrincipal: float | None = None #: A Float specifying the calculated principal out-of-plane stress. The value is valid only #: when the **validInvariants** member includes OUTOFPLANE_PRINCIPAL; otherwise, the value is #: indeterminate. Conjugate data will be ignored in invariant calculation. - outOfPlanePrincipal: Optional[float] = None + outOfPlanePrincipal: float | None = None #: An OdbInstance object specifying the part to which the labels belong. instance: OdbInstance = OdbInstance("instance", OdbPart("part", THREE_D, DEFORMABLE_BODY)) #: A SectionPoint object. - sectionPoint: Optional[SectionPoint] = None + sectionPoint: SectionPoint | None = None #: A tuple of tuples of Floats specifying the 3 x 3 matrix of Floats specifying the #: direction cosines of the local coordinate system (the rotation from global to local). diff --git a/src/abaqus/Odb/FieldValueArray.py b/src/abaqus/Odb/FieldValueArray.py index a10cb54feb..1b08e895fb 100644 --- a/src/abaqus/Odb/FieldValueArray.py +++ b/src/abaqus/Odb/FieldValueArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .FieldValue import FieldValue diff --git a/src/abaqus/Odb/HistoryOutput.py b/src/abaqus/Odb/HistoryOutput.py index 4946177b4a..16af89a4f3 100644 --- a/src/abaqus/Odb/HistoryOutput.py +++ b/src/abaqus/Odb/HistoryOutput.py @@ -1,4 +1,6 @@ -from typing import Optional, overload +from __future__ import annotations + +from typing import overload from typing_extensions import Literal @@ -22,12 +24,12 @@ class HistoryOutput: #: A tuple of pairs of Floats specifying the pairs (*frameValue*, **value**) where #: **frameValue** is either time, frequency, or mode and **value** is the value of the #: specified variable at **frameValue**. (This value depends on the type of the variable.) - data: Optional[float] = None + data: float | None = None #: A tuple of pairs of Floats specifying the imaginary portion of a specified complex #: variable at each frame value (time, frequency, or mode). The pairs have the form #: (*frameValue*, **value**). - conjugateData: Optional[float] = None + conjugateData: float | None = None #: A String specifying the output variable name. name: str @@ -41,7 +43,7 @@ class HistoryOutput: #: A sequence of SymbolicConstants specifying which invariants should be calculated for #: this field. Possible values are MAGNITUDE, MISES, TRESCA, PRESS, INV3, MAX_PRINCIPAL, #: MID_PRINCIPAL, and MIN_PRINCIPAL. The default value is an empty sequence. - validInvariants: Optional[SymbolicConstant] = None + validInvariants: SymbolicConstant @abaqus_method_doc def __init__( @@ -49,9 +51,10 @@ def __init__( name: str, description: str, type: Literal[C.SCALAR], - validInvariants: Optional[ - Literal[C.MISES, C.MAX_PRINCIPAL, C.MIN_PRINCIPAL, C.MID_PRINCIPAL, C.MAGNITUDE, C.TRESCA, C.INV3, C.PRESS] - ] = None, + validInvariants: Literal[ + C.MISES, C.MAX_PRINCIPAL, C.MIN_PRINCIPAL, C.MID_PRINCIPAL, C.MAGNITUDE, C.TRESCA, C.INV3, C.PRESS + ] + | None = None, ) -> None: """This method creates a HistoryOutput object. diff --git a/src/abaqus/Odb/HistoryPoint.py b/src/abaqus/Odb/HistoryPoint.py index 1cb2848f31..eb7693422b 100644 --- a/src/abaqus/Odb/HistoryPoint.py +++ b/src/abaqus/Odb/HistoryPoint.py @@ -1,4 +1,6 @@ -from typing import Optional +from __future__ import annotations + +from typing import overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -70,13 +72,13 @@ class HistoryPoint: #: - WHOLE_REGION, specifying the results for an entire region of the model. #: - WHOLE_PART_INSTANCE, specifying the results for an entire part instance of the model. #: - WHOLE_MODEL, specifying the results for the entire model. - position: Optional[SymbolicConstant] = None + position: SymbolicConstant #: An OdbMeshElement object specifying the element for which the data are to be collected. element: OdbMeshElement = OdbMeshElement() #: A SectionPoint object. - sectionPoint: Optional[SectionPoint] = None + sectionPoint: SectionPoint #: An OdbSet object specifying the region for which the data are to be collected. region: OdbSet = OdbSet("set", ()) @@ -90,6 +92,7 @@ class HistoryPoint: #: An OdbMeshNode object specifying the node for which the data are to be collected. node: OdbMeshNode + @overload @abaqus_method_doc def __init__(self, node: OdbMeshNode): """This method creates a HistoryPoint object for a node. @@ -111,14 +114,15 @@ def __init__(self, node: OdbMeshNode): """ ... + @overload @abaqus_method_doc def __init__( self, element: OdbMeshElement, ipNumber: int = 0, - sectionPoint: Optional[SectionPoint] = None, + sectionPoint: SectionPoint | None = None, face: SymbolicConstant = FACE_UNKNOWN, - node: Optional[OdbMeshNode] = None, + node: OdbMeshNode | None = None, ): """This method creates a HistoryPoint object for an element. @@ -166,6 +170,7 @@ def __init__( """ ... + @overload @abaqus_method_doc def __init__(self, region: OdbSet): """This method creates a HistoryPoint object for a region. @@ -187,6 +192,7 @@ def __init__(self, region: OdbSet): """ ... + @overload @abaqus_method_doc def __init__(self, assembly: OdbAssembly): """This method creates a HistoryPoint object for the OdbAssembly object. @@ -208,6 +214,7 @@ def __init__(self, assembly: OdbAssembly): """ ... + @overload @abaqus_method_doc def __init__(self, instance: OdbInstance): """This method creates a HistoryPoint object for the OdbInstance object. diff --git a/src/abaqus/Odb/HistoryRegion.py b/src/abaqus/Odb/HistoryRegion.py index c4431a6e37..2750dbd12f 100644 --- a/src/abaqus/Odb/HistoryRegion.py +++ b/src/abaqus/Odb/HistoryRegion.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, Optional, overload +from typing import overload from typing_extensions import Literal @@ -10,6 +10,7 @@ from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .HistoryOutput import HistoryOutput from .HistoryPoint import HistoryPoint +from .OdbMeshNode import OdbMeshNode @abaqus_class_doc @@ -25,10 +26,10 @@ class HistoryRegion: #: A SymbolicConstant specifying the position of the history output. Possible values are #: NODAL, INTEGRATION_POINT, WHOLE_ELEMENT, WHOLE_REGION, and WHOLE_MODEL. - position: Optional[SymbolicConstant] = None + position: SymbolicConstant #: A repository of HistoryOutput objects. - historyOutputs: Dict[str, HistoryOutput] = {} + historyOutputs: dict[str, HistoryOutput] = {} #: A String specifying the name of the HistoryRegion object. name: str @@ -41,7 +42,7 @@ class HistoryRegion: #: None or an OdbLoadCase object specifying the load case associated with the HistoryRegion #: object. The default value is None. - loadCase: Optional[str] = None + loadCase: str | None = None @abaqus_method_doc def __init__( @@ -49,7 +50,7 @@ def __init__( name: str, description: str, point: HistoryPoint, - loadCase: Optional[str] = None, + loadCase: str | None = None, ) -> None: """This method creates a HistoryRegion object. @@ -134,16 +135,17 @@ def getSubset(self, start: float, end: float) -> HistoryRegion: @abaqus_method_doc def getSubset(self, *args, **kwargs) -> HistoryRegion: - ... + return HistoryRegion("", "", HistoryPoint(OdbMeshNode())) def HistoryOutput( self, name: str, description: str, type: Literal[C.SCALAR], - validInvariants: Optional[ - Literal[C.MISES, C.MAX_PRINCIPAL, C.MIN_PRINCIPAL, C.MID_PRINCIPAL, C.MAGNITUDE, C.TRESCA, C.INV3, C.PRESS] - ] = None, + validInvariants: Literal[ + C.MISES, C.MAX_PRINCIPAL, C.MIN_PRINCIPAL, C.MID_PRINCIPAL, C.MAGNITUDE, C.TRESCA, C.INV3, C.PRESS + ] + | None = None, ) -> HistoryOutput: """This method creates a HistoryOutput object. diff --git a/src/abaqus/Odb/JobData.py b/src/abaqus/Odb/JobData.py index 53819a1161..807e5f72ab 100644 --- a/src/abaqus/Odb/JobData.py +++ b/src/abaqus/Odb/JobData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -21,11 +21,11 @@ class JobData: #: A SymbolicConstant specifying the analysis code. Possible values are ABAQUS_STANDARD, #: ABAQUS_EXPLICIT, and UNKNOWN_ANALYSIS_CODE. - analysisCode: Optional[SymbolicConstant] = None + analysisCode: SymbolicConstant #: A SymbolicConstant specifying the precision. Only SINGLE_PRECISION is currently #: supported. Possible values are DOUBLE_PRECISION and SINGLE_PRECISION. - precision: Optional[SymbolicConstant] = None + precision: SymbolicConstant #: A String specifying the release of the analysis code. version: str = "" diff --git a/src/abaqus/Odb/OdbAssembly.py b/src/abaqus/Odb/OdbAssembly.py index 4d969953f3..dac61efce8 100644 --- a/src/abaqus/Odb/OdbAssembly.py +++ b/src/abaqus/Odb/OdbAssembly.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -244,7 +246,7 @@ def RigidBody( elements: OdbSet = OdbSet("set", ()), tieNodes: OdbSet = OdbSet("set", ()), pinNodes: OdbSet = OdbSet("set", ()), - analyticSurface: Optional[AnalyticSurface] = None, + analyticSurface: AnalyticSurface | None = None, ) -> OdbRigidBody: """This method creates a OdbRigidBody object. diff --git a/src/abaqus/Odb/OdbAssemblyBase.py b/src/abaqus/Odb/OdbAssemblyBase.py index c72dd3b8b2..25aa4e82fe 100644 --- a/src/abaqus/Odb/OdbAssemblyBase.py +++ b/src/abaqus/Odb/OdbAssemblyBase.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -32,16 +32,16 @@ class OdbAssemblyBase: """ #: A repository of OdbInstance objects. - instances: Dict[str, OdbInstance] = {} + instances: dict[str, OdbInstance] = {} #: A repository of OdbSet objects specifying node sets. - nodeSets: Dict[str, OdbSet] = {} + nodeSets: dict[str, OdbSet] = {} #: A repository of OdbSet objects specifying element sets. - elementSets: Dict[str, OdbSet] = {} + elementSets: dict[str, OdbSet] = {} #: A repository of OdbSet objects specifying surfaces. - surfaces: Dict[str, OdbSet] = {} + surfaces: dict[str, OdbSet] = {} #: An OdbMeshNodeArray object. nodes: OdbMeshNodeArray = [] @@ -50,7 +50,7 @@ class OdbAssemblyBase: elements: OdbMeshElementArray = [] #: A repository of OdbDatumCsys objects. - datumCsyses: Dict[str, OdbDatumCsys] = {} + datumCsyses: dict[str, OdbDatumCsys] = {} #: A SectionAssignmentArray object. sectionAssignments: SectionAssignmentArray = [] @@ -68,11 +68,11 @@ class OdbAssemblyBase: def ConnectorOrientation( self, region: str, - localCsys1: Optional[OdbDatumCsys] = None, + localCsys1: OdbDatumCsys | None = None, axis1: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle1: float = 0, orient2sameAs1: Boolean = OFF, - localCsys2: Optional[OdbDatumCsys] = None, + localCsys2: OdbDatumCsys | None = None, axis2: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle2: float = 0, ): @@ -140,7 +140,7 @@ def addElements( instanceNames: tuple, type: str, elementSetName: str = "", - sectionCategory: Optional[SectionCategory] = None, + sectionCategory: SectionCategory | None = None, ): """This method is used to define elements using nodes defined at the OdbAssembly and/or OdbInstance level. For connector elements connected to ground, specify the lone node in the connectivity. The @@ -175,7 +175,7 @@ def addElements( ... @abaqus_method_doc - def addNodes(self, labels: tuple, coordinates: tuple, nodeSetName: Optional[str] = None): + def addNodes(self, labels: tuple, coordinates: tuple, nodeSetName: str | None = None): """This method adds nodes to the OdbAssembly object using node labels and coordinates. Warning:Adding nodes not in ascending order of their labels may cause Abaqus/Viewer to plot contours incorrectly. diff --git a/src/abaqus/Odb/OdbBase.py b/src/abaqus/Odb/OdbBase.py index ffc7230593..f97b806219 100644 --- a/src/abaqus/Odb/OdbBase.py +++ b/src/abaqus/Odb/OdbBase.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from typing_extensions import Literal @@ -36,10 +36,10 @@ class OdbBase: isReadOnly: Boolean = OFF #: A repository of Amplitude objects. - amplitudes: Dict[str, Amplitude] = {} + amplitudes: dict[str, Amplitude] = {} #: A repository of Filter objects. - filters: Dict[str, Filter] = {} + filters: dict[str, Filter] = {} #: An OdbAssembly object. rootAssembly: OdbAssembly = OdbAssembly() @@ -48,19 +48,19 @@ class OdbBase: jobData: JobData = JobData() #: A repository of OdbPart objects. - parts: Dict[str, OdbPart] = {} + parts: dict[str, OdbPart] = {} #: A repository of Material objects. - materials: Dict[str, Material] = {} + materials: dict[str, Material] = {} #: A repository of OdbStep objects. - steps: Dict[str, OdbStep] = {} + steps: dict[str, OdbStep] = {} #: A repository of Section objects. - sections: Dict[str, Section] = {} + sections: dict[str, Section] = {} #: A repository of SectionCategory objects. - sectionCategories: Dict[str, SectionCategory] = {} + sectionCategories: dict[str, SectionCategory] = {} #: A SectorDefinition object. sectorDefinition: SectorDefinition = SectorDefinition() @@ -72,7 +72,7 @@ class OdbBase: customData: RepositorySupport = RepositorySupport() #: A repository of Profile objects. - profiles: Dict[str, Profile] = {} + profiles: dict[str, Profile] = {} @abaqus_method_doc def __init__(self, name: str, analysisTitle: str = "", description: str = "", path: str = ""): diff --git a/src/abaqus/Odb/OdbCommands.py b/src/abaqus/Odb/OdbCommands.py index b03cde1c2a..525342df58 100644 --- a/src/abaqus/Odb/OdbCommands.py +++ b/src/abaqus/Odb/OdbCommands.py @@ -1,8 +1,11 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_function_doc from ..UtilityAndView.abaqusConstants import OFF, Boolean +from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .FieldOutput import FieldOutput from .Odb import Odb from .OdbSequenceAnalyticSurfaceSegment import OdbSequenceAnalyticSurfaceSegment @@ -51,7 +54,7 @@ def isUpgradeRequiredForOdb(upgradeRequiredOdbPath: str): @abaqus_function_doc -def maxEnvelope() -> Sequence[FieldOutput]: +def maxEnvelope() -> Sequence[tuple[FieldOutput, FieldOutput]]: """Retrieve the maximum value of an output variable over a number of fields. Returns @@ -68,16 +71,16 @@ def maxEnvelope() -> Sequence[FieldOutput]: TypeError This function takes no keyword arguments. """ - ... + return ((FieldOutput("", "", C.SCALAR), FieldOutput("", "", C.SCALAR)),) @abaqus_function_doc -def minEnvelope() -> Sequence[FieldOutput]: +def minEnvelope() -> Sequence[tuple[FieldOutput, FieldOutput]]: """Retrieve the minimum value of an output variable over a number of fields. Returns ------- - Sequence[FieldOutput] + Sequence[tuple[FieldOutput, FieldOutput]] A sequence of two fieldOutput objects. The first fieldOutput object contains the minimum value. The second fieldOutput object contains the index of the field containing the minimum value. The index follows the order in which fields are positioned in the list of @@ -89,7 +92,7 @@ def minEnvelope() -> Sequence[FieldOutput]: TypeError This function takes no keyword arguments. """ - ... + return ((FieldOutput("", "", C.SCALAR), FieldOutput("", "", C.SCALAR)),) @abaqus_function_doc diff --git a/src/abaqus/Odb/OdbDatumCsys.py b/src/abaqus/Odb/OdbDatumCsys.py index 76d53f2ad7..452ba45349 100644 --- a/src/abaqus/Odb/OdbDatumCsys.py +++ b/src/abaqus/Odb/OdbDatumCsys.py @@ -1,4 +1,4 @@ -from typing import Optional, Tuple +from __future__ import annotations from typing_extensions import Literal @@ -28,20 +28,20 @@ class OdbDatumCsys: #: A SymbolicConstant specifying the type of coordinate system. Possible values are #: CARTESIAN, CYLINDRICAL, and SPHERICAL. - coordSysType: Optional[SymbolicConstant] = None + coordSysType: SymbolicConstant #: A tuple of Floats specifying the coordinates of the origin of the datum coordinate #: system. - origin: Optional[float] = None + origin: float | None = None #: A tuple of Floats specifying a point on the **X** axis. - xAxis: Optional[float] = None + xAxis: float | None = None #: A tuple of Floats specifying a point on the **Y** axis. - yAxis: Optional[float] = None + yAxis: float | None = None #: A tuple of Floats specifying a point on the **Z** axis. - zAxis: Optional[float] = None + zAxis: float | None = None @abaqus_method_doc def DatumCsysByThreePoints( @@ -220,7 +220,7 @@ def DatumCsys(self, name: str, datumCsys: "OdbDatumCsys"): ... @abaqus_method_doc - def globalToLocal(self, coordinates: Tuple[float, float, float]) -> Tuple[float, float, float]: + def globalToLocal(self, coordinates: tuple[float, float, float]) -> tuple[float, float, float]: """This method transforms specified coordinates in the global coordinate system into this local coordinate system. @@ -234,13 +234,13 @@ def globalToLocal(self, coordinates: Tuple[float, float, float]) -> Tuple[float, Returns ------- - Tuple[float, float, float] + tuple[float, float, float] A tuple of three Floats representing the coordinates in this local coordinate system. """ - ... + return (0.0, 0.0, 0.0) @abaqus_method_doc - def localToGlobal(self, coordinates: Tuple[float, float, float]) -> Tuple[float, float, float]: + def localToGlobal(self, coordinates: tuple[float, float, float]) -> tuple[float, float, float]: """This method transforms specified coordinates in this local coordinate system into the global coordinate system. @@ -254,7 +254,7 @@ def localToGlobal(self, coordinates: Tuple[float, float, float]) -> Tuple[float, Returns ------- - Tuple[float, float, float] + tuple[float, float, float] A tuple of three Floats representing the coordinates in this global coordinate system. """ - ... + return (0.0, 0.0, 0.0) diff --git a/src/abaqus/Odb/OdbFrame.py b/src/abaqus/Odb/OdbFrame.py index a0eba23b56..1fc0f0bc31 100644 --- a/src/abaqus/Odb/OdbFrame.py +++ b/src/abaqus/Odb/OdbFrame.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, overload +from __future__ import annotations + +from typing import overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -20,26 +22,26 @@ class OdbFrame: #: An Int specifying the cyclic mode number associated with the data stored on this frame. #: Only frequency analyses of cyclic symmetry models possess cyclic mode numbers. - cyclicModeNumber: Optional[int] = None + cyclicModeNumber: int | None = None #: A SymbolicConstant specifying the domain of the step of which the frame is a member. #: Possible values are TIME, FREQUENCY, and MODAL. - domain: Optional[SymbolicConstant] = None + domain: SymbolicConstant #: A Float specifying the frequency. This member is valid only if **domain** = FREQUENCY or if #: the **procedureType** member of the Step object=FREQUENCY. The default value is 0.0. frequency: float = 0 #: An Int specifying the eigenmode. This member is valid only if **domain** = MODAL. - mode: Optional[int] = None + mode: int | None = None #: An OdbFrame object specifying the real or imaginary portion of the data corresponding to #: this cyclic symmetry mode. - associatedFrame: Optional["OdbFrame"] = None + associatedFrame: "OdbFrame" | None = None #: A repository of FieldOutput objects specifying the key to the **fieldOutputs** repository #: is a String representing an output variable. - fieldOutputs: Dict[str, FieldOutput] = {} + fieldOutputs: dict[str, FieldOutput] = {} #: An OdbLoadCase object specifying the load case for the frame. loadCase: OdbLoadCase = OdbLoadCase("loadCase") @@ -144,6 +146,9 @@ def __init__(self, loadCase: OdbLoadCase, description: str = "", frequency: floa """ ... + def __init__(self, *args, **kwargs): + ... + @abaqus_method_doc def Frame(self, *args, **kwargs): ... @@ -155,7 +160,7 @@ def FieldOutput( description: str, type: SymbolicConstant, componentLabels: tuple = (), - validInvariants: Optional[SymbolicConstant] = None, + validInvariants: SymbolicConstant | None = None, isEngineeringTensor: Boolean = OFF, ): """This method creates a FieldOutput object. diff --git a/src/abaqus/Odb/OdbFrameArray.py b/src/abaqus/Odb/OdbFrameArray.py index 4dd838aa69..ff0b65b756 100644 --- a/src/abaqus/Odb/OdbFrameArray.py +++ b/src/abaqus/Odb/OdbFrameArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .OdbFrame import OdbFrame diff --git a/src/abaqus/Odb/OdbInstance.py b/src/abaqus/Odb/OdbInstance.py index db7291e8d9..8b47359dad 100644 --- a/src/abaqus/Odb/OdbInstance.py +++ b/src/abaqus/Odb/OdbInstance.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Odb/OdbInstanceBase.py b/src/abaqus/Odb/OdbInstanceBase.py index b79ea1b89a..2532ea35aa 100644 --- a/src/abaqus/Odb/OdbInstanceBase.py +++ b/src/abaqus/Odb/OdbInstanceBase.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -46,11 +48,11 @@ class OdbInstanceBase: #: A SymbolicConstant specifying the type of the Part object. Only a value of #: DEFORMABLE_BODY is currently supported. - type: Optional[SymbolicConstant] = None + type: SymbolicConstant #: A SymbolicConstant specifying the dimensionality of the Part object. Possible values are #: THREE_D, TWO_D_PLANAR, AXISYMMETRIC, and UNKNOWN_DIMENSION. - embeddedSpace: Optional[SymbolicConstant] = None + embeddedSpace: SymbolicConstant #: A SymbolicConstant specifying the state of the Instance as modified by the analysis. #: This member is only present if the Instance is part of the RootAssemblyState tree. @@ -66,13 +68,13 @@ class OdbInstanceBase: elements: OdbMeshElementArray = [] #: A repository of OdbSet objects specifying node sets. - nodeSets: Dict[str, OdbSet] = {} + nodeSets: dict[str, OdbSet] = {} #: A repository of OdbSet objects specifying element sets. - elementSets: Dict[str, OdbSet] = {} + elementSets: dict[str, OdbSet] = {} #: A repository of OdbSet objects specifying surfaces. - surfaces: Dict[str, OdbSet] = {} + surfaces: dict[str, OdbSet] = {} #: A SectionAssignmentArray object. sectionAssignments: SectionAssignmentArray = [] @@ -266,7 +268,7 @@ def assignSection(self, region: str, section: Section): ... @abaqus_method_doc - def AnalyticRigidSurf2DPlanar(self, name: str, profile: Sequence[AnalyticSurfaceSegment], filletRadius: str = 0): + def AnalyticRigidSurf2DPlanar(self, name: str, profile: Sequence[AnalyticSurfaceSegment], filletRadius: float = 0): """This method is used to define a two-dimensional AnalyticSurface object on the instance. Parameters @@ -294,7 +296,7 @@ def AnalyticRigidSurfExtrude( self, name: str, profile: Sequence[AnalyticSurfaceSegment], - filletRadius: str = 0, + filletRadius: float = 0, localCoordData: tuple = (), ): """This method is used to define a three-dimensional cylindrical AnalyticSurface on the instance. @@ -326,7 +328,7 @@ def AnalyticRigidSurfRevolve( self, name: str, profile: Sequence[AnalyticSurfaceSegment], - filletRadius: str = 0, + filletRadius: float = 0, localCoordData: tuple = (), ): """This method is used to define a three-dimensional AnalyticSurface of revolution on the instance. diff --git a/src/abaqus/Odb/OdbMeshElement.py b/src/abaqus/Odb/OdbMeshElement.py index 36ac419b1d..1a34f0583e 100644 --- a/src/abaqus/Odb/OdbMeshElement.py +++ b/src/abaqus/Odb/OdbMeshElement.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -36,20 +36,20 @@ class OdbMeshElement: """ #: An Int specifying the element label. - label: Optional[int] = None + label: int | None = None #: A String specifying the element type. type: str = "" #: A SectionCategory object specifying the element section properties. - sectionCategory: Optional[SectionCategory] = None + sectionCategory: SectionCategory | None = None #: A tuple of Ints specifying the element connectivity. For connector elements connected to #: ground, the other node is repeated in the connectivity data. The position of the ground #: node cannot be ascertained. This is a limitation. It is important to note the difference #: with MeshElement object of MDB where the connectivity is node indices instead of node #: labels. - connectivity: Optional[int] = None + connectivity: int | None = None #: A tuple of Strings specifying the instance names for nodes in the element connectivity. instanceNames: tuple = () diff --git a/src/abaqus/Odb/OdbMeshElementArray.py b/src/abaqus/Odb/OdbMeshElementArray.py index 64e83b1c22..09168838c2 100644 --- a/src/abaqus/Odb/OdbMeshElementArray.py +++ b/src/abaqus/Odb/OdbMeshElementArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .OdbMeshElement import OdbMeshElement diff --git a/src/abaqus/Odb/OdbMeshNode.py b/src/abaqus/Odb/OdbMeshNode.py index 3b4b36d504..a1f4d2aadd 100644 --- a/src/abaqus/Odb/OdbMeshNode.py +++ b/src/abaqus/Odb/OdbMeshNode.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -26,8 +26,8 @@ class OdbMeshNode: """ #: An Int specifying the node label. - label: Optional[int] = None + label: int | None = None #: A tuple of Floats specifying the nodal coordinates in the global Cartesian coordinate #: system. - coordinates: Optional[float] = None + coordinates: float | None = None diff --git a/src/abaqus/Odb/OdbMeshNodeArray.py b/src/abaqus/Odb/OdbMeshNodeArray.py index e4b4159c15..201eaf88f4 100644 --- a/src/abaqus/Odb/OdbMeshNodeArray.py +++ b/src/abaqus/Odb/OdbMeshNodeArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .OdbMeshNode import OdbMeshNode diff --git a/src/abaqus/Odb/OdbPart.py b/src/abaqus/Odb/OdbPart.py index 4f79e4b5a0..d7886ed8cd 100644 --- a/src/abaqus/Odb/OdbPart.py +++ b/src/abaqus/Odb/OdbPart.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Odb/OdbPartBase.py b/src/abaqus/Odb/OdbPartBase.py index ef09951f49..ac1848ef08 100644 --- a/src/abaqus/Odb/OdbPartBase.py +++ b/src/abaqus/Odb/OdbPartBase.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Sequence, overload +from __future__ import annotations + +from typing import Sequence, overload from typing_extensions import Literal @@ -39,13 +41,13 @@ class OdbPartBase: elements: OdbMeshElementArray = [] #: A repository of OdbSet objects specifying node sets. - nodeSets: Dict[str, OdbSet] = {} + nodeSets: dict[str, OdbSet] = {} #: A repository of OdbSet objects specifying element sets. - elementSets: Dict[str, OdbSet] = {} + elementSets: dict[str, OdbSet] = {} #: A repository of OdbSet objects specifying surfaces. - surfaces: Dict[str, OdbSet] = {} + surfaces: dict[str, OdbSet] = {} #: A SectionAssignmentArray object. sectionAssignments: SectionAssignmentArray = [] @@ -105,7 +107,7 @@ def addElements( connectivity: tuple, type: str, elementSetName: str = "", - sectionCategory: Optional[SectionCategory] = None, + sectionCategory: SectionCategory | None = None, ): """This method adds elements to an OdbPart object using element labels and nodal connectivity. Warning:Adding elements not in ascending order of their labels may cause Abaqus/Viewer to plot contours @@ -132,8 +134,8 @@ def addElements( self, elementData: tuple, type: str, - elementSetName: Optional[str] = None, - sectionCategory: Optional[SectionCategory] = None, + elementSetName: str | None = None, + sectionCategory: SectionCategory | None = None, ): """This method adds elements to an OdbPart object using a sequence of element labels and nodal connectivity. Warning:Adding elements not in ascending order of their labels may cause Abaqus/Viewer to @@ -158,7 +160,7 @@ def addElements(self, *args, **kwargs): ... @overload - def addNodes(self, labels: tuple, coordinates: tuple, nodeSetName: Optional[str] = None): + def addNodes(self, labels: tuple, coordinates: tuple, nodeSetName: str | None = None): """This method adds nodes to an OdbPart object using node labels and coordinates. Warning:Adding nodes not in ascending order of their labels may cause Abaqus/Viewer to plot contours incorrectly. @@ -175,7 +177,7 @@ def addNodes(self, labels: tuple, coordinates: tuple, nodeSetName: Optional[str] @overload @abaqus_method_doc - def addNodes(self, nodeData: tuple, nodeSetName: Optional[str] = None): + def addNodes(self, nodeData: tuple, nodeSetName: str | None = None): """This method adds nodes to an OdbPart object using a sequence of node labels and coordinates. Warning:Adding nodes not in ascending order of their labels may cause Abaqus/Viewer to plot contours incorrectly. @@ -312,7 +314,7 @@ def getNodeFromLabel(self, label: int): ... @abaqus_method_doc - def AnalyticRigidSurf2DPlanar(self, name: str, profile: Sequence[AnalyticSurfaceSegment], filletRadius: str = 0): + def AnalyticRigidSurf2DPlanar(self, name: str, profile: Sequence[AnalyticSurfaceSegment], filletRadius: float = 0): """This method is used to define a two-dimensional AnalyticSurface object on the part object. Parameters @@ -335,7 +337,7 @@ def AnalyticRigidSurf2DPlanar(self, name: str, profile: Sequence[AnalyticSurface ... @abaqus_method_doc - def AnalyticRigidSurfExtrude(self, name: str, profile: Sequence[AnalyticSurfaceSegment], filletRadius: str = 0): + def AnalyticRigidSurfExtrude(self, name: str, profile: Sequence[AnalyticSurfaceSegment], filletRadius: float = 0): """This method is used to define a three-dimensional cylindrical AnalyticSurface on the part object. Parameters @@ -358,7 +360,7 @@ def AnalyticRigidSurfExtrude(self, name: str, profile: Sequence[AnalyticSurfaceS ... @abaqus_method_doc - def AnalyticRigidSurfRevolve(self, name: str, profile: Sequence[AnalyticSurfaceSegment], filletRadius: str = 0): + def AnalyticRigidSurfRevolve(self, name: str, profile: Sequence[AnalyticSurfaceSegment], filletRadius: float = 0): """This method is used to define a three-dimensional AnalyticSurface of revolution on the part object. Parameters diff --git a/src/abaqus/Odb/OdbPretensionSection.py b/src/abaqus/Odb/OdbPretensionSection.py index 24d6587035..b0c67bb00a 100644 --- a/src/abaqus/Odb/OdbPretensionSection.py +++ b/src/abaqus/Odb/OdbPretensionSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,4 +27,4 @@ class OdbPretensionSection: surface: OdbSet = OdbSet("set", ()) #: A tuple of Floats specifying the components of the normal to the pretension section. - normal: Optional[float] = None + normal: float | None = None diff --git a/src/abaqus/Odb/OdbPretensionSectionArray.py b/src/abaqus/Odb/OdbPretensionSectionArray.py index aff1147a77..adcc4f2cfc 100644 --- a/src/abaqus/Odb/OdbPretensionSectionArray.py +++ b/src/abaqus/Odb/OdbPretensionSectionArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .OdbPretensionSection import OdbPretensionSection diff --git a/src/abaqus/Odb/OdbRigidBody.py b/src/abaqus/Odb/OdbRigidBody.py index 51f89ae6d6..f22fc0dcac 100644 --- a/src/abaqus/Odb/OdbRigidBody.py +++ b/src/abaqus/Odb/OdbRigidBody.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -52,7 +52,7 @@ class OdbRigidBody: #: An AnalyticSurface object specifying the analytic surface whose motion is governed by #: the motion of rigid body reference node. - analyticSurface: Optional[AnalyticSurface] = None + analyticSurface: AnalyticSurface | None = None @abaqus_method_doc def __init__( @@ -63,7 +63,7 @@ def __init__( elements: OdbSet = OdbSet("set", ()), tieNodes: OdbSet = OdbSet("set", ()), pinNodes: OdbSet = OdbSet("set", ()), - analyticSurface: Optional[AnalyticSurface] = None, + analyticSurface: AnalyticSurface | None = None, ): """This method creates a OdbRigidBody object. diff --git a/src/abaqus/Odb/OdbRigidBodyArray.py b/src/abaqus/Odb/OdbRigidBodyArray.py index c199d8c00a..7d86f386cf 100644 --- a/src/abaqus/Odb/OdbRigidBodyArray.py +++ b/src/abaqus/Odb/OdbRigidBodyArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .OdbRigidBody import OdbRigidBody diff --git a/src/abaqus/Odb/OdbSet.py b/src/abaqus/Odb/OdbSet.py index 9e36576bff..efcf687773 100644 --- a/src/abaqus/Odb/OdbSet.py +++ b/src/abaqus/Odb/OdbSet.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -48,7 +50,7 @@ class OdbSet: #: A tuple of SymbolicConstants specifying the element face. If a set spans more than one #: part instance, this member is a sequence of sequences for each part instance. - faces: Optional[SymbolicConstant] = None + faces: SymbolicConstant #: A repository of an OdbInstance object. #: diff --git a/src/abaqus/Odb/OdbStep.py b/src/abaqus/Odb/OdbStep.py index cf1b4d1ba1..bd88000955 100644 --- a/src/abaqus/Odb/OdbStep.py +++ b/src/abaqus/Odb/OdbStep.py @@ -1,4 +1,6 @@ -from typing import Optional, overload +from __future__ import annotations + +from typing import overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -17,7 +19,7 @@ def HistoryRegion( name: str, description: str, point: HistoryPoint, - loadCase: Optional[str] = None, + loadCase: str | None = None, ) -> HistoryRegion: """This method creates a HistoryRegion object. diff --git a/src/abaqus/Odb/OdbStepBase.py b/src/abaqus/Odb/OdbStepBase.py index e52adb27f8..6e71be15e0 100644 --- a/src/abaqus/Odb/OdbStepBase.py +++ b/src/abaqus/Odb/OdbStepBase.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, overload +from __future__ import annotations + +from typing import overload from typing_extensions import Literal @@ -26,45 +28,45 @@ class OdbStepBase: """ #: An Int specifying the step number. - number: Optional[int] = None + number: int | None = None #: A Boolean specifying whether geometric nonlinearity can occur in this step. nlgeom: Boolean = OFF #: A Float specifying the current value of the mass of the model. This does not include the #: mass of the acoustic media if any present. - mass: Optional[float] = None + mass: float | None = None #: A Float specifying the current value of the mass of the acoustic media of the model. - acousticMass: Optional[float] = None + acousticMass: float | None = None #: An OdbFrameArray object. frames: OdbFrameArray = [] #: A repository of HistoryRegion objects. - historyRegions: Dict[str, HistoryRegion] = {} + historyRegions: dict[str, HistoryRegion] = {} #: A repository of OdbLoadCase objects. - loadCases: Dict[str, OdbLoadCase] = {} + loadCases: dict[str, OdbLoadCase] = {} #: A tuple of Floats specifying the coordinates of the center of mass. - massCenter: Optional[float] = None + massCenter: float | None = None #: A tuple of Floats specifying the moments and products of inertia about the center of #: mass. For 3-D models inertia quantities are written in the following order: I(XX), #: I(YY), I(ZZ), I(XY), I(XZ), and I(YZ). For 2-D models only I(ZZ) and I(XY) are #: outputted. - inertiaAboutCenter: Optional[float] = None + inertiaAboutCenter: float | None = None #: A tuple of Floats specifying the moments and products of inertia about the origin of the #: global coordinate system. For 3-D models inertia quantities are written in the following #: order: I(XX), I(YY), I(ZZ), I(XY), I(XZ), and I(YZ). For 2-D models only I(ZZ) and I(XY) #: are outputted. - inertiaAboutOrigin: Optional[float] = None + inertiaAboutOrigin: float | None = None #: A tuple of Floats specifying the coordinates of the center of mass of the acoustic #: media. - acousticMassCenter: Optional[float] = None + acousticMassCenter: float | None = None @abaqus_method_doc def __init__( @@ -75,7 +77,7 @@ def __init__( timePeriod: float = 0, previousStepName: str = "", procedure: str = "", - totalTime: Optional[float] = None, + totalTime: float | None = None, ) -> None: """This method creates an OdbStep object. @@ -260,7 +262,7 @@ def getFrame( @abaqus_method_doc def getFrame(self, *args, **kwargs) -> OdbFrame: - ... + return OdbFrame(0, 0.0) def getHistoryRegion(self, point: HistoryPoint, loadCase: OdbLoadCase = OdbLoadCase("loadCase")) -> HistoryRegion: """This method retrieves a HistoryRegion object associated with a HistoryPoint in the model. @@ -282,7 +284,7 @@ def getHistoryRegion(self, point: HistoryPoint, loadCase: OdbLoadCase = OdbLoadC OdbError HistoryRegion not found, If a HistoryRegion object is not found. """ - ... + return HistoryRegion("", "", point) @abaqus_method_doc def setDefaultDeformedField(self, field: FieldOutput) -> None: diff --git a/src/abaqus/Odb/RebarOrientation.py b/src/abaqus/Odb/RebarOrientation.py index 53de459658..8f40e81e63 100644 --- a/src/abaqus/Odb/RebarOrientation.py +++ b/src/abaqus/Odb/RebarOrientation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -23,10 +23,10 @@ class RebarOrientation: #: A SymbolicConstant specifying the axis of a cylindrical or spherical datum coordinate #: system about which an additional rotation is applied. Possible values are AXIS_1, #: AXIS_2, and AXIS_3. - axis: Optional[SymbolicConstant] = None + axis: SymbolicConstant #: A Float specifying the angle of the additional rotation. - angle: Optional[float] = None + angle: float | None = None #: An OdbSet object specifying a region for which the rebar orientation is defined. region: OdbSet = OdbSet("set", ()) diff --git a/src/abaqus/Odb/RebarOrientationArray.py b/src/abaqus/Odb/RebarOrientationArray.py index 1c28e990f6..8346816a7d 100644 --- a/src/abaqus/Odb/RebarOrientationArray.py +++ b/src/abaqus/Odb/RebarOrientationArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .RebarOrientation import RebarOrientation diff --git a/src/abaqus/Odb/SectionPointArray.py b/src/abaqus/Odb/SectionPointArray.py index 48cd9c7851..915334fd0d 100644 --- a/src/abaqus/Odb/SectionPointArray.py +++ b/src/abaqus/Odb/SectionPointArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .SectionPoint import SectionPoint diff --git a/src/abaqus/Odb/SectorDefinition.py b/src/abaqus/Odb/SectorDefinition.py index 1c00fb3cc8..12ae70ff81 100644 --- a/src/abaqus/Odb/SectorDefinition.py +++ b/src/abaqus/Odb/SectorDefinition.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,8 +16,8 @@ class SectorDefinition: """ #: An Int specifying the number of sectors in the cyclic symmetry model. - numSectors: Optional[int] = None + numSectors: int | None = None #: A tuple of tuples of Floats specifying the coordinates of two points on the axis of #: symmetry. - symmetryAxis: Optional[float] = None + symmetryAxis: float | None = None diff --git a/src/abaqus/Odb/UserDataBase.py b/src/abaqus/Odb/UserDataBase.py index ca517b1cc6..2b718daa7a 100644 --- a/src/abaqus/Odb/UserDataBase.py +++ b/src/abaqus/Odb/UserDataBase.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -55,13 +55,13 @@ class UserDataBase: legendLabel: str = "" #: A repository of XYData objects. - xyDataObjects: Dict[str, XYData] = {} + xyDataObjects: dict[str, XYData] = {} #: A repository of Annotation objects. - annotations: Dict[str, Annotation] = {} + annotations: dict[str, Annotation] = {} #: A tuple of pairs of Floats specifying the **X - Y** data pairs. - data: Optional[float] = None + data: float | None = None @abaqus_method_doc def XYData( @@ -74,8 +74,8 @@ def XYData( legendLabel: str = "", xValuesLabel: str = "", yValuesLabel: str = "", - axis1QuantityType: Optional[QuantityType] = None, - axis2QuantityType: Optional[QuantityType] = None, + axis1QuantityType: QuantityType | None = None, + axis2QuantityType: QuantityType | None = None, ): """This method creates an XYData object from a sequence of **X - Y** data pairs. diff --git a/src/abaqus/OdbDisplay/CommonOptions.py b/src/abaqus/OdbDisplay/CommonOptions.py index 40dc759c9f..3ea604046f 100644 --- a/src/abaqus/OdbDisplay/CommonOptions.py +++ b/src/abaqus/OdbDisplay/CommonOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -60,16 +60,16 @@ class CommonOptions(DGCommonOptions): #: A Float specifying the uniform deformation scaling constant when #: **deformationScaling** = UNIFORM. The default value is **autoDeformationScaleValue**. - uniformScaleFactor: Optional[float] = None + uniformScaleFactor: float | None = None #: A Float specifying the deformation scale factor value when **deformationScaling** = AUTO. #: This value is read-only. - autoDeformationScaleValue: Optional[float] = None + autoDeformationScaleValue: float | None = None #: A tuple of three Floats specifying the deformation scaling in each of the three #: coordinate directions when **deformationScaling** = NONUNIFORM. The default value is #: (*autoDeformationScaleValue*, **autoDeformationScaleValue**, **autoDeformationScaleValue**). - nonuniformScaleFactor: Optional[float] = None + nonuniformScaleFactor: float | None = None #: A SymbolicConstant specifying the render style of the plot. Possible values are #: WIREFRAME, FILLED, HIDDEN, and SHADED. The default value is SHADED. @@ -212,16 +212,16 @@ class CommonOptions(DGCommonOptions): #: A tuple of three Floats specifying the coordinate scaling in each of the three #: coordinate directions when **coordinateScale** = ON. The default value is (1, 1, 1). - coordinateScaleFactors: Optional[float] = None + coordinateScaleFactors: float | None = None @abaqus_method_doc def setValues( self, - options: Optional["CommonOptions"] = None, + options: "CommonOptions" | None = None, renderStyle: Literal[C.SHADED, C.FILLED, C.WIREFRAME, C.HIDDEN] = SHADED, visibleEdges: Literal[C.FEATURE, C.EXTERIOR, C.ALL, C.FREE, C.NONE, C.SHADED] = EXTERIOR, deformationScaling: Literal[C.NONUNIFORM, C.UNIFORM, C.AUTO] = AUTO, - uniformScaleFactor: Optional[float] = None, + uniformScaleFactor: float | None = None, nonuniformScaleFactor: tuple = (), edgeColorWireHide: str = "", edgeColorFillShade: str = "", diff --git a/src/abaqus/OdbDisplay/ContourOptions.py b/src/abaqus/OdbDisplay/ContourOptions.py index f1d011d96d..d11a74a4ee 100644 --- a/src/abaqus/OdbDisplay/ContourOptions.py +++ b/src/abaqus/OdbDisplay/ContourOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -70,7 +70,7 @@ class ContourOptions(DGContourOptions): #: A Float specifying the contour range maximum value to be used in the plot when #: **maxAutoCompute** = ON. The default value is **autoMaxValue**. - maxValue: Optional[float] = None + maxValue: float | None = None #: A Boolean specifying whether the contour range minimum value should be computed from the #: output data to be contoured. The default value is ON. @@ -78,7 +78,7 @@ class ContourOptions(DGContourOptions): #: A Float specifying the contour range minimum value to be used in the plot when #: **minAutoCompute** = ON. The default value is **autoMinValue**. - minValue: Optional[float] = None + minValue: float | None = None #: A SymbolicConstant specifying the method to be used when contour limits are #: automatically computed for animation. **animationAutoLimits** will only effect the minimum @@ -92,7 +92,7 @@ class ContourOptions(DGContourOptions): #: maximum and minimum contour spectrum colors are used for values that exceed the limits #: of the plot. When **outsideLimitsMode** = SPECIFY, the values of **outsideLimitsAboveColor** #: and **outsideLimitsBelowColor** are used for values that exceed the limits of the plot. - outsideLimitsMode: Optional[SymbolicConstant] = None + outsideLimitsMode: SymbolicConstant #: A Boolean specifying whether to auto-compute contour limits using extrapolated values #: alone or extrapolated values that are averaged. The default value is OFF. @@ -108,11 +108,11 @@ class ContourOptions(DGContourOptions): #: A Float specifying the maximum value to be used in the plot. The value is computed from #: the output data to be contoured. This value is read-only. - autoMaxValue: Optional[float] = None + autoMaxValue: float | None = None #: A Float specifying the minimum value to be used in the plot. The value is computed from #: the output data to be contoured. This value is read-only. - autoMinValue: Optional[float] = None + autoMinValue: float | None = None #: A String specifying the color to be used for values that exceed the limits of the plot #: when **outsideLimitsMode** = SPECIFY. The default value is "Grey80". @@ -135,7 +135,7 @@ class ContourOptions(DGContourOptions): reversedContourLegendRange: Boolean = OFF #: A tuple of Floats specifying the interval values when **intervalType** = USER_DEFINED. - intervalValues: Optional[float] = None + intervalValues: float | None = None #: A SymbolicConstant specifying the contour rendering method. Possible values are #: TEXTURE_MAPPED and TESSELLATED. The default value is TEXTURE_MAPPED. @@ -211,7 +211,7 @@ class ContourOptions(DGContourOptions): #: specifying the line style and line thickness. For possible values, refer to the #: **edgeLineStyle** and **edgeLineThickness** members of the DGCommonOptions object. The #: default is ((SOLID, VERY_THIN), ). - intervalLineAttributes: Optional[SymbolicConstant] = None + intervalLineAttributes: SymbolicConstant #: A Boolean specifying whether to hide the values outside the specified min/max in the #: contour legend. This setting hides the **autoMinValue** and **autoMaxValue** from the @@ -224,7 +224,7 @@ class ContourOptions(DGContourOptions): @abaqus_method_doc def setValues( self, - options: Optional["ContourOptions"] = None, + options: "ContourOptions" | None = None, contourType: Literal[C.ISOSURFACE, C.BANDED, C.LINE, C.QUILT] = BANDED, contourMethod: Literal[C.TESSELLATED, C.TEXTURE_MAPPED] = TEXTURE_MAPPED, tickmarkPlots: Boolean = OFF, @@ -233,9 +233,9 @@ def setValues( intervalType: Literal[C.USER_DEFINED, C.LOG, C.UNIFORM] = UNIFORM, intervalValues: tuple = (), maxAutoCompute: Boolean = ON, - maxValue: Optional[float] = None, + maxValue: float | None = None, minAutoCompute: Boolean = ON, - minValue: Optional[float] = None, + minValue: float | None = None, animationAutoLimits: Literal[ C.CURRENT_FRAME, C.RECOMPUTE_EACH_FRAME, C.ALL_FRAMES, C.FIRST_AND_LAST ] = ALL_FRAMES, @@ -243,10 +243,10 @@ def setValues( edgeColorBandedQuilt: str = "", spectrum: str = "", reversedContourLegendRange: Boolean = OFF, - outsideLimitsMode: Optional[Literal[C.SPECIFY, C.SPECTRUM]] = None, + outsideLimitsMode: Literal[C.SPECIFY, C.SPECTRUM] | None = None, outsideLimitsAboveColor: str = "", outsideLimitsBelowColor: str = "", - intervalLineAttributes: Optional[Literal[C.LINE]] = None, + intervalLineAttributes: Literal[C.LINE] | None = None, contourEdges: Boolean = OFF, contourEdgeColor: str = "", contourEdgeStyle: Literal[C.SOLID, C.DOT_DASH, C.DASHED, C.DOTTED, C.ISOSURFACE, C.BANDED] = SOLID, diff --git a/src/abaqus/OdbDisplay/DisplayBodyOptions.py b/src/abaqus/OdbDisplay/DisplayBodyOptions.py index 2dca6ee8df..00808abbb0 100644 --- a/src/abaqus/OdbDisplay/DisplayBodyOptions.py +++ b/src/abaqus/OdbDisplay/DisplayBodyOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -97,12 +97,12 @@ class DisplayBodyOptions(DGDisplayBodyOptions): #: A tuple of three Floats specifying the coordinate scaling in each of the three #: coordinate directions when **coordinateScale** = ON. The default value is (1, 1, 1). - coordinateScaleFactors: Optional[float] = None + coordinateScaleFactors: float | None = None @abaqus_method_doc def setValues( self, - options: Optional["DisplayBodyOptions"] = None, + options: "DisplayBodyOptions" | None = None, visibleEdges: Literal[C.FEATURE, C.EXTERIOR, C.ALL, C.FREE, C.NONE, C.SHADED] = EXTERIOR, edgeColorWireHide: str = "", edgeColorFillShade: str = "", diff --git a/src/abaqus/OdbDisplay/OdbDisplay.py b/src/abaqus/OdbDisplay/OdbDisplay.py index e52f347522..8ece12ba2f 100644 --- a/src/abaqus/OdbDisplay/OdbDisplay.py +++ b/src/abaqus/OdbDisplay/OdbDisplay.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Sequence, Union, overload +from __future__ import annotations + +from typing import Sequence, Union, overload from typing_extensions import Literal @@ -95,13 +97,13 @@ class OdbDisplay: modelVariableList: OdbModelFieldVarList = OdbModelFieldVarList() #: A repository of OdbSet objects specifying the set label. The repository is read-only. - nodeSet: Dict[str, OdbSet] = {} + nodeSet: dict[str, OdbSet] = {} #: A repository of OdbSet objects specifying the set label. The repository is read-only. - elementSet: Dict[str, OdbSet] = {} + elementSet: dict[str, OdbSet] = {} #: A repository of OdbSet objects specifying the set label. The repository is read-only. - surfaceSet: Dict[str, OdbSet] = {} + surfaceSet: dict[str, OdbSet] = {} #: A DisplayOptions object. display: DisplayOptions = DisplayOptions() @@ -131,7 +133,7 @@ class OdbDisplay: viewCutOptions: ViewCutOptions = ViewCutOptions() #: A repository of ViewCut objects. - viewCuts: Dict[str, ViewCut] = {} + viewCuts: dict[str, ViewCut] = {} #: A DisplayGroup object specifying the current display group and referring to an object in #: the **displayGroups** member of Session. @@ -231,29 +233,29 @@ class OdbDisplay: #: A tuple of SymbolicConstants specifying variables.For information on the sequence, see #: the member **primaryVariable**. - statusVariable: Optional[SymbolicConstant] = None + statusVariable: SymbolicConstant #: A tuple of SymbolicConstants specifying variables.For information on the sequence, see #: the member **primaryVariable**. - symbolVariable: Optional[SymbolicConstant] = None + symbolVariable: SymbolicConstant #: A tuple of SymbolicConstants specifying a Boolean to specify if elements are to be #: removed in undeformed states based on an active status variable - applyStatusToUndeformed: Optional[SymbolicConstant] = None + applyStatusToUndeformed: SymbolicConstant #: A tuple of SymbolicConstants specifying a Boolean to specify if the status range should #: be inside a specified minimum and maximum. The range will be outside when false. - statusInsideRange: Optional[SymbolicConstant] = None + statusInsideRange: SymbolicConstant #: A tuple of Floats specifying a Float value for the minimum status range value. - statusMinimum: Optional[float] = None + statusMinimum: float | None = None #: A tuple of Floats specifying a Float value for the maximum status range value. - statusMaximum: Optional[float] = None + statusMaximum: float | None = None #: A tuple of SymbolicConstants specifying a Boolean to specify if elements are to be #: removed based on the status variable - useStatus: Optional[SymbolicConstant] = None + useStatus: SymbolicConstant #: A pair of Ints specifying the step index and the frame index of the first available #: frame. This sequence is read-only. @@ -359,8 +361,8 @@ def setPrimaryVariable( C.WHOLE_PART_INSTANCE, C.WHOLE_REGION, ], - refinement: Optional[Literal[C.COMPONENT, C.INVARIANT]] = None, - sectionPoint: Optional[dict] = None, + refinement: Literal[C.COMPONENT, C.INVARIANT] | None = None, + sectionPoint: dict | None = None, ): """This method specifies the field output variable for which to obtain results. @@ -441,10 +443,10 @@ def setStatusVariable( C.WHOLE_PART_INSTANCE, C.WHOLE_REGION, ], - refinement: Optional[Literal[C.COMPONENT, C.INVARIANT]] = None, - sectionPoint: Optional[dict] = None, - statusMinimum: Optional[float] = None, - statusMaximum: Optional[float] = None, + refinement: Literal[C.COMPONENT, C.INVARIANT] | None = None, + sectionPoint: dict | None = None, + statusMinimum: float | None = None, + statusMaximum: float | None = None, statusInsideRange: Boolean = OFF, useStatus: Boolean = OFF, applyStatusToUndeformed: Boolean = False, @@ -516,10 +518,10 @@ def setSymbolVariable( C.WHOLE_PART_INSTANCE, C.WHOLE_REGION, ], - refinement: Optional[Literal[C.COMPONENT, C.INVARIANT]] = None, - sectionPoint: Optional[dict] = None, - tensorQuantity: Optional[SymbolicConstant] = None, - vectorQuantity: Optional[SymbolicConstant] = None, + refinement: Literal[C.COMPONENT, C.INVARIANT] | None = None, + sectionPoint: dict | None = None, + tensorQuantity: SymbolicConstant | None = None, + vectorQuantity: SymbolicConstant | None = None, ): """This method specifies the field output variable for which to obtain results used for symbol plots. This variable must be in the form of vector or tensor data. The output quantity can also be specified diff --git a/src/abaqus/OdbDisplay/OrientationOptions.py b/src/abaqus/OdbDisplay/OrientationOptions.py index 9a48c6614b..620f83d8f8 100644 --- a/src/abaqus/OdbDisplay/OrientationOptions.py +++ b/src/abaqus/OdbDisplay/OrientationOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -95,7 +95,7 @@ class OrientationOptions(DGOrientationOptions): @abaqus_method_doc def setValues( self, - options: Optional["OrientationOptions"] = None, + options: "OrientationOptions" | None = None, axis1Color: str = "", showAxis1: Boolean = ON, axis2Color: str = "", diff --git a/src/abaqus/OdbDisplay/SuperimposeOptions.py b/src/abaqus/OdbDisplay/SuperimposeOptions.py index 9d0b862245..d582649750 100644 --- a/src/abaqus/OdbDisplay/SuperimposeOptions.py +++ b/src/abaqus/OdbDisplay/SuperimposeOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -68,7 +68,7 @@ class SuperimposeOptions(DGSuperimposeOptions): #: A tuple of three Floats specifying the offset value in each of the three coordinate #: directions when **deformedOffsetMode** = NONUNIFORM. The default value is (0, 0, 0). - nonuniformOffset: Optional[float] = None + nonuniformOffset: float | None = None #: A SymbolicConstant specifying the render style of the plot. Possible values are #: WIREFRAME, FILLED, HIDDEN, and SHADED. The default value is WIREFRAME. @@ -200,12 +200,12 @@ class SuperimposeOptions(DGSuperimposeOptions): #: A tuple of three Floats specifying the coordinate scaling in each of the three #: coordinate directions when **coordinateScale** = ON. The default value is (1, 1, 1). - coordinateScaleFactors: Optional[float] = None + coordinateScaleFactors: float | None = None @abaqus_method_doc def setValues( self, - options: Optional["SuperimposeOptions"] = None, + options: "SuperimposeOptions" | None = None, renderStyle: Literal[C.SHADED, C.FILLED, C.WIREFRAME, C.HIDDEN] = WIREFRAME, visibleEdges: Literal[C.FEATURE, C.EXTERIOR, C.ALL, C.FREE, C.NONE, C.SHADED] = FEATURE, edgeColorWireHide: str = "", diff --git a/src/abaqus/OdbDisplay/SymbolOptions.py b/src/abaqus/OdbDisplay/SymbolOptions.py index f339287b44..8dcd7b6cc8 100644 --- a/src/abaqus/OdbDisplay/SymbolOptions.py +++ b/src/abaqus/OdbDisplay/SymbolOptions.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -62,7 +64,7 @@ class SymbolOptions(DGSymbolOptions): #: A Float specifying the user-specified maximum vector value. The default value is #: **autoVectorMaxValue**. - vectorMaxValue: Optional[float] = None + vectorMaxValue: float | None = None #: A Boolean specifying whether the minimum vector value is to be computed automatically. #: The default value is ON. @@ -70,7 +72,7 @@ class SymbolOptions(DGSymbolOptions): #: A Float specifying the user-specified minimum vector value. The default value is #: **autoVectorMinValue**. - vectorMinValue: Optional[float] = None + vectorMinValue: float | None = None #: A SymbolicConstant specifying the tensor quantity to display. Possible values are #: ALL_PRINCIPAL_COMPONENTS, PRINCIPAL_COMPONENT, ALL_DIRECT_COMPONENTS, and @@ -83,7 +85,7 @@ class SymbolOptions(DGSymbolOptions): #: A Float specifying the user-specified maximum tensor value. The default value is #: **autoTensorMaxValue**. - tensorMaxValue: Optional[float] = None + tensorMaxValue: float | None = None #: A Boolean specifying whether the minimum tensor value is to be computed automatically. #: The default value is ON. @@ -91,7 +93,7 @@ class SymbolOptions(DGSymbolOptions): #: A Float specifying the user-specified minimum tensor value. The default value is #: **autoTensorMinValue**. - tensorMinValue: Optional[float] = None + tensorMinValue: float | None = None #: The SymbolicConstant NOT_SET or a Float specifying the vector maximum value when #: **vectorMaxValueAutoCompute** = ON. This value is read-only. The default value is NOT_SET. @@ -215,7 +217,7 @@ class SymbolOptions(DGSymbolOptions): @abaqus_method_doc def setValues( self, - options: Optional["SymbolOptions"] = None, + options: "SymbolOptions" | None = None, vectorQuantity: Literal[C.RESULTANT, C.VECTOR_COMPONENT] = RESULTANT, vectorLineThickness: Literal[C.THIN, C.THICK, C.VERY_THIN, C.MEDIUM] = VERY_THIN, vectorArrowheadStyle: Literal[C.WIRE, C.FILLED, C.NONE] = WIRE, @@ -229,9 +231,9 @@ def setValues( tensorColorSpectrum: str = "", tensorIntervalNumber: int = 12, vectorMaxValueAutoCompute: Boolean = ON, - vectorMaxValue: Optional[float] = None, + vectorMaxValue: float | None = None, vectorMinValueAutoCompute: Boolean = ON, - vectorMinValue: Optional[float] = None, + vectorMinValue: float | None = None, tensorQuantity: Literal[ C.PRINCIPAL_COMPONENT, C.DIRECT_COMPONENT, C.ALL_DIRECT_COMPONENTS, C.ALL_PRINCIPAL_COMPONENTS ] = ALL_PRINCIPAL_COMPONENTS, @@ -243,9 +245,9 @@ def setValues( tensorLineThickness: Literal[C.THIN, C.THICK, C.VERY_THIN, C.MEDIUM] = VERY_THIN, tensorArrowheadStyle: Literal[C.WIRE, C.FILLED, C.NONE] = WIRE, tensorMaxValueAutoCompute: Boolean = ON, - tensorMaxValue: Optional[float] = None, + tensorMaxValue: float | None = None, tensorMinValueAutoCompute: Boolean = ON, - tensorMinValue: Optional[float] = None, + tensorMinValue: float | None = None, ): """This method modifies the SymbolOptions object. diff --git a/src/abaqus/OdbDisplay/ViewCut.py b/src/abaqus/OdbDisplay/ViewCut.py index 6173bda0ab..8dce484711 100644 --- a/src/abaqus/OdbDisplay/ViewCut.py +++ b/src/abaqus/OdbDisplay/ViewCut.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -33,25 +35,25 @@ class ViewCut: """ #: A Float specifying the rotation angle of the cut defined with a **shape** set to PLANE. - angle: Optional[float] = None + angle: float | None = None #: A SymbolicConstant specifying the type of motion for the cut defined with a **shape** set #: to PLANE. Possible values are TRANSLATE and ROTATE. The default value is TRANSLATE. motion: SymbolicConstant = TRANSLATE #: A Float specifying the position of the cut defined with a **shape** set to PLANE. - position: Optional[float] = None + position: float | None = None #: A Float specifying the radius of the cut defined with a **shape** set to CYLINDER or #: SPHERE. - radius: Optional[float] = None + radius: float | None = None #: A SymbolicConstant specifying the rotation axis for the cut defined with a **shape** set #: to PLANE. Possible values are AXIS_1, AXIS_2, and AXIS_3. The default value is AXIS_2. rotationAxis: SymbolicConstant = AXIS_2 #: A Float specifying the value of the cut defined with a **shape** set to ISOSURFACE. - value: Optional[float] = None + value: float | None = None #: A Boolean specifying whether to display the model above the cut. The default value is #: OFF. @@ -130,7 +132,7 @@ class ViewCut: #: #: ..versionadded:: 2018 #: The ``crossSectionalArea`` attribute was added. - crossSectionalArea: Optional[float] = None + crossSectionalArea: float | None = None @abaqus_method_doc def __init__( @@ -209,12 +211,12 @@ def __init__( @abaqus_method_doc def setValues( self, - angle: Optional[float] = None, + angle: float | None = None, motion: Literal[C.ROTATE, C.PLANE, C.TRANSLATE] = TRANSLATE, - position: Optional[float] = None, - radius: Optional[float] = None, + position: float | None = None, + radius: float | None = None, rotationAxis: Literal[C.AXIS_1, C.PLANE, C.AXIS_2, C.AXIS_3] = AXIS_2, - value: Optional[float] = None, + value: float | None = None, showModelAboveCut: Boolean = OFF, showModelOnCut: Boolean = ON, showModelBelowCut: Boolean = ON, diff --git a/src/abaqus/Optimization/BeadFilter.py b/src/abaqus/Optimization/BeadFilter.py index 53a1f2eb5c..ab1f221c34 100644 --- a/src/abaqus/Optimization/BeadFilter.py +++ b/src/abaqus/Optimization/BeadFilter.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal @@ -33,7 +35,7 @@ class BeadFilter(GeometricRestriction): region: Region #: A Float specifying the filter radius. The default value is double the average edge length of the model. - radius: float = None + radius: float #: The SymbolicConstant defines whether the filter radius is in absolute or relative units. For an absolute #: radius, the value is ABSOLUTE_VALUE. For a relative radius, the value is RELATIVE. The default value is @@ -50,7 +52,7 @@ def __init__( self, name: str, region: Region, - radius: float = None, + radius: float | None = None, filterRadiusBy: Literal[C.ABSOLUTE_VALUE, C.RELATIVE] = ABSOLUTE_VALUE, filterCheckRegion: Union[Literal[C.FILTER_REGION], Region] = FILTER_REGION, ): @@ -89,7 +91,7 @@ def __init__( def setValues( self, region: Region, - radius: float = None, + radius: float | None = None, filterRadiusBy: Literal[C.ABSOLUTE_VALUE, C.RELATIVE] = ABSOLUTE_VALUE, filterCheckRegion: Union[Literal[C.FILTER_REGION], Region] = FILTER_REGION, ): diff --git a/src/abaqus/Optimization/BeadFixedRegion.py b/src/abaqus/Optimization/BeadFixedRegion.py index ed5737a0ed..32bf205a5d 100644 --- a/src/abaqus/Optimization/BeadFixedRegion.py +++ b/src/abaqus/Optimization/BeadFixedRegion.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -28,7 +28,7 @@ class BeadFixedRegion(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to fix the region in the 1-direction. The default value is #: OFF. @@ -47,7 +47,7 @@ def __init__( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, u1: Boolean = OFF, u2: Boolean = OFF, u3: Boolean = OFF, @@ -87,7 +87,7 @@ def __init__( super().__init__() @abaqus_method_doc - def setValues(self, csys: Optional[int] = None, u1: Boolean = OFF, u2: Boolean = OFF, u3: Boolean = OFF): + def setValues(self, csys: int | None = None, u1: Boolean = OFF, u2: Boolean = OFF, u3: Boolean = OFF): """This method modifies the BeadFixedRegion object. Parameters diff --git a/src/abaqus/Optimization/BeadPlanarSymmetry.py b/src/abaqus/Optimization/BeadPlanarSymmetry.py index 0790eb1689..c4df5e1633 100644 --- a/src/abaqus/Optimization/BeadPlanarSymmetry.py +++ b/src/abaqus/Optimization/BeadPlanarSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -35,7 +35,7 @@ class BeadPlanarSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None @abaqus_method_doc def __init__( @@ -43,7 +43,7 @@ def __init__( name: str, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ): """This method creates a BeadPlanarSymmetry object. @@ -74,7 +74,7 @@ def __init__( super().__init__() @abaqus_method_doc - def setValues(self, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, csys: Optional[int] = None): + def setValues(self, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, csys: int | None = None): """This method modifies the BeadPlanarSymmetry object. Parameters diff --git a/src/abaqus/Optimization/BeadPointSymmetry.py b/src/abaqus/Optimization/BeadPointSymmetry.py index 8634aeb07a..c70a989e03 100644 --- a/src/abaqus/Optimization/BeadPointSymmetry.py +++ b/src/abaqus/Optimization/BeadPointSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -27,10 +27,10 @@ class BeadPointSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the position of the symmetry point defined as the #: origin of a local coordinate system. If **csys** = None, the global coordinate system is #: used. When this member is queried, it returns an Int. The default value is None. - csys: Optional[int] = None + csys: int | None = None @abaqus_method_doc - def __init__(self, name: str, region: Region, csys: Optional[int] = None): + def __init__(self, name: str, region: Region, csys: int | None = None): """This method creates a BeadPointSymmetry object. .. note:: @@ -57,7 +57,7 @@ def __init__(self, name: str, region: Region, csys: Optional[int] = None): super().__init__() @abaqus_method_doc - def setValues(self, csys: Optional[int] = None): + def setValues(self, csys: int | None = None): """This method modifies the BeadPointSymmetry object. Parameters diff --git a/src/abaqus/Optimization/BeadRotationalSymmetry.py b/src/abaqus/Optimization/BeadRotationalSymmetry.py index 067d7aa4d6..df1731ab63 100644 --- a/src/abaqus/Optimization/BeadRotationalSymmetry.py +++ b/src/abaqus/Optimization/BeadRotationalSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -38,7 +38,7 @@ class BeadRotationalSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None @abaqus_method_doc def __init__( @@ -47,7 +47,7 @@ def __init__( angle: float, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ): """This method creates a BeadRotationalSymmetry object. @@ -80,7 +80,7 @@ def __init__( super().__init__() @abaqus_method_doc - def setValues(self, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, csys: Optional[int] = None): + def setValues(self, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, csys: int | None = None): """This method modifies the BeadRotationalSymmetry object. Parameters diff --git a/src/abaqus/Optimization/BeadTask.py b/src/abaqus/Optimization/BeadTask.py index e6e0a704a2..f4738a1b3b 100644 --- a/src/abaqus/Optimization/BeadTask.py +++ b/src/abaqus/Optimization/BeadTask.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from typing_extensions import Literal @@ -35,16 +35,16 @@ class BeadTask(OptimizationTask): """ #: A repository of DesignResponse objects. - designResponses: Dict[str, DesignResponse] = {} + designResponses: dict[str, DesignResponse] = {} #: A repository of ObjectiveFunction objects. - objectiveFunctions: Dict[str, ObjectiveFunction] = {} + objectiveFunctions: dict[str, ObjectiveFunction] = {} #: A repository of OptimizationConstraint objects. - optimizationConstraints: Dict[str, OptimizationConstraint] = {} + optimizationConstraints: dict[str, OptimizationConstraint] = {} #: A repository of GeometricRestriction objects. - geometricRestrictions: Dict[str, GeometricRestriction] = {} + geometricRestrictions: dict[str, GeometricRestriction] = {} #: A String specifying the optimization task repository key. name: str @@ -66,16 +66,16 @@ class BeadTask(OptimizationTask): areBCRegionsFrozen: Boolean = OFF #: An int specifying the step size of the optimization. The default value is 1. - beadIter: str = 1 + beadIter: int = 1 #: A float specifying maximum membrane/bending stress. The default value is 0.1. - beadMaxMembraneStress: str = 0 + beadMaxMembraneStress: float = 0 #: A float specifying minimum stress. The default value is 0.001. - beadMinStress: str = 0 + beadMinStress: float = 0 #: A Sets perturbation size for finite differences. The default value is 0.0001. - beadPerturbation: str = 0 + beadPerturbation: float = 0 #: A SymbolicConstant specifying the Optimization product default or a float specifying the #: bead width. The default value is DEFAULT. @@ -83,10 +83,10 @@ class BeadTask(OptimizationTask): #: A float specifying relative value to the middle element edge length such that normals in #: this area do not cross each other. The default value is 5. - curveSmooth: str = 5 + curveSmooth: float = 5 #: A float specifying the filter radius. The default value is 4. - filterRadius: str = 4 + filterRadius: float = 4 #: A SymbolicConstant specifying the method used to define filter radius. Possible values #: are VALUE and REFERENCE. The default is VALUE. @@ -148,13 +148,13 @@ def __init__( abaqusSensitivities: Boolean = True, algorithm: Literal[C.CONDITION_BASED_OPTIMIZATION, C.GENERAL_OPTIMIZATION] = GENERAL_OPTIMIZATION, areBCRegionsFrozen: Boolean = OFF, - beadIter: str = 1, - beadMaxMembraneStress: str = 0, - beadMinStress: str = 0, - beadPerturbation: str = 0, + beadIter: int = 1, + beadMaxMembraneStress: float = 0, + beadMinStress: float = 0, + beadPerturbation: float = 0, beadWidth: Literal[C.DEFAULT] = DEFAULT, - curveSmooth: str = 5, - filterRadius: str = 4, + curveSmooth: float = 5, + filterRadius: float = 4, filterRadiusBy: Literal[C.VALUE, C.REFERENCE] = VALUE, flipNormalDir: Boolean = OFF, frozenBoundaryConditionRegion: Literal[C.MODEL] = MODEL, @@ -263,13 +263,13 @@ def setValues( abaqusSensitivities: Boolean = True, algorithm: Literal[C.CONDITION_BASED_OPTIMIZATION, C.GENERAL_OPTIMIZATION] = GENERAL_OPTIMIZATION, areBCRegionsFrozen: Boolean = OFF, - beadIter: str = 1, - beadMaxMembraneStress: str = 0, - beadMinStress: str = 0, - beadPerturbation: str = 0, + beadIter: int = 1, + beadMaxMembraneStress: float = 0, + beadMinStress: float = 0, + beadPerturbation: float = 0, beadWidth: Literal[C.DEFAULT] = DEFAULT, - curveSmooth: str = 5, - filterRadius: str = 4, + curveSmooth: float = 5, + filterRadius: float = 4, filterRadiusBy: Literal[C.VALUE, C.REFERENCE] = VALUE, flipNormalDir: Boolean = OFF, frozenBoundaryConditionRegion: Literal[C.MODEL] = MODEL, diff --git a/src/abaqus/Optimization/CombinedTermDesignResponse.py b/src/abaqus/Optimization/CombinedTermDesignResponse.py index 6e18a17a3e..8d79bf06a0 100644 --- a/src/abaqus/Optimization/CombinedTermDesignResponse.py +++ b/src/abaqus/Optimization/CombinedTermDesignResponse.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -29,7 +29,7 @@ class CombinedTermDesignResponse(DesignResponse): #: None or a sequence of Floats specifying the maximum radius of influence used when #: **method** is FILTER. The default value is None. - filterMaxRadius: Optional[str] = None + filterMaxRadius: str | None = None #: A Float specifying the exponent used when **method** is FILTER. The default value is 1.0. filterExponent: float = 1 @@ -41,7 +41,7 @@ class CombinedTermDesignResponse(DesignResponse): #: None or a sequence of Floats specifying the upper bound of the vector value used when #: **method** is CUT_OFF. All values greater than the **highCutOff** are set to the #: **highCutOff** value. The default value is None. - highCutOff: Optional[str] = None + highCutOff: str | None = None #: A Float specifying the lower bound of the vector value used when **method** is CUT_OFF. #: All values less than the **lowCutOff** are treated as 0. The default value is 0.0. @@ -94,10 +94,10 @@ def __init__( self, name: str, terms: tuple, - filterMaxRadius: Optional[str] = None, + filterMaxRadius: str | None = None, filterExponent: float = 1, filterRadiusReduction: float = 0, - highCutOff: Optional[str] = None, + highCutOff: str | None = None, lowCutOff: float = 0, method: Literal[ C.ABSOLUTE_DIFFERENCE, @@ -213,10 +213,10 @@ def __init__( @abaqus_method_doc def setValues( self, - filterMaxRadius: Optional[str] = None, + filterMaxRadius: str | None = None, filterExponent: float = 1, filterRadiusReduction: float = 0, - highCutOff: Optional[str] = None, + highCutOff: str | None = None, lowCutOff: float = 0, method: Literal[ C.ABSOLUTE_DIFFERENCE, diff --git a/src/abaqus/Optimization/DesignDirection.py b/src/abaqus/Optimization/DesignDirection.py index b179076f6e..ec097b03b9 100644 --- a/src/abaqus/Optimization/DesignDirection.py +++ b/src/abaqus/Optimization/DesignDirection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -39,14 +39,14 @@ class DesignDirection(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: None or a Region object specifying the main point used when **mainPointDetermination** is #: SPECIFY. The default value is None. #: #: .. versionchanged:: 2022 #: The attribute ``masterPoint`` was renamed to ``mainPoint``. - mainPoint: Optional[str] = None + mainPoint: str | None = None #: A SymbolicConstant specifying the rule for assigning point priority. Possible values are #: MAXIMUM, MINIMUM, and SPECIFY. The default value is MAXIMUM. @@ -85,8 +85,8 @@ def __init__( self, name: str, region: Region, - csys: Optional[int] = None, - mainPoint: Optional[str] = None, + csys: int | None = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, movementRestriction: Literal[C.MAGNITUDE, C.DIRECTION, C.VECTOR] = VECTOR, presumeFeasibleRegionAtStart: Boolean = ON, @@ -156,8 +156,8 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, - mainPoint: Optional[str] = None, + csys: int | None = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, movementRestriction: Literal[C.MAGNITUDE, C.DIRECTION, C.VECTOR] = VECTOR, presumeFeasibleRegionAtStart: Boolean = ON, diff --git a/src/abaqus/Optimization/DrillControl.py b/src/abaqus/Optimization/DrillControl.py index ca3acc0ba5..45e4b6cb76 100644 --- a/src/abaqus/Optimization/DrillControl.py +++ b/src/abaqus/Optimization/DrillControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -38,7 +38,7 @@ class DrillControl(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Float specifying the draw angle. The default value is 0.0. drawAngle: float = 0 @@ -48,7 +48,7 @@ class DrillControl(GeometricRestriction): #: #: .. versionchanged:: 2022 #: The attribute ``masterPoint`` was renamed to ``mainPoint``. - mainPoint: Optional[str] = None + mainPoint: str | None = None #: A SymbolicConstant specifying the rule for assigning point priority. Possible values are #: MAXIMUM, MINIMUM, and SPECIFY. The default value is MAXIMUM. @@ -82,9 +82,9 @@ def __init__( name: str, clientDirection: tuple, region: Region, - csys: Optional[int] = None, + csys: int | None = None, drawAngle: float = 0, - mainPoint: Optional[str] = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, @@ -154,9 +154,9 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, + csys: int | None = None, drawAngle: float = 0, - mainPoint: Optional[str] = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, diff --git a/src/abaqus/Optimization/FixedRegion.py b/src/abaqus/Optimization/FixedRegion.py index 26cd882f1b..720fcf4e84 100644 --- a/src/abaqus/Optimization/FixedRegion.py +++ b/src/abaqus/Optimization/FixedRegion.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -30,7 +30,7 @@ class FixedRegion(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to ignore the geometric restriction in the first design #: cycle. The default value is ON. @@ -53,7 +53,7 @@ def __init__( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, presumeFeasibleRegionAtStart: Boolean = ON, u1: Boolean = OFF, u2: Boolean = OFF, @@ -101,7 +101,7 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, + csys: int | None = None, presumeFeasibleRegionAtStart: Boolean = ON, u1: Boolean = OFF, u2: Boolean = OFF, diff --git a/src/abaqus/Optimization/ObjectiveFunction.py b/src/abaqus/Optimization/ObjectiveFunction.py index d3378eb3f2..40fd546ed3 100644 --- a/src/abaqus/Optimization/ObjectiveFunction.py +++ b/src/abaqus/Optimization/ObjectiveFunction.py @@ -24,9 +24,6 @@ class ObjectiveFunction: #: A String specifying the objective function repository key. name: str - #: An OptimizationObjectiveArray object. - objectives: OptimizationObjectiveArray - #: A SymbolicConstant specifying the target of the objective function. Possible values are #: MINIMIZE, MAXIMIZE, and MINIMIZE_MAXIMUM. The default value is MINIMIZE. target: SymbolicConstant = MINIMIZE diff --git a/src/abaqus/Optimization/OptimizationObjective.py b/src/abaqus/Optimization/OptimizationObjective.py index 6fc290ef38..a4e1b1dc56 100644 --- a/src/abaqus/Optimization/OptimizationObjective.py +++ b/src/abaqus/Optimization/OptimizationObjective.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from abqpy.decorators import abaqus_class_doc diff --git a/src/abaqus/Optimization/OptimizationObjectiveArray.py b/src/abaqus/Optimization/OptimizationObjectiveArray.py index f1e0e0cafe..8e099cc892 100644 --- a/src/abaqus/Optimization/OptimizationObjectiveArray.py +++ b/src/abaqus/Optimization/OptimizationObjectiveArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .OptimizationObjective import OptimizationObjective diff --git a/src/abaqus/Optimization/OptimizationTask.py b/src/abaqus/Optimization/OptimizationTask.py index 1d9e955b51..cdbbc03d36 100644 --- a/src/abaqus/Optimization/OptimizationTask.py +++ b/src/abaqus/Optimization/OptimizationTask.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -82,13 +84,13 @@ def SingleTermDesignResponse( self, name: str, identifier: str, - csys: Optional[int] = None, - drivingRegion: Optional[str] = None, + csys: int | None = None, + drivingRegion: str | None = None, operation: Literal[C.SUM, C.MINIMUM, C.MAXIMUM] = SUM, region: Literal[C.MODEL] = MODEL, shellLayer: Literal[C.BOTTOM, C.TOP, C.MAXIMUM, C.MINIMUM, C.MIDDLE] = MAXIMUM, stepOperation: Literal[C.SUM, C.MINIMUM, C.MAXIMUM] = SUM, - stepOptions: Optional[StepOptionArray] = None, + stepOptions: StepOptionArray | None = None, ) -> SingleTermDesignResponse: """This method creates a SingleTermDesignResponse object. @@ -236,7 +238,7 @@ def BeadFilter( self, name: str, region: Region, - radius: float = None, + radius: float | None = None, filterRadiusBy: Literal[C.ABSOLUTE_VALUE, C.RELATIVE] = ABSOLUTE_VALUE, filterCheckRegion: Union[Literal[C.FILTER_REGION], Region] = FILTER_REGION, ): @@ -283,7 +285,7 @@ def BeadFixedRegion( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, u1: Boolean = OFF, u2: Boolean = OFF, u3: Boolean = OFF, @@ -389,7 +391,7 @@ def BeadPlanarSymmetry( name: str, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ) -> BeadPlanarSymmetry: """This method creates a BeadPlanarSymmetry object. @@ -421,7 +423,7 @@ def BeadPlanarSymmetry( return geometricRestriction @abaqus_method_doc - def BeadPointSymmetry(self, name: str, region: Region, csys: Optional[int] = None) -> BeadPointSymmetry: + def BeadPointSymmetry(self, name: str, region: Region, csys: int | None = None) -> BeadPointSymmetry: """This method creates a BeadPointSymmetry object. .. note:: @@ -455,7 +457,7 @@ def BeadRotationalSymmetry( angle: float, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ) -> BeadRotationalSymmetry: """This method creates a BeadRotationalSymmetry object. @@ -495,8 +497,8 @@ def DesignDirection( self, name: str, region: Region, - csys: Optional[int] = None, - mainPoint: Optional[str] = None, + csys: int | None = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, movementRestriction: Literal[C.MAGNITUDE, C.DIRECTION, C.VECTOR] = VECTOR, presumeFeasibleRegionAtStart: Boolean = ON, @@ -581,9 +583,9 @@ def DrillControl( name: str, clientDirection: tuple, region: Region, - csys: Optional[int] = None, + csys: int | None = None, drawAngle: float = 0, - mainPoint: Optional[str] = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, @@ -669,7 +671,7 @@ def FixedRegion( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, presumeFeasibleRegionAtStart: Boolean = ON, u1: Boolean = OFF, u2: Boolean = OFF, @@ -833,7 +835,7 @@ def ShapeDemoldControl( pullDirection: tuple, region: Region, collisionCheckRegion: Literal[C.DEMOLD_REGION] = DEMOLD_REGION, - csys: Optional[int] = None, + csys: int | None = None, drawAngle: float = 0, mainPointDetermination: Literal[C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, @@ -921,7 +923,7 @@ def ShapeMemberSize( maxThickness: float = 0, minThickness: float = 0, sizeRestriction: Literal[C.MINIMUM, C.MAXIMUM] = MINIMUM, - assignNodeGroupRegion: str = OFF, + assignNodeGroupRegion: Boolean = OFF, nodeGroupRegion: str = "", ) -> ShapeMemberSize: """This method creates a ShapeMemberSize object. @@ -980,7 +982,7 @@ def ShapePlanarSymmetry( clientDirection: tuple, region: Region, allowNonSymmetricMesh: Boolean = TRUE, - csys: Optional[int] = None, + csys: int | None = None, mainPointDetermination: Literal[C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, @@ -1059,7 +1061,7 @@ def ShapePointSymmetry( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, mainPointDetermination: Literal[C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, @@ -1129,11 +1131,11 @@ def ShapeRotationalSymmetry( region: Region, allowNonSymmetricMesh: Boolean = TRUE, angle: float = 0, - csys: Optional[int] = None, - mainPoint: Optional[str] = None, + csys: int | None = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, - startPoint: Optional[float] = None, + startPoint: float | None = None, tolerance1: float = 0, tolerance2: float = 0, tolerance3: float = 0, @@ -1252,7 +1254,7 @@ def SizingCyclicSymmetry( region: Region, translation: float, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ) -> SizingCyclicSymmetry: """This method creates a SizingCyclicSymmetry object. @@ -1348,7 +1350,7 @@ def SizingPlanarSymmetry( name: str, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ) -> SizingPlanarSymmetry: """This method creates a SizingPlanarSymmetry object. @@ -1389,7 +1391,7 @@ def SizingPointSymmetry( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ) -> SizingPointSymmetry: """This method creates a SizingPointSymmetry object. @@ -1429,7 +1431,7 @@ def SizingRotationalSymmetry( angle: float, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ) -> SizingRotationalSymmetry: """This method creates a SizingRotationalSymmetry object. @@ -1474,10 +1476,10 @@ def SlideRegionControl( clientDirection: tuple, region: Region, approach: Literal[C.FREE_FORM, C.TURN] = FREE_FORM, - csys: Optional[int] = None, - freeFormRegion: Optional[str] = None, + csys: int | None = None, + freeFormRegion: str | None = None, presumeFeasibleRegionAtStart: Boolean = ON, - revolvedRegion: Optional[str] = None, + revolvedRegion: str | None = None, tolerance1: float = 0, tolerance2: float = 0, tolerance3: float = 0, @@ -1555,9 +1557,9 @@ def StampControl( name: str, clientDirection: tuple, region: Region, - csys: Optional[int] = None, + csys: int | None = None, drawAngle: float = 0, - mainPoint: Optional[str] = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, @@ -1644,7 +1646,7 @@ def TopologyCyclicSymmetry( region: Region, translation: float, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ) -> TopologyCyclicSymmetry: """This method creates a TopologyCyclicSymmetry object. @@ -1690,10 +1692,10 @@ def TopologyDemoldControl( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, draftAngle: float = 0, collisionCheckRegion: Literal[C.DEMOLD_REGION] = DEMOLD_REGION, - pointRegion: Optional[Region] = None, + pointRegion: Region | None = None, pullDirection: tuple = (), technique: Literal[C.POINT, C.AUTO_TIGHT, C.SURFACE, C.STAMP, C.AUTO] = AUTO, ) -> TopologyDemoldControl: @@ -1802,9 +1804,9 @@ def TopologyMillingControl( name: str, millingDirections: tuple, region: Region, - csys: Optional[int] = None, + csys: int | None = None, millingCheckRegion: Literal[C.MILLING_REGION] = MILLING_REGION, - radius: Optional[float] = None, + radius: float | None = None, ) -> TopologyMillingControl: """This method creates a TopologyMillingControl object. @@ -1855,11 +1857,11 @@ def TopologyOverhangControl( name: str, pullDirection: tuple, region: Region, - csys: Optional[int] = None, + csys: int | None = None, draftAngle: float = 45, overhangCheckRegion: Literal[C.OVERHANG_REGION] = OVERHANG_REGION, pointRegion: Region = Region(), - radius: Optional[float] = None, + radius: float | None = None, technique: Literal[C.POINT, C.NONE, C.AUTO] = AUTO, ) -> TopologyOverhangControl: """This method creates a TopologyOverhangControl object. @@ -1926,7 +1928,7 @@ def TopologyPlanarSymmetry( name: str, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ) -> TopologyPlanarSymmetry: """This method creates a TopologyPlanarSymmetry object. @@ -1969,7 +1971,7 @@ def TopologyPointSymmetry( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ) -> TopologyPointSymmetry: """This method creates a TopologyPointSymmetry object. @@ -2012,7 +2014,7 @@ def TopologyRibDesign( ribThickness: float, ribDistance: float, region: Region, - csys: Optional[DatumCsys] = None, + csys: DatumCsys | None = None, ribDesignCheckRegion: Union[Literal[C.RIBDESIGN_REGION], Region] = RIBDESIGN_REGION, ): """This method creates a TopologyRibDesign object. @@ -2074,7 +2076,7 @@ def TopologyRotationalSymmetry( angle: float, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ) -> TopologyRotationalSymmetry: """This method creates a TopologyRotationalSymmetry object. @@ -2120,8 +2122,8 @@ def TurnControl( name: str, clientDirection: tuple, region: Region, - csys: Optional[int] = None, - mainPoint: Optional[str] = None, + csys: int | None = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, diff --git a/src/abaqus/Optimization/OptimizationTaskBase.py b/src/abaqus/Optimization/OptimizationTaskBase.py index d5f0641396..347cbdbe73 100644 --- a/src/abaqus/Optimization/OptimizationTaskBase.py +++ b/src/abaqus/Optimization/OptimizationTaskBase.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -31,16 +31,16 @@ class OptimizationTaskBase: region: SymbolicConstant = MODEL #: A repository of DesignResponse objects. - designResponses: Dict[str, DesignResponse] = {} + designResponses: dict[str, DesignResponse] = {} #: A repository of ObjectiveFunction objects. - objectiveFunctions: Dict[str, ObjectiveFunction] = {} + objectiveFunctions: dict[str, ObjectiveFunction] = {} #: A repository of OptimizationConstraint objects. - optimizationConstraints: Dict[str, OptimizationConstraint] = {} + optimizationConstraints: dict[str, OptimizationConstraint] = {} #: A repository of GeometricRestriction objects. - geometricRestrictions: Dict[str, GeometricRestriction] = {} + geometricRestrictions: dict[str, GeometricRestriction] = {} #: A repository of StopCondition objects. - stopConditions: Dict[str, StopCondition] = {} + stopConditions: dict[str, StopCondition] = {} diff --git a/src/abaqus/Optimization/OptimizationTaskModel.py b/src/abaqus/Optimization/OptimizationTaskModel.py index a02815c23d..e233c9174a 100644 --- a/src/abaqus/Optimization/OptimizationTaskModel.py +++ b/src/abaqus/Optimization/OptimizationTaskModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -50,13 +52,13 @@ def BeadTask( abaqusSensitivities: Boolean = True, algorithm: Literal[C.CONDITION_BASED_OPTIMIZATION, C.GENERAL_OPTIMIZATION] = GENERAL_OPTIMIZATION, areBCRegionsFrozen: Boolean = OFF, - beadIter: str = 1, - beadMaxMembraneStress: str = 0, - beadMinStress: str = 0, - beadPerturbation: str = 0, + beadIter: int = 1, + beadMaxMembraneStress: float = 0, + beadMinStress: float = 0, + beadPerturbation: float = 0, beadWidth: Literal[C.DEFAULT] = DEFAULT, - curveSmooth: str = 5, - filterRadius: str = 4, + curveSmooth: float = 5, + filterRadius: float = 4, filterRadiusBy: Literal[C.VALUE, C.REFERENCE] = VALUE, flipNormalDir: Boolean = OFF, frozenBoundaryConditionRegion: Literal[C.MODEL] = MODEL, @@ -195,23 +197,23 @@ def ShapeTask( curvatureSmoothingEdgeLength: float = 5, durabilityInputfile: str = "", durabilitySolver: str = FE_SAFE, - equalityConstraintTolerance: Optional[float] = None, + equalityConstraintTolerance: float | None = None, featureRecognitionAngle: float = 30, filterExponent: float = 1, - filterMaxRadius: Optional[float] = None, - filterRadiusReduction: Optional[float] = None, + filterMaxRadius: float | None = None, + filterRadiusReduction: float | None = None, firstCycleDeletedVolumeTechnique: Union[Literal[C.PERCENTAGE, C.ABSOLUTE], Boolean] = OFF, freezeBoundaryConditionRegions: Boolean = OFF, frozenBoundaryConditionRegion: Literal[C.MODEL] = MODEL, geometricRestrictionEvaluationFrequency: Literal[C.LOW, C.MEDIUM, C.HIGH] = LOW, growthScaleFactor: float = 1, haltUponViolation: Boolean = OFF, - layerReferenceRegion: Optional[str] = None, + layerReferenceRegion: str | None = None, meshSmoothingRegionMethod: Literal[C.NUMBER_OF_LAYERS, C.REGION, C.TASK_REGION_LAYERS] = TASK_REGION_LAYERS, meshSmoothingStrategy: Literal[C.CONSTRAINED_LAPLACIAN, C.LOCAL_GRADIENT] = CONSTRAINED_LAPLACIAN, midsideInterpolation: Literal[C.POSITIONS, C.OPTIMIZATION_DISPLACEMENT] = POSITIONS, - numFreeNodeLayers: Literal[C.FIX_NONE] = 0, - numSmoothedElementLayers: Optional[int] = None, + numFreeNodeLayers: Literal[C.FIX_NONE] | int = 0, + numSmoothedElementLayers: int | None = None, presumeFeasibleBCRegionAtStart: Boolean = ON, quadMaxAngle: float = 160, quadMinAngle: float = 20, @@ -221,7 +223,7 @@ def ShapeTask( reportPoorQualityElements: Boolean = OFF, reportQualityViolation: Boolean = OFF, shrinkScaleFactor: float = 1, - smoothingRegion: Optional[str] = None, + smoothingRegion: str | None = None, targetMeshQuality: Literal[C.LOW, C.MEDIUM, C.NONE, C.HIGH] = LOW, tetAspectRatio: float = 100, tetMaxAspect: float = 8, @@ -551,7 +553,7 @@ def TopologyTask( densityMoveLimit: float = 0, densityUpdateStrategy: Literal[C.AGGRESSIVE, C.NORMAL, C.CONSERVATIVE] = NORMAL, elementDensityDeltaStopCriteria: float = 0, - filterRadius: Optional[float] = None, + filterRadius: float | None = None, firstCycleDeletedVolume: float = 5, firstCycleDeletedVolumeTechnique: Union[Literal[C.PERCENTAGE, C.ABSOLUTE], Boolean] = OFF, freezeBoundaryConditionRegions: Boolean = OFF, @@ -561,12 +563,12 @@ def TopologyTask( materialInterpolationPenalty: float = 3, materialInterpolationTechnique: Literal[C.SIMP, C.DEFAULT, C.RAMP] = DEFAULT, maxDensity: float = 1, - minDensity: Optional[float] = None, + minDensity: float | None = None, modeTrackingRegion: Literal[C.MODEL] = MODEL, numDesignCycles: int = 15, numFulfilledStopCriteria: int = 2, numTrackedModes: int = 5, - objectiveFunctionDeltaStopCriteria: Optional[float] = None, + objectiveFunctionDeltaStopCriteria: float | None = None, region: Literal[C.MODEL] = MODEL, softDeletionMethod: Literal[ C.STANDARD, @@ -577,14 +579,14 @@ def TopologyTask( C.MAX_ELASTOPLASTIC_STRAIN, ] = STANDARD, softDeletionRadius: float = 0, - softDeletionRegion: Optional[str] = None, - softDeletionThreshold: Optional[float] = None, + softDeletionRegion: str | None = None, + softDeletionThreshold: float | None = None, stepSize: Literal[C.SMALL, C.LARGE, C.MODERATE, C.VERY_SMALL, C.DYNAMIC, C.MEDIUM] = MEDIUM, stiffnessMassDamping: Union[Literal[C.AVERAGE_EDGE_LENGTH], float] = AVERAGE_EDGE_LENGTH, stopCriteriaDesignCycle: int = 4, - structuralMassDamping: Optional[float] = None, - viscousMassDamping: Optional[float] = None, - viscousStiffnessDamping: Optional[float] = None, + structuralMassDamping: float | None = None, + viscousMassDamping: float | None = None, + viscousStiffnessDamping: float | None = None, groupOperator: Boolean = OFF, ) -> TopologyTask: """This method creates a TopologyTask object. diff --git a/src/abaqus/Optimization/ShapeDemoldControl.py b/src/abaqus/Optimization/ShapeDemoldControl.py index 122bae9cc3..ed92e14a78 100644 --- a/src/abaqus/Optimization/ShapeDemoldControl.py +++ b/src/abaqus/Optimization/ShapeDemoldControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -49,7 +49,7 @@ class ShapeDemoldControl(GeometricRestriction): #: **pullDirection**. If **csys** = None, the global coordinate system is used. When this member #: is queried, it returns an Int indicating the identifier of the DatumCsys. The default #: value is None. - csys: Optional[int] = None + csys: int | None = None #: A Float specifying the draw angle. The default value is 0.0. drawAngle: float = 0 @@ -87,7 +87,7 @@ def __init__( pullDirection: tuple, region: Region, collisionCheckRegion: Literal[C.DEMOLD_REGION] = DEMOLD_REGION, - csys: Optional[int] = None, + csys: int | None = None, drawAngle: float = 0, mainPointDetermination: Literal[C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, @@ -157,7 +157,7 @@ def __init__( def setValues( self, collisionCheckRegion: Literal[C.DEMOLD_REGION] = DEMOLD_REGION, - csys: Optional[int] = None, + csys: int | None = None, drawAngle: float = 0, mainPointDetermination: Literal[C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, diff --git a/src/abaqus/Optimization/ShapePlanarSymmetry.py b/src/abaqus/Optimization/ShapePlanarSymmetry.py index f70bdbbd6f..390646c7de 100644 --- a/src/abaqus/Optimization/ShapePlanarSymmetry.py +++ b/src/abaqus/Optimization/ShapePlanarSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -44,7 +44,7 @@ class ShapePlanarSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to allow a nonsymmetric mesh for this geometric #: restriction. The default value is TRUE. @@ -80,7 +80,7 @@ def __init__( clientDirection: tuple, region: Region, allowNonSymmetricMesh: Boolean = TRUE, - csys: Optional[int] = None, + csys: int | None = None, mainPointDetermination: Literal[C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, @@ -143,7 +143,7 @@ def __init__( def setValues( self, allowNonSymmetricMesh: Boolean = TRUE, - csys: Optional[int] = None, + csys: int | None = None, mainPointDetermination: Literal[C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, diff --git a/src/abaqus/Optimization/ShapePointSymmetry.py b/src/abaqus/Optimization/ShapePointSymmetry.py index 6f59a73826..3f42a50f69 100644 --- a/src/abaqus/Optimization/ShapePointSymmetry.py +++ b/src/abaqus/Optimization/ShapePointSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -33,7 +33,7 @@ class ShapePointSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the symmetry point represented as the origin of a #: local coordinate system. If **csys** = None, the global coordinate system is used. When this #: member is queried, it returns an Int. The default value is None. - csys: Optional[int] = None + csys: int | None = None #: A SymbolicConstant specifying the rule for determining the main node. Possible values #: are MAXIMUM and MINIMUM. The default value is MAXIMUM. @@ -63,7 +63,7 @@ def __init__( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, mainPointDetermination: Literal[C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, @@ -118,7 +118,7 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, + csys: int | None = None, mainPointDetermination: Literal[C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, diff --git a/src/abaqus/Optimization/ShapeRotationalSymmetry.py b/src/abaqus/Optimization/ShapeRotationalSymmetry.py index 716629e0a4..cae5ee3c51 100644 --- a/src/abaqus/Optimization/ShapeRotationalSymmetry.py +++ b/src/abaqus/Optimization/ShapeRotationalSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -48,7 +48,7 @@ class ShapeRotationalSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to allow a nonsymmetric mesh for this geometric #: restriction. The default value is TRUE. @@ -62,7 +62,7 @@ class ShapeRotationalSymmetry(GeometricRestriction): #: #: .. versionchanged:: 2022 #: The attribute ``masterPoint`` was renamed to ``mainPoint``. - mainPoint: Optional[str] = None + mainPoint: str | None = None #: A SymbolicConstant specifying the rule for determining the main node. Possible values #: are MAXIMUM, MINIMUM, and SPECIFY. The default value is MAXIMUM. @@ -77,7 +77,7 @@ class ShapeRotationalSymmetry(GeometricRestriction): #: A tuple of Floats representing the coordinates of a start point of the rotational #: symmetry. - startPoint: Optional[float] = None + startPoint: float | None = None #: A Float specifying the geometric tolerance in the 1-direction. The default value is #: 0.01. @@ -99,11 +99,11 @@ def __init__( region: Region, allowNonSymmetricMesh: Boolean = TRUE, angle: float = 0, - csys: Optional[int] = None, - mainPoint: Optional[str] = None, + csys: int | None = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, - startPoint: Optional[float] = None, + startPoint: float | None = None, tolerance1: float = 0, tolerance2: float = 0, tolerance3: float = 0, @@ -180,11 +180,11 @@ def setValues( self, allowNonSymmetricMesh: Boolean = TRUE, angle: float = 0, - csys: Optional[int] = None, - mainPoint: Optional[str] = None, + csys: int | None = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, - startPoint: Optional[float] = None, + startPoint: float | None = None, tolerance1: float = 0, tolerance2: float = 0, tolerance3: float = 0, diff --git a/src/abaqus/Optimization/ShapeTask.py b/src/abaqus/Optimization/ShapeTask.py index 051610e94f..1b385f72c8 100644 --- a/src/abaqus/Optimization/ShapeTask.py +++ b/src/abaqus/Optimization/ShapeTask.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -42,19 +44,19 @@ class ShapeTask(OptimizationTask): """ #: A repository of DesignResponse objects. - designResponses: Dict[str, DesignResponse] = {} + designResponses: dict[str, DesignResponse] = {} #: A repository of ObjectiveFunction objects. - objectiveFunctions: Dict[str, ObjectiveFunction] = {} + objectiveFunctions: dict[str, ObjectiveFunction] = {} #: A repository of OptimizationConstraint objects. - optimizationConstraints: Dict[str, OptimizationConstraint] = {} + optimizationConstraints: dict[str, OptimizationConstraint] = {} #: A repository of GeometricRestriction objects. - geometricRestrictions: Dict[str, GeometricRestriction] = {} + geometricRestrictions: dict[str, GeometricRestriction] = {} #: A repository of StopCondition objects. - stopConditions: Dict[str, StopCondition] = {} + stopConditions: dict[str, StopCondition] = {} #: A String specifying the optimization task repository key. name: str @@ -96,7 +98,7 @@ class ShapeTask(OptimizationTask): durabilitySolver: str = FE_SAFE #: A Float specifying the equality constraint tolerance. The default value is 10⁻³. - equalityConstraintTolerance: Optional[float] = None + equalityConstraintTolerance: float | None = None #: A Float specifying the mesh smoothing feature recognition angle for edges and corners. #: The default value is 30.0. @@ -108,11 +110,11 @@ class ShapeTask(OptimizationTask): #: None or a Float specifying the maximum influence radius for equivalent stress. The #: default value is None. - filterMaxRadius: Optional[float] = None + filterMaxRadius: float | None = None #: None or a Float specifying the reduction of the radius depending on surface bending, #: used when **filterMaxRadius** is specified. The default value is None. - filterRadiusReduction: Optional[float] = None + filterRadiusReduction: float | None = None #: A SymbolicConstant specifying the method of specifying volume that can be removed #: immediately in the first design cycle. Possible values are OFF, PERCENTAGE, and @@ -143,7 +145,7 @@ class ShapeTask(OptimizationTask): #: None or a Region object specifying the region specifying the first node layer for mesh #: smoothing, used when **meshSmoothingRegionMethod** is TASK_REGION_LAYERS. The default #: value is None. - layerReferenceRegion: Optional[str] = None + layerReferenceRegion: str | None = None #: A SymbolicConstant specifying the method used to determine the mesh smoothing region. #: The REGION value uses the **smoothingRegion**. The NUMBER_OF_LAYERS value uses the @@ -166,11 +168,11 @@ class ShapeTask(OptimizationTask): #: The SymbolicConstant FIX_NONE or an Int specifying the number of node layers adjoining #: the task region to remain free during mesh smoothing. A value of 0 indicates that no #: layers are free and all layers are fixed. The default value is 0. - numFreeNodeLayers: SymbolicConstant = 0 + numFreeNodeLayers: SymbolicConstant | int = 0 #: None or an Int specifying the number of layers for mesh smoothing when #: **meshSmoothingRegionMethod** is NUMBER_OF_LAYERS. The default value is None. - numSmoothedElementLayers: Optional[int] = None + numSmoothedElementLayers: int | None = None #: A Boolean specifying whether to ignore automatically frozen boundary condition regions #: in the first design cycle. This is used with **freezeBoundaryConditionRegions**. The @@ -211,7 +213,7 @@ class ShapeTask(OptimizationTask): #: None or a Region object specifying the mesh smoothing region, used when #: **meshSmoothingRegionMethod** is REGION. The default value is None. - smoothingRegion: Optional[str] = None + smoothingRegion: str | None = None #: A SymbolicConstant specifying the target mesh quality for mesh smoothing. Possible #: values are NONE, LOW, MEDIUM, and HIGH. The default value is LOW. @@ -266,23 +268,23 @@ def __init__( curvatureSmoothingEdgeLength: float = 5, durabilityInputfile: str = "", durabilitySolver: str = FE_SAFE, - equalityConstraintTolerance: Optional[float] = None, + equalityConstraintTolerance: float | None = None, featureRecognitionAngle: float = 30, filterExponent: float = 1, - filterMaxRadius: Optional[float] = None, - filterRadiusReduction: Optional[float] = None, + filterMaxRadius: float | None = None, + filterRadiusReduction: float | None = None, firstCycleDeletedVolumeTechnique: Union[Literal[C.PERCENTAGE, C.ABSOLUTE], Boolean] = OFF, freezeBoundaryConditionRegions: Boolean = OFF, frozenBoundaryConditionRegion: Literal[C.MODEL] = MODEL, geometricRestrictionEvaluationFrequency: Literal[C.LOW, C.MEDIUM, C.HIGH] = LOW, growthScaleFactor: float = 1, haltUponViolation: Boolean = OFF, - layerReferenceRegion: Optional[str] = None, + layerReferenceRegion: str | None = None, meshSmoothingRegionMethod: Literal[C.NUMBER_OF_LAYERS, C.REGION, C.TASK_REGION_LAYERS] = TASK_REGION_LAYERS, meshSmoothingStrategy: Literal[C.CONSTRAINED_LAPLACIAN, C.LOCAL_GRADIENT] = CONSTRAINED_LAPLACIAN, midsideInterpolation: Literal[C.POSITIONS, C.OPTIMIZATION_DISPLACEMENT] = POSITIONS, - numFreeNodeLayers: Literal[C.FIX_NONE] = 0, - numSmoothedElementLayers: Optional[int] = None, + numFreeNodeLayers: Literal[C.FIX_NONE] | int = 0, + numSmoothedElementLayers: int | None = None, presumeFeasibleBCRegionAtStart: Boolean = ON, quadMaxAngle: float = 160, quadMinAngle: float = 20, @@ -292,7 +294,7 @@ def __init__( reportPoorQualityElements: Boolean = OFF, reportQualityViolation: Boolean = OFF, shrinkScaleFactor: float = 1, - smoothingRegion: Optional[str] = None, + smoothingRegion: str | None = None, targetMeshQuality: Literal[C.LOW, C.MEDIUM, C.NONE, C.HIGH] = LOW, tetAspectRatio: float = 100, tetMaxAspect: float = 8, @@ -485,23 +487,23 @@ def setValues( curvatureSmoothingEdgeLength: float = 5, durabilityInputfile: str = "", durabilitySolver: str = FE_SAFE, - equalityConstraintTolerance: Optional[float] = None, + equalityConstraintTolerance: float | None = None, featureRecognitionAngle: float = 30, filterExponent: float = 1, - filterMaxRadius: Optional[float] = None, - filterRadiusReduction: Optional[float] = None, + filterMaxRadius: float | None = None, + filterRadiusReduction: float | None = None, firstCycleDeletedVolumeTechnique: Union[Literal[C.PERCENTAGE, C.ABSOLUTE], Boolean] = OFF, freezeBoundaryConditionRegions: Boolean = OFF, frozenBoundaryConditionRegion: Literal[C.MODEL] = MODEL, geometricRestrictionEvaluationFrequency: Literal[C.LOW, C.MEDIUM, C.HIGH] = LOW, growthScaleFactor: float = 1, haltUponViolation: Boolean = OFF, - layerReferenceRegion: Optional[str] = None, + layerReferenceRegion: str | None = None, meshSmoothingRegionMethod: Literal[C.NUMBER_OF_LAYERS, C.REGION, C.TASK_REGION_LAYERS] = TASK_REGION_LAYERS, meshSmoothingStrategy: Literal[C.CONSTRAINED_LAPLACIAN, C.LOCAL_GRADIENT] = CONSTRAINED_LAPLACIAN, midsideInterpolation: Literal[C.POSITIONS, C.OPTIMIZATION_DISPLACEMENT] = POSITIONS, - numFreeNodeLayers: Literal[C.FIX_NONE] = 0, - numSmoothedElementLayers: Optional[int] = None, + numFreeNodeLayers: Literal[C.FIX_NONE] | int = 0, + numSmoothedElementLayers: int | None = None, presumeFeasibleBCRegionAtStart: Boolean = ON, quadMaxAngle: float = 160, quadMinAngle: float = 20, @@ -511,7 +513,7 @@ def setValues( reportPoorQualityElements: Boolean = OFF, reportQualityViolation: Boolean = OFF, shrinkScaleFactor: float = 1, - smoothingRegion: Optional[str] = None, + smoothingRegion: str | None = None, targetMeshQuality: Literal[C.LOW, C.MEDIUM, C.NONE, C.HIGH] = LOW, tetAspectRatio: float = 100, tetMaxAspect: float = 8, diff --git a/src/abaqus/Optimization/SingleTermDesignResponse.py b/src/abaqus/Optimization/SingleTermDesignResponse.py index d6e65cb053..793fe9a59a 100644 --- a/src/abaqus/Optimization/SingleTermDesignResponse.py +++ b/src/abaqus/Optimization/SingleTermDesignResponse.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -31,11 +31,11 @@ class SingleTermDesignResponse(DesignResponse): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: None or a sequence of Floats specifying the driving region used when **identifier** is an #: internal nodal variable. The default value is None. - drivingRegion: Optional[str] = None + drivingRegion: str | None = None #: A SymbolicConstant specifying the operation used on values in the region. Possible #: values are MAXIMUM, MINIMUM, and SUM. The default value is SUM. @@ -54,20 +54,20 @@ class SingleTermDesignResponse(DesignResponse): stepOperation: SymbolicConstant = SUM #: A StepOptionArray object. - stepOptions: Optional[StepOptionArray] = None + stepOptions: StepOptionArray | None = None @abaqus_method_doc def __init__( self, name: str, identifier: str, - csys: Optional[int] = None, - drivingRegion: Optional[str] = None, + csys: int | None = None, + drivingRegion: str | None = None, operation: Literal[C.SUM, C.MINIMUM, C.MAXIMUM] = SUM, region: Literal[C.MODEL] = MODEL, shellLayer: Literal[C.BOTTOM, C.TOP, C.MAXIMUM, C.MINIMUM, C.MIDDLE] = MAXIMUM, stepOperation: Literal[C.SUM, C.MINIMUM, C.MAXIMUM] = SUM, - stepOptions: Optional[StepOptionArray] = None, + stepOptions: StepOptionArray | None = None, ): """This method creates a SingleTermDesignResponse object. @@ -114,13 +114,13 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, - drivingRegion: Optional[str] = None, + csys: int | None = None, + drivingRegion: str | None = None, operation: Literal[C.SUM, C.MINIMUM, C.MAXIMUM] = SUM, region: Literal[C.MODEL] = MODEL, shellLayer: Literal[C.BOTTOM, C.TOP, C.MAXIMUM, C.MINIMUM, C.MIDDLE] = MAXIMUM, stepOperation: Literal[C.SUM, C.MINIMUM, C.MAXIMUM] = SUM, - stepOptions: Optional[StepOptionArray] = None, + stepOptions: StepOptionArray | None = None, ): """This method modifies the SingleTermDesignResponse object. diff --git a/src/abaqus/Optimization/SizingClusterAreas.py b/src/abaqus/Optimization/SizingClusterAreas.py index 75fa419dcb..2d408da4fd 100644 --- a/src/abaqus/Optimization/SizingClusterAreas.py +++ b/src/abaqus/Optimization/SizingClusterAreas.py @@ -18,7 +18,7 @@ class SizingClusterAreas(GeometricRestriction): #: A String specifying the geometric restriction repository key. name: str - #: Tuple of Region objects specifying the regions to which the geometric restriction is + #: tuple of Region objects specifying the regions to which the geometric restriction is #: applied. regions: tuple diff --git a/src/abaqus/Optimization/SizingCyclicSymmetry.py b/src/abaqus/Optimization/SizingCyclicSymmetry.py index 222b0418e8..9404e11b78 100644 --- a/src/abaqus/Optimization/SizingCyclicSymmetry.py +++ b/src/abaqus/Optimization/SizingCyclicSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -39,7 +39,7 @@ class SizingCyclicSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to ignore frozen areas. The default value is OFF. ignoreFrozenArea: Boolean = OFF @@ -51,7 +51,7 @@ def __init__( region: Region, translation: float, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method creates a SizingCyclicSymmetry object. @@ -91,7 +91,7 @@ def __init__( def setValues( self, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method modifies the SizingCyclicSymmetry object. diff --git a/src/abaqus/Optimization/SizingPlanarSymmetry.py b/src/abaqus/Optimization/SizingPlanarSymmetry.py index 809c62d287..1b7185fbfd 100644 --- a/src/abaqus/Optimization/SizingPlanarSymmetry.py +++ b/src/abaqus/Optimization/SizingPlanarSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -35,7 +35,7 @@ class SizingPlanarSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to ignore frozen areas. The default value is OFF. ignoreFrozenArea: Boolean = OFF @@ -46,7 +46,7 @@ def __init__( name: str, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method creates a SizingPlanarSymmetry object. diff --git a/src/abaqus/Optimization/SizingPointSymmetry.py b/src/abaqus/Optimization/SizingPointSymmetry.py index d3705d9b68..6bea36b448 100644 --- a/src/abaqus/Optimization/SizingPointSymmetry.py +++ b/src/abaqus/Optimization/SizingPointSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -28,7 +28,7 @@ class SizingPointSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the position of the symmetry point defined as the #: origin of a local coordinate system. If **csys** = None, the global coordinate system is #: used. When this member is queried, it returns an Int. The default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to ignore frozen areas. The default value is OFF. ignoreFrozenArea: Boolean = OFF @@ -38,7 +38,7 @@ def __init__( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method creates a SizingPointSymmetry object. @@ -69,7 +69,7 @@ def __init__( super().__init__() @abaqus_method_doc - def setValues(self, csys: Optional[int] = None, ignoreFrozenArea: Boolean = OFF): + def setValues(self, csys: int | None = None, ignoreFrozenArea: Boolean = OFF): """This method modifies the SizingPointSymmetry object. Parameters diff --git a/src/abaqus/Optimization/SizingRotationalSymmetry.py b/src/abaqus/Optimization/SizingRotationalSymmetry.py index 22d5662c04..503bae4fa8 100644 --- a/src/abaqus/Optimization/SizingRotationalSymmetry.py +++ b/src/abaqus/Optimization/SizingRotationalSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -38,7 +38,7 @@ class SizingRotationalSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to ignore frozen areas. The default value is OFF. ignoreFrozenArea: Boolean = OFF @@ -50,7 +50,7 @@ def __init__( angle: float, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method creates a SizingRotationalSymmetry object. @@ -89,7 +89,7 @@ def __init__( def setValues( self, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method modifies the SizingRotationalSymmetry object. diff --git a/src/abaqus/Optimization/SizingTask.py b/src/abaqus/Optimization/SizingTask.py index cfcc23a7bc..ebb2b776f3 100644 --- a/src/abaqus/Optimization/SizingTask.py +++ b/src/abaqus/Optimization/SizingTask.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from typing_extensions import Literal @@ -34,19 +34,19 @@ class SizingTask(OptimizationTask): """ #: A repository of DesignResponse objects. - designResponses: Dict[str, DesignResponse] = {} + designResponses: dict[str, DesignResponse] = {} #: A repository of ObjectiveFunction objects. - objectiveFunctions: Dict[str, ObjectiveFunction] = {} + objectiveFunctions: dict[str, ObjectiveFunction] = {} #: A repository of OptimizationConstraint objects. - optimizationConstraints: Dict[str, OptimizationConstraint] = {} + optimizationConstraints: dict[str, OptimizationConstraint] = {} #: A repository of GeometricRestriction objects. - geometricRestrictions: Dict[str, GeometricRestriction] = {} + geometricRestrictions: dict[str, GeometricRestriction] = {} #: A repository of StopCondition objects. - stopConditions: Dict[str, StopCondition] = {} + stopConditions: dict[str, StopCondition] = {} #: A String specifying the optimization task repository key. name: str diff --git a/src/abaqus/Optimization/SlideRegionControl.py b/src/abaqus/Optimization/SlideRegionControl.py index 733b968dd9..c3d9839637 100644 --- a/src/abaqus/Optimization/SlideRegionControl.py +++ b/src/abaqus/Optimization/SlideRegionControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -44,11 +44,11 @@ class SlideRegionControl(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. This #: is used when **approach** is TURN. The default value is None. - csys: Optional[int] = None + csys: int | None = None #: None or a Region object specifying the free-form region. This is used when **approach** is #: FREE_FORM. The default value is None. - freeFormRegion: Optional[str] = None + freeFormRegion: str | None = None #: A Boolean specifying whether to ignore the geometric restriction in the first design #: cycle. The default value is ON. @@ -56,7 +56,7 @@ class SlideRegionControl(GeometricRestriction): #: None or a Region object specifying the region to revolve into a slide region. This is #: used when **approach** is TURN. The default value is None. - revolvedRegion: Optional[str] = None + revolvedRegion: str | None = None #: A Float specifying the geometric tolerance in the 1-direction. This is used when #: **approach** is TURN. The default value is 0.01. @@ -77,10 +77,10 @@ def __init__( clientDirection: tuple, region: Region, approach: Literal[C.FREE_FORM, C.TURN] = FREE_FORM, - csys: Optional[int] = None, - freeFormRegion: Optional[str] = None, + csys: int | None = None, + freeFormRegion: str | None = None, presumeFeasibleRegionAtStart: Boolean = ON, - revolvedRegion: Optional[str] = None, + revolvedRegion: str | None = None, tolerance1: float = 0, tolerance2: float = 0, tolerance3: float = 0, @@ -143,10 +143,10 @@ def __init__( def setValues( self, approach: Literal[C.FREE_FORM, C.TURN] = FREE_FORM, - csys: Optional[int] = None, - freeFormRegion: Optional[str] = None, + csys: int | None = None, + freeFormRegion: str | None = None, presumeFeasibleRegionAtStart: Boolean = ON, - revolvedRegion: Optional[str] = None, + revolvedRegion: str | None = None, tolerance1: float = 0, tolerance2: float = 0, tolerance3: float = 0, diff --git a/src/abaqus/Optimization/StampControl.py b/src/abaqus/Optimization/StampControl.py index 2996a1b393..25cebc06e6 100644 --- a/src/abaqus/Optimization/StampControl.py +++ b/src/abaqus/Optimization/StampControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -37,7 +37,7 @@ class StampControl(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Float specifying the draw angle. The default value is 0.0. drawAngle: float = 0 @@ -47,7 +47,7 @@ class StampControl(GeometricRestriction): #: #: .. versionchanged:: 2022 #: The attribute ``masterPoint`` was renamed to ``mainPoint``. - mainPoint: Optional[str] = None + mainPoint: str | None = None #: A SymbolicConstant specifying the rule for assigning point priority. Possible values are #: MAXIMUM, MINIMUM, and SPECIFY. The default value is MAXIMUM. @@ -81,9 +81,9 @@ def __init__( name: str, clientDirection: tuple, region: Region, - csys: Optional[int] = None, + csys: int | None = None, drawAngle: float = 0, - mainPoint: Optional[str] = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, @@ -152,9 +152,9 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, + csys: int | None = None, drawAngle: float = 0, - mainPoint: Optional[str] = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, diff --git a/src/abaqus/Optimization/StepOptionArray.py b/src/abaqus/Optimization/StepOptionArray.py index 93b019a0f3..8126f41d05 100644 --- a/src/abaqus/Optimization/StepOptionArray.py +++ b/src/abaqus/Optimization/StepOptionArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .StepOption import StepOption diff --git a/src/abaqus/Optimization/TopologyCyclicSymmetry.py b/src/abaqus/Optimization/TopologyCyclicSymmetry.py index f1358e6102..880ad033e4 100644 --- a/src/abaqus/Optimization/TopologyCyclicSymmetry.py +++ b/src/abaqus/Optimization/TopologyCyclicSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -41,7 +41,7 @@ class TopologyCyclicSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to ignore frozen areas. The default value is OFF. ignoreFrozenArea: Boolean = OFF @@ -53,7 +53,7 @@ def __init__( region: Region, translation: float, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method creates a TopologyCyclicSymmetry object. @@ -95,7 +95,7 @@ def __init__( def setValues( self, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method modifies the TopologyCyclicSymmetry object. diff --git a/src/abaqus/Optimization/TopologyDemoldControl.py b/src/abaqus/Optimization/TopologyDemoldControl.py index 1b3053c10f..3c4f5a0839 100644 --- a/src/abaqus/Optimization/TopologyDemoldControl.py +++ b/src/abaqus/Optimization/TopologyDemoldControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -34,7 +34,7 @@ class TopologyDemoldControl(GeometricRestriction): #: **pullDirection**. If **csys** = None, the global coordinate system is used. When this member #: is queried, it returns an Int indicating the identifier of the DatumCsys. The default #: value is None. - csys: Optional[int] = None + csys: int | None = None #: A Float specifying the draft angle. The default value is 0.0. draftAngle: float = 0 @@ -46,7 +46,7 @@ class TopologyDemoldControl(GeometricRestriction): #: A Region object specifying the point on a plane perpendicular to the pull direction, #: used to specify the central plane when **technique** is POINT. - pointRegion: Optional[Region] = None + pointRegion: Region | None = None #: A VertexArray object of length 2 specifying the demold pull direction. Instead of #: through a ConstrainedSketchVertex, each point may be specified through a tuple of coordinates. @@ -61,10 +61,10 @@ def __init__( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, draftAngle: float = 0, collisionCheckRegion: Literal[C.DEMOLD_REGION] = DEMOLD_REGION, - pointRegion: Optional[Region] = None, + pointRegion: Region | None = None, pullDirection: tuple = (), technique: Literal[C.POINT, C.AUTO_TIGHT, C.SURFACE, C.STAMP, C.AUTO] = AUTO, ): @@ -114,10 +114,10 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, + csys: int | None = None, draftAngle: float = 0, collisionCheckRegion: Literal[C.DEMOLD_REGION] = DEMOLD_REGION, - pointRegion: Optional[Region] = None, + pointRegion: Region | None = None, pullDirection: tuple = (), technique: Literal[C.POINT, C.AUTO_TIGHT, C.SURFACE, C.STAMP, C.AUTO] = AUTO, ): diff --git a/src/abaqus/Optimization/TopologyMillingControl.py b/src/abaqus/Optimization/TopologyMillingControl.py index fd14042333..157cea6d37 100644 --- a/src/abaqus/Optimization/TopologyMillingControl.py +++ b/src/abaqus/Optimization/TopologyMillingControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -39,7 +39,7 @@ class TopologyMillingControl(GeometricRestriction): #: **millingDirections**. If **csys** = None, the global coordinate system is used. When this #: member is queried, it returns an Int indicating the identifier of the DatumCsys. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: The SymbolicConstant MILLING_REGION or a Region object specifying the milling check #: region. If the value is MILLING_REGION, the value of **region** is used as both the @@ -49,7 +49,7 @@ class TopologyMillingControl(GeometricRestriction): #: A Float specifying the radius for the collision check during the removal of the elements #: for the milling criteria. - radius: Optional[float] = None + radius: float | None = None @abaqus_method_doc def __init__( @@ -57,9 +57,9 @@ def __init__( name: str, millingDirections: tuple, region: Region, - csys: Optional[int] = None, + csys: int | None = None, millingCheckRegion: Literal[C.MILLING_REGION] = MILLING_REGION, - radius: Optional[float] = None, + radius: float | None = None, ): """This method creates a TopologyMillingControl object. @@ -101,9 +101,9 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, + csys: int | None = None, millingCheckRegion: Literal[C.MILLING_REGION] = MILLING_REGION, - radius: Optional[float] = None, + radius: float | None = None, ): """This method modifies the TopologyMillingControl object. diff --git a/src/abaqus/Optimization/TopologyOverhangControl.py b/src/abaqus/Optimization/TopologyOverhangControl.py index dd42d315e3..2449b44b51 100644 --- a/src/abaqus/Optimization/TopologyOverhangControl.py +++ b/src/abaqus/Optimization/TopologyOverhangControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -31,11 +31,11 @@ def __init__( name: str, pullDirection: tuple, region: Region, - csys: Optional[int] = None, + csys: int | None = None, draftAngle: float = 45, overhangCheckRegion: Literal[C.OVERHANG_REGION] = OVERHANG_REGION, pointRegion: Region = Region(), - radius: Optional[float] = None, + radius: float | None = None, technique: Literal[C.POINT, C.NONE, C.AUTO] = AUTO, ): """This method creates a TopologyOverhangControl object. @@ -85,11 +85,11 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, + csys: int | None = None, draftAngle: float = 45, overhangCheckRegion: Literal[C.OVERHANG_REGION] = OVERHANG_REGION, pointRegion: Region = Region(), - radius: Optional[float] = None, + radius: float | None = None, technique: Literal[C.POINT, C.NONE, C.AUTO] = AUTO, ): """This method modifies the TopologyOverhangControl object. diff --git a/src/abaqus/Optimization/TopologyPlanarSymmetry.py b/src/abaqus/Optimization/TopologyPlanarSymmetry.py index 1bb54a0f27..e1975e5960 100644 --- a/src/abaqus/Optimization/TopologyPlanarSymmetry.py +++ b/src/abaqus/Optimization/TopologyPlanarSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -37,7 +37,7 @@ class TopologyPlanarSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to ignore frozen areas. The default value is OFF. ignoreFrozenArea: Boolean = OFF @@ -48,7 +48,7 @@ def __init__( name: str, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method creates a TopologyPlanarSymmetry object. @@ -87,7 +87,7 @@ def __init__( def setValues( self, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method modifies the TopologyPlanarSymmetry object. diff --git a/src/abaqus/Optimization/TopologyPointSymmetry.py b/src/abaqus/Optimization/TopologyPointSymmetry.py index 1daf8a4ec9..983f52d2a9 100644 --- a/src/abaqus/Optimization/TopologyPointSymmetry.py +++ b/src/abaqus/Optimization/TopologyPointSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -30,7 +30,7 @@ class TopologyPointSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the position of the symmetry point defined as the #: origin of a local coordinate system. If **csys** = None, the global coordinate system is #: used. When this member is queried, it returns an Int. The default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to ignore frozen areas. The default value is OFF. ignoreFrozenArea: Boolean = OFF @@ -40,7 +40,7 @@ def __init__( self, name: str, region: Region, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method creates a TopologyPointSymmetry object. @@ -73,7 +73,7 @@ def __init__( super().__init__() @abaqus_method_doc - def setValues(self, csys: Optional[int] = None, ignoreFrozenArea: Boolean = OFF): + def setValues(self, csys: int | None = None, ignoreFrozenArea: Boolean = OFF): """This method modifies the TopologyPointSymmetry object. Parameters diff --git a/src/abaqus/Optimization/TopologyRibDesign.py b/src/abaqus/Optimization/TopologyRibDesign.py index a977246add..5a51d9f980 100644 --- a/src/abaqus/Optimization/TopologyRibDesign.py +++ b/src/abaqus/Optimization/TopologyRibDesign.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -50,7 +52,7 @@ class TopologyRibDesign(GeometricRestriction): #: None or a DatumCsys object specifying the position of the symmetry point defined as the #: origin of a local coordinate system. If **csys** = None, the global coordinate system is #: used. When this member is queried, it returns an Int. The default value is None. - csys: Optional[DatumCsys] = None + csys: DatumCsys | None = DatumCsys() #: The SymbolicConstant RIBDESIGN_REGION or a Region object specifying the overhang check region. If the value #: is OVERHANG_REGION, the value of region is used as both the overhang control region and the overhang check @@ -65,7 +67,7 @@ def __init__( ribThickness: float, ribDistance: float, region: Region, - csys: Optional[DatumCsys] = None, + csys: DatumCsys | None = None, ribDesignCheckRegion: Union[Literal[C.RIBDESIGN_REGION], Region] = RIBDESIGN_REGION, ): """This method creates a TopologyRibDesign object. @@ -114,7 +116,7 @@ def setValues( ribThickness: float, ribDistance: float, region: Region, - csys: Optional[DatumCsys] = None, + csys: DatumCsys | None = None, ribDesignCheckRegion: Union[Literal[C.RIBDESIGN_REGION], Region] = RIBDESIGN_REGION, ): """This method modifies the TopologyRibDesign object. diff --git a/src/abaqus/Optimization/TopologyRotationalSymmetry.py b/src/abaqus/Optimization/TopologyRotationalSymmetry.py index 159394190a..5d9d68ad80 100644 --- a/src/abaqus/Optimization/TopologyRotationalSymmetry.py +++ b/src/abaqus/Optimization/TopologyRotationalSymmetry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -40,7 +40,7 @@ class TopologyRotationalSymmetry(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: A Boolean specifying whether to ignore frozen areas. The default value is OFF. ignoreFrozenArea: Boolean = OFF @@ -52,7 +52,7 @@ def __init__( angle: float, region: Region, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method creates a TopologyRotationalSymmetry object. @@ -93,7 +93,7 @@ def __init__( def setValues( self, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, - csys: Optional[int] = None, + csys: int | None = None, ignoreFrozenArea: Boolean = OFF, ): """This method modifies the TopologyRotationalSymmetry object. diff --git a/src/abaqus/Optimization/TopologyTask.py b/src/abaqus/Optimization/TopologyTask.py index d660bb8f59..e657b6c15b 100644 --- a/src/abaqus/Optimization/TopologyTask.py +++ b/src/abaqus/Optimization/TopologyTask.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -39,19 +41,19 @@ class TopologyTask(OptimizationTask): """ #: A repository of DesignResponse objects. - designResponses: Dict[str, DesignResponse] = {} + designResponses: dict[str, DesignResponse] = {} #: A repository of ObjectiveFunction objects. - objectiveFunctions: Dict[str, ObjectiveFunction] = {} + objectiveFunctions: dict[str, ObjectiveFunction] = {} #: A repository of OptimizationConstraint objects. - optimizationConstraints: Dict[str, OptimizationConstraint] = {} + optimizationConstraints: dict[str, OptimizationConstraint] = {} #: A repository of GeometricRestriction objects. - geometricRestrictions: Dict[str, GeometricRestriction] = {} + geometricRestrictions: dict[str, GeometricRestriction] = {} #: A repository of StopCondition objects. - stopConditions: Dict[str, StopCondition] = {} + stopConditions: dict[str, StopCondition] = {} #: A String specifying the optimization task repository key. name: str @@ -83,7 +85,7 @@ class TopologyTask(OptimizationTask): #: None or a Float specifying the mesh filter radius for mesh independence and minimum #: size. The default value is None. - filterRadius: Optional[float] = None + filterRadius: float | None = None #: A Float specifying the volume that can be removed immediately in the first design cycle. #: The default value is 5.0. @@ -124,7 +126,7 @@ class TopologyTask(OptimizationTask): maxDensity: float = 1 #: A Float specifying the minimum density in the density update. The default value is 10⁻³. - minDensity: Optional[float] = None + minDensity: float | None = None #: The SymbolicConstant MODEL or a Region object specifying the region to use for mode #: tracking. The default value is MODEL. @@ -142,7 +144,7 @@ class TopologyTask(OptimizationTask): #: A Float specifying the stop criteria based on the change in objective function. The #: default value is 10⁻³. - objectiveFunctionDeltaStopCriteria: Optional[float] = None + objectiveFunctionDeltaStopCriteria: float | None = None #: The SymbolicConstant MODEL or a Region object specifying the region to which the #: optimization task is applied. The default value is MODEL. @@ -162,7 +164,7 @@ class TopologyTask(OptimizationTask): #: None or a Region object specifying the region in which the soft elements should be #: deleted during optimization. The default value is None. - softDeletionRegion: Optional[str] = None + softDeletionRegion: str | None = None #: A Float specifying the relative material density value used to identify soft elements. #: Those with values below the threshold are considered for removal. For STANDARD and @@ -170,7 +172,7 @@ class TopologyTask(OptimizationTask): #: MAX_SHEAR_STRAIN and MAX_ELASTOPLASTIC_STRAIN methods positive values are accepted #: whereas for MIN_PRINCIPAL_STRAIN and VOLUME_COMPRESSION methods negative values are #: accepted. - softDeletionThreshold: Optional[float] = None + softDeletionThreshold: float | None = None #: A SymbolicConstant specifying the size of the increment for volume modification. #: Possible values are DYNAMIC, VERY_SMALL, SMALL, MODERATE, MEDIUM, and LARGE. The default @@ -187,15 +189,15 @@ class TopologyTask(OptimizationTask): #: None or a Float specifying the structural mass damping for the task region. The default #: value is None. - structuralMassDamping: Optional[float] = None + structuralMassDamping: float | None = None #: None or a Float specifying the viscous mass damping for the task region. The default #: value is None. - viscousMassDamping: Optional[float] = None + viscousMassDamping: float | None = None #: None or a Float specifying the viscous stiffness damping for the task region. The #: default value is None. - viscousStiffnessDamping: Optional[float] = None + viscousStiffnessDamping: float | None = None #: A Boolean specifying whether the group in the design response will be evaluated using #: the existing algorithm or a new algorithm based on Abaqus sensitivities. The default @@ -214,7 +216,7 @@ def __init__( densityMoveLimit: float = 0, densityUpdateStrategy: Literal[C.AGGRESSIVE, C.NORMAL, C.CONSERVATIVE] = NORMAL, elementDensityDeltaStopCriteria: float = 0, - filterRadius: Optional[float] = None, + filterRadius: float | None = None, firstCycleDeletedVolume: float = 5, firstCycleDeletedVolumeTechnique: Union[Literal[C.PERCENTAGE, C.ABSOLUTE], Boolean] = OFF, freezeBoundaryConditionRegions: Boolean = OFF, @@ -224,12 +226,12 @@ def __init__( materialInterpolationPenalty: float = 3, materialInterpolationTechnique: Literal[C.SIMP, C.DEFAULT, C.RAMP] = DEFAULT, maxDensity: float = 1, - minDensity: Optional[float] = None, + minDensity: float | None = None, modeTrackingRegion: Literal[C.MODEL] = MODEL, numDesignCycles: int = 15, numFulfilledStopCriteria: int = 2, numTrackedModes: int = 5, - objectiveFunctionDeltaStopCriteria: Optional[float] = None, + objectiveFunctionDeltaStopCriteria: float | None = None, region: Literal[C.MODEL] = MODEL, softDeletionMethod: Literal[ C.STANDARD, @@ -240,14 +242,14 @@ def __init__( C.MAX_ELASTOPLASTIC_STRAIN, ] = STANDARD, softDeletionRadius: float = 0, - softDeletionRegion: Optional[str] = None, - softDeletionThreshold: Optional[float] = None, + softDeletionRegion: str | None = None, + softDeletionThreshold: float | None = None, stepSize: Literal[C.SMALL, C.LARGE, C.MODERATE, C.VERY_SMALL, C.DYNAMIC, C.MEDIUM] = MEDIUM, stiffnessMassDamping: Union[Literal[C.AVERAGE_EDGE_LENGTH], float] = AVERAGE_EDGE_LENGTH, stopCriteriaDesignCycle: int = 4, - structuralMassDamping: Optional[float] = None, - viscousMassDamping: Optional[float] = None, - viscousStiffnessDamping: Optional[float] = None, + structuralMassDamping: float | None = None, + viscousMassDamping: float | None = None, + viscousStiffnessDamping: float | None = None, groupOperator: Boolean = OFF, ): """This method creates a TopologyTask object. @@ -393,7 +395,7 @@ def setValues( densityMoveLimit: float = 0, densityUpdateStrategy: Literal[C.AGGRESSIVE, C.NORMAL, C.CONSERVATIVE] = NORMAL, elementDensityDeltaStopCriteria: float = 0, - filterRadius: Optional[float] = None, + filterRadius: float | None = None, firstCycleDeletedVolume: float = 5, firstCycleDeletedVolumeTechnique: Union[Literal[C.PERCENTAGE, C.ABSOLUTE], Boolean] = OFF, freezeBoundaryConditionRegions: Boolean = OFF, @@ -403,12 +405,12 @@ def setValues( materialInterpolationPenalty: float = 3, materialInterpolationTechnique: Literal[C.SIMP, C.DEFAULT, C.RAMP] = DEFAULT, maxDensity: float = 1, - minDensity: Optional[float] = None, + minDensity: float | None = None, modeTrackingRegion: Literal[C.MODEL] = MODEL, numDesignCycles: int = 15, numFulfilledStopCriteria: int = 2, numTrackedModes: int = 5, - objectiveFunctionDeltaStopCriteria: Optional[float] = None, + objectiveFunctionDeltaStopCriteria: float | None = None, region: Literal[C.MODEL] = MODEL, softDeletionMethod: Literal[ C.STANDARD, @@ -419,14 +421,14 @@ def setValues( C.MAX_ELASTOPLASTIC_STRAIN, ] = STANDARD, softDeletionRadius: float = 0, - softDeletionRegion: Optional[str] = None, - softDeletionThreshold: Optional[float] = None, + softDeletionRegion: str | None = None, + softDeletionThreshold: float | None = None, stepSize: Literal[C.SMALL, C.LARGE, C.MODERATE, C.VERY_SMALL, C.DYNAMIC, C.MEDIUM] = MEDIUM, stiffnessMassDamping: Union[Literal[C.AVERAGE_EDGE_LENGTH], float] = AVERAGE_EDGE_LENGTH, stopCriteriaDesignCycle: int = 4, - structuralMassDamping: Optional[float] = None, - viscousMassDamping: Optional[float] = None, - viscousStiffnessDamping: Optional[float] = None, + structuralMassDamping: float | None = None, + viscousMassDamping: float | None = None, + viscousStiffnessDamping: float | None = None, groupOperator: Boolean = OFF, ): """This method modifies the TopologyTask object. diff --git a/src/abaqus/Optimization/TurnControl.py b/src/abaqus/Optimization/TurnControl.py index 07c6b258f4..5413aca395 100644 --- a/src/abaqus/Optimization/TurnControl.py +++ b/src/abaqus/Optimization/TurnControl.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -38,14 +38,14 @@ class TurnControl(GeometricRestriction): #: None or a DatumCsys object specifying the local coordinate system. If **csys** = None, the #: global coordinate system is used. When this member is queried, it returns an Int. The #: default value is None. - csys: Optional[int] = None + csys: int | None = None #: None or a Region object specifying the main point used when **mainPointDetermination** is #: SPECIFY. The default value is None. #: #: .. versionchanged:: 2022 #: The attribute ``masterPoint`` was renamed to ``mainPoint``. - mainPoint: Optional[str] = None + mainPoint: str | None = None #: A SymbolicConstant specifying the rule for assigning point priority. Possible values are #: MAXIMUM, MINIMUM, and SPECIFY. The default value is MAXIMUM. @@ -76,8 +76,8 @@ def __init__( name: str, clientDirection: tuple, region: Region, - csys: Optional[int] = None, - mainPoint: Optional[str] = None, + csys: int | None = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, @@ -139,8 +139,8 @@ def __init__( @abaqus_method_doc def setValues( self, - csys: Optional[int] = None, - mainPoint: Optional[str] = None, + csys: int | None = None, + mainPoint: str | None = None, mainPointDetermination: Literal[C.SPECIFY, C.MINIMUM, C.MAXIMUM] = MAXIMUM, presumeFeasibleRegionAtStart: Boolean = ON, tolerance1: float = 0, diff --git a/src/abaqus/Part/AcisFile.py b/src/abaqus/Part/AcisFile.py index 03bc1b1f64..c22d31c90a 100644 --- a/src/abaqus/Part/AcisFile.py +++ b/src/abaqus/Part/AcisFile.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -26,7 +28,7 @@ class AcisFile: """ #: An Int specifying the number of parts in the object. - numberOfParts: Optional[int] = None + numberOfParts: int | None = None @abaqus_method_doc def openAcis(self, fileName: str, scaleFromFile: Boolean = OFF): @@ -64,7 +66,7 @@ def openAcis(self, fileName: str, scaleFromFile: Boolean = OFF): def openCatia( self, fileName: str, - topology: Optional[Literal[C.WIRE, C.SOLID, C.SHELL]] = None, + topology: Literal[C.WIRE, C.SOLID, C.SHELL] | None = None, convertUnits: Union[SymbolicConstant, Boolean] = OFF, combineBodies: Boolean = OFF, ): @@ -329,7 +331,7 @@ def openSolidworks(self, fileName: str, topology: Literal[C.WIRE, C.SOLID, C.SHE ... @abaqus_method_doc - def writeAcisFile(self, fileName: str, version: Optional[float] = None): + def writeAcisFile(self, fileName: str, version: float | None = None): """This method exports the assembly to a named file in ACIS format. Parameters diff --git a/src/abaqus/Part/AcisMdb.py b/src/abaqus/Part/AcisMdb.py index fd58dcedc0..ff2168c807 100644 --- a/src/abaqus/Part/AcisMdb.py +++ b/src/abaqus/Part/AcisMdb.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -62,7 +64,7 @@ def openAcis(fileName: str, scaleFromFile: Boolean = OFF): @abaqus_method_doc def openCatia( fileName: str, - topology: Optional[SymbolicConstant] = None, + topology: SymbolicConstant | None = None, convertUnits: Union[SymbolicConstant, Boolean] = OFF, combineBodies: Boolean = OFF, ): diff --git a/src/abaqus/Part/PartBase.py b/src/abaqus/Part/PartBase.py index bc62a6a9af..8061e66eb5 100644 --- a/src/abaqus/Part/PartBase.py +++ b/src/abaqus/Part/PartBase.py @@ -1,4 +1,6 @@ -from typing import Dict, List, Optional, Sequence, overload +from __future__ import annotations + +from typing import Sequence, overload from typing_extensions import Literal @@ -76,10 +78,10 @@ class PartBase(PartFeature): #: An Int specifying that feature parameters have been modified but that the part has not #: been regenerated. Possible values are 0 and 1. - isOutOfDate: Optional[int] = None + isOutOfDate: int | None = None #: A Float specifying when the part was last modified. - timeStamp: Optional[float] = None + timeStamp: float | None = None #: A VertexArray object specifying all the vertices in the part. vertices: VertexArray = VertexArray([]) @@ -100,17 +102,17 @@ class PartBase(PartFeature): cells: CellArray = CellArray([]) #: A repository of Feature objects specifying all the features in the part. - features: Dict[str, PartFeature] = {} + features: dict[str, PartFeature] = {} #: A repository of Feature objects specifying all Feature objects in the part. The Feature #: objects in the featuresById repository are the same as the Feature objects in the #: features' repository. However, the key to the objects in the featuresById repository is #: an integer specifying the **ID**, whereas the key to the objects in the features #: repository is a string specifying the **name**. - featuresById: Dict[str, PartFeature] = {} + featuresById: dict[str, PartFeature] = {} #: A repository of Datum objects specifying all the datums in the part. - datums: List[Datum] = [] + datums: list[Datum] = [] #: A MeshElementArray object specifying all the elements in the part. elements: MeshElementArray = MeshElementArray([]) @@ -119,7 +121,7 @@ class PartBase(PartFeature): #: given element and a given face index within that element, the corresponding MeshFace #: object can be retrieved from the repository by using the key calculated as (i*8 + j), #: where i and j are zero-based element and face indices, respectively. - elemFaces: Dict[str, MeshFace] = {} + elemFaces: dict[str, MeshFace] = {} #: A MeshFaceArray object specifying all the unique element faces in the part. elementFaces: MeshFaceArray = MeshFaceArray([]) @@ -131,30 +133,30 @@ class PartBase(PartFeature): retainedNodes: MeshNodeArray = MeshNodeArray([]) #: A repository of Set objects specifying for more information, see Set. - sets: Dict[str, Set] = {} + sets: dict[str, Set] = {} #: A repository of Set objects specifying the contents of the **allSets** repository is the #: same as the contents of the **sets** repository. - allSets: Dict[str, Set] = {} + allSets: dict[str, Set] = {} #: A repository of Set objects specifying picked regions. - allInternalSets: Dict[str, Set] = {} + allInternalSets: dict[str, Set] = {} #: A repository of Surface objects specifying for more information, see Surface. - surfaces: Dict[str, Surface] = {} + surfaces: dict[str, Surface] = {} #: A repository of Surface objects specifying the contents of the **allSurfaces** repository #: is the same as the contents of the **surfaces** repository. - allSurfaces: Dict[str, Surface] = {} + allSurfaces: dict[str, Surface] = {} #: A repository of Surface objects specifying picked regions. - allInternalSurfaces: Dict[str, Surface] = {} + allInternalSurfaces: dict[str, Surface] = {} #: A repository of Skin objects specifying the skins created on the part. - skins: Dict[str, Skin] = {} + skins: dict[str, Skin] = {} #: A repository of Stringer objects specifying the stringers created on the part. - stringers: Dict[str, Stringer] = {} + stringers: dict[str, Stringer] = {} #: A repository of ReferencePoint objects. referencePoints: ReferencePoints = ReferencePoints() @@ -169,14 +171,14 @@ class PartBase(PartFeature): materialOrientations: MaterialOrientationArray = [] #: A repository of CompositeLayup objects. - compositeLayups: Dict[str, CompositeLayup] = {} + compositeLayups: dict[str, CompositeLayup] = {} #: A repository of MeshEdge objects specifying all the element edges in the part. For a #: given element and a given edge index on a given face within that element, the #: corresponding MeshEdge object can be retrieved from the repository by using the key #: calculated as (i*32 + j*4 + k), where i, j, and k are zero-based element, face, and edge #: indices, respectively. - elemEdges: Dict[str, MeshEdge] = {} + elemEdges: dict[str, MeshEdge] = {} #: A MeshEdgeArray object specifying all the unique element edges in the part. elementEdges: MeshEdgeArray = MeshEdgeArray([]) @@ -305,7 +307,7 @@ def PartFromBooleanMerge( instances: Sequence[PartInstance], keepIntersections: Boolean = False, mergeNodes: Literal[C.ALL, C.BOUNDARY_ONLY, C.NONE] = BOUNDARY_ONLY, - nodeMergingTolerance: Optional[float] = None, + nodeMergingTolerance: float | None = None, removeDuplicateElements: Boolean = ON, domain: Literal[C.MESH, C.BOTH, C.GEOMETRY] = GEOMETRY, ): @@ -654,8 +656,8 @@ def PartFromOdb( instance: str = "", elementSet: str = "", shape: Literal[C.DEFORMED, C.UNDEFORMED] = UNDEFORMED, - step: Optional[int] = None, - frame: Optional[int] = None, + step: int | None = None, + frame: int | None = None, twist: Boolean = OFF, ): """This method creates an orphan mesh Part object by reading an output database. The new part is placed @@ -902,7 +904,7 @@ def addGeomToSketch(self, sketch: ConstrainedSketch): def assignThickness( self, faces: Sequence[Face], - thickness: Optional[float] = None, + thickness: float | None = None, topFaces: Sequence[Face] = (), bottomFaces: Sequence[Face] = (), ): @@ -946,7 +948,7 @@ def checkGeometry( self, detailed: Boolean = OFF, reportFacetErrors: Boolean = OFF, - level: Optional[int] = None, + level: int | None = None, ): """This method checks the validity of the geometry of the part and prints a count of all topological entities on the part (faces, edges, vertices, etc.). @@ -1478,7 +1480,7 @@ def projectReferencesOntoSketch( self, sketch: ConstrainedSketch, filter: Literal[C.ALL_EDGES, C.COPLANAR_EDGES] = ALL_EDGES, - upToFeature: Optional[PartFeature] = None, + upToFeature: PartFeature | None = None, edges: Sequence[Edge] = (), vertices: Sequence[Vertex] = (), ): @@ -1680,7 +1682,7 @@ def suppressFeatures(self, featureNames: tuple): ... @abaqus_method_doc - def writeAcisFile(self, fileName: str, version: Optional[float] = None): + def writeAcisFile(self, fileName: str, version: float | None = None): """This method exports the geometry of the part to a named file in ACIS format. Parameters diff --git a/src/abaqus/Part/PartFeature.py b/src/abaqus/Part/PartFeature.py index 2c39c59449..a701ba8951 100644 --- a/src/abaqus/Part/PartFeature.py +++ b/src/abaqus/Part/PartFeature.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import TYPE_CHECKING, Sequence, Union from typing_extensions import Literal @@ -23,6 +25,9 @@ ) from ..UtilityAndView.SymbolicConstant import abaqusConstants as C +if TYPE_CHECKING: + from ..Feature.Feature import Feature + @abaqus_class_doc class PartFeature(BaseFeature): @@ -36,7 +41,7 @@ class PartFeature(BaseFeature): """ @abaqus_method_doc - def AutoRepair(self) -> BaseFeature: + def AutoRepair(self) -> "Feature": """This method carries out a sequence of geometry repair operations if it contains invalid entities. It is expected to improve the geometry, but it does not guarantee that the number of invalid entities will decrease. In some cases, it can also increase the number of invalid entities. Since a number of geometry @@ -53,10 +58,12 @@ def AutoRepair(self) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def AddCells(self, faceList: Sequence[Face], flipped: Boolean = OFF) -> BaseFeature: + def AddCells(self, faceList: Sequence[Face], flipped: Boolean = OFF) -> "Feature": """This method tries to convert a shell entity to a solid entity. The conversion is not always successful. @@ -80,10 +87,12 @@ def AddCells(self, faceList: Sequence[Face], flipped: Boolean = OFF) -> BaseFeat feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def AnalyticRigidSurf2DPlanar(self, sketch: ConstrainedSketch) -> BaseFeature: + def AnalyticRigidSurf2DPlanar(self, sketch: ConstrainedSketch) -> "Feature": """This method creates a first Feature object for an analytical rigid surface by creating a planar wire from the given ConstrainedSketch object. @@ -102,10 +111,12 @@ def AnalyticRigidSurf2DPlanar(self, sketch: ConstrainedSketch) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def AnalyticRigidSurfExtrude(self, sketch: ConstrainedSketch, depth: float = 1) -> BaseFeature: + def AnalyticRigidSurfExtrude(self, sketch: ConstrainedSketch, depth: float = 1) -> "Feature": """This method creates a first Feature object for an analytical rigid surface by extruding the given ConstrainedSketch object by the given depth, creating a surface. @@ -126,10 +137,12 @@ def AnalyticRigidSurfExtrude(self, sketch: ConstrainedSketch, depth: float = 1) feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def AnalyticRigidSurfRevolve(self, sketch: ConstrainedSketch) -> BaseFeature: + def AnalyticRigidSurfRevolve(self, sketch: ConstrainedSketch) -> "Feature": """This method creates a first Feature object for an analytical rigid surface by revolving the given ConstrainedSketch object by 360° about the **Y** axis. @@ -148,10 +161,12 @@ def AnalyticRigidSurfRevolve(self, sketch: ConstrainedSketch) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def AssignMidsurfaceRegion(self, cellList: Sequence[Cell]) -> BaseFeature: + def AssignMidsurfaceRegion(self, cellList: Sequence[Cell]) -> "Feature": """This method assign a mid-surface property to sequence of Cell objects. If a reference representation of the part does not exist, it creates one. It also copies the **cells** to the reference representation and deletes the **cells** from the active representation of the part. @@ -172,16 +187,18 @@ def AssignMidsurfaceRegion(self, cellList: Sequence[Cell]) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def BaseSolidExtrude( self, sketch: ConstrainedSketch, depth: float, - draftAngle: Optional[float] = None, - pitch: Optional[float] = None, - ) -> BaseFeature: + draftAngle: float | None = None, + pitch: float | None = None, + ) -> "Feature": """This method creates a first Feature object by extruding the given ConstrainedSketch object by the given depth, creating a solid. The ConstrainedSketch object must define a closed profile. @@ -215,18 +232,20 @@ def BaseSolidExtrude( Feature A Feature object. """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def BaseSolidRevolve( self, sketch: ConstrainedSketch, angle: float, - pitch: Optional[float] = None, + pitch: float | None = None, flipRevolveDirection: Boolean = OFF, flipPitchDirection: Boolean = OFF, moveSketchNormalToPath: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates a first Feature object by revolving the given ConstrainedSketch object by the given angle, creating a solid. The ConstrainedSketch object must define a closed profile and an axis of revolution. The axis is defined by a single construction line. @@ -273,10 +292,12 @@ def BaseSolidRevolve( ------ RangeError """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def BaseSolidSweep(self, sketch: ConstrainedSketch, path: ConstrainedSketch) -> BaseFeature: + def BaseSolidSweep(self, sketch: ConstrainedSketch, path: ConstrainedSketch) -> "Feature": """This method creates a first Feature object by sweeping the given profile ConstrainedSketch object along the path defined by the path ConstrainedSketch object, creating a solid. The profile ConstrainedSketch object must define a closed profile. The origin of the profile sketch is positioned at @@ -300,10 +321,12 @@ def BaseSolidSweep(self, sketch: ConstrainedSketch, path: ConstrainedSketch) -> feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def BaseShell(self, sketch: ConstrainedSketch) -> BaseFeature: + def BaseShell(self, sketch: ConstrainedSketch) -> "Feature": """This method creates a first Feature object by creating a planar shell from the given ConstrainedSketch object. The ConstrainedSketch object must define a closed profile. @@ -322,16 +345,18 @@ def BaseShell(self, sketch: ConstrainedSketch) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def BaseShellExtrude( self, sketch: ConstrainedSketch, depth: float, - draftAngle: Optional[float] = None, - pitch: Optional[float] = None, - ) -> BaseFeature: + draftAngle: float | None = None, + pitch: float | None = None, + ) -> "Feature": """This method creates a first Feature object by extruding the given ConstrainedSketch object by the given depth, creating a shell. The ConstrainedSketch object can define either an open or closed profile. @@ -369,18 +394,20 @@ def BaseShellExtrude( ------ RangeError """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def BaseShellRevolve( self, sketch: ConstrainedSketch, angle: float, - pitch: Optional[float] = None, + pitch: float | None = None, flipRevolveDirection: Boolean = OFF, flipPitchDirection: Boolean = OFF, moveSketchNormalToPath: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates a first Feature object by revolving the given ConstrainedSketch object by the given angle, creating a shell. The ConstrainedSketch object can define either an open or closed profile and an axis of revolution. The axis is defined by a single construction line. @@ -423,10 +450,12 @@ def BaseShellRevolve( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def BaseShellSweep(self, sketch: ConstrainedSketch, path: ConstrainedSketch) -> BaseFeature: + def BaseShellSweep(self, sketch: ConstrainedSketch, path: ConstrainedSketch) -> "Feature": """This method creates a first Feature object by sweeping the given section ConstrainedSketch object along the path defined by the path ConstrainedSketch object, creating a shell. The ConstrainedSketch object can define either an open or closed profile. The origin of the profile sketch is positioned at @@ -450,10 +479,12 @@ def BaseShellSweep(self, sketch: ConstrainedSketch, path: ConstrainedSketch) -> feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def BaseWire(self, sketch: ConstrainedSketch) -> BaseFeature: + def BaseWire(self, sketch: ConstrainedSketch) -> "Feature": """This method creates a first Feature object by creating a planar wire from the given ConstrainedSketch object. @@ -472,16 +503,18 @@ def BaseWire(self, sketch: ConstrainedSketch) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def BlendFaces( self, side1: Sequence[Edge], side2: tuple, - method: Optional[Literal[C.TANGENT, C.SHORTEST_PATH, C.SPECIFY_PATH]] = None, - path: Optional[Edge] = None, - ) -> BaseFeature: + method: Literal[C.TANGENT, C.SHORTEST_PATH, C.SPECIFY_PATH] | None = None, + path: Edge | None = None, + ) -> "Feature": """This method creates a Feature object by creating new faces that blends two sets of faces. .. note:: @@ -513,10 +546,12 @@ def BlendFaces( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def Chamfer(self, length: float, edgeList: Sequence[Edge]) -> BaseFeature: + def Chamfer(self, length: float, edgeList: Sequence[Edge]) -> "Feature": """This method creates an additional Feature object by chamfering the given list of edges with a given length. @@ -537,7 +572,9 @@ def Chamfer(self, length: float, edgeList: Sequence[Edge]) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def Mirror( @@ -545,7 +582,7 @@ def Mirror( mirrorPlane: str, keepOriginal: Boolean, keepInternalBoundaries: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method mirrors existing part geometry across a plane to create new geometry. .. note:: @@ -568,10 +605,12 @@ def Mirror( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def ConvertToAnalytical(self) -> BaseFeature: + def ConvertToAnalytical(self) -> "Feature": """This method attempts to change entities into a simpler form that will speed up processing and make entities available during feature operations. @@ -585,12 +624,12 @@ def ConvertToAnalytical(self) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def ConvertToPrecise( - self, method: Literal[C.RECOMPUTE_GEOMETRY, C.TIGHTEN_GAPS] = RECOMPUTE_GEOMETRY - ) -> BaseFeature: + def ConvertToPrecise(self, method: Literal[C.RECOMPUTE_GEOMETRY, C.TIGHTEN_GAPS] = RECOMPUTE_GEOMETRY) -> "Feature": """This method attempts to change imprecise entities so that the geometry becomes precise. .. note:: @@ -610,10 +649,12 @@ def ConvertToPrecise( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def CoverEdges(self, edgeList: Sequence[Edge], tryAnalytical: Boolean = False) -> BaseFeature: + def CoverEdges(self, edgeList: Sequence[Edge], tryAnalytical: Boolean = False) -> "Feature": """This method generates a face using the given edges as the face's boundaries. The CoverEdges method generates a face by creating the geometry consisting of the underlying surface, associated edges, and vertices. @@ -645,7 +686,9 @@ def CoverEdges(self, edgeList: Sequence[Edge], tryAnalytical: Boolean = False) - Parterror Cannot construct face geometry, If the underlying surface is too difficult to fit. """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def Cut( @@ -654,8 +697,8 @@ def Cut( sketchPlaneSide: Literal[C.SIDE1, C.SIDE2], sketchUpEdge: Edge, sketch: ConstrainedSketch, - sketchOrientation: Optional[Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM]] = None, - ) -> BaseFeature: + sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] | None = None, + ) -> "Feature": """This method creates an additional Feature object by cutting a hole using the given ConstrainedSketch object. @@ -685,7 +728,9 @@ def Cut( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def CutExtrude( @@ -695,12 +740,12 @@ def CutExtrude( sketchUpEdge: Edge, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM], sketch: ConstrainedSketch, - depth: Optional[float] = None, + depth: float | None = None, upToFace: str = "", - draftAngle: Optional[float] = None, - pitch: Optional[float] = None, + draftAngle: float | None = None, + pitch: float | None = None, flipExtrudeDirection: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by extruding the given ConstrainedSketch object by the given depth and cutting away material in the solid and shell regions of the part. The ConstrainedSketch object must define a closed profile. @@ -758,20 +803,22 @@ def CutExtrude( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def CutLoft( self, loftsections: tuple, - startCondition: Optional[Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED]] = None, - endCondition: Optional[Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED]] = None, - startTangent: Optional[float] = None, - startMagnitude: Optional[float] = None, - endTangent: Optional[float] = None, - endMagnitude: Optional[float] = None, + startCondition: Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED] | None = None, + endCondition: Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED] | None = None, + startTangent: float | None = None, + startMagnitude: float | None = None, + endTangent: float | None = None, + endMagnitude: float | None = None, globalSmoothing: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by lofting between the given sections and cutting away material from the part. You define the sections using a sequence of edges from the part or an EdgeArray. @@ -830,7 +877,9 @@ def CutLoft( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def CutRevolve( @@ -841,11 +890,11 @@ def CutRevolve( sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM], sketch: ConstrainedSketch, angle: float, - pitch: Optional[float] = None, + pitch: float | None = None, flipRevolveDirection: Boolean = OFF, flipPitchDirection: Boolean = OFF, moveSketchNormalToPath: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by revolving the given ConstrainedSketch object by the given angle and cutting away material from the part. The ConstrainedSketch object must define a closed profile and an axis of revolution. @@ -898,7 +947,9 @@ def CutRevolve( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def CutSweep( @@ -906,16 +957,16 @@ def CutSweep( path: str, profile: str, pathPlane: str = "", - pathUpEdge: Optional[Edge] = None, + pathUpEdge: Edge | None = None, pathOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, sketchPlane: str = "", - sketchUpEdge: Optional[Edge] = None, + sketchUpEdge: Edge | None = None, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, - draftAngle: Optional[float] = None, - pitch: Optional[float] = None, + draftAngle: float | None = None, + pitch: float | None = None, profileNormal: Boolean = OFF, flipSweepDirection: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by sweeping the given ConstrainedSketch object along a path which may be a ConstrainedSketch or a sequence of Edge objects and cutting away material from the part. If the profile section is a ConstrainedSketch object, it must define a closed profile. The section @@ -986,18 +1037,20 @@ def CutSweep( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def ExtendFaces( self, faces: Sequence[Face] = (), extendAlong: Sequence[Edge] = (), - distance: Optional[float] = None, + distance: float | None = None, upToFaces: Sequence[Face] = (), trimToExtendedTargetSurfaces: Boolean = True, upToReferenceRep: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method extends faces along its free edges by offsetting the external edges along the surfaces. One of **distance**, **upToReferenceRep**, or **upToFaces** must be used to specify how far the faces need to be extended. @@ -1035,17 +1088,19 @@ def ExtendFaces( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def FaceFromElementFaces( self, elementFaces: Region, stitch: Boolean = OFF, - stitchTolerance: Optional[float] = None, - analyticFitTolerance: Optional[float] = None, + stitchTolerance: float | None = None, + analyticFitTolerance: float | None = None, associateFace: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates a geometry face from a collection of orphan element faces. .. note:: @@ -1078,7 +1133,9 @@ def FaceFromElementFaces( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def HoleBlindFromEdges( @@ -1091,7 +1148,7 @@ def HoleBlindFromEdges( edge2: Edge, distance2: float, depth: float, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by creating a circular blind hole of the given diameter and depth and cutting away material in the solid and shell regions of the part. The center of the hole is offset from two non-parallel straight edges by the given distances. @@ -1126,7 +1183,9 @@ def HoleBlindFromEdges( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def HoleFromEdges( @@ -1136,7 +1195,7 @@ def HoleFromEdges( distance1: float, edge2: Edge, distance2: float, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by creating a circular hole of the given diameter in a 2D planar part and cutting away material in the shell and wire regions of the part. The center of the hole is offset from two non-parallel straight edges by the given distances. @@ -1164,7 +1223,9 @@ def HoleFromEdges( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def HoleThruAllFromEdges( @@ -1176,7 +1237,7 @@ def HoleThruAllFromEdges( distance1: float, edge2: Edge, distance2: float, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by creating a circular through hole of the given diameter and cutting away material in the solid and shell regions of the part. The center of the hole is offset from two non-parallel straight edges by the given distances. @@ -1209,10 +1270,12 @@ def HoleThruAllFromEdges( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def MergeEdges(self, edgeList: Sequence[Edge] = (), extendSelection: Boolean = OFF) -> BaseFeature: + def MergeEdges(self, edgeList: Sequence[Edge] = (), extendSelection: Boolean = OFF) -> "Feature": """This method merges edges either by extending the user selection or using only the selected edges. .. note:: @@ -1234,20 +1297,21 @@ def MergeEdges(self, edgeList: Sequence[Edge] = (), extendSelection: Boolean = O feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def OffsetFaces( self, faceList: Sequence[Face], - distance: Optional[float] = None, + distance: float | None = None, targetFaces: Sequence[Face] = (), - targetFacesMethod: Optional[ - Literal[C.HALF_OF_AVERAGE, C.CLOSEST_POINT_FRACTION, C.FARTHEST_POINT_FRACTION] - ] = None, - fractionDistance: Optional[float] = None, + targetFacesMethod: Literal[C.HALF_OF_AVERAGE, C.CLOSEST_POINT_FRACTION, C.FARTHEST_POINT_FRACTION] + | None = None, + fractionDistance: float | None = None, trimToReferenceRep: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates new faces by offsetting existing faces. .. note:: @@ -1287,7 +1351,9 @@ def OffsetFaces( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def RemoveCells(self, cellList: Sequence[Cell]) -> bool: @@ -1313,10 +1379,10 @@ def RemoveCells(self, cellList: Sequence[Cell]) -> bool: Parterror: ConstrainedSketchGeometry that is not 3-dimensional does not contain cells If the intended volume to be turned into a shell entity is not three-dimensional. """ - ... + return True @abaqus_method_doc - def RemoveFaces(self, faceList: Sequence[Face], deleteCells: Boolean = False) -> BaseFeature: + def RemoveFaces(self, faceList: Sequence[Face], deleteCells: Boolean = False) -> "Feature": """This method removes faces from a solid entity or from a shell entity. .. note:: @@ -1337,10 +1403,12 @@ def RemoveFaces(self, faceList: Sequence[Face], deleteCells: Boolean = False) -> feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def RemoveFacesAndStitch(self, faceList: Sequence[Face]) -> BaseFeature: + def RemoveFacesAndStitch(self, faceList: Sequence[Face]) -> "Feature": """This method removes faces from a solid entity and attempts to close the resulting gap by extending the neighboring faces of the solid. @@ -1359,7 +1427,9 @@ def RemoveFacesAndStitch(self, faceList: Sequence[Face]) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def RemoveRedundantEntities( @@ -1367,7 +1437,7 @@ def RemoveRedundantEntities( vertexList: Sequence[Vertex] = (), edgeList: Sequence[Edge] = (), removeEdgeVertices: Boolean = True, - ) -> BaseFeature: + ) -> "Feature": """This method removes redundant edges and vertices from a solid or a shell entity. One of the two arguments is required. @@ -1396,10 +1466,12 @@ def RemoveRedundantEntities( Parterror None of the selected entities are redundant, If the selected entity is not a redundant entity. """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def RepairFaceNormals(self, faceList: Sequence[Face] = ()) -> BaseFeature: + def RepairFaceNormals(self, faceList: Sequence[Face] = ()) -> "Feature": """This method works on the entire part or a sequence of shell faces. When the entire part is selected, it aligns all the shell face normals, and inverts all of the solid faces' normals if the solid was originally inside out. When a few shell faces are selected, it inverts the normals of the selected @@ -1420,10 +1492,12 @@ def RepairFaceNormals(self, faceList: Sequence[Face] = ()) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def RepairInvalidEdges(self, edgeList: Sequence[Edge]) -> BaseFeature: + def RepairInvalidEdges(self, edgeList: Sequence[Edge]) -> "Feature": """This method repairs invalid edges. It will always attempt to improve edges even if none of selected edges are initially invalid and may leave behind invalid edges that could not be repaired. @@ -1442,10 +1516,12 @@ def RepairInvalidEdges(self, edgeList: Sequence[Edge]) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def RepairSliver(self, face: Face, point1: int, point2: int, toleranceChecks: Boolean = True) -> BaseFeature: + def RepairSliver(self, face: Face, point1: int, point2: int, toleranceChecks: Boolean = True) -> "Feature": """This method repairs the selected sliver from the selected face. The sliver area is specified using two points. A face partition is carried out at the specified points and the smaller of the two faces is removed. @@ -1474,10 +1550,12 @@ def RepairSliver(self, face: Face, point1: int, point2: int, toleranceChecks: Bo feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def RepairSmallEdges(self, edgeList: Sequence[Edge], toleranceChecks: Boolean = True) -> BaseFeature: + def RepairSmallEdges(self, edgeList: Sequence[Edge], toleranceChecks: Boolean = True) -> "Feature": """This method repairs small edges. This method will attempt to replace selected small edges with vertices and extend the adjacent faces and edges. This method might leave behind some small edges that cannot be removed. @@ -1500,10 +1578,12 @@ def RepairSmallEdges(self, edgeList: Sequence[Edge], toleranceChecks: Boolean = feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def RepairSmallFaces(self, faceList: Sequence[Face], toleranceChecks: Boolean = True) -> BaseFeature: + def RepairSmallFaces(self, faceList: Sequence[Face], toleranceChecks: Boolean = True) -> "Feature": """This method repairs small faces. It will attempt to replace the selected small faces with edges or vertices and extend the adjacent faces. This method might leave behind some small faces that cannot be removed. @@ -1526,10 +1606,12 @@ def RepairSmallFaces(self, faceList: Sequence[Face], toleranceChecks: Boolean = feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def ReplaceFaces(self, faceList: Sequence[Face], stitch: Boolean = True) -> BaseFeature: + def ReplaceFaces(self, faceList: Sequence[Face], stitch: Boolean = True) -> "Feature": """This method replaces the selected faces with a single face. If one single face is selected, that alone is replaced with a new face. @@ -1551,10 +1633,12 @@ def ReplaceFaces(self, faceList: Sequence[Face], stitch: Boolean = True) -> Base feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def Round(self, radius: float, edgeList: Sequence[Edge], vertexList: Sequence[Vertex]) -> BaseFeature: + def Round(self, radius: float, edgeList: Sequence[Edge], vertexList: Sequence[Vertex]) -> "Feature": """This method creates an additional Feature object by rounding (filleting) the given list of entities with the given radius. @@ -1581,7 +1665,9 @@ def Round(self, radius: float, edgeList: Sequence[Edge], vertexList: Sequence[Ve feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def Shell( @@ -1591,7 +1677,7 @@ def Shell( sketchUpEdge: Edge, sketch: ConstrainedSketch, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by creating a planar shell from the given ConstrainedSketch object. The ConstrainedSketch object must define a closed profile. @@ -1621,7 +1707,9 @@ def Shell( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def ShellExtrude( @@ -1630,14 +1718,14 @@ def ShellExtrude( sketchPlaneSide: Literal[C.SIDE1, C.SIDE2], sketchUpEdge: Edge, sketch: ConstrainedSketch, - depth: Optional[float] = None, + depth: float | None = None, upToFace: str = "", sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, - draftAngle: Optional[float] = None, - pitch: Optional[float] = None, + draftAngle: float | None = None, + pitch: float | None = None, flipExtrudeDirection: Boolean = OFF, keepInternalBoundaries: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by extruding the given ConstrainedSketch object by the given depth, creating a shell protrusion. The ConstrainedSketch object can define either an open or closed profile. @@ -1696,22 +1784,24 @@ def ShellExtrude( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def ShellLoft( self, loftsections: tuple, - startCondition: Optional[Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED]] = None, - endCondition: Optional[Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED]] = None, - startTangent: Optional[float] = None, - startMagnitude: Optional[float] = None, - endTangent: Optional[float] = None, - endMagnitude: Optional[float] = None, + startCondition: Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED] | None = None, + endCondition: Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED] | None = None, + startTangent: float | None = None, + startMagnitude: float | None = None, + endTangent: float | None = None, + endMagnitude: float | None = None, paths: tuple = (), globalSmoothing: Boolean = OFF, keepInternalBoundaries: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by lofting between the given sections and adding shell faces to the part. You define the sections using a sequence of edges from the part or an EdgeArray. @@ -1782,7 +1872,9 @@ def ShellLoft( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def ShellRevolve( @@ -1793,12 +1885,12 @@ def ShellRevolve( sketch: ConstrainedSketch, angle: float, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, - pitch: Optional[float] = None, + pitch: float | None = None, flipRevolveDirection: Boolean = OFF, flipPitchDirection: Boolean = OFF, moveSketchNormalToPath: Boolean = OFF, keepInternalBoundaries: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by revolving the given ConstrainedSketch object by the given angle, creating a shell protrusion. The ConstrainedSketch object can define either an open or closed profile and an axis of revolution. The axis is defined by a single construction line. For a @@ -1855,7 +1947,9 @@ def ShellRevolve( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def ShellSweep( @@ -1863,17 +1957,17 @@ def ShellSweep( path: str, profile: str, pathPlane: str = "", - pathUpEdge: Optional[Edge] = None, + pathUpEdge: Edge | None = None, pathOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, sketchPlane: str = "", - sketchUpEdge: Optional[Edge] = None, + sketchUpEdge: Edge | None = None, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, - draftAngle: Optional[float] = None, - pitch: Optional[float] = None, + draftAngle: float | None = None, + pitch: float | None = None, profileNormal: Boolean = OFF, flipSweepDirection: Boolean = OFF, keepInternalBoundaries: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by sweeping the given ConstrainedSketch object or a sequence of Edge objects along a path which may be a ConstrainedSketch or a sequence of Edge objects, creating a shell swept protrusion. The section can be an open or a closed profile. The section sketch @@ -1947,7 +2041,9 @@ def ShellSweep( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def SolidExtrude( @@ -1956,14 +2052,14 @@ def SolidExtrude( sketchPlaneSide: Literal[C.SIDE1, C.SIDE2], sketchUpEdge: Union[Edge, DatumAxis], sketch: ConstrainedSketch, - depth: Optional[float] = None, - upToFace: Optional[Face] = None, + depth: float | None = None, + upToFace: Face | None = None, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, - draftAngle: Optional[float] = None, - pitch: Optional[float] = None, + draftAngle: float | None = None, + pitch: float | None = None, flipExtrudeDirection: Boolean = OFF, keepInternalBoundaries: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by extruding the given ConstrainedSketch object by the given depth, creating a solid protrusion. The ConstrainedSketch object must define a closed profile. @@ -2021,22 +2117,24 @@ def SolidExtrude( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def SolidLoft( self, loftsections: tuple, - startCondition: Optional[Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED]] = None, - endCondition: Optional[Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED]] = None, - startTangent: Optional[float] = None, - startMagnitude: Optional[float] = None, - endTangent: Optional[float] = None, - endMagnitude: Optional[float] = None, + startCondition: Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED] | None = None, + endCondition: Literal[C.NONE, C.NORMAL, C.RADIAL, C.SPECIFIED] | None = None, + startTangent: float | None = None, + startMagnitude: float | None = None, + endTangent: float | None = None, + endMagnitude: float | None = None, paths: tuple = (), globalSmoothing: Boolean = OFF, keepInternalBoundaries: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by lofting between the given sections and adding material to the part. You define the sections using a sequence of edges from the part or an EdgeArray. @@ -2105,7 +2203,9 @@ def SolidLoft( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def SolidRevolve( @@ -2116,12 +2216,12 @@ def SolidRevolve( sketch: ConstrainedSketch, angle: float, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, - pitch: Optional[float] = None, + pitch: float | None = None, flipRevolveDirection: Boolean = OFF, flipPitchDirection: Boolean = OFF, moveSketchNormalToPath: Boolean = OFF, keepInternalBoundaries: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by revolving the given ConstrainedSketch object by the given angle, creating a solid protrusion. The ConstrainedSketch object must define a closed profile and an axis of revolution. The axis is defined by a single construction line. @@ -2177,7 +2277,9 @@ def SolidRevolve( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def SolidSweep( @@ -2185,17 +2287,17 @@ def SolidSweep( path: str, profile: str, pathPlane: str = "", - pathUpEdge: Optional[Edge] = None, + pathUpEdge: Edge | None = None, pathOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, sketchPlane: str = "", - sketchUpEdge: Optional[Edge] = None, + sketchUpEdge: Edge | None = None, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, - draftAngle: Optional[float] = None, - pitch: Optional[float] = None, + draftAngle: float | None = None, + pitch: float | None = None, profileNormal: Boolean = OFF, flipSweepDirection: Boolean = OFF, keepInternalBoundaries: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by sweeping the given ConstrainedSketch object or a Face object along a path which may be a ConstrainedSketch or a sequence of Edge objects, creating a solid swept protrusion. If the profile section is a ConstrainedSketch object, it must define a closed @@ -2269,10 +2371,12 @@ def SolidSweep( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def Stitch(self, edgeList: Sequence[Edge] = (), stitchTolerance: Optional[float] = None) -> BaseFeature: + def Stitch(self, edgeList: Sequence[Edge] = (), stitchTolerance: float | None = None) -> "Feature": """This method attempts to create a valid part by binding together free and imprecise edges of all the faces of a part. If **edgeList** is not given, a global stitch will be performed. If **stitchTolerance** is not specified, a value of 1.0 will be used. @@ -2297,7 +2401,9 @@ def Stitch(self, edgeList: Sequence[Edge] = (), stitchTolerance: Optional[float] feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def Wire( @@ -2307,7 +2413,7 @@ def Wire( sketchUpEdge: Edge, sketch: ConstrainedSketch, sketchOrientation: Literal[C.RIGHT, C.LEFT, C.TOP, C.BOTTOM] = RIGHT, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by creating a planar wire from the given ConstrainedSketch object. The ConstrainedSketch object must define a closed profile. @@ -2337,7 +2443,9 @@ def Wire( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def WireSpline( @@ -2345,7 +2453,7 @@ def WireSpline( points: tuple, mergeType: Literal[C.MERGE, C.IMPRINT, C.SEPARATE] = IMPRINT, smoothClosedSpline: Boolean = OFF, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by creating a spline wire that passes through a sequence of given points. Each point can be a datum point, a vertex, an interesting point, or a tuple. @@ -2379,7 +2487,9 @@ def WireSpline( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc def WirePolyLine( @@ -2387,7 +2497,7 @@ def WirePolyLine( points: tuple, mergeType: Literal[C.MERGE, C.IMPRINT, C.SEPARATE] = IMPRINT, meshable: Boolean = ON, - ) -> BaseFeature: + ) -> "Feature": """This method creates an additional Feature object by creating a polyline wire that passes through a sequence of given points. Each point can be a datum point, a vertex, an interesting point, or a tuple. @@ -2419,10 +2529,12 @@ def WirePolyLine( feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() @abaqus_method_doc - def WireFromEdge(self, edgeList: str) -> BaseFeature: + def WireFromEdge(self, edgeList: str) -> "Feature": """This method creates an additional Feature object by creating a Wire by selecting one or more Edge objects of a Solid or Shell part. @@ -2441,4 +2553,6 @@ def WireFromEdge(self, edgeList: str) -> BaseFeature: feature: Feature A Feature object """ - ... + from ..Feature.Feature import Feature + + return Feature() diff --git a/src/abaqus/PathAndProbe/CurrentProbeValues.py b/src/abaqus/PathAndProbe/CurrentProbeValues.py index bbe41f5750..d64b155f3a 100644 --- a/src/abaqus/PathAndProbe/CurrentProbeValues.py +++ b/src/abaqus/PathAndProbe/CurrentProbeValues.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc @@ -17,4 +19,4 @@ class CurrentProbeValues: #: A tuple of Floats specifying the values obtained while probing. These values are updated #: constantly as the user moves the mouse over the object being probed. - values: Optional[Sequence[float]] = None + values: Sequence[float] | None = None diff --git a/src/abaqus/PathAndProbe/NodeQuery.py b/src/abaqus/PathAndProbe/NodeQuery.py index 8441f71c8b..197e92aa51 100644 --- a/src/abaqus/PathAndProbe/NodeQuery.py +++ b/src/abaqus/PathAndProbe/NodeQuery.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -17,8 +17,8 @@ class NodeQuery: #: An Int specifying the ID of the most recently queried node. If the last query was #: unsuccessful, **nodeID** = −1. - nodeId: Optional[int] = None + nodeId: int | None = None #: A tuple of Floats specifying the **X**, **Y**, and **Z** coordinates of the most recently #: queried node. - nodePos: Optional[float] = None + nodePos: float | None = None diff --git a/src/abaqus/PathAndProbe/Path.py b/src/abaqus/PathAndProbe/Path.py index 23aebf7bf0..d4bae04e8e 100644 --- a/src/abaqus/PathAndProbe/Path.py +++ b/src/abaqus/PathAndProbe/Path.py @@ -1,4 +1,6 @@ -from typing import List, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -22,7 +24,7 @@ class Path: #: If **type** = NODE_LIST, **coordinates** is a sequence of tuples of three Floats. This can be #: used as the value for the **expression** argument when creating a Path object of **type** = #: POINT_LIST. - coordinates: List[Sequence[float]] = [] + coordinates: list[Sequence[float]] = [] #: A String specifying the repository key. name: str diff --git a/src/abaqus/PathAndProbe/PathSession.py b/src/abaqus/PathAndProbe/PathSession.py index e4e9a330e0..ea690945d2 100644 --- a/src/abaqus/PathAndProbe/PathSession.py +++ b/src/abaqus/PathAndProbe/PathSession.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/PathAndProbe/ProbeOptions.py b/src/abaqus/PathAndProbe/ProbeOptions.py index 9d4ac5a5ce..3f854ff3b4 100644 --- a/src/abaqus/PathAndProbe/ProbeOptions.py +++ b/src/abaqus/PathAndProbe/ProbeOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -34,7 +34,7 @@ class ProbeOptions: #: ELEMENT_NODAL, and ELEMENT_CENTROID.When **probeEntity** = NODE, the only possible value is #: NODAL. When **probeEntity** = ELEMENT, the only possible values are INTEGRATION_POINT, #: ELEMENT_FACE, ELEMENT_NODAL, and ELEMENT_CENTROID, and the default is INTEGRATION_POINT. - probeOutputPosition: Optional[SymbolicConstant] = None + probeOutputPosition: SymbolicConstant #: A Boolean specifying whether to display the part instance information. This member is #: valid when **probeObject** = ODB. The default value is ON. @@ -113,20 +113,19 @@ class ProbeOptions: @abaqus_method_doc def setValues( self, - options: Optional["ProbeOptions"] = None, + options: "ProbeOptions" | None = None, probeEntity: Literal[C.NODE, C.ODB, C.ELEMENT] = ELEMENT, - probeOutputPosition: Optional[ - Literal[ - C.ELEMENT_NODAL, - C.ELEMENT_FACE, - C.ELEMENT, - C.NODAL, - C.INTEGRATION_POINT, - C.NODE, - C.ODB, - C.ELEMENT_CENTROID, - ] - ] = None, + probeOutputPosition: Literal[ + C.ELEMENT_NODAL, + C.ELEMENT_FACE, + C.ELEMENT, + C.NODAL, + C.INTEGRATION_POINT, + C.NODE, + C.ODB, + C.ELEMENT_CENTROID, + ] + | None = None, partInstance: Boolean = ON, elementID: Boolean = ON, elementType: Boolean = ON, diff --git a/src/abaqus/PathAndProbe/ProbeReport.py b/src/abaqus/PathAndProbe/ProbeReport.py index 79a7dda296..d9869c0647 100644 --- a/src/abaqus/PathAndProbe/ProbeReport.py +++ b/src/abaqus/PathAndProbe/ProbeReport.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -27,7 +27,7 @@ class ProbeReport: @abaqus_method_doc def setValues( self, - options: Optional[str] = None, + options: str | None = None, numColumns: int = 80, numDigits: int = 6, numFormat: Literal[C.AUTOMATIC, C.ENGINEERING, C.SCIENTIFIC] = ENGINEERING, diff --git a/src/abaqus/PathAndProbe/SelectedProbeValues.py b/src/abaqus/PathAndProbe/SelectedProbeValues.py index f596ee95be..41101cf635 100644 --- a/src/abaqus/PathAndProbe/SelectedProbeValues.py +++ b/src/abaqus/PathAndProbe/SelectedProbeValues.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -18,14 +18,14 @@ class SelectedProbeValues: """ #: An Int specifying the length of the **values** member. - length: Optional[int] = None + length: int | None = None #: A Boolean specifying whether any probe values have been selected (as is necessary prior #: to writing to a file). fieldOutputAvailable: Boolean = OFF #: A tuple of tuples of Floats specifying the selected probe values. - values: Optional[float] = None + values: float | None = None #: A tuple of Floats specifying the last sequence of the **values** member. lastValues: tuple = () diff --git a/src/abaqus/PlotOptions/BasicOptions.py b/src/abaqus/PlotOptions/BasicOptions.py index f6a2b14d3c..ab9cecd512 100644 --- a/src/abaqus/PlotOptions/BasicOptions.py +++ b/src/abaqus/PlotOptions/BasicOptions.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -80,7 +82,7 @@ class BasicOptions(_CopyOptionsBase): #: A SymbolicConstant specifying the extrapolation algorithm. This member is for internal #: use only. The only possible value is EXTRAP_COMPUTE_AVERAGE. - extrapAlgorithm: Optional[SymbolicConstant] = None + extrapAlgorithm: SymbolicConstant #: A SymbolicConstant specifying the refinement level for drawing curves. Possible values #: are EXTRA_COARSE, COARSE, MEDIUM, FINE, and EXTRA_FINE. The default value is COARSE. @@ -186,11 +188,11 @@ class BasicOptions(_CopyOptionsBase): #: An Int specifying the number of segments to display when **sweepArs** = ON. The default #: value is 10 or 20, depending on characteristics of your model. - numSweepSegmentsArs: Optional[int] = None + numSweepSegmentsArs: int | None = None #: An Int specifying the number of segments to display when **sweepElem** = ON. The default #: value is 10 or 20, depending on characteristics of your model. - numSweepSegmentsElem: Optional[int] = None + numSweepSegmentsElem: int | None = None #: A SymbolicConstant specifying the numeric form in which to display results that contain #: complex numbers. Possible values are COMPLEX_MAGNITUDE, COMPLEX_PHASE, REAL, IMAGINARY, @@ -359,7 +361,7 @@ class BasicOptions(_CopyOptionsBase): #: An Int specifying the types of sweepable elements and surfaces contained in the model, #: if any. - sweepModelType: Optional[int] = None + sweepModelType: int | None = None #: A Boolean specifying whether to average the element output. The default value is ON. averageElementOutput: Boolean = ON @@ -387,15 +389,15 @@ class BasicOptions(_CopyOptionsBase): #: An Int specifying the number of sectors of a cyclic symmetric model. The value is #: automatically computed from the cyclic symmetric model. This value is read-only. - numSectors: Optional[int] = None + numSectors: int | None = None #: A Float specifying the sector angle of a cyclic symmetric model. The value is #: automatically computed from the cyclic symmetric model. This value is read-only. - sectorAngle: Optional[float] = None + sectorAngle: float | None = None #: A Float specifying the automatic extrude depth used to extrude analytical rigid surfaces #: in the default setting. This value is read-only. - automaticExtrudeDepth: Optional[float] = None + automaticExtrudeDepth: float | None = None #: A String specifying the name of the coordinate system driving the moving camera. cameraCsysName: str = "" @@ -420,7 +422,7 @@ class BasicOptions(_CopyOptionsBase): #: A tuple of Ints specifying which sectors to display when #: **sectorSelectionType** = SELECT_BY_NUMBER. Possible values are 1 ≤ **selectedSectorNumbers** #: ≤ the number of sectors. The default value is (1). - selectedSectorNumbers: Optional[Sequence[int]] = None + selectedSectorNumbers: Sequence[int] | None = None #: A tuple of Strings specifying either element set or display group names (depending on #: the value of regionBoundaries) defining the averaging region boundaries. The default @@ -430,7 +432,7 @@ class BasicOptions(_CopyOptionsBase): @abaqus_method_doc def setValues( self, - options: Optional["BasicOptions"] = None, + options: "BasicOptions" | None = None, *, cameraCsysName: str = "", cameraMovesWithCsys: Boolean = OFF, @@ -465,8 +467,8 @@ def setValues( sweepStartAngleElem: float = 0, sweepEndAngleArs: float = 360, sweepEndAngleElem: float = 180, - numSweepSegmentsArs: Optional[int] = None, - numSweepSegmentsElem: Optional[int] = None, + numSweepSegmentsArs: int | None = None, + numSweepSegmentsElem: int | None = None, numericForm: Literal[ C.COMPLEX_ENVELOPE_MAX_ABS, C.COMPLEX_PHASE, @@ -522,7 +524,7 @@ def setValues( transformationType: Literal[ C.USER_SPECIFIED, C.NODAL, C.DEFAULT, C.LAYUP_ORIENTATION, C.TRANSFORM, C.ANGULAR ] = DEFAULT, - datumCsys: Optional[DatumCsys] = None, + datumCsys: DatumCsys | None = None, rigidTransformPrimary: Boolean = OFF, rigidTransformDeformed: Boolean = OFF, transformOnDeformed: Boolean = ON, diff --git a/src/abaqus/PlotOptions/DGCommonOptions.py b/src/abaqus/PlotOptions/DGCommonOptions.py index c97d64d34d..fa70faa89d 100644 --- a/src/abaqus/PlotOptions/DGCommonOptions.py +++ b/src/abaqus/PlotOptions/DGCommonOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -167,4 +167,4 @@ class DGCommonOptions: #: A tuple of three Floats specifying the coordinate scaling in each of the three #: coordinate directions when **coordinateScale** = ON. The default value is (1, 1, 1). - coordinateScaleFactors: Optional[float] = None + coordinateScaleFactors: float | None = None diff --git a/src/abaqus/PlotOptions/DGContourOptions.py b/src/abaqus/PlotOptions/DGContourOptions.py index 4a33aa5c57..69218b83af 100644 --- a/src/abaqus/PlotOptions/DGContourOptions.py +++ b/src/abaqus/PlotOptions/DGContourOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -107,4 +107,4 @@ class DGContourOptions: #: specifying the line style and line thickness. For possible values, refer to the #: **edgeLineStyle** and **edgeLineThickness** members of the DGCommonOptions object. The #: default is ((SOLID, VERY_THIN), ). - intervalLineAttributes: Optional[SymbolicConstant] = None + intervalLineAttributes: SymbolicConstant diff --git a/src/abaqus/PlotOptions/DGDisplayBodyOptions.py b/src/abaqus/PlotOptions/DGDisplayBodyOptions.py index f85d8d961a..1e34551cc4 100644 --- a/src/abaqus/PlotOptions/DGDisplayBodyOptions.py +++ b/src/abaqus/PlotOptions/DGDisplayBodyOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -80,4 +80,4 @@ class DGDisplayBodyOptions: #: A tuple of three Floats specifying the coordinate scaling in each of the three #: coordinate directions when **coordinateScale** = ON. The default value is (1, 1, 1). - coordinateScaleFactors: Optional[float] = None + coordinateScaleFactors: float | None = None diff --git a/src/abaqus/PlotOptions/DGSuperimposeOptions.py b/src/abaqus/PlotOptions/DGSuperimposeOptions.py index 1a0c476e6b..9087f95a7d 100644 --- a/src/abaqus/PlotOptions/DGSuperimposeOptions.py +++ b/src/abaqus/PlotOptions/DGSuperimposeOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -179,4 +179,4 @@ class DGSuperimposeOptions: #: A tuple of three Floats specifying the coordinate scaling in each of the three #: coordinate directions when **coordinateScale** = ON. The default value is (1, 1, 1). - coordinateScaleFactors: Optional[float] = None + coordinateScaleFactors: float | None = None diff --git a/src/abaqus/PlotOptions/DisplayOptions.py b/src/abaqus/PlotOptions/DisplayOptions.py index 669b1bd076..02c8a94639 100644 --- a/src/abaqus/PlotOptions/DisplayOptions.py +++ b/src/abaqus/PlotOptions/DisplayOptions.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -24,12 +26,12 @@ class DisplayOptions(_CopyOptionsBase): #: A tuple of SymbolicConstants specifying the plot state of the display. Possible values #: are UNDEFORMED, DEFORMED, CONTOURS_ON_UNDEF, CONTOURS_ON_DEF, SYMBOLS_ON_UNDEF, #: SYMBOLS_ON_DEF, ORIENT_ON_UNDEF, and ORIENT_ON_DEF. The default value is (UNDEFORMED). - plotState: SymbolicConstant = (UNDEFORMED,) + plotState: tuple[SymbolicConstant, ...] = (UNDEFORMED,) @abaqus_method_doc def setValues( self, - options: Optional["DisplayOptions"] = None, + options: "DisplayOptions" | None = None, plotState: Sequence[ Literal[ C.SYMBOLS_ON_DEF, diff --git a/src/abaqus/PlotOptions/FreeBodyOptions.py b/src/abaqus/PlotOptions/FreeBodyOptions.py index 11dd9f507c..6f6e939ebe 100644 --- a/src/abaqus/PlotOptions/FreeBodyOptions.py +++ b/src/abaqus/PlotOptions/FreeBodyOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -64,8 +64,8 @@ def setValues( numDigitsM: int = 3, sizePercentageF: float = 10, sizePercentageM: float = 10, - thresholdF: Optional[float] = None, - thresholdM: Optional[float] = None, + thresholdF: float | None = None, + thresholdM: float | None = None, drawLabelF: Boolean = ON, drawLabelM: Boolean = ON, showComp1F: Boolean = ON, diff --git a/src/abaqus/PlotOptions/HistoryVariable.py b/src/abaqus/PlotOptions/HistoryVariable.py index 3abd70dcb1..3444187a09 100644 --- a/src/abaqus/PlotOptions/HistoryVariable.py +++ b/src/abaqus/PlotOptions/HistoryVariable.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -27,4 +27,4 @@ class HistoryVariable: #: specifying the step label. *stepNumber*: An Int specifying the step #: number. *procedureDomain*: A SymbolicConstant specifying the analysis type of the step, #: which can have these values: “TIME,” “FREQUENCY,” or “MODAL.” - steps: Optional[SymbolicConstant] = None + steps: SymbolicConstant diff --git a/src/abaqus/PlotOptions/MdbData.py b/src/abaqus/PlotOptions/MdbData.py index c8f63e2e22..be148c76b6 100644 --- a/src/abaqus/PlotOptions/MdbData.py +++ b/src/abaqus/PlotOptions/MdbData.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -20,12 +20,12 @@ class MdbData: """ #: A tuple of (String, Float) tuples specifying the stepName and the stepPeriod. - stepPeriods: Optional[float] = None + stepPeriods: float | None = None #: A repository of MdbDataStep objects specifying the list of steps. The repository is #: read-only. - steps: Dict[str, MdbDataStep] = {} + steps: dict[str, MdbDataStep] = {} #: A repository of MdbDataInstance objects specifying the list of instances. The repository #: is read-only. - instances: Dict[str, MdbDataInstance] = {} + instances: dict[str, MdbDataInstance] = {} diff --git a/src/abaqus/PlotOptions/MdbDataFrameArray.py b/src/abaqus/PlotOptions/MdbDataFrameArray.py index 4a4e75c12d..9c5acd8a11 100644 --- a/src/abaqus/PlotOptions/MdbDataFrameArray.py +++ b/src/abaqus/PlotOptions/MdbDataFrameArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .MdbDataFrame import MdbDataFrame diff --git a/src/abaqus/PlotOptions/OdbContactDiagnostics.py b/src/abaqus/PlotOptions/OdbContactDiagnostics.py index ffab7bdb86..89fb081c8c 100644 --- a/src/abaqus/PlotOptions/OdbContactDiagnostics.py +++ b/src/abaqus/PlotOptions/OdbContactDiagnostics.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -17,7 +17,7 @@ class OdbContactDiagnostics: """ #: A repository of OdbAuxiliaryData objects. This attribute is read-only. - data: Dict[str, OdbAuxiliaryData] = {} + data: dict[str, OdbAuxiliaryData] = {} #: A string specifying the opening/overclosure status of the contact. This attribute is #: read-only. diff --git a/src/abaqus/PlotOptions/OdbData.py b/src/abaqus/PlotOptions/OdbData.py index 49deb40063..8665e51908 100644 --- a/src/abaqus/PlotOptions/OdbData.py +++ b/src/abaqus/PlotOptions/OdbData.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -45,77 +45,77 @@ class OdbData(_OptionsBase): #: - A String specifying a sequence of frame numbers; for example, `'3:5'` and `'3:15:3'`. #: For these expressions a negative number will indicate reverse numbering: -1 is the last #: frame of the step, -2 is the one before the last frame. Frame numbering starts at 0. - activeFrames: Optional[SymbolicConstant] = None + activeFrames: SymbolicConstant #: A tuple of (String, Float) tuples specifying the stepName and the stepPeriod. #: Alternatively, this member may take the value ODB_VALUES. - stepPeriods: Optional[float] = None + stepPeriods: float | None = None #: A repository of HistoryVariable objects specifying the history request label. The #: repository is read-only. - historyVariables: Dict[str, HistoryVariable] = {} + historyVariables: dict[str, HistoryVariable] = {} #: A repository of OdbDataStep objects specifying the list of steps. The repository is #: read-only. - steps: Dict[str, OdbDataStep] = {} + steps: dict[str, OdbDataStep] = {} #: A repository of OdbDataInstance objects specifying the list of instances. The repository #: is read-only. - instances: Dict[str, OdbDataInstance] = {} + instances: dict[str, OdbDataInstance] = {} #: A repository of OdbDataMaterial objects specifying the list of materials. The repository #: is read-only. - materials: Dict[str, OdbDataMaterial] = {} + materials: dict[str, OdbDataMaterial] = {} #: A repository of OdbDataSection objects specifying the list of sections. The repository #: is read-only. - sections: Dict[str, OdbDataSection] = {} + sections: dict[str, OdbDataSection] = {} #: A repository of OdbDataElementSet objects specifying the list of element sets. The #: repository is read-only. - elementSets: Dict[str, OdbDataElementSet] = {} + elementSets: dict[str, OdbDataElementSet] = {} #: A repository of OdbDataNodeSet objects specifying the list of node sets. The repository #: is read-only. - nodeSets: Dict[str, OdbDataNodeSet] = {} + nodeSets: dict[str, OdbDataNodeSet] = {} #: A repository of OdbDataSurfaceSet objects specifying the list of surface sets. The #: repository is read-only. - surfaceSets: Dict[str, OdbDataSurfaceSet] = {} + surfaceSets: dict[str, OdbDataSurfaceSet] = {} #: A repository of OdbDataDatumCsys objects specifying the list of coordinate systems #: defined in the model. The repository is read-only. - datumCsyses: Dict[str, OdbDataDatumCsys] = {} + datumCsyses: dict[str, OdbDataDatumCsys] = {} #: A repository of CouplingConstraint objects specifying the list of kinematic couplings. #: The repository is read-only. - kinematicCouplings: Dict[str, CouplingConstraint] = {} + kinematicCouplings: dict[str, CouplingConstraint] = {} #: A repository of CouplingConstraint objects specifying the list of distributing #: couplings. The repository is read-only. - distributingCouplings: Dict[str, CouplingConstraint] = {} + distributingCouplings: dict[str, CouplingConstraint] = {} #: A repository of CouplingConstraint objects specifying the list of shellsolid couplings. #: The repository is read-only. - shellSolidCouplings: Dict[str, CouplingConstraint] = {} + shellSolidCouplings: dict[str, CouplingConstraint] = {} #: A repository of RigidBodyConstraint objects specifying the list of rigid body #: constraints. The repository is read-only. - rigidbodies: Dict[str, RigidBodyConstraint] = {} + rigidbodies: dict[str, RigidBodyConstraint] = {} #: A repository of MpcConstraint objects specifying the list of multipoint constraints. The #: repository is read-only. - multiPointConstraints: Dict[str, MpcConstraint] = {} + multiPointConstraints: dict[str, MpcConstraint] = {} #: A repository of TieConstraint objects specifying the list of Tie constraints. The #: repository is read-only. - ties: Dict[str, TieConstraint] = {} + ties: dict[str, TieConstraint] = {} #: An OdbDiagnosticData object. diagnosticData: OdbDiagnosticData = OdbDiagnosticData() @abaqus_method_doc - def setValues(self, activeFrames: Optional[Literal[C.ALL]] = None, stepPeriods: tuple = ()): + def setValues(self, activeFrames: Literal[C.ALL] | None = None, stepPeriods: tuple = ()): """This method modifies the OdbData object. Parameters diff --git a/src/abaqus/PlotOptions/OdbDataDatumCsys.py b/src/abaqus/PlotOptions/OdbDataDatumCsys.py index bf26410661..8f8cb77c82 100644 --- a/src/abaqus/PlotOptions/OdbDataDatumCsys.py +++ b/src/abaqus/PlotOptions/OdbDataDatumCsys.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -21,7 +21,7 @@ class OdbDataDatumCsys: #: A SymbolicConstant specifying the coordinate system type. This String is read-only. #: Possible values are CARTESIAN, CYLINDRICAL, and SPHERICAL. - type: Optional[SymbolicConstant] = None + type: SymbolicConstant #: A tuple of three Floats specifying a sequence of three floats specifying the x-Axis #: vector. The default value is (1, 0, 0). diff --git a/src/abaqus/PlotOptions/OdbDataFrameArray.py b/src/abaqus/PlotOptions/OdbDataFrameArray.py index 0582829c11..7dbb04a971 100644 --- a/src/abaqus/PlotOptions/OdbDataFrameArray.py +++ b/src/abaqus/PlotOptions/OdbDataFrameArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .OdbDataFrame import OdbDataFrame diff --git a/src/abaqus/PlotOptions/OdbDiagnosticData.py b/src/abaqus/PlotOptions/OdbDiagnosticData.py index 35f5c1ccfa..5e0ccfef4a 100644 --- a/src/abaqus/PlotOptions/OdbDiagnosticData.py +++ b/src/abaqus/PlotOptions/OdbDiagnosticData.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -22,13 +22,13 @@ class OdbDiagnosticData: """ #: A repository of OdbAnalysisError objects. - analysisErrors: Dict[str, OdbAnalysisError] = {} + analysisErrors: dict[str, OdbAnalysisError] = {} #: A repository of OdbAnalysisWarning objects. - analysisWarnings: Dict[str, OdbAnalysisWarning] = {} + analysisWarnings: dict[str, OdbAnalysisWarning] = {} #: A repository of OdbDiagnosticStep objects. - steps: Dict[str, OdbDiagnosticStep] = {} + steps: dict[str, OdbDiagnosticStep] = {} #: An OdbJobTime object. jobTime: OdbJobTime = OdbJobTime() diff --git a/src/abaqus/PlotOptions/OdbDiagnosticIncrement.py b/src/abaqus/PlotOptions/OdbDiagnosticIncrement.py index 8da396b4a6..180cab25b5 100644 --- a/src/abaqus/PlotOptions/OdbDiagnosticIncrement.py +++ b/src/abaqus/PlotOptions/OdbDiagnosticIncrement.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -18,7 +18,7 @@ class OdbDiagnosticIncrement: """ #: A repository of OdbDiagnosticAttempt objects. - attempts: Dict[str, OdbDiagnosticAttempt] = {} + attempts: dict[str, OdbDiagnosticAttempt] = {} #: A float specifying the size of the initial increment. This attribute is read-only. initialSize: str = "" diff --git a/src/abaqus/PlotOptions/OdbDiagnosticStep.py b/src/abaqus/PlotOptions/OdbDiagnosticStep.py index cccbc6a5da..72def5401b 100644 --- a/src/abaqus/PlotOptions/OdbDiagnosticStep.py +++ b/src/abaqus/PlotOptions/OdbDiagnosticStep.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -26,7 +26,7 @@ class OdbDiagnosticStep: characteristicElementLength: str = "" #: A repository of OdbContactDiagnostics objects. - contactDiagnostics: Dict[str, OdbContactDiagnostics] = {} + contactDiagnostics: dict[str, OdbContactDiagnostics] = {} #: A sequence of string specifying the explicit increment status. This attribute is #: read-only. @@ -44,7 +44,7 @@ class OdbDiagnosticStep: incrementsCompleted: str = "" #: A repository of OdbDiagnosticIncrement objects. - increments: Dict[str, OdbDiagnosticIncrement] = {} + increments: dict[str, OdbDiagnosticIncrement] = {} #: A float specifying the initial increment size for the step. This attribute is read-only. initialTimeIncrement: str = "" diff --git a/src/abaqus/PlotOptions/ViewCutOptions.py b/src/abaqus/PlotOptions/ViewCutOptions.py index da81763b4e..5021ca91f8 100644 --- a/src/abaqus/PlotOptions/ViewCutOptions.py +++ b/src/abaqus/PlotOptions/ViewCutOptions.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -96,15 +98,15 @@ class ViewCutOptions(_CopyOptionsBase): #: None or an OptionArg object specifying values to be used for defining the options #: applicable on the model below the cut. The default value is None. - belowOptions: Optional[str] = None + belowOptions: str | None = None #: None or an OptionArg object specifying values to be used for defining the options #: applicable on the model on the cut. The default value is None. - onOptions: Optional[str] = None + onOptions: str | None = None #: None or an OptionArg object specifying values to be used for defining the options #: applicable on the model above the cut. The default value is None. - aboveOptions: Optional[str] = None + aboveOptions: str | None = None #: The SymbolicConstant GLOBAL or a String specifying the coordinate system name for the #: free body cut's component resolution. The default value is GLOBAL. @@ -116,22 +118,22 @@ class ViewCutOptions(_CopyOptionsBase): #: A tuple of three Floats specifying the summation point for the free body cut. The #: default value is (0, 0, 0). - summationPoint: Optional[float] = None + summationPoint: float | None = None #: A tuple of three Floats specifying the Y axis for free body component resolution. The #: default value is (0, 1, 0). - yAxis: Optional[float] = None + yAxis: float | None = None @abaqus_method_doc def setValues( self, - options: Optional["ViewCutOptions"] = None, + options: "ViewCutOptions" | None = None, *, - belowOptions: Optional[str] = None, + belowOptions: str | None = None, useBelowOptions: Boolean = OFF, - onOptions: Optional[str] = None, + onOptions: str | None = None, useOnOptions: Boolean = OFF, - aboveOptions: Optional[str] = None, + aboveOptions: str | None = None, useAboveOptions: Boolean = OFF, freeBodyCutThru: Literal[C.WHOLE_MODEL, C.CURRENT_DISPLAY_GROUP] = CURRENT_DISPLAY_GROUP, freeBodyStepThru: Literal[C.PREDEFINED_PATH, C.ACTIVE_CUT_RANGE] = ACTIVE_CUT_RANGE, diff --git a/src/abaqus/PredefinedField/Field.py b/src/abaqus/PredefinedField/Field.py index 8ba4213f54..01a9c2c1ed 100644 --- a/src/abaqus/PredefinedField/Field.py +++ b/src/abaqus/PredefinedField/Field.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -65,7 +67,7 @@ def __init__( createStepName: str, region: Region, outputVariable: str = "", - fieldVariableNum: Optional[int] = None, + fieldVariableNum: int | None = None, distributionType: Literal[ C.FIELD, C.FROM_FILE, C.DISCRETE_FIELD, C.FROM_FILE_AND_USER_DEFINED, C.UNIFORM, C.USER_DEFINED ] = UNIFORM, @@ -78,10 +80,10 @@ def __init__( field: str = "", amplitude: str = UNSET, fileName: str = "", - beginStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - beginIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, - endStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - endIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, + beginStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + beginIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, + endStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + endIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, interpolate: Union[Literal[C.MIDSIDE_ONLY], Boolean] = OFF, magnitudes: str = "", ): @@ -205,7 +207,7 @@ def move(self, fromStepName: str, toStepName: str): def setValues( self, outputVariable: str = "", - fieldVariableNum: Optional[int] = None, + fieldVariableNum: int | None = None, distributionType: Literal[ C.FIELD, C.FROM_FILE, C.DISCRETE_FIELD, C.FROM_FILE_AND_USER_DEFINED, C.UNIFORM, C.USER_DEFINED ] = UNIFORM, @@ -218,10 +220,10 @@ def setValues( field: str = "", amplitude: str = UNSET, fileName: str = "", - beginStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - beginIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, - endStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - endIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, + beginStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + beginIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, + endStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + endIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, interpolate: Union[Literal[C.MIDSIDE_ONLY], Boolean] = OFF, magnitudes: str = "", ): @@ -309,14 +311,14 @@ def setValuesInStep( self, stepName: str, outputVariable: str = "", - fieldVariableNum: Optional[int] = None, + fieldVariableNum: int | None = None, field: str = "", amplitude: str = UNSET, fileName: str = "", - beginStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - beginIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, - endStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - endIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, + beginStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + beginIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, + endStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + endIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, interpolate: Union[Literal[C.MIDSIDE_ONLY], Boolean] = OFF, magnitudes: str = "", ): diff --git a/src/abaqus/PredefinedField/FieldState.py b/src/abaqus/PredefinedField/FieldState.py index 04d8868f9a..896ca2a763 100644 --- a/src/abaqus/PredefinedField/FieldState.py +++ b/src/abaqus/PredefinedField/FieldState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -30,7 +30,7 @@ class FieldState(PredefinedFieldState): #: A SymbolicConstant specifying the propagation state of the **fileName** member. Possible #: values are UNSET, SET, and UNCHANGED. - fileNameState: Optional[SymbolicConstant] = None + fileNameState: SymbolicConstant #: A SymbolicConstant or an Int specifying the first step from which field values are to be #: read. This argument is valid only when **distribution** = FROM_FILE or @@ -40,41 +40,41 @@ class FieldState(PredefinedFieldState): #: A SymbolicConstant specifying the propagation state of the **beginStep** member. Possible #: values are UNSET, SET, and UNCHANGED. - beginStepState: Optional[SymbolicConstant] = None + beginStepState: SymbolicConstant #: None or an Int specifying the first increment of the step set in **beginStep** or the #: SymbolicConstants STEP_START or STEP_END. This argument is valid only when #: **distributionType** = FROM_FILE or **distributionType** = FROM_FILE_AND_USER_DEFINED. The #: default value is None. - beginIncrement: Optional[SymbolicConstant] = None + beginIncrement: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **beginIncrement** member. #: Possible values are UNSET, SET, and UNCHANGED. - beginIncrementState: Optional[SymbolicConstant] = None + beginIncrementState: SymbolicConstant #: None or an Int specifying the last step from which field values are to be read or the #: SymbolicConstants FIRST_STEP and LAST_STEP. This argument is valid only when #: **distributionType** = FROM_FILE or **distributionType** = FROM_FILE_AND_USER_DEFINED. The #: default value is None. - endStep: Optional[SymbolicConstant] = None + endStep: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **endStep** member. Possible #: values are UNSET, SET, and UNCHANGED. - endStepState: Optional[SymbolicConstant] = None + endStepState: SymbolicConstant #: None or an Int specifying the last increment of the step set in **endStep** or the #: SymbolicConstants STEP_START and STEP_END. This argument is valid only when #: **distributionType** = FROM_FILE or **distributionType** = FROM_FILE_AND_USER_DEFINED. The #: default value is None. - endIncrement: Optional[SymbolicConstant] = None + endIncrement: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **endIncrement** member. #: Possible values are UNSET, SET, and UNCHANGED. - endIncrementState: Optional[SymbolicConstant] = None + endIncrementState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitudeState** member. #: Possible values are UNSET, SET, and UNCHANGED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A String specifying the name of the file from which the field values are to be read when #: **distributionType** = FROM_FILE or **distributionType** = FROM_FILE_AND_USER_DEFINED. @@ -88,7 +88,7 @@ class FieldState(PredefinedFieldState): #: A tuple of SymbolicConstants specifying the propagation state of each item of the #: **magnitudes** member. Possible values are UNSET, SET, and UNCHANGED. - magnitudesState: Optional[SymbolicConstant] = None + magnitudesState: SymbolicConstant #: A tuple of Floats specifying the field values when **distributionType** = UNIFORM or #: **distributionType** = FIELD. The value of the **magnitudes** argument is a function of the @@ -125,4 +125,4 @@ class FieldState(PredefinedFieldState): #: This member exists in all PredefinedFieldState objects, but different predefined fields #: use different subsets of the entire list of possible values depending on propagation #: rules. - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/PredefinedField/IMAField.py b/src/abaqus/PredefinedField/IMAField.py index 865624d353..f8f26ea7be 100644 --- a/src/abaqus/PredefinedField/IMAField.py +++ b/src/abaqus/PredefinedField/IMAField.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from abqpy.decorators import abaqus_class_doc from ..Region.Region import Region @@ -22,4 +24,4 @@ class IMAField: #: A tuple of Strings specifying the name of the discrete fields that contain the volume #: fraction data. The length of the tuple corresponds to the number of material instance #: names, as established by the assigned Eulerian section. - discFieldList: tuple = () + discfieldList: tuple[str, ...] = () diff --git a/src/abaqus/PredefinedField/IMARegion.py b/src/abaqus/PredefinedField/IMARegion.py index d1b34a2da8..6488861cde 100644 --- a/src/abaqus/PredefinedField/IMARegion.py +++ b/src/abaqus/PredefinedField/IMARegion.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -24,4 +24,4 @@ class IMARegion: #: A tuple of Floats specifying the volume fractions, per material instance name. The #: length of the tuple corresponds to the number of material instance names, as established #: by the assigned Eulerian section. - fractionList: Optional[float] = None + fractionList: float | None = None diff --git a/src/abaqus/PredefinedField/MaterialAssignment.py b/src/abaqus/PredefinedField/MaterialAssignment.py index 8864d0e8fa..522b1e2df6 100644 --- a/src/abaqus/PredefinedField/MaterialAssignment.py +++ b/src/abaqus/PredefinedField/MaterialAssignment.py @@ -1,3 +1,7 @@ +from __future__ import annotations + +from typing import Sequence + from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..Assembly.PartInstanceArray import PartInstanceArray @@ -41,19 +45,19 @@ class MaterialAssignment(PredefinedField): #: object.A tuple of Floats specifying the uniform volume fraction values. The length of #: the tuple must match the number of material instance names specified in the Eulerain #: section assigned to part instances specified by **instanceList**. - assignmentList: tuple = () + assignmentList: Sequence[tuple[Region, tuple[float, ...]]] = () #: A sequence of tuples specifying the discrete volume fractions to be assigned. This #: argument is valid only when **useFields** = TRUE. Each tuple contains two entries:A Region #: object.A tuple of Strings specifying Discrete Field names. The length of the tuple must #: match the number of material instance names specified in the Eulerain section assigned #: to part instances specified by **instanceList**. - fieldList: tuple = () + fieldList: Sequence[tuple[Region, tuple[str, ...]]] = () # type: ignore #: A sequence of three Ints specifying colors used to display the material instance #: assignments. This is a sequence of R,G,B colors, where the values are represented by #: integers between 0 and 255. The default value is an empty sequence. - colorList: tuple = () + colorList: Sequence[tuple[int, int, int]] = () @abaqus_method_doc def __init__( @@ -61,9 +65,9 @@ def __init__( name: str, instanceList: PartInstanceArray, useFields: Boolean = OFF, - assignmentList: tuple = (), - fieldList: tuple = (), - colorList: tuple = (), + assignmentList: Sequence[tuple[Region, tuple[float, ...]]] = (), + fieldList: Sequence[tuple[Region, tuple[str, ...]]] = (), + colorList: Sequence[tuple[int, int, int]] = (), ): """This method creates a MaterialAssignment predefined field object. @@ -110,9 +114,9 @@ def __init__( def setValues( self, useFields: Boolean = OFF, - assignmentList: tuple = (), - fieldList: tuple = (), - colorList: tuple = (), + assignmentList: Sequence[tuple[Region, tuple[float, ...]]] = (), + fieldList: Sequence[tuple[Region, tuple[str, ...]]] = (), + colorList: Sequence[tuple[int, int, int]] = (), ): """This method modifies the MaterialAssignment object. diff --git a/src/abaqus/PredefinedField/PorePressure.py b/src/abaqus/PredefinedField/PorePressure.py index e67304f4bc..78175b0c25 100644 --- a/src/abaqus/PredefinedField/PorePressure.py +++ b/src/abaqus/PredefinedField/PorePressure.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal @@ -5,7 +7,13 @@ from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..Region.Region import Region -from ..UtilityAndView.abaqusConstants import CONSTANT_RATIO, MAGNITUDE, UNIFORM, Boolean +from ..UtilityAndView.abaqusConstants import ( + CONSTANT_RATIO, + MAGNITUDE, + OFF, + UNIFORM, + Boolean, +) from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .PredefinedField import PredefinedField @@ -32,17 +40,17 @@ def __init__( name: str, region: Region, distributionType: Literal[C.UNIFORM, C.FROM_FILE, C.USER_DEFINED] = UNIFORM, - porePressure1: float = ..., - porePressure2: float = ..., - coord1: float = ..., - coord2: float = ..., + porePressure1: float = 0, + porePressure2: float = 0, + coord1: float = 0, + coord2: float = 0, pressure2Distribution: Literal[C.MAGNITUDE, C.ANALYTICAL_FIELD] = MAGNITUDE, - pressure2Field: str = ..., + pressure2Field: str = "", variation: Literal[C.CONSTANT_RATIO, C.VARIABLE_RATIO] = CONSTANT_RATIO, - fileName: str = ..., - increment: Union[int, Literal[C.LAST_INCREMENT]] = ..., - step: Union[int, Literal[C.LAST_STEP]] = ..., - interpolate: Boolean = ..., + fileName: str = "", + increment: Union[int, Literal[C.LAST_INCREMENT]] = C.LAST_INCREMENT, + step: Union[int, Literal[C.LAST_STEP]] = C.LAST_STEP, + interpolate: Boolean = OFF, ) -> None: """This method creates a PorePressure predefined field object. @@ -102,10 +110,10 @@ def __init__( def setValues( self, distributionType: Literal[C.UNIFORM, C.FROM_FILE, C.USER_DEFINED] = UNIFORM, - porePressure1: float = ..., - porePressure2: float = ..., - coord1: float = ..., - coord2: float = ..., + porePressure1: float = 0, + porePressure2: float = 0, + coord1: float = 0, + coord2: float = 0, pressure2Distribution: Literal[C.MAGNITUDE, C.ANALYTICAL_FIELD] = MAGNITUDE, pressure2Field: str = ..., variation: Literal[C.CONSTANT_RATIO, C.VARIABLE_RATIO] = CONSTANT_RATIO, diff --git a/src/abaqus/PredefinedField/PredefinedFieldModel.py b/src/abaqus/PredefinedField/PredefinedFieldModel.py index 645a1acc49..f40a7c9f46 100644 --- a/src/abaqus/PredefinedField/PredefinedFieldModel.py +++ b/src/abaqus/PredefinedField/PredefinedFieldModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -195,9 +197,9 @@ def MaterialAssignment( name: str, instanceList: PartInstanceArray, useFields: Boolean = OFF, - assignmentList: tuple = (), - fieldList: tuple = (), - colorList: tuple = (), + assignmentList: Sequence[tuple[Region, tuple[float, ...]]] = (), + fieldList: Sequence[tuple[Region, tuple[str, ...]]] = (), + colorList: Sequence[tuple[int, int, int]] = (), ) -> MaterialAssignment: """This method creates a MaterialAssignment predefined field object. @@ -249,17 +251,17 @@ def PorePressure( name: str, region: Region, distributionType: Literal[C.UNIFORM, C.FROM_FILE, C.USER_DEFINED] = UNIFORM, - porePressure1: float = ..., - porePressure2: float = ..., - coord1: float = ..., - coord2: float = ..., + porePressure1: float = 0, + porePressure2: float = 0, + coord1: float = 0, + coord2: float = 0, pressure2Distribution: Literal[C.MAGNITUDE, C.ANALYTICAL_FIELD] = MAGNITUDE, - pressure2Field: str = ..., + pressure2Field: str = "", variation: Literal[C.CONSTANT_RATIO, C.VARIABLE_RATIO] = CONSTANT_RATIO, - fileName: str = ..., - increment: Union[int, Literal[C.LAST_INCREMENT]] = ..., - step: Union[int, Literal[C.LAST_STEP]] = ..., - interpolate: Boolean = ..., + fileName: str = "", + increment: Union[int, Literal[C.LAST_INCREMENT]] = C.LAST_INCREMENT, + step: Union[int, Literal[C.LAST_STEP]] = C.LAST_STEP, + interpolate: Boolean = OFF, ) -> PorePressure: """This method creates a PorePressure predefined field object. @@ -348,10 +350,10 @@ def Temperature( field: str = "", amplitude: str = UNSET, fileName: str = "", - beginStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - beginIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, - endStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - endIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, + beginStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + beginIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, + endStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + endIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, interpolate: Union[Literal[C.MIDSIDE_ONLY], Boolean] = OFF, magnitudes: str = "", absoluteExteriorTolerance: float = 0, @@ -549,7 +551,7 @@ def Saturation( region: Region, distributionType: Literal[C.UNIFORM, C.FIELD] = UNIFORM, field: str = "", - value: float = ..., + value: float = 0, ) -> Saturation: """This method creates a Saturation predefined field object. @@ -594,12 +596,12 @@ def Stress( name: str, region: Region, distributionType: Literal[C.UNIFORM, C.FROM_FILE] = UNIFORM, - sigma11: float = ..., - sigma22: float = ..., - sigma33: float = ..., - sigma12: float = ..., - sigma13: float = ..., - sigma23: float = ..., + sigma11: float = 0, + sigma22: float = 0, + sigma33: float = 0, + sigma12: float = 0, + sigma13: float = 0, + sigma23: float = 0, ) -> Stress: """This method creates a Stress predefined field object. @@ -658,7 +660,7 @@ def Field( createStepName: str, region: Region, outputVariable: str = "", - fieldVariableNum: Optional[int] = None, + fieldVariableNum: int | None = None, distributionType: Literal[ C.FIELD, C.FROM_FILE, C.DISCRETE_FIELD, C.FROM_FILE_AND_USER_DEFINED, C.UNIFORM, C.USER_DEFINED ] = UNIFORM, @@ -671,10 +673,10 @@ def Field( field: str = "", amplitude: str = UNSET, fileName: str = "", - beginStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - beginIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, - endStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - endIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, + beginStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + beginIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, + endStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + endIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, interpolate: Union[Literal[C.MIDSIDE_ONLY], Boolean] = OFF, magnitudes: str = "", ): @@ -803,17 +805,17 @@ def VoidsRatio( name: str, region: Region, distributionType: Literal[C.UNIFORM, C.FROM_FILE, C.USER_DEFINED] = UNIFORM, - voidsRatio1: float = ..., - voidsRatio2: float = ..., - coord1: float = ..., - coord2: float = ..., + voidsRatio1: float = 0, + voidsRatio2: float = 0, + coord1: float = 0, + coord2: float = 0, ratio2Distribution: Literal[C.MAGNITUDE, C.ANALYTICAL_FIELD] = MAGNITUDE, - ratio2Field: str = ..., + ratio2Field: str = "", variation: Literal[C.CONSTANT_RATIO, C.VARIABLE_RATIO] = CONSTANT_RATIO, - fileName: str = ..., - increment: Union[int, Literal[C.LAST_INCREMENT]] = ..., - step: Union[int, Literal[C.LAST_STEP]] = ..., - interpolate: Boolean = ..., + fileName: str = "", + increment: Union[int, Literal[C.LAST_INCREMENT]] = C.LAST_INCREMENT, + step: Union[int, Literal[C.LAST_STEP]] = C.LAST_STEP, + interpolate: Boolean = OFF, ) -> VoidsRatio: """This method creates a PorePressure predefined field object. diff --git a/src/abaqus/PredefinedField/PredefinedFieldState.py b/src/abaqus/PredefinedField/PredefinedFieldState.py index 7b6fe6a13c..bc7673e1d0 100644 --- a/src/abaqus/PredefinedField/PredefinedFieldState.py +++ b/src/abaqus/PredefinedField/PredefinedFieldState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -38,4 +38,4 @@ class PredefinedFieldState: #: This member exists in all PredefinedFieldState objects, but different predefined fields #: use different subsets of the entire list of possible values depending on propagation #: rules. - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/PredefinedField/Saturation.py b/src/abaqus/PredefinedField/Saturation.py index 1af007e787..7a001d969d 100644 --- a/src/abaqus/PredefinedField/Saturation.py +++ b/src/abaqus/PredefinedField/Saturation.py @@ -31,7 +31,7 @@ def __init__( region: Region, distributionType: Literal[C.UNIFORM, C.FIELD] = UNIFORM, field: str = "", - value: float = ..., + value: float = 0, ) -> None: """This method creates a Saturation predefined field object. @@ -71,7 +71,7 @@ def setValues( region: Region, distributionType: Literal[C.UNIFORM, C.FIELD] = UNIFORM, field: str = "", - value: float = ..., + value: float = 0, ) -> None: """This method modifies the Saturation object. diff --git a/src/abaqus/PredefinedField/Stress.py b/src/abaqus/PredefinedField/Stress.py index c85b878584..2e909f2ca5 100644 --- a/src/abaqus/PredefinedField/Stress.py +++ b/src/abaqus/PredefinedField/Stress.py @@ -33,12 +33,12 @@ def __init__( name: str, region: Region, distributionType: Literal[C.UNIFORM, C.FROM_FILE] = UNIFORM, - sigma11: float = ..., - sigma22: float = ..., - sigma33: float = ..., - sigma12: float = ..., - sigma13: float = ..., - sigma23: float = ..., + sigma11: float = 0, + sigma22: float = 0, + sigma33: float = 0, + sigma12: float = 0, + sigma13: float = 0, + sigma23: float = 0, ) -> None: """This method creates a Stress predefined field object. @@ -80,12 +80,12 @@ def __init__( def setValues( self, distributionType: Literal[C.UNIFORM, C.FROM_FILE] = UNIFORM, - sigma11: float = ..., - sigma22: float = ..., - sigma33: float = ..., - sigma12: float = ..., - sigma13: float = ..., - sigma23: float = ..., + sigma11: float = 0, + sigma22: float = 0, + sigma33: float = 0, + sigma12: float = 0, + sigma13: float = 0, + sigma23: float = 0, ) -> None: """This method modifies the Stress object. diff --git a/src/abaqus/PredefinedField/Temperature.py b/src/abaqus/PredefinedField/Temperature.py index 7d137122f4..5bddf54ce5 100644 --- a/src/abaqus/PredefinedField/Temperature.py +++ b/src/abaqus/PredefinedField/Temperature.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -72,10 +74,10 @@ def __init__( field: str = "", amplitude: str = UNSET, fileName: str = "", - beginStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - beginIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, - endStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - endIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, + beginStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + beginIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, + endStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + endIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, interpolate: Union[Literal[C.MIDSIDE_ONLY], Boolean] = OFF, magnitudes: str = "", absoluteExteriorTolerance: float = 0, @@ -212,10 +214,10 @@ def setValues( field: str = "", amplitude: str = UNSET, fileName: str = "", - beginStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - beginIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, - endStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - endIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, + beginStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + beginIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, + endStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + endIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, interpolate: Union[Literal[C.MIDSIDE_ONLY], Boolean] = OFF, magnitudes: str = "", absoluteExteriorTolerance: float = 0, @@ -309,10 +311,10 @@ def setValuesInStep( field: str = "", amplitude: str = UNSET, fileName: str = "", - beginStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - beginIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, - endStep: Optional[Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP]] = None, - endIncrement: Optional[Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START]] = None, + beginStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + beginIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, + endStep: Literal[C.FROM_FILE, C.LAST_STEP, C.FROM_FILE_AND_USER_DEFINED, C.FIRST_STEP] | None = None, + endIncrement: Literal[C.FROM_FILE, C.FROM_FILE_AND_USER_DEFINED, C.STEP_END, C.STEP_START] | None = None, interpolate: Union[Literal[C.MIDSIDE_ONLY], Boolean] = OFF, magnitudes: str = "", absoluteExteriorTolerance: float = 0, diff --git a/src/abaqus/PredefinedField/TemperatureState.py b/src/abaqus/PredefinedField/TemperatureState.py index e06a8ad718..9776c87708 100644 --- a/src/abaqus/PredefinedField/TemperatureState.py +++ b/src/abaqus/PredefinedField/TemperatureState.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -21,7 +21,7 @@ class TemperatureState(PredefinedFieldState): #: A SymbolicConstant specifying the propagation state of the **fileName** member. Possible #: values are UNSET, SET, and UNCHANGED. - fileNameState: Optional[SymbolicConstant] = None + fileNameState: SymbolicConstant #: A SymbolicConstant or an Int specifying the first step from which temperature values are #: to be read. This argument is valid only when **distribution** = FROM_FILE or @@ -31,37 +31,37 @@ class TemperatureState(PredefinedFieldState): #: A SymbolicConstant specifying the propagation state of the **beginStep** member. Possible #: values are UNSET, SET, and UNCHANGED. - beginStepState: Optional[SymbolicConstant] = None + beginStepState: SymbolicConstant #: None or an Int specifying the first increment of the step set in **beginStep** or the #: SymbolicConstants STEP_START or STEP_END. This argument is valid only when #: **distributionType** = FROM_FILE or **distributionType** = FROM_FILE_AND_USER_DEFINED. The #: default value is None. - beginIncrement: Optional[SymbolicConstant] = None + beginIncrement: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **beginIncrement** member. #: Possible values are UNSET, SET, and UNCHANGED. - beginIncrementState: Optional[SymbolicConstant] = None + beginIncrementState: SymbolicConstant #: None or an Int specifying the last step from which temperature values are to be read or #: the SymbolicConstants FIRST_STEP and LAST_STEP. This argument is valid only when #: **distributionType** = FROM_FILE or **distributionType** = FROM_FILE_AND_USER_DEFINED. The #: default value is None. - endStep: Optional[SymbolicConstant] = None + endStep: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **endStep** member. Possible #: values are UNSET, SET, and UNCHANGED. - endStepState: Optional[SymbolicConstant] = None + endStepState: SymbolicConstant #: None or an Int specifying the last increment of the step set in **endStep** or the #: SymbolicConstants STEP_START and STEP_END. This argument is valid only when #: **distributionType** = FROM_FILE or **distributionType** = FROM_FILE_AND_USER_DEFINED. The #: default value is None. - endIncrement: Optional[SymbolicConstant] = None + endIncrement: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **endIncrement** member. #: Possible values are UNSET, SET, and UNCHANGED. - endIncrementState: Optional[SymbolicConstant] = None + endIncrementState: SymbolicConstant #: A Boolean specifying that temperatures in second-order elements are to be interpolated #: from corner node temperatures. This argument is valid only when @@ -70,11 +70,11 @@ class TemperatureState(PredefinedFieldState): #: A SymbolicConstant specifying the propagation state of the **midside** member. Possible #: values are UNSET, SET, and UNCHANGED. - midsideState: Optional[SymbolicConstant] = None + midsideState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the **amplitudeState** member. #: Possible values are UNSET, SET, and UNCHANGED. - amplitudeState: Optional[SymbolicConstant] = None + amplitudeState: SymbolicConstant #: A String specifying the name of the file from which the temperature values are to be #: read when **distributionType** = FROM_FILE or **distributionType** = FROM_FILE_AND_USER_DEFINED. @@ -88,7 +88,7 @@ class TemperatureState(PredefinedFieldState): #: A tuple of SymbolicConstants specifying the propagation state of each item of the #: **magnitudes** member. Possible values are UNSET, SET, and UNCHANGED. - magnitudesState: Optional[SymbolicConstant] = None + magnitudesState: SymbolicConstant #: A tuple of Floats specifying the temperature values when **distributionType** = UNIFORM or #: **distributionType** = FIELD. The value of the **magnitudes** argument is a function of the @@ -125,4 +125,4 @@ class TemperatureState(PredefinedFieldState): #: This member exists in all PredefinedFieldState objects, but different predefined fields #: use different subsets of the entire list of possible values depending on propagation #: rules. - status: Optional[SymbolicConstant] = None + status: SymbolicConstant diff --git a/src/abaqus/PredefinedField/VoidsRatio.py b/src/abaqus/PredefinedField/VoidsRatio.py index db278d4ecd..5ba54b4a1c 100644 --- a/src/abaqus/PredefinedField/VoidsRatio.py +++ b/src/abaqus/PredefinedField/VoidsRatio.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal @@ -5,7 +7,13 @@ from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..Region.Region import Region -from ..UtilityAndView.abaqusConstants import CONSTANT_RATIO, MAGNITUDE, UNIFORM, Boolean +from ..UtilityAndView.abaqusConstants import ( + CONSTANT_RATIO, + MAGNITUDE, + OFF, + UNIFORM, + Boolean, +) from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .PredefinedField import PredefinedField @@ -32,17 +40,17 @@ def __init__( name: str, region: Region, distributionType: Literal[C.UNIFORM, C.FROM_FILE, C.USER_DEFINED] = UNIFORM, - voidsRatio1: float = ..., - voidsRatio2: float = ..., - coord1: float = ..., - coord2: float = ..., + voidsRatio1: float = 0, + voidsRatio2: float = 0, + coord1: float = 0, + coord2: float = 0, ratio2Distribution: Literal[C.MAGNITUDE, C.ANALYTICAL_FIELD] = MAGNITUDE, - ratio2Field: str = ..., + ratio2Field: str = "", variation: Literal[C.CONSTANT_RATIO, C.VARIABLE_RATIO] = CONSTANT_RATIO, - fileName: str = ..., - increment: Union[int, Literal[C.LAST_INCREMENT]] = ..., - step: Union[int, Literal[C.LAST_STEP]] = ..., - interpolate: Boolean = ..., + fileName: str = "", + increment: Union[int, Literal[C.LAST_INCREMENT]] = C.LAST_INCREMENT, + step: Union[int, Literal[C.LAST_STEP]] = C.LAST_STEP, + interpolate: Boolean = OFF, ) -> None: """This method creates a PorePressure predefined field object. @@ -101,10 +109,10 @@ def __init__( def setValues( self, distributionType: Literal[C.UNIFORM, C.FROM_FILE, C.USER_DEFINED] = UNIFORM, - voidsRatio1: float = ..., - voidsRatio2: float = ..., - coord1: float = ..., - coord2: float = ..., + voidsRatio1: float = 0, + voidsRatio2: float = 0, + coord1: float = 0, + coord2: float = 0, ratio2Distribution: Literal[C.MAGNITUDE, C.ANALYTICAL_FIELD] = MAGNITUDE, ratio2Field: str = ..., variation: Literal[C.CONSTANT_RATIO, C.VARIABLE_RATIO] = CONSTANT_RATIO, diff --git a/src/abaqus/Print/EpsOptions.py b/src/abaqus/Print/EpsOptions.py index b42fd38ce6..96a45c8f9a 100644 --- a/src/abaqus/Print/EpsOptions.py +++ b/src/abaqus/Print/EpsOptions.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Print/PageSetupOptions.py b/src/abaqus/Print/PageSetupOptions.py index 159f8fe4c0..b5b2021cf2 100644 --- a/src/abaqus/Print/PageSetupOptions.py +++ b/src/abaqus/Print/PageSetupOptions.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Property/CompositeLayup.py b/src/abaqus/Property/CompositeLayup.py index c08a68b8cf..38bc5a085f 100644 --- a/src/abaqus/Property/CompositeLayup.py +++ b/src/abaqus/Property/CompositeLayup.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -207,7 +207,7 @@ def CompositePly( axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle: float = 0, additionalRotationType: Literal[C.ROTATION_NONE, C.ANGLE_0, C.ROTATION_FIELD, C.ROTATION_ANGLE] = ROTATION_NONE, - orientation: Optional[SymbolicConstant] = None, + orientation: SymbolicConstant | None = None, additionalRotationField: str = "", ) -> CompositePly: """This method creates a CompositePly object. @@ -317,8 +317,8 @@ def CompositeShellSection( integrationRule: Literal[C.GAUSS, C.SIMPSON] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, idealization: Literal[C.SMEAR_ALL_LAYERS, C.BENDING, C.MEMBRANE, C.NO_IDEALIZATION] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, layupName: str = "", @@ -436,8 +436,8 @@ def GeometryShellSection( poisson: float = 0, integrationRule: Literal[C.GAUSS, C.SIMPSON] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, ) -> GeometryShellSection: @@ -535,8 +535,8 @@ def HomogeneousShellSection( integrationRule: Literal[C.GAUSS, C.SIMPSON] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, idealization: Literal[C.SMEAR_ALL_LAYERS, C.BENDING, C.MEMBRANE, C.NO_IDEALIZATION] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, thicknessField: str = "", @@ -621,7 +621,7 @@ def HomogeneousShellSection( HomogeneousShellSection A HomogeneousShellSection object. """ - self.section[name] = homogeneousShellSection = HomogeneousShellSection( + homogeneousShellSection = HomogeneousShellSection( name, material, thickness, diff --git a/src/abaqus/Property/CompositePly.py b/src/abaqus/Property/CompositePly.py index 9600087eb5..8862805753 100644 --- a/src/abaqus/Property/CompositePly.py +++ b/src/abaqus/Property/CompositePly.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -86,7 +86,7 @@ class CompositePly: #: The SymbolicConstant None or a DatumCsys object specifying a coordinate system reference #: for the relative orientation of this layer. The default value is None. - orientation: Optional[SymbolicConstant] = None + orientation: SymbolicConstant #: A String specifying the name of the field specifying the additional rotation. The #: default value is an empty string. @@ -107,7 +107,7 @@ def __init__( axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle: float = 0, additionalRotationType: Literal[C.ROTATION_NONE, C.ANGLE_0, C.ROTATION_FIELD, C.ROTATION_ANGLE] = ROTATION_NONE, - orientation: Optional[SymbolicConstant] = None, + orientation: SymbolicConstant | None = None, additionalRotationField: str = "", ): """This method creates a CompositePly object. diff --git a/src/abaqus/Property/CompositePlyArray.py b/src/abaqus/Property/CompositePlyArray.py index 45b893e1a8..7a7993e7dc 100644 --- a/src/abaqus/Property/CompositePlyArray.py +++ b/src/abaqus/Property/CompositePlyArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .CompositePly import CompositePly diff --git a/src/abaqus/Property/MaterialOrientation.py b/src/abaqus/Property/MaterialOrientation.py index 601f45aa0b..05e0a15027 100644 --- a/src/abaqus/Property/MaterialOrientation.py +++ b/src/abaqus/Property/MaterialOrientation.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -57,7 +57,7 @@ class MaterialOrientation: #: material orientation for the given region. In the ODB, this member was previously #: accessible using "csys," but support has now been added for localCsys and the csys #: member will be deprecated. - localCsys: Optional[DatumCsys] = None + localCsys: DatumCsys | None = DatumCsys() #: A SymbolicConstant specifying the axis of a datum coordinate system about which an #: additional rotation is applied. For shells this axis is also the shell normal. Possible @@ -94,11 +94,11 @@ class MaterialOrientation: #: A Surface object specifying a region whose geometric normals define the normal axis for #: the discrete orientation. - normalAxisRegion: Optional[Surface] = None + normalAxisRegion: Surface | None = None #: A DatumAxis object specifying the Datum Axis or None, describing the normal axis #: direction for the discrete orientation. - normalAxisDatum: Optional[DatumAxis] = None + normalAxisDatum: DatumAxis | None = None #: A Boolean specifying the flag to reverse the direction of the defined normal axis #: direction. The default value is OFF. @@ -120,11 +120,11 @@ class MaterialOrientation: #: A Set object specifying a region whose geometric tangents define the primary axis for #: the discrete orientation. - primaryAxisRegion: Optional[Set] = None + primaryAxisRegion: Set | None = None #: A DatumAxis object specifying the Datum Axis or None, describing the primary axis #: direction for the discrete orientation. - primaryAxisDatum: Optional[DatumAxis] = None + primaryAxisDatum: DatumAxis | None = None #: A Boolean specifying the flag to reverse the direction of the defined primary axis #: direction. The default value is OFF. @@ -138,7 +138,7 @@ class MaterialOrientation: def __init__( self, region: Set, - localCsys: Optional[DatumCsys] = None, + localCsys: DatumCsys | None = None, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle: float = 0, stackDirection: Literal[C.STACK_2, C.STACK_ORIENTATION, C.STACK_3, C.STACK_1] = STACK_3, @@ -146,14 +146,14 @@ def __init__( orientationType: Literal[C.FIELD, C.GLOBAL, C.USER, C.SYSTEM, C.DISCRETE] = GLOBAL, normalAxisDirection: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_3, normalAxisDefinition: Literal[C.SURFACE, C.NORMAL_VECTOR, C.NORMAL_DATUM] = NORMAL_VECTOR, - normalAxisRegion: Optional[Surface] = None, - normalAxisDatum: Optional[DatumAxis] = None, + normalAxisRegion: Surface | None = None, + normalAxisDatum: DatumAxis | None = None, flipNormalDirection: Boolean = OFF, normalAxisVector: tuple = (), primaryAxisDirection: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, primaryAxisDefinition: Literal[C.SURFACE, C.PRIMARY_VECTOR, C.PRIMARY_DATUM] = PRIMARY_VECTOR, - primaryAxisRegion: Optional[Set] = None, - primaryAxisDatum: Optional[DatumAxis] = None, + primaryAxisRegion: Set | None = None, + primaryAxisDatum: DatumAxis | None = None, flipPrimaryDirection: Boolean = OFF, primaryAxisVector: tuple = (), ): @@ -242,7 +242,7 @@ def __init__( @abaqus_method_doc def ReferenceOrientation( self, - localCsys: Optional[DatumCsys] = None, + localCsys: DatumCsys | None = None, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle: float = 0, stackDirection: Literal[C.STACK_2, C.STACK_ORIENTATION, C.STACK_3, C.STACK_1] = STACK_3, @@ -252,14 +252,14 @@ def ReferenceOrientation( additionalRotationType: Literal[C.ROTATION_NONE, C.ROTATION_FIELD, C.ROTATION_ANGLE] = ROTATION_NONE, normalAxisDirection: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_3, normalAxisDefinition: Literal[C.SURFACE, C.DATUM, C.VECTOR] = VECTOR, - normalAxisRegion: Optional[Surface] = None, - normalAxisDatum: Optional[DatumAxis] = None, + normalAxisRegion: Surface | None = None, + normalAxisDatum: DatumAxis | None = None, flipNormalDirection: Boolean = OFF, normalAxisVector: tuple = (), primaryAxisDirection: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, primaryAxisDefinition: Literal[C.DATUM, C.VECTOR, C.EDGE] = VECTOR, - primaryAxisRegion: Optional[Set] = None, - primaryAxisDatum: Optional[DatumAxis] = None, + primaryAxisRegion: Set | None = None, + primaryAxisDatum: DatumAxis | None = None, flipPrimaryDirection: Boolean = OFF, primaryAxisVector: tuple = (), ): diff --git a/src/abaqus/Property/MaterialOrientationArray.py b/src/abaqus/Property/MaterialOrientationArray.py index 3caa112f0d..64e9fb039c 100644 --- a/src/abaqus/Property/MaterialOrientationArray.py +++ b/src/abaqus/Property/MaterialOrientationArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .MaterialOrientation import MaterialOrientation diff --git a/src/abaqus/Property/PropertyPart.py b/src/abaqus/Property/PropertyPart.py index d34c98d47e..5f67646171 100644 --- a/src/abaqus/Property/PropertyPart.py +++ b/src/abaqus/Property/PropertyPart.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -148,8 +148,8 @@ def SectionAssignment( @abaqus_method_doc def MaterialOrientation( self, - region: Optional[Set] = None, - localCsys: Optional[DatumCsys] = None, + region: Set | None = None, + localCsys: DatumCsys | None = None, axis: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, angle: float = 0, stackDirection: Literal[C.STACK_2, C.STACK_ORIENTATION, C.STACK_3, C.STACK_1] = STACK_3, @@ -157,14 +157,14 @@ def MaterialOrientation( orientationType: Literal[C.FIELD, C.GLOBAL, C.USER, C.SYSTEM, C.DISCRETE] = GLOBAL, normalAxisDirection: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_3, normalAxisDefinition: Literal[C.SURFACE, C.NORMAL_VECTOR, C.NORMAL_DATUM] = NORMAL_VECTOR, - normalAxisRegion: Optional[Surface] = None, - normalAxisDatum: Optional[DatumAxis] = None, + normalAxisRegion: Surface | None = None, + normalAxisDatum: DatumAxis | None = None, flipNormalDirection: Boolean = OFF, normalAxisVector: tuple = (), primaryAxisDirection: Literal[C.AXIS_1, C.AXIS_3, C.AXIS_2] = AXIS_1, primaryAxisDefinition: Literal[C.SURFACE, C.PRIMARY_VECTOR, C.PRIMARY_DATUM] = PRIMARY_VECTOR, - primaryAxisRegion: Optional[Set] = None, - primaryAxisDatum: Optional[DatumAxis] = None, + primaryAxisRegion: Set | None = None, + primaryAxisDatum: DatumAxis | None = None, flipPrimaryDirection: Boolean = OFF, primaryAxisVector: tuple = (), ) -> MaterialOrientation: diff --git a/src/abaqus/Property/SectionAssignment.py b/src/abaqus/Property/SectionAssignment.py index d2b66d4fd1..516fbc6a41 100644 --- a/src/abaqus/Property/SectionAssignment.py +++ b/src/abaqus/Property/SectionAssignment.py @@ -123,7 +123,7 @@ def getVertices(self): Returns ------- - Sequence[Tuple[float, ...]] + Sequence[tuple[float, ...]] A sequence of tuples of floats. Raises diff --git a/src/abaqus/Property/SectionAssignmentArray.py b/src/abaqus/Property/SectionAssignmentArray.py index f25afa3c97..c011a34b73 100644 --- a/src/abaqus/Property/SectionAssignmentArray.py +++ b/src/abaqus/Property/SectionAssignmentArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .SectionAssignment import SectionAssignment diff --git a/src/abaqus/Region/Region.py b/src/abaqus/Region/Region.py index 61ffd47869..cb700695c8 100644 --- a/src/abaqus/Region/Region.py +++ b/src/abaqus/Region/Region.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Tuple, Union, overload +from __future__ import annotations + +from typing import Sequence, Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -57,19 +59,19 @@ class Region: @abaqus_method_doc def __init__( self, - elements: Optional[Sequence[Element]] = None, - nodes: Optional[Sequence[Node]] = None, - vertices: Optional[Sequence[Vertex]] = None, - edges: Optional[Sequence[Edge]] = None, - faces: Optional[Sequence[Face]] = None, - cells: Optional[Sequence[Cell]] = None, - referencePoints: Optional[Sequence[ReferencePoint]] = (), - xVertices: Optional[Sequence[Vertex]] = None, - xEdges: Optional[Sequence[Vertex]] = None, - xFaces: Optional[Sequence[Vertex]] = None, - skinFaces: Tuple[Tuple[str, Sequence[Face]], ...] = ..., - skinEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., - stringerEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., + elements: Sequence[Element] | None = None, + nodes: Sequence[Node] | None = None, + vertices: Sequence[Vertex] | None = None, + edges: Sequence[Edge] | None = None, + faces: Sequence[Face] | None = None, + cells: Sequence[Cell] | None = None, + referencePoints: Sequence[ReferencePoint] = (), + xVertices: Sequence[Vertex] | None = None, + xEdges: Sequence[Vertex] | None = None, + xFaces: Sequence[Vertex] | None = None, + skinFaces: tuple[tuple[str, Sequence[Face]], ...] = ..., + skinEdges: tuple[tuple[str, Sequence[Edge]], ...] = ..., + stringerEdges: tuple[tuple[str, Sequence[Edge]], ...] = ..., ): """This command creates a set-like region. For example myRegion = regionToolset.Region(vertices=v[2:4] diff --git a/src/abaqus/Region/RegionArray.py b/src/abaqus/Region/RegionArray.py index c7da288c83..f241648fa9 100644 --- a/src/abaqus/Region/RegionArray.py +++ b/src/abaqus/Region/RegionArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .Region import Region diff --git a/src/abaqus/Region/RegionAssembly.py b/src/abaqus/Region/RegionAssembly.py index 770c47ce46..9b9170f803 100644 --- a/src/abaqus/Region/RegionAssembly.py +++ b/src/abaqus/Region/RegionAssembly.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Sequence, Tuple, Union, overload +from typing import Sequence, Union, overload from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -160,6 +160,7 @@ def Surface( A Surface object. """ surface = Surface( + name, side1Faces, side2Faces, side12Faces, @@ -180,7 +181,6 @@ def Surface( end1Elements, end2Elements, circumElements, - name, ) self.surfaces[name] = surface self.allSurfaces[name] = surface @@ -191,20 +191,20 @@ def Surface( def Set( self, name: str, - nodes: Optional[Sequence[MeshNode]] = None, - elements: Optional[Sequence[MeshElement]] = None, - region: Optional[Region] = None, - vertices: Optional[Sequence[ConstrainedSketchVertex]] = None, - edges: Optional[Sequence[Edge]] = None, - faces: Optional[Sequence[Face]] = None, - cells: Optional[Sequence[Cell]] = None, - xVertices: Optional[Sequence[ConstrainedSketchVertex]] = None, - xEdges: Optional[Sequence[Edge]] = None, - xFaces: Optional[Sequence[Face]] = None, + nodes: Sequence[MeshNode] | None = None, + elements: Sequence[MeshElement] | None = None, + region: Region | None = None, + vertices: Sequence[ConstrainedSketchVertex] | None = None, + edges: Sequence[Edge] | None = None, + faces: Sequence[Face] | None = None, + cells: Sequence[Cell] | None = None, + xVertices: Sequence[ConstrainedSketchVertex] | None = None, + xEdges: Sequence[Edge] | None = None, + xFaces: Sequence[Face] | None = None, referencePoints: Sequence[ReferencePoint] = (), - skinFaces: Tuple[Tuple[str, Sequence[Face]], ...] = ..., - skinEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., - stringerEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., + skinFaces: tuple[tuple[str, Sequence[Face]], ...] = ..., + skinEdges: tuple[tuple[str, Sequence[Edge]], ...] = ..., + stringerEdges: tuple[tuple[str, Sequence[Edge]], ...] = ..., ) -> Set: """This method creates a set from a sequence of objects in a model database. diff --git a/src/abaqus/Region/RegionPart.py b/src/abaqus/Region/RegionPart.py index 6acb475e8b..20399d58c0 100644 --- a/src/abaqus/Region/RegionPart.py +++ b/src/abaqus/Region/RegionPart.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Sequence, Tuple, Union, overload +from typing import Sequence, Union, overload from typing_extensions import Literal @@ -15,19 +15,14 @@ from ..Mesh.MeshElement import MeshElement from ..Mesh.MeshFace import MeshFace from ..Mesh.MeshNode import MeshNode -from ..UtilityAndView.abaqusConstants import ( - DIFFERENCE, - INTERSECTION, - OVERWRITE, - UNION, - Boolean, -) +from ..UtilityAndView.abaqusConstants import OVERWRITE, UNION, Boolean +from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .Region import Region from .RegionPartBase import RegionPartBase -from .Set import Set -from .Skin import Skin +from .Set import Set as SetType +from .Skin import Skin as SkinType from .Stringer import Stringer -from .Surface import Surface +from .Surface import Surface as SurfaceType @abaqus_class_doc @@ -66,7 +61,7 @@ def Surface( end2Elements: Union[Face, Sequence[Face], None] = None, circumElements: Union[Face, Sequence[Face], None] = None, **kwargs, - ) -> Surface: + ) -> SurfaceType: """This method creates a surface from a sequence of objects in a model database. The surface will apply to the sides specified by the arguments.For example:: @@ -171,7 +166,8 @@ def Surface( surf: Surface A Surface object """ - surface = Surface( + surface = SurfaceType( + name, side1Faces, side2Faces, side12Faces, @@ -192,7 +188,6 @@ def Surface( end1Elements, end2Elements, circumElements, - name, ) self.surfaces[name] = surface self.allSurfaces[name] = surface @@ -203,21 +198,21 @@ def Surface( def Set( self, name: str, - nodes: Optional[Sequence[MeshNode]] = None, - elements: Optional[Sequence[MeshElement]] = None, - region: Optional[Region] = None, - vertices: Optional[Sequence[Vertex]] = None, - edges: Optional[Sequence[Edge]] = None, - faces: Optional[Union[Face, Sequence[Face]]] = None, - cells: Optional[Union[Cell, Sequence[Cell]]] = None, - xVertices: Optional[Sequence[Vertex]] = None, - xEdges: Optional[Sequence[Edge]] = None, - xFaces: Optional[Sequence[Face]] = None, + nodes: Sequence[MeshNode] | None = None, + elements: Sequence[MeshElement] | None = None, + region: Region | None = None, + vertices: Sequence[Vertex] | None = None, + edges: Sequence[Edge] | None = None, + faces: Union[Face, Sequence[Face]] | None = None, + cells: Union[Cell, Sequence[Cell]] | None = None, + xVertices: Sequence[Vertex] | None = None, + xEdges: Sequence[Edge] | None = None, + xFaces: Sequence[Face] | None = None, referencePoints: Sequence[ReferencePoint] = (), - skinFaces: Tuple[Tuple[str, Sequence[Face]], ...] = ..., - skinEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., - stringerEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., - ) -> Set: + skinFaces: tuple[tuple[str, Sequence[Face]], ...] = ..., + skinEdges: tuple[tuple[str, Sequence[Edge]], ...] = ..., + stringerEdges: tuple[tuple[str, Sequence[Edge]], ...] = ..., + ) -> SetType: """This method creates a set from a sequence of objects in a model database. .. note:: @@ -275,7 +270,7 @@ def Set( @overload @abaqus_method_doc - def Set(self, name: str, objectToCopy: Set) -> Set: + def Set(self, name: str, objectToCopy: SetType) -> SetType: """This method copies a set from an existing set. .. note:: @@ -298,92 +293,9 @@ def Set(self, name: str, objectToCopy: Set) -> Set: """ ... - @overload @abaqus_method_doc - def Set( - self, - name: str, - nodes: Optional[Sequence[MeshNode]] = None, - elements: Optional[Sequence[MeshElement]] = None, - region: Optional[Region] = None, - vertices: Optional[Sequence[Vertex]] = None, - edges: Optional[Sequence[Edge]] = None, - faces: Optional[Sequence[Face]] = None, - cells: Optional[Sequence[Cell]] = None, - xVertices: Optional[Sequence[Vertex]] = None, - xEdges: Optional[Sequence[Edge]] = None, - xFaces: Optional[Sequence[Face]] = None, - referencePoints: Sequence[ReferencePoint] = (), - skinFaces: Tuple[Tuple[str, Sequence[Face]], ...] = ..., - skinEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., - stringerEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., - ) -> Set: - """This method creates a set from a sequence of objects in a model database. - - At least one sequence argument must be provided - elements, nodes, vertices, edges, - faces, cells, or referencePoints. The arguments xVertices, xEdges, and xFaces are - used to exclude lower-dimension entities and to provide finer control on the - content of the set. For example, the following statement defines a region enclosing - a square face but without two of its edges:: - - set = mdb.models['Model-1'].rootAssembly.Set(name='mySet', faces=f[3:4], xEdges=e[1:3]) - - .. note:: - This function can be accessed by:: - - mdb.models[name].parts[name].Set - mdb.models[name].rootAssembly.Set - - Parameters - ---------- - name - A String specifying the repository key. - nodes - A sequence of MeshNode objects. The default value is None. - elements - A sequence of MeshElement objects. The default value is None. - region - A Region object specifying other objects to be included in the set. The default value is - None. - vertices - A sequence of ConstrainedSketchVertex objects. The default value is None. - edges - A sequence of Edge objects. The default value is None. - faces - A sequence of Face objects. The default value is None. - cells - A sequence of Cell objects. The default value is None. - xVertices - A sequence of ConstrainedSketchVertex objects that excludes specific vertices from the set. The default - value is None. - xEdges - A sequence of Edge objects that excludes specific edges from the set. The default value - is None. - xFaces - A sequence of Face objects that excludes specific faces from the set. The default value - is None. - referencePoints - A sequence of ReferencePoint objects. The default value is an empty sequence. - skinFaces - A tuple of tuples specifying a skin name and the sequence of faces associated with this - skin. Valid only for geometric regions on 3D and 2D parts. - skinEdges - A tuple of tuples specifying a skin name and the sequence of edges associated with this - skin. Valid only for geometric regions on Axisymmetric parts. - stringerEdges - A tuple of tuples specifying a stringer name and the sequence of edges associated with - this stringer. Valid only for geometric regions on 3D and 2D parts. - - Returns - ------- - set: Set - A Set object - """ - ... - - @abaqus_method_doc - def Set(self, name, *args, **kwargs) -> Set: - self.sets[name] = aSet = Set(name, *args, **kwargs) + def Set(self, name, *args, **kwargs) -> SetType: + self.sets[name] = aSet = SetType(name, *args, **kwargs) return aSet @abaqus_method_doc @@ -394,7 +306,7 @@ def Skin( edges: Sequence[Edge] = (), elementFaces: Sequence[MeshFace] = (), elementEdges: Sequence[MeshEdge] = (), - ) -> Skin: + ) -> SkinType: """This method creates a skin from a sequence of objects in a model database. At least one of the optional arguments needs to be specified. @@ -425,7 +337,7 @@ def Skin( skin: Skin A Skin object """ - self.skins[name] = skin = Skin(name, faces, edges, elementFaces, elementEdges) + self.skins[name] = skin = SkinType(name, faces, edges, elementFaces, elementEdges) return skin @abaqus_method_doc @@ -436,7 +348,7 @@ def EditSkin( edges: Sequence[Edge] = (), elementFaces: Sequence[MeshFace] = (), elementEdges: Sequence[MeshEdge] = (), - ) -> Skin: + ) -> SkinType: """This method modifies underlying entities of the selected skin. At least one of the optional arguments needs to be specified. @@ -467,7 +379,7 @@ def EditSkin( skin: Skin A Skin object """ - self.skins[name] = skin = Skin(name, faces, edges, elementFaces, elementEdges) + self.skins[name] = skin = SkinType(name, faces, edges, elementFaces, elementEdges) return skin @abaqus_method_doc @@ -508,8 +420,8 @@ def Stringer( # But it accessed only by ``Part`` and ``rootAssembly`` objetcs. def SetByBoolean( - self, name: str, sets: Sequence[Set], operation: Literal[UNION, INTERSECTION, DIFFERENCE] = UNION - ) -> Set: + self, name: str, sets: Sequence[SetType], operation: Literal[C.UNION, C.INTERSECTION, C.DIFFERENCE] = UNION + ) -> SetType: """This method creates a set by performing a boolean operation on two or more input sets. .. note:: @@ -535,10 +447,10 @@ def SetByBoolean( Set A Set object. """ - ... + return SetType(name) @abaqus_method_doc - def SetFromColor(self, name: str, color: tuple) -> Set: + def SetFromColor(self, name: str, color: tuple) -> SetType: """This method creates a set containing faces of the part marked with a specified color attribute. Third-party applications can assign color attributes to faces, and the color attribute can be imported into Abaqus from an ACIS file. You can use this method to create sets only on parts; however, you can @@ -563,10 +475,10 @@ def SetFromColor(self, name: str, color: tuple) -> Set: Set A Set object. """ - ... + return SetType(name) @abaqus_method_doc - def SetFromElementLabels(self, name: str, elementLabels: Sequence[int]) -> Set: + def SetFromElementLabels(self, name: str, elementLabels: Sequence[int]) -> SetType: """This method creates a set from a sequence of element labels in a model database. .. note:: @@ -594,10 +506,10 @@ def SetFromElementLabels(self, name: str, elementLabels: Sequence[int]) -> Set: Set A Set object. """ - ... + return SetType(name) @abaqus_method_doc - def SetFromNodeLabels(self, name: str, nodeLabels: Sequence[int], unsorted: Boolean = False) -> Set: + def SetFromNodeLabels(self, name: str, nodeLabels: Sequence[int], unsorted: Boolean = False) -> SetType: """This method creates a set from a sequence of node labels in a model database. .. note:: @@ -631,10 +543,10 @@ def SetFromNodeLabels(self, name: str, nodeLabels: Sequence[int], unsorted: Bool Set A Set object. """ - ... + return SetType(name) @abaqus_method_doc - def MapSetsFromOdb(self, odbPath: str, odbSets: str, partSets: str = "", method: str = OVERWRITE) -> Set: + def MapSetsFromOdb(self, odbPath: str, odbSets: str, partSets: str = "", method: str = OVERWRITE) -> SetType: """This method creates sets based on mapping sets from element centroid locations in an Odb. .. note:: @@ -658,4 +570,4 @@ def MapSetsFromOdb(self, odbPath: str, odbSets: str, partSets: str = "", method: Set A Set object or a tuple of Set objects. """ - ... + return SetType("") diff --git a/src/abaqus/Region/Set.py b/src/abaqus/Region/Set.py index bff47715f3..f685b5b25e 100644 --- a/src/abaqus/Region/Set.py +++ b/src/abaqus/Region/Set.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Sequence, Tuple, overload +from typing import Sequence, overload from typing_extensions import Literal @@ -20,13 +20,8 @@ from ..Mesh.MeshElementArray import MeshElementArray from ..Mesh.MeshNode import MeshNode from ..Mesh.MeshNodeArray import MeshNodeArray -from ..UtilityAndView.abaqusConstants import ( - DIFFERENCE, - INTERSECTION, - OVERWRITE, - UNION, - Boolean, -) +from ..UtilityAndView.abaqusConstants import OVERWRITE, UNION, Boolean +from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .Region import Region @@ -98,20 +93,20 @@ class Set(Region): def __init__( self, name: str, - nodes: Optional[Sequence[MeshNode]] = None, - elements: Optional[Sequence[MeshElement]] = None, - region: Optional[Region] = None, - vertices: Optional[Sequence[Vertex]] = None, - edges: Optional[Sequence[Edge]] = None, - faces: Optional[Sequence[Face]] = None, - cells: Optional[Sequence[Cell]] = None, - xVertices: Optional[Sequence[Vertex]] = None, - xEdges: Optional[Sequence[Edge]] = None, - xFaces: Optional[Sequence[Face]] = None, + nodes: Sequence[MeshNode] | None = None, + elements: Sequence[MeshElement] | None = None, + region: Region | None = None, + vertices: Sequence[Vertex] | None = None, + edges: Sequence[Edge] | None = None, + faces: Sequence[Face] | None = None, + cells: Sequence[Cell] | None = None, + xVertices: Sequence[Vertex] | None = None, + xEdges: Sequence[Edge] | None = None, + xFaces: Sequence[Face] | None = None, referencePoints: Sequence[ReferencePoint] = (), - skinFaces: Tuple[Tuple[str, Sequence[Face]], ...] = ..., - skinEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., - stringerEdges: Tuple[Tuple[str, Sequence[Edge]], ...] = ..., + skinFaces: tuple[tuple[str, Sequence[Face]], ...] = ..., + skinEdges: tuple[tuple[str, Sequence[Edge]], ...] = ..., + stringerEdges: tuple[tuple[str, Sequence[Edge]], ...] = ..., ) -> None: """This method creates a set from a sequence of objects in a model database. @@ -206,7 +201,7 @@ def __init__(self, *args, **kwargs) -> None: ... def SetByBoolean( - self, name: str, sets: Sequence[Set], operation: Literal[UNION, INTERSECTION, DIFFERENCE] = UNION + self, name: str, sets: Sequence[Set], operation: Literal[C.UNION, C.INTERSECTION, C.DIFFERENCE] = UNION ) -> Set: """This method creates a set by performing a boolean operation on two or more input sets. @@ -233,7 +228,7 @@ def SetByBoolean( Set A Set object. """ - ... + return Set(name) @abaqus_method_doc def SetFromColor(self, name: str, color: tuple) -> Set: @@ -261,7 +256,7 @@ def SetFromColor(self, name: str, color: tuple) -> Set: Set A Set object. """ - ... + return Set(name) @abaqus_method_doc def SetFromElementLabels(self, name: str, elementLabels: Sequence[int]) -> Set: @@ -292,7 +287,7 @@ def SetFromElementLabels(self, name: str, elementLabels: Sequence[int]) -> Set: Set A Set object. """ - ... + return Set(name) @abaqus_method_doc def SetFromNodeLabels(self, name: str, nodeLabels: Sequence[int], unsorted: Boolean = False) -> Set: @@ -329,7 +324,7 @@ def SetFromNodeLabels(self, name: str, nodeLabels: Sequence[int], unsorted: Bool Set A Set object. """ - ... + return Set(name) @abaqus_method_doc def MapSetsFromOdb(self, odbPath: str, odbSets: str, partSets: str = "", method: str = OVERWRITE) -> Set: @@ -356,4 +351,4 @@ def MapSetsFromOdb(self, odbPath: str, odbSets: str, partSets: str = "", method: Set A Set object or a tuple of Set objects. """ - ... + return Set("") diff --git a/src/abaqus/Region/Skin.py b/src/abaqus/Region/Skin.py index 09cece09b4..1342f23b74 100644 --- a/src/abaqus/Region/Skin.py +++ b/src/abaqus/Region/Skin.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Region/Stringer.py b/src/abaqus/Region/Stringer.py index 30c43dc185..eab45749d9 100644 --- a/src/abaqus/Region/Stringer.py +++ b/src/abaqus/Region/Stringer.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Region/Surface.py b/src/abaqus/Region/Surface.py index f495f9617e..f3821c7678 100644 --- a/src/abaqus/Region/Surface.py +++ b/src/abaqus/Region/Surface.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Sequence, Union, overload +from typing import Sequence, Union, overload from typing_extensions import Literal @@ -51,11 +51,11 @@ class Surface(Region): nodes: MeshNodeArray = MeshNodeArray([]) #: A tuple of SymbolicConstants specifying the sides; for example, (SIDE1, SIDE2). - sides: Optional[Sequence[SymbolicConstant]] = None + sides: Sequence[SymbolicConstant] | None = None #: A tuple of Ints specifying the instances. This member is not applicable for a Surface #: object on an output database. - instances: Optional[int] = None + instances: int | None = None @overload @abaqus_method_doc @@ -249,7 +249,7 @@ def SurfaceByBoolean( Surface A Surface object. """ - ... + return Surface(name) @abaqus_method_doc def SurfaceFromElsets(self, name: str, elementSetSeq: tuple) -> Surface: @@ -278,4 +278,4 @@ def SurfaceFromElsets(self, name: str, elementSetSeq: tuple) -> Surface: Surface A Surface object. """ - ... + return Surface(name) diff --git a/src/abaqus/Section/BeamSection.py b/src/abaqus/Section/BeamSection.py index 572eaf4c00..7f61546d00 100644 --- a/src/abaqus/Section/BeamSection.py +++ b/src/abaqus/Section/BeamSection.py @@ -1,4 +1,4 @@ -from typing import Optional, Tuple +from __future__ import annotations from typing_extensions import Literal @@ -78,11 +78,11 @@ class BeamSection(Section): dependencies: int = 0 #: None or a Float specifying the density of the section. The default value is None. - density: Optional[float] = None + density: float | None = None #: None or a Float specifying the reference temperature of the section. The default value #: is None. - referenceTemperature: Optional[float] = None + referenceTemperature: float | None = None #: A SymbolicConstant specifying the temperature variation for the section. Possible values #: are LINEAR and INTERPOLATED. The default value is LINEAR. @@ -112,12 +112,12 @@ class BeamSection(Section): #: None or a Float specifying the mass density of the fluid. This argument applies only #: when **useFluidInertia** = True and must be specified in that case. The default value is #: None. - fluidMassDensity: Optional[float] = None + fluidMassDensity: float | None = None #: None or a Float specifying the radius of the cylindrical cross-section. This argument #: applies only when **useFluidInertia** = True and must be specified in that case. The #: default value is None. - crossSectionRadius: Optional[float] = None + crossSectionRadius: float | None = None #: A Float specifying the added mass coefficient, CACA, for lateral motions of the beam. #: This argument applies only when*useFluidInertia* = True. The default value is 1.0. @@ -157,11 +157,11 @@ class BeamSection(Section): #: A pair of Floats specifying the **X - Y** coordinates of the centroid. The default value is #: (0.0, 0.0). - centroid: Tuple[float, float] = (0.0, 0.0) + centroid: tuple[float, float] = (0.0, 0.0) #: A pair of Floats specifying the **X - Y** coordinates of the shear center. The default value #: is (0.0, 0.0). - shearCenter: Tuple[float, float] = (0.0, 0.0) + shearCenter: tuple[float, float] = (0.0, 0.0) #: A String specifying the name of the end profile. The type of the end profile must be #: same as that of the start profile. This argument is valid only when **beamShape** = TAPERED. @@ -179,16 +179,16 @@ def __init__( thermalExpansion: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, - density: Optional[float] = None, - referenceTemperature: Optional[float] = None, + density: float | None = None, + referenceTemperature: float | None = None, temperatureVar: Literal[C.LINEAR, C.INTERPOLATED] = LINEAR, alphaDamping: float = 0, betaDamping: float = 0, compositeDamping: float = 0, useFluidInertia: Boolean = OFF, submerged: Literal[C.FULLY, C.HALF] = FULLY, - fluidMassDensity: Optional[float] = None, - crossSectionRadius: Optional[float] = None, + fluidMassDensity: float | None = None, + crossSectionRadius: float | None = None, lateralMassCoef: float = 1, axialMassCoef: float = 0, massOffsetX: float = 0, @@ -197,8 +197,8 @@ def __init__( material: str = "", table: tuple = (), outputPts: tuple = (), - centroid: Tuple[float, float] = (0.0, 0.0), - shearCenter: Tuple[float, float] = (0.0, 0.0), + centroid: tuple[float, float] = (0.0, 0.0), + shearCenter: tuple[float, float] = (0.0, 0.0), profileEnd: str = "", ) -> None: """This method creates a BeamSection object. @@ -313,16 +313,16 @@ def setValues( thermalExpansion: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, - density: Optional[float] = None, - referenceTemperature: Optional[float] = None, + density: float | None = None, + referenceTemperature: float | None = None, temperatureVar: Literal[C.LINEAR, C.INTERPOLATED] = LINEAR, alphaDamping: float = 0, betaDamping: float = 0, compositeDamping: float = 0, useFluidInertia: Boolean = OFF, submerged: Literal[C.FULLY, C.HALF] = FULLY, - fluidMassDensity: Optional[float] = None, - crossSectionRadius: Optional[float] = None, + fluidMassDensity: float | None = None, + crossSectionRadius: float | None = None, lateralMassCoef: float = 1, axialMassCoef: float = 0, massOffsetX: float = 0, @@ -331,8 +331,8 @@ def setValues( material: str = "", table: tuple = (), outputPts: tuple = (), - centroid: Tuple[float, float] = (0.0, 0.0), - shearCenter: Tuple[float, float] = (0.0, 0.0), + centroid: tuple[float, float] = (0.0, 0.0), + shearCenter: tuple[float, float] = (0.0, 0.0), profileEnd: str = "", ) -> None: """This method modifies the BeamSection object. diff --git a/src/abaqus/Section/CohesiveSection.py b/src/abaqus/Section/CohesiveSection.py index 5d280702a3..c1bc2f3b71 100644 --- a/src/abaqus/Section/CohesiveSection.py +++ b/src/abaqus/Section/CohesiveSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -51,7 +51,7 @@ class CohesiveSection(Section): #: None or a Float specifying the out-of-plane thickness for the section. The default value #: is None. - outOfPlaneThickness: Optional[float] = None + outOfPlaneThickness: float | None = None @abaqus_method_doc def __init__( @@ -61,7 +61,7 @@ def __init__( material: str, initialThicknessType: Literal[C.SOLVER_DEFAULT, C.GEOMETRY, C.SPECIFY] = SOLVER_DEFAULT, initialThickness: float = 1, - outOfPlaneThickness: Optional[float] = None, + outOfPlaneThickness: float | None = None, ) -> None: """This method creates a CohesiveSection object. @@ -110,7 +110,7 @@ def setValues( self, initialThicknessType: Literal[C.SOLVER_DEFAULT, C.GEOMETRY, C.SPECIFY] = SOLVER_DEFAULT, initialThickness: float = 1, - outOfPlaneThickness: Optional[float] = None, + outOfPlaneThickness: float | None = None, ) -> None: """This method modifies the CohesiveSection object. diff --git a/src/abaqus/Section/CompositeShellSection.py b/src/abaqus/Section/CompositeShellSection.py index 7ab2005534..577b99e981 100644 --- a/src/abaqus/Section/CompositeShellSection.py +++ b/src/abaqus/Section/CompositeShellSection.py @@ -1,11 +1,10 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..UtilityAndView.abaqusConstants import ( - BENDING, DEFAULT, GRADIENT, NO_IDEALIZATION, @@ -42,10 +41,10 @@ class CompositeShellSection(GeometryShellSection): """ #: A RebarLayers object specifying reinforcement properties. - rebarLayers: Optional[RebarLayers] = None + rebarLayers: RebarLayers #: A TransverseShearShell object specifying the transverse shear stiffness properties. - transverseShear: Optional[TransverseShearShell] = None + transverseShear: TransverseShearShell #: A String specifying the repository key. name: str @@ -97,16 +96,16 @@ class CompositeShellSection(GeometryShellSection): #: calculations. This member is only applicable when **preIntegrate** is set to ON. Possible #: values are NO_IDEALIZATION, SMEAR_ALL_LAYERS, MEMBRANE, and BENDING. The default value #: is NO_IDEALIZATION. - idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, BENDING] = NO_IDEALIZATION + idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, C.BENDING] = NO_IDEALIZATION #: None or an Int specifying the number of temperature points to be input. This argument is #: valid only when **temperature** = POINTWISE. The default value is None. - nTemp: Optional[int] = None + nTemp: int | None = None #: None or a Float specifying the effective thickness modulus. This argument is relevant #: only for continuum shells and must be used in conjunction with the argument **poisson**. #: The default value is None. - thicknessModulus: Optional[float] = None + thicknessModulus: float | None = None #: A Boolean specifying whether or not to use the value of **density**. The default value is #: OFF. @@ -150,9 +149,9 @@ def __init__( poisson: float = 0, integrationRule: Literal[C.SIMPSON, C.GAUSS] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, - idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, BENDING] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, C.BENDING] = NO_IDEALIZATION, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, layupName: str = "", @@ -256,9 +255,9 @@ def setValues( poisson: float = 0, integrationRule: Literal[C.SIMPSON, C.GAUSS] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, - idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, BENDING] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, C.BENDING] = NO_IDEALIZATION, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, layupName: str = "", diff --git a/src/abaqus/Section/ConnectorSection.py b/src/abaqus/Section/ConnectorSection.py index 1e10a37d08..9d3f198f73 100644 --- a/src/abaqus/Section/ConnectorSection.py +++ b/src/abaqus/Section/ConnectorSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -102,37 +102,37 @@ class ConnectorSection(Section): #: None or a Float specifying the reference length associated with constitutive response #: for the first component of relative motion. The default value is None. - u1ReferenceLength: Optional[float] = None + u1ReferenceLength: float | None = None #: None or a Float specifying the reference length associated with constitutive response #: for the second component of relative motion. The default value is None. - u2ReferenceLength: Optional[float] = None + u2ReferenceLength: float | None = None #: None or a Float specifying the reference length associated with constitutive response #: for the third component of relative motion. The default value is None. - u3ReferenceLength: Optional[float] = None + u3ReferenceLength: float | None = None #: None or a Float specifying the reference angle in degrees associated with constitutive #: response for the fourth component of relative motion. The default value is None. - ur1ReferenceAngle: Optional[float] = None + ur1ReferenceAngle: float | None = None #: None or a Float specifying the reference angle in degrees associated with constitutive #: response for the fifth component of relative motion. The default value is None. - ur2ReferenceAngle: Optional[float] = None + ur2ReferenceAngle: float | None = None #: None or a Float specifying the reference angle in degrees associated with constitutive #: response for the sixth component of relative motion. The default value is None. - ur3ReferenceAngle: Optional[float] = None + ur3ReferenceAngle: float | None = None #: None or a Float specifying the mass per unit reference length of belt material. This #: argument is applicable only when **assembledType** = SLIPRING, and must be specified in that #: case. The default value is None. - massPerLength: Optional[float] = None + massPerLength: float | None = None #: None or a Float specifying the contact angle made by the belt wrapping around node b. #: This argument is applicable only to an Abaqus/Explicit analysis, and only when #: **assembledType** = SLIPRING. The default value is None. - contactAngle: Optional[float] = None + contactAngle: float | None = None #: A Float specifying the scaling factor for material flow at node b. This argument is #: applicable only when **assembledType** = RETRACTOR or **rotationalType** = FLOW_CONVERTER. The @@ -162,7 +162,7 @@ class ConnectorSection(Section): extrapolation: Literal[C.CONSTANT, C.LINEAR] = CONSTANT #: A ConnectorBehaviorOptionArray object. - behaviorOptions: Optional[ConnectorBehaviorOptionArray] = None + behaviorOptions: ConnectorBehaviorOptionArray @abaqus_method_doc def __init__( @@ -209,20 +209,20 @@ def __init__( C.SLOT, ] = NONE, integration: Literal[C.UNSPECIFIED, C.IMPLICIT, C.EXPLICIT] = UNSPECIFIED, - u1ReferenceLength: Optional[float] = None, - u2ReferenceLength: Optional[float] = None, - u3ReferenceLength: Optional[float] = None, - ur1ReferenceAngle: Optional[float] = None, - ur2ReferenceAngle: Optional[float] = None, - ur3ReferenceAngle: Optional[float] = None, - massPerLength: Optional[float] = None, - contactAngle: Optional[float] = None, + u1ReferenceLength: float | None = None, + u2ReferenceLength: float | None = None, + u3ReferenceLength: float | None = None, + ur1ReferenceAngle: float | None = None, + ur2ReferenceAngle: float | None = None, + ur3ReferenceAngle: float | None = None, + massPerLength: float | None = None, + contactAngle: float | None = None, materialFlowFactor: float = 1, regularize: Boolean = ON, defaultTolerance: Boolean = ON, regularization: float = 0, extrapolation: Literal[C.CONSTANT, C.LINEAR] = CONSTANT, - behaviorOptions: ConnectorBehaviorOptionArray = ..., + behaviorOptions: ConnectorBehaviorOptionArray = list(), ) -> None: """This method creates a ConnectorSection object. @@ -368,14 +368,14 @@ def setValues( C.SLOT, ] = NONE, integration: Literal[C.UNSPECIFIED, C.IMPLICIT, C.EXPLICIT] = UNSPECIFIED, - u1ReferenceLength: Optional[float] = None, - u2ReferenceLength: Optional[float] = None, - u3ReferenceLength: Optional[float] = None, - ur1ReferenceAngle: Optional[float] = None, - ur2ReferenceAngle: Optional[float] = None, - ur3ReferenceAngle: Optional[float] = None, - massPerLength: Optional[float] = None, - contactAngle: Optional[float] = None, + u1ReferenceLength: float | None = None, + u2ReferenceLength: float | None = None, + u3ReferenceLength: float | None = None, + ur1ReferenceAngle: float | None = None, + ur2ReferenceAngle: float | None = None, + ur3ReferenceAngle: float | None = None, + massPerLength: float | None = None, + contactAngle: float | None = None, materialFlowFactor: float = 1, regularize: Boolean = ON, defaultTolerance: Boolean = ON, diff --git a/src/abaqus/Section/GasketSection.py b/src/abaqus/Section/GasketSection.py index fd398ec446..2200c22b09 100644 --- a/src/abaqus/Section/GasketSection.py +++ b/src/abaqus/Section/GasketSection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/Section/GeneralStiffnessSection.py b/src/abaqus/Section/GeneralStiffnessSection.py index fc12562217..0fac182227 100644 --- a/src/abaqus/Section/GeneralStiffnessSection.py +++ b/src/abaqus/Section/GeneralStiffnessSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -30,10 +30,10 @@ class GeneralStiffnessSection(ShellSection): """ #: A RebarLayers object specifying reinforcement properties. - rebarLayers: Optional[RebarLayers] = None + rebarLayers: RebarLayers #: A TransverseShearShell object specifying the transverse shear stiffness properties. - transverseShear: Optional[TransverseShearShell] = None + transverseShear: TransverseShearShell #: A String specifying the repository key. name: str @@ -44,7 +44,7 @@ class GeneralStiffnessSection(ShellSection): #: None or a Float specifying the reference temperature for thermal expansion. The default #: value is None. - referenceTemperature: Optional[float] = None + referenceTemperature: float | None = None #: A Boolean specifying whether or not the section stiffness varies with thermal stresses. #: The default value is OFF. @@ -90,7 +90,7 @@ def __init__( self, name: str, stiffnessMatrix: tuple, - referenceTemperature: Optional[float] = None, + referenceTemperature: float | None = None, applyThermalStress: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, @@ -160,7 +160,7 @@ def __init__( @abaqus_method_doc def setValues( self, - referenceTemperature: Optional[float] = None, + referenceTemperature: float | None = None, applyThermalStress: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, diff --git a/src/abaqus/Section/GeometryShellSection.py b/src/abaqus/Section/GeometryShellSection.py index a1268db653..082912eb19 100644 --- a/src/abaqus/Section/GeometryShellSection.py +++ b/src/abaqus/Section/GeometryShellSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -79,12 +79,12 @@ class GeometryShellSection(ShellSection): #: None or an Int specifying the number of temperature points to be input. This argument is #: valid only when **temperature** = POINTWISE. The default value is None. - nTemp: Optional[int] = None + nTemp: int | None = None #: None or a Float specifying the effective thickness modulus. This argument is relevant #: only for continuum shells and must be used in conjunction with the argument **poisson**. #: The default value is None. - thicknessModulus: Optional[float] = None + thicknessModulus: float | None = None #: A Boolean specifying whether or not to use the value of **density**. The default value is #: OFF. @@ -110,7 +110,7 @@ class GeometryShellSection(ShellSection): nodalThicknessField: str = "" #: A TransverseShearShell object specifying the transverse shear stiffness properties. - transverseShear: Optional[TransverseShearShell] = None + transverseShear: TransverseShearShell @abaqus_method_doc def __init__( @@ -125,8 +125,8 @@ def __init__( poisson: float = 0, integrationRule: Literal[C.GAUSS, C.SIMPSON] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, ): diff --git a/src/abaqus/Section/HomogeneousShellSection.py b/src/abaqus/Section/HomogeneousShellSection.py index 6d4ef2ba50..81d3b505ec 100644 --- a/src/abaqus/Section/HomogeneousShellSection.py +++ b/src/abaqus/Section/HomogeneousShellSection.py @@ -1,11 +1,10 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal from abqpy.decorators import abaqus_class_doc, abaqus_method_doc from ..UtilityAndView.abaqusConstants import ( - BENDING, DEFAULT, GRADIENT, NO_IDEALIZATION, @@ -41,10 +40,10 @@ class HomogeneousShellSection(GeometryShellSection): """ #: A RebarLayers object specifying reinforcement properties. - rebarLayers: Optional[RebarLayers] = None + rebarLayers: RebarLayers #: A TransverseShearShell object specifying the transverse shear stiffness properties. - transverseShear: Optional[TransverseShearShell] = None + transverseShear: TransverseShearShell #: A String specifying the repository key. name: str @@ -106,12 +105,12 @@ class HomogeneousShellSection(GeometryShellSection): #: None or an Int specifying the number of temperature points to be input. This argument is #: valid only when **temperature** = POINTWISE. The default value is None. - nTemp: Optional[int] = None + nTemp: int | None = None #: None or a Float specifying the effective thickness modulus. This argument is relevant #: only for continuum shells and must be used in conjunction with the argument **poisson**. #: The default value is None. - thicknessModulus: Optional[float] = None + thicknessModulus: float | None = None #: A Boolean specifying whether or not to use the value of **density**. The default value is #: OFF. @@ -152,9 +151,9 @@ def __init__( poisson: float = 0, integrationRule: Literal[C.SIMPSON, C.GAUSS] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, - idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, BENDING] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, C.BENDING] = NO_IDEALIZATION, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, thicknessField: str = "", @@ -260,9 +259,9 @@ def setValues( poisson: float = 0, integrationRule: Literal[C.SIMPSON, C.GAUSS] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, - idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, BENDING] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, C.BENDING] = NO_IDEALIZATION, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, thicknessField: str = "", diff --git a/src/abaqus/Section/HomogeneousSolidSection.py b/src/abaqus/Section/HomogeneousSolidSection.py index fa6fc2fa9c..3090fe5443 100644 --- a/src/abaqus/Section/HomogeneousSolidSection.py +++ b/src/abaqus/Section/HomogeneousSolidSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -34,10 +34,10 @@ class HomogeneousSolidSection(SolidSection): #: #: .. versionchanged:: 2018 #: The default value is now 1.0 instead of None. - thickness: Optional[float] = None + thickness: float | None = None @abaqus_method_doc - def __init__(self, name: str, material: str, thickness: Optional[float] = None) -> None: + def __init__(self, name: str, material: str, thickness: float | None = None) -> None: """This method creates a HomogeneousSolidSection object. .. note:: diff --git a/src/abaqus/Section/LayerPropertiesArray.py b/src/abaqus/Section/LayerPropertiesArray.py index 856b63ebba..7058e99755 100644 --- a/src/abaqus/Section/LayerPropertiesArray.py +++ b/src/abaqus/Section/LayerPropertiesArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .LayerProperties import LayerProperties diff --git a/src/abaqus/Section/MembraneSection.py b/src/abaqus/Section/MembraneSection.py index 0ef917d703..3275be17dd 100644 --- a/src/abaqus/Section/MembraneSection.py +++ b/src/abaqus/Section/MembraneSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -29,7 +29,7 @@ class MembraneSection(Section): """ #: A RebarLayers object specifying reinforcement properties. - rebarLayers: Optional[RebarLayers] = None + rebarLayers: RebarLayers | None = None #: A String specifying the repository key. name: str @@ -71,7 +71,7 @@ def __init__( material: str, thickness: float = 1, thicknessType: Literal[C.DISCRETE_FIELD, C.UNIFORM, C.ANALYTICAL_FIELD] = UNIFORM, - poissonDefinition: Literal[C.DEFAULT] = DEFAULT, + poissonDefinition: Literal[C.DEFAULT, C.VALUE] = DEFAULT, poisson: float = 0, thicknessField: str = "", ): diff --git a/src/abaqus/Section/Section.py b/src/abaqus/Section/Section.py index da13b61904..823bd845b0 100644 --- a/src/abaqus/Section/Section.py +++ b/src/abaqus/Section/Section.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -16,8 +18,8 @@ class Section(ConnectorSection): def TransverseShearBeam( self, scfDefinition: Literal[C.VALUE, C.ANALYSIS_DEFAULT, C.COMPUTED], - k23: Optional[float] = None, - k13: Optional[float] = None, + k23: float | None = None, + k13: float | None = None, slendernessCompensation: Union[Literal[C.COMPUTED], float] = 0, ) -> TransverseShearBeam: """This method creates a TransverseShearBeam object. diff --git a/src/abaqus/Section/SectionBase.py b/src/abaqus/Section/SectionBase.py index f5eafd4970..6cd5dd3e9f 100644 --- a/src/abaqus/Section/SectionBase.py +++ b/src/abaqus/Section/SectionBase.py @@ -52,7 +52,7 @@ def sectionsFromOdb(self, fileName: str): Returns ------- - List[Section] + list[Section] A list of Section objects. """ ... diff --git a/src/abaqus/Section/SectionLayer.py b/src/abaqus/Section/SectionLayer.py index bd0d0ec447..e84fba9026 100644 --- a/src/abaqus/Section/SectionLayer.py +++ b/src/abaqus/Section/SectionLayer.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -69,7 +69,7 @@ class SectionLayer: #: for the relative orientation of this layer. If this reference is valid it is used as the #: relative orientation of the layer, otherwise the **orientAngle** is used as described. The #: default value is None. - orientation: Optional[SymbolicConstant] = None + orientation: SymbolicConstant #: A String specifying the name of the field specifying the additional rotation. The #: default value is "". @@ -86,7 +86,7 @@ def __init__( angle: float = 0, additionalRotationType: Literal[C.ROTATION_NONE, C.ROTATION_FIELD, C.ROTATION_ANGLE] = ROTATION_NONE, plyName: str = "", - orientation: Optional[SymbolicConstant] = None, + orientation: SymbolicConstant | None = None, additionalRotationField: str = "", ): """This method creates a SectionLayer object. diff --git a/src/abaqus/Section/SectionLayerArray.py b/src/abaqus/Section/SectionLayerArray.py index aa3a925f80..23e21824ab 100644 --- a/src/abaqus/Section/SectionLayerArray.py +++ b/src/abaqus/Section/SectionLayerArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .SectionLayer import SectionLayer diff --git a/src/abaqus/Section/SectionModel.py b/src/abaqus/Section/SectionModel.py index cc6b6efdca..41a788a0e5 100644 --- a/src/abaqus/Section/SectionModel.py +++ b/src/abaqus/Section/SectionModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Tuple, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -7,7 +9,6 @@ from ..Connector.ConnectorBehaviorOptionArray import ConnectorBehaviorOptionArray from ..Model.ModelBase import ModelBase from ..UtilityAndView.abaqusConstants import ( - BENDING, CONSTANT, DEFAULT, DOF_MODE, @@ -135,16 +136,16 @@ def BeamSection( thermalExpansion: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, - density: Optional[float] = None, - referenceTemperature: Optional[float] = None, + density: float | None = None, + referenceTemperature: float | None = None, temperatureVar: Literal[C.LINEAR, C.INTERPOLATED] = LINEAR, alphaDamping: float = 0, betaDamping: float = 0, compositeDamping: float = 0, useFluidInertia: Boolean = OFF, submerged: Literal[C.FULLY, C.HALF] = FULLY, - fluidMassDensity: Optional[float] = None, - crossSectionRadius: Optional[float] = None, + fluidMassDensity: float | None = None, + crossSectionRadius: float | None = None, lateralMassCoef: float = 1, axialMassCoef: float = 0, massOffsetX: float = 0, @@ -153,8 +154,8 @@ def BeamSection( material: str = "", table: tuple = (), outputPts: tuple = (), - centroid: Tuple[float, float] = (0.0, 0.0), - shearCenter: Tuple[float, float] = (0.0, 0.0), + centroid: tuple[float, float] = (0.0, 0.0), + shearCenter: tuple[float, float] = (0.0, 0.0), profileEnd: str = "", ) -> BeamSection: """This method creates a BeamSection object. @@ -300,7 +301,7 @@ def CohesiveSection( material: str, initialThicknessType: Literal[C.SOLVER_DEFAULT, C.SPECIFY] = SOLVER_DEFAULT, initialThickness: float = 1, - outOfPlaneThickness: Optional[float] = None, + outOfPlaneThickness: float | None = None, ) -> CohesiveSection: """This method creates a CohesiveSection object. @@ -371,8 +372,8 @@ def CompositeShellSection( integrationRule: Literal[C.SIMPSON, C.GAUSS] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, C.BENDING] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, layupName: str = "", @@ -561,20 +562,20 @@ def ConnectorSection( C.SLOT, ] = NONE, integration: Literal[C.UNSPECIFIED, C.IMPLICIT, C.EXPLICIT] = UNSPECIFIED, - u1ReferenceLength: Optional[float] = None, - u2ReferenceLength: Optional[float] = None, - u3ReferenceLength: Optional[float] = None, - ur1ReferenceAngle: Optional[float] = None, - ur2ReferenceAngle: Optional[float] = None, - ur3ReferenceAngle: Optional[float] = None, - massPerLength: Optional[float] = None, - contactAngle: Optional[float] = None, + u1ReferenceLength: float | None = None, + u2ReferenceLength: float | None = None, + u3ReferenceLength: float | None = None, + ur1ReferenceAngle: float | None = None, + ur2ReferenceAngle: float | None = None, + ur3ReferenceAngle: float | None = None, + massPerLength: float | None = None, + contactAngle: float | None = None, materialFlowFactor: float = 1.0, regularize: Boolean = ON, defaultTolerance: Boolean = ON, regularization: float = 0.03, extrapolation: Literal[C.CONSTANT, C.LINEAR] = CONSTANT, - behaviorOptions: ConnectorBehaviorOptionArray = ..., + behaviorOptions: ConnectorBehaviorOptionArray = list(), ) -> ConnectorSection: """This method creates a ConnectorSection object. @@ -788,7 +789,7 @@ def GeneralStiffnessSection( self, name: str, stiffnessMatrix: tuple, - referenceTemperature: Optional[float] = None, + referenceTemperature: float | None = None, applyThermalStress: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, @@ -888,9 +889,9 @@ def HomogeneousShellSection( poisson: float = 0, integrationRule: Literal[C.SIMPSON, C.GAUSS] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, - idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, BENDING] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + idealization: Literal[C.NO_IDEALIZATION, C.SMEAR_ALL_LAYERS, C.MEMBRANE, C.BENDING] = NO_IDEALIZATION, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, thicknessField: str = "", @@ -1000,7 +1001,7 @@ def HomogeneousShellSection( @abaqus_method_doc def HomogeneousSolidSection( - self, name: str, material: str, thickness: Optional[float] = 1.0 + self, name: str, material: str, thickness: float | None = 1.0 ) -> HomogeneousSolidSection: """This method creates a HomogeneousSolidSection object. diff --git a/src/abaqus/Section/SectionOdb.py b/src/abaqus/Section/SectionOdb.py index fcf4d752d9..ccbc83b5f1 100644 --- a/src/abaqus/Section/SectionOdb.py +++ b/src/abaqus/Section/SectionOdb.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -126,16 +128,16 @@ def BeamSection( thermalExpansion: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, - density: Optional[float] = None, - referenceTemperature: Optional[float] = None, + density: float | None = None, + referenceTemperature: float | None = None, temperatureVar: Literal[C.INTERPOLATED, C.LINEAR] = LINEAR, alphaDamping: float = 0, betaDamping: float = 0, compositeDamping: float = 0, useFluidInertia: Boolean = OFF, submerged: Literal[C.FULLY, C.HALF] = FULLY, - fluidMassDensity: Optional[float] = None, - crossSectionRadius: Optional[float] = None, + fluidMassDensity: float | None = None, + crossSectionRadius: float | None = None, lateralMassCoef: float = 1, axialMassCoef: float = 0, massOffsetX: float = 0, @@ -291,7 +293,7 @@ def CohesiveSection( material: str, initialThicknessType: Literal[C.SOLVER_DEFAULT] = SOLVER_DEFAULT, initialThickness: float = 1, - outOfPlaneThickness: Optional[float] = None, + outOfPlaneThickness: float | None = None, ) -> CohesiveSection: """This method creates a CohesiveSection object. @@ -358,8 +360,8 @@ def CompositeShellSection( integrationRule: Literal[C.GAUSS, C.SIMPSON] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, idealization: Literal[C.SMEAR_ALL_LAYERS, C.BENDING, C.MEMBRANE, C.NO_IDEALIZATION] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, layupName: str = "", @@ -511,20 +513,20 @@ def ConnectorSection( rotationalType: Literal[C.NONE] = NONE, translationalType: Literal[C.NONE] = NONE, integration: Literal[C.EXPLICIT, C.IMPLICIT, C.UNSPECIFIED] = UNSPECIFIED, - u1ReferenceLength: Optional[float] = None, - u2ReferenceLength: Optional[float] = None, - u3ReferenceLength: Optional[float] = None, - ur1ReferenceAngle: Optional[float] = None, - ur2ReferenceAngle: Optional[float] = None, - ur3ReferenceAngle: Optional[float] = None, - massPerLength: Optional[float] = None, - contactAngle: Optional[float] = None, + u1ReferenceLength: float | None = None, + u2ReferenceLength: float | None = None, + u3ReferenceLength: float | None = None, + ur1ReferenceAngle: float | None = None, + ur2ReferenceAngle: float | None = None, + ur3ReferenceAngle: float | None = None, + massPerLength: float | None = None, + contactAngle: float | None = None, materialFlowFactor: float = 1, regularize: Boolean = ON, defaultTolerance: Boolean = ON, regularization: float = 0, extrapolation: Literal[C.CONSTANT, C.LINEAR] = CONSTANT, - behaviorOptions: Optional[ConnectorBehaviorOptionArray] = None, + behaviorOptions: ConnectorBehaviorOptionArray | None = None, ) -> ConnectorSection: """This method creates a ConnectorSection object. @@ -738,7 +740,7 @@ def GeneralStiffnessSection( self, name: str, stiffnessMatrix: tuple, - referenceTemperature: Optional[float] = None, + referenceTemperature: float | None = None, applyThermalStress: Boolean = OFF, temperatureDependency: Boolean = OFF, dependencies: int = 0, @@ -835,8 +837,8 @@ def HomogeneousShellSection( integrationRule: Literal[C.GAUSS, C.SIMPSON] = SIMPSON, temperature: Literal[C.GRADIENT, C.POINTWISE] = GRADIENT, idealization: Literal[C.SMEAR_ALL_LAYERS, C.BENDING, C.MEMBRANE, C.NO_IDEALIZATION] = NO_IDEALIZATION, - nTemp: Optional[int] = None, - thicknessModulus: Optional[float] = None, + nTemp: int | None = None, + thicknessModulus: float | None = None, useDensity: Boolean = OFF, density: float = 0, thicknessField: str = "", diff --git a/src/abaqus/Section/ShellSection.py b/src/abaqus/Section/ShellSection.py index 6ffd4a8c91..134d1eb4e3 100644 --- a/src/abaqus/Section/ShellSection.py +++ b/src/abaqus/Section/ShellSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -25,4 +25,4 @@ class ShellSection(Section): name: str = "" #: A TransverseShearShell object specifying the transverse shear stiffness properties. - transverseShear: Optional[TransverseShearShell] = None + transverseShear: TransverseShearShell diff --git a/src/abaqus/Section/SurfaceSection.py b/src/abaqus/Section/SurfaceSection.py index 3d008bb771..98e598ca47 100644 --- a/src/abaqus/Section/SurfaceSection.py +++ b/src/abaqus/Section/SurfaceSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -26,7 +26,7 @@ class SurfaceSection(Section): """ #: A RebarLayers object specifying reinforcement properties. - rebarLayers: Optional[RebarLayers] = None + rebarLayers: RebarLayers | None = None #: A String specifying the repository key. name: str diff --git a/src/abaqus/Section/TransverseShearBeam.py b/src/abaqus/Section/TransverseShearBeam.py index 61629d2d0a..f09b47f4b6 100644 --- a/src/abaqus/Section/TransverseShearBeam.py +++ b/src/abaqus/Section/TransverseShearBeam.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -31,11 +33,11 @@ class TransverseShearBeam: #: None or a Float specifying the k23 shear stiffness of the section. The default value is #: None. - k23: Optional[float] = None + k23: float | None = None #: None or a Float specifying the k13 shear stiffness of the section. The default value is #: None. - k13: Optional[float] = None + k13: float | None = None #: The SymbolicConstant COMPUTED or a Float specifying the slenderness compensation factor #: of the section. The default value is 0.25. @@ -45,8 +47,8 @@ class TransverseShearBeam: def __init__( self, scfDefinition: Literal[C.VALUE, C.ANALYSIS_DEFAULT, C.COMPUTED], - k23: Optional[float] = None, - k13: Optional[float] = None, + k23: float | None = None, + k13: float | None = None, slendernessCompensation: Union[Literal[C.COMPUTED], float] = 0, ): """This method creates a TransverseShearBeam object. diff --git a/src/abaqus/Session/Color.py b/src/abaqus/Session/Color.py index ca15465da3..15896f756e 100644 --- a/src/abaqus/Session/Color.py +++ b/src/abaqus/Session/Color.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -18,7 +18,7 @@ class Color: #: A tuple of three Floats specifying the RGB value of the color. The Float values must be #: between 0.0 and 1.0. - rgb: Optional[float] = None + rgb: float | None = None @abaqus_method_doc def setByRGB(self, rgb: tuple): diff --git a/src/abaqus/Session/Drawing.py b/src/abaqus/Session/Drawing.py index 8582807295..4a1074f275 100644 --- a/src/abaqus/Session/Drawing.py +++ b/src/abaqus/Session/Drawing.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -88,11 +88,11 @@ class Drawing: #: A tuple of three Floats specifying the **Red**, **Green**, and **Blue** component values for #: the edge color. Possible values for each component are between 0.0 and 1.0. - edgeColor: Optional[float] = None + edgeColor: float | None = None #: A tuple of three Floats specifying the **Red**, **Green**, and **Blue** component values for #: the point color. Possible values for each component are between 0.0 and 1.0. - pointColor: Optional[float] = None + pointColor: float | None = None #: A String specifying the repository key. name: str diff --git a/src/abaqus/Session/JournalOptions.py b/src/abaqus/Session/JournalOptions.py index 46bf059355..c7a43a3cf6 100644 --- a/src/abaqus/Session/JournalOptions.py +++ b/src/abaqus/Session/JournalOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -31,9 +31,9 @@ def setValues( self, replayGeometry: Literal[C.COORDINATE, C.COMPRESSEDINDEX, C.INDEX] = COMPRESSEDINDEX, recoverGeometry: Literal[C.COORDINATE, C.COMPRESSEDINDEX, C.INDEX] = COMPRESSEDINDEX, - defaultFormat: Optional[NumberFormat] = None, - fieldReportFormat: Optional[NumberFormat] = None, - geometryFormat: Optional[NumberFormat] = None, + defaultFormat: NumberFormat | None = None, + fieldReportFormat: NumberFormat | None = None, + geometryFormat: NumberFormat | None = None, ): """This method modifies the JournalOptions object. diff --git a/src/abaqus/Session/SessionBase.py b/src/abaqus/Session/SessionBase.py index dafc642bc8..a8fc171a29 100644 --- a/src/abaqus/Session/SessionBase.py +++ b/src/abaqus/Session/SessionBase.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Sequence +from __future__ import annotations + +from typing import Sequence from typing_extensions import Literal @@ -85,18 +87,18 @@ class SessionBase: #: A Float specifying the memory usage value for the Abaqus/CAE kernel process in #: megabytes. - kernelMemoryFootprint: Optional[float] = None + kernelMemoryFootprint: float | None = None #: A Float specifying the maximum value for the memory usage for the Abaqus/CAE kernel #: process in megabytes. - kernelMemoryMaxFootprint: Optional[float] = None + kernelMemoryMaxFootprint: float | None = None #: A Float specifying the limit for the memory use for the Abaqus/CAE kernel process in #: megabytes. - kernelMemoryLimit: Optional[float] = None + kernelMemoryLimit: float | None = None #: A repository of Color objects. - colors: Dict[str, Color] = {} + colors: dict[str, Color] = {} #: A JournalOptions object specifying how to record selection of geometry in the journal #: and replay files. @@ -130,7 +132,7 @@ class SessionBase: quickTimeOptions: QuickTimeOptions = QuickTimeOptions() #: A repository of Viewport objects. - viewports: Dict[str, Viewport] = {} + viewports: dict[str, Viewport] = {} #: A RepositorySupport object. customData: RepositorySupport = RepositorySupport() @@ -148,10 +150,10 @@ class SessionBase: freeBodyReportOptions: FreeBodyReportOptions = FreeBodyReportOptions() #: A repository of Odb objects. - odbs: Dict[str, Odb] = {} + odbs: dict[str, Odb] = {} #: A repository of ScratchOdb objects. - scratchOdbs: Dict[str, ScratchOdb] = {} + scratchOdbs: dict[str, ScratchOdb] = {} #: A DefaultOdbDisplay object. defaultOdbDisplay: DefaultOdbDisplay = DefaultOdbDisplay() @@ -163,22 +165,22 @@ class SessionBase: defaultChartOptions: DefaultChartOptions = DefaultChartOptions() #: A repository of OdbData objects. - odbData: Dict[str, OdbData] = {} + odbData: dict[str, OdbData] = {} #: A repository of MdbData objects. - mdbData: Dict[str, MdbData] = {} + mdbData: dict[str, MdbData] = {} #: A repository of Path objects. - paths: Dict[str, Path] = {} + paths: dict[str, Path] = {} #: A repository of FreeBody objects. - freeBodies: Dict[str, FreeBody] = {} + freeBodies: dict[str, FreeBody] = {} #: A repository of Stream objects. - streams: Dict[str, Stream] = {} + streams: dict[str, Stream] = {} #: A repository of Spectrum objects. - spectrums: Dict[str, Spectrum] = {} + spectrums: dict[str, Spectrum] = {} #: A CurrentProbeValues object. currentProbeValues: CurrentProbeValues = CurrentProbeValues() @@ -226,16 +228,16 @@ class SessionBase: xyColors: AutoColors = AutoColors() #: A repository of XYData objects. - xyDataObjects: Dict[str, XYData] = {} + xyDataObjects: dict[str, XYData] = {} #: A repository of XYCurve objects. - curves: Dict[str, XYCurve] = {} + curves: dict[str, XYCurve] = {} #: A repository of XYPlot objects. - xyPlots: Dict[str, XYPlot] = {} + xyPlots: dict[str, XYPlot] = {} #: A repository of Chart objects. - charts: Dict[str, Chart] = {} + charts: dict[str, Chart] = {} #: An XYReportOptions object. defaultXYReportOptions: XYReportOptions = XYReportOptions() @@ -244,13 +246,13 @@ class SessionBase: xyReportOptions: XYReportOptions = XYReportOptions() #: A repository of View objects. - views: Dict[str, View] = {} + views: dict[str, View] = {} #: A repository of NetworkDatabaseConnector objects. - networkDatabaseConnectors: Dict[str, NetworkDatabaseConnector] = {} + networkDatabaseConnectors: dict[str, NetworkDatabaseConnector] = {} #: A repository of DisplayGroup objects. - displayGroups: Dict[str, DisplayGroup] = {} + displayGroups: dict[str, DisplayGroup] = {} #: A GraphicsInfo object. graphicsInfo: GraphicsInfo = GraphicsInfo() @@ -265,7 +267,7 @@ class SessionBase: defaultViewportAnnotationOptions: ViewportAnnotationOptions = ViewportAnnotationOptions() #: A repository of Queue objects. - queues: Dict[str, Queue] = {} + queues: dict[str, Queue] = {} #: A String specifying the name of the current viewport. currentViewportName: str = "" @@ -273,13 +275,13 @@ class SessionBase: #: A Dictionary object specifying the viewports and their associated models. The Dictionary #: key specifies the viewport name. The Dictionary value is a Dictionary specifying the #: model name. - sessionState: Optional[dict] = None + sessionState: dict | None = None #: A repository of Image objects. - images: Dict[str, Image] = {} + images: dict[str, Image] = {} #: A repository of Movie objects. - movies: Dict[str, Movie] = {} + movies: dict[str, Movie] = {} #: A LightOptions object. defaultLightOptions: LightOptions = LightOptions() @@ -291,10 +293,10 @@ class SessionBase: defaultMesherOptions: MesherOptions = MesherOptions() #: A repository of Drawing objects. - drawings: Dict[str, Drawing] = {} + drawings: dict[str, Drawing] = {} @abaqus_method_doc - def setValues(self, kernelMemoryLimit: Optional[float] = None): + def setValues(self, kernelMemoryLimit: float | None = None): """This method modifies the Session object. Parameters @@ -318,7 +320,7 @@ def setValues(self, kernelMemoryLimit: Optional[float] = None): ... @abaqus_method_doc - def enableCADConnection(self, CADName: str, portNum: Optional[int] = None): + def enableCADConnection(self, CADName: str, portNum: int | None = None): """This method enables the Abaqus/CAE listening port for the specified **CAD** system. Parameters @@ -364,7 +366,7 @@ def disableCADConnection(self, CADName: str): ... @abaqus_method_doc - def enableParameterUpdate(self, CADName: str, CADVersion: str, CADPort: Optional[int] = None): + def enableParameterUpdate(self, CADName: str, CADVersion: str, CADPort: int | None = None): """This method enables parameter updates for ProE and NX by establishing a connection with the listening port previously setup by the CAD application. diff --git a/src/abaqus/Sketcher/ConstrainedSketch.py b/src/abaqus/Sketcher/ConstrainedSketch.py index 03a400595c..d422c6c471 100644 --- a/src/abaqus/Sketcher/ConstrainedSketch.py +++ b/src/abaqus/Sketcher/ConstrainedSketch.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Sequence, Tuple, overload +from typing import Sequence, overload from typing_extensions import Literal @@ -44,7 +44,7 @@ def __init__( self, name: str, sheetSize: float, - gridSpacing: Optional[float] = None, + gridSpacing: float | None = None, transform: tuple = (), ) -> None: """This method creates a ConstrainedSketch object. If the sketch cannot be created, the method returns @@ -132,7 +132,7 @@ def ConstrainedSketchFromGeometryFile(self, name: str, geometryFile: AcisFile) - sketch: ConstrainedSketch A ConstrainedSketch object """ - ... + return ConstrainedSketch(name, 200.0) @abaqus_method_doc def print(self) -> None: @@ -183,7 +183,7 @@ def autoDimension(self, objectList: tuple) -> None: ... @abaqus_method_doc - def autoTrimCurve(self, curve1: str, point1: Tuple[float, float], parameter1: float) -> None: + def autoTrimCurve(self, curve1: str, point1: tuple[float, float], parameter1: float) -> None: """This method automatically trims a selected ConstrainedSketchGeometry object at the specified location. If the object does not intersect other ConstrainedSketchGeometry objects, the entire selected object will be deleted. @@ -205,9 +205,9 @@ def autoTrimCurve(self, curve1: str, point1: Tuple[float, float], parameter1: fl def breakCurve( self, curve1: ConstrainedSketchGeometry, - point1: Tuple[float, float], + point1: tuple[float, float], curve2: ConstrainedSketchGeometry, - point2: Tuple[float, float], + point2: tuple[float, float], ) -> None: """This method breaks a specified ConstrainedSketchGeometry object (*curve1*) using another specified ConstrainedSketchGeometry object (*curve2*). If the selected ConstrainedSketchGeometry objects @@ -266,7 +266,7 @@ def copyMove(self, vector: tuple, objectList: Sequence[ConstrainedSketchGeometry @abaqus_method_doc def copyRotate( self, - centerPoint: Tuple[float, float], + centerPoint: tuple[float, float], angle: float, objectList: Sequence[ConstrainedSketchGeometry], ) -> None: @@ -288,7 +288,7 @@ def copyRotate( def copyScale( self, scaleValue: float, - scaleCenter: Tuple[float, float], + scaleCenter: tuple[float, float], objectList: Sequence[ConstrainedSketchGeometry], ) -> None: """This method creates copies of the given ConstrainedSketchGeometry objects, scales them by the @@ -356,8 +356,8 @@ def linearPattern( vertexList: Sequence[ConstrainedSketchVertex] = (), geomList: Sequence[ConstrainedSketchGeometry] = (), number2: int = 1, - spacing2: Optional[float] = None, - angle2: Optional[float] = None, + spacing2: float | None = None, + angle2: float | None = None, ) -> None: """This method copies ConstrainedSketchGeometry objects in a linear pattern along one or two directions. This method also copies any associated dimension or constraint objects that exist between the given @@ -464,7 +464,7 @@ def radialPattern( self, number: int, totalAngle: float, - centerPoint: Tuple[float, float], + centerPoint: tuple[float, float], vertexList: Sequence[ConstrainedSketchVertex] = (), geomList: Sequence[ConstrainedSketchGeometry] = (), ) -> None: @@ -497,7 +497,7 @@ def resetView(self) -> None: ... @abaqus_method_doc - def rectangle(self, point1: Tuple[float, float], point2: Tuple[float, float]) -> int: + def rectangle(self, point1: tuple[float, float], point2: tuple[float, float]) -> int: """This method creates four lines that form a rectangle with diagonal corners defined by the given points and inserts them into the geometry repository of the ConstrainedSketch object. @@ -513,7 +513,7 @@ def rectangle(self, point1: Tuple[float, float], point2: Tuple[float, float]) -> success: int An Int specifying the success or failure of the method. A value of 0 indicates failure """ - ... + return 0 @abaqus_method_doc def removeGapsAndOverlaps(self, tolerance: str, geomList: Sequence[ConstrainedSketchGeometry]) -> None: @@ -567,7 +567,7 @@ def retrieveSketch(self, sketch: ConstrainedSketch) -> None: ... @abaqus_method_doc - def rotate(self, centerPoint: Tuple[float, float], angle: float, objectList: tuple) -> None: + def rotate(self, centerPoint: tuple[float, float], angle: float, objectList: tuple) -> None: """This method rotates the given ConstrainedSketchGeometry objects by the given angle and about the given point. @@ -586,7 +586,7 @@ def rotate(self, centerPoint: Tuple[float, float], angle: float, objectList: tup def scale( self, scaleValue: float, - scaleCenter: Tuple[float, float], + scaleCenter: tuple[float, float], objectList: Sequence[ConstrainedSketchGeometry], ) -> None: """This method scales the given ConstrainedSketchGeometry objects by the given scale factor and about @@ -628,9 +628,9 @@ def setPrimaryObject(self, option: Literal[C.STANDALONE, C.SUPERIMPOSE]) -> None def trimExtendCurve( self, curve1: str, - point1: Tuple[float, float], + point1: tuple[float, float], curve2: str, - point2: Tuple[float, float], + point2: tuple[float, float], ) -> None: """This method trims or extends a specified ConstrainedSketchGeometry object (*curve1*) using another specified ConstrainedSketchGeometry object (*curve2*). **curve2** is not affected by the operation. The @@ -669,7 +669,7 @@ def unsetPrimaryObject(self) -> None: ... @abaqus_method_doc - def writeAcisFile(self, fileName: str, version: Optional[float] = None) -> None: + def writeAcisFile(self, fileName: str, version: float | None = None) -> None: """This method exports the geometry of the sketch to a named file in ACIS format. Parameters diff --git a/src/abaqus/Sketcher/ConstrainedSketchBase.py b/src/abaqus/Sketcher/ConstrainedSketchBase.py index 0d87fa0b37..384310e1f9 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchBase.py +++ b/src/abaqus/Sketcher/ConstrainedSketchBase.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -38,24 +38,24 @@ class ConstrainedSketchBase: """ #: A repository of ConstrainedSketchConstraint objects. - constraints: Dict[str, ConstrainedSketchConstraint] = {} + constraints: dict[str, ConstrainedSketchConstraint] = {} #: A repository of ConstrainedSketchDimension objects. - dimensions: Dict[str, ConstrainedSketchDimension] = {} + dimensions: dict[str, ConstrainedSketchDimension] = {} #: A ConstrainedSketchGeometryArray object specifying the sketch geometry, such as lines, #: arcs, circles, and splines. - geometry: ConstrainedSketchGeometryArray = [] + geometry: ConstrainedSketchGeometryArray = ConstrainedSketchGeometryArray() #: A repository of ConstrainedSketchParameter objects specifying sketch parameters, which #: may be associated with dimensions. - parameters: Dict[str, ConstrainedSketchParameter] = {} + parameters: dict[str, ConstrainedSketchParameter] = {} #: A ConstrainedSketchOptions object specifying the sketch option settings. sketchOptions: ConstrainedSketchOptions = ConstrainedSketchOptions() #: A ConstrainedSketchVertexArray object. - vertices: ConstrainedSketchVertexArray = [] + vertices: ConstrainedSketchVertexArray = ConstrainedSketchVertexArray() #: A ConstrainedSketchImageOptions object. imageOptions: ConstrainedSketchImageOptions = ConstrainedSketchImageOptions() diff --git a/src/abaqus/Sketcher/ConstrainedSketchDimension/AngularDimension.py b/src/abaqus/Sketcher/ConstrainedSketchDimension/AngularDimension.py index 1c57aa44cd..73fc3abc06 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchDimension/AngularDimension.py +++ b/src/abaqus/Sketcher/ConstrainedSketchDimension/AngularDimension.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -17,7 +19,7 @@ def __init__( line1: ConstrainedSketchGeometry, line2: ConstrainedSketchGeometry, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ): """This method constructs a ConstrainedSketchDimension object between two ConstrainedSketchGeometry diff --git a/src/abaqus/Sketcher/ConstrainedSketchDimension/ConstrainedSketchDimensionModel.py b/src/abaqus/Sketcher/ConstrainedSketchDimension/ConstrainedSketchDimensionModel.py index bee339332f..609468cc5e 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchDimension/ConstrainedSketchDimensionModel.py +++ b/src/abaqus/Sketcher/ConstrainedSketchDimension/ConstrainedSketchDimensionModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -31,7 +33,7 @@ def AngularDimension( line1: ConstrainedSketchGeometry, line2: ConstrainedSketchGeometry, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ) -> ConstrainedSketchDimension: """This method constructs a ConstrainedSketchDimension object between two ConstrainedSketchGeometry @@ -69,7 +71,7 @@ def HorizontalDimension( vertex1: ConstrainedSketchVertex, vertex2: ConstrainedSketchVertex, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ) -> ConstrainedSketchDimension: """This method constructs a ConstrainedSketchDimension object between two vertices. A horizontal @@ -107,7 +109,7 @@ def ObliqueDimension( vertex1: ConstrainedSketchVertex, vertex2: ConstrainedSketchVertex, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ) -> ConstrainedSketchDimension: """This method constructs a ConstrainedSketchDimension object between two vertices. An oblique dimension @@ -144,10 +146,10 @@ def RadialDimension( self, curve: ConstrainedSketchGeometry, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, - majorRadius: Optional[float] = None, - minorRadius: Optional[float] = None, + majorRadius: float | None = None, + minorRadius: float | None = None, ) -> ConstrainedSketchDimension: """This method constructs a ConstrainedSketchDimension object on a circular or elliptical arc. A radial dimension indicates the radius of an arc or circle or the major or minor radius of an ellipse. @@ -188,7 +190,7 @@ def VerticalDimension( vertex1: ConstrainedSketchVertex, vertex2: ConstrainedSketchVertex, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ) -> ConstrainedSketchDimension: """This method constructs a ConstrainedSketchDimension between two vertices. A vertical dimension @@ -226,7 +228,7 @@ def DistanceDimension( entity1: ConstrainedSketchVertex, entity2: ConstrainedSketchVertex, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ) -> ConstrainedSketchDimension: """This method constructs a ConstrainedSketchDimension object between two ConstrainedSketchGeometry, or diff --git a/src/abaqus/Sketcher/ConstrainedSketchDimension/DistanceDimension.py b/src/abaqus/Sketcher/ConstrainedSketchDimension/DistanceDimension.py index a8077d3323..11db4f273d 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchDimension/DistanceDimension.py +++ b/src/abaqus/Sketcher/ConstrainedSketchDimension/DistanceDimension.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -15,7 +17,7 @@ def __init__( entity1: ConstrainedSketchVertex, entity2: ConstrainedSketchVertex, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ): """This method constructs a ConstrainedSketchDimension object between two ConstrainedSketchGeometry, or diff --git a/src/abaqus/Sketcher/ConstrainedSketchDimension/HorizontalDimension.py b/src/abaqus/Sketcher/ConstrainedSketchDimension/HorizontalDimension.py index 0a206deecb..f83c5c49d1 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchDimension/HorizontalDimension.py +++ b/src/abaqus/Sketcher/ConstrainedSketchDimension/HorizontalDimension.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -15,7 +17,7 @@ def __init__( vertex1: ConstrainedSketchVertex, vertex2: ConstrainedSketchVertex, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ): """This method constructs a ConstrainedSketchDimension object between two vertices. A horizontal diff --git a/src/abaqus/Sketcher/ConstrainedSketchDimension/ObliqueDimension.py b/src/abaqus/Sketcher/ConstrainedSketchDimension/ObliqueDimension.py index e018287cf5..b573aeb100 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchDimension/ObliqueDimension.py +++ b/src/abaqus/Sketcher/ConstrainedSketchDimension/ObliqueDimension.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -15,7 +17,7 @@ def __init__( vertex1: ConstrainedSketchVertex, vertex2: ConstrainedSketchVertex, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ): """This method constructs a ConstrainedSketchDimension object between two vertices. An oblique dimension diff --git a/src/abaqus/Sketcher/ConstrainedSketchDimension/RadialDimension.py b/src/abaqus/Sketcher/ConstrainedSketchDimension/RadialDimension.py index bb1ecf756d..443233b7ed 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchDimension/RadialDimension.py +++ b/src/abaqus/Sketcher/ConstrainedSketchDimension/RadialDimension.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -16,10 +18,10 @@ def __init__( self, curve: ConstrainedSketchGeometry, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, - majorRadius: Optional[float] = None, - minorRadius: Optional[float] = None, + majorRadius: float | None = None, + minorRadius: float | None = None, ): """This method constructs a ConstrainedSketchDimension object on a circular or elliptical arc. A radial dimension indicates the radius of an arc or circle or the major or minor radius of an ellipse. diff --git a/src/abaqus/Sketcher/ConstrainedSketchDimension/VerticalDimension.py b/src/abaqus/Sketcher/ConstrainedSketchDimension/VerticalDimension.py index 0fd5f5d797..730eb5fc6f 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchDimension/VerticalDimension.py +++ b/src/abaqus/Sketcher/ConstrainedSketchDimension/VerticalDimension.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -15,7 +17,7 @@ def __init__( vertex1: ConstrainedSketchVertex, vertex2: ConstrainedSketchVertex, textPoint: Sequence[float], - value: Optional[float] = None, + value: float | None = None, reference: Boolean = OFF, ): """This method constructs a ConstrainedSketchDimension between two vertices. A vertical dimension diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/Arc3Points.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/Arc3Points.py index 22fe1a1ecb..42d66ca03f 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/Arc3Points.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/Arc3Points.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ArcByCenterEnds.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ArcByCenterEnds.py index 504f2acf73..53b4741017 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ArcByCenterEnds.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ArcByCenterEnds.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from typing_extensions import Literal diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ArcByStartEndTangent.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ArcByStartEndTangent.py index d3ba6859a7..9fd0d5e49c 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ArcByStartEndTangent.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ArcByStartEndTangent.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/CircleByCenterPerimeter.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/CircleByCenterPerimeter.py index 33b23b3293..eaef76590b 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/CircleByCenterPerimeter.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/CircleByCenterPerimeter.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometry.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometry.py index 39d2c39f2d..b35a4b1434 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometry.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometry.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -19,16 +19,16 @@ class ConstrainedSketchGeometry: """ #: An Int specifying the index of the sketch entity in the ConstrainedSketchGeometryArray. - id: Optional[int] = None + id: int | None = None #: A SymbolicConstant specifying the geometry of the sketch entity. Possible values are #: ARC, CIRCLE, ELLIPSE, LINE, and SPLINE. - curveType: Optional[SymbolicConstant] = None + curveType: SymbolicConstant #: A SymbolicConstant specifying the type of sketch entity. Possible values are REGULAR, #: REFERENCE, and CONSTRUCTION. - type: Optional[SymbolicConstant] = None + type: SymbolicConstant #: A tuple of Floats specifying the **X** and*Y*-coordinates of a point located on the #: geometry. - pointOn: Optional[float] = None + pointOn: float | None = None diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometryArray.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometryArray.py index 3711c7b7ad..664849bacd 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometryArray.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometryArray.py @@ -1,4 +1,6 @@ -from typing import List, Tuple +from __future__ import annotations + +from typing import List from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -18,7 +20,7 @@ class ConstrainedSketchGeometryArray(List[ConstrainedSketchGeometry]): """ @abaqus_method_doc - def findAt(self, coordinates: Tuple[float, float], printWarning: Boolean = True) -> ConstrainedSketchGeometry: + def findAt(self, coordinates: tuple[float, float], printWarning: Boolean = True) -> ConstrainedSketchGeometry: """This method returns the ConstrainedSketchGeometry object located at the given coordinates. Parameters diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometryModel.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometryModel.py index f4ab7a0463..afde0ae0a8 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometryModel.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstrainedSketchGeometryModel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from typing_extensions import Literal @@ -345,7 +347,7 @@ def getVertices(self): Returns ------- - vertices: List[ConstrainedSketchVertex] + vertices: list[ConstrainedSketchVertex] A list of ConstrainedSketchVertex objects """ ... diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstructionCircleByCenterPerimeter.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstructionCircleByCenterPerimeter.py index bd51fe3e93..e8b8b056ba 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstructionCircleByCenterPerimeter.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstructionCircleByCenterPerimeter.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstructionLine.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstructionLine.py index 7a4d2218de..9a8536f621 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstructionLine.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/ConstructionLine.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/EllipseByCenterPerimeter.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/EllipseByCenterPerimeter.py index 4082fc2bd8..4bac5f0c64 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/EllipseByCenterPerimeter.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/EllipseByCenterPerimeter.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/FilletByRadius.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/FilletByRadius.py index 355cb1cc48..863b0523a6 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/FilletByRadius.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/FilletByRadius.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/Line.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/Line.py index cc362c4132..2e627e7a4f 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/Line.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/Line.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/Spot.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/Spot.py index 36bfb7cedc..826de93ebf 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/Spot.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/Spot.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchGeometry/getPointAtDistance.py b/src/abaqus/Sketcher/ConstrainedSketchGeometry/getPointAtDistance.py index d3ba743499..3a603bf2b9 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchGeometry/getPointAtDistance.py +++ b/src/abaqus/Sketcher/ConstrainedSketchGeometry/getPointAtDistance.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketchImageOptions.py b/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketchImageOptions.py index e90405bc96..a73ec1f4d7 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketchImageOptions.py +++ b/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketchImageOptions.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketchOptions.py b/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketchOptions.py index 0f1862c91a..722df2578e 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketchOptions.py +++ b/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketchOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -29,12 +29,12 @@ class ConstrainedSketchOptions: @abaqus_method_doc def setValues( self, - sheetSize: Optional[float] = None, - gridSpacing: Optional[float] = None, + sheetSize: float | None = None, + gridSpacing: float | None = None, grid: Boolean = ON, gridFrequency: int = 1, dimensionTextHeight: float = 12, - decimalPlaces: Optional[int] = None, + decimalPlaces: int | None = None, constructionGeometry: Boolean = ON, gridSnap: Boolean = ON, preselection: Boolean = ON, @@ -45,10 +45,9 @@ def setValues( addImpliedConstraints: Boolean = ON, maxCoplanarEntities: int = 300, autoConstrainAngularTolerance: float = 0, - autoConstrainLinearTolerance: Optional[float] = None, - autoConstrainOptions: Optional[ - Literal[C.PERPENDICULAR, C.EQUALRADIUS, C.IDENTICAL, C.TANGENT, C.PARALLEL, C.CONCENTRIC] - ] = None, + autoConstrainLinearTolerance: float | None = None, + autoConstrainOptions: Literal[C.PERPENDICULAR, C.EQUALRADIUS, C.IDENTICAL, C.TANGENT, C.PARALLEL, C.CONCENTRIC] + | None = None, dragMethod: Literal[C.WEIGHTED, C.RELAXATION, C.MINIMUM_MOVE, C.STANDARD] = MINIMUM_MOVE, editMethod: Literal[C.WEIGHTED, C.RELAXATION, C.MINIMUM_MOVE, C.STANDARD] = STANDARD, ): diff --git a/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketcherOptions.py b/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketcherOptions.py index e12bcf4de5..04ac20312e 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketcherOptions.py +++ b/src/abaqus/Sketcher/ConstrainedSketchOptions/ConstrainedSketcherOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -29,10 +29,9 @@ def setValues( addImpliedConstraints: Boolean = ON, maxCoplanarEntities: int = 300, autoConstrainAngularTolerance: float = 0, - autoConstrainLinearTolerance: Optional[float] = None, - autoConstrainOptions: Optional[ - Literal[C.PERPENDICULAR, C.EQUALRADIUS, C.IDENTICAL, C.TANGENT, C.PARALLEL, C.CONCENTRIC] - ] = None, + autoConstrainLinearTolerance: float | None = None, + autoConstrainOptions: Literal[C.PERPENDICULAR, C.EQUALRADIUS, C.IDENTICAL, C.TANGENT, C.PARALLEL, C.CONCENTRIC] + | None = None, dragMethod: Literal[C.WEIGHTED, C.RELAXATION, C.MINIMUM_MOVE, C.STANDARD] = MINIMUM_MOVE, editMethod: Literal[C.WEIGHTED, C.RELAXATION, C.MINIMUM_MOVE, C.STANDARD] = STANDARD, ): diff --git a/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertex.py b/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertex.py index efac781457..2a5bf97e5c 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertex.py +++ b/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertex.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -16,7 +18,7 @@ class ConstrainedSketchVertex: """ #: A tuple of Floats specifying the*X*-, **Y**, and **Z** coordinates of the sketch vertex. - coords: Optional[float] = None + coords: float | None = None @abaqus_method_doc def Spot(self, point: Sequence[float]): diff --git a/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertexArray.py b/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertexArray.py index 7c975fa923..6950fc8761 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertexArray.py +++ b/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertexArray.py @@ -1,4 +1,6 @@ -from typing import List, Tuple +from __future__ import annotations + +from typing import List from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -18,7 +20,7 @@ class ConstrainedSketchVertexArray(List[ConstrainedSketchVertex]): """ @abaqus_method_doc - def findAt(self, coordinates: Tuple[float, float], printWarning: Boolean = True) -> ConstrainedSketchVertex: + def findAt(self, coordinates: tuple[float, float], printWarning: Boolean = True) -> ConstrainedSketchVertex: """This method returns the ConstrainedSketchVertex located at the given coordinates. Parameters diff --git a/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertexModel.py b/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertexModel.py index 78420481a5..3bc6e59b28 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertexModel.py +++ b/src/abaqus/Sketcher/ConstrainedSketchVertex/ConstrainedSketchVertexModel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/ConstrainedSketchVertex/Spot.py b/src/abaqus/Sketcher/ConstrainedSketchVertex/Spot.py index 5e495865bf..c02b9ba0d6 100644 --- a/src/abaqus/Sketcher/ConstrainedSketchVertex/Spot.py +++ b/src/abaqus/Sketcher/ConstrainedSketchVertex/Spot.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc diff --git a/src/abaqus/Sketcher/SketchModel.py b/src/abaqus/Sketcher/SketchModel.py index 702bb84292..5ada094355 100644 --- a/src/abaqus/Sketcher/SketchModel.py +++ b/src/abaqus/Sketcher/SketchModel.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -21,7 +21,7 @@ def ConstrainedSketch( self, name: str, sheetSize: float, - gridSpacing: Optional[float] = None, + gridSpacing: float | None = None, transform: tuple = (), ) -> ConstrainedSketch: """This method creates a ConstrainedSketch object. If the sketch cannot be created, the method returns diff --git a/src/abaqus/Step/AnalysisStep.py b/src/abaqus/Step/AnalysisStep.py index df1ea22f9e..97019727ca 100644 --- a/src/abaqus/Step/AnalysisStep.py +++ b/src/abaqus/Step/AnalysisStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -37,7 +37,7 @@ class AnalysisStep(Step): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -73,31 +73,31 @@ class AnalysisStep(Step): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -106,16 +106,16 @@ class AnalysisStep(Step): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} diff --git a/src/abaqus/Step/AnnealStep.py b/src/abaqus/Step/AnnealStep.py index d429013be3..9a33e1d7d0 100644 --- a/src/abaqus/Step/AnnealStep.py +++ b/src/abaqus/Step/AnnealStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -41,7 +41,7 @@ class AnnealStep(AnalysisStep): #: A Float specifying the post-anneal reference temperature. The default value is the #: current temperature at all nodes in the model after the annealing has completed. - refTemp: Optional[float] = None + refTemp: float | None = None #: A String specifying the name of the previous step. The new step appears after this step #: in the list of analysis steps. @@ -52,7 +52,7 @@ class AnnealStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -88,31 +88,31 @@ class AnnealStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -121,19 +121,19 @@ class AnnealStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -141,7 +141,7 @@ def __init__( name: str, previous: str, description: str = "", - refTemp: Optional[float] = None, + refTemp: float | None = None, maintainAttributes: Boolean = False, ): """This method creates an AnnealStep object. @@ -179,7 +179,7 @@ def __init__( super().__init__() @abaqus_method_doc - def setValues(self, description: str = "", refTemp: Optional[float] = None): + def setValues(self, description: str = "", refTemp: float | None = None): """This method modifies the AnnealStep object. Parameters diff --git a/src/abaqus/Step/BuckleStep.py b/src/abaqus/Step/BuckleStep.py index 91b1555ccf..be8f22ec9f 100644 --- a/src/abaqus/Step/BuckleStep.py +++ b/src/abaqus/Step/BuckleStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -50,7 +50,7 @@ class BuckleStep(AnalysisStep): name: str = "" #: An Int specifying the number of eigenvalues to be estimated. - numEigen: Optional[int] = None + numEigen: int | None = None #: A SymbolicConstant specifying the eigensolver. Possible values are SUBSPACE and LANCZOS. #: The default value is SUBSPACE. @@ -58,15 +58,15 @@ class BuckleStep(AnalysisStep): #: None or a Float specifying the minimum eigenvalue of interest. The default value is #: None. - minEigen: Optional[float] = None + minEigen: float | None = None #: None or a Float specifying the maximum eigenvalue of interest. The default value is #: None. - maxEigen: Optional[float] = None + maxEigen: float | None = None #: An Int specifying the number of vectors used in the iteration. The default value is the #: minimum of (2*n*, **n** + 8), where **n** is the number of eigenvalues requested. - vectors: Optional[int] = None + vectors: int | None = None #: An Int specifying the maximum number of iterations. The default value is 30. maxIterations: int = 30 @@ -93,7 +93,7 @@ class BuckleStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -129,31 +129,31 @@ class BuckleStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -162,19 +162,19 @@ class BuckleStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -184,9 +184,9 @@ def __init__( numEigen: int, description: str = "", eigensolver: Literal[C.LANCZOS, C.SUBSPACE] = SUBSPACE, - minEigen: Optional[float] = None, - maxEigen: Optional[float] = None, - vectors: Optional[int] = None, + minEigen: float | None = None, + maxEigen: float | None = None, + vectors: int | None = None, maxIterations: int = 30, blockSize: Literal[C.DEFAULT] = DEFAULT, maxBlocks: Literal[C.LANCZOS, C.DEFAULT] = DEFAULT, @@ -255,9 +255,9 @@ def setValues( self, description: str = "", eigensolver: Literal[C.LANCZOS, C.SUBSPACE] = SUBSPACE, - minEigen: Optional[float] = None, - maxEigen: Optional[float] = None, - vectors: Optional[int] = None, + minEigen: float | None = None, + maxEigen: float | None = None, + vectors: int | None = None, maxIterations: int = 30, blockSize: Literal[C.DEFAULT] = DEFAULT, maxBlocks: Literal[C.LANCZOS, C.DEFAULT] = DEFAULT, diff --git a/src/abaqus/Step/ComplexFrequencyStep.py b/src/abaqus/Step/ComplexFrequencyStep.py index e09a28832f..1a14096b27 100644 --- a/src/abaqus/Step/ComplexFrequencyStep.py +++ b/src/abaqus/Step/ComplexFrequencyStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -55,7 +55,7 @@ class ComplexFrequencyStep(AnalysisStep): #: None or a Float specifying the shift point in cycles per time. The default value is #: None. - shift: Optional[float] = None + shift: float | None = None #: A Boolean specifying whether to add to the damping matrix contributions due to friction #: effects. The default value is OFF. @@ -67,11 +67,11 @@ class ComplexFrequencyStep(AnalysisStep): #: None or a Float specifying the minimum frequency of interest in cycles per time. The #: default value is None. - minEigen: Optional[float] = None + minEigen: float | None = None #: None or a Float specifying the maximum frequency of interest in cycles per time. The #: default value is None. - maxEigen: Optional[float] = None + maxEigen: float | None = None #: None or a Float specifying the frequency at which to evaluate frequency-dependent #: properties for viscoelasticity, springs, and dashpots during the eigenvalue extraction. @@ -79,7 +79,7 @@ class ComplexFrequencyStep(AnalysisStep): #: frequency-dependent springs and dashpots at zero frequency and will not consider the #: stiffness contributions from frequency-domain viscoelasticity in the step. The default #: value is None. - propertyEvaluationFrequency: Optional[float] = None + propertyEvaluationFrequency: float | None = None #: A String specifying the name of the previous step. The new step appears after this step #: in the list of analysis steps. @@ -90,7 +90,7 @@ class ComplexFrequencyStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -126,31 +126,31 @@ class ComplexFrequencyStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -159,19 +159,19 @@ class ComplexFrequencyStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -180,13 +180,13 @@ def __init__( previous: str, numEigen: Literal[C.ALL] = ALL, description: str = "", - shift: Optional[float] = None, + shift: float | None = None, frictionDamping: Boolean = OFF, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, maintainAttributes: Boolean = False, - minEigen: Optional[float] = None, - maxEigen: Optional[float] = None, - propertyEvaluationFrequency: Optional[float] = None, + minEigen: float | None = None, + maxEigen: float | None = None, + propertyEvaluationFrequency: float | None = None, ): """This method creates a ComplexFrequencyStep object. @@ -249,12 +249,12 @@ def setValues( self, numEigen: Literal[C.ALL] = ALL, description: str = "", - shift: Optional[float] = None, + shift: float | None = None, frictionDamping: Boolean = OFF, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, - minEigen: Optional[float] = None, - maxEigen: Optional[float] = None, - propertyEvaluationFrequency: Optional[float] = None, + minEigen: float | None = None, + maxEigen: float | None = None, + propertyEvaluationFrequency: float | None = None, ): """This method modifies the ComplexFrequencyStep object. diff --git a/src/abaqus/Step/CoupledTempDisplacementStep.py b/src/abaqus/Step/CoupledTempDisplacementStep.py index 67b76a0654..453f9dc3bf 100644 --- a/src/abaqus/Step/CoupledTempDisplacementStep.py +++ b/src/abaqus/Step/CoupledTempDisplacementStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -75,7 +75,7 @@ class CoupledTempDisplacementStep(AnalysisStep): #: A Float specifying the damping intensity of the automatic damping algorithm if the #: problem is expected to be unstable and **stabilizationMethod** ≠ NONE. The default value is #: 2x10⁻⁴. - stabilizationMagnitude: Optional[float] = None + stabilizationMagnitude: float | None = None #: A SymbolicConstant specifying the time incrementation method to be used. Possible values #: are FIXED and AUTOMATIC. The default value is AUTOMATIC. @@ -86,15 +86,15 @@ class CoupledTempDisplacementStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of the suggested initial time increment or 10−5 times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default value is the total #: time period for the step. - maxInc: Optional[float] = None + maxInc: float | None = None #: A Float specifying the maximum temperature change to be allowed in an increment in a #: transient analysis. The default value is 0.0. @@ -151,7 +151,7 @@ class CoupledTempDisplacementStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -187,31 +187,31 @@ class CoupledTempDisplacementStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -220,19 +220,19 @@ class CoupledTempDisplacementStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -244,12 +244,12 @@ def __init__( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, deltmx: float = 0, cetol: float = 0, creepIntegration: Literal[C.EXPLICIT, C.IMPLICIT, C.NONE] = IMPLICIT, @@ -366,12 +366,12 @@ def setValues( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, deltmx: float = 0, cetol: float = 0, creepIntegration: Literal[C.EXPLICIT, C.IMPLICIT, C.NONE] = IMPLICIT, diff --git a/src/abaqus/Step/CoupledThermalElectricStep.py b/src/abaqus/Step/CoupledThermalElectricStep.py index 412afa98e4..5164e07155 100644 --- a/src/abaqus/Step/CoupledThermalElectricStep.py +++ b/src/abaqus/Step/CoupledThermalElectricStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -72,15 +72,15 @@ class CoupledThermalElectricStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of the suggested initial time increment or 10−5 times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default value is the total #: time period for the step. - maxInc: Optional[float] = None + maxInc: float | None = None #: A SymbolicConstant specifying the time period to be analyzed in a transient analysis. #: Possible values are PERIOD and SS. The default value is PERIOD. @@ -125,7 +125,7 @@ class CoupledThermalElectricStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -161,31 +161,31 @@ class CoupledThermalElectricStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -194,19 +194,19 @@ class CoupledThermalElectricStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -218,9 +218,9 @@ def __init__( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, end: Literal[C.SS, C.PERIOD] = PERIOD, deltmx: float = 0, mxdem: float = 0, @@ -315,9 +315,9 @@ def setValues( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, end: Literal[C.SS, C.PERIOD] = PERIOD, deltmx: float = 0, mxdem: float = 0, diff --git a/src/abaqus/Step/CoupledThermalElectricalStructuralStep.py b/src/abaqus/Step/CoupledThermalElectricalStructuralStep.py index 87fb12d230..13c266cbde 100644 --- a/src/abaqus/Step/CoupledThermalElectricalStructuralStep.py +++ b/src/abaqus/Step/CoupledThermalElectricalStructuralStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -74,7 +74,7 @@ class CoupledThermalElectricalStructuralStep(AnalysisStep): #: A Float specifying the damping intensity of the automatic damping algorithm if the #: problem is expected to be unstable and **stabilizationMethod** ≠ NONE. The default value is #: 2x10⁻⁴. - stabilizationMagnitude: Optional[float] = None + stabilizationMagnitude: float | None = None #: A SymbolicConstant specifying the time incrementation method to be used. Possible values #: are FIXED and AUTOMATIC. The default value is AUTOMATIC. @@ -85,15 +85,15 @@ class CoupledThermalElectricalStructuralStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of the suggested initial time increment or 10−5 times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default value is the total #: time period for the step. - maxInc: Optional[float] = None + maxInc: float | None = None #: A Float specifying the maximum temperature change to be allowed in an increment in a #: transient analysis. The default value is 0.0. @@ -146,7 +146,7 @@ class CoupledThermalElectricalStructuralStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -182,31 +182,31 @@ class CoupledThermalElectricalStructuralStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -215,19 +215,19 @@ class CoupledThermalElectricalStructuralStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -239,12 +239,12 @@ def __init__( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, deltmx: float = 0, cetol: float = 0, creepIntegration: Literal[C.EXPLICIT, C.IMPLICIT, C.NONE] = IMPLICIT, @@ -357,12 +357,12 @@ def setValues( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, deltmx: float = 0, cetol: float = 0, creepIntegration: Literal[C.EXPLICIT, C.IMPLICIT, C.NONE] = IMPLICIT, diff --git a/src/abaqus/Step/DirectCyclicStep.py b/src/abaqus/Step/DirectCyclicStep.py index 856e26d735..6ceb12f71d 100644 --- a/src/abaqus/Step/DirectCyclicStep.py +++ b/src/abaqus/Step/DirectCyclicStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -66,15 +66,15 @@ class DirectCyclicStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of the suggested initial time increment or 10−5 times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default value is the total #: time period for the step. - maxInc: Optional[float] = None + maxInc: float | None = None #: An Int specifying the maximum number of iterations in a step. The default value is 200. maxNumIterations: int = 200 @@ -153,7 +153,7 @@ class DirectCyclicStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -189,31 +189,31 @@ class DirectCyclicStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -222,19 +222,19 @@ class DirectCyclicStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -245,9 +245,9 @@ def __init__( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, maxNumIterations: int = 200, initialTerms: int = 11, maxTerms: int = 25, @@ -372,9 +372,9 @@ def setValues( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, maxNumIterations: int = 200, initialTerms: int = 11, maxTerms: int = 25, diff --git a/src/abaqus/Step/EmagTimeHarmonicStep.py b/src/abaqus/Step/EmagTimeHarmonicStep.py index a5fe2c6990..af797a1afb 100644 --- a/src/abaqus/Step/EmagTimeHarmonicStep.py +++ b/src/abaqus/Step/EmagTimeHarmonicStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -58,7 +58,7 @@ class EmagTimeHarmonicStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -94,31 +94,31 @@ class EmagTimeHarmonicStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -127,19 +127,19 @@ class EmagTimeHarmonicStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} #: A String specifying the repository key. name: str diff --git a/src/abaqus/Step/ExplicitDynamicsStep.py b/src/abaqus/Step/ExplicitDynamicsStep.py index 40b291fc28..4721c09d20 100644 --- a/src/abaqus/Step/ExplicitDynamicsStep.py +++ b/src/abaqus/Step/ExplicitDynamicsStep.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -73,7 +75,7 @@ class ExplicitDynamicsStep(AnalysisStep): #: None or a Float specifying the maximum time increment. If there is no upper limit, #: **maxIncrement** = None. This argument is required only when #: **timeIncrementationMethod** = AUTOMATIC_GLOBAL or AUTOMATIC_EBE. The default value is None. - maxIncrement: Optional[float] = None + maxIncrement: float | None = None #: A Float specifying the factor that is used to scale the time increment. This argument is #: required only when **timeIncrementationMethod** = AUTOMATIC_GLOBAL, AUTOMATIC_EBE, or @@ -89,7 +91,7 @@ class ExplicitDynamicsStep(AnalysisStep): #: None or a Float specifying the user-defined time increment. This argument is required #: only when **timeIncrementationMethod** = FIXED_USER_DEFINED_INC. The default value is None. - userDefinedInc: Optional[float] = None + userDefinedInc: float | None = None #: A Boolean specifying whether to use the "improved" (*improvedDtMethod* = ON) or #: "conservative" (*improvedDtMethod* = OFF) method to estimate the element stable time @@ -114,7 +116,7 @@ class ExplicitDynamicsStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -150,31 +152,31 @@ class ExplicitDynamicsStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -183,19 +185,19 @@ class ExplicitDynamicsStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -209,12 +211,12 @@ def __init__( timeIncrementationMethod: Literal[ C.FIXED_EBE, C.AUTOMATIC_GLOBAL, C.AUTOMATIC_EBE, C.FIXED_USER_DEFINED_INC ] = AUTOMATIC_GLOBAL, - maxIncrement: Optional[float] = None, + maxIncrement: float | None = None, scaleFactor: float = 1, massScaling: Union[MassScalingArray, Literal[C.PREVIOUS_STEP]] = PREVIOUS_STEP, linearBulkViscosity: float = 0, quadBulkViscosity: float = 1, - userDefinedInc: Optional[float] = None, + userDefinedInc: float | None = None, maintainAttributes: Boolean = False, improvedDtMethod: Boolean = ON, ): @@ -299,12 +301,12 @@ def setValues( timeIncrementationMethod: Literal[ C.FIXED_EBE, C.AUTOMATIC_GLOBAL, C.AUTOMATIC_EBE, C.FIXED_USER_DEFINED_INC ] = AUTOMATIC_GLOBAL, - maxIncrement: Optional[float] = None, + maxIncrement: float | None = None, scaleFactor: float = 1, massScaling: Union[MassScalingArray, Literal[C.PREVIOUS_STEP]] = PREVIOUS_STEP, linearBulkViscosity: float = 0, quadBulkViscosity: float = 1, - userDefinedInc: Optional[float] = None, + userDefinedInc: float | None = None, improvedDtMethod: Boolean = ON, ): """This method modifies the ExplicitDynamicsStep object. diff --git a/src/abaqus/Step/FrequencyStep.py b/src/abaqus/Step/FrequencyStep.py index 59dc45eb4a..bc171dcc7e 100644 --- a/src/abaqus/Step/FrequencyStep.py +++ b/src/abaqus/Step/FrequencyStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -60,7 +60,7 @@ class FrequencyStep(AnalysisStep): #: **eigensolver** = AMS: **projectDamping**, **acousticRangeFactor**, #: **substructureCutoffMultiplier**, **firstCutoffMultiplier**, **secondCutoffMultiplier**, #: **residualModeRegion**, **regionalModeDof**, and **limitSavedEigenvectorRegion**. - eigensolver: Optional[SymbolicConstant] = None + eigensolver: SymbolicConstant #: The SymbolicConstant ALL or an Int specifying the number of eigenvalues to be calculated #: or ALL. The default value is ALL. @@ -71,16 +71,16 @@ class FrequencyStep(AnalysisStep): #: None or a Float specifying the minimum frequency of interest in cycles per time. The #: default value is None. - minEigen: Optional[float] = None + minEigen: float | None = None #: None or a Float specifying the maximum frequency of interest in cycles per time. The #: default value is None. - maxEigen: Optional[float] = None + maxEigen: float | None = None #: None or an Int specifying the number of vectors used in the iteration. The default is #: the minimum of (2*n*, **n** + 8), where **n** is the number of eigenvalues requested. The #: default value is None. - vectors: Optional[int] = None + vectors: int | None = None #: An Int specifying the maximum number of iterations. The default value is 30. maxIterations: int = 30 @@ -107,7 +107,7 @@ class FrequencyStep(AnalysisStep): #: frequency-dependent springs and dashpots at zero frequency and will not consider the #: stiffness contributions from frequency-domain viscoelasticity in the step. The default #: value is None. - propertyEvaluationFrequency: Optional[float] = None + propertyEvaluationFrequency: float | None = None #: A Boolean specifying whether to include projection of viscous and structural damping #: operators during **AMS** eigenvalue extraction. Valid only when **eigenSolver** = AMS. The @@ -161,19 +161,19 @@ class FrequencyStep(AnalysisStep): #: None or a tuple of Strings specifying the name of a region for which residual modes are #: requested. The default value is None. - residualModeRegion: Optional[tuple] = None + residualModeRegion: tuple | None = None #: None or a tuple of Ints specifying the degree of freedom for which residual modes are #: requested. The default value is None. - residualModeDof: Optional[int] = None + residualModeDof: int | None = None #: None or a Region object specifying a region for which eigenvectors should be saved or #: the SymbolicConstant None representing the whole model. The default value is None. - limitSavedEigenvectorRegion: Optional[SymbolicConstant] = None + limitSavedEigenvectorRegion: SymbolicConstant #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -209,31 +209,31 @@ class FrequencyStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -242,19 +242,19 @@ class FrequencyStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -265,14 +265,14 @@ def __init__( numEigen: Literal[C.ALL] = ALL, description: str = "", shift: float = 0, - minEigen: Optional[float] = None, - maxEigen: Optional[float] = None, - vectors: Optional[int] = None, + minEigen: float | None = None, + maxEigen: float | None = None, + vectors: int | None = None, maxIterations: int = 30, blockSize: Literal[C.DEFAULT] = DEFAULT, maxBlocks: Literal[C.DEFAULT] = DEFAULT, normalization: Literal[C.MASS, C.DISPLACEMENT] = DISPLACEMENT, - propertyEvaluationFrequency: Optional[float] = None, + propertyEvaluationFrequency: float | None = None, projectDamping: Boolean = ON, acousticCoupling: Literal[C.AC_OFF, C.AC_ON, C.TIE, C.AC_PROJECTION] = AC_ON, acousticRangeFactor: float = 1, @@ -284,9 +284,9 @@ def __init__( substructureCutoffMultiplier: float = 5, firstCutoffMultiplier: float = 1, secondCutoffMultiplier: float = 1, - residualModeRegion: Optional[str] = None, - residualModeDof: Optional[str] = None, - limitSavedEigenvectorRegion: Optional[SymbolicConstant] = None, + residualModeRegion: str | None = None, + residualModeDof: str | None = None, + limitSavedEigenvectorRegion: SymbolicConstant | None = None, ): """This method creates a FrequencyStep object. @@ -413,14 +413,14 @@ def setValues( numEigen: Literal[C.ALL] = ALL, description: str = "", shift: float = 0, - minEigen: Optional[float] = None, - maxEigen: Optional[float] = None, - vectors: Optional[int] = None, + minEigen: float | None = None, + maxEigen: float | None = None, + vectors: int | None = None, maxIterations: int = 30, blockSize: Literal[C.DEFAULT] = DEFAULT, maxBlocks: Literal[C.DEFAULT] = DEFAULT, normalization: Literal[C.MASS, C.DISPLACEMENT] = DISPLACEMENT, - propertyEvaluationFrequency: Optional[float] = None, + propertyEvaluationFrequency: float | None = None, projectDamping: Boolean = ON, acousticCoupling: Literal[C.AC_OFF, C.AC_ON, C.TIE, C.AC_PROJECTION] = AC_ON, acousticRangeFactor: float = 1, @@ -431,9 +431,9 @@ def setValues( substructureCutoffMultiplier: float = 5, firstCutoffMultiplier: float = 1, secondCutoffMultiplier: float = 1, - residualModeRegion: Optional[str] = None, - residualModeDof: Optional[str] = None, - limitSavedEigenvectorRegion: Optional[SymbolicConstant] = None, + residualModeRegion: str | None = None, + residualModeDof: str | None = None, + limitSavedEigenvectorRegion: SymbolicConstant | None = None, ): """This method modifies the FrequencyStep object. diff --git a/src/abaqus/Step/GeostaticStep.py b/src/abaqus/Step/GeostaticStep.py index df72a9f26e..ca13ac4b64 100644 --- a/src/abaqus/Step/GeostaticStep.py +++ b/src/abaqus/Step/GeostaticStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -79,7 +79,7 @@ class GeostaticStep(AnalysisStep): #: None or a Float specifying the tolerance for maximum change of displacements. The #: default value is None. - utol: Optional[float] = None + utol: float | None = None #: A Float specifying the total time period. The default value is 1.0. Note: This parameter #: is ignored unless **timeIncrementationMethod** = AUTOMATIC. @@ -98,17 +98,17 @@ class GeostaticStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. Note: This parameter is ignored unless #: **timeIncrementationMethod** = AUTOMATIC. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of the suggested initial time increment or 10−5 times the total time period. Note: This #: parameter is ignored unless **timeIncrementationMethod** = AUTOMATIC. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default value is the total #: time period for the step. Note: This parameter is ignored unless #: **timeIncrementationMethod** = AUTOMATIC. - maxInc: Optional[float] = None + maxInc: float | None = None #: A String specifying the name of the previous step. The new step appears after this step #: in the list of analysis steps. @@ -119,7 +119,7 @@ class GeostaticStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -155,31 +155,31 @@ class GeostaticStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -188,19 +188,19 @@ class GeostaticStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -215,13 +215,13 @@ def __init__( solutionTechnique: Literal[C.QUASI_NEWTON, C.FULL_NEWTON] = FULL_NEWTON, reformKernel: int = 8, convertSDI: Literal[C.CONVERT_SDI_OFF, C.PROPAGATED, C.CONVERT_SDI_ON] = PROPAGATED, - utol: Optional[float] = None, + utol: float | None = None, timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, ): """This method creates a GeostaticStep object. @@ -309,12 +309,12 @@ def setValues( solutionTechnique: Literal[C.QUASI_NEWTON, C.FULL_NEWTON] = FULL_NEWTON, reformKernel: int = 8, convertSDI: Literal[C.CONVERT_SDI_OFF, C.PROPAGATED, C.CONVERT_SDI_ON] = PROPAGATED, - utol: Optional[float] = None, + utol: float | None = None, timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, ): """This method modifies the GeostaticStep object. diff --git a/src/abaqus/Step/HeatTransferStep.py b/src/abaqus/Step/HeatTransferStep.py index a7c204f594..07ec5c4437 100644 --- a/src/abaqus/Step/HeatTransferStep.py +++ b/src/abaqus/Step/HeatTransferStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -70,21 +70,21 @@ class HeatTransferStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of 0.8 times the initial time increment or 10−5 times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default value is the total #: time period for the step. - maxInc: Optional[float] = None + maxInc: float | None = None #: None or a Float specifying the temperature change rate (temperature per time) used to #: define steady state. When all nodal temperatures are changing at less than this rate, #: the solution terminates. The default value is None. Note: This parameter is ignored unless #: **response** = STEADY_STATE. - end: Optional[float] = None + end: float | None = None #: A Float specifying the maximum temperature change to be allowed in an increment during a #: transient heat transfer analysis. The default value is 0.0. @@ -133,7 +133,7 @@ class HeatTransferStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -141,6 +141,8 @@ class HeatTransferStep(AnalysisStep): #: A Boolean specifying whether the step has a mechanical procedure type. nonmechanical: Boolean = OFF + #: A SymbolicConstant specifying the Abaqus procedure. Possible values are: + #: #: - ANNEAL #: - BUCKLE #: - COMPLEX_FREQUENCY @@ -167,31 +169,31 @@ class HeatTransferStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: str = "" + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -200,19 +202,19 @@ class HeatTransferStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -224,10 +226,10 @@ def __init__( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, - end: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, + end: float | None = None, deltmx: float = 0, mxdem: float = 0, amplitude: Literal[C.STEP, C.RAMP] = STEP, @@ -331,10 +333,10 @@ def setValues( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, - end: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, + end: float | None = None, deltmx: float = 0, mxdem: float = 0, amplitude: Literal[C.STEP, C.RAMP] = STEP, diff --git a/src/abaqus/Step/ImplicitDynamicsStep.py b/src/abaqus/Step/ImplicitDynamicsStep.py index 639231e949..b6eb9cc461 100644 --- a/src/abaqus/Step/ImplicitDynamicsStep.py +++ b/src/abaqus/Step/ImplicitDynamicsStep.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -84,11 +86,11 @@ class ImplicitDynamicsStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of the suggested initial time increment or 10−5 times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: The SymbolicConstant DEFAULT or a Float specifying the maximum time increment allowed. maxInc: Union[SymbolicConstant, float, None] = None @@ -100,11 +102,11 @@ class ImplicitDynamicsStep(AnalysisStep): #: None or a Float specifying the half-increment residual tolerance to be used with the #: automatic time incrementation scheme. The default value is None. - haftol: Optional[float] = None + haftol: float | None = None #: None or a Float specifying the half-increment residual tolerance scale factor to be used #: with the automatic time incrementation scheme. The default value is None. - halfIncScaleFactor: Optional[float] = None + halfIncScaleFactor: float | None = None #: A Boolean specifying whether to suppress calculation of the half-increment residual. The #: default value is OFF. @@ -158,7 +160,7 @@ class ImplicitDynamicsStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -194,31 +196,31 @@ class ImplicitDynamicsStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -227,19 +229,19 @@ class ImplicitDynamicsStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -256,12 +258,12 @@ def __init__( adiabatic: Boolean = OFF, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, maxInc: Union[Literal[C.DEFAULT], float] = DEFAULT, hafTolMethod: Literal[C.ANALYSIS_PRODUCT_DEFAULT, C.VALUE, C.SCALE] = VALUE, - haftol: Optional[float] = None, - halfIncScaleFactor: Optional[float] = None, + haftol: float | None = None, + halfIncScaleFactor: float | None = None, nohaf: Boolean = OFF, amplitude: Literal[C.STEP, C.RAMP] = STEP, alpha: Union[Literal[C.DEFAULT], float] = DEFAULT, @@ -391,12 +393,12 @@ def setValues( adiabatic: Boolean = OFF, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, maxInc: Union[Literal[C.DEFAULT], float] = DEFAULT, hafTolMethod: Literal[C.ANALYSIS_PRODUCT_DEFAULT, C.VALUE, C.SCALE] = VALUE, - haftol: Optional[float] = None, - halfIncScaleFactor: Optional[float] = None, + haftol: float | None = None, + halfIncScaleFactor: float | None = None, nohaf: Boolean = OFF, amplitude: Literal[C.STEP, C.RAMP] = STEP, alpha: Union[Literal[C.DEFAULT], float] = DEFAULT, diff --git a/src/abaqus/Step/InitialStep.py b/src/abaqus/Step/InitialStep.py index 145b115c6e..24f58a0bdb 100644 --- a/src/abaqus/Step/InitialStep.py +++ b/src/abaqus/Step/InitialStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -37,7 +37,7 @@ class InitialStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -73,31 +73,31 @@ class InitialStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -106,16 +106,16 @@ class InitialStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} diff --git a/src/abaqus/Step/MassDiffusionStep.py b/src/abaqus/Step/MassDiffusionStep.py index 80e703c22f..1c3ac8c8b1 100644 --- a/src/abaqus/Step/MassDiffusionStep.py +++ b/src/abaqus/Step/MassDiffusionStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -68,15 +68,15 @@ class MassDiffusionStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of 0.8 times the initial time increment or 10−5 times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default value is the total #: time period for the step. - maxInc: Optional[float] = None + maxInc: float | None = None #: A SymbolicConstant specifying the time period to be analyzed in a transient analysis. #: Possible values are PERIOD and SS. The default value is PERIOD. @@ -109,7 +109,7 @@ class MassDiffusionStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -145,31 +145,31 @@ class MassDiffusionStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -178,19 +178,19 @@ class MassDiffusionStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -202,9 +202,9 @@ def __init__( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, end: Literal[C.SS, C.PERIOD] = PERIOD, dcmax: float = 0, amplitude: Literal[C.STEP, C.RAMP] = STEP, @@ -287,9 +287,9 @@ def setValues( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, end: Literal[C.SS, C.PERIOD] = PERIOD, dcmax: float = 0, amplitude: Literal[C.STEP, C.RAMP] = STEP, diff --git a/src/abaqus/Step/ModalDynamicsStep.py b/src/abaqus/Step/ModalDynamicsStep.py index ceade9246f..499fca60f2 100644 --- a/src/abaqus/Step/ModalDynamicsStep.py +++ b/src/abaqus/Step/ModalDynamicsStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -87,7 +87,7 @@ class ModalDynamicsStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -123,31 +123,31 @@ class ModalDynamicsStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -156,19 +156,19 @@ class ModalDynamicsStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -179,13 +179,13 @@ def __init__( continueAnalysis: Boolean = OFF, timePeriod: float = 1, incSize: float = 1, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, amplitude: Literal[C.STEP, C.RAMP] = STEP, maintainAttributes: Boolean = False, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, ): """This method creates a ModalDynamicsStep object. @@ -245,12 +245,12 @@ def setValues( continueAnalysis: Boolean = OFF, timePeriod: float = 1, incSize: float = 1, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, amplitude: Literal[C.STEP, C.RAMP] = STEP, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, ): """This method modifies the ModalDynamicsStep object. diff --git a/src/abaqus/Step/RandomResponseStep.py b/src/abaqus/Step/RandomResponseStep.py index d556681e4e..c5fcbda7b1 100644 --- a/src/abaqus/Step/RandomResponseStep.py +++ b/src/abaqus/Step/RandomResponseStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -93,7 +93,7 @@ class RandomResponseStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -129,31 +129,31 @@ class RandomResponseStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -162,19 +162,19 @@ class RandomResponseStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -184,13 +184,13 @@ def __init__( freq: RandomResponseFrequencyArray, description: str = "", scale: Literal[C.LOG, C.LINEAR] = LOG, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, - structuralDamping: Optional[StructuralDamping] = None, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, - structuralDampingByFrequency: Optional[StructuralDampingByFrequency] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, + structuralDamping: StructuralDamping | None = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, + structuralDampingByFrequency: StructuralDampingByFrequency | None = None, maintainAttributes: Boolean = False, ): """This method creates a RandomResponseStep object. @@ -248,13 +248,13 @@ def setValues( self, description: str = "", scale: Literal[C.LOG, C.LINEAR] = LOG, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, - structuralDamping: Optional[StructuralDamping] = None, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, - structuralDampingByFrequency: Optional[StructuralDampingByFrequency] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, + structuralDamping: StructuralDamping | None = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, + structuralDampingByFrequency: StructuralDampingByFrequency | None = None, ): """This method modifies the RandomResponseStep object. diff --git a/src/abaqus/Step/ResponseSpectrumStep.py b/src/abaqus/Step/ResponseSpectrumStep.py index 244a6c2239..f2060581d7 100644 --- a/src/abaqus/Step/ResponseSpectrumStep.py +++ b/src/abaqus/Step/ResponseSpectrumStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -104,7 +104,7 @@ class ResponseSpectrumStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -140,31 +140,31 @@ class ResponseSpectrumStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -173,19 +173,19 @@ class ResponseSpectrumStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -202,11 +202,11 @@ def __init__( C.SINGLE_DIRECTION, ] = SINGLE_DIRECTION, sum: Literal[C.DSC, C.NRL, C.CQC, C.TENP, C.GRP, C.ABS, C.SRSS] = ABS, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, maintainAttributes: Boolean = False, ): """This method creates a ResponseSpectrumStep object. @@ -272,11 +272,11 @@ def setValues( C.SINGLE_DIRECTION, ] = SINGLE_DIRECTION, sum: Literal[C.DSC, C.NRL, C.CQC, C.TENP, C.GRP, C.ABS, C.SRSS] = ABS, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, ): """This method modifies the ResponseSpectrumStep object. diff --git a/src/abaqus/Step/SoilsStep.py b/src/abaqus/Step/SoilsStep.py index 860a4cd960..e95faf0391 100644 --- a/src/abaqus/Step/SoilsStep.py +++ b/src/abaqus/Step/SoilsStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -76,7 +76,7 @@ class SoilsStep(AnalysisStep): #: A Float specifying the damping intensity of the automatic damping algorithm if the #: problem is expected to be unstable, and **stabilizationMethod** is not NONE. The default #: value is 2x10⁻⁴. - stabilizationMagnitude: Optional[float] = None + stabilizationMagnitude: float | None = None #: A Boolean specifying whether a creep response occurs during this step. The default value #: is ON. @@ -88,15 +88,15 @@ class SoilsStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of the suggested initial time increment or 10−5 times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default value is the total #: time period for the step. - maxInc: Optional[float] = None + maxInc: float | None = None #: An Int specifying the maximum number of increments in a step. The default value is 100. maxNumInc: int = 100 @@ -107,7 +107,7 @@ class SoilsStep(AnalysisStep): #: None or a Float specifying the maximum pore pressure change permitted in any increment #: (in pressure units) in a transient consolidation analysis. The default value is None. - utol: Optional[float] = None + utol: float | None = None #: A Float specifying the maximum allowable difference in the creep strain increment #: calculated from the creep strain rates at the beginning and end of the increment. The @@ -163,7 +163,7 @@ class SoilsStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -199,31 +199,31 @@ class SoilsStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -232,19 +232,19 @@ class SoilsStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -256,15 +256,15 @@ def __init__( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.NONE, C.DISSIPATED_ENERGY_FRACTION, C.DAMPING_FACTOR] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, creep: Boolean = ON, timeIncrementationMethod: Literal[C.FIXED, C.AUTOMATIC] = AUTOMATIC, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, maxNumInc: int = 100, end: Literal[C.SS, C.PERIOD] = PERIOD, - utol: Optional[float] = None, + utol: float | None = None, cetol: float = 0, amplitude: Literal[C.STEP, C.RAMP] = STEP, extrapolation: Literal[C.PARABOLIC, C.LINEAR] = LINEAR, @@ -389,15 +389,15 @@ def setValues( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.NONE, C.DISSIPATED_ENERGY_FRACTION, C.DAMPING_FACTOR] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, creep: Boolean = ON, timeIncrementationMethod: Literal[C.FIXED, C.AUTOMATIC] = AUTOMATIC, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, maxNumInc: int = 100, end: Literal[C.SS, C.PERIOD] = PERIOD, - utol: Optional[float] = None, + utol: float | None = None, cetol: float = 0, amplitude: Literal[C.STEP, C.RAMP] = STEP, extrapolation: Literal[C.PARABOLIC, C.LINEAR] = LINEAR, diff --git a/src/abaqus/Step/StaticLinearPerturbationStep.py b/src/abaqus/Step/StaticLinearPerturbationStep.py index 1496c7d808..77ae8f8fa0 100644 --- a/src/abaqus/Step/StaticLinearPerturbationStep.py +++ b/src/abaqus/Step/StaticLinearPerturbationStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -66,7 +66,7 @@ class StaticLinearPerturbationStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -102,31 +102,31 @@ class StaticLinearPerturbationStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -135,19 +135,19 @@ class StaticLinearPerturbationStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( diff --git a/src/abaqus/Step/StaticRiksStep.py b/src/abaqus/Step/StaticRiksStep.py index b35f22d5c9..dfb88fad80 100644 --- a/src/abaqus/Step/StaticRiksStep.py +++ b/src/abaqus/Step/StaticRiksStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -62,7 +62,7 @@ class StaticRiksStep(AnalysisStep): #: None or a Float specifying the maximum value of the load proportionality factor. The #: default value is None. - maxLPF: Optional[float] = None + maxLPF: float | None = None #: A Boolean specifying whether to monitor the finishing displacement value at a node. The #: default value is OFF. @@ -90,16 +90,16 @@ class StaticRiksStep(AnalysisStep): #: A Float specifying the initial load proportionality factor. The default value is the #: total load proportionality factor for the step. - initialArcInc: Optional[float] = None + initialArcInc: float | None = None #: A Float specifying the minimum arc length increment allowed. The default value is the #: smaller of the suggested initial load proportionality factor or 10−5 times the total #: load proportionality factor for the step. - minArcInc: Optional[float] = None + minArcInc: float | None = None #: A Float specifying the maximum arc length increment allowed. The default value is the #: total load proportionality factor for the step. - maxArcInc: Optional[float] = None + maxArcInc: float | None = None #: A SymbolicConstant specifying the type of matrix storage. Possible values are SYMMETRIC, #: UNSYMMETRIC, and SOLVER_DEFAULT. The default value is SOLVER_DEFAULT. @@ -143,7 +143,7 @@ class StaticRiksStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -179,31 +179,31 @@ class StaticRiksStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -212,19 +212,19 @@ class StaticRiksStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -234,17 +234,17 @@ def __init__( description: str = "", nlgeom: Boolean = OFF, adiabatic: Boolean = OFF, - maxLPF: Optional[float] = None, + maxLPF: float | None = None, nodeOn: Boolean = OFF, maximumDisplacement: float = 0, dof: int = 0, - region: Optional[Region] = None, + region: Region | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, totalArcLength: float = 1, - initialArcInc: Optional[float] = None, - minArcInc: Optional[float] = None, - maxArcInc: Optional[float] = None, + initialArcInc: float | None = None, + minArcInc: float | None = None, + maxArcInc: float | None = None, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, extrapolation: Literal[C.PARABOLIC, C.NONE, C.LINEAR] = LINEAR, fullyPlastic: str = "", @@ -353,17 +353,17 @@ def setValues( description: str = "", nlgeom: Boolean = OFF, adiabatic: Boolean = OFF, - maxLPF: Optional[float] = None, + maxLPF: float | None = None, nodeOn: Boolean = OFF, maximumDisplacement: float = 0, dof: int = 0, - region: Optional[Region] = None, + region: Region | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, totalArcLength: float = 1, - initialArcInc: Optional[float] = None, - minArcInc: Optional[float] = None, - maxArcInc: Optional[float] = None, + initialArcInc: float | None = None, + minArcInc: float | None = None, + maxArcInc: float | None = None, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, extrapolation: Literal[C.PARABOLIC, C.NONE, C.LINEAR] = LINEAR, fullyPlastic: str = "", diff --git a/src/abaqus/Step/StaticStep.py b/src/abaqus/Step/StaticStep.py index 37357802d4..a580d5ee85 100644 --- a/src/abaqus/Step/StaticStep.py +++ b/src/abaqus/Step/StaticStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -68,7 +68,7 @@ class StaticStep(AnalysisStep): #: A Float specifying the damping intensity of the automatic damping algorithm if the #: problem is expected to be unstable, and **stabilizationMethod** is not NONE. The default #: value is 2x10⁻⁴. - stabilizationMagnitude: Optional[float] = None + stabilizationMagnitude: float | None = None #: A Boolean specifying whether to perform an adiabatic stress analysis. The default value #: is OFF. @@ -83,15 +83,15 @@ class StaticStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of the suggested initial time increment or 10⁻⁵ times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default value is the total #: time period for the step. - maxInc: Optional[float] = None + maxInc: float | None = None #: A SymbolicConstant specifying the type of solver. Possible values are DIRECT and #: ITERATIVE. The default value is DIRECT. @@ -157,7 +157,7 @@ class StaticStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -193,31 +193,31 @@ class StaticStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -226,19 +226,19 @@ class StaticStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -249,13 +249,13 @@ def __init__( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, adiabatic: Boolean = OFF, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, matrixSolver: Literal[C.DIRECT, C.ITERATIVE] = DIRECT, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, amplitude: Literal[C.STEP, C.RAMP] = RAMP, @@ -380,13 +380,13 @@ def setValues( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, adiabatic: Boolean = OFF, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, matrixSolver: Literal[C.DIRECT, C.ITERATIVE] = DIRECT, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, amplitude: Literal[C.STEP, C.RAMP] = RAMP, diff --git a/src/abaqus/Step/SteadyStateDirectStep.py b/src/abaqus/Step/SteadyStateDirectStep.py index 7b5db49c34..72f2a488c5 100644 --- a/src/abaqus/Step/SteadyStateDirectStep.py +++ b/src/abaqus/Step/SteadyStateDirectStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -86,7 +86,7 @@ class SteadyStateDirectStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -122,31 +122,31 @@ class SteadyStateDirectStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -155,19 +155,19 @@ class SteadyStateDirectStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( diff --git a/src/abaqus/Step/SteadyStateModalStep.py b/src/abaqus/Step/SteadyStateModalStep.py index 18bf95e455..ac97debabc 100644 --- a/src/abaqus/Step/SteadyStateModalStep.py +++ b/src/abaqus/Step/SteadyStateModalStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -103,7 +103,7 @@ class SteadyStateModalStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -139,31 +139,31 @@ class SteadyStateModalStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -172,19 +172,19 @@ class SteadyStateModalStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -194,13 +194,13 @@ def __init__( frequencyRange: SteadyStateModalFrequencyArray, description: str = "", scale: Literal[C.LINEAR, C.LOGARITHMIC] = LOGARITHMIC, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, - structuralDamping: Optional[StructuralDamping] = None, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, - structuralDampingByFrequency: Optional[StructuralDampingByFrequency] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, + structuralDamping: StructuralDamping | None = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, + structuralDampingByFrequency: StructuralDampingByFrequency | None = None, maintainAttributes: Boolean = False, subdivideUsingEigenfrequencies: Boolean = ON, ): @@ -262,13 +262,13 @@ def setValues( self, description: str = "", scale: Literal[C.LINEAR, C.LOGARITHMIC] = LOGARITHMIC, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, - structuralDamping: Optional[StructuralDamping] = None, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, - structuralDampingByFrequency: Optional[StructuralDampingByFrequency] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, + structuralDamping: StructuralDamping | None = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, + structuralDampingByFrequency: StructuralDampingByFrequency | None = None, subdivideUsingEigenfrequencies: Boolean = ON, ): """This method modifies the SteadyStateModalStep object. diff --git a/src/abaqus/Step/SteadyStateSubspaceStep.py b/src/abaqus/Step/SteadyStateSubspaceStep.py index dc5fe06ae0..1ab3e66e83 100644 --- a/src/abaqus/Step/SteadyStateSubspaceStep.py +++ b/src/abaqus/Step/SteadyStateSubspaceStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -101,7 +101,7 @@ class SteadyStateSubspaceStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -137,31 +137,31 @@ class SteadyStateSubspaceStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -170,19 +170,19 @@ class SteadyStateSubspaceStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( diff --git a/src/abaqus/Step/StepBase.py b/src/abaqus/Step/StepBase.py index e715c81d22..165fac6ada 100644 --- a/src/abaqus/Step/StepBase.py +++ b/src/abaqus/Step/StepBase.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -37,7 +37,7 @@ class StepBase: #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -73,31 +73,31 @@ class StepBase: #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -106,22 +106,22 @@ class StepBase: solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} #: A repository of ActivateElements objects. - activateElements: Dict[str, ActivateElements] = {} + activateElements: dict[str, ActivateElements] = {} @abaqus_method_doc def resume(self): diff --git a/src/abaqus/Step/StepModel.py b/src/abaqus/Step/StepModel.py index 44aa6970fa..667ccff1c5 100644 --- a/src/abaqus/Step/StepModel.py +++ b/src/abaqus/Step/StepModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -124,7 +126,7 @@ def AnnealStep( name: str, previous: str, description: str = "", - refTemp: Optional[float] = None, + refTemp: float | None = None, maintainAttributes: Boolean = False, ) -> AnnealStep: """This method creates an AnnealStep object. @@ -166,9 +168,9 @@ def BuckleStep( numEigen: int, description: str = "", eigensolver: Literal[C.LANCZOS, C.SUBSPACE] = SUBSPACE, - minEigen: Optional[float] = None, - maxEigen: Optional[float] = None, - vectors: Optional[int] = None, + minEigen: float | None = None, + maxEigen: float | None = None, + vectors: int | None = None, maxIterations: int = 30, blockSize: Literal[C.DEFAULT] = DEFAULT, maxBlocks: Literal[C.LANCZOS, C.DEFAULT] = DEFAULT, @@ -250,13 +252,13 @@ def ComplexFrequencyStep( previous: str, numEigen: Literal[C.ALL] = ALL, description: str = "", - shift: Optional[float] = None, + shift: float | None = None, frictionDamping: Boolean = OFF, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, maintainAttributes: Boolean = False, - minEigen: Optional[float] = None, - maxEigen: Optional[float] = None, - propertyEvaluationFrequency: Optional[float] = None, + minEigen: float | None = None, + maxEigen: float | None = None, + propertyEvaluationFrequency: float | None = None, ) -> ComplexFrequencyStep: """This method creates a ComplexFrequencyStep object. @@ -333,12 +335,12 @@ def CoupledTempDisplacementStep( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, deltmx: float = 0, cetol: float = 0, creepIntegration: Literal[C.EXPLICIT, C.IMPLICIT, C.NONE] = IMPLICIT, @@ -479,12 +481,12 @@ def CoupledThermalElectricalStructuralStep( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, deltmx: float = 0, cetol: float = 0, creepIntegration: Literal[C.EXPLICIT, C.IMPLICIT, C.NONE] = IMPLICIT, @@ -620,9 +622,9 @@ def CoupledThermalElectricStep( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, end: Literal[C.SS, C.PERIOD] = PERIOD, deltmx: float = 0, mxdem: float = 0, @@ -735,9 +737,9 @@ def DirectCyclicStep( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, maxNumIterations: int = 200, initialTerms: int = 11, maxTerms: int = 25, @@ -931,12 +933,12 @@ def ExplicitDynamicsStep( timeIncrementationMethod: Literal[ C.FIXED_EBE, C.AUTOMATIC_GLOBAL, C.AUTOMATIC_EBE, C.FIXED_USER_DEFINED_INC ] = AUTOMATIC_GLOBAL, - maxIncrement: Optional[float] = None, + maxIncrement: float | None = None, scaleFactor: float = 1, massScaling: Union[MassScalingArray, Literal[C.PREVIOUS_STEP]] = PREVIOUS_STEP, linearBulkViscosity: float = 0, quadBulkViscosity: float = 1, - userDefinedInc: Optional[float] = None, + userDefinedInc: float | None = None, maintainAttributes: Boolean = False, improvedDtMethod: Boolean = ON, ) -> ExplicitDynamicsStep: @@ -1033,14 +1035,14 @@ def FrequencyStep( numEigen: Literal[C.ALL] = ALL, description: str = "", shift: float = 0, - minEigen: Optional[float] = None, - maxEigen: Optional[float] = None, - vectors: Optional[int] = None, + minEigen: float | None = None, + maxEigen: float | None = None, + vectors: int | None = None, maxIterations: int = 30, blockSize: Literal[C.DEFAULT] = DEFAULT, maxBlocks: Literal[C.DEFAULT] = DEFAULT, normalization: Literal[C.MASS, C.DISPLACEMENT] = DISPLACEMENT, - propertyEvaluationFrequency: Optional[float] = None, + propertyEvaluationFrequency: float | None = None, projectDamping: Boolean = ON, acousticCoupling: Literal[C.AC_OFF, C.AC_ON, C.TIE, C.AC_PROJECTION] = AC_ON, acousticRangeFactor: float = 1, @@ -1052,9 +1054,9 @@ def FrequencyStep( substructureCutoffMultiplier: float = 5, firstCutoffMultiplier: float = 1, secondCutoffMultiplier: float = 1, - residualModeRegion: Optional[str] = None, - residualModeDof: Optional[str] = None, - limitSavedEigenvectorRegion: Optional[SymbolicConstant] = None, + residualModeRegion: str | None = None, + residualModeDof: str | None = None, + limitSavedEigenvectorRegion: SymbolicConstant | None = None, ) -> FrequencyStep: """This method creates a FrequencyStep object. @@ -1214,13 +1216,13 @@ def GeostaticStep( solutionTechnique: Literal[C.QUASI_NEWTON, C.FULL_NEWTON] = FULL_NEWTON, reformKernel: int = 8, convertSDI: Literal[C.CONVERT_SDI_OFF, C.PROPAGATED, C.CONVERT_SDI_ON] = PROPAGATED, - utol: Optional[float] = None, + utol: float | None = None, timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, ) -> GeostaticStep: """This method creates a GeostaticStep object. @@ -1323,10 +1325,10 @@ def HeatTransferStep( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, - end: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, + end: float | None = None, deltmx: float = 0, mxdem: float = 0, amplitude: Literal[C.STEP, C.RAMP] = STEP, @@ -1456,12 +1458,12 @@ def ImplicitDynamicsStep( adiabatic: Boolean = OFF, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, maxInc: Union[Literal[C.DEFAULT], float] = DEFAULT, hafTolMethod: Literal[C.ANALYSIS_PRODUCT_DEFAULT, C.VALUE, C.SCALE] = VALUE, - haftol: Optional[float] = None, - halfIncScaleFactor: Optional[float] = None, + haftol: float | None = None, + halfIncScaleFactor: float | None = None, nohaf: Boolean = OFF, amplitude: Literal[C.STEP, C.RAMP] = STEP, alpha: Union[Literal[C.DEFAULT], float] = DEFAULT, @@ -1612,9 +1614,9 @@ def MassDiffusionStep( timePeriod: float = 1, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, end: Literal[C.SS, C.PERIOD] = PERIOD, dcmax: float = 0, amplitude: Literal[C.STEP, C.RAMP] = STEP, @@ -1712,13 +1714,13 @@ def ModalDynamicsStep( continueAnalysis: Boolean = OFF, timePeriod: float = 1, incSize: float = 1, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, amplitude: Literal[C.STEP, C.RAMP] = STEP, maintainAttributes: Boolean = False, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, ) -> ModalDynamicsStep: """This method creates a ModalDynamicsStep object. @@ -1790,13 +1792,13 @@ def RandomResponseStep( freq: RandomResponseFrequencyArray, description: str = "", scale: Literal[C.LOG, C.LINEAR] = LOG, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, - structuralDamping: Optional[StructuralDamping] = None, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, - structuralDampingByFrequency: Optional[StructuralDampingByFrequency] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, + structuralDamping: StructuralDamping | None = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, + structuralDampingByFrequency: StructuralDampingByFrequency | None = None, maintainAttributes: Boolean = False, ) -> RandomResponseStep: """This method creates a RandomResponseStep object. @@ -1875,11 +1877,11 @@ def ResponseSpectrumStep( C.SINGLE_DIRECTION, ] = SINGLE_DIRECTION, sum: Literal[C.DSC, C.NRL, C.CQC, C.TENP, C.GRP, C.ABS, C.SRSS] = ABS, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, maintainAttributes: Boolean = False, ) -> ResponseSpectrumStep: """This method creates a ResponseSpectrumStep object. @@ -1953,16 +1955,16 @@ def SoilsStep( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.NONE, C.DISSIPATED_ENERGY_FRACTION, C.DAMPING_FACTOR] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, creep: Boolean = ON, timeIncrementationMethod: Literal[C.FIXED, C.AUTOMATIC] = AUTOMATIC, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, maxNumInc: int = 100, - end: Optional[Literal[C.SS, C.PERIOD]] = PERIOD, - utol: Optional[float] = None, - cetol: Optional[float] = 0, + end: Literal[C.SS, C.PERIOD] | None = PERIOD, + utol: float | None = None, + cetol: float | None = 0, amplitude: Literal[C.STEP, C.RAMP] = STEP, extrapolation: Literal[C.PARABOLIC, C.LINEAR] = LINEAR, matrixSolver: Literal[C.ITERATIVE, C.DIRECT] = DIRECT, @@ -2157,17 +2159,17 @@ def StaticRiksStep( description: str = "", nlgeom: Boolean = OFF, adiabatic: Boolean = OFF, - maxLPF: Optional[float] = None, + maxLPF: float | None = None, nodeOn: Boolean = OFF, maximumDisplacement: float = 0, dof: int = 0, - region: Optional[Region] = None, + region: Region | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, totalArcLength: float = 1, - initialArcInc: Optional[float] = None, - minArcInc: Optional[float] = None, - maxArcInc: Optional[float] = None, + initialArcInc: float | None = None, + minArcInc: float | None = None, + maxArcInc: float | None = None, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, extrapolation: Literal[C.PARABOLIC, C.NONE, C.LINEAR] = LINEAR, fullyPlastic: str = "", @@ -2300,13 +2302,13 @@ def StaticStep( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, adiabatic: Boolean = OFF, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, maxNumInc: int = 100, - initialInc: Optional[float] = None, - minInc: Optional[float] = None, - maxInc: Optional[float] = None, + initialInc: float | None = None, + minInc: float | None = None, + maxInc: float | None = None, matrixSolver: Literal[C.DIRECT, C.ITERATIVE] = DIRECT, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, amplitude: Literal[C.STEP, C.RAMP] = RAMP, @@ -2527,13 +2529,13 @@ def SteadyStateModalStep( frequencyRange: SteadyStateModalFrequencyArray, description: str = "", scale: Literal[C.LINEAR, C.LOGARITHMIC] = LOGARITHMIC, - directDamping: Optional[DirectDamping] = None, - compositeDamping: Optional[CompositeDamping] = None, - rayleighDamping: Optional[RayleighDamping] = None, - structuralDamping: Optional[StructuralDamping] = None, - directDampingByFrequency: Optional[DirectDampingByFrequency] = None, - rayleighDampingByFrequency: Optional[RayleighDampingByFrequency] = None, - structuralDampingByFrequency: Optional[StructuralDampingByFrequency] = None, + directDamping: DirectDamping | None = None, + compositeDamping: CompositeDamping | None = None, + rayleighDamping: RayleighDamping | None = None, + structuralDamping: StructuralDamping | None = None, + directDampingByFrequency: DirectDampingByFrequency | None = None, + rayleighDampingByFrequency: RayleighDampingByFrequency | None = None, + structuralDampingByFrequency: StructuralDampingByFrequency | None = None, maintainAttributes: Boolean = False, subdivideUsingEigenfrequencies: Boolean = ON, ) -> SteadyStateModalStep: @@ -2768,7 +2770,7 @@ def SubstructureGenerateStep( substructureIdentifier: int, description: str = "", recoveryMatrix: Literal[C.WHOLE_MODEL, C.REGION, C.NONE] = WHOLE_MODEL, - recoveryRegion: Optional[Region] = None, + recoveryRegion: Region | None = None, computeGravityLoadVectors: Boolean = False, computeReducedMassMatrix: Boolean = False, computeReducedStructuralDampingMatrix: Boolean = False, @@ -2776,8 +2778,8 @@ def SubstructureGenerateStep( evaluateFrequencyDependentProperties: Boolean = False, frequency: float = 0, retainedEigenmodesMethod: Literal[C.MODE_RANGE, C.FREQUENCY_RANGE, C.NONE] = NONE, - modeRange: Optional[SubstructureGenerateModesArray] = None, - frequencyRange: Optional[SubstructureGenerateFrequencyArray] = None, + modeRange: SubstructureGenerateModesArray | None = None, + frequencyRange: SubstructureGenerateFrequencyArray | None = None, globalDampingField: Literal[C.ACOUSTIC, C.ALL, C.MECHANICAL, C.NONE] = NONE, alphaDampingRatio: float = 0, betaDampingRatio: float = 0, @@ -2896,9 +2898,9 @@ def TempDisplacementDynamicsStep( timeIncrementationMethod: Literal[ C.FIXED_EBE, C.AUTOMATIC_GLOBAL, C.AUTOMATIC_EBE, C.FIXED_USER_DEFINED_INC ] = AUTOMATIC_GLOBAL, - maxIncrement: Optional[float] = None, + maxIncrement: float | None = None, scaleFactor: float = 1, - userDefinedInc: Optional[float] = None, + userDefinedInc: float | None = None, massScaling: Union[MassScalingArray, Literal[C.PREVIOUS_STEP]] = PREVIOUS_STEP, linearBulkViscosity: float = 0, quadBulkViscosity: float = 1, @@ -2991,13 +2993,13 @@ def ViscoStep( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, matrixSolver: Literal[C.DIRECT, C.ITERATIVE] = DIRECT, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, - initialInc: Optional[float] = None, + initialInc: float | None = None, maxNumInc: int = 100, - minInc: Optional[float] = None, + minInc: float | None = None, maxInc: float = 1, integration: Literal[C.EXPLICIT_ONLY, C.IMPLICIT_EXPLICIT] = IMPLICIT_EXPLICIT, cetol: float = 0, diff --git a/src/abaqus/Step/SubspaceDynamicsStep.py b/src/abaqus/Step/SubspaceDynamicsStep.py index 47255b62a1..e39ad49c05 100644 --- a/src/abaqus/Step/SubspaceDynamicsStep.py +++ b/src/abaqus/Step/SubspaceDynamicsStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -74,7 +74,7 @@ class SubspaceDynamicsStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -110,31 +110,31 @@ class SubspaceDynamicsStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -143,19 +143,19 @@ class SubspaceDynamicsStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( diff --git a/src/abaqus/Step/SubstructureGenerateStep.py b/src/abaqus/Step/SubstructureGenerateStep.py index 0712787b98..6cae406380 100644 --- a/src/abaqus/Step/SubstructureGenerateStep.py +++ b/src/abaqus/Step/SubstructureGenerateStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -116,7 +116,7 @@ class SubstructureGenerateStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -152,31 +152,31 @@ class SubstructureGenerateStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -185,19 +185,19 @@ class SubstructureGenerateStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -207,7 +207,7 @@ def __init__( substructureIdentifier: int, description: str = "", recoveryMatrix: Literal[C.WHOLE_MODEL, C.REGION, C.NONE] = WHOLE_MODEL, - recoveryRegion: Optional[Region] = None, + recoveryRegion: Region | None = None, computeGravityLoadVectors: Boolean = False, computeReducedMassMatrix: Boolean = False, computeReducedStructuralDampingMatrix: Boolean = False, @@ -215,8 +215,8 @@ def __init__( evaluateFrequencyDependentProperties: Boolean = False, frequency: float = 0, retainedEigenmodesMethod: Literal[C.MODE_RANGE, C.FREQUENCY_RANGE, C.NONE] = NONE, - modeRange: Optional[SubstructureGenerateModesArray] = None, - frequencyRange: Optional[SubstructureGenerateFrequencyArray] = None, + modeRange: SubstructureGenerateModesArray | None = None, + frequencyRange: SubstructureGenerateFrequencyArray | None = None, globalDampingField: Literal[C.ACOUSTIC, C.ALL, C.MECHANICAL, C.NONE] = NONE, alphaDampingRatio: float = 0, betaDampingRatio: float = 0, @@ -310,7 +310,7 @@ def setValues( self, description: str = "", recoveryMatrix: Literal[C.WHOLE_MODEL, C.REGION, C.NONE] = WHOLE_MODEL, - recoveryRegion: Optional[Region] = None, + recoveryRegion: Region | None = None, computeGravityLoadVectors: Boolean = False, computeReducedMassMatrix: Boolean = False, computeReducedStructuralDampingMatrix: Boolean = False, @@ -318,8 +318,8 @@ def setValues( evaluateFrequencyDependentProperties: Boolean = False, frequency: float = 0, retainedEigenmodesMethod: Literal[C.MODE_RANGE, C.FREQUENCY_RANGE, C.NONE] = NONE, - modeRange: Optional[SubstructureGenerateModesArray] = None, - frequencyRange: Optional[SubstructureGenerateFrequencyArray] = None, + modeRange: SubstructureGenerateModesArray | None = None, + frequencyRange: SubstructureGenerateFrequencyArray | None = None, globalDampingField: Literal[C.ACOUSTIC, C.ALL, C.MECHANICAL, C.NONE] = NONE, alphaDampingRatio: float = 0, betaDampingRatio: float = 0, diff --git a/src/abaqus/Step/TempDisplacementDynamicsStep.py b/src/abaqus/Step/TempDisplacementDynamicsStep.py index c69a4f97b6..0184cd1851 100644 --- a/src/abaqus/Step/TempDisplacementDynamicsStep.py +++ b/src/abaqus/Step/TempDisplacementDynamicsStep.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Union +from __future__ import annotations + +from typing import Union from typing_extensions import Literal @@ -68,7 +70,7 @@ class TempDisplacementDynamicsStep(AnalysisStep): #: None or a Float specifying the maximum time increment allowed. If there is no upper #: limit, **maxIncrement** = None. The default value is None. - maxIncrement: Optional[float] = None + maxIncrement: float | None = None #: A Float specifying the factor that is used to scale the time increment. This argument is #: required only when **timeIncrementationMethod** = AUTOMATIC_GLOBAL, AUTOMATIC_EBE, or @@ -76,7 +78,7 @@ class TempDisplacementDynamicsStep(AnalysisStep): scaleFactor: float = 1 #: None or a Float specifying the user-defined time increment. The default value is None. - userDefinedInc: Optional[float] = None + userDefinedInc: float | None = None #: A Float specifying the linear bulk viscosity parameter, b1b1. The default value is 0.06. linearBulkViscosity: float = 0 @@ -108,7 +110,7 @@ class TempDisplacementDynamicsStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -144,31 +146,31 @@ class TempDisplacementDynamicsStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -177,19 +179,19 @@ class TempDisplacementDynamicsStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -202,9 +204,9 @@ def __init__( timeIncrementationMethod: Literal[ C.FIXED_EBE, C.AUTOMATIC_GLOBAL, C.AUTOMATIC_EBE, C.FIXED_USER_DEFINED_INC ] = AUTOMATIC_GLOBAL, - maxIncrement: Optional[float] = None, + maxIncrement: float | None = None, scaleFactor: float = 1, - userDefinedInc: Optional[float] = None, + userDefinedInc: float | None = None, massScaling: Union[MassScalingArray, Literal[C.PREVIOUS_STEP]] = PREVIOUS_STEP, linearBulkViscosity: float = 0, quadBulkViscosity: float = 1, @@ -286,9 +288,9 @@ def setValues( timeIncrementationMethod: Literal[ C.FIXED_EBE, C.AUTOMATIC_GLOBAL, C.AUTOMATIC_EBE, C.FIXED_USER_DEFINED_INC ] = AUTOMATIC_GLOBAL, - maxIncrement: Optional[float] = None, + maxIncrement: float | None = None, scaleFactor: float = 1, - userDefinedInc: Optional[float] = None, + userDefinedInc: float | None = None, massScaling: Union[MassScalingArray, Literal[C.PREVIOUS_STEP]] = PREVIOUS_STEP, linearBulkViscosity: float = 0, quadBulkViscosity: float = 1, diff --git a/src/abaqus/Step/ViscoStep.py b/src/abaqus/Step/ViscoStep.py index 1a5d27f1b9..9e60555b2d 100644 --- a/src/abaqus/Step/ViscoStep.py +++ b/src/abaqus/Step/ViscoStep.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from typing_extensions import Literal @@ -70,7 +70,7 @@ class ViscoStep(AnalysisStep): #: A Float specifying the damping intensity of the automatic damping algorithm if the #: problem is expected to be unstable, and **stabilizationMethod** is not NONE. The default #: value is 2x10⁻⁴. - stabilizationMagnitude: Optional[float] = None + stabilizationMagnitude: float | None = None #: A SymbolicConstant specifying the time incrementation method to be used. Possible values #: are FIXED and AUTOMATIC. The default value is AUTOMATIC. @@ -86,14 +86,14 @@ class ViscoStep(AnalysisStep): #: A Float specifying the initial time increment. The default value is the total time #: period for the step. - initialInc: Optional[float] = None + initialInc: float | None = None #: An Int specifying the maximum number of increments in a step. The default value is 100. maxNumInc: int = 100 #: A Float specifying the minimum time increment allowed. The default value is the smaller #: of the suggested initial time increment or 10−5 times the total time period. - minInc: Optional[float] = None + minInc: float | None = None #: A Float specifying the maximum time increment allowed. The default is the total time #: period for the step. The default value is 1.0. @@ -150,7 +150,7 @@ class ViscoStep(AnalysisStep): #: A SymbolicConstant specifying whether the step has an explicit procedure type #: (*procedureType* = ANNEAL, DYNAMIC_EXPLICIT, or DYNAMIC_TEMP_DISPLACEMENT). - explicit: Optional[SymbolicConstant] = None + explicit: SymbolicConstant #: A Boolean specifying whether the step has a perturbation procedure type. perturbation: Boolean = OFF @@ -186,31 +186,31 @@ class ViscoStep(AnalysisStep): #: - STEADY_STATE_MODAL #: - STEADY_STATE_SUBSPACE #: - VISCO - procedureType: Optional[SymbolicConstant] = None + procedureType: SymbolicConstant #: A Boolean specifying whether the step is suppressed or not. The default value is OFF. suppressed: Boolean = OFF #: A repository of FieldOutputRequestState objects. - fieldOutputRequestState: Dict[str, FieldOutputRequestState] = {} + fieldOutputRequestState: dict[str, FieldOutputRequestState] = {} #: A repository of HistoryOutputRequestState objects. - historyOutputRequestState: Dict[str, HistoryOutputRequestState] = {} + historyOutputRequestState: dict[str, HistoryOutputRequestState] = {} #: A DiagnosticPrint object. diagnosticPrint: DiagnosticPrint = DiagnosticPrint() #: A Monitor object. - monitor: Optional[Monitor] = None + monitor: Monitor | None = None #: A Restart object. restart: Restart = Restart() #: A repository of AdaptiveMeshConstraintState objects. - adaptiveMeshConstraintStates: Dict[str, AdaptiveMeshConstraintState] = {} + adaptiveMeshConstraintStates: dict[str, AdaptiveMeshConstraintState] = {} #: A repository of AdaptiveMeshDomain objects. - adaptiveMeshDomains: Dict[str, AdaptiveMeshDomain] = {} + adaptiveMeshDomains: dict[str, AdaptiveMeshDomain] = {} #: A Control object. control: Control = Control() @@ -219,19 +219,19 @@ class ViscoStep(AnalysisStep): solverControl: SolverControl = SolverControl() #: A repository of BoundaryConditionState objects. - boundaryConditionStates: Dict[str, BoundaryConditionState] = {} + boundaryConditionStates: dict[str, BoundaryConditionState] = {} #: A repository of InteractionState objects. - interactionStates: Optional[int] = None + interactionStates: int | None = None #: A repository of LoadState objects. - loadStates: Dict[str, LoadState] = {} + loadStates: dict[str, LoadState] = {} #: A repository of LoadCase objects. - loadCases: Dict[str, LoadCase] = {} + loadCases: dict[str, LoadCase] = {} #: A repository of PredefinedFieldState objects. - predefinedFieldStates: Dict[str, PredefinedFieldState] = {} + predefinedFieldStates: dict[str, PredefinedFieldState] = {} @abaqus_method_doc def __init__( @@ -242,13 +242,13 @@ def __init__( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, matrixSolver: Literal[C.DIRECT, C.ITERATIVE] = DIRECT, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, - initialInc: Optional[float] = None, + initialInc: float | None = None, maxNumInc: int = 100, - minInc: Optional[float] = None, + minInc: float | None = None, maxInc: float = 1, integration: Literal[C.EXPLICIT_ONLY, C.IMPLICIT_EXPLICIT] = IMPLICIT_EXPLICIT, cetol: float = 0, @@ -364,13 +364,13 @@ def setValues( timePeriod: float = 1, nlgeom: Boolean = OFF, stabilizationMethod: Literal[C.DAMPING_FACTOR, C.DISSIPATED_ENERGY_FRACTION, C.NONE] = NONE, - stabilizationMagnitude: Optional[float] = None, + stabilizationMagnitude: float | None = None, timeIncrementationMethod: Literal[C.AUTOMATIC, C.FIXED] = AUTOMATIC, matrixSolver: Literal[C.DIRECT, C.ITERATIVE] = DIRECT, matrixStorage: Literal[C.SYMMETRIC, C.SOLVER_DEFAULT, C.UNSYMMETRIC] = SOLVER_DEFAULT, - initialInc: Optional[float] = None, + initialInc: float | None = None, maxNumInc: int = 100, - minInc: Optional[float] = None, + minInc: float | None = None, maxInc: float = 1, integration: Literal[C.EXPLICIT_ONLY, C.IMPLICIT_EXPLICIT] = IMPLICIT_EXPLICIT, cetol: float = 0, diff --git a/src/abaqus/StepMiscellaneous/CompositeDampingComponent.py b/src/abaqus/StepMiscellaneous/CompositeDampingComponent.py index 14e1a4f7bb..7bb1d1f0b6 100644 --- a/src/abaqus/StepMiscellaneous/CompositeDampingComponent.py +++ b/src/abaqus/StepMiscellaneous/CompositeDampingComponent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -15,7 +15,7 @@ class CompositeDampingComponent: """ #: An Int specifying the mode number of the lowest mode of a range. - start: Optional[int] = None + start: int | None = None #: An Int specifying the mode number of the highest mode of a range. - end: Optional[int] = None + end: int | None = None diff --git a/src/abaqus/StepMiscellaneous/CompositeDampingComponentArray.py b/src/abaqus/StepMiscellaneous/CompositeDampingComponentArray.py index 66345505bb..c796f4239c 100644 --- a/src/abaqus/StepMiscellaneous/CompositeDampingComponentArray.py +++ b/src/abaqus/StepMiscellaneous/CompositeDampingComponentArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .CompositeDampingComponent import CompositeDampingComponent diff --git a/src/abaqus/StepMiscellaneous/Control.py b/src/abaqus/StepMiscellaneous/Control.py index 57152d2f0c..ec29cd3f46 100644 --- a/src/abaqus/StepMiscellaneous/Control.py +++ b/src/abaqus/StepMiscellaneous/Control.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/StepMiscellaneous/DirectDampingByFrequencyComponent.py b/src/abaqus/StepMiscellaneous/DirectDampingByFrequencyComponent.py index e3b00752d4..a2f462980b 100644 --- a/src/abaqus/StepMiscellaneous/DirectDampingByFrequencyComponent.py +++ b/src/abaqus/StepMiscellaneous/DirectDampingByFrequencyComponent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -15,7 +15,7 @@ class DirectDampingByFrequencyComponent: """ #: A Float specifying the frequency value in cycles/time. - frequency: Optional[float] = None + frequency: float | None = None #: A Float specifying the fraction of critical damping. - fraction: Optional[float] = None + fraction: float | None = None diff --git a/src/abaqus/StepMiscellaneous/DirectDampingByFrequencyComponentArray.py b/src/abaqus/StepMiscellaneous/DirectDampingByFrequencyComponentArray.py index 7aa93c8df1..f5cfa0a919 100644 --- a/src/abaqus/StepMiscellaneous/DirectDampingByFrequencyComponentArray.py +++ b/src/abaqus/StepMiscellaneous/DirectDampingByFrequencyComponentArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .DirectDampingByFrequencyComponent import DirectDampingByFrequencyComponent diff --git a/src/abaqus/StepMiscellaneous/DirectDampingComponent.py b/src/abaqus/StepMiscellaneous/DirectDampingComponent.py index c10b6b2ce5..50057e9ab4 100644 --- a/src/abaqus/StepMiscellaneous/DirectDampingComponent.py +++ b/src/abaqus/StepMiscellaneous/DirectDampingComponent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -15,10 +15,10 @@ class DirectDampingComponent: """ #: An Int specifying the mode number of the lowest mode of a range. - start: Optional[int] = None + start: int | None = None #: An Int specifying the mode number of the highest mode of a range. - end: Optional[int] = None + end: int | None = None #: A Float specifying the fraction of critical damping. - fraction: Optional[float] = None + fraction: float | None = None diff --git a/src/abaqus/StepMiscellaneous/DirectDampingComponentArray.py b/src/abaqus/StepMiscellaneous/DirectDampingComponentArray.py index 5efe0a9bc0..30bf7897f4 100644 --- a/src/abaqus/StepMiscellaneous/DirectDampingComponentArray.py +++ b/src/abaqus/StepMiscellaneous/DirectDampingComponentArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .DirectDampingComponent import DirectDampingComponent diff --git a/src/abaqus/StepMiscellaneous/EmagTimeHarmonicFrequency.py b/src/abaqus/StepMiscellaneous/EmagTimeHarmonicFrequency.py index dfc580e07e..76c3a702ff 100644 --- a/src/abaqus/StepMiscellaneous/EmagTimeHarmonicFrequency.py +++ b/src/abaqus/StepMiscellaneous/EmagTimeHarmonicFrequency.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,11 +16,11 @@ class EmagTimeHarmonicFrequency: #: A Float specifying the lower limit of frequency range or a single frequency, in #: cycles/time. - lower: Optional[float] = None + lower: float | None = None #: A Float specifying the upper limit of frequency range, in cycles/time. - upper: Optional[float] = None + upper: float | None = None #: An Int specifying the number of points in the frequency range at which results should be #: given. - nPoints: Optional[int] = None + nPoints: int | None = None diff --git a/src/abaqus/StepMiscellaneous/EmagTimeHarmonicFrequencyArray.py b/src/abaqus/StepMiscellaneous/EmagTimeHarmonicFrequencyArray.py index a252b76f7c..1bcabab5c6 100644 --- a/src/abaqus/StepMiscellaneous/EmagTimeHarmonicFrequencyArray.py +++ b/src/abaqus/StepMiscellaneous/EmagTimeHarmonicFrequencyArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .EmagTimeHarmonicFrequency import EmagTimeHarmonicFrequency diff --git a/src/abaqus/StepMiscellaneous/MassScaling.py b/src/abaqus/StepMiscellaneous/MassScaling.py index 73fc645ddd..1a32e2b693 100644 --- a/src/abaqus/StepMiscellaneous/MassScaling.py +++ b/src/abaqus/StepMiscellaneous/MassScaling.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -30,34 +30,34 @@ class MassScaling: #: A SymbolicConstant specifying whether mass scaling should be performed at the beginning #: of the step or throughout the step. Possible values are AT_BEGINNING and #: THROUGHOUT_STEP. - occurs: Optional[SymbolicConstant] = None + occurs: SymbolicConstant #: A SymbolicConstant specifying the type of scaling. Possible values are UNIFORM, #: BELOW_MIN, SET_EQUAL_DT, and ROLLING. The default value is BELOW_MIN. type: SymbolicConstant = BELOW_MIN #: A Float specifying a scaling factor. - factor: Optional[float] = None + factor: float | None = None #: A Float specifying a target time increment. - dt: Optional[float] = None + dt: float | None = None #: An Int specifying the frequency at which mass scaling calculations are performed. - frequency: Optional[int] = None + frequency: int | None = None #: An Int specifying the number of intervals at which mass scaling calculations are #: performed. - numberInterval: Optional[int] = None + numberInterval: int | None = None #: A Float specifying the estimated average velocity of the workpiece in the rolling #: direction at steady-state conditions. - feedRate: Optional[float] = None + feedRate: float | None = None #: A Float specifying the average element length in the extruded direction. - extrudedLength: Optional[float] = None + extrudedLength: float | None = None #: An Int specifying the number of nodes in the cross-section of the workpiece. - crossSection: Optional[int] = None + crossSection: int | None = None #: A SymbolicConstant specifying the rolling direction. Possible values are GLOBAL_X, #: GLOBAL_Y, GLOBAL_Z, and GLOBAL_NONE. The default value is GLOBAL_X. diff --git a/src/abaqus/StepMiscellaneous/MassScalingArray.py b/src/abaqus/StepMiscellaneous/MassScalingArray.py index 14038ffb37..76f7caba64 100644 --- a/src/abaqus/StepMiscellaneous/MassScalingArray.py +++ b/src/abaqus/StepMiscellaneous/MassScalingArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .MassScaling import MassScaling diff --git a/src/abaqus/StepMiscellaneous/RandomResponseFrequency.py b/src/abaqus/StepMiscellaneous/RandomResponseFrequency.py index 7c89e6dec3..63606fe52a 100644 --- a/src/abaqus/StepMiscellaneous/RandomResponseFrequency.py +++ b/src/abaqus/StepMiscellaneous/RandomResponseFrequency.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,14 +16,14 @@ class RandomResponseFrequency: """ #: A Float specifying the lower limit of the frequency range in cycles per time. - lower: Optional[float] = None + lower: float | None = None #: A Float specifying the upper limit of the frequency range in cycles per time. - upper: Optional[float] = None + upper: float | None = None #: An Int specifying the number of points between eigenfrequencies at which the response #: should be calculated. - nCalcs: Optional[int] = None + nCalcs: int | None = None #: A Float specifying the bias parameter. - bias: Optional[float] = None + bias: float | None = None diff --git a/src/abaqus/StepMiscellaneous/RandomResponseFrequencyArray.py b/src/abaqus/StepMiscellaneous/RandomResponseFrequencyArray.py index fb27a78bc9..84e43c450d 100644 --- a/src/abaqus/StepMiscellaneous/RandomResponseFrequencyArray.py +++ b/src/abaqus/StepMiscellaneous/RandomResponseFrequencyArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .RandomResponseFrequency import RandomResponseFrequency diff --git a/src/abaqus/StepMiscellaneous/RayleighDampingByFrequencyComponent.py b/src/abaqus/StepMiscellaneous/RayleighDampingByFrequencyComponent.py index 9330e4f3ec..6b4f550853 100644 --- a/src/abaqus/StepMiscellaneous/RayleighDampingByFrequencyComponent.py +++ b/src/abaqus/StepMiscellaneous/RayleighDampingByFrequencyComponent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,10 +16,10 @@ class RayleighDampingByFrequencyComponent: """ #: A Float specifying the frequency value in cycles/time. - frequency: Optional[float] = None + frequency: float | None = None #: A Float specifying the mass proportional damping, αM. - alpha: Optional[float] = None + alpha: float | None = None #: A Float specifying the stiffness proportional damping, βM. - beta: Optional[float] = None + beta: float | None = None diff --git a/src/abaqus/StepMiscellaneous/RayleighDampingByFrequencyComponentArray.py b/src/abaqus/StepMiscellaneous/RayleighDampingByFrequencyComponentArray.py index 7aab465879..007baa19c3 100644 --- a/src/abaqus/StepMiscellaneous/RayleighDampingByFrequencyComponentArray.py +++ b/src/abaqus/StepMiscellaneous/RayleighDampingByFrequencyComponentArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .RayleighDampingByFrequencyComponent import RayleighDampingByFrequencyComponent diff --git a/src/abaqus/StepMiscellaneous/RayleighDampingComponent.py b/src/abaqus/StepMiscellaneous/RayleighDampingComponent.py index 74923bae38..9fa256f183 100644 --- a/src/abaqus/StepMiscellaneous/RayleighDampingComponent.py +++ b/src/abaqus/StepMiscellaneous/RayleighDampingComponent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -15,13 +15,13 @@ class RayleighDampingComponent: """ #: An Int specifying the mode number of the lowest mode of a range. - start: Optional[int] = None + start: int | None = None #: An Int specifying the mode number of the highest mode of a range. - end: Optional[int] = None + end: int | None = None #: A Float specifying the mass proportional damping, αM. - alpha: Optional[float] = None + alpha: float | None = None #: A Float specifying the stiffness proportional damping, βM. - beta: Optional[float] = None + beta: float | None = None diff --git a/src/abaqus/StepMiscellaneous/RayleighDampingComponentArray.py b/src/abaqus/StepMiscellaneous/RayleighDampingComponentArray.py index b95f8d68f2..cb7cd34ea4 100644 --- a/src/abaqus/StepMiscellaneous/RayleighDampingComponentArray.py +++ b/src/abaqus/StepMiscellaneous/RayleighDampingComponentArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .RayleighDampingComponent import RayleighDampingComponent diff --git a/src/abaqus/StepMiscellaneous/ResponseSpectrumComponent.py b/src/abaqus/StepMiscellaneous/ResponseSpectrumComponent.py index 589cef6ed3..9f737970fd 100644 --- a/src/abaqus/StepMiscellaneous/ResponseSpectrumComponent.py +++ b/src/abaqus/StepMiscellaneous/ResponseSpectrumComponent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -15,20 +15,20 @@ class ResponseSpectrumComponent: """ #: A Float specifying the **X** direction cosine. - x: Optional[float] = None + x: float | None = None #: A Float specifying the **Y** direction cosine. - y: Optional[float] = None + y: float | None = None #: A Float specifying the **Z** direction cosine. - z: Optional[float] = None + z: float | None = None #: A Float specifying the scale factor. - scale: Optional[float] = None + scale: float | None = None #: A Float specifying the time duration of the dynamic event, from which this spectrum was #: created. Note: This parameter is ignored unless used with the DSC modal summation rule. - timeDuration: Optional[float] = None + timeDuration: float | None = None #: A String specifying the name of the response spectrum specified with the keyword #: SPECTRUM. diff --git a/src/abaqus/StepMiscellaneous/ResponseSpectrumComponentArray.py b/src/abaqus/StepMiscellaneous/ResponseSpectrumComponentArray.py index cf5fcc1c7d..1ef5175925 100644 --- a/src/abaqus/StepMiscellaneous/ResponseSpectrumComponentArray.py +++ b/src/abaqus/StepMiscellaneous/ResponseSpectrumComponentArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .ResponseSpectrumComponent import ResponseSpectrumComponent diff --git a/src/abaqus/StepMiscellaneous/SolverControl.py b/src/abaqus/StepMiscellaneous/SolverControl.py index ba2ce7f00c..a69ec7862b 100644 --- a/src/abaqus/StepMiscellaneous/SolverControl.py +++ b/src/abaqus/StepMiscellaneous/SolverControl.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from typing_extensions import Literal diff --git a/src/abaqus/StepMiscellaneous/SteadyStateDirectFrequency.py b/src/abaqus/StepMiscellaneous/SteadyStateDirectFrequency.py index 96e516e59f..4ac625a34b 100644 --- a/src/abaqus/StepMiscellaneous/SteadyStateDirectFrequency.py +++ b/src/abaqus/StepMiscellaneous/SteadyStateDirectFrequency.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,14 +16,14 @@ class SteadyStateDirectFrequency: #: A Float specifying the lower limit of frequency range or a single frequency, in #: cycles/time. - lower: Optional[float] = None + lower: float | None = None #: A Float specifying the upper limit of frequency range, in cycles/time. - upper: Optional[float] = None + upper: float | None = None #: An Int specifying the number of points in the frequency range at which results should be #: given. - nPoints: Optional[int] = None + nPoints: int | None = None #: A Float specifying the Bias parameter. When results are requested at four or more #: frequency points, Abaqus biases the results toward the ends of the intervals to obtain diff --git a/src/abaqus/StepMiscellaneous/SteadyStateDirectFrequencyArray.py b/src/abaqus/StepMiscellaneous/SteadyStateDirectFrequencyArray.py index 9ce1349feb..9864c1465a 100644 --- a/src/abaqus/StepMiscellaneous/SteadyStateDirectFrequencyArray.py +++ b/src/abaqus/StepMiscellaneous/SteadyStateDirectFrequencyArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .SteadyStateDirectFrequency import SteadyStateDirectFrequency diff --git a/src/abaqus/StepMiscellaneous/SteadyStateModalFrequency.py b/src/abaqus/StepMiscellaneous/SteadyStateModalFrequency.py index 6fbf5ca48d..4f3281107c 100644 --- a/src/abaqus/StepMiscellaneous/SteadyStateModalFrequency.py +++ b/src/abaqus/StepMiscellaneous/SteadyStateModalFrequency.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,14 +16,14 @@ class SteadyStateModalFrequency: #: A Float specifying the lower limit of frequency range or a single frequency, in #: cycles/time. - lower: Optional[float] = None + lower: float | None = None #: A Float specifying the upper limit of frequency range, in cycles/time. - upper: Optional[float] = None + upper: float | None = None #: An Int specifying the number of points in the frequency range at which results should be #: given. - nPoints: Optional[int] = None + nPoints: int | None = None #: A Float specifying the bias parameter. When results are requested at four or more #: frequency points, Abaqus biases the results toward the ends of the intervals to obtain diff --git a/src/abaqus/StepMiscellaneous/SteadyStateModalFrequencyArray.py b/src/abaqus/StepMiscellaneous/SteadyStateModalFrequencyArray.py index 22a10f2015..e41f44429a 100644 --- a/src/abaqus/StepMiscellaneous/SteadyStateModalFrequencyArray.py +++ b/src/abaqus/StepMiscellaneous/SteadyStateModalFrequencyArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .SteadyStateModalFrequency import SteadyStateModalFrequency diff --git a/src/abaqus/StepMiscellaneous/SteadyStateSubspaceFrequency.py b/src/abaqus/StepMiscellaneous/SteadyStateSubspaceFrequency.py index 79be8cd384..e5cef64c26 100644 --- a/src/abaqus/StepMiscellaneous/SteadyStateSubspaceFrequency.py +++ b/src/abaqus/StepMiscellaneous/SteadyStateSubspaceFrequency.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,14 +16,14 @@ class SteadyStateSubspaceFrequency: #: A Float specifying the lower limit of frequency range or a single frequency, in #: cycles/time. - lower: Optional[float] = None + lower: float | None = None #: A Float specifying the upper limit of frequency range, in cycles/time. - upper: Optional[float] = None + upper: float | None = None #: An Int specifying the number of points in the frequency range at which results should be #: given. - nPoints: Optional[int] = None + nPoints: int | None = None #: A Float specifying the Bias parameter. When results are requested at four or more #: frequency points, Abaqus biases the results toward the ends of the intervals to obtain diff --git a/src/abaqus/StepMiscellaneous/SteadyStateSubspaceFrequencyArray.py b/src/abaqus/StepMiscellaneous/SteadyStateSubspaceFrequencyArray.py index 83327c0cab..bd3c04b2e4 100644 --- a/src/abaqus/StepMiscellaneous/SteadyStateSubspaceFrequencyArray.py +++ b/src/abaqus/StepMiscellaneous/SteadyStateSubspaceFrequencyArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .SteadyStateSubspaceFrequency import SteadyStateSubspaceFrequency diff --git a/src/abaqus/StepMiscellaneous/StructuralDampingByFrequencyComponent.py b/src/abaqus/StepMiscellaneous/StructuralDampingByFrequencyComponent.py index 5e44986020..8736c57d71 100644 --- a/src/abaqus/StepMiscellaneous/StructuralDampingByFrequencyComponent.py +++ b/src/abaqus/StepMiscellaneous/StructuralDampingByFrequencyComponent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,7 +16,7 @@ class StructuralDampingByFrequencyComponent: """ #: A Float specifying the frequency value in cycles/time. - frequency: Optional[float] = None + frequency: float | None = None #: A Float specifying the damping factor, s. - factor: Optional[float] = None + factor: float | None = None diff --git a/src/abaqus/StepMiscellaneous/StructuralDampingByFrequencyComponentArray.py b/src/abaqus/StepMiscellaneous/StructuralDampingByFrequencyComponentArray.py index efe71d6621..379d9ee80e 100644 --- a/src/abaqus/StepMiscellaneous/StructuralDampingByFrequencyComponentArray.py +++ b/src/abaqus/StepMiscellaneous/StructuralDampingByFrequencyComponentArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .StructuralDampingByFrequencyComponent import StructuralDampingByFrequencyComponent diff --git a/src/abaqus/StepMiscellaneous/StructuralDampingComponent.py b/src/abaqus/StepMiscellaneous/StructuralDampingComponent.py index 1c5b45f56b..ccb884e5d6 100644 --- a/src/abaqus/StepMiscellaneous/StructuralDampingComponent.py +++ b/src/abaqus/StepMiscellaneous/StructuralDampingComponent.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -15,10 +15,10 @@ class StructuralDampingComponent: """ #: An Int specifying the mode number of the lowest mode of a range. - start: Optional[int] = None + start: int | None = None #: An Int specifying the mode number of the highest mode of a range. - end: Optional[int] = None + end: int | None = None #: A Float specifying the damping factor, s. - factor: Optional[float] = None + factor: float | None = None diff --git a/src/abaqus/StepMiscellaneous/StructuralDampingComponentArray.py b/src/abaqus/StepMiscellaneous/StructuralDampingComponentArray.py index fbfc572646..ac46cd86ef 100644 --- a/src/abaqus/StepMiscellaneous/StructuralDampingComponentArray.py +++ b/src/abaqus/StepMiscellaneous/StructuralDampingComponentArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .StructuralDampingComponent import StructuralDampingComponent diff --git a/src/abaqus/StepMiscellaneous/SubstructureGenerateFrequency.py b/src/abaqus/StepMiscellaneous/SubstructureGenerateFrequency.py index ec2248db11..6b8ef4f16e 100644 --- a/src/abaqus/StepMiscellaneous/SubstructureGenerateFrequency.py +++ b/src/abaqus/StepMiscellaneous/SubstructureGenerateFrequency.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -16,7 +16,7 @@ class SubstructureGenerateFrequency: """ #: A Float specifying the lower limit of the frequency range, in cycles/time. - lower: Optional[float] = None + lower: float | None = None #: A Float specifying the upper limit of the frequency range, in cycles/time. - upper: Optional[float] = None + upper: float | None = None diff --git a/src/abaqus/StepMiscellaneous/SubstructureGenerateFrequencyArray.py b/src/abaqus/StepMiscellaneous/SubstructureGenerateFrequencyArray.py index a00f7e60ce..e01b7e12b5 100644 --- a/src/abaqus/StepMiscellaneous/SubstructureGenerateFrequencyArray.py +++ b/src/abaqus/StepMiscellaneous/SubstructureGenerateFrequencyArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .SubstructureGenerateFrequency import SubstructureGenerateFrequency diff --git a/src/abaqus/StepMiscellaneous/SubstructureGenerateModes.py b/src/abaqus/StepMiscellaneous/SubstructureGenerateModes.py index 00aabe249a..322fdb0fc2 100644 --- a/src/abaqus/StepMiscellaneous/SubstructureGenerateModes.py +++ b/src/abaqus/StepMiscellaneous/SubstructureGenerateModes.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc @@ -15,11 +15,11 @@ class SubstructureGenerateModes: """ #: An Int specifying the mode number of the lowest mode of a range. - start: Optional[int] = None + start: int | None = None #: An Int specifying the mode number of the highest mode of a range. - end: Optional[int] = None + end: int | None = None #: An Int specifying the increment used to define the intermediate mode numbers beginning #: from the lowest mode to the highest mode. - increment: Optional[int] = None + increment: int | None = None diff --git a/src/abaqus/StepMiscellaneous/SubstructureGenerateModesArray.py b/src/abaqus/StepMiscellaneous/SubstructureGenerateModesArray.py index 47530677a1..292ba8a195 100644 --- a/src/abaqus/StepMiscellaneous/SubstructureGenerateModesArray.py +++ b/src/abaqus/StepMiscellaneous/SubstructureGenerateModesArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .SubstructureGenerateModes import SubstructureGenerateModes diff --git a/src/abaqus/StepOutput/FieldOutputRequest.py b/src/abaqus/StepOutput/FieldOutputRequest.py index 70b067dc7d..56cc96528b 100644 --- a/src/abaqus/StepOutput/FieldOutputRequest.py +++ b/src/abaqus/StepOutput/FieldOutputRequest.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -12,7 +14,6 @@ EXCLUDE, INTEGRATION_POINTS, MODEL, - NODES, OFF, ON, PRESELECT, @@ -57,7 +58,7 @@ class FieldOutputRequest: #: None or a tuple of Strings specifying the interaction names. The default value is #: None.The sequence can contain only one String. - interactions: Optional[tuple] = None + interactions: tuple | None = None @abaqus_method_doc def __init__( @@ -73,7 +74,7 @@ def __init__( timeMarks: Boolean = OFF, boltLoad: str = "", sectionPoints: Union[Sequence[int], Literal[C.DEFAULT]] = DEFAULT, - interactions: Optional[str] = None, + interactions: str | None = None, rebar: Literal[C.EXCLUDE, C.INCLUDE, C.ONLY] = EXCLUDE, filter: Union[Literal[C.ANTIALIASING], str, None] = None, directions: Boolean = ON, @@ -238,7 +239,7 @@ def setValues( timeMarks: Boolean = OFF, boltLoad: str = "", sectionPoints: Union[int, Literal[C.DEFAULT]] = DEFAULT, - interactions: Optional[str] = None, + interactions: str | None = None, rebar: Literal[C.EXCLUDE, C.INCLUDE, C.ONLY] = EXCLUDE, filter: Union[Literal[C.ANTIALIASING], str, None] = None, directions: Boolean = ON, @@ -251,7 +252,7 @@ def setValues( outputAtPlyTop: Boolean = False, outputAtPlyMid: Boolean = True, outputAtPlyBottom: Boolean = False, - position: Literal[C.INTEGRATION_POINTS, C.AVERAGED_AT_NODES, C.CENTROIDAL, NODES] = INTEGRATION_POINTS, + position: Literal[C.INTEGRATION_POINTS, C.AVERAGED_AT_NODES, C.CENTROIDAL, C.NODES] = INTEGRATION_POINTS, ) -> None: """This method modifies the data for an existing FieldOutputRequest object in the step where it is created. @@ -342,7 +343,7 @@ def setValuesInStep( modes: Union[Literal[C.ALL], int] = ALL, timeInterval: Union[Literal[C.EVERY_TIME_INCREMENT], float] = EVERY_TIME_INCREMENT, numIntervals: int = 20, - timePoint: Optional[str] = None, + timePoint: str | None = None, timeMarks: Boolean = OFF, ) -> None: """This method modifies the propagating data for an existing FieldOutputRequest object in the specified diff --git a/src/abaqus/StepOutput/FieldOutputRequestState.py b/src/abaqus/StepOutput/FieldOutputRequestState.py index b299a0a06e..2f18b51247 100644 --- a/src/abaqus/StepOutput/FieldOutputRequestState.py +++ b/src/abaqus/StepOutput/FieldOutputRequestState.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from abqpy.decorators import abaqus_class_doc @@ -27,19 +29,19 @@ class FieldOutputRequestState: #: A SymbolicConstant specifying the propagation state of the field output request #: variables. Possible values are UNSET, SET, and UNCHANGED. - variablesState: Optional[SymbolicConstant] = None + variablesState: SymbolicConstant #: The SymbolicConstant LAST_INCREMENT or an Int specifying the output frequency in #: increments. The default value is 1. - frequency: SymbolicConstant = 1 + frequency: SymbolicConstant | int = 1 #: A SymbolicConstant specifying the propagation state of the field output request #: frequency. Possible values are UNSET, SET, and UNCHANGED. - frequencyState: Optional[SymbolicConstant] = None + frequencyState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the field output request modes. #: Possible values are UNSET, SET, and UNCHANGED. - modesState: Optional[SymbolicConstant] = None + modesState: SymbolicConstant #: The SymbolicConstant EVERY_TIME_INCREMENT or a Float specifying the time interval at #: which the output states are to be written. The default value is EVERY_TIME_INCREMENT. @@ -47,7 +49,7 @@ class FieldOutputRequestState: #: A SymbolicConstant specifying the propagation state of the field output request time #: interval. Possible values are UNSET, SET, and UNCHANGED. - timeIntervalState: Optional[SymbolicConstant] = None + timeIntervalState: SymbolicConstant #: An Int specifying the number of intervals during the step at which output database #: states are to be written. The default value is 20. @@ -55,7 +57,7 @@ class FieldOutputRequestState: #: A SymbolicConstant specifying the propagation state of the field output request. #: Possible values are UNSET, SET, and UNCHANGED. - numIntervalsState: Optional[SymbolicConstant] = None + numIntervalsState: SymbolicConstant #: A Boolean specifying when to write results to the output database. The default value is #: OFF. @@ -63,21 +65,21 @@ class FieldOutputRequestState: #: A SymbolicConstant specifying the propagation state of the field output request. #: Possible values are UNSET, SET, and UNCHANGED. - timeMarksState: Optional[SymbolicConstant] = None + timeMarksState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the field output request. #: Possible values are UNSET, SET, and UNCHANGED. - timePointState: Optional[SymbolicConstant] = None + timePointState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the FieldOutputRequestState #: object. Possible values are NOT_YET_ACTIVE, CREATED, PROPAGATED, MODIFIED, DEACTIVATED, #: NO_LONGER_ACTIVE, TYPE_NOT_APPLICABLE, and INSTANCE_NOT_APPLICABLE. - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A tuple of Strings specifying output request variable or component names, or the #: SymbolicConstant PRESELECT or ALL. PRESELECT represents all default output variables for #: the given step. ALL represents all valid output variables. - variables: Optional[SymbolicConstant] = None + variables: SymbolicConstant #: The SymbolicConstant ALL or a tuple of Ints specifying a list of eigenmodes for which #: output is desired. The default value is ALL. diff --git a/src/abaqus/StepOutput/HistoryOutputRequest.py b/src/abaqus/StepOutput/HistoryOutputRequest.py index a5cc972344..418d09e30d 100644 --- a/src/abaqus/StepOutput/HistoryOutputRequest.py +++ b/src/abaqus/StepOutput/HistoryOutputRequest.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -61,7 +63,7 @@ class HistoryOutputRequest: #: None or a tuple of Strings specifying the interaction names. The default value is #: None.The sequence can contain only one String. - interactions: Optional[tuple] = None + interactions: tuple | None = None @abaqus_method_doc def __init__( @@ -77,16 +79,16 @@ def __init__( boltLoad: str = "", sectionPoints: Union[Literal[C.DEFAULT], Sequence[int]] = DEFAULT, stepName: str = "", - interactions: Optional[str] = None, - contourIntegral: Optional[str] = None, + interactions: str | None = None, + contourIntegral: str | None = None, numberOfContours: int = 0, - stressInitializationStep: Optional[str] = None, + stressInitializationStep: str | None = None, contourType: Literal[C.J_INTEGRAL, C.C_INTEGRAL, C.T_STRESS, C.K_FACTORS] = J_INTEGRAL, kFactorDirection: Literal[C.MTS, C.MERR, C.K110] = MTS, rebar: Literal[C.EXCLUDE, C.INCLUDE, C.ONLY] = EXCLUDE, integratedOutputSection: str = "", - springs: Optional[tuple] = None, - filter: Optional[Literal[C.ANTIALIASING]] = None, + springs: tuple | None = None, + filter: Literal[C.ANTIALIASING] | None = None, fasteners: str = "", assembledFastener: str = "", assembledFastenerSet: str = "", @@ -243,16 +245,16 @@ def setValues( boltLoad: str = "", sectionPoints: Union[Literal[C.DEFAULT], Sequence[int]] = DEFAULT, stepName: str = "", - interactions: Optional[str] = None, - contourIntegral: Optional[str] = None, + interactions: str | None = None, + contourIntegral: str | None = None, numberOfContours: int = 0, - stressInitializationStep: Optional[str] = None, + stressInitializationStep: str | None = None, contourType: Literal[C.J_INTEGRAL, C.C_INTEGRAL, C.T_STRESS, C.K_FACTORS] = J_INTEGRAL, kFactorDirection: Literal[C.MTS, C.MERR, C.K110] = MTS, rebar: Literal[C.EXCLUDE, C.INCLUDE, C.ONLY] = EXCLUDE, integratedOutputSection: str = "", - springs: Optional[tuple] = None, - filter: Optional[Literal[C.ANTIALIASING]] = None, + springs: tuple | None = None, + filter: Literal[C.ANTIALIASING] | None = None, fasteners: str = "", assembledFastener: str = "", assembledFastenerSet: str = "", @@ -348,7 +350,7 @@ def setValuesInStep( modes: Union[Literal[C.ALL], Sequence[int]] = ALL, timeInterval: Union[Literal[C.EVERY_TIME_INCREMENT], float] = EVERY_TIME_INCREMENT, numIntervals: int = 20, - timePoints: Optional[str] = None, + timePoints: str | None = None, ) -> None: """This method modifies the propagating data for an existing HistoryOutputRequest object in the specified step. diff --git a/src/abaqus/StepOutput/HistoryOutputRequestState.py b/src/abaqus/StepOutput/HistoryOutputRequestState.py index f0e531fc29..7cdea4e5c6 100644 --- a/src/abaqus/StepOutput/HistoryOutputRequestState.py +++ b/src/abaqus/StepOutput/HistoryOutputRequestState.py @@ -1,4 +1,6 @@ -from typing import Optional, Union +from __future__ import annotations + +from typing import Union from abqpy.decorators import abaqus_class_doc @@ -21,19 +23,19 @@ class HistoryOutputRequestState: #: A SymbolicConstant specifying the propagation state of the history output request #: variables. Possible values are UNSET, SET, and UNCHANGED. - variablesState: Optional[SymbolicConstant] = None + variablesState: SymbolicConstant #: The SymbolicConstant LAST_INCREMENT or an Int specifying the output frequency in #: increments. The default value is 1. - frequency: SymbolicConstant = 1 + frequency: SymbolicConstant | int = 1 #: A SymbolicConstant specifying the propagation state of the history output request #: frequency. Possible values are UNSET, SET, and UNCHANGED. - frequencyState: Optional[SymbolicConstant] = None + frequencyState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the history output request modes. #: Possible values are UNSET, SET, and UNCHANGED. - modesState: Optional[SymbolicConstant] = None + modesState: SymbolicConstant #: The SymbolicConstant EVERY_TIME_INCREMENT or a Float specifying the time interval at #: which the output states are to be written. The default value is EVERY_TIME_INCREMENT. @@ -41,7 +43,7 @@ class HistoryOutputRequestState: #: A SymbolicConstant specifying the propagation state of the history output request time #: interval. Possible values are UNSET, SET, and UNCHANGED. - timeIntervalState: Optional[SymbolicConstant] = None + timeIntervalState: SymbolicConstant #: An Int specifying the number of intervals during the step at which output database #: states are to be written. The default value is 20. @@ -49,21 +51,21 @@ class HistoryOutputRequestState: #: A SymbolicConstant specifying the propagation state of the history output request. #: Possible values are UNSET, SET, and UNCHANGED. - timePointState: Optional[SymbolicConstant] = None + timePointState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the history output request. #: Possible values are UNSET, SET, and UNCHANGED. - numIntervalsState: Optional[SymbolicConstant] = None + numIntervalsState: SymbolicConstant #: A SymbolicConstant specifying the propagation state of the HistoryOutputRequestState #: object. Possible values are NOT_YET_ACTIVE, CREATED, PROPAGATED, MODIFIED, DEACTIVATED, #: NO_LONGER_ACTIVE, TYPE_NOT_APPLICABLE, and INSTANCE_NOT_APPLICABLE. - status: Optional[SymbolicConstant] = None + status: SymbolicConstant #: A tuple of Strings specifying output request variable or component names, or the #: SymbolicConstant PRESELECT or ALL. PRESELECT represents all default output variables for #: the given step. ALL represents all valid output variables. - variables: Optional[SymbolicConstant] = None + variables: SymbolicConstant #: The SymbolicConstant ALL or a tuple of Ints specifying a list of eigenmodes for which #: output is desired. The default value is ALL. diff --git a/src/abaqus/StepOutput/IntegratedOutputSection.py b/src/abaqus/StepOutput/IntegratedOutputSection.py index 32c71cb9f4..8aa5636f6f 100644 --- a/src/abaqus/StepOutput/IntegratedOutputSection.py +++ b/src/abaqus/StepOutput/IntegratedOutputSection.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -29,7 +29,7 @@ class IntegratedOutputSection: #: None or a Region object specifying the anchor point about which the integrated moment #: over the output region is computed or the SymbolicConstant None representing the global #: origin. The default value is None. - refPoint: Optional[SymbolicConstant] = None + refPoint: SymbolicConstant #: A Boolean specifying that the **refPoint** be adjusted so that it coincides with the #: center of the output region in the initial configuration. This argument is valid only @@ -48,7 +48,7 @@ class IntegratedOutputSection: #: None or a DatumCsys object specifying the local coordinate system used to express vector #: output. If **localCsys** = None, the degrees of freedom are defined in the global coordinate #: system. The default value is None. - localCsys: Optional[str] = None + localCsys: str | None = None #: A Boolean specifying that the coordinate system be projected onto the **surface** such #: that the 1-axis is normal to the **surface**. Projection onto a planar **surface** is such @@ -61,10 +61,10 @@ def __init__( self, name: str, surface: Region, - refPoint: Optional[SymbolicConstant] = None, + refPoint: SymbolicConstant | None = None, refPointAtCenter: Boolean = OFF, refPointMotion: Literal[C.AVERAGE_TRANSLATION, C.AVERAGE, C.INDEPENDENT] = INDEPENDENT, - localCsys: Optional[str] = None, + localCsys: str | None = None, projectOrientation: Boolean = OFF, ) -> None: """This method creates an IntegratedOutputSection object. @@ -117,10 +117,10 @@ def __init__( def setValues( self, surface: Region, - refPoint: Optional[SymbolicConstant] = None, + refPoint: SymbolicConstant | None = None, refPointAtCenter: Boolean = OFF, refPointMotion: Literal[C.AVERAGE_TRANSLATION, C.AVERAGE, C.INDEPENDENT] = INDEPENDENT, - localCsys: Optional[str] = None, + localCsys: str | None = None, projectOrientation: Boolean = OFF, ) -> None: """This method modifies the IntegratedOutputSection object. diff --git a/src/abaqus/StepOutput/OutputModel.py b/src/abaqus/StepOutput/OutputModel.py index 6370d5e624..a859152cab 100644 --- a/src/abaqus/StepOutput/OutputModel.py +++ b/src/abaqus/StepOutput/OutputModel.py @@ -1,4 +1,6 @@ -from typing import Optional, Sequence, Union +from __future__ import annotations + +from typing import Sequence, Union from typing_extensions import Literal @@ -54,9 +56,9 @@ def FieldOutputRequest( timeMarks: Boolean = OFF, boltLoad: str = "", sectionPoints: Union[Literal[C.DEFAULT], Sequence[int]] = DEFAULT, - interactions: Optional[str] = None, + interactions: str | None = None, rebar: Literal[C.EXCLUDE, C.INCLUDE, C.ONLY] = EXCLUDE, - filter: Optional[Literal[C.ANTIALIASING]] = None, + filter: Literal[C.ANTIALIASING] | None = None, directions: Boolean = ON, fasteners: str = "", assembledFastener: str = "", @@ -203,16 +205,16 @@ def HistoryOutputRequest( boltLoad: str = "", sectionPoints: Union[Literal[C.DEFAULT], Sequence[int]] = DEFAULT, stepName: str = "", - interactions: Optional[str] = None, - contourIntegral: Optional[str] = None, + interactions: str | None = None, + contourIntegral: str | None = None, numberOfContours: int = 0, - stressInitializationStep: Optional[str] = None, + stressInitializationStep: str | None = None, contourType: Literal[C.J_INTEGRAL, C.C_INTEGRAL, C.T_STRESS, C.K_FACTORS] = J_INTEGRAL, kFactorDirection: Literal[C.MTS, C.MERR, C.K110] = MTS, rebar: Literal[C.EXCLUDE, C.INCLUDE, C.ONLY] = EXCLUDE, integratedOutputSection: str = "", - springs: Optional[tuple] = None, - filter: Optional[Literal[C.ANTIALIASING]] = None, + springs: tuple | None = None, + filter: Literal[C.ANTIALIASING] | None = None, fasteners: str = "", assembledFastener: str = "", assembledFastenerSet: str = "", @@ -345,10 +347,10 @@ def IntegratedOutputSection( self, name: str, surface: Region, - refPoint: Optional[SymbolicConstant] = None, + refPoint: SymbolicConstant | None = None, refPointAtCenter: Boolean = OFF, refPointMotion: Literal[C.AVERAGE_TRANSLATION, C.AVERAGE, C.INDEPENDENT] = INDEPENDENT, - localCsys: Optional[str] = None, + localCsys: str | None = None, projectOrientation: Boolean = OFF, ) -> IntegratedOutputSection: """This method creates an IntegratedOutputSection object. diff --git a/src/abaqus/TableCollection/DataTableArray.py b/src/abaqus/TableCollection/DataTableArray.py index 3cf6186109..d39a8fb151 100644 --- a/src/abaqus/TableCollection/DataTableArray.py +++ b/src/abaqus/TableCollection/DataTableArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from ..TableCollection.DataTable import DataTable diff --git a/src/abaqus/TableCollection/ParameterColumnArray.py b/src/abaqus/TableCollection/ParameterColumnArray.py index ccae962cff..df67e8e8e1 100644 --- a/src/abaqus/TableCollection/ParameterColumnArray.py +++ b/src/abaqus/TableCollection/ParameterColumnArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from ..TableCollection.ParameterColumn import ParameterColumn diff --git a/src/abaqus/TableCollection/PropertyTable.py b/src/abaqus/TableCollection/PropertyTable.py index 07ba97dbf6..fb8f0a2557 100644 --- a/src/abaqus/TableCollection/PropertyTable.py +++ b/src/abaqus/TableCollection/PropertyTable.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -27,7 +27,7 @@ class PropertyTable: """ #: A repository of PropertyTableData. Specifies all the propertyTableData in PropertyTable - propertyTableDatas: Dict[str, PropertyTableData] = {} + propertyTableDatas: dict[str, PropertyTableData] = {} #: A String specifying the repository key. name: str @@ -92,10 +92,10 @@ def setValues(self, variables: str = ""): def PropertyTableData( self, label: str = "", - regularize: Optional[SymbolicConstant] = None, - extrapolate: Optional[SymbolicConstant] = None, + regularize: SymbolicConstant | None = None, + extrapolate: SymbolicConstant | None = None, isTemp: Boolean = OFF, - fieldNums: Optional[int] = None, + fieldNums: int | None = None, regularizeTolerance: str = "", data: str = "", ) -> PropertyTableData: diff --git a/src/abaqus/TableCollection/PropertyTableData.py b/src/abaqus/TableCollection/PropertyTableData.py index 2c7c214104..15e8b2ebcd 100644 --- a/src/abaqus/TableCollection/PropertyTableData.py +++ b/src/abaqus/TableCollection/PropertyTableData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -29,17 +29,17 @@ class PropertyTableData: label: str = "" #: A SymbolicConstant specifying the type of regularize to the user-defined property data. - regularize: Optional[SymbolicConstant] = None + regularize: SymbolicConstant #: A SymbolicConstant specifying the type of extrapolation of dependent variables outside #: the specified range of the independent variables. - extrapolate: Optional[SymbolicConstant] = None + extrapolate: SymbolicConstant #: A Boolean specifying the dependency of properties on temperature. isTemp: Boolean = OFF #: An Int specifying the field variables on which properties are dependent. - fieldNums: Optional[int] = None + fieldNums: int | None = None #: A Double specifying the tolerance to be used to regularize the property table data. regularizeTolerance: str = "" @@ -52,10 +52,10 @@ class PropertyTableData: def __init__( self, label: str = "", - regularize: Optional[SymbolicConstant] = None, - extrapolate: Optional[SymbolicConstant] = None, + regularize: SymbolicConstant | None = None, + extrapolate: SymbolicConstant | None = None, isTemp: Boolean = OFF, - fieldNums: Optional[int] = None, + fieldNums: int | None = None, regularizeTolerance: str = "", data: str = "", ): diff --git a/src/abaqus/TableCollection/TableCollection.py b/src/abaqus/TableCollection/TableCollection.py index 976fa0ecbf..2d7a31ea2c 100644 --- a/src/abaqus/TableCollection/TableCollection.py +++ b/src/abaqus/TableCollection/TableCollection.py @@ -1,4 +1,4 @@ -from typing import Dict, List +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -26,13 +26,13 @@ class TableCollection: """ #: A repository of the PropertyTable object. - propertyTables: Dict[str, PropertyTable] = {} + propertyTables: dict[str, PropertyTable] = {} #: A repository of the ParameterTable object - parameterTables: Dict[str, ParameterTable] = {} + parameterTables: dict[str, ParameterTable] = {} #: sequence of the DataTable object - dataTables: List[DataTable] = [] + dataTables: list[DataTable] = [] @abaqus_method_doc def __init__(self, name: str): diff --git a/src/abaqus/TableCollection/TableCollectionAssembly.py b/src/abaqus/TableCollection/TableCollectionAssembly.py index 150693b251..8c5c3f1cba 100644 --- a/src/abaqus/TableCollection/TableCollectionAssembly.py +++ b/src/abaqus/TableCollection/TableCollectionAssembly.py @@ -1,4 +1,4 @@ -from typing import Dict +from __future__ import annotations from typing_extensions import Literal @@ -26,7 +26,7 @@ class TableCollectionAssembly(AssemblyBase): The ``TableCollectionAssembly`` class was added. """ - elementProgressiveActivations: Dict[str, ElementProgressiveActivation] = {} + elementProgressiveActivations: dict[str, ElementProgressiveActivation] = {} @abaqus_method_doc def ElementProgressiveActivation( diff --git a/src/abaqus/TextRepresentation/TextReprOptions.py b/src/abaqus/TextRepresentation/TextReprOptions.py index 14f947b724..d56fb11fb5 100644 --- a/src/abaqus/TextRepresentation/TextReprOptions.py +++ b/src/abaqus/TextRepresentation/TextReprOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -25,10 +25,10 @@ class TextReprOptions: @abaqus_method_doc def setValues( self, - style: Optional[Literal[C.RECURSIVE]] = None, - maxRecursionDepth: Optional[Literal[C.UNLIMITED]] = None, + style: Literal[C.RECURSIVE] | None = None, + maxRecursionDepth: Literal[C.UNLIMITED] | None = None, maxRecursionString: str = "", - maxElementsInSequence: Optional[Literal[C.UNLIMITED]] = None, + maxElementsInSequence: Literal[C.UNLIMITED] | None = None, ): """This method modifies the TextReprOptions object. diff --git a/src/abaqus/TextRepresentation/textRepr.py b/src/abaqus/TextRepresentation/textRepr.py index eed74374b4..3bb59f5959 100644 --- a/src/abaqus/TextRepresentation/textRepr.py +++ b/src/abaqus/TextRepresentation/textRepr.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_function_doc @@ -20,8 +20,8 @@ @abaqus_function_doc def getIndentedRepr( object, - maxRecursionDepth: Optional[SymbolicConstant] = None, - maxElementsInSequence: Optional[SymbolicConstant] = None, + maxRecursionDepth: SymbolicConstant | None = None, + maxElementsInSequence: SymbolicConstant | None = None, significantDigits: float = 6, ): """This method returns a String with each level of parentheses indented. @@ -58,8 +58,8 @@ def getIndentedRepr( @abaqus_function_doc def getPaths( object, - maxRecursionDepth: Optional[SymbolicConstant] = None, - maxElementsInSequence: Optional[SymbolicConstant] = None, + maxRecursionDepth: SymbolicConstant | None = None, + maxElementsInSequence: SymbolicConstant | None = None, pathRoot: str = "", ): """This method processes the argument and interprets its structure. It then returns a String containing the @@ -97,8 +97,8 @@ def getPaths( @abaqus_function_doc def getTypes( object, - maxRecursionDepth: Optional[SymbolicConstant] = None, - maxElementsInSequence: Optional[SymbolicConstant] = None, + maxRecursionDepth: SymbolicConstant | None = None, + maxElementsInSequence: SymbolicConstant | None = None, pathRoot: str = "", ): """This method processes the argument, interprets its structure, and returns a String containing all the @@ -134,8 +134,8 @@ def getTypes( @abaqus_function_doc def prettyPrint( object, - maxRecursionDepth: Optional[SymbolicConstant] = None, - maxElementsInSequence: Optional[SymbolicConstant] = None, + maxRecursionDepth: SymbolicConstant | None = None, + maxElementsInSequence: SymbolicConstant | None = None, significantDigits: float = 6, ): """This method prints a formatted version of the object. The prettyPrint function uses getIndentedRepr to @@ -166,8 +166,8 @@ def prettyPrint( @abaqus_function_doc def printPaths( object, - maxRecursionDepth: Optional[SymbolicConstant] = None, - maxElementsInSequence: Optional[SymbolicConstant] = None, + maxRecursionDepth: SymbolicConstant | None = None, + maxElementsInSequence: SymbolicConstant | None = None, pathRoot: str = "", ): """This method prints the object path of the **object** argument and its members, depending on the @@ -200,8 +200,8 @@ def printPaths( @abaqus_function_doc def printTypes( object, - maxRecursionDepth: Optional[SymbolicConstant] = None, - maxElementsInSequence: Optional[SymbolicConstant] = None, + maxRecursionDepth: SymbolicConstant | None = None, + maxElementsInSequence: SymbolicConstant | None = None, pathRoot: str = "", ): """This method prints the object type. The printTypes function uses getTypes to print a list of all the diff --git a/src/abaqus/UtilityAndView/AbaqusBoolean.py b/src/abaqus/UtilityAndView/AbaqusBoolean.py index ec889e6446..162991d8b6 100644 --- a/src/abaqus/UtilityAndView/AbaqusBoolean.py +++ b/src/abaqus/UtilityAndView/AbaqusBoolean.py @@ -49,7 +49,7 @@ def __init__(self, value: int) -> None: @abaqus_method_doc def getId(self) -> int: - ... + return id(self) def getText(self) -> str: if bool(self): @@ -59,32 +59,3 @@ def getText(self) -> str: def isTrue(self) -> bool: return bool(self) - - def __copy__(self) -> AbaqusBoolean: - ... - - def __getstate__(self) -> bool: - ... - - def __hash__(self) -> int: - ... - - # @staticmethod # known case of __new__ - # def __new__(cls, *args, **kargs): # reliably restored by inspect - # # no doc - # pass - - def __reduce__(self) -> tuple: # known return case of __reduce__ - ... - - def __repr__(self) -> str: - return self.getText() - - def __setstate__(self, *args) -> None: - ... - - def __str__(self) -> str: - return self.getText() - - __weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default - """List of weak references to the object (if defined)""" diff --git a/src/abaqus/UtilityAndView/BackwardCompatibility.py b/src/abaqus/UtilityAndView/BackwardCompatibility.py index 2967738bf2..d95643a6c6 100644 --- a/src/abaqus/UtilityAndView/BackwardCompatibility.py +++ b/src/abaqus/UtilityAndView/BackwardCompatibility.py @@ -65,7 +65,7 @@ def getDeprecatedMethodsUsed(self): Returns ------- - List[str] + list[str] A list of Strings. """ ... @@ -77,7 +77,7 @@ def getDeprecatedArgsUsed(self): Returns ------- - List[str] + list[str] A list of Strings. """ ... diff --git a/src/abaqus/UtilityAndView/Delete.py b/src/abaqus/UtilityAndView/Delete.py index 7a7036d9e9..988fe87d33 100644 --- a/src/abaqus/UtilityAndView/Delete.py +++ b/src/abaqus/UtilityAndView/Delete.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_function_doc @@ -25,7 +25,7 @@ def myCallback(path, userData): @abaqus_function_doc -def deleteObjectCallback(callback: str, path: str, userData: Optional[str] = None, includeChildren: Boolean = False): +def deleteObjectCallback(callback: str, path: str, userData: str | None = None, includeChildren: Boolean = False): """This method adds a callback function that will be invoked when the specified Abaqus Scripting Interface objects are about to be deleted. The callback is invoked only when the object is deleted using the Python statement del object. The callback is not invoked when the object is deleted using an Abaqus Scripting diff --git a/src/abaqus/UtilityAndView/Method.py b/src/abaqus/UtilityAndView/Method.py index 48109322c6..40a9a2938a 100644 --- a/src/abaqus/UtilityAndView/Method.py +++ b/src/abaqus/UtilityAndView/Method.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_function_doc @@ -32,7 +32,7 @@ def addCallback( caller: str, methodName: str, callback: str, - userData: Optional[str] = None, + userData: str | None = None, callAfter: Boolean = OFF, ): """This method adds a callback function that will be invoked when certain Abaqus/CAE commands are about to @@ -74,7 +74,7 @@ def addCallback( @abaqus_function_doc -def removeCallback(caller: str, methodName: str, callback: str, userData: Optional[str] = None): +def removeCallback(caller: str, methodName: str, callback: str, userData: str | None = None): """This method removes a callback added by the addCallback method. To successfully remove a callback, all arguments must exactly match those used when the callback was added. diff --git a/src/abaqus/UtilityAndView/Repository.py b/src/abaqus/UtilityAndView/Repository.py index aa89d6e9ae..5d6e945260 100644 --- a/src/abaqus/UtilityAndView/Repository.py +++ b/src/abaqus/UtilityAndView/Repository.py @@ -1,8 +1,10 @@ +from typing import Dict + from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @abaqus_class_doc -class Repository(dict): +class Repository(Dict): """Repositories are containers that store a particular type of object; for example, the steps repository contains all the steps defined in the model. An Abaqus Scripting Interface Repository maps a key to a value. The key is usually a String, and the value is any Python object, usually an Abaqus object. A repository is diff --git a/src/abaqus/UtilityAndView/Status.py b/src/abaqus/UtilityAndView/Status.py index 8f17c99f50..99ba505d4a 100644 --- a/src/abaqus/UtilityAndView/Status.py +++ b/src/abaqus/UtilityAndView/Status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import overload from abqpy.decorators import abaqus_function_doc diff --git a/src/abaqus/UtilityAndView/SymbolicConstant.py b/src/abaqus/UtilityAndView/SymbolicConstant.py index 489bf741d1..3678dc8dbe 100644 --- a/src/abaqus/UtilityAndView/SymbolicConstant.py +++ b/src/abaqus/UtilityAndView/SymbolicConstant.py @@ -1,7 +1,6 @@ from __future__ import annotations from enum import Enum -from typing import Any, Union from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -54,41 +53,13 @@ def __init__(self, text: str) -> None: raise ValueError(f"SymbolicConstant name {text} may only contain upper case, digit or underscore") self.text = text - @abaqus_method_doc - def __copy__(self) -> SymbolicConstant: - ... - - def __getstate__(self) -> str: - return self.text - - # def __hash__(self) -> int: - # ... - - def __lt__(self, other: Any) -> bool: - """Sorting method; True if self is < other.""" - return self < other - - @abaqus_method_doc - def __reduce__(self) -> tuple: # known return case of __reduce__ - ... - - def __repr__(self) -> str: - return self.getText() - - def __setstate__(self, *args) -> None: - ... - - def __str__(self) -> str: - return self.text - def getId(self) -> int: - ... + return id(self) def getText(self) -> str: return self.text - @staticmethod - def __new__(cls, name: str) -> Union[SymbolicConstant, AbaqusBoolean]: + def __new__(cls, name: str) -> SymbolicConstant: if name == "ON": return AbaqusBoolean(1) elif name == "OFF": @@ -96,14 +67,6 @@ def __new__(cls, name: str) -> Union[SymbolicConstant, AbaqusBoolean]: else: return super().__new__(cls, name) - @classmethod - def _addToCache(cls, *args, **kwargs): # real signature unknown - """Helper method for __new__ Also used by AbaqusBoolean.__new__""" - ... - - __weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default - """List of weak references to the object (if defined)""" - class abaqusConstants(SymbolicConstant, Enum): def __str__(self) -> str: diff --git a/src/abaqus/UtilityAndView/Upgrade.py b/src/abaqus/UtilityAndView/Upgrade.py index 8a7facdb67..5ef1405fe4 100644 --- a/src/abaqus/UtilityAndView/Upgrade.py +++ b/src/abaqus/UtilityAndView/Upgrade.py @@ -27,12 +27,12 @@ def upgradeScript( searchSubdirectories: Boolean = True, backup: Boolean = True, preview: Boolean = True, - diffExecutable: str = False, + diffExecutable: str = "", logFileName: str = "asiUpgrade", fromVersion: str = EARLIEST, toVersion: str = LATEST, scriptType: SymbolicConstant = BOTH, -): +) -> int: """This function can be used to upgrade a directory, a file, or a list of both directories and files. You can preview the changes before you choose to upgrade the file. A user interface to this function is available via the Plug-ins menu. For more information, see Upgrading a script. You can also use a simpler @@ -89,4 +89,4 @@ def upgradeScript( The number of changes made or, if **preview** was used, the number of changes that would have been made. """ - ... + return 0 diff --git a/src/abaqus/UtilityAndView/User.py b/src/abaqus/UtilityAndView/User.py index 7dd663cd9a..024e93f0f6 100644 --- a/src/abaqus/UtilityAndView/User.py +++ b/src/abaqus/UtilityAndView/User.py @@ -1,4 +1,6 @@ """The following commands are used to request data entry from a user.""" +from __future__ import annotations + from typing import overload from abqpy.decorators import abaqus_function_doc diff --git a/src/abaqus/UtilityAndView/View.py b/src/abaqus/UtilityAndView/View.py index e9a6ce67ed..891703106a 100644 --- a/src/abaqus/UtilityAndView/View.py +++ b/src/abaqus/UtilityAndView/View.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Optional, Sequence, Tuple +from typing import Sequence from typing_extensions import Literal @@ -29,16 +29,16 @@ class View: #: A Float specifying the width in viewport millimeters of the bounding rectangle around #: the viewport contents. This value does not include annotations or symbols and it is not #: clipped to the size of the viewport window. - displayedObjectScreenWidth: Optional[float] = None + displayedObjectScreenWidth: float | None = None #: A Float specifying the height in viewport millimeters of the bounding rectangle around #: the viewport contents. This value does not include annotations or symbols and it is not #: clipped to the size of the viewport window. - displayedObjectScreenHeight: Optional[float] = None + displayedObjectScreenHeight: float | None = None #: A tuple of Floats specifying a transformation matrix used to position the contents of #: the Layer within a viewport. - layerTransform: Optional[float] = None + layerTransform: float | None = None #: A String specifying the name of the view (also used as the repository key). Possible #: values are 'Front', 'Back', 'Top', 'Bottom', 'Left', 'Right', 'Iso', 'User-1', 'User-2', @@ -68,14 +68,14 @@ class View: projection: Literal[C.PERSPECTIVE, C.PARALLEL] #: A sequence of three Floats specifying the camera position. - cameraPosition: Tuple[float, float, float] + cameraPosition: tuple[float, float, float] #: A sequence of three Floats specifying the camera's up vector (the screen's positive #: **Y** axis). The initial value is (0, 0, 0). - cameraUpVector: Tuple[float, float, float] + cameraUpVector: tuple[float, float, float] #: A sequence of three Floats specifying the center of the scene. - cameraTarget: Tuple[float, float, float] + cameraTarget: tuple[float, float, float] #: A Float specifying the amount to pan the model in the screen **X** direction as a fraction #: of the viewport width. A positive value pans the model to the right. A negative value @@ -106,9 +106,9 @@ def __init__( width: float, height: float, projection: Literal[C.PERSPECTIVE, C.PARALLEL], - cameraPosition: Tuple[float, float, float], - cameraUpVector: Tuple[float, float, float], - cameraTarget: Tuple[float, float, float], + cameraPosition: tuple[float, float, float], + cameraUpVector: tuple[float, float, float], + cameraTarget: tuple[float, float, float], viewOffsetX: float, viewOffsetY: float, autoFit: Boolean, @@ -300,7 +300,7 @@ def rotate( def setLayerTransform( self, layerTransform: tuple = (), - options: Optional["View"] = None, + options: "View" | None = None, drawImmediately: Boolean = False, ): """This method modifies the transformation used to position a Layer. Note:This method is not available @@ -368,18 +368,18 @@ def setValues( self, options: View = ..., drawImmediately: Boolean = False, - fieldOfViewAngle: float = ..., + fieldOfViewAngle: float = 0, farPlaneMode: Literal[C.AUTOCOMPUTE, C.SPECIFY] = ..., - nearPlane: float = ..., - farPlane: float = ..., - width: float = ..., - height: float = ..., + nearPlane: float = 0, + farPlane: float = 0, + width: float = 0, + height: float = 0, projection: Literal[C.PERSPECTIVE, C.PARALLEL] = ..., - cameraPosition: Tuple[float, float, float] = ..., - cameraUpVector: Tuple[float, float, float] = ..., - cameraTarget: Tuple[float, float, float] = ..., - viewOffsetX: float = ..., - viewOffsetY: float = ..., + cameraPosition: tuple[float, float, float] = ..., + cameraUpVector: tuple[float, float, float] = ..., + cameraTarget: tuple[float, float, float] = ..., + viewOffsetX: float = 0, + viewOffsetY: float = 0, movieMode: Boolean = OFF, ) -> None: """This method modifies the View object. diff --git a/src/abaqus/UtilityAndView/abaqusConstants.py b/src/abaqus/UtilityAndView/abaqusConstants.py index ef0f37b76e..3850f4283b 100644 --- a/src/abaqus/UtilityAndView/abaqusConstants.py +++ b/src/abaqus/UtilityAndView/abaqusConstants.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Union from auto_all import end_all, start_all diff --git a/src/abaqus/XY/Area.py b/src/abaqus/XY/Area.py index dcab78c4ec..4bc60c89de 100644 --- a/src/abaqus/XY/Area.py +++ b/src/abaqus/XY/Area.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from typing_extensions import Literal diff --git a/src/abaqus/XY/Axis.py b/src/abaqus/XY/Axis.py index 46c80f4c94..4d8d98aebf 100644 --- a/src/abaqus/XY/Axis.py +++ b/src/abaqus/XY/Axis.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -81,13 +81,13 @@ def setValues( axis: "Axis", labelFrequency: int = 1, labelPlacement: Literal[C.INSIDE] = INSIDE, - labelStyle: Optional[TextStyle] = None, - lineStyle: Optional[LineStyle] = None, + labelStyle: TextStyle | None = None, + lineStyle: LineStyle | None = None, placement: Literal[C.MIN_MAX_EDGE] = MIN_MAX_EDGE, tickLength: float = 2, tickPlacement: Literal[C.INSIDE] = INSIDE, - tickStyle: Optional[LineStyle] = None, - titleStyle: Optional[TextStyle] = None, + tickStyle: LineStyle | None = None, + titleStyle: TextStyle | None = None, ): """This method modifies the Axis object. diff --git a/src/abaqus/XY/AxisArray.py b/src/abaqus/XY/AxisArray.py index f8374eeb8b..1a1392d113 100644 --- a/src/abaqus/XY/AxisArray.py +++ b/src/abaqus/XY/AxisArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .Axis import Axis diff --git a/src/abaqus/XY/AxisData.py b/src/abaqus/XY/AxisData.py index a7afb485b3..3671a2dc11 100644 --- a/src/abaqus/XY/AxisData.py +++ b/src/abaqus/XY/AxisData.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -40,7 +40,7 @@ class AxisData: #: A SymbolicConstant specifying the direction of the axis. Possible values are ABSCISSA #: and ORDINATE. - direction: Optional[SymbolicConstant] = None + direction: SymbolicConstant #: A SymbolicConstant specifying how tick labels are formatted. Possible values are #: AUTOMATIC, DECIMAL, SCIENTIFIC, and ENGINEERING. The default value is AUTOMATIC. @@ -55,32 +55,32 @@ class AxisData: maxAutoCompute: Boolean = ON #: A Float specifying the maximum value when **maxAutoCompute** is true. - maxAutoValue: Optional[float] = None + maxAutoValue: float | None = None #: A Float specifying the maximum value when **maxAutoCompute** is false. By default, #: **maxValue** is set to **maxAutoValue**. - maxValue: Optional[float] = None + maxValue: float | None = None #: A Float specifying the current maximum value displayed for this axis. This value is #: different from **maxAutoValue** or **maxValue** when the axis is being transformed (zoom or #: pan). - maxShownValue: Optional[float] = None + maxShownValue: float | None = None #: A Boolean specifying whether or not to use the automatically computed minimum value for #: the axis. The default value is ON. minAutoCompute: Boolean = ON #: A Float specifying the minimum value when **minAutoCompute** is true. - minAutoValue: Optional[float] = None + minAutoValue: float | None = None #: A Float specifying the minimum value when **minAutoCompute** is false. By default, #: **minValue** is set to **minAutoValue**. - minValue: Optional[float] = None + minValue: float | None = None #: A Float specifying the current minimum value displayed for this axis. This value is #: different from **minAutoValue** or **minValue** when the axis is being transformed (zoom or #: pan). - minShownValue: Optional[float] = None + minShownValue: float | None = None #: An Int specifying the number the number of minor tick marks between major ticks. #: Possible values are 0 ≤ **minorTickCount** ≤ 20. When the **scale** is set to LOG, the @@ -106,22 +106,22 @@ class AxisData: #: =TOTAL_NUMBER. Possible values are 0 ≤ **tickCount** ≤ 30. The default value is computed #: based on the range of the axis. When the **scale** is set to LOG, the tickCount is #: interpreted as the number of ticks per decade and acceptable values are 1, 4, 8, and 17. - tickCount: Optional[int] = None + tickCount: int | None = None #: An Int specifying the number of major ticks effectively shown. This value takes zoom, #: pan and rounding into account. - tickCountShown: Optional[int] = None + tickCountShown: int | None = None #: A Float specifying the increment of the major tick marks on the axis when **tickMode** = #: INCREMENT. Valid values are 0 < **tickIncrement**. The default value is computed based on #: the results of the automatic method and the range being plotted. When the **scale** is set #: to LOG, the tickIncrement is interpreted as a value per decade and should be between #: 0.05 and 1. - tickIncrement: Optional[float] = None + tickIncrement: float | None = None #: A Float specifying the shown tick increment of the major ticks. This value takes #: zoom/pan into account. - tickIncrementShown: Optional[float] = None + tickIncrementShown: float | None = None #: A Boolean specifying whether the title to use for the axis title is system defined or #: user defined. The default value is ON. @@ -136,7 +136,7 @@ class AxisData: quantityType: QuantityType = QuantityType() #: A tuple of Floats specifying the read-only major tick values shown. - tickValues: Optional[float] = None + tickValues: float | None = None #: A tuple of Strings specifying the read-only major tick labels shown. tickLabels: tuple = () @@ -152,18 +152,18 @@ class AxisData: @abaqus_method_doc def setValues( self, - axisData: Optional["AxisData"] = None, + axisData: "AxisData" | None = None, labelFormat: Literal[C.SCIENTIFIC, C.AUTOMATIC, C.ENGINEERING, C.DECIMAL] = AUTOMATIC, labelNumDigits: int = 2, scale: Literal[C.LINEAR] = LINEAR, dbReference: float = 1, minAutoCompute: Boolean = ON, - minValue: Optional[float] = None, + minValue: float | None = None, maxAutoCompute: Boolean = ON, - maxValue: Optional[float] = None, + maxValue: float | None = None, tickMode: Literal[C.AUTOCOMPUTE] = AUTOCOMPUTE, - tickIncrement: Optional[float] = None, - tickCount: Optional[int] = None, + tickIncrement: float | None = None, + tickCount: int | None = None, minorTickCount: int = 1, title: str = "", useSystemTitle: Boolean = ON, diff --git a/src/abaqus/XY/Chart.py b/src/abaqus/XY/Chart.py index 0aea2625e7..59ea71b7d0 100644 --- a/src/abaqus/XY/Chart.py +++ b/src/abaqus/XY/Chart.py @@ -1,4 +1,6 @@ -from typing import Dict, Optional, Sequence +from __future__ import annotations + +from typing import Sequence from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -35,11 +37,11 @@ class Chart: #: A Float specifying the aspect ratio of the grid area. A value of -1 specifies that the #: gridArea will take up all available space. The default value is −1. - aspectRatio: Optional[float] = None + aspectRatio: float | None = None #: A repository of XYCurve objects specifying a repository of XYCurve objects to display in #: the Chart. - curves: Dict[str, XYCurve] = {} + curves: dict[str, XYCurve] = {} #: An AxisArray object specifying a read-only sequence of axis objects displayed as axes1 - #: the abscissa for a Cartesian chart. @@ -86,7 +88,7 @@ class Chart: #: A tuple of Floats specifying a transformation matrix used to scale or pan along the axes #: of the Chart. - transform: Optional[float] = None + transform: float | None = None @abaqus_method_doc def autoColor(self, lines: Boolean = OFF, symbols: Boolean = OFF): @@ -210,11 +212,11 @@ def removeCurve(self, curve: str): @abaqus_method_doc def setValues( self, - chart: Optional["Chart"] = None, + chart: "Chart" | None = None, curvesToPlot: Sequence[XYCurve] = (), - aspectRatio: Optional[float] = None, + aspectRatio: float | None = None, transform: tuple = (), - view: Optional[View] = None, + view: View | None = None, useQuantityType: Boolean = ON, ): """This method modifies the Chart object. diff --git a/src/abaqus/XY/DefaultChartOptions.py b/src/abaqus/XY/DefaultChartOptions.py index 0debaf122d..2f1b599bee 100644 --- a/src/abaqus/XY/DefaultChartOptions.py +++ b/src/abaqus/XY/DefaultChartOptions.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -30,18 +30,18 @@ class DefaultChartOptions: def setValues( self, areaStyle: AreaStyle, - aspectRatio: Optional[float] = None, - defaultAxis1Options: Optional[Axis] = None, - defaultAxis2Options: Optional[Axis] = None, - gridArea: Optional[Area] = None, - legend: Optional[Legend] = None, - majorAxis1GridStyle: Optional[LineStyle] = None, - majorAxis2GridStyle: Optional[LineStyle] = None, - minorAxis1GridStyle: Optional[LineStyle] = None, - minorAxis2GridStyle: Optional[LineStyle] = None, - tagAreaStyle: Optional[AreaStyle] = None, - tagBorder: Optional[LineStyle] = None, - tagTextStyle: Optional[TextStyle] = None, + aspectRatio: float | None = None, + defaultAxis1Options: Axis | None = None, + defaultAxis2Options: Axis | None = None, + gridArea: Area | None = None, + legend: Legend | None = None, + majorAxis1GridStyle: LineStyle | None = None, + majorAxis2GridStyle: LineStyle | None = None, + minorAxis1GridStyle: LineStyle | None = None, + minorAxis2GridStyle: LineStyle | None = None, + tagAreaStyle: AreaStyle | None = None, + tagBorder: LineStyle | None = None, + tagTextStyle: TextStyle | None = None, useQuantityType: Boolean = ON, ): """This method modifies the DefaultChartOptions object. diff --git a/src/abaqus/XY/Legend.py b/src/abaqus/XY/Legend.py index 3afd0ea234..5f6a6969fb 100644 --- a/src/abaqus/XY/Legend.py +++ b/src/abaqus/XY/Legend.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -68,8 +68,8 @@ def setValues( title: str = "", numberFormat: Literal[C.SCIENTIFIC, C.AUTOMATIC, C.ENGINEERING, C.DECIMAL] = AUTOMATIC, numDigits: int = 2, - textStyle: Optional[TextStyle] = None, - titleStyle: Optional[TextStyle] = None, + textStyle: TextStyle | None = None, + titleStyle: TextStyle | None = None, ): """This method modifies the Legend object. diff --git a/src/abaqus/XY/Title.py b/src/abaqus/XY/Title.py index 1a58854dce..0c21f2f66e 100644 --- a/src/abaqus/XY/Title.py +++ b/src/abaqus/XY/Title.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -38,9 +38,9 @@ def setValues( self, title: "Title", text: str = "", - area: Optional[Area] = None, + area: Area | None = None, useDefault: Boolean = OFF, - titleStyle: Optional[TextStyle] = None, + titleStyle: TextStyle | None = None, ): """This method modifies the Title object. diff --git a/src/abaqus/XY/XYCurve.py b/src/abaqus/XY/XYCurve.py index 268ac7fc0c..2c003b05ff 100644 --- a/src/abaqus/XY/XYCurve.py +++ b/src/abaqus/XY/XYCurve.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -49,7 +49,7 @@ class XYCurve: legendSource: SymbolicConstant = CURVE_LEGEND #: An XYData object specifying the data for the curve. - data: Optional[XYData] = None + data: XYData | None = None #: A LineStyle object specifying the line properties used to display the curve. lineStyle: LineStyle = LineStyle() @@ -63,7 +63,7 @@ class XYCurve: #: A tuple of SymbolicConstants specifying that describe how curves are to be displayed. #: Possible values are LINE and SYMBOL. The default value is (LINE). - displayTypes: Optional[SymbolicConstant] = None + displayTypes: SymbolicConstant @abaqus_method_doc def Curve(self, name: str, data: XYData): @@ -91,7 +91,7 @@ def Curve(self, name: str, data: XYData): @abaqus_method_doc def setValues( self, - displayTypes: Optional[Literal[C.SYMBOL, C.LINE]] = None, + displayTypes: Literal[C.SYMBOL, C.LINE] | None = None, legendLabel: str = "", symbolFrequency: int = 1, useDefault: Boolean = ON, diff --git a/src/abaqus/XY/XYCurveArray.py b/src/abaqus/XY/XYCurveArray.py index d7c1f2bc20..a9b76d1379 100644 --- a/src/abaqus/XY/XYCurveArray.py +++ b/src/abaqus/XY/XYCurveArray.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import List from .XYCurve import XYCurve diff --git a/src/abaqus/XY/XYData.py b/src/abaqus/XY/XYData.py index 886c336a60..0a4fad0610 100644 --- a/src/abaqus/XY/XYData.py +++ b/src/abaqus/XY/XYData.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Optional, Sequence, Tuple, Union, overload +from typing import Sequence, Union, overload from typing_extensions import Literal @@ -46,7 +46,7 @@ class XYData(tuple): #: A SymbolicConstant specifying the source type of the XYData object. Possible values are #: FROM_ODB, FROM_KEYBOARD, FROM_ASCII_FILE, FROM_OPERATION, and FROM_USER_DEFINED. - sourceType: Optional[SymbolicConstant] = None + sourceType: SymbolicConstant #: A String specifying the source file name of the XYData object. fileName: str = "" @@ -89,11 +89,11 @@ class XYData(tuple): #: A QuantityType object specifying the QuantityType object associated to the #: X -axis1- values. - axis1QuantityType: Optional[QuantityType] = None + axis1QuantityType: QuantityType | None = None #: A QuantityType object specifying the QuantityType object associated to #: the Y -axis2- values. - axis2QuantityType: Optional[QuantityType] = None + axis2QuantityType: QuantityType | None = None @overload @abaqus_method_doc @@ -107,8 +107,8 @@ def __init__( legendLabel: str = "", xValuesLabel: str = "", yValuesLabel: str = "", - axis1QuantityType: Optional[QuantityType] = None, - axis2QuantityType: Optional[QuantityType] = None, + axis1QuantityType: QuantityType | None = None, + axis2QuantityType: QuantityType | None = None, ): """This method creates an XYData object from a sequence of **X - Y** data pairs. @@ -196,11 +196,11 @@ def XYDataFromFile( legendLabel: str = "", xValuesLabel: str = "", yValuesLabel: str = "", - axis1QuantityType: Optional[QuantityType] = None, - axis2QuantityType: Optional[QuantityType] = None, + axis1QuantityType: QuantityType | None = None, + axis2QuantityType: QuantityType | None = None, xField: int = 1, yField: int = 2, - skipFrequency: Optional[int] = None, + skipFrequency: int | None = None, ) -> XYData: """This method creates an XYData object from data in an ASCII file. @@ -262,7 +262,7 @@ def XYDataFromFile( InvalidNameError RangeError """ - ... + return XYData() @abaqus_method_doc def XYDataFromHistory( @@ -275,10 +275,10 @@ def XYDataFromHistory( contentDescription: str = "", positionDescription: str = "", legendLabel: str = "", - skipFrequency: Optional[int] = None, + skipFrequency: int | None = None, numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, - stepTuple: Optional[int] = None, + stepTuple: int | None = None, ) -> XYData: """This method creates an XYData object by reading history data from an Odb object. @@ -338,15 +338,15 @@ def XYDataFromHistory( InvalidNameError RangeError """ - ... + return XYData() @abaqus_method_doc def xyDataListFromField( self, odb: Odb, outputPosition: Literal[C.ELEMENT_CENTROID, C.ELEMENT_NODAL, C.INTEGRATION_POINT, C.NODAL], - variable: Tuple[ - Tuple[ + variable: tuple[ + tuple[ str, Literal[ C.ELEMENT_CENTROID, @@ -360,13 +360,13 @@ def xyDataListFromField( C.WHOLE_PART_INSTANCE, C.WHOLE_REGION, ], - Tuple[Tuple[Literal[C.INVARIANT, C.COMPONENT], str], ...], + tuple[tuple[Literal[C.INVARIANT, C.COMPONENT], str], ...], ] ], - elementSets: Union[Sequence[str], str] = ..., - elementLabels: Sequence[Tuple[str, Union[int, str]]] = ..., - nodeSets: Union[str, Sequence[str]] = ..., - nodeLabels: Sequence[Tuple[str, Union[int, str]]] = ..., + elementSets: Union[Sequence[str], str] = (), + elementLabels: Sequence[tuple[str, Union[int, str]]] = (), + nodeSets: Union[str, Sequence[str]] = (), + nodeLabels: Sequence[tuple[str, Union[int, str]]] = (), numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, operator: Literal[ @@ -404,8 +404,9 @@ def xyDataListFromField( C.MAXIMUM_ENVELOPE, C.MINIMUM_ENVELOPE, C.RANGE_ALL, - ] = ..., - ) -> List[XYData]: + ] + | None = None, + ) -> list[XYData]: """This method creates a list of XYData objects by reading field data from an Odb object. .. note:: @@ -498,7 +499,7 @@ def xyDataListFromField( Returns ------- - List[XYData] + list[XYData] A list of XYData objects. Raises @@ -506,7 +507,7 @@ def xyDataListFromField( InvalidNameError RangeError """ - ... + return [XYData()] @abaqus_method_doc def XYDataFromFreeBody( @@ -519,7 +520,7 @@ def XYDataFromFreeBody( comp1: Boolean = OFF, comp2: Boolean = OFF, comp3: Boolean = OFF, - ) -> List[XYData]: + ) -> list[XYData]: """This method creates a list of XYData objects by computing free body data from an Odb object. .. note:: @@ -554,7 +555,7 @@ def XYDataFromFreeBody( Returns ------- - List[XYData] + list[XYData] A list of XYData objects. Raises @@ -562,15 +563,15 @@ def XYDataFromFreeBody( InvalidNameError RangeError """ - ... + return [XYData()] @abaqus_method_doc def XYDataFromShellThickness( self, odb: Odb, outputPosition: Literal[C.ELEMENT_CENTROID, C.ELEMENT_NODAL, C.INTEGRATION_POINT, C.NODAL], - variable: Tuple[ - Tuple[ + variable: tuple[ + tuple[ str, Literal[ C.ELEMENT_CENTROID, @@ -584,18 +585,18 @@ def XYDataFromShellThickness( C.WHOLE_PART_INSTANCE, C.WHOLE_REGION, ], - Tuple[Literal[C.INVARIANT, C.COMPONENT], str], - Dict[str, str], + tuple[Literal[C.INVARIANT, C.COMPONENT], str], + dict[str, str], ], ..., ], - elementSets: Union[str, Sequence[str]] = ..., - elementLabels: Sequence[Tuple[str, Union[int, str]]] = ..., - nodeSets: Union[str, Sequence[str]] = ..., - nodeLabels: Sequence[Tuple[str, Union[int, str]]] = ..., + elementSets: Union[str, Sequence[str]] = (), + elementLabels: Sequence[tuple[str, Union[int, str]]] = (), + nodeSets: Union[str, Sequence[str]] = (), + nodeLabels: Sequence[tuple[str, Union[int, str]]] = (), numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, - ) -> List[XYData]: + ) -> list[XYData]: """This method creates a list of XYData objects by reading through the thickness field data from an Odb object. @@ -673,7 +674,7 @@ def XYDataFromShellThickness( Returns ------- - List[XYData] + list[XYData] A list of XYData objects. Raises @@ -681,7 +682,7 @@ def XYDataFromShellThickness( InvalidNameError RangeError """ - ... + return [XYData()] @abaqus_method_doc def XYDataFromPath( @@ -706,27 +707,26 @@ def XYDataFromPath( viewport: str = "", removeDuplicateXYPairs: Boolean = True, includeAllElements: Boolean = False, - step: Optional[int] = None, - frame: Optional[int] = None, - variable: Optional[ - Literal[ - C.ELEMENT_FACE, - C.ELEMENT_NODAL, - C.S22, - C.WHOLE_ELEMENT, - C.NODAL, - C.INTEGRATION_POINT, - C.ELEMENT_CENTROID, - C.INVARIANT, - C.S11, - C.WHOLE_MODEL, - C.GENERAL_PARTICLE, - C.STEEL, - C.SNEG, - C.WHOLE_PART_INSTANCE, - ] - ] = None, - deformedMag: Optional[float] = None, + step: int | None = None, + frame: int | None = None, + variable: Literal[ + C.ELEMENT_FACE, + C.ELEMENT_NODAL, + C.S22, + C.WHOLE_ELEMENT, + C.NODAL, + C.INTEGRATION_POINT, + C.ELEMENT_CENTROID, + C.INVARIANT, + C.S11, + C.WHOLE_MODEL, + C.GENERAL_PARTICLE, + C.STEEL, + C.SNEG, + C.WHOLE_PART_INSTANCE, + ] + | None = None, + deformedMag: float | None = None, numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, projectOntoMesh: Boolean = False, @@ -849,7 +849,7 @@ def XYDataFromPath( ErrorDeformedMagTupleInPathExtract: Deformed magnification tuple must contain X, Y and Z values If **deformedMag** does not contain three Floats. """ - ... + return XYData() @abaqus_method_doc def save(self): @@ -868,8 +868,8 @@ def setValues( legendLabel: str = "", xValuesLabel: str = "", yValuesLabel: str = "", - axis1QuantityType: Optional[QuantityType] = None, - axis2QuantityType: Optional[QuantityType] = None, + axis1QuantityType: QuantityType | None = None, + axis2QuantityType: QuantityType | None = None, ): """This method modifies the XYData object. diff --git a/src/abaqus/XY/XYPlot.py b/src/abaqus/XY/XYPlot.py index b602b3a3a9..9ec4cc0410 100644 --- a/src/abaqus/XY/XYPlot.py +++ b/src/abaqus/XY/XYPlot.py @@ -1,19 +1,16 @@ from __future__ import annotations -from typing import Optional, overload +from typing import overload + +from typing_extensions import Literal from abqpy.decorators import abaqus_class_doc, abaqus_method_doc -from ..UtilityAndView.abaqusConstants import ( - FILLED_CIRCLE, - ON, - SOLID, - Boolean, - SymbolicConstant, -) +from ..UtilityAndView.abaqusConstants import FILLED_CIRCLE, NONE, ON, SOLID, Boolean +from ..UtilityAndView.abaqusConstants import abaqusConstants as C from .AreaStyle import AreaStyle from .LineStyle import LineStyle -from .QuantityType import QuantityType +from .QuantityType import QuantityType as QuantityTypeType from .SymbolStyle import SymbolStyle from .TextStyle import TextStyle from .XYData import XYData @@ -24,7 +21,7 @@ class XYPlot(XYPlotBase): @staticmethod @abaqus_method_doc - def AreaStyle(color: str = "", fill: Boolean = ON, style: SymbolicConstant = SOLID) -> AreaStyle: + def AreaStyle(color: str = "", fill: Boolean = ON, style: Literal[C.SOLID] = SOLID) -> AreaStyle: """This method creates an AreaStyle. .. note:: @@ -62,7 +59,7 @@ def AreaStyle(color: str = "", fill: Boolean = ON, style: SymbolicConstant = SOL def LineStyle( color: str = "", show: Boolean = ON, - style: SymbolicConstant = SOLID, + style: Literal[C.SOLID] = SOLID, thickness: float = 0, ) -> LineStyle: """This method creates a LineStyle. @@ -103,7 +100,83 @@ def LineStyle( @staticmethod @abaqus_method_doc - def QuantityType(label: str = "", type: Optional[SymbolicConstant] = None) -> QuantityType: + def QuantityType( + label: str = "", + type: Literal[ + C.NONE, + C.ACCELERATION, + C.ACOUSTIC_INTENSITY, + C.ANGLE, + C.ANGULAR_MOMENTUM, + C.ARC_LENGTH, + C.AREA, + C.AREA_VELOCITY_SQUARED, + C.BIMOMENT, + C.CURVATURE, + C.CORIOLIS_LOAD, + C.DAMAGE, + C.DAMAGE_CRITERION, + C.DENSITY, + C.DENSITY_ROTATIONAL_ACCELERATION, + C.DISPLACEMENT, + C.ECURRENT_AREA_TIME, + C.ELECTRIC_CHARGE, + C.ELECTRIC_CURRENT, + C.ELECTRIC_CURRENT_AREA, + C.ELECTRIC_POTENTIAL, + C.ENERGY, + C.ENERGY_DENSITY, + C.ENERGY_RELEASE_RATE, + C.EPOTENTIAL_GRADIENT, + C.FREQUENCY, + C.FORCE, + C.FORCE_VOLUME, + C.HEAT_FLUX, + C.HEAT_FLUX_AREA, + C.HEAT_FLUX_RATE, + C.HEAT_FLUX_VOLUME, + C.LENGTH, + C.LINEAR_PRESSURE, + C.LUMIN, + C.MASS, + C.MASS_FLOW_AREA, + C.MASS_FLOW_AREA_RATE, + C.MASS_FLOW_RATE, + C.MODE_NUMBER, + C.MOMENT, + C.NUMBER, + C.PATH, + C.PHASE, + C.POSITION, + C.PRESSURE, + C.PRESSURE_GRADIENT, + C.RATE, + C.ROTARY_INERTIA, + C.ROTATIONAL_ACCELERATION, + C.ROTATIONAL_VELOCITY, + C.STATUS, + C.STRAIN, + C.STRAIN_RATE, + C.STRESS, + C.STRESS_INTENS_FACTOR, + C.SUBSTANCE, + C.TEMPERATURE, + C.THICKNESS, + C.TIME, + C.TIME_INCREMENT, + C.TIME_HEAT_FLUX, + C.TIME_HEAT_FLUX_AREA, + C.TIME_VOLUME, + C.TIME_VOLUME_FLUX, + C.TWIST, + C.VELOCITY, + C.VELOCITY_SQUARED, + C.VOLUME, + C.VOLUME_FLUX, + C.VOLUME_FLUX_AREA, + C.VOLUME_FRACTION, + ] = NONE, + ) -> QuantityTypeType: """This method creates a QuantityType object. .. note:: @@ -199,7 +272,7 @@ def QuantityType(label: str = "", type: Optional[SymbolicConstant] = None) -> Qu QuantityType A QuantityType object. """ - quantityType = QuantityType(label, type) + quantityType = QuantityTypeType(label, type) return quantityType @staticmethod @@ -207,7 +280,19 @@ def QuantityType(label: str = "", type: Optional[SymbolicConstant] = None) -> Qu def SymbolStyle( color: str = "", show: Boolean = ON, - marker: SymbolicConstant = FILLED_CIRCLE, + marker: Literal[ + C.CROSS, + C.FILLED_DIAMOND, + C.FILLED_SQUARE, + C.POINT, + C.HOLLOW_CIRCLE, + C.HOLLOW_TRI, + C.HOLLOW_SQUARE, + C.FILLED_TRI, + C.HOLLOW_DIAMOND, + C.FILLED_CIRCLE, + C.XMARKER, + ] = FILLED_CIRCLE, size: float = 2, ) -> SymbolStyle: """This method creates a SymbolStyle object. @@ -309,8 +394,8 @@ def XYData( legendLabel: str = "", xValuesLabel: str = "", yValuesLabel: str = "", - axis1QuantityType: Optional[QuantityType] = None, - axis2QuantityType: Optional[QuantityType] = None, + axis1QuantityType: QuantityTypeType | None = None, + axis2QuantityType: QuantityTypeType | None = None, ) -> XYData: """This method creates an XYData object from a sequence of **X - Y** data pairs. diff --git a/src/abaqus/XY/XYPlotBase.py b/src/abaqus/XY/XYPlotBase.py index dc8fb8facb..2bbc710ad2 100644 --- a/src/abaqus/XY/XYPlotBase.py +++ b/src/abaqus/XY/XYPlotBase.py @@ -1,4 +1,4 @@ -from typing import Dict, Optional +from __future__ import annotations from abqpy.decorators import abaqus_class_doc, abaqus_method_doc @@ -28,14 +28,14 @@ class XYPlotBase: title: Title = Title() #: A repository of Chart objects. - charts: Dict[str, Chart] = {} + charts: dict[str, Chart] = {} #: A repository of XYCurve objects. - curves: Dict[str, XYCurve] = {} + curves: dict[str, XYCurve] = {} #: A tuple of Floats specifying a transformation matrix used to scale or pan along the axes #: of the active Chart object of this XYPlot. - transform: Optional[float] = None + transform: float | None = None @abaqus_method_doc def __init__(self, name: str): diff --git a/src/abaqus/XY/XYSession.py b/src/abaqus/XY/XYSession.py index 74bbf77479..60dca26f0f 100644 --- a/src/abaqus/XY/XYSession.py +++ b/src/abaqus/XY/XYSession.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Dict, List, Sequence, Tuple, Union, overload +from typing import Sequence, Union, overload from typing_extensions import Literal @@ -9,24 +9,21 @@ from ..Odb.Odb import Odb from ..PathAndProbe.Path import Path from ..UtilityAndView.abaqusConstants import ( - COMPLEX_VAL_AT_ANGLE, FILLED_CIRCLE, - IMAGINARY, NONE, OFF, ON, REAL, SOLID, Boolean, - SymbolicConstant, ) from ..UtilityAndView.SymbolicConstant import abaqusConstants as C from .AreaStyle import AreaStyle from .LineStyle import LineStyle -from .QuantityType import QuantityType +from .QuantityType import QuantityType as QuantityTypeType from .SymbolStyle import SymbolStyle from .TextStyle import TextStyle -from .XYData import XYData +from .XYData import XYData as XYDataType from .XYSessionBase import XYSessionBase @@ -34,7 +31,7 @@ class XYSession(XYSessionBase): @staticmethod @abaqus_method_doc - def AreaStyle(color: str = "", fill: Boolean = ON, style: SymbolicConstant = SOLID) -> AreaStyle: + def AreaStyle(color: str = "", fill: Boolean = ON, style: Literal[C.SOLID] = SOLID) -> AreaStyle: """This method creates an AreaStyle. .. note:: @@ -189,7 +186,7 @@ def QuantityType( C.VOLUME_FLUX_AREA, C.VOLUME_FRACTION, ] = NONE, - ) -> QuantityType: + ) -> QuantityTypeType: """This method creates a QuantityType object. .. note:: @@ -285,7 +282,7 @@ def QuantityType( QuantityType A QuantityType object. """ - quantityType = QuantityType(label, type) + quantityType = QuantityTypeType(label, type) return quantityType @staticmethod @@ -407,9 +404,9 @@ def XYData( legendLabel: str = "", xValuesLabel: str = "", yValuesLabel: str = "", - axis1QuantityType: QuantityType = ..., - axis2QuantityType: QuantityType = ..., - ) -> XYData: + axis1QuantityType: QuantityTypeType = QuantityTypeType(), + axis2QuantityType: QuantityTypeType = QuantityTypeType(), + ) -> XYDataType: """This method creates an XYData object from a sequence of **X - Y** data pairs. .. note:: @@ -462,7 +459,7 @@ def XYData( @staticmethod @overload @abaqus_method_doc - def XYData(objectToCopy: XYData) -> XYData: + def XYData(objectToCopy: XYDataType) -> XYDataType: """This method creates an XYData object by copying an existing XYData object. .. note:: @@ -486,8 +483,8 @@ def XYData(objectToCopy: XYData) -> XYData: @staticmethod @abaqus_method_doc - def XYData(*args, **kwargs) -> XYData: - return XYData(()) + def XYData(*args, **kwargs) -> XYDataType: + return XYDataType(()) def XYDataFromFile( self, @@ -499,12 +496,12 @@ def XYDataFromFile( legendLabel: str = "", xValuesLabel: str = "", yValuesLabel: str = "", - axis1QuantityType: QuantityType = ..., - axis2QuantityType: QuantityType = ..., + axis1QuantityType: QuantityTypeType = QuantityTypeType(), + axis2QuantityType: QuantityTypeType = QuantityTypeType(), xField: int = 1, yField: int = 2, skipFrequency: int = 0, - ) -> XYData: + ) -> XYDataType: """This method creates an XYData object from data in an ASCII file. .. note:: @@ -565,7 +562,7 @@ def XYDataFromFile( InvalidNameError RangeError """ - self.xyDataObjects[name] = xyData = XYData(()) + self.xyDataObjects[name] = xyData = XYDataType(()) return xyData @abaqus_method_doc @@ -582,8 +579,8 @@ def XYDataFromHistory( skipFrequency: int = 0, numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, - stepTuple: Sequence[int] = ..., - ) -> XYData: + stepTuple: Sequence[int] = (), + ) -> XYDataType: """This method creates an XYData object by reading history data from an Odb object. .. note:: @@ -642,7 +639,7 @@ def XYDataFromHistory( InvalidNameError RangeError """ - self.xyDataObjects[name] = xyData = XYData(()) + self.xyDataObjects[name] = xyData = XYDataType(()) return xyData @abaqus_method_doc @@ -650,8 +647,8 @@ def xyDataListFromField( self, odb: Odb, outputPosition: Literal[C.ELEMENT_CENTROID, C.ELEMENT_NODAL, C.INTEGRATION_POINT, C.NODAL], - variable: Tuple[ - Tuple[ + variable: tuple[ + tuple[ str, Literal[ C.ELEMENT_CENTROID, @@ -665,13 +662,13 @@ def xyDataListFromField( C.WHOLE_PART_INSTANCE, C.WHOLE_REGION, ], - Tuple[Tuple[Literal[C.INVARIANT, C.COMPONENT], str], ...], + tuple[tuple[Literal[C.INVARIANT, C.COMPONENT], str], ...], ] ], - elementSets: Union[Sequence[str], str] = ..., - elementLabels: Sequence[Tuple[str, Union[int, str]]] = ..., - nodeSets: Union[str, Sequence[str]] = ..., - nodeLabels: Sequence[Tuple[str, Union[int, str]]] = ..., + elementSets: Union[Sequence[str], str] = (), + elementLabels: Sequence[tuple[str, Union[int, str]]] = (), + nodeSets: Union[str, Sequence[str]] = (), + nodeLabels: Sequence[tuple[str, Union[int, str]]] = (), numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, operator: Literal[ @@ -709,8 +706,9 @@ def xyDataListFromField( C.MAXIMUM_ENVELOPE, C.MINIMUM_ENVELOPE, C.RANGE_ALL, - ] = ..., - ) -> List[XYData]: + ] + | None = None, + ) -> list[XYDataType]: """This method creates a list of XYData objects by reading field data from an Odb object. .. note:: @@ -803,7 +801,7 @@ def xyDataListFromField( Returns ------- - List[XYData] + list[XYData] A list of XYData objects. Raises @@ -811,7 +809,7 @@ def xyDataListFromField( InvalidNameError RangeError """ - self.xyDataObjects["name"] = xyData = XYData(()) + self.xyDataObjects["name"] = xyData = XYDataType(()) return [xyData] @abaqus_method_doc @@ -825,7 +823,7 @@ def XYDataFromFreeBody( comp1: Boolean = OFF, comp2: Boolean = OFF, comp3: Boolean = OFF, - ) -> List[XYData]: + ) -> list[XYDataType]: """This method creates a list of XYData objects by computing free body data from an Odb object. .. note:: @@ -860,7 +858,7 @@ def XYDataFromFreeBody( Returns ------- - List[XYData] + list[XYData] A list of XYData objects. Raises @@ -868,7 +866,7 @@ def XYDataFromFreeBody( InvalidNameError RangeError """ - self.xyDataObjects["name"] = xyData = XYData(()) + self.xyDataObjects["name"] = xyData = XYDataType(()) return [xyData] @abaqus_method_doc @@ -876,8 +874,8 @@ def XYDataFromShellThickness( self, odb: Odb, outputPosition: Literal[C.ELEMENT_CENTROID, C.ELEMENT_NODAL, C.INTEGRATION_POINT, C.NODAL], - variable: Tuple[ - Tuple[ + variable: tuple[ + tuple[ str, Literal[ C.ELEMENT_CENTROID, @@ -891,18 +889,18 @@ def XYDataFromShellThickness( C.WHOLE_PART_INSTANCE, C.WHOLE_REGION, ], - Tuple[Literal[C.INVARIANT, C.COMPONENT], str], - Dict[str, str], + tuple[Literal[C.INVARIANT, C.COMPONENT], str], + dict[str, str], ], ..., ], - elementSets: Union[str, Sequence[str]] = ..., - elementLabels: Sequence[Tuple[str, Union[int, str]]] = (), + elementSets: Union[str, Sequence[str]] = (), + elementLabels: Sequence[tuple[str, Union[int, str]]] = (), nodeSets: Union[str, Sequence[str]] = (), - nodeLabels: Sequence[Tuple[str, Union[int, str]]] = (), + nodeLabels: Sequence[tuple[str, Union[int, str]]] = (), numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, - ) -> List[XYData]: + ) -> list[XYDataType]: """This method creates a list of XYData objects by reading through the thickness field data from an Odb object. @@ -986,7 +984,7 @@ def XYDataFromShellThickness( Returns ------- - List[XYData] + list[XYData] A list of XYData objects. Raises @@ -994,7 +992,7 @@ def XYDataFromShellThickness( InvalidNameError RangeError """ - self.xyDataObjects["name"] = xyData = XYData(()) + self.xyDataObjects["name"] = xyData = XYDataType(()) return [xyData] @abaqus_method_doc @@ -1003,8 +1001,8 @@ def XYDataFromPath( path: Path, name: str, includeIntersections: Boolean = False, - shape: Literal[C.UNDEFORMED, C.DEFORMED] = ..., - pathStyle: Literal[C.PATH_POINTS, C.UNIFORM_SPACING] = ..., + shape: Literal[C.UNDEFORMED, C.DEFORMED] = C.UNDEFORMED, + pathStyle: Literal[C.PATH_POINTS, C.UNIFORM_SPACING] = C.PATH_POINTS, numIntervals: int = 10, labelType: Literal[ C.NORM_DISTANCE, @@ -1016,14 +1014,14 @@ def XYDataFromPath( C.X_COORDINATE, C.Y_COORDINATE, C.Z_COORDINATE, - ] = ..., - viewport: str = ..., + ] = C.NORM_DISTANCE, + viewport: str | int = "", removeDuplicateXYPairs: Boolean = True, includeAllElements: Boolean = False, - step: int = ..., - frame: int = ..., - variable: Tuple[ - Tuple[ + step: int = 0, + frame: int = 0, + variable: tuple[ + tuple[ str, Literal[ C.ELEMENT_CENTROID, @@ -1037,17 +1035,17 @@ def XYDataFromPath( C.WHOLE_PART_INSTANCE, C.WHOLE_REGION, ], - Tuple[Literal[C.INVARIANT, C.COMPONENT], str], - Dict[str, str], + tuple[Literal[C.INVARIANT, C.COMPONENT], str], + dict[str, str], ], ..., - ] = ..., - deformedMag: Tuple[float, float, float] = (1, 1, 1), - numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, IMAGINARY, COMPLEX_VAL_AT_ANGLE] = REAL, + ] = (), + deformedMag: tuple[float, float, float] = (1, 1, 1), + numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, projectOntoMesh: Boolean = False, projectionTolerance: float = 0, - ) -> XYData: + ) -> XYDataType: """This method creates an XYData object from path information. .. note:: @@ -1173,5 +1171,5 @@ def XYDataFromPath( ErrorDeformedMagTupleInPathExtract: Deformed magnification tuple must contain X, Y and Z values If **deformedMag** does not contain three Floats. """ - self.xyDataObjects[name] = xyData = XYData(()) + self.xyDataObjects[name] = xyData = XYDataType(()) return xyData diff --git a/src/abaqus/XY/XYSessionBase.py b/src/abaqus/XY/XYSessionBase.py index 1b9968f0e1..5f0888e9ee 100644 --- a/src/abaqus/XY/XYSessionBase.py +++ b/src/abaqus/XY/XYSessionBase.py @@ -1,4 +1,4 @@ -from typing import Optional +from __future__ import annotations from typing_extensions import Literal @@ -33,8 +33,8 @@ def linearizeStress( xyBendingComps: tuple, invariantBendingComps: tuple = (), intervals: int = 40, - radiusOfCurvature: Optional[float] = None, - oopRadiusOfCurvature: Optional[float] = None, + radiusOfCurvature: float | None = None, + oopRadiusOfCurvature: float | None = None, curvatureCorrection: Boolean = OFF, curvatureCsys: str = "", useCurvatureCsysForOrient: Boolean = OFF, @@ -124,7 +124,7 @@ def linearizeStress( Returns ------- - List[XYData] + list[XYData] A list of xyData objects. Raises @@ -174,7 +174,7 @@ def getPathTolerance(self): ... @abaqus_method_doc - def setLimitForXYDataPlots(self, limit: Optional[int] = None): + def setLimitForXYDataPlots(self, limit: int | None = None): """This method is used to set the **limit** for number of XY data objects while creating XYData from field output. diff --git a/src/abaqus/XY/writeXYReport.py b/src/abaqus/XY/writeXYReport.py index 1d35f7d55e..a2efc687ce 100644 --- a/src/abaqus/XY/writeXYReport.py +++ b/src/abaqus/XY/writeXYReport.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Sequence from abqpy.decorators import abaqus_function_doc diff --git a/src/abaqus/_OptionsBase.py b/src/abaqus/_OptionsBase.py index 4fc234db92..f88790c68d 100644 --- a/src/abaqus/_OptionsBase.py +++ b/src/abaqus/_OptionsBase.py @@ -1,12 +1,13 @@ +from __future__ import annotations + import inspect -from typing import List class _OptionsBase: """This is a base class for all options classes.""" @classmethod - def get_user_attributes(cls) -> List[str]: + def get_user_attributes(cls) -> list[str]: """Returns a list of the user attributes of the class. Returns diff --git a/src/abaqus/__init__.py b/src/abaqus/__init__.py index a4df1b22ed..933e084a3f 100644 --- a/src/abaqus/__init__.py +++ b/src/abaqus/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import sys from math import * diff --git a/src/abaqus/builtin.py b/src/abaqus/builtin.py index e99f8238ff..01488c443e 100644 --- a/src/abaqus/builtin.py +++ b/src/abaqus/builtin.py @@ -1,10 +1,12 @@ -from typing import Any, Dict, Optional +from __future__ import annotations + +from typing import Any def execfile( filename: str, - globals: Optional[Dict[str, Any]] = None, - locals: Optional[Dict[str, Any]] = None, + globals: dict[str, Any] | None = None, + locals: dict[str, Any] | None = None, ) -> None: """Read and execute a Python script from a file. The globals and locals are dictionaries, defaulting to the current globals and locals. If only globals is given, locals defaults to it. @@ -12,16 +14,16 @@ def execfile( Parameters ---------- filename : os.PathLike - globals : Optional[dict], optional, by default None - locals : Optional[dict], optional, by default None + globals : dict | None, optional, by default None + locals : dict | None, optional, by default None """ ... def execPyFile( filePath: str, - globs: Optional[Dict[str, Any]] = None, - locs: Optional[Dict[str, Any]] = None, + globs: dict[str, Any] | None = None, + locs: dict[str, Any] | None = None, atxPort: int = -1, ) -> None: """Similar to execfile, but will run a compiled .pyc file @@ -33,8 +35,8 @@ def execPyFile( Parameters ---------- filePath : os.PathLike - globs : Optional[dict], optional, by default None - locs : Optional[dict], optional, by default None + globs : dict | None, optional, by default None + locs : dict | None, optional, by default None atxPort : int, optional, by default -1 """ ... diff --git a/src/abaqusConstants.py b/src/abaqusConstants.py index 5ed871cbe6..91fd57015b 100644 --- a/src/abaqusConstants.py +++ b/src/abaqusConstants.py @@ -1 +1,3 @@ +from __future__ import annotations + from abaqus.UtilityAndView.abaqusConstants import * diff --git a/src/abqpy/cli.py b/src/abqpy/cli.py index 8f33b3a22c..3c864fd3e6 100644 --- a/src/abqpy/cli.py +++ b/src/abqpy/cli.py @@ -45,12 +45,12 @@ def optimization( task: str, job: str, *, - cpus: int = None, - gpus: int = None, - memory: int = None, + cpus: int | None = None, + gpus: int | None = None, + memory: int | None = None, interactive: bool = False, - globalmodel: str = None, - scratch: str = None, + globalmodel: str | None = None, + scratch: str | None = None, **kwargs, ): """Run Abaqus optimization command. @@ -226,9 +226,9 @@ def cae( self, script: str, *args, - database: str = None, - replay: str = None, - recover: str = None, + database: str | None = None, + replay: str | None = None, + recover: str | None = None, gui: bool = False, noenvstartup: bool = False, noSavedOptions: bool = False, @@ -285,8 +285,8 @@ def python( self, script: str, *args, - sim: str = None, - log: str = None, + sim: str | None = None, + log: str | None = None, **kwargs, ): """Run Abaqus/Python command. diff --git a/src/animation.py b/src/animation.py index e69de29bb2..9d48db4f9f 100644 --- a/src/animation.py +++ b/src/animation.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/annotationToolset.py b/src/annotationToolset.py index e69de29bb2..9d48db4f9f 100644 --- a/src/annotationToolset.py +++ b/src/annotationToolset.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/assembly.py b/src/assembly.py index e69de29bb2..9d48db4f9f 100644 --- a/src/assembly.py +++ b/src/assembly.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/caeModules.py b/src/caeModules.py index c6226f3978..11439695d0 100644 --- a/src/caeModules.py +++ b/src/caeModules.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from os import environ as _environ import abaqus diff --git a/src/caePrefsAccess.py b/src/caePrefsAccess.py index 8f079208a8..e20a990d04 100644 --- a/src/caePrefsAccess.py +++ b/src/caePrefsAccess.py @@ -1 +1,3 @@ +from __future__ import annotations + from abaqus.AbaqusCAEDisplayPreferences.caePrefsAccess import * diff --git a/src/calibration.py b/src/calibration.py index e69de29bb2..9d48db4f9f 100644 --- a/src/calibration.py +++ b/src/calibration.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/connector.py b/src/connector.py index e69de29bb2..9d48db4f9f 100644 --- a/src/connector.py +++ b/src/connector.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/connectorBehavior.py b/src/connectorBehavior.py index f26388c6b4..aae00e66d4 100644 --- a/src/connectorBehavior.py +++ b/src/connectorBehavior.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from abaqus.Connector.ConnectorDamage import ConnectorDamage from abaqus.Connector.ConnectorDamping import ConnectorDamping from abaqus.Connector.ConnectorElasticity import ConnectorElasticity diff --git a/src/customKernel.py b/src/customKernel.py index 9b8235c989..77779ee79d 100644 --- a/src/customKernel.py +++ b/src/customKernel.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from abaqus.CustomKernel.CommandRegister import CommandRegister from abaqus.CustomKernel.RegisteredDictionary import RegisteredDictionary from abaqus.CustomKernel.RegisteredList import RegisteredList diff --git a/src/deleteObjectCallback.py b/src/deleteObjectCallback.py index e69de29bb2..9d48db4f9f 100644 --- a/src/deleteObjectCallback.py +++ b/src/deleteObjectCallback.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/displayGroupMdbToolset.py b/src/displayGroupMdbToolset.py index 559f182021..c4c72d6382 100644 --- a/src/displayGroupMdbToolset.py +++ b/src/displayGroupMdbToolset.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from abaqus.DisplayGroup.Leaf import Leaf from abaqus.DisplayGroup.LeafFromConstraintNames import LeafFromConstraintNames from abaqus.DisplayGroup.LeafFromDisplayGroup import LeafFromDisplayGroup diff --git a/src/displayGroupOdbToolset.py b/src/displayGroupOdbToolset.py index 2d8167cae0..d019fb462f 100644 --- a/src/displayGroupOdbToolset.py +++ b/src/displayGroupOdbToolset.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from abaqus.DisplayGroup.Leaf import Leaf from abaqus.DisplayGroup.LeafFromDatums import LeafFromDatums from abaqus.DisplayGroup.LeafFromDisplayGroup import LeafFromDisplayGroup diff --git a/src/driverUtils.py b/src/driverUtils.py index 46d4c4154a..a03475e7c9 100644 --- a/src/driverUtils.py +++ b/src/driverUtils.py @@ -1,3 +1,6 @@ +from __future__ import annotations + + def executeOnCaeStartup(): """Execute onCaeStartup function in the relevant namespace.""" # callStartupMethod('onCaeStartup') diff --git a/src/field.py b/src/field.py index e69de29bb2..9d48db4f9f 100644 --- a/src/field.py +++ b/src/field.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/fields.py b/src/fields.py index e69de29bb2..9d48db4f9f 100644 --- a/src/fields.py +++ b/src/fields.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/inpParser.py b/src/inpParser.py index f2c09a6035..87716aea38 100644 --- a/src/inpParser.py +++ b/src/inpParser.py @@ -1 +1,3 @@ +from __future__ import annotations + from abaqus.InputFileParser.InputFile import InputFile diff --git a/src/interaction.py b/src/interaction.py index e69de29bb2..9d48db4f9f 100644 --- a/src/interaction.py +++ b/src/interaction.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/job.py b/src/job.py index 416dc037c7..5ed2a03b56 100644 --- a/src/job.py +++ b/src/job.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from abaqus.Job.Job import Job from abaqus.Odb.AnalyticSurfaceSegment import AnalyticSurfaceSegment from abaqus.Odb.HistoryPoint import HistoryPoint diff --git a/src/load.py b/src/load.py index a0c7cc253d..ed44818637 100644 --- a/src/load.py +++ b/src/load.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from regionToolset import Region from sketch import Sketch, SketchTransform from xyPlot import ( diff --git a/src/material.py b/src/material.py index 7acd0fbd28..46f533114e 100644 --- a/src/material.py +++ b/src/material.py @@ -1 +1,3 @@ +from __future__ import annotations + from abaqus.Material.evaluateMaterial import evaluateMaterial diff --git a/src/mesh.py b/src/mesh.py index 04e4df52f5..4b78f53e6f 100644 --- a/src/mesh.py +++ b/src/mesh.py @@ -1,2 +1,4 @@ +from __future__ import annotations + from abaqus.Mesh.ElemType import ElemType from abaqusConstants import * diff --git a/src/meshEdit.py b/src/meshEdit.py index e69de29bb2..9d48db4f9f 100644 --- a/src/meshEdit.py +++ b/src/meshEdit.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/methodCallback.py b/src/methodCallback.py index e69de29bb2..9d48db4f9f 100644 --- a/src/methodCallback.py +++ b/src/methodCallback.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/monitorManager.py b/src/monitorManager.py index e69de29bb2..9d48db4f9f 100644 --- a/src/monitorManager.py +++ b/src/monitorManager.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/odbAccess.py b/src/odbAccess.py index 5fb92e64cd..c5e8af37f0 100644 --- a/src/odbAccess.py +++ b/src/odbAccess.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from math import * from abqpy import run diff --git a/src/odbConnectorBehavior.py b/src/odbConnectorBehavior.py index f26388c6b4..aae00e66d4 100644 --- a/src/odbConnectorBehavior.py +++ b/src/odbConnectorBehavior.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from abaqus.Connector.ConnectorDamage import ConnectorDamage from abaqus.Connector.ConnectorDamping import ConnectorDamping from abaqus.Connector.ConnectorElasticity import ConnectorElasticity diff --git a/src/odbMaterial.py b/src/odbMaterial.py index e69de29bb2..9d48db4f9f 100644 --- a/src/odbMaterial.py +++ b/src/odbMaterial.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/odbSection.py b/src/odbSection.py index e69de29bb2..9d48db4f9f 100644 --- a/src/odbSection.py +++ b/src/odbSection.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/optimization.py b/src/optimization.py index a0c7cc253d..ed44818637 100644 --- a/src/optimization.py +++ b/src/optimization.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from regionToolset import Region from sketch import Sketch, SketchTransform from xyPlot import ( diff --git a/src/part.py b/src/part.py index 9db77cde4e..09756baa50 100644 --- a/src/part.py +++ b/src/part.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import displayGroupMdbToolset from abaqus import mdb from abaqusConstants import * diff --git a/src/redentABQ.py b/src/redentABQ.py index df940fcf0a..b143554832 100644 --- a/src/redentABQ.py +++ b/src/redentABQ.py @@ -1 +1,3 @@ +from __future__ import annotations + from abaqus.TextRepresentation.redentABQ import * diff --git a/src/regionToolset.py b/src/regionToolset.py index e7bcd88547..269e23d35a 100644 --- a/src/regionToolset.py +++ b/src/regionToolset.py @@ -1 +1,3 @@ +from __future__ import annotations + from abaqus.Region.Region import Region diff --git a/src/section.py b/src/section.py index 570ed82a37..a00b408747 100644 --- a/src/section.py +++ b/src/section.py @@ -1 +1,3 @@ +from __future__ import annotations + from abaqus.Property.PlyStackPlot import MdbPlyStackPlot diff --git a/src/sketch.py b/src/sketch.py index b58b0f3f0a..fd03cdb7f2 100644 --- a/src/sketch.py +++ b/src/sketch.py @@ -1,9 +1,12 @@ +from __future__ import annotations + + class FeatureSketch: ... def Sketch(self, sheetSize: float = 200, gridSize: float = 5) -> FeatureSketch: - ... + return FeatureSketch() def SketchTransform(): diff --git a/src/step.py b/src/step.py index e7bcd88547..269e23d35a 100644 --- a/src/step.py +++ b/src/step.py @@ -1 +1,3 @@ +from __future__ import annotations + from abaqus.Region.Region import Region diff --git a/src/symbolicConstants.py b/src/symbolicConstants.py index d8c35e58af..d09c0994f0 100644 --- a/src/symbolicConstants.py +++ b/src/symbolicConstants.py @@ -23,4 +23,6 @@ module, and makes this module aware of the cache by adding the _addSymConstToTable function to this module. Outside Abaqus/CAE, we do not have the same requirement. """ +from __future__ import annotations + from abaqusConstants import * diff --git a/src/textRepr.py b/src/textRepr.py index d96a09c5db..36282f0029 100644 --- a/src/textRepr.py +++ b/src/textRepr.py @@ -1 +1,3 @@ +from __future__ import annotations + from abaqus.TextRepresentation.textRepr import * diff --git a/src/upgradeScript.py b/src/upgradeScript.py index e69de29bb2..9d48db4f9f 100644 --- a/src/upgradeScript.py +++ b/src/upgradeScript.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/src/visualization.py b/src/visualization.py index 0e9ada1670..bf4cd54871 100644 --- a/src/visualization.py +++ b/src/visualization.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from abaqus import session from abaqus.Odb.OdbCommands import * from abaqus.Property.PlyStackPlot import OdbPlyStackPlot diff --git a/src/xyPlot.py b/src/xyPlot.py index f8a32a7b75..9c2bfa2ce7 100644 --- a/src/xyPlot.py +++ b/src/xyPlot.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Dict, List, Optional, Sequence, Tuple, Union from typing_extensions import Literal @@ -25,11 +27,11 @@ def XYDataFromFile( legendLabel: str = "", xValuesLabel: str = "", yValuesLabel: str = "", - axis1QuantityType: Optional[QuantityType] = None, - axis2QuantityType: Optional[QuantityType] = None, + axis1QuantityType: QuantityType | None = None, + axis2QuantityType: QuantityType | None = None, xField: int = 1, yField: int = 2, - skipFrequency: Optional[int] = None, + skipFrequency: int | None = None, ) -> XYData: """This method creates an XYData object from data in an ASCII file. @@ -158,10 +160,10 @@ def XYDataFromHistory( contentDescription: str = "", positionDescription: str = "", legendLabel: str = "", - skipFrequency: Optional[int] = None, + skipFrequency: int | None = None, numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, - stepTuple: Optional[int] = None, + stepTuple: int | None = None, ) -> XYData: """This method creates an XYData object by reading history data from an Odb object. @@ -245,10 +247,10 @@ def XYDataFromPath( viewport: str = "", removeDuplicateXYPairs: Boolean = True, includeAllElements: Boolean = False, - step: Optional[int] = None, - frame: Optional[int] = None, - variable: Optional[SymbolicConstant] = None, - deformedMag: Optional[float] = None, + step: int | None = None, + frame: int | None = None, + variable: SymbolicConstant | None = None, + deformedMag: float | None = None, numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, projectOntoMesh: Boolean = False, @@ -397,10 +399,10 @@ def XYDataFromShellThickness( ], ..., ], - elementSets: Union[str, Sequence[str]] = ..., - elementLabels: Sequence[Tuple[str, Union[int, str]]] = ..., - nodeSets: Union[str, Sequence[str]] = ..., - nodeLabels: Sequence[Tuple[str, Union[int, str]]] = ..., + elementSets: Union[str, Sequence[str]] = (), + elementLabels: Sequence[Tuple[str, Union[int, str]]] = (), + nodeSets: Union[str, Sequence[str]] = (), + nodeLabels: Sequence[Tuple[str, Union[int, str]]] = (), numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, ) -> List[XYData]: @@ -515,10 +517,10 @@ def xyDataListFromField( ], ..., ], - elementSets: Union[Sequence[str], str] = ..., - elementLabels: Sequence[Tuple[str, Union[int, str]]] = ..., - nodeSets: Union[str, Sequence[str]] = ..., - nodeLabels: Sequence[Tuple[str, Union[int, str]]] = ..., + elementSets: Union[Sequence[str], str] = (), + elementLabels: Sequence[Tuple[str, Union[int, str]]] = (), + nodeSets: Union[str, Sequence[str]] = (), + nodeLabels: Sequence[Tuple[str, Union[int, str]]] = (), numericForm: Literal[C.COMPLEX_MAGNITUDE, C.COMPLEX_PHASE, C.REAL, C.IMAGINARY, C.COMPLEX_VAL_AT_ANGLE] = REAL, complexAngle: float = 0, operator: Literal[ @@ -556,7 +558,8 @@ def xyDataListFromField( C.MAXIMUM_ENVELOPE, C.MINIMUM_ENVELOPE, C.RANGE_ALL, - ] = ..., + ] + | None = None, ) -> List[XYData]: """This method creates a list of XYData objects by reading field data from an Odb object.