Skip to content

Commit d75c83c

Browse files
Merge pull request #181 from robbievanleeuwen/rtd-pdf
Enable rtd pdf; make examples faster
2 parents 9ba5ce3 + c715ee9 commit d75c83c

File tree

7 files changed

+15
-26
lines changed

7 files changed

+15
-26
lines changed

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sphinx:
1212
configuration: docs/source/conf.py
1313

1414
# # Default is HTML
15-
# formats: []
15+
formats: all
1616

1717
# Optionally declare the Python requirements required to build your docs
1818
python:

docs/source/conf.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,6 @@
177177

178178
# --- Sphinx-Gallery options -----------------------------------------------------------------------
179179

180-
181-
class matplotlib_svg_scraper(object):
182-
def __repr__(self):
183-
return self.__class__.__name__
184-
185-
def __call__(self, *args, **kwargs):
186-
return matplotlib_scraper(*args, format="svg", **kwargs)
187-
188-
189180
sphinx_gallery_conf = {
190181
# convert rst to md for ipynb
191182
"pypandoc": False,
@@ -203,7 +194,7 @@ def __call__(self, *args, **kwargs):
203194
"backreferences_dir": None,
204195
# Modules for which function level galleries are created. In
205196
"doc_module": "sectionproperties",
206-
"image_scrapers": (matplotlib_svg_scraper(),),
197+
"image_scrapers": ("matplotlib",),
207198
"first_notebook_cell": ("%matplotlib inline\n"),
208199
}
209200

docs/source/rst/theory.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ are as follows:
9898
N_4 &= 4 \eta \xi \\
9999
N_5 &= 4 \xi \zeta \\
100100
N_6 &= 4 \eta \zeta
101-
:label: eq-shape-functions
102101
103102
104103
The above shape functions can be combined into the shape function row vector:
@@ -132,14 +131,13 @@ and the partial derivative matrix (:math:`\textbf{P}`):
132131
1 & 0 \\
133132
0 & 1 \\
134133
\end{bmatrix}
135-
:label: eq-JP
136134
137135
The determinant of the *Jacobian matrix* scaled by one half is equal to the Jacobian:
138136

139137
.. math::
140138
J = \frac{1}{2} \textrm{det} \, \textbf{J}
141139
142-
Equation :eq:`eq-JP` can be re-arranged to evaluate the partial derivate matrix
140+
The equation for \textbf{J P} can be re-arranged to evaluate the partial derivate matrix
143141
(:math:`\textbf{P}`):
144142

145143
.. math::
@@ -166,7 +164,7 @@ expressions:
166164
\end{bmatrix}
167165
168166
where the derivatives of the shape functions with respect to the isoparametric parameters can
169-
easily be evaluated from Equation :eq:`eq-shape-functions`, resulting in the following expression
167+
easily be evaluated from the equation for the shape functions, resulting in the following expression
170168
for the :math:`\textbf{B}` matrix:
171169

172170
.. math::

examples/00-basic/08_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
# %%
3030
# Create a list of mesh sizes to analyse
31-
mesh_sizes = [1.5, 2, 2.5, 3, 4, 5, 10, 15, 20, 25, 30, 40, 50, 75, 100]
31+
mesh_sizes = [3, 4, 5, 10, 15, 20, 25, 30, 40, 50, 75, 100, 200]
3232
j_calc = [] # list to store torsion constants
3333
t_calc = [] # list to store computation times
3434

examples/01-advanced/02_mesh_refinement.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
# %%
2323
# Define mesh sizes
24-
mesh_size_list = [50, 20, 10, 5, 3, 2, 1]
25-
nr_list = [4, 8, 12, 16, 20, 24, 32, 64]
24+
mesh_size_list = [200, 100, 50, 20, 10, 5]
25+
nr_list = [4, 8, 12, 16, 20, 24, 32]
2626

2727
# %%
2828
# Initialise result lists
@@ -33,17 +33,17 @@
3333

3434
# %%
3535
# Calculate reference solution
36-
geometry = steel_sections.i_section(d=203, b=133, t_f=7.8, t_w=5.8, r=8.9, n_r=64)
37-
geometry.create_mesh(mesh_sizes=[0.5]) # create mesh
36+
geometry = steel_sections.i_section(d=203, b=133, t_f=7.8, t_w=5.8, r=8.9, n_r=32)
37+
geometry.create_mesh(mesh_sizes=[5]) # create mesh
3838
section = Section(geometry) # create a Section object
3939
section.calculate_geometric_properties()
4040
section.calculate_warping_properties()
4141
j_reference = section.get_j() # get the torsion constant
4242

4343
# %%
44-
# Run through mesh_sizes with n_r = 16
44+
# Run through mesh_sizes with n_r = 8
4545
for mesh_size in mesh_size_list:
46-
geometry = steel_sections.i_section(d=203, b=133, t_f=7.8, t_w=5.8, r=8.9, n_r=16)
46+
geometry = steel_sections.i_section(d=203, b=133, t_f=7.8, t_w=5.8, r=8.9, n_r=8)
4747
geometry.create_mesh(mesh_sizes=[mesh_size]) # create mesh
4848
section = Section(geometry) # create a Section object
4949
section.calculate_geometric_properties()
@@ -53,10 +53,10 @@
5353
mesh_results.append(section.get_j())
5454

5555
# %%
56-
# Run through n_r with mesh_size = 3
56+
# Run through n_r with mesh_size = 10
5757
for n_r in nr_list:
5858
geometry = steel_sections.i_section(d=203, b=133, t_f=7.8, t_w=5.8, r=8.9, n_r=n_r)
59-
geometry.create_mesh(mesh_sizes=[3]) # create mesh
59+
geometry.create_mesh(mesh_sizes=[10]) # create mesh
6060
section = Section(geometry) # create a Section object
6161
section.calculate_geometric_properties()
6262
section.calculate_warping_properties()

examples/01-advanced/03_torsion_constant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
# %%
2828
# Number of elements for each analysis
29-
n = 500
29+
n = 100
3030

3131
# %%
3232
# Loop through all the widths

sectionproperties/analysis/section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ def calculate_frame():
793793
)
794794

795795
def calculate_plastic_properties(self, verbose=False, debug=False):
796-
"""Calculates the plastic properties of the cross-section and stores the, in the
796+
"""Calculates the plastic properties of the cross-section and stores them in the
797797
:class:`~sectionproperties.analysis.section.SectionProperties` object contained in
798798
the ``section_props`` class variable.
799799

0 commit comments

Comments
 (0)