Skip to content

fix: IntEnum to Enum #1099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/1099.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: intenum to enum
6 changes: 3 additions & 3 deletions src/ansys/meshing/prime/autogen/automeshstructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from ansys.meshing.prime.params.primestructs import *

class VolumeFillType(enum.IntEnum):
class VolumeFillType(enum.Enum):
"""Types of volume fill options.
"""
TET = 0
Expand All @@ -42,7 +42,7 @@ class VolumeFillType(enum.IntEnum):
HEXCOREPOLY = 3
"""Volume fill using hexahedral cells in the core and polyhedral cells near the boundary."""

class HexCoreCellElementType(enum.IntEnum):
class HexCoreCellElementType(enum.Enum):
"""Cell element type of hex-shaped cells.
"""
ALLPOLY = 0
Expand All @@ -52,7 +52,7 @@ class HexCoreCellElementType(enum.IntEnum):
HEXANDPOLY = 2
"""Generates a mix of poly type and hex type cells."""

class HexCoreTransitionLayerType(enum.IntEnum):
class HexCoreTransitionLayerType(enum.Enum):
"""Handle size transition of hex cells.
"""
HANGINGNODES = 0
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/meshing/prime/autogen/autoquadmesherstructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from ansys.meshing.prime.params.primestructs import *

class EdgeConnectType(enum.IntEnum):
class EdgeConnectType(enum.Enum):
"""Edge connect type to define the type of connection between edges .
"""
NONE = 0
Expand Down
12 changes: 6 additions & 6 deletions src/ansys/meshing/prime/autogen/commontypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import numpy as np


class SizeFieldType(enum.IntEnum):
class SizeFieldType(enum.Enum):
"""The type of sizing field to be used to fetch element size at given location.
"""
GEOMETRIC = 0
Expand All @@ -43,15 +43,15 @@ class SizeFieldType(enum.IntEnum):
MESHEDGEODESIC = 7
"""Computes size field using existing surface mesh sizes and diffuses geodesically. Then uses the computed size field to remesh surfaces. Notes: The type is applicable when remeshing already meshed surfaces."""

class SolverType(enum.IntEnum):
class SolverType(enum.Enum):
"""Type of solver.
"""
FLUENT = 1
"""Solver type is Fluent. Creates a group of face quality measures mostly used in Fluent."""
MAPDL = 2
"""Solver type is MAPDL. Creates a group of face quality measures mostly used in MAPDL."""

class FaceQualityMeasure(enum.IntEnum):
class FaceQualityMeasure(enum.Enum):
"""The type of face quality measures to check face quality metrics.
"""
SKEWNESS = 0
Expand All @@ -67,7 +67,7 @@ class FaceQualityMeasure(enum.IntEnum):
ELEMENTQUALITY = 50
"""The Element Quality metric ranges between 0 (worst) and 1 (best). A value of 1 indicates a perfect cube or square (best) while a value of 0 indicates that the element has a zero or negative volume (worst)."""

class CellQualityMeasure(enum.IntEnum):
class CellQualityMeasure(enum.Enum):
"""The type of cell quality measures to check cell quality metrics.
"""
SKEWNESS = 0
Expand All @@ -83,7 +83,7 @@ class CellQualityMeasure(enum.IntEnum):
ELEMENTQUALITY = 50
"""The Element Quality metric ranges between 0 (worst) and 1 (best). A value of 1 indicates a perfect cube or square (best) while a value of 0 indicates that the element has a zero or negative volume (worst)."""

class SurfaceFeatureType(enum.IntEnum):
class SurfaceFeatureType(enum.Enum):
"""Type of face edges considered as features.
"""
NONE = 0
Expand All @@ -99,7 +99,7 @@ class SurfaceFeatureType(enum.IntEnum):
FEATUREORZONELETBOUNDARY = 5
"""Face edges at zonelet boundary or with normal angle more than threshold are considered as feature."""

class ShellBLOffsetType(enum.IntEnum):
class ShellBLOffsetType(enum.Enum):
"""Type of offset method during ShellBL generation.
"""
ASPECTRATIO = 0
Expand Down
8 changes: 4 additions & 4 deletions src/ansys/meshing/prime/autogen/connectstructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from ansys.meshing.prime.params.primestructs import *

class JoinSeparateMethod(enum.IntEnum):
class JoinSeparateMethod(enum.Enum):
"""Join separation method to handle separated overlapped zonelets.
"""
KEEPNONE = 0
Expand All @@ -40,23 +40,23 @@ class JoinSeparateMethod(enum.IntEnum):
KEEPBOTH = 2
"""Keep both overlapping zonelets after joining."""

class StitchType(enum.IntEnum):
class StitchType(enum.Enum):
"""Stitch type depending on nature of surface boundary edges to be stitched.
"""
ALLALL = 0
"""Stitch surfaces at boundary edges."""
FREEFREE = 1
"""Stitch surfaces at free boundary edges."""

