Skip to content

Commit ac7b46a

Browse files
committed
feat: latest apdl module output with pyconverter-xml2py new version
1 parent 81027b1 commit ac7b46a

File tree

9 files changed

+3525
-3130
lines changed

9 files changed

+3525
-3130
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ repos:
5656
hooks:
5757
- id: flake8
5858

59-
# - repo: https://github.com/codespell-project/codespell
60-
# rev: v2.3.0
61-
# hooks:
62-
# - id: codespell
63-
# args: ["--toml", "pyproject.toml"]
64-
# additional_dependencies: ["tomli"]
59+
- repo: https://github.com/codespell-project/codespell
60+
rev: v2.3.0
61+
hooks:
62+
- id: codespell
63+
args: ["--toml", "pyproject.toml"]
64+
additional_dependencies: ["tomli"]
6565

6666
# - repo: https://github.com/pycqa/pydocstyle
6767
# rev: 6.1.1

doc/styles/config/vocabularies/ANSYS/accept.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ emiss
7070
env
7171
Eser
7272
ethernet
73+
Euclidian
7374
extrem
7475
FEMs
7576
filname
@@ -86,6 +87,7 @@ hostname
8687
HTML
8788
Image[Mm]agick
8889
imagin
90+
imbedded
8991
importlib
9092
ist
9193
Julia
@@ -118,6 +120,8 @@ NumPy
118120
onefile
119121
optiSLang
120122
parm
123+
ParY
124+
pary
121125
perf
122126
performant
123127
PMLs

src/ansys/mapdl/core/_commands/apdl/abbreviations.py

Lines changed: 83 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -23,38 +23,49 @@
2323

2424
class Abbreviations:
2525

