Skip to content

Commit e7da0bd

Browse files
committed
Update to v0.14.0
1 parent d02ebb6 commit e7da0bd

File tree

67 files changed

+10938
-2661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+10938
-2661
lines changed

docs/source/example_problems/airplane_modal_test.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ function wants as its arguments. The first argument is ``sensors_to_keep``,
849849
which is the number we just defined. The second is the ``shape_matrix``.
850850
Reading the documentation, this ``shape_matrix`` should have its first dimension
851851
corresponding to each sensor (here a sensor could be a channel or group of
852-
channels for a triaxial accelerometer) and its last dimension be correspond to
852+
channels for a triaxial accelerometer) and its last dimension correspond to
853853
each target mode. We will therefore want to set up a matrix with shape
854854
(``candidate_node_ids.size`` x 3 x ``target_shapes.size``). This way, the
855855
target shape dimension is last, and the group of channels corresponding to each
@@ -1726,29 +1726,29 @@ look through all the functions to ensure they look right.
17261726
:width: 600
17271727
:alt: Drive points used for a MIMO modal test.
17281728

1729-
Fitting Modes using PolyMax
1730-
---------------------------
1729+
Fitting Modes using PolyPy
1730+
--------------------------
17311731

17321732
Now that we have frequency response functions created, we can fit modes to them.
17331733
SDynPy has two mode fitters implemented,
1734-
:py:class:`PolyMax<sdynpy.modal.sdynpy_polymax.PolyMax_GUI>` and
1734+
:py:class:`PolyPy<sdynpy.modal.sdynpy_polypy.PolyPy_GUI>` and
17351735
:py:class:`SMAC<sdynpy.modal.sdynpy_smac.SMAC_GUI>`. Both curve fitters can
17361736
be used via graphical user interface or via Python commands if it is desirable
17371737
to automate the curve fitting. This example will use the
1738-
:py:class:`sdpy.PolyMax_GUI<sdynpy.modal.sdynpy_polymax.PolyMax_GUI>` approach.
1738+
:py:class:`sdpy.PolyPy_GUI<sdynpy.modal.sdynpy_polypy.PolyPy_GUI>` approach.
17391739

1740-
Running PolyMax
1740+
Running PolyPy
17411741
~~~~~~~~~~~~~~~
17421742

1743-
We open the PolyMax GUI by initializing the
1744-
:py:class:`sdpy.PolyMax_GUI<sdynpy.modal.sdynpy_polymax.PolyMax_GUI>` class
1743+
We open the PolyPy GUI by initializing the
1744+
:py:class:`sdpy.PolyPy_GUI<sdynpy.modal.sdynpy_polypy.PolyPy_GUI>` class
17451745
with our frequency response function dataset ``frf_sampled``
17461746

17471747
.. code-block:: python
17481748
17491749
# Now that we have FRFs we can go fit modes. We will first look at using
1750-
# PolyMax
1751-
pm = sdpy.PolyMax_GUI(frf_sampled)
1750+
# PolyPy
1751+
pm = sdpy.PolyPy_GUI(frf_sampled)
17521752
17531753
The initial screen shows mode indicator functions, as well as options for
17541754
computing the initial stabilization diagram. We can see from the shown
@@ -1757,25 +1757,25 @@ modes. We can drag the frequency region on the figure to select the frequency
17571757
range of interest, set the polynomial orders, and press the button to compute
17581758
the stabilization curve.
17591759

1760-
.. image:: figures/airplane_polymax_stabilization.png
1760+
.. image:: figures/airplane_polypy_stabilization.png
17611761
:width: 600
1762-
:alt: Setting up parameters to compute the stabilization plot in PolyMax
1762+
:alt: Setting up parameters to compute the stabilization plot in PolyPy
17631763

17641764
Once the stabilization plot is computed, stable poles can be selected by
17651765
clicking on them in the stabilization plot. Once all poles are selected,
17661766
shapes can be computed.
17671767

