Skip to content

Commit

Permalink
[bugfix] Re-Include math functions in abaqus and odbAccess (backport #…
Browse files Browse the repository at this point in the history
…4980) (#4987)

[bugfix] Re-Include math functions in abaqus and odbAccess (#4980)

[bugfix] Include math functions in abaqus and odbAccess

Introduced in #4895

(cherry picked from commit 00bf687)

Co-authored-by: Hailin Wang <[email protected]>
  • Loading branch information
mergify[bot] and haiiliin authored Sep 6, 2023
1 parent 0e62aff commit 68a2d91
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 49 deletions.
54 changes: 21 additions & 33 deletions src/abaqus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
from __future__ import annotations

import sys
from math import *

from abqpy import run

from .builtin import *
from .Canvas.Highlight import *
from .Mdb.Mdb import Mdb
from .Mdb.MdbCommands import *
from .Odb.Odb import Odb
from .Session.Session import Session
from .UtilityAndView import abaqusConstants
from .UtilityAndView.abaqusConstants import OFF, Boolean
from .UtilityAndView.BackwardCompatibility import BackwardCompatibility
from .UtilityAndView.SymbolicConstant import SymbolicConstant
from .UtilityAndView.User import *
import auto_all

from abqpy import run # noqa

run(cae=True)
auto_all.start_all()

from math import * # noqa

from .builtin import * # noqa
from .Canvas.Highlight import * # noqa
from .Mdb.Mdb import Mdb # noqa
from .Mdb.MdbCommands import * # noqa
from .Odb.Odb import Odb # noqa
from .Session.Session import Session # noqa
from .UtilityAndView import abaqusConstants # noqa
from .UtilityAndView.abaqusConstants import OFF, Boolean # noqa
from .UtilityAndView.BackwardCompatibility import BackwardCompatibility # noqa
from .UtilityAndView.SymbolicConstant import SymbolicConstant # noqa
from .UtilityAndView.User import * # noqa

session = Session()
mdb = Mdb()
Expand All @@ -25,20 +29,4 @@
YES = abaqusConstants.YES
NO = abaqusConstants.NO

run(cae=True)

__main__ = sys.modules["__main__"]
__all__ = [
"backwardCompatibility",
"BackwardCompatibility",
"Boolean",
"Mdb",
"mdb",
"Odb",
"session",
"Session",
"SymbolicConstant",
"YES",
"NO",
"OFF",
]
auto_all.end_all()
25 changes: 9 additions & 16 deletions src/odbAccess.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
from __future__ import annotations

from math import *
import auto_all

from abqpy import run

run(cae=False)
auto_all.start_all()

from abaqus.Odb.Odb import Odb
from abaqus.Odb.OdbCommands import (
from math import * # noqa

from abaqus.Odb.Odb import Odb # noqa
from abaqus.Odb.OdbCommands import ( # noqa
AnalyticSurfaceProfile,
isUpgradeRequiredForOdb,
maxEnvelope,
minEnvelope,
openOdb,
upgradeOdb,
)
from abaqus.UtilityAndView.BackwardCompatibility import BackwardCompatibility
from abaqusConstants import *
from abaqus.UtilityAndView.BackwardCompatibility import BackwardCompatibility # noqa
from abaqusConstants import * # noqa

backwardCompatibility = BackwardCompatibility()

__all__ = [
"backwardCompatibility",
"BackwardCompatibility",
"isUpgradeRequiredForOdb",
"maxEnvelope",
"minEnvelope",
"Odb",
"openOdb",
"upgradeOdb",
"AnalyticSurfaceProfile",
]
auto_all.end_all()

0 comments on commit 68a2d91

Please sign in to comment.