Skip to content
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

Fix locally build docs in Windows #2338

Merged
merged 4 commits into from
Sep 15, 2023
Merged
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
4 changes: 2 additions & 2 deletions doc/source/user_guide/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ You now have solved for the first 10 modes of the cube:
[1475.1 1475.1 2018.8 2018.8 2018.8 2024.8 2024.8 2024.8 2242.2 2274.8]

Next, load the mass and stiffness matrices that are stored by default
in the ``<jobname>.full`` file. First, create an instance of the :class:`MapdlMath
<ansys.math.core.math.AnsMath>` class as ``mm``:
in the :file:`<jobname>.full` file. First, create an instance of the
:class:`MapdlMath <ansys.math.core.math.AnsMath>` class as ``mm``:

.. code:: python

Expand Down
17 changes: 10 additions & 7 deletions examples/00-mapdl-examples/composite_dcb.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,12 @@
dpf.core.make_tmp_dir_server(dpf.SERVER)

if dpf.SERVER.local_server:
model = dpf.Model(rst_path)
path_source = rst_path
else:
server_file_path = dpf.upload_file_in_tmp_folder(rst_path)
model = dpf.Model(server_file_path)
path_source = dpf.upload_file_in_tmp_folder(rst_path)

# Building the model
model = dpf.Model(path_source)

# Get the mesh of the whole model
meshed_region = model.metadata.meshed_region
Expand All @@ -342,7 +344,7 @@
nmisc_index = 70

# Generate the damage result operator
data_src = dpf.DataSources(server_file_path)
data_src = dpf.DataSources(path_source)
dam_op = dpf.operators.result.nmisc(data_sources=data_src, item_index=70)

# Generate the displacement operator
Expand Down Expand Up @@ -446,8 +448,9 @@
###############################################################################
#
# Exit MAPDL
mapdl.exit()

try:
os.remove(rst_path)
except FileNotFoundError:
os.remove(path_source)
except (FileNotFoundError, PermissionError):
pass
mapdl.exit()
8 changes: 6 additions & 2 deletions examples/00-mapdl-examples/cyclic_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
# ~~~~~~~~~~~~~~~~~~~~~
# Enter the preprocessing routine and make the mesh cyclic.
mapdl.prep7()
mapdl.shpp("off")
mapdl.nummrg(label="NODE", toler=1e-3)

mapdl.cyclic()


Expand All @@ -50,12 +53,13 @@
mapdl.omega(0, 0, 1000) # 1000 RPM

mapdl.csys(1) # enter the cyclic coordinate system
mapdl.nsel("S", "loc", "x", 0.69, 0.71) # radial between 0.69 - 0.71

mapdl.nsel("S", "loc", "x", 0, 0.71) # radial between 0.69 - 0.71
mapdl.d("ALL", "ALL") # all DOF for those 8 nodes

mapdl.allsel()
mapdl.csys(0) # return to cartesian coordinate system


###############################################################################
# Run a static analysis
# ~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/mapdl/core/krylov.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def gensubspace(

Returns
-------
AnsMat
AnsMath
Krylov subspace.

Notes
Expand Down Expand Up @@ -405,7 +405,7 @@ def solve(self, freq_start, freq_end, freq_steps, ramped_load=True):

Returns
-------
AnsMat
AnsMath
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AnsMat mention was, in my opinion, not a typo.
The output is supposed to be a matrix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is valid for all the AnsMath mentions in this PR.
AnsMat and AnsVec are AnsMath objects.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh.. Interesting... I thought it was a typo.

I might undo it in the future.

Reduced solution over the frequency range.

Notes
Expand Down
16 changes: 8 additions & 8 deletions src/ansys/mapdl/core/xpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,14 @@ def extract(self, recordname, sets="ALL", asarray=False):
Number of sets. Can be ``"ALL"`` or the number of sets to load.

asarray : bool, optional
Return a :class:`numpy.ndarray` rather than a :class:`AnsMat
<ansy.math.core.math.AnsMat>`. Default ``False``.
Return a :class:`numpy.ndarray` rather than a :class:`AnsMath
<ansy.math.core.math.AnsMath>`. Default ``False``.

Returns
-------
numpy.ndarray or ansys.math.core.math.AnsMat
A :class:`numpy.ndarray` or :class:`AnsMat
<ansys.math.core.math.AnsMat>` of the displacement vectors,
numpy.ndarray or ansys.math.core.math.AnsMath
A :class:`numpy.ndarray` or :class:`AnsMath
<ansys.math.core.math.AnsMath>` of the displacement vectors,
depending on the value of ``asarray``.

Notes
Expand Down Expand Up @@ -456,12 +456,12 @@ def read(self, recordname, asarray=False):

Returns
-------
ansys.mapdl.AnsMat or ansys.mapdl.AnsVec
ansys.mapdl.AnsMath or ansys.mapdl.AnsVec
A handle to the APDLMath object.

asarray : bool, optional
Return a :class:`numpy.ndarray` rather than a :class:`AnsMat
<ansys.math.core.math.AnsMat>`. Default ``False``.
Return a :class:`numpy.ndarray` rather than a :class:`AnsMath
<ansys.math.core.math.AnsMath>`. Default ``False``.

Examples
--------
Expand Down