1768-
.. image:: figures/airplane_polymax_stabilization_selection.png
1768+
.. image:: figures/airplane_polypy_stabilization_selection.png
17691769
:width: 600
1770-
:alt: Selecting poles on the stabilization plot in PolyMax
1770+
:alt: Selecting poles on the stabilization plot in PolyPy
17711771

1772-
The final tab of the PolyMax implementation allows you to see how well the
1772+
The final tab of the PolyPy implementation allows you to see how well the
17731773
modes fit to the measured frequency response data. On this page, modes can be
17741774
saved to a file.
17751775

1776-
.. image:: figures/airplane_polymax_stabilization_resynthesis.png
1776+
.. image:: figures/airplane_polypy_stabilization_resynthesis.png
17771777
:width: 600
1778-
:alt: Visualizing the modal fits in PolyMax
1778+
:alt: Visualizing the modal fits in PolyPy
17791779

17801780
Comparing Test and Finite Element Modes
17811781
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1789,15 +1789,15 @@ function.
17891789

17901790
.. code-block:: python
17911791
1792-
# In the PolyMax GUI we saved the shapes to disk, so we will now load them.
1793-
test_shapes_polymax = sdpy.shape.load('shapes_polymax.npy')
1792+
# In the PolyPy GUI we saved the shapes to disk, so we will now load them.
1793+
test_shapes_polypy = sdpy.shape.load('shapes_polypy.npy')
17941794
17951795
# Let's compare the shapes to the finite element model shapes
1796-
mac = sdpy.shape.mac(test_shapes,test_shapes_polymax)
1796+
mac = sdpy.shape.mac(test_shapes,test_shapes_polypy)
17971797
sdpy.correlation.matrix_plot(
17981798
mac,text_size=6)
17991799
shape_correspondences = np.where(mac > 0.9)
1800-
shape_1 = test_shapes_polymax[shape_correspondences[1]]
1800+
shape_1 = test_shapes_polypy[shape_correspondences[1]]
18011801
shape_2 = test_shapes[shape_correspondences[0]]
18021802
print(sdpy.shape.shape_comparison_table(shape_1, shape_2,
18031803
percent_error_format='{:0.4f}%'))
@@ -1901,14 +1901,14 @@ and global finite element geometry are handled automatically by SDynPy.
19011901
19021902
# Perform the expansion using the finite element shapes in the bandwidth
19031903
expansion_basis = shapes_global[shapes_global.frequency < shape_bandwidth]
1904-
expanded_shapes = test_shapes_polymax.expand(test_geometry,geometry_global,
1904+
expanded_shapes = test_shapes_polypy.expand(test_geometry,geometry_global,
19051905
expansion_basis)
19061906
# We can then plot the expanded shapes on the original finite element geometry
19071907
geometry_global.plot_shape(expanded_shapes,plot_options)
19081908
19091909
# Or overlay the geometries and shapes
19101910
expansion_comparison_geometry,expansion_comparison_shapes = sdpy.shape.overlay_shapes(
1911-
(test_geometry,geometry_global),(test_shapes_polymax,expanded_shapes),[1,7])
1911+
(test_geometry,geometry_global),(test_shapes_polypy,expanded_shapes),[1,7])
19121912
expansion_comparison_geometry.plot_shape(expansion_comparison_shapes,plot_options,
19131913
deformed_opacity=0.5,undeformed_opacity=0)
19141914

docs/source/example_problems/figures/airplane_polymax_stabilization.png renamed to docs/source/example_problems/figures/airplane_polypy_stabilization.png

File renamed without changes.

docs/source/example_problems/figures/airplane_polymax_stabilization_resynthesis.png renamed to docs/source/example_problems/figures/airplane_polypy_stabilization_resynthesis.png

File renamed without changes.

docs/source/example_problems/figures/airplane_polymax_stabilization_selection.png renamed to docs/source/example_problems/figures/airplane_polypy_stabilization_selection.png

