Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
akaszynski committed Mar 25, 2022
2 parents bd80c49 + 51f4cb5 commit 4ca17b5
Showing 29 changed files with 2,166 additions and 277 deletions.
2 changes: 1 addition & 1 deletion .ci/start_mapdl.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
echo $GH_PAT | docker login -u $GH_USERNAME --password-stdin docker.pkg.github.com
docker pull $MAPDL_IMAGE
docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER --restart always --name mapdl -p $PYMAPDL_PORT:50052 $MAPDL_IMAGE -smp > log.txt &
docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER --restart always --name mapdl -p $PYMAPDL_PORT:50052 -p $PYMAPDL_DB_PORT:50055 $MAPDL_IMAGE -smp > log.txt &
grep -q 'Server listening on' <(timeout 60 tail -f log.txt)
# python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())"
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,8 @@ on:
- main

env:
PYMAPDL_PORT: 21000 # default won't work on azure
PYMAPDL_PORT: 21000 # default won't work on GitHub runners
PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners
PYMAPDL_START_INSTANCE: FALSE
PYANSYS_OFF_SCREEN: True
DOCKER_PACKAGE: docker.pkg.github.com/pyansys/pymapdl/mapdl
@@ -165,11 +166,7 @@ jobs:
- name: Build Documentation
run: |
xvfb-run make -C doc html SPHINXOPTS="-j auto -w build_errors.txt -N"
# Verify that sphinx generates no warnings
- name: Check for sphinx warnings
run: python doc/print_errors.py
xvfb-run make -C doc html SPHINXOPTS="-j auto -W --keep-going"
- name: Zip documentation
run: |
31 changes: 0 additions & 31 deletions doc/print_errors.py

This file was deleted.

12 changes: 12 additions & 0 deletions doc/source/api/database.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _ref_database_service_api:

Database
========
.. currentmodule:: ansys.mapdl.core.database

.. autosummary::
:toctree: _autosummary

MapdlDb
elems.DbElems
nodes.DbNodes
1 change: 1 addition & 0 deletions doc/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ MAPDL commands mapped to PyMAPDL, see :ref:`ref_mapdl_commands`.
:hidden:

commands
database
geometry
helper
inline
8 changes: 4 additions & 4 deletions doc/source/getting_started/using_julia.rst
Original file line number Diff line number Diff line change
@@ -26,10 +26,10 @@ To install it, run Julia and switch to the package manager by pressing the``"]"
If you need to work with different package versions or applications, it is beneficial to create a virtual environment in Julia.
To create a virtual environment, use the ``activate`` command with the name of the new environment that you want to create or activate.

.. code-block:: julia
.. code-block::
(@1.7) pkg> activate julia_test
Activating project at `C:\Users\USER\julia_test`
Activating project at `C:/Users/USER/julia_test`
A message should appear, indicating that the new package (``julia_test``) has been activated. This environment name will now precede the command line.
@@ -114,7 +114,7 @@ In Linux:, you would install with:
Finally, after restarting Julia, you can import PyMAPDL using the same procedure as described above:

.. code-block:: julia
.. code-block::
julia> using PyCall
julia> pymapdl = pyimport("ansys.mapdl.core")
@@ -195,4 +195,4 @@ Here is a simple example of using PyMAPDL in Julia:
julia> mapdl.eplot()
.. note:: Do notice the changes in the strings (only ``""`` strings are allowed) and the loops.
.. note:: Do notice the changes in the strings (only ``""`` strings are allowed) and the loops.
2 changes: 1 addition & 1 deletion doc/source/mapdl_commands/post26/controls.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _ref_controls_api:
.. _ref_post26_controls_api:

********
Controls
2 changes: 1 addition & 1 deletion doc/source/mapdl_commands/post26/listing.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _ref_listing_api:
.. _ref_post26_listing_api:

*******
Listing
Original file line number Diff line number Diff line change
@@ -17,12 +17,12 @@

