Skip to content

Commit e9de204

Browse files
committed
feat: changes obtained using pyconverter-xml2py (after pre-commit hook)
1 parent 193af83 commit e9de204

File tree

12 files changed

+4694
-4187
lines changed

12 files changed

+4694
-4187
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ repos:
4545
hooks:
4646
- id: flake8
4747

48-
- repo: https://github.com/codespell-project/codespell
49-
rev: v2.3.0
50-
hooks:
51-
- id: codespell
52-
args: ["--toml", "pyproject.toml"]
53-
additional_dependencies: ["tomli"]
48+
# - repo: https://github.com/codespell-project/codespell
49+
# rev: v2.3.0
50+
# hooks:
51+
# - id: codespell
52+
# args: ["--toml", "pyproject.toml"]
53+
# additional_dependencies: ["tomli"]
5454

5555
# - repo: https://github.com/pycqa/pydocstyle
5656
# rev: 6.1.1

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222

2323
from . import (
2424
abbreviations,
25-
array_param,
25+
array_parameters,
26+
encryption_decryption,
2627
macro_files,
27-
matrix_op,
28-
parameter_definition,
28+
matrix_operations,
29+
parameters,
2930
process_controls,
3031
)

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

Lines changed: 73 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -22,169 +22,134 @@
2222

2323

2424
class Abbreviations:
25+
2526
def abbr(self, abbr="", string="", **kwargs):
26-
"""Defines an abbreviation.
27+
r"""Defines an abbreviation.
2728
28-
APDL Command: ``*ABBR``
29+
Mechanical APDL Command: `\*ABBR <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_ABBR.html>`_
2930
3031
Parameters
3132
----------
32-
abbr
33-
The abbreviation (up to 8 alphanumeric characters) used to
34-
represent the string String. If Abbr is the same as an existing
35-
ANSYS command, the abbreviation overrides. Avoid using an Abbr
36-
which is the same as an ANSYS command.
37-
38-
string
39-
String of characters (60 maximum) represented by Abbr.
40-
Cannot include a $ or any of the commands ``C***``, /COM,
41-
/GOPR, /NOPR, /QUIT, /UI, or ``*END``.
42-
43-
Use the ``*IF`` groups may not be abbreviated. If String
44-
is blank, the abbreviation is deleted. To abbreviate
45-
multiple commands, create an "unknown command" macro or
46-
define String to execute a macro file [``*USE``]
47-
containing the desired commands.
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.
37+
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.
4845
4946
Notes
5047
-----
51-
Once the abbreviation Abbr is defined, you can issue it at the
52-
beginning of a command line and follow it with a blank (or with a comma
53-
and appended data), and the program will substitute the string String
54-
for Abbr as the line is executed. Up to 100 abbreviations may exist at
55-
any time and are available throughout the program. Abbreviations may be
56-
redefined or deleted at any time.
57-
58-
Use ``*STATUS`` to display the current list of abbreviations. For
59-
abbreviations repeated with ``*REPEAT``, substitution occurs before the
60-
repeat increments are applied. There are a number of abbreviations that
61-
are predefined by the program (these can be deleted by using the blank
62-
String option described above). Note that String will be written to the
63-
File.LOG.
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`` .
6451
6552
This command is valid in any processor.
6653
"""
6754
command = f"*ABBR,{abbr},{string}"
6855
return self.run(command, **kwargs)
6956

70-
def abbres(self, lab="", fname="", ext="", **kwargs):
71-
"""Reads abbreviations from a coded file.
57+
def abbres(self, lab="", **kwargs):
58+
r"""Reads abbreviations from a coded file.
7259
73-
APDL Command: ABBRES
60+
Mechanical APDL Command: `ABBRES <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_ABBRES.html>`_
7461
7562
Parameters
7663
----------
77-
lab
64+
lab : str
7865
Label that specifies the read operation:
7966
80-
NEW
81-
Replace current abbreviation set with these abbreviations (default).
67+
* ``NEW`` - Replace current abbreviation set with these abbreviations (default).
8268
83-
CHANGE
84-
Extend current abbreviation set with these abbreviations, replacing any of the
85-
same name that already exist.
69+
* ``CHANGE`` - Extend current abbreviation set with these abbreviations, replacing any of
70+
the
71+
same name that already exist.
8672
87-
fname
88-
File name and directory path (248 characters maximum, including the
89-
characters needed for the directory path). An unspecified
90-
directory path defaults to the working directory; in this case, you
91-
can use all 248 characters for the file name.
73+
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`` .
9276
93-
ext
77+
ext : str
9478
Filename extension (eight-character maximum).
79+
The extension defaults to ABBR if ``Fname`` is blank.
9580
9681
Notes
9782
-----
98-
The abbreviation file may have been written with the ABBSAV command. Do
99-
not issue ABBRES,NEW while inside an executing abbreviation. Doing so
100-
will cause all data for the executing abbreviation to be deleted.
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.
10184
10285
This command is valid in any processor.
10386
"""
104-
command = f"ABBRES,{lab},{fname},{ext}"
87+
command = f"ABBRES,{lab}"
10588
return self.run(command, **kwargs)
10689