File renamed without changes.

docs/source/example_problems/figures/sdynpy_demo_polymax_resynthesize.png renamed to docs/source/example_problems/figures/sdynpy_demo_polypy_resynthesize.png

File renamed without changes.

docs/source/example_problems/figures/sdynpy_demo_polymax_setup.png renamed to docs/source/example_problems/figures/sdynpy_demo_polypy_setup.png

File renamed without changes.

docs/source/example_problems/figures/sdynpy_demo_polymax_stability_plot.png renamed to docs/source/example_problems/figures/sdynpy_demo_polypy_stability_plot.png

File renamed without changes.

docs/source/example_problems/rattlesnake_demonstration.rst

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ Fitting Modes to the FRFs
445445
-------------------------
446446

447447
Now that we have data and geometry, we can perform experimental modal analysis.
448-
We will fit modes both with SMAC and PolyMax. First we will do SMAC, so we can
448+
We will fit modes both with SMAC and PolyPy. First we will do SMAC, so we can
449449
call :py:class:`sdpy.SMAC_GUI<sdynpy.modal.sdynpy_smac.SMAC_GUI>` in the
450450
IPython console to load the GUI.
451451

@@ -508,39 +508,39 @@ The MAC can also be plotted to visualize the independence of the shapes.
508508
Shapes are saved to the file :code:`'rattlesnake_test_shapes_smac.npy'` so they
509509
can be loaded into the script without re-running SMAC.
510510

511-
Similarly, PolyMax can be run by calling the :py:class:`sdpy.PolyMax_GUI<sdynpy.modal.sdynpy_polymax.PolyMax_GUI>`
511+
Similarly, PolyPy can be run by calling the :py:class:`sdpy.PolyPy_GUI<sdynpy.modal.sdynpy_polypy.PolyPy_GUI>`
512512
class from the IPython console.
513513

514514
.. code-block:: console
515515
516-
In [13]: sdynpy.PolyMax_GUI(frfs)
517-
Out[13]: <sdynpy.modal.sdynpy_polymax.PolyMax_GUI at 0x14fff4c5d30>
516+
In [13]: sdynpy.PolyPy_GUI(frfs)
517+
Out[13]: <sdynpy.modal.sdynpy_polypy.PolyPy_GUI at 0x14fff4c5d30>
518518
519-
The first page of the SDynPy PolyMax implementation allows users to select the
519+
The first page of the SDynPy PolyPy implementation allows users to select the
520520
frequency range of the analysis. Also selected is the number of poles to use
521521
in the polynomial fitter.
522522

523-
.. image:: figures/sdynpy_demo_polymax_setup.png
523+
.. image:: figures/sdynpy_demo_polypy_setup.png
524524
:width: 600
525-
:alt: Initial setup for PolyMax frequency range
525+
:alt: Initial setup for PolyPy frequency range
526526

527527
Once the poles are solved, a stability plot is presented. The user can click
528528
on individual icons on the stability plot to select given poles to use in the
529529
resynthesis.
530530

531-
.. image:: figures/sdynpy_demo_polymax_stability_plot.png
531+
.. image:: figures/sdynpy_demo_polypy_stability_plot.png
532532
:width: 600
533-
:alt: PolyMax stability plot
533+
:alt: PolyPy stability plot
534534

535535
With the poles selected, shapes can be computed. Resynthesized FRFs are plotted
536536
for the user to investigate.
537537

538-
.. image:: figures/sdynpy_demo_polymax_resynthesize.png
538+
.. image:: figures/sdynpy_demo_polypy_resynthesize.png
539539
:width: 600
540-
:alt: PolyMax resynthesis
540+
:alt: PolyPy resynthesis
541541

542-
Shapes are saved to the file :code:`'rattlesnake_test_shapes_polymax.npy'` so they
543-
can be loaded into the script without re-running PolyMax.
542+
Shapes are saved to the file :code:`'rattlesnake_test_shapes_polypy.npy'` so they
543+
can be loaded into the script without re-running PolyPy.
544544