26-
def abbr(self, abbr="", string="", **kwargs):
27-
r"""Defines an abbreviation.
26+
def ucmd(self, cmd: str = "", srnum: str = "", **kwargs):
27+
r"""Assigns a user-defined command name.
2828
29-
Mechanical APDL Command: `\*ABBR <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_ABBR.html>`_
29+
Mechanical APDL Command: `/UCMD <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_UCMD.html>`_
3030
3131
Parameters
3232
----------
33-
abbr : str
34-
The abbreviation (up to 8 alphanumeric characters) used to represent the string ``String`` . If
35-
``Abbr`` is the same as an existing Mechanical APDL command, the abbreviation overrides. Avoid using an
36-
``Abbr`` which is the same as an Mechanical APDL command.
33+
cmd : str
34+
User-defined command name. Only the first four characters are significant. Must not conflict
35+
with any Mechanical APDL command name or any user unknown-command macro name.
3736
38-
string : str
39-
String of characters (60 maximum) represented by ``Abbr`` . Cannot include a $ or any of the
40-
commands :ref:`c`, :ref:`com`, :ref:`gopr`, :ref:`nopr`, :ref:`quit`, :ref:`ui`, or
41-
:ref:`end` . Parameter names and commands of the :ref:`do` and Use the :ref:`if` groups may not
42-
be abbreviated. If ``String`` is blank, the abbreviation is deleted. To abbreviate multiple
43-
commands, create an "unknown command" macro or define ``String`` to execute a macro file (
44-
:ref:`use` ) containing the desired commands.
37+
srnum : str
38+
User subroutine number (1 to 10) programmed for this command. For example, the command
39+
:ref:`ucmd` ,MYCMD,3 will execute subroutine USER03 whenever the command MYCMD is entered. Use a
40+
blank command name to disassociate ``SRNUM`` from its command. For example, :ref:`ucmd` ,,3
41+
removes MYCMD as a command.
4542
4643
Notes
4744
-----
48-
Once the abbreviation ``Abbr`` is defined, you can issue it at the beginning of a command line and follow it with a blank (or with a comma and appended data), and the program will substitute the string ``String`` for ``Abbr`` as the line is executed. Up to 100 abbreviations may exist at any time and are available throughout the program. Abbreviations may be redefined or deleted at any time.
49-
50-
Use :ref:`starstatus` to display the current list of abbreviations. For abbreviations repeated with :ref:`repeat`, substitution occurs before the repeat increments are applied. There are a number of abbreviations that are predefined by the program (these can be deleted by using the blank ``String`` option described above). Note that ``String`` will be written to the ``File.LOG`` .
51-
52-
This command is valid in any processor.
45+
Assigns a user-defined command name to a user-programmable (system-dependent) subroutine. This
46+
feature allows user-defined commands to be programmed into Mechanical APDL. Once programmed, this command
47+
can be input to the program like other commands, and can also be included in the Mechanical APDL start-up
48+
file. Up to 10 subroutines are available for user-defined commands (USER01 to USER10). You must
49+
have system permission, system access, and knowledge to write, compile, and link the appropriate
50+
subprocessors into Mechanical APDL at your site. All routines should be written in FORTRAN. For more
51+
information about FORTRAN compilers, refer to either the `Ansys, Inc. Windows Installation Guide <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en/installation/win_product_table.html>`_ or the `Ansys, Inc. Linux Installation Guide <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en/installation/lin_product_table.html>`_ for
52+
details specific to your platform or operating system. The USER01 routine is commented and should
53+
be listed from the distribution media (system dependent) for more details. Issue :ref:`ucmd` ,STAT
54+
to list all user-defined command names. Because a user-programmed command is a nonstandard use of
55+
the program, the verification of any Mechanical APDL run incorporating these commands is your
56+
responsibility. In any contact with Mechanical APDL customer support regarding the performance of a custom
57+
version of Mechanical APDL, explicitly state that a user-programmable feature has been used. See `User-
58+
Programmable Features (UPFs)
59+
<https://ansyshelp.ansys.com/Views/Secured/corp/v232/en/ans_adv/Hlp_G_ADV7_1.html#aRzouq21ldm>`_
60+
`Guide to User-Programmable Features
61+
<https://ansyshelp.ansys.com/Views/Secured/corp/v232/en/ans_prog/ansysprog_aero_fullycoupled.html>`_
62+
See :ref:`ulib` for another way of defining user commands. This command is valid only at the Begin
63+
Level.
5364
"""
54-
command = f"*ABBR,{abbr},{string}"
65+
command = f"/UCMD,{cmd},{srnum}"
5566
return self.run(command, **kwargs)
5667

57-
def abbres(self, lab="", **kwargs):
68+
def abbres(self, lab: str = "", fname: str = "", ext: str = "", **kwargs):
5869
r"""Reads abbreviations from a coded file.
5970
6071
Mechanical APDL Command: `ABBRES <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_ABBRES.html>`_
@@ -64,94 +75,86 @@ def abbres(self, lab="", **kwargs):
6475
lab : str
6576
Label that specifies the read operation:
6677
67-
* ``NEW`` - Replace current abbreviation set with these abbreviations (default).
68-
69-
* ``CHANGE`` - Extend current abbreviation set with these abbreviations, replacing any of
70-
the
71-
same name that already exist.
78+
* ``NEW`` - Replace current abbreviation set with these abbreviations (default).
79+
* ``CHANGE`` - Extend current abbreviation set with these abbreviations, replacing any of the same
80+
name that already exist.
7281
7382
fname : str
74-
File name and directory path (248 characters maximum, including the characters needed for the directory path). An unspecified directory path defaults to the working directory; in this case, you can use all 248 characters for the file name.
75-
The file name defaults to ``Jobname`` .
83+
File name and directory path (248 characters maximum, including the characters needed for the
84+
directory path). An unspecified directory path defaults to the working directory; in this case, you
85+
can use all 248 characters for the file name. The file name defaults to ``Jobname``.
7686
7787
ext : str
78-
Filename extension (eight-character maximum).
79-
The extension defaults to ABBR if ``Fname`` is blank.
88+
Filename extension (eight-character maximum). The extension defaults to ABBR if ``Fname`` is blank.
8089
8190
Notes
8291
-----
83-
The abbreviation file may have been written with the :ref:`abbsav` command. Do not issue :ref:`abbres` ,NEW while inside an executing abbreviation. Doing so will cause all data for the executing abbreviation to be deleted.
84-
85-
This command is valid in any processor.
92+
The abbreviation file may have been written with the :ref:`abbsav` command. Do not issue
93+
:ref:`abbres` ,NEW while inside an executing abbreviation. Doing so will cause all data for the
94+
executing abbreviation to be deleted. This command is valid in any processor.
8695
"""
87-
command = f"ABBRES,{lab}"
96+
command = f"ABBRES,{lab},{fname},{ext}"
8897
return self.run(command, **kwargs)
8998

90-
def abbsav(self, lab="", **kwargs):
91-
r"""Writes the current abbreviation set to a coded file.
99+
def abbr(self, abbr: str = "", string: str = "", **kwargs):
100+
r"""Defines an abbreviation.
92101
93-
Mechanical APDL Command: `ABBSAV <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_ABBSAV.html>`_
102+
Mechanical APDL Command: `\*ABBR <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_ABBR.html>`_
94103
95104
Parameters
96105
----------
97-
lab : str
98-
Label that specifies the write operation:
99-
100-
* ``ALL`` - Write all abbreviations (default).
101-
102-
fname : str
103-
File name and directory path (248 characters maximum, including the characters needed for the directory path). An unspecified directory path defaults to the working directory; in this case, you can use all 248 characters for the file name.
104-
The file name defaults to ``Jobname`` .
106+
abbr : str
107+
The abbreviation (up to 8 alphanumeric characters) used to represent the string ``String``. If
108+
``Abbr`` is the same as an existing Mechanical APDL command, the abbreviation overrides. Avoid using an
109+
``Abbr`` which is the same as an Mechanical APDL command.
105110
106-
ext : str
107-
Filename extension (eight-character maximum).
108-
The extension defaults to ABBR if ``Fname`` is blank.
111+
string : str
112+
String of characters (60 maximum) represented by ``Abbr``. Cannot include a $ or any of the
113+
commands :ref:`c`, :ref:`com`, :ref:`gopr`, :ref:`nopr`, :ref:`quit`, :ref:`ui`, or
114+
:ref:`end`. Parameter names and commands of the :ref:`do` and Use the :ref:`if` groups may not
115+
be abbreviated. If ``String`` is blank, the abbreviation is deleted. To abbreviate multiple
116+
commands, create an "unknown command" macro or define ``String`` to execute a macro file (
117+
:ref:`use` ) containing the desired commands.
109118
110119
Notes
111120
-----
112-
Existing abbreviations on this file, if any, will be overwritten. The abbreviation file may be read with the :ref:`abbres` command.
113-
121+
Once the abbreviation ``Abbr`` is defined, you can issue it at the beginning of a command line and
122+
follow it with a blank (or with a comma and appended data), and the program will substitute the
123+
string ``String`` for ``Abbr`` as the line is executed. Up to 100 abbreviations may exist at any
124+
time and are available throughout the program. Abbreviations may be redefined or deleted at any
125+
time. Use :ref:`starstatus` to display the current list of abbreviations. For abbreviations
126+
repeated with :ref:`repeat`, substitution occurs before the repeat increments are applied. There
127+
are a number of abbreviations that are predefined by the program (these can be deleted by using the
128+
blank ``String`` option described above). Note that ``String`` will be written to the ``File.LOG``.
114129
This command is valid in any processor.
115130
"""
116-
command = f"ABBSAV,{lab}"
131+
command = f"*ABBR,{abbr},{string}"
117132
return self.run(command, **kwargs)
118133