107-
def abbsav(self, lab="", fname="", ext="", **kwargs):
108-
"""Writes the current abbreviation set to a coded file.
90+
def abbsav(self, lab="", **kwargs):
91+
r"""Writes the current abbreviation set to a coded file.
10992
110-
APDL Command: ABBSAV
93+
Mechanical APDL Command: `ABBSAV <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_ABBSAV.html>`_
11194
11295
Parameters
11396
----------
114-
lab
115-
Label that specifies the write operation.
116-
117-
ALL - Write all abbreviations (default).
97+
lab : str
98+
Label that specifies the write operation:
11899
119-
fname
120-
File name and directory path (248 characters maximum,
121-
including the characters needed for the directory path).
122-
An unspecified directory path defaults to the working
123-
directory; in this case, you can use all 248 characters
124-
for the file name.
100+
* ``ALL`` - Write all abbreviations (default).
125101
126-
The file name defaults to Jobname.
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`` .
127105
128-
ext
129-
Filename extension (eight-character maximum). The
130-
extension defaults to ABBR if Fname is blank.
106+
ext : str
107+
Filename extension (eight-character maximum).
108+
The extension defaults to ABBR if ``Fname`` is blank.
131109
132110
Notes
133111
-----
134-
Existing abbreviations on this file, if any, will be overwritten. The
135-
abbreviation file may be read with the ABBRES command.
112+
Existing abbreviations on this file, if any, will be overwritten. The abbreviation file may be read with the :ref:`abbres` command.
136113
137114
This command is valid in any processor.
138115
"""
139-
command = f"ABBSAV,{lab},{fname},{ext}"
116+
command = f"ABBSAV,{lab}"
140117
return self.run(command, **kwargs)
141118

142119
def ucmd(self, cmd="", srnum="", **kwargs):
143-
"""Assigns a user-defined command name.
120+
r"""Assigns a user-defined command name.
144121
145-
APDL Command: /UCMD
122+
Mechanical APDL Command: `/UCMD <https://ansyshelp.ansys.com/Views/Secured/corp/v232/en//ans_cmd/Hlp_C_UCMD.html>`_
146123
147124
Parameters
148125
----------
149-
cmd
150-
User-defined command name. Only the first four characters are
151-
significant. Must not conflict with any ANSYS command name or any
152-
user "unknown command" macro name.
153-
154-
srnum
155-
User subroutine number (1 to 10) programmed for this command. For
156-
example, the command /UCMD,MYCMD,3 will execute subroutine USER03
157-
whenever the command MYCMD is entered. Use a blank command name to
158-
disassociate SRNUM from its command. For example, /UCMD,,3 removes
159-
MYCMD as a command.
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.
160135
161136
Notes
162137
-----
163-
Assigns a user-defined command name to a user-programmable (system-
164-
dependent) subroutine. This feature allows user-defined commands to be
165-
programmed into the ANSYS program. Once programmed, this command can
166-
be input to the program like other commands, and can also be included
167-
in the ANSYS start-up file. See ``*ULIB`` for another way of defining user
168-
commands.
169-
170-
Up to 10 subroutines are available for user-defined commands (USER01 to
171-
USER10). Users must have system permission, system access, and
172-
knowledge to write, compile, and link the appropriate subprocessors
173-
into the ANSYS program at the site where it is to be run. All routines
174-
should be written in FORTRAN. For more information on FORTRAN compilers
175-
please refer to either the ANSYS, Inc. Windows Installation Guide or
176-
the ANSYS, Inc. Linux Installation Guide for details specific to your
177-
platform or operating system. The USER01 routine is commented and
178-
should be listed from the distribution media (system dependent) for
179-
more details. Issue /UCMD,STAT to list all user-defined command names.
180-
Since a user-programmed command is a nonstandard use of the program,
181-
the verification of any ANSYS run incorporating these commands is
182-
entirely up to the user. In any contact with ANSYS customer support
183-
regarding the performance of a custom version of the ANSYS program, you
184-
should explicitly state that a user programmable feature has been used.
185-
See the Advanced Analysis Guide for a general description of user-
186-
programmable features and Guide to User-Programmable Features for a
187-
detailed description of these features.
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.
147+
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.
149+
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>`_
151+
152+
See :ref:`ulib` for another way of defining user commands.
188153
189154
This command is valid only at the Begin Level.
190155
"""

0 commit comments

Comments
 (0)