class MergeNodeType(enum.IntEnum):
class MergeNodeType(enum.Enum):
"""Type of nodes to be merged.
"""
ALLALL = 0
"""Merge any type of nodes with any type of nodes."""
FREEFREE = 1
"""Merge only free nodes with free nodes."""

class FuseOption(enum.IntEnum):
class FuseOption(enum.Enum):
"""Type to specify treatment of surfaces for fusing.
"""
NONE = 0
Expand Down
8 changes: 4 additions & 4 deletions src/ansys/meshing/prime/autogen/controlstructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from ansys.meshing.prime.params.primestructs import *

class ScopeEntity(enum.IntEnum):
class ScopeEntity(enum.Enum):
"""ScopeDefinition uses entity type to scope entities.
"""
FACEZONELETS = 1
Expand All @@ -42,21 +42,21 @@ class ScopeEntity(enum.IntEnum):
VOLUME = 6
"""Evaluate scope to get volumes."""

class ScopeEvaluationType(enum.IntEnum):
class ScopeEvaluationType(enum.Enum):
"""ScopeDefinition uses evaluation type to evaluate the scope.
"""
LABELS = 3
"""Use labels to evaluate the scope."""
ZONES = 4
"""Use zones to evaluate the scope."""

class ScopeExpressionType(enum.IntEnum):
class ScopeExpressionType(enum.Enum):
"""ScopeExpressionType uses expression type to evaluate the scope.
"""
NAMEPATTERN = 2
"""Use name pattern expression to evaluate scope."""

class SweepType(enum.IntEnum):
class SweepType(enum.Enum):
"""Provides the Sweep Mesh Decomposition type.
"""
STANDARD = 1
Expand Down
22 changes: 11 additions & 11 deletions src/ansys/meshing/prime/autogen/fileiostructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from ansys.meshing.prime.params.primestructs import *

class CadReaderRoute(enum.IntEnum):
class CadReaderRoute(enum.Enum):
"""CAD Reader routes.
"""
PROGRAMCONTROLLED = 0
Expand All @@ -44,7 +44,7 @@ class CadReaderRoute(enum.IntEnum):
DISCOVERY = 4
"""Denotes Discovery as CAD reader route."""

class PartCreationType(enum.IntEnum):
class PartCreationType(enum.Enum):
"""Part Creation Type decides whether to create a part per CAD Model, Assembly, Part, Body.
"""
MODEL = 0
Expand All @@ -56,7 +56,7 @@ class PartCreationType(enum.IntEnum):
BODY = 3
"""Denotes a part per CAD Body."""

class LengthUnit(enum.IntEnum):
class LengthUnit(enum.Enum):
"""Length units
"""
M = 0
Expand All @@ -74,15 +74,15 @@ class LengthUnit(enum.IntEnum):
FT = 6
"""Denotes length unit is feet."""

class CadFaceter(enum.IntEnum):
class CadFaceter(enum.Enum):
"""Types of CAD faceter.
"""
ACIS = 0
"""Denotes CAD faceter is Acis."""
PARASOLID = 1
"""Denotes CAD faceter is Parasolid."""

class CadRefacetingResolution(enum.IntEnum):
class CadRefacetingResolution(enum.Enum):
"""Levels of CAD faceting refinement.
"""
COARSE = 0
Expand All @@ -94,7 +94,7 @@ class CadRefacetingResolution(enum.IntEnum):
CUSTOM = 3
"""Denotes custom resolution of CAD faceting."""

class CadRefacetingMaxEdgeSizeLimit(enum.IntEnum):
class CadRefacetingMaxEdgeSizeLimit(enum.Enum):
"""Types of maximum edge size limit for CAD faceting.
"""
NONE = 0
Expand All @@ -104,7 +104,7 @@ class CadRefacetingMaxEdgeSizeLimit(enum.IntEnum):
RELATIVE = 2
"""Denotes relative maximum edge size limit for CAD faceting."""

class CdbAnalysisType(enum.IntEnum):
class CdbAnalysisType(enum.Enum):
"""Provides the MAPDL CDB analysis type.
"""
NONE = 0
Expand All @@ -124,15 +124,15 @@ class CdbAnalysisType(enum.IntEnum):

**This is a beta parameter**. **The behavior and name may change in the future**."""

class CdbSimulationType(enum.IntEnum):
class CdbSimulationType(enum.Enum):
"""Simulation Type for CDB export.
"""
IMPLICIT = 0
"""Implicit simulation."""
EXPLICIT = 1
"""Explicit Simulation."""

class SeparateBlocksFormatType(enum.IntEnum):
class SeparateBlocksFormatType(enum.Enum):
"""Format type for separate element blocks. Only applicable when write_separate_blocks is true.
"""
STANDARD = 0
Expand All @@ -144,7 +144,7 @@ class SeparateBlocksFormatType(enum.IntEnum):

**This is a beta parameter**. **The behavior and name may change in the future**."""

class LSDynaFileFormatType(enum.IntEnum):
class LSDynaFileFormatType(enum.Enum):
"""Provides the format type to write the LS-DYNA file.
"""
REGULAR = 0
Expand All @@ -156,7 +156,7 @@ class LSDynaFileFormatType(enum.IntEnum):