545545
Analyzing Modal Parameters
546546
--------------------------
@@ -553,7 +553,7 @@ shape files into our script for analysis using the
553553
554554
# Load the shape files from our curve fitting into the script
555555
test_shapes_smac = sdpy.shape.load('rattlesnake_test_shapes_smac.npy')
556-
test_shapes_polymax = sdpy.shape.load('rattlesnake_test_shapes_smac.npy')
556+
test_shapes_polypy = sdpy.shape.load('rattlesnake_test_shapes_smac.npy')
557557
558558
We also want to extract finite element shapes from the Exodus file using the
559559
:py:func:`sdpy.shape.from_exodus<sdynpy.core.sdynpy_shape.ShapeArray.from_exodus>`
@@ -584,7 +584,7 @@ finite element shapes reduced to the test degrees of freedom.
584584
response_dofs = test_shapes_smac[0].coordinate
585585
# Can extract a shape matrix by indexing the shape arrays with a CoordinateArray
586586
test_shape_matrix_smac = test_shapes_smac[response_dofs].T
587-
test_shape_matrix_polymax = test_shapes_smac[response_dofs].T
587+
test_shape_matrix_polypy = test_shapes_smac[response_dofs].T
588588
test_shape_matrix_fem = fem_shapes[response_dofs].T
589589
# Create an actual ShapeArray object
590590
fem_shapes_reduced = sdpy.shape_array(response_dofs,
@@ -601,11 +601,11 @@ function that provides a nice visualization of the Modal Assurance Criterion mat
601601
.. code-block:: python
602602
603603
# Look at correlation between shapes from different tests/analyses
604-
mac_smac_polymax = sdpy.correlation.mac(test_shape_matrix_smac,test_shape_matrix_polymax)
604+
mac_smac_polypy = sdpy.correlation.mac(test_shape_matrix_smac,test_shape_matrix_polypy)
605605
mac_smac_fem = sdpy.correlation.mac(test_shape_matrix_smac,test_shape_matrix_fem)
606-
mac_polymax_fem = sdpy.correlation.mac(test_shape_matrix_polymax,test_shape_matrix_fem)
606+
mac_polypy_fem = sdpy.correlation.mac(test_shape_matrix_polypy,test_shape_matrix_fem)
607607
# Plot the mac matrix between the
608-
sdpy.correlation.matrix_plot(mac_polymax_fem)
608+
sdpy.correlation.matrix_plot(mac_polypy_fem)
609609
610610
.. image:: figures/sdynpy_demo_mac_test_fem.png
611611
:width: 600
@@ -625,11 +625,11 @@ of the first mode to a :code:`.gif` file.
625625
626626
# Compare shapes by overlaying them
627627
# Find the best match in the FEM to each of the test shapes
628-
fem_matches = np.argmax(mac_polymax_fem,axis=1)
628+
fem_matches = np.argmax(mac_polypy_fem,axis=1)
629629
# Overlay the shapes and geometry
630630
combined_geometry,combined_shapes = sdpy.shape.overlay_shapes(
631631
(test_geometry,test_geometry),
632-
(test_shapes_polymax,fem_shapes_reduced[fem_matches]),
632+
(test_shapes_polypy,fem_shapes_reduced[fem_matches]),
633633
color_override=[1,11])
634634
# Plot the shapes to set up the animation
635635
geometry_kwargs = {'view_up':[0,1,0],'line_width':5,'node_size':8}
@@ -679,7 +679,7 @@ slide that does not have a subtitle placeholder on it.
679679
title='BARC Modal with Rattlesnake',
680680
subtitle='A SDynPy Demonstration',
681681
geometry = test_geometry,
682-
shapes = test_shapes_polymax,
682+
shapes = test_shapes_polypy,
683683
frfs=frfs,
684684
geometry_plot_kwargs = geometry_kwargs,
685685
content_slide_layout_index=2,
@@ -724,7 +724,7 @@ to allow animation of the shapes inside the exported PDF.
724724
sdpy.doc.create_latex_summary(
725725
figure_basename='figures/rattlesnake_test.png',
726726
geometry = test_geometry,
727-
shapes = test_shapes_polymax,
727+
shapes = test_shapes_polypy,
728728
frfs = frfs,
729729
output_file = 'rattlesnake_test_memo_content.tex',
730730
geometry_plot_kwargs = geometry_kwargs)
@@ -798,7 +798,7 @@ shapes should be included in the expansion.
798798

799799
.. code-block:: python
800800
801-
q = np.linalg.lstsq(test_shape_matrix_fem[:,:14],test_shape_matrix_polymax)[0]
801+
q = np.linalg.lstsq(test_shape_matrix_fem[:,:14],test_shape_matrix_polypy)[0]
802802
803803
We then want to multiply this coefficient by the full finite element shapes to
804804
estimate what the test shapes would look like in the full finite element space.
@@ -824,7 +824,7 @@ us to fill that information in with the test frequencies.
824824
# Linearly combine the existing shapes into new shapes
825825
fexo_repack = fexo.repack(q)
826826
# Fill in the abscissa data (frequencies in this case)
827-
fexo_repack.time = test_shapes_polymax.frequency
827+
fexo_repack.time = test_shapes_polypy.frequency
828828
829829
If we want to plot the new shapes in SDynPy, we could load the shapes back into
830830
a :py:class:`sdpy.ShapeArray<sdynpy.core.sdynpy_shape.ShapeArray>` object, and
@@ -834,11 +834,11 @@ even combine with the finite element shapes for comparison.
834834
835835
# Plot expanded shapes against finite element shapes
836836
# Load shapes into sdynpy ShapeArray object
837-
expanded_shapes_polymax = sdpy.shape.from_exodus(fexo_repack)
837+
expanded_shapes_polypy = sdpy.shape.from_exodus(fexo_repack)
838838
# combine the shapes
839839
combined_expanded_geometry,combined_expanded_shapes = sdpy.shape.overlay_shapes(
840840
(fem_geometry,fem_geometry),
841-
(expanded_shapes_polymax,fem_shapes[fem_matches]),color_override=[1,11])
841+
(expanded_shapes_polypy,fem_shapes[fem_matches]),color_override=[1,11])
842842
# Plot the shapes overlaid
843843
plotter = combined_expanded_geometry.plot_shape(
844844
combined_expanded_shapes,{'view_up':[0,1,0],'node_size':0},
@@ -855,11 +855,11 @@ to visualize in external software.
855855
.. code-block:: python
856856
857857
# Create an ExodusInMemory object from sdynpy objects
858-
fexo_out = sdpy.ExodusInMemory.from_sdynpy(test_geometry,test_shapes_polymax)
858+
fexo_out = sdpy.ExodusInMemory.from_sdynpy(test_geometry,test_shapes_polypy)
859859
# Write it to a file
860860
fexo_out.write_to_file('rattlesnake_test_output.exo',clobber=True)
861861
# Repeat with the expanded data
862-
fexo_out = sdpy.ExodusInMemory.from_sdynpy(fem_geometry,expanded_shapes_polymax)
862+
fexo_out = sdpy.ExodusInMemory.from_sdynpy(fem_geometry,expanded_shapes_polypy)
863863
fexo_out.write_to_file('rattlesnake_test_output_expanded.exo',clobber=True)
864864
865865
The Exodus files can then be loaded into an external software such as Paraview

docs/source/images/Thumbs.db

-147 KB
Binary file not shown.

docs/source/index.rst

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Welcome to SDynPy's documentation!
1414
==================================
1515

16-
|documentation| |build| |codecov| |coveralls| |codefactor| |pylint| |docker|
16+
|docs| |tests| |coverage| |lint| |version|
1717

1818
**SDynPy** is a package for performing structural dynamic analyses using Python.
1919
It contains several objects that represent various structural dynamics data
@@ -30,10 +30,11 @@ an overview of recommended workflows and a summary of current functionality.
3030
Information
3131
***********
3232

33-
- `Documentation <https://sandialabs.github.io/sdynpy/>`_
34-
- `Project <https://github.com/sandialabs/sdynpy>`_
35-
- `Releases <https://github.com/sandialabs/sdynpy/releases>`_
36-
- `Tutorial <https://sandialabs.github.io/sdynpy/sdynpy_showcase.html>`_
33+
- `Contributing <https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/blob/main/CONTRIBUTING.rst>`_
34+
- `Documentation <http://structmechtools.cee-gitlab.lan/structural-dynamics-python-libraries/>`_
35+
- `Project <https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/>`_
36+
- `Releases <https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/releases>`_
37+
- `Tutorial <http://structmechtools.cee-gitlab.lan/structural-dynamics-python-libraries/sdynpy_showcase.html>`_
3738

3839
.. toctree::
3940
:maxdepth: 2
@@ -56,23 +57,21 @@ Indices and tables
5657
..
5758
Badges ========================================================================
5859
59-
.. |documentation| image:: https://img.shields.io/github/actions/workflow/status/sandialabs/sdynpy/pages.yml?branch=main&label=Documentation
60-
:target: https://sandialabs.github.io/sdynpy/
60+
.. |docs| image:: https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/jobs/artifacts/main/raw/badges/docs.svg?job=pages
61+
:target: http://structmechtools.cee-gitlab.lan/structural-dynamics-python-libraries/
62+
:alt: docs
6163

62-
.. |build| image:: https://img.shields.io/github/actions/workflow/status/sandialabs/sdynpy/main.yml?branch=main&label=GitHub&logo=github
63-
:target: https://github.com/sandialabs/sdynpy
64+
.. |tests| image:: https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/jobs/artifacts/main/raw/badges/tests.svg?job=basic-tests
65+
:target: https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/jobs/artifacts/main/raw/logs/report.xml?job=basic-tests
66+
:alt: tests
6467

65-
.. |pylint| image:: https://raw.githubusercontent.com/sandialabs/sdynpy/gh-pages/pylint.svg
66-
:target: https://github.com/sandialabs/sdynpy
68+
.. |coverage| image:: https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/badges/main/coverage.svg
69+
:target: https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/pipelines/latest
70+
:alt: coverage
6771

68-
.. |coveralls| image:: https://img.shields.io/coveralls/github/sandialabs/sdynpy?logo=coveralls&label=Coveralls
69-
:target: https://coveralls.io/github/sandialabs/sdynpy?branch=main
72+
.. |lint| image:: https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/jobs/artifacts/main/raw/badges/lint.svg?job=static-code-checks
73+
:target: https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/jobs/artifacts/main/raw/logs/lint.log?job=static-code-checks
74+
:alt: lint
7075

71-
.. |codecov| image:: https://img.shields.io/codecov/c/github/sandialabs/sdynpy?label=Codecov&logo=codecov
72-
:target: https://codecov.io/gh/sandialabs/sdynpy
73-
74-
.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/sandialabs/sdynpy?label=Codefactor&logo=codefactor
75-
:target: https://www.codefactor.io/repository/github/sandialabs/sdynpy
76-
77-
.. |docker| image:: https://img.shields.io/docker/v/dprohe/sdynpy?color=0db7ed&label=Docker%20Hub&logo=docker&logoColor=0db7ed
78-
:target: https://hub.docker.com/r/dprohe/sdynpy
76+
.. |version| image:: https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/jobs/artifacts/main/raw/badges/version.svg?job=badges
77+
:target: https://cee-gitlab.sandia.gov/structMechTools/structural-dynamics-python-libraries/-/releases

0 commit comments

Comments
 (0)