Skip to content

Commit 2696095

Browse files
docs: extracting information to another rst file (#3549)
* docs: extracting information to another rst file * chore: adding changelog file 3549.documentation.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent bf13bff commit 2696095

File tree

6 files changed

+126
-57
lines changed

6 files changed

+126
-57
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs: extracting information to another rst file

doc/source/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ PyMAPDL, see :ref:`ref_mapdl_commands`.
2323
database
2424
geometry
2525
helper
26+
information
2627
inline
2728
krylov
2829
launcher

doc/source/api/information.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. _ref_information_api:
2+
3+
``Information`` module
4+
======================
5+
6+
``Information`` class attributes
7+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8+
9+
.. currentmodule:: ansys.mapdl.core.information
10+
11+
.. autosummary::
12+
:toctree: _autosummary
13+
14+
Information.aux_capabilities
15+
Information.boundary_condition_information
16+
Information.config_values
17+
Information.database_status
18+
Information.global_status
19+
Information.job_information
20+
Information.load_step_options
21+
Information.mapdl_version
22+
Information.model_information
23+
Information.post_capabilities
24+
Information.preprocessing_capabilities
25+
Information.product
26+
Information.products
27+
Information.pymapdl_version
28+
Information.routine_information
29+
Information.scratch_memory_status
30+
Information.solution_options
31+
Information.solution_options_configuration
32+
Information.stitles
33+
Information.title
34+
Information.titles
35+
Information.units

doc/source/api/mapdl.rst

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,68 @@
1414
:toctree: _autosummary
1515

1616
Mapdl.add_file_handler
17+
Mapdl.allow_ignore
18+
Mapdl.busy
1719
Mapdl.chain_commands
20+
Mapdl.check_parameter_names
21+
Mapdl.default_file_type_for_plots
1822
Mapdl.directory
23+
Mapdl.exited
24+
Mapdl.exiting
25+
Mapdl.file_type_for_plots
26+
Mapdl.finish_job_on_exit
27+
Mapdl.force_output
1928
Mapdl.get
2029
Mapdl.get_array
30+
Mapdl.get_esol
31+
Mapdl.get_nodal_constrains
32+
Mapdl.get_nodal_loads
33+
Mapdl.get_nsol
2134
Mapdl.get_value
35+
Mapdl.get_variable
36+
Mapdl.hostname
2237
Mapdl.ignore_errors
38+
Mapdl.info
39+
Mapdl.input_strings
40+
Mapdl.is_alive
41+
Mapdl.is_console
42+
Mapdl.is_corba
43+
Mapdl.is_grpc
44+
Mapdl.jobid
2345
Mapdl.jobname
46+
Mapdl.kill_job
2447
Mapdl.last_response
48+
Mapdl.launched
49+
Mapdl.list_error_file
50+
Mapdl.list_files
51+
Mapdl.load_array
2552
Mapdl.load_table
26-
Mapdl.mesh
27-
Mapdl.modal_analysis
53+
Mapdl.locked
54+
Mapdl.logger
55+
Mapdl.mapdl_on_hpc
56+
Mapdl.mute
57+
Mapdl.name
2858
Mapdl.non_interactive
59+
Mapdl.on_docker
2960
Mapdl.open_apdl_log
3061
Mapdl.open_gui
31-
Mapdl.parameters
62+
Mapdl.platform
63+
Mapdl.print_com
64+
Mapdl.process_is_alive
65+
Mapdl.remove_file_handler
3266
Mapdl.remove_temp_dir_on_exit
3367
Mapdl.result
68+
Mapdl.result_file
3469
Mapdl.run
70+
Mapdl.run_as_routine
3571
Mapdl.run_multiline
36-
Mapdl.input_strings
72+
Mapdl.save_selection
73+
Mapdl.scalar_param
74+
Mapdl.screenshot
3775
Mapdl.set_log_level
38-
Mapdl.version
76+
Mapdl.thermal_result
3977
Mapdl.use_vtk
40-
Mapdl.file_type_for_plots
78+
Mapdl.version
4179

4280

4381
Constants
@@ -57,40 +95,18 @@ Constants
5795
.. autosummary::
5896
:toctree: _autosummary
5997

98+
mapdl_grpc.MapdlGrpc.channel_state
99+
mapdl_grpc.MapdlGrpc.check_status
100+
mapdl_grpc.MapdlGrpc.connection
60101
mapdl_grpc.MapdlGrpc.download
102+
mapdl_grpc.MapdlGrpc.download_project
103+
mapdl_grpc.MapdlGrpc.download_result
104+
mapdl_grpc.MapdlGrpc.file
105+
mapdl_grpc.MapdlGrpc.ip
106+
mapdl_grpc.MapdlGrpc.is_local
61107
mapdl_grpc.MapdlGrpc.list_error_file
62108
mapdl_grpc.MapdlGrpc.list_files
63109
mapdl_grpc.MapdlGrpc.mute
110+
mapdl_grpc.MapdlGrpc.port
64111
mapdl_grpc.MapdlGrpc.upload
65112

66-
67-
``Information`` class attributes
68-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69-
70-
.. currentmodule:: ansys.mapdl.core.information
71-
72-
.. autosummary::
73-
:toctree: _autosummary
74-
75-
Information.product
76-
Information.mapdl_version
77-
Information.pymapdl_version
78-
Information.products
79-
Information.preprocessing_capabilities
80-
Information.aux_capabilities
81-
Information.solution_options
82-
Information.post_capabilities
83-
Information.title
84-
Information.titles
85-
Information.stitles
86-
Information.units
87-
Information.scratch_memory_status
88-
Information.database_status
89-
Information.config_values
90-
Information.global_status
91-
Information.job_information
92-
Information.model_information
93-
Information.boundary_condition_information
94-
Information.routine_information
95-
Information.solution_options_configuration
96-
Information.load_step_options

src/ansys/mapdl/core/mapdl_core.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def __init__(
295295
self._start_parm: Dict[str, Any] = start_parm
296296
self._jobname: str = start_parm.get("jobname", "file")
297297
self._path: Union[str, pathlib.Path] = start_parm.get("run_location", None)
298-
self.check_parameter_names = start_parm.get("check_parameter_names", True)
298+
self._check_parameter_names = start_parm.get("check_parameter_names", True)
299299

300300
# Setting up loggers
301301
self._log: logger = logger.add_instance_logger(
@@ -715,8 +715,19 @@ def launched(self):
715715
"""Check if the MAPDL instance has been launched by PyMAPDL."""
716716
return self._launched
717717

718+
@property
719+
def check_parameter_names(self):
720+
"""Whether check if the name which is given to the parameter is allowed or not"""
721+
return self._check_parameter_names
722+
723+
@check_parameter_names.setter
724+
def check_parameter_names(self, value: bool):
725+
"""Whether check if the name which is given to the parameter is allowed or not"""
726+
self._check_parameter_names = value
727+
718728
@property
719729
def logger(self) -> logging.Logger:
730+
"""MAPDL Python-based logger"""
720731
return self._log
721732

722733
@property
@@ -870,6 +881,8 @@ def post_processing(self) -> "PostProcessing":
870881

871882
@property
872883
def print_com(self):
884+
"""Whether to print or not to the console the
885+
:meth:`mapdl.com ("/COM") <ansys.mapdl.core.Mapdl.com>` calls."""
873886
return self._print_com
874887

875888
@print_com.setter

src/ansys/mapdl/core/mapdl_grpc.py

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ def _is_alive_subprocess(self):
629629

630630
@property
631631
def process_is_alive(self):
632+
"""Check if the MAPDL process is alive"""
632633
return self._is_alive_subprocess()
633634

634635
def _post_mortem_checks(self):
@@ -3403,24 +3404,20 @@ def get_esol(
34033404
node : int
34043405
Node number on this element for which data are to be
34053406
stored. If blank, store the average element value (except
3406-
for FMAG values, which are summed instead of averaged).
3407+
for ``FMAG`` values, which are summed instead of averaged).
34073408
34083409
item : str
3409-
Label identifying the item. General item labels are shown
3410-
in Table 134: ESOL - General Item and Component Labels
3411-
below. Some items also require a component label.
3410+
Label identifying the item. Some items also require a component label.
34123411
34133412
comp : str
3414-
Component of the item (if required). General component
3415-
labels are shown in Table 134: ESOL - General Item and
3416-
Component Labels below. If Comp is a sequence number (n),
3417-
the NODE field will be ignored.
3413+
Component of the item (if required). If Comp is a sequence number (n),
3414+
the ``NODE`` field will be ignored.
34183415
34193416
name : str, optional
34203417
Thirty-two character name for identifying the item on the
34213418
printout and displays. The default is a label formed by
34223419
concatenating the first four characters of the ``item`` and
3423-
``comp`` labels.
3420+
``comp`` labels.
34243421
34253422
tstrt : str, optional
34263423
Time (or frequency) corresponding to start of IR data. If between
@@ -3441,21 +3438,18 @@ def get_esol(
34413438
Notes
34423439
-----
34433440
By default, this command store temporally the variable on the
3444-
variable number set by ``VAR_IR`` in the class MapdlGrpc.
3441+
variable number set by ``VAR_IR`` in the class
3442+
:class:`Mapdl <ansys.mapdl.core.mapdl.MapdlBase>`
34453443
Therefore, any variable in that slot will be deleted when using
34463444
this command.
34473445
3448-
See Table: 134:: ESOL - General Item and Component Labels for
3449-
a list of valid item and component labels for element (except
3450-
line element) results.
3451-
3452-
The ESOL command defines element results data to be stored
3453-
from a results file (FILE). Not all items are valid for all
3446+
The ``ESOL`` command defines element results data to be stored
3447+
from a results file (``FILE``). Not all items are valid for all
34543448
elements. To see the available items for a given element,
34553449
refer to the input and output summary tables in the
34563450
documentation for that element.
34573451
3458-
Two methods of data access are available via the ESOL
3452+
Two methods of data access are available via the ``ESOL``
34593453
command. You can access some simply by using a generic label
34603454
(component name method), while others require a label and
34613455
number (sequence number method).
@@ -3476,10 +3470,10 @@ def get_esol(
34763470
system. Element forces and moments are in the nodal
34773471
coordinate system. Results are obtainable for an element at a
34783472
specified node. Further location specifications can be made
3479-
for some elements via the SHELL, LAYERP26, and FORCE commands.
3473+
for some elements via the ``SHELL``, ``LAYERP26``, and ``FORCE`` commands.
34803474
34813475
For more information on the meaning of contact status and its
3482-
possible values, see Reviewing Results in POST1 in the Contact
3476+
possible values, see Reviewing Results in ``POST1`` in the Contact
34833477
Technology Guide.
34843478
"""
34853479
self.esol(
@@ -3759,6 +3753,15 @@ def get_file_name(path):
37593753
return os.path.basename(target_dir)
37603754

37613755
def kill_job(self, jobid: int) -> None:
3756+
"""Kill an HPC job
3757+
3758+
Kill a job given its identifier.
3759+
3760+
Parameters
3761+
----------
3762+
jobid : int
3763+
Job ID.
3764+
"""
37623765
cmd = ["scancel", f"{jobid}"]
37633766
# to ensure the job is stopped properly, let's issue the scancel twice.
37643767
subprocess.Popen(cmd)

0 commit comments

Comments
 (0)