119-
def ucmd(self, cmd="", srnum="", **kwargs):
120-
r"""Assigns a user-defined command name.
134+
def abbsav(self, lab: str = "", fname: str = "", ext: str = "", **kwargs):
135+
r"""Writes the current abbreviation set to a coded file.
121136
122-
Mechanical APDL Command: `/UCMD <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_UCMD.html>`_
137+
Mechanical APDL Command: `ABBSAV <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_ABBSAV.html>`_
123138
124139
Parameters
125140
----------
126-
cmd : str
127-
User-defined command name. Only the first four characters are significant. Must not conflict
128-
with any Mechanical APDL command name or any user unknown-command macro name.
129-
130-
srnum : str
131-
User subroutine number (1 to 10) programmed for this command. For example, the command
132-
:ref:`ucmd` ,MYCMD,3 will execute subroutine USER03 whenever the command MYCMD is entered. Use a
133-
blank command name to disassociate ``SRNUM`` from its command. For example, :ref:`ucmd` ,,3
134-
removes MYCMD as a command.
135-
136-
Notes
137-
-----
138-
Assigns a user-defined command name to a user-programmable (system-dependent) subroutine. This feature allows user-defined commands to be programmed into Mechanical APDL. Once programmed, this command can be input to the program like other commands, and can also be included in the Mechanical APDL start-up file.
139-
140-
Up to 10 subroutines are available for user-defined commands (USER01 to USER10). You must have system permission, system access, and knowledge to write, compile, and link the appropriate subprocessors into Mechanical APDL at your site.
141-
142-
All routines should be written in FORTRAN. For more information about FORTRAN compilers, refer to either the `Ansys, Inc. Windows Installation Guide <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en/installation/win_product_table.html>`_ or the `Ansys, Inc. Linux Installation Guide <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en/installation/lin_product_table.html>`_ for details specific to your platform or operating system.
143-
144-
The USER01 routine is commented and should be listed from the distribution media (system dependent) for more details.
145-
146-
Issue :ref:`ucmd` ,STAT to list all user-defined command names.
141+
lab : str
142+
Label that specifies the write operation:
147143
148-
Because a user-programmed command is a nonstandard use of the program, the verification of any Mechanical APDL run incorporating these commands is your responsibility. In any contact with Mechanical APDL customer support regarding the performance of a custom version of Mechanical APDL, explicitly state that a user-programmable feature has been used.
144+
* ``ALL`` - Write all abbreviations (default).
149145
150-
See `User-Programmable Features (UPFs) <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en/ans_adv/Hlp_G_ADV7_1.html#aRzouq21ldm>`_ `Guide to User-Programmable Features <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en/ans_prog/ansysprog_aero_fullycoupled.html>`_
146+
fname : str
147+
File name and directory path (248 characters maximum, including the characters needed for the
148+
directory path). An unspecified directory path defaults to the working directory; in this case, you
149+
can use all 248 characters for the file name. The file name defaults to ``Jobname``.
151150
152-
See :ref:`ulib` for another way of defining user commands.
151+
ext : str
152+
Filename extension (eight-character maximum). The extension defaults to ABBR if ``Fname`` is blank.
153153
154-
This command is valid only at the Begin Level.
154+
Notes
155+
-----
156+
Existing abbreviations on this file, if any, will be overwritten. The abbreviation file may be read
157+
with the :ref:`abbres` command. This command is valid in any processor.
155158
"""
156-
command = f"/UCMD,{cmd},{srnum}"
159+
command = f"ABBSAV,{lab},{fname},{ext}"
157160
return self.run(command, **kwargs)

0 commit comments

Comments
 (0)