**This is a beta parameter**. **The behavior and name may change in the future**."""

class LSDynaAnalysisType(enum.IntEnum):
class LSDynaAnalysisType(enum.Enum):
"""Provides the LS-DYNA analysis type.
"""
DOORSLAM = 0
Expand Down
8 changes: 4 additions & 4 deletions src/ansys/meshing/prime/autogen/igastructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@

from ansys.meshing.prime.params.primestructs import *

class ControlPointSelection(enum.IntEnum):
class ControlPointSelection(enum.Enum):
"""Control point selection type.
"""
MANUAL = 0
"""Manual Spline control point selection."""
PROGRAMCONTROLLED = 1
"""Program controlled spline control point selection."""

class SplineRefinementType(enum.IntEnum):
class SplineRefinementType(enum.Enum):
"""Type of spline refinement. Currently, supports h-refinement and p-refinement.
"""
H = 0
"""H refinement of spline."""
P = 1
"""P refinement of spline."""

class SplineFeatureCaptureType(enum.IntEnum):
class SplineFeatureCaptureType(enum.Enum):
"""Options to capture features in spline.
"""
IGNORE = 0
Expand All @@ -56,7 +56,7 @@ class SplineFeatureCaptureType(enum.IntEnum):
BYEDGES = 2
"""Use edges for capturing features in spline."""

class SplineContinuityType(enum.IntEnum):
class SplineContinuityType(enum.Enum):
"""Spline Continuity types.
"""
CUBICC0 = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from ansys.meshing.prime.params.primestructs import *

class MaterialPointType(enum.IntEnum):
class MaterialPointType(enum.Enum):
"""Defines define type of material point.
"""
DEAD = 0
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/meshing/prime/autogen/morpherbcsstructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from ansys.meshing.prime.params.primestructs import *

class BCsVolumetricModality(enum.IntEnum):
class BCsVolumetricModality(enum.Enum):
"""Indicate options to identify morphable region in input volumetric mesh.
"""
BOX = 1
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/meshing/prime/autogen/morpherstructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@

from ansys.meshing.prime.params.primestructs import *

class BCPairType(enum.IntEnum):
class BCPairType(enum.Enum):
"""Option to specify boundary condition pair type.
"""
FACE = 1
"""Option to specify face zonelet as boundary condition pair."""
EDGE = 2
"""Option to specify edge zonelet as boundary condition pair."""

class MatchPairTargetType(enum.IntEnum):
class MatchPairTargetType(enum.Enum):
"""Match morph target type.
"""
FACEZONELET = 1
Expand Down
10 changes: 5 additions & 5 deletions src/ansys/meshing/prime/autogen/partstructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from ansys.meshing.prime.params.primestructs import *

class CellZoneletType(enum.IntEnum):
class CellZoneletType(enum.Enum):
"""Types of cell zonelet.
"""
DEAD = 0
Expand All @@ -40,7 +40,7 @@ class CellZoneletType(enum.IntEnum):
SOLID = 17
"""Cell zonelet type is solid."""

class ZoneType(enum.IntEnum):
class ZoneType(enum.Enum):
"""ZoneType decides the type of zone.
"""
EDGE = 1
Expand All @@ -50,7 +50,7 @@ class ZoneType(enum.IntEnum):
VOLUME = 3
"""Denotes the zone is volume zone."""

class VolumeNamingType(enum.IntEnum):
class VolumeNamingType(enum.Enum):
"""Indicate source types used to name volume zones.
"""
BYFACELABEL = 1
Expand All @@ -60,7 +60,7 @@ class VolumeNamingType(enum.IntEnum):
BYFACENORMALS = 4
"""Option to use face normal as source to name volume zones. Here, the volume zones with face normal into the volume are considered as dead and volume zones with face normal outwards from the volume are considered as solid.."""

class CreateVolumeZonesType(enum.IntEnum):
class CreateVolumeZonesType(enum.Enum):
"""Indicate type to create volume zones for volumes.
"""
NONE = 0
Expand All @@ -70,7 +70,7 @@ class CreateVolumeZonesType(enum.IntEnum):
PERNAMESOURCE = 2
"""Option to create zone per name computed from face zonelets of volume. Single zone is created for multiple volumes if same zone name is identified using face zonelets for the volumes."""

class BodyQueryType(enum.IntEnum):
class BodyQueryType(enum.Enum):
"""Indicates type of entity to query in part.
"""
ALL = 0
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/meshing/prime/autogen/primeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import numpy as np


class ErrorCode(enum.IntEnum):
class ErrorCode(enum.Enum):
"""Error codes associated with the failure of PyPrimeMesh operation.
"""
NOERROR = 0
Expand Down Expand Up @@ -845,7 +845,7 @@ class ErrorCode(enum.IntEnum):

**This is a beta parameter**. **The behavior and name may change in the future**."""

class WarningCode(enum.IntEnum):
class WarningCode(enum.Enum):
"""Warning codes associated with the PyPrimeMesh operation.
"""
NOWARNING = 0
Expand Down
Loading
Loading