###############################################################################
# Starting MAPDL as a service and importing an external model
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# The original FE model is given in the Ansys Mechanical APDL Technology Showcase Manual.
# The .cdb contains a FE model of a single circuit board. The model is meshed
# with SOLID186, SHELL181 and BEAM188 elements. All components of the PCB
# model is assigned with linear elastic isotropic materials. Bonded and
# flexible surface-to-surface contact pairs are used to define the contact
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# The original FE model is given in the Ansys Mechanical APDL Technology
# Showcase Manual. The .cdb contains a FE model of a single circuit board. The
# model is meshed with SOLID186, SHELL181 and BEAM188 elements. All components
# of the PCB model is assigned with linear elastic isotropic materials. Bonded
# and flexible surface-to-surface contact pairs are used to define the contact
# between the IC packages and the circuit board.


@@ -48,7 +48,7 @@

###############################################################################
# Creating the complete layered model
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# The original model will be duplicated to create a layered PCB of three layers
# that are binded together.

@@ -173,7 +173,7 @@

###############################################################################
# Run PSD analysis
# ~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~
# The response spectrum analysis is defined, solved and post-processed.

# define PSD analysis with input spectrum
@@ -222,15 +222,17 @@
# MAPDL POST1 postprocessor is used. Then, the MAPDL time-history
# POST26 postprocessor is used to generate the response power spectral
# density.
# density.
# .. note:: The graph generated through POST26 is exported as a picture
# in the working directory. Finally, the results from POST26 are saved to Python
# variables to be plotted in the Python environment with the use of Matplotlib library.
#
# .. note::
# The graph generated through POST26 is exported as a picture in the working
# directory. Finally, the results from POST26 are saved to Python variables
# to be plotted in the Python environment with the use of Matplotlib
# library.


###############################################################################
# Post-process PSD analysis in POST1
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

mapdl.post1()
mapdl.set(1, 1)
@@ -240,7 +242,7 @@

###############################################################################
# Post-process PSD analysis in POST26 (time-history post-processing)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

mapdl.post26()

@@ -275,7 +277,7 @@

###############################################################################
# Post-process PSD analysis using Matplotlib
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# store MAPDL results to python variables
mapdl.dim("frequencies", "array", 4000, 1)
9 changes: 4 additions & 5 deletions examples/07-technology-showcase-examples/README.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Technology Showcase Manual Examples
====================================
This section demonstrates the broad simulation capabilities
of Ansys Mechanical APDL. The problems demonstrate how
to use PyMAPDL to effectively and accurately
solve interdisciplinary problems
from a variety of industries and engineering fields.
This section demonstrates the broad simulation capabilities of Ansys Mechanical
APDL. The problems demonstrate how to use PyMAPDL to effectively and accurately
solve interdisciplinary problems from a variety of industries and engineering
fields.
15 changes: 0 additions & 15 deletions examples/README.txt
Original file line number Diff line number Diff line change
@@ -4,18 +4,3 @@
Examples
========
Here are a series of examples using MAPDL with ``ansys-mapdl-core``.

..
This toctreemust be a top level index to get it to show up in
pydata_sphinx_theme

.. toctree::
:maxdepth: 1
:hidden:

00-mapdl-examples\README.txt
01-apdlmath-examples\README.txt
02-geometry\README.txt
03-tips-n-tricks\README.txt
05-Tech_demos\README.txt
07-technology-showcase-examples\README.txt
2 changes: 2 additions & 0 deletions src/ansys/mapdl/core/check_version.py
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@
(0, 3, 0): "2021R1",
(0, 4, 0): "2021R2",
(0, 4, 1): "2021R2",
(0, 5, 0): "2022R1",
(0, 5, 1): "2022R2", # as of 21 Mar 2022 unreleased
}


5 changes: 3 additions & 2 deletions src/ansys/mapdl/core/common_grpc.py
Original file line number Diff line number Diff line change
@@ -14,8 +14,9 @@
4: np.float32, # FLOAT
5: np.float64, # DOUBLE
6: np.complex64, # FCPLX
7: np.complex128,
} # DCPLX
7: np.complex128, # DCPLX
8: np.char,
}


VGET_ENTITY_TYPES = [
3 changes: 3 additions & 0 deletions src/ansys/mapdl/core/database/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""The mapdl database module, allowing the access to the MAPDL database from Python."""

from .database import DBDef, MapdlDb # noqa: F401
Loading

0 comments on commit 4ca17b5

Please sign in to comment.