From 4f7a4d170bf1395388e84e6dd8e3f16396dce5ef Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 10 Apr 2024 08:15:44 +0200 Subject: [PATCH 1/5] Added sphinx-gallery dependency to docs --- .gitignore | 3 +++ docs/source/conf.py | 10 +++++++++- docs_requirements.txt | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b65496d78..9686181f1 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,9 @@ usr doc/_static doc/_build doc/api-python +docs/source/modules/STUBDIR +docs/source/auto_examples +docs/source/sg_execution_times.rst psydac/core/bsp-f2py* psydac/core/bspmodule.c diff --git a/docs/source/conf.py b/docs/source/conf.py index ca5f7955d..e717c34b3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -35,7 +35,7 @@ def fixed_init(self, app): pkg_meta = tomli.load(pyproject)['project'] project = str(pkg_meta['name']) -copyright = '2018-2023, Psydac Developers' +copyright = '2018-2024, Psydac Developers' author = str(pkg_meta['authors'][0]['name']) release = str(pkg_meta['version']) @@ -52,6 +52,7 @@ def fixed_init(self, app): 'sphinx.ext.githubpages', 'sphinx_math_dollar', 'sphinx.ext.mathjax', +'sphinx_gallery.gen_gallery' ] from docutils.nodes import FixedTextElement, literal,math @@ -92,3 +93,10 @@ def fixed_init(self, app): inheritance_node_attrs = dict(shape='ellipse', fontsize="12", height=0.65, color='maroon4', style='filled') + +# -- Options for sphinx_gallery ---------------------------------------------- +# 'ignore_pattern': r'maxwell_|poisson_|sample_|test_|visualize_' +sphinx_gallery_conf = { + 'examples_dirs': '../../examples/notebooks', # path to your example scripts + 'gallery_dirs': 'auto_examples' # path to where to save gallery generated output +} \ No newline at end of file diff --git a/docs_requirements.txt b/docs_requirements.txt index 2cfa37e55..187053a2a 100644 --- a/docs_requirements.txt +++ b/docs_requirements.txt @@ -3,3 +3,4 @@ pydata_sphinx_theme numpydoc tomli sphinx-math-dollar +sphinx-gallery \ No newline at end of file From cd83efb40921f7920fe6fe2bdc2a387230135dce Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 10 Apr 2024 08:25:05 +0200 Subject: [PATCH 2/5] Demo notebooks for sphinx-gallery --- examples/notebooks/README.rst | 6 + examples/notebooks/plot_poisson_1d.py | 308 ++++++++++++++++++ .../notebooks/plot_poisson_non_periodic.py | 205 ++++++++++++ 3 files changed, 519 insertions(+) create mode 100644 examples/notebooks/README.rst create mode 100644 examples/notebooks/plot_poisson_1d.py create mode 100644 examples/notebooks/plot_poisson_non_periodic.py diff --git a/examples/notebooks/README.rst b/examples/notebooks/README.rst new file mode 100644 index 000000000..297253c28 --- /dev/null +++ b/examples/notebooks/README.rst @@ -0,0 +1,6 @@ +Examples +======== + ++------------------------------------------------------------------------------------------------------------------------+ +| Here you will find examples of how to use PSYDAC and explanations thereof as well as links to notebooks in the future. | ++------------------------------------------------------------------------------------------------------------------------+ \ No newline at end of file diff --git a/examples/notebooks/plot_poisson_1d.py b/examples/notebooks/plot_poisson_1d.py new file mode 100644 index 000000000..54cf9bcad --- /dev/null +++ b/examples/notebooks/plot_poisson_1d.py @@ -0,0 +1,308 @@ +""" +Solving Poisson 1D +============================================================== + +In this notebook, we will show how to solve Poisson 1D equation. +""" + +# %% +import numpy as np + +from psydac.utilities.quadratures import gauss_legendre +from psydac.linalg.stencil import StencilVector, StencilMatrix +from psydac.linalg.solvers import inverse +from psydac.ddm.cart import DomainDecomposition + +# %% +# Step 1 +# ------ +class Poisson1D: + """ + Exact solution to the 1D Poisson equation, to be employed for the method + of manufactured solutions. + + :code + $\frac{d^2}{dx^2}\phi(x) = -\rho(x)$ + + """ + def __init__( self ): + from sympy import symbols, sin, pi, lambdify + x = symbols('x') + phi_e = sin( 2*pi*x ) + rho_e = -phi_e.diff(x,2) + self._phi = lambdify( x, phi_e ) + self._rho = lambdify( x, rho_e ) + + def phi( self, x ): + return self._phi( x ) + + def rho( self, x ): + return self._rho( x ) + + @property + def domain( self ): + return (0, 1) + + @property + def periodic( self ): + return False + +def kernel( p1, k1, bs1, w1, mat_m, mat_s ): + """ + Kernel for computing the mass/stiffness element matrices. + + Parameters + ---------- + p1 : int + Spline degree. + + k1 : int + Number of quadrature points in each element. + + bs1 : 3D array_like (p1+1, 1+nderiv, k1) + Values (and derivatives) of non-zero basis functions at each + quadrature point. + + w1 : 1D array_like (k1,) + Quadrature weights at each quadrature point. + + mat_m : 2D array_like (p1+1, 2*p1+1) + Element mass matrix (in/out argument). + + mat_s : 2D array_like (p1+1, 2*p1+1) + Element stiffness matrix (in/out argument). + + """ + # Reset element matrices + mat_m[:,:] = 0. + mat_s[:,:] = 0. + + # Cycle over non-zero test functions in element + for il_1 in range(p1+1): + + # Cycle over non-zero trial functions in element + for jl_1 in range(p1+1): + + # Reset integrals over element + v_m = 0.0 + v_s = 0.0 + + # Cycle over quadrature points + for g1 in range(k1): + + # Get test function's value and derivative + bi_0 = bs1[il_1, 0, g1] + bi_x = bs1[il_1, 1, g1] + + # Get trial function's value and derivative + bj_0 = bs1[jl_1, 0, g1] + bj_x = bs1[jl_1, 1, g1] + + # Get quadrature weight + wvol = w1[g1] + + # Add contribution to integrals + v_m += bi_0 * bj_0 * wvol + v_s += bi_x * bj_x * wvol + + # Update element matrices + mat_m[il_1, p1+jl_1-il_1] = v_m + mat_s[il_1, p1+jl_1-il_1] = v_s + +def assemble_matrices( V, kernel ): + """ + Assemble mass and stiffness matrices using 1D stencil format. + + Parameters + ---------- + V : SplineSpace + Finite element space where the Galerkin method is applied. + + kernel : callable + Function that performs the assembly process on small element matrices. + + Returns + ------- + mass : StencilMatrix + Mass matrix in 1D stencil format. + + stiffness : StencilMatrix + Stiffness matrix in 1D stencil format. + + """ + # Sizes + [s1] = V.vector_space.starts + [e1] = V.vector_space.ends + [p1] = V.vector_space.pads + + # Quadrature data + quad_grid = V.quad_grids()[0] + nk1 = quad_grid.num_elements + nq1 = quad_grid.num_quad_pts + spans_1 = quad_grid.spans + basis_1 = quad_grid.basis + weights_1 = quad_grid.weights + + # Create global matrices + mass = StencilMatrix( V.vector_space, V.vector_space ) + stiffness = StencilMatrix( V.vector_space, V.vector_space ) + + # Create element matrices + mat_m = np.zeros( (p1+1, 2*p1+1) ) # mass + mat_s = np.zeros( (p1+1, 2*p1+1) ) # stiffness + + # Build global matrices: cycle over elements + for k1 in range( nk1 ): + + # Get spline index, B-splines' values and quadrature weights + is1 = spans_1[k1] + bs1 = basis_1[k1,:,:,:] + w1 = weights_1[k1,:] + + # Compute element matrices + kernel( p1, nq1, bs1, w1, mat_m, mat_s ) + + # Update global matrices + mass [is1-p1:is1+1,:] += mat_m[:,:] + stiffness[is1-p1:is1+1,:] += mat_s[:,:] + + return mass, stiffness + +def assemble_rhs( V, f ): + """ + Assemble right-hand-side vector. + + Parameters + ---------- + V : SplineSpace + Finite element space where the Galerkin method is applied. + + f : callable + Right-hand side function (charge density). + + Returns + ------- + rhs : StencilVector + Vector b of coefficients, in linear system Ax=b. + + """ + # Sizes + [s1] = V.vector_space.starts + [e1] = V.vector_space.ends + [p1] = V.vector_space.pads + + # Quadrature data + quad_grid = V.quad_grids()[0] + nk1 = quad_grid.num_elements + nq1 = quad_grid.num_quad_pts + spans_1 = quad_grid.spans + basis_1 = quad_grid.basis + points_1 = quad_grid.points + weights_1 = quad_grid.weights + + # Data structure + rhs = StencilVector( V.vector_space ) + + # Build RHS + for k1 in range( nk1 ): + + is1 = spans_1[k1] + bs1 = basis_1[k1,:,:,:] + x1 = points_1[k1, :] + wvol = weights_1[k1, :] + f_quad = f( x1 ) + + for il1 in range( p1+1 ): + + bi_0 = bs1[il1, 0, :] + v = bi_0 * f_quad * wvol + + rhs[is1-p1+il1] += v.sum() + + return rhs + +# %% +# Step 2 +# ------ +import matplotlib.pyplot as plt +from time import time + +from psydac.fem.splines import SplineSpace +from psydac.fem.tensor import TensorFemSpace +from psydac.fem.basic import FemField + +timing = {} + +# Input data: degree, number of elements +p = 3 +ne = 2**4 + +# Method of manufactured solution +model = Poisson1D() + +# Create uniform grid +grid = np.linspace( *model.domain, num=ne+1 ) + +# Create finite element space +space = SplineSpace(p, grid=grid, periodic=model.periodic) +dd = DomainDecomposition(ncells=[space.ncells], periods=[model.periodic]) +V = TensorFemSpace(dd, space) + +# Build mass and stiffness matrices +t0 = time() +mass, stiffness = assemble_matrices( V, kernel ) +t1 = time() +timing['assembly'] = t1-t0 + +# Build right-hand side vector +rhs = assemble_rhs( V, model.rho ) + +# Apply homogeneous dirichlet boundary conditions +s1, = V.vector_space.starts +e1, = V.vector_space.ends + +stiffness[s1,:] = 0. +stiffness[e1,:] = 0. +rhs[s1] = 0. +rhs[e1] = 0. + +# Solve linear system +t0 = time() +stiffness_inv = inverse(stiffness, 'cg', tol=1e-9, maxiter=1000, verbose=False) +x = stiffness_inv @ rhs +info = stiffness_inv.get_info() +t1 = time() +timing['solution'] = t1-t0 + +# Create potential field +phi = FemField( V, coeffs=x ) +phi.coeffs.update_ghost_regions() + +# Compute L2 norm of error +t0 = time() +e2 = np.sqrt( V.integral( lambda x: (phi(x)-model.phi(x))**2 ) ) +t1 = time() +timing['diagnostics'] = t1-t0 + +# Print some information to terminal +print( '> Grid :: {ne}'.format(ne=ne) ) +print( '> Degree :: {p}'.format(p=p) ) +print( '> CG info :: ',info ) +print( '> L2 error :: {:.2e}'.format( e2 ) ) +print( '' ) +print( '> Assembly time :: {:.2e}'.format( timing['assembly'] ) ) +print( '> Solution time :: {:.2e}'.format( timing['solution'] ) ) +print( '> Evaluat. time :: {:.2e}'.format( timing['diagnostics'] ) ) + +# Plot solution on refined grid +y = np.linspace( grid[0], grid[-1], 101 ) +phi_y = np.array( [phi(yj) for yj in y] ) +fig,ax = plt.subplots( 1, 1 ) +ax.plot( y, phi_y ) +ax.set_xlabel( 'x' ) +ax.set_ylabel( 'y' ) +ax.grid() + +# Show figure and keep it open if necessary +fig.tight_layout() +fig.show() diff --git a/examples/notebooks/plot_poisson_non_periodic.py b/examples/notebooks/plot_poisson_non_periodic.py new file mode 100644 index 000000000..7eef9e040 --- /dev/null +++ b/examples/notebooks/plot_poisson_non_periodic.py @@ -0,0 +1,205 @@ +""" +Solving Poisson's equation on non-periodic topological domains +============================================================== + +In this notebook, we will show how to solve poisson's equation on single patch and multipatch domains. As we are running this in a notebook, everything will be run in serial and hence we are limiting ourselves to a fairly coarse discretization to avoid taking too much time. However, Psydac allows for hybrid MPI + OpenMP parallelization with barely any changed to the code. The lines that are impacted by that will be preceeded by their MPI equivalent +""" + +# %% +# Step 1 : Building the domain +# ---------------------------- +# +# Psydac uses the powerful topological tools of SymPDE to build a large variety of domains. Here we show how to do a quarter annulus using a Square and a polar mapping and how to join two annulus to create a multipatch domain. Left commented is an example of a complex multipatch domain built using SymPDE. + +import numpy as np + +from sympde.topology import Square, PolarMapping +from sympde.utilities.utils import plot_domain +from sympde import Domain + +from psydac.api.tests.build_domain import build_pretzel + +# Define the topological geometry for each patch +rmin, rmax = 0.3, 1. + +# First quarter annulus +domain_log_1 = Square('A_1', bounds1=(0., 1.), bounds2=(0., np.pi/2)) +F_1 = PolarMapping('F_1', dim=2, c1=0., c2=0., rmin=rmin, rmax=rmax) +Omega_1 = F_1(domain_log_1) + +# Second quarter annulus +domain_log_2 = Square('A_2', bounds1=(0., 1.), bounds2=(np.pi, 3/2 * np.pi)) +F_2 = PolarMapping('F_1', dim=2, c1=rmin+rmax, c2=0., rmin=rmin, rmax=rmax) +Omega_2 = F_2(domain_log_2) + +# Join the patches + +connectivity = [((0,1,1),(1,1,-1))] +patches = [Omega_1,Omega_2] +Omega = Domain.join(patches, connectivity, 'domain') + +# Simple visualization of the topological domain +plot_domain(Omega, draw=False, isolines=True) + +# %% +# Step 2: Defining the Abstract PDE model using SymPDE +# ---------------------------------------------------- + +from sympde.calculus import grad, dot +from sympde.calculus import minus, plus + +from sympde.expr.expr import LinearForm, BilinearForm +from sympde.expr.expr import integral +from sympde.expr.expr import Norm +from sympde.expr import find, EssentialBC + +from sympde.topology import ScalarFunctionSpace +from sympde.topology import elements_of +from sympde.topology import NormalVector + +# Define the abstract model to solve Poisson's equation using the manufactured solution method +x,y = Omega.coordinates +solution = x**2 + y**2 +f = -4 + +V = ScalarFunctionSpace('V', Omega, kind=None) + +u, v = elements_of(V, names='u, v') +nn = NormalVector('nn') + +bc = EssentialBC(u, solution, Omega.boundary) + +error = u - solution + +I = Omega.interfaces + +kappa = 10**3 + +expr_I =- 0.5*dot(grad(plus(u)),nn)*minus(v) + 0.5*dot(grad(minus(v)),nn)*plus(u) - kappa*plus(u)*minus(v)\ + + 0.5*dot(grad(minus(u)),nn)*plus(v) - 0.5*dot(grad(plus(v)),nn)*minus(u) - kappa*plus(v)*minus(u)\ + - 0.5*dot(grad(minus(v)),nn)*minus(u) - 0.5*dot(grad(minus(u)),nn)*minus(v) + kappa*minus(u)*minus(v)\ + + 0.5*dot(grad(plus(v)),nn)*plus(u) + 0.5*dot(grad(plus(u)),nn)*plus(v) + kappa*plus(u)*plus(v) + +expr = dot(grad(u),grad(v)) + +a = BilinearForm((u,v), integral(Omega, expr) + integral(I, expr_I)) +l = LinearForm(v, integral(Omega, f*v)) + +equation = find(u, forall=v, lhs=a(u,v), rhs=l(v), bc=bc) + +l2norm = Norm(error, Omega, kind='l2') +h1norm = Norm(error, Omega, kind='h1') + +# %% +# Step 3: Discretizing the domain, spaces and equations +# ----------------------------------------------------- + +# Discretize the geometry and equation +from psydac.api.discretization import discretize +from psydac.api.settings import PSYDAC_BACKENDS + +backend = PSYDAC_BACKENDS['python'] + +ncells = [10, 10] +degree = [2, 2] +periodic = [False, False] + +Omega_h = discretize(Omega, ncells=ncells, periodic=periodic) + +Vh = discretize(V, Omega_h, degree=degree) +equation_h = discretize(equation, Omega_h, [Vh, Vh], backend=backend) +l2norm_h = discretize(l2norm, Omega_h, Vh, backend=backend) +h1norm_h = discretize(h1norm, Omega_h, Vh, backend=backend) + +# %% +# Step 4: Solving the equation and computing the error norms +# ---------------------------------------------------------- + +# Set the solver parameters +# 'cg' -> Conjugate gradient method +equation_h.set_solver('cg', info=True, tol=1e-14) + +import time + +t0_s = time.time() +uh, info = equation_h.solve() +t1_s = time.time() + + +t0_d = time.time() +l2_error = l2norm_h.assemble(u=uh) +h1_error = h1norm_h.assemble(u=uh) +t1_d = time.time() + +print( '> CG info :: ',info ) +print( '> L2 error :: {:.2e}'.format(l2_error)) +print( '> H1 error :: {:.2e}'.format(h1_error)) +print( '> Solution time :: {:.2e}s'.format(t1_s - t0_s)) +print( '> Evaluat. time :: {:.2e}s '.format(t1_d - t0_d)) + +# %% +# Step 5: Saving the results +# -------------------------- + +# Save the results using OutputManager +from psydac.api.postprocessing import OutputManager +import os + +os.makedirs('results_poisson', exist_ok=True) + +Om = OutputManager( + f'results_poisson/space_info_{Omega.name}', + f'results_poisson/field_info_{Omega.name}', +# MPI version +# comm=comm, +) + +Om.add_spaces(V=Vh) +Om.export_space_info() + +Om.set_static() +Om.export_fields(u=uh) + +Om.close() + +# %% +# Step 6: Exporting the results to VTK and visualizing them with Paraview +# ----------------------------------------------------------------------- + +# Export the results to VTK using PostProcessManager +from psydac.api.postprocessing import PostProcessManager +from sympy import lambdify + +Pm = PostProcessManager( + domain=Omega, + space_file=f'results_poisson/space_info_{Omega.name}.yaml', + fields_file=f'results_poisson/field_info_{Omega.name}.h5', +# MPI version +# comm=comm, +) + +Pm.export_to_vtk( + f'results_poisson/visu_{Omega.name}', + grid=None, + npts_per_cell=3, + fields='u', + additional_physical_functions={'exact_solution': lambdify(Omega.coordinates, solution, modules='numpy')} +) + +Pm.close() + +# %% +# Example: Results on the pretzel domain +# -------------------------------------- + +# .. image:: paraview_images/poisson_pretzel_u.png +# :width: 32 % +# :alt: poisson_pretzel_u +# +# .. image:: paraview_images/poisson_pretzel_exact.png +# :width: 32 % +# :alt: poisson_pretzel_exact + +# .. image:: paraview_images/poisson_pretzel_error.png +# :width: 32 % +# :alt: poisson_pretzel_error \ No newline at end of file From a0d59b303e3e3cb853208d611e5bd21222d28247 Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 10 Apr 2024 09:24:40 +0200 Subject: [PATCH 3/5] Added matplotlib to docs_requirements.txt --- docs_requirements.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs_requirements.txt b/docs_requirements.txt index 187053a2a..b300e48d0 100644 --- a/docs_requirements.txt +++ b/docs_requirements.txt @@ -1,6 +1,7 @@ -sphinx -pydata_sphinx_theme +matplotlib numpydoc -tomli +pydata_sphinx_theme +sphinx +sphinx-gallery sphinx-math-dollar -sphinx-gallery \ No newline at end of file +tomli From df72faf7998ccc39f9843c5fd8024baf746c830b Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 10 Apr 2024 11:21:10 +0200 Subject: [PATCH 4/5] Install Psydac in build_docs CI sphinx-gallery needs to run Psydac sample scripts. --- .github/workflows/documentation.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 88e8065d5..d14eeedf2 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -19,23 +19,39 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.9 + - name: Install non-Python dependencies on Ubuntu run: | - sudo apt update - sudo apt install graphviz - - name: Install Python dependencies + sudo apt-get update + sudo apt-get install gfortran + sudo apt-get install openmpi-bin libopenmpi-dev + sudo apt-get install libhdf5-openmpi-dev + sudo apt-get install graphviz + + - name: Install Python dependencies on Ubuntu run: | + export CC="mpicc" HDF5_MPI="ON" + export HDF5_DIR="/usr/lib/x86_64-linux-gnu/hdf5/openmpi" + python -m pip install -r requirements.txt + python -m pip install -r requirements_extra.txt --no-build-isolation python -m pip install -r docs_requirements.txt + + - name: Install Psydac + run: | + python -m pip install . + python -m pip freeze + - name: Make the sphinx doc run: | rm -rf docs/source/modules/STUBDIR - make -C docs clean - make -C docs html + make -C docs clean html python docs/update_links.py + - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact From 46f9e8b488fb8ff0c1b8a9949209d8be64372149 Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 17 Apr 2024 10:35:32 +0200 Subject: [PATCH 5/5] Fixed isinstance() error raised by sphinx-gallery The call-order of sphinx extensions seems to have some side-effect that conflicts with `sphinx-gallery`. I'm not able to pinpoint which extension/s cause this; as a workaround, I moved sphinx_gallery to the top of extension list. This reordering of sphinx extensions seem to magically fix the cryptic `isinstance()` issue. --- docs/source/conf.py | 20 ++++++++++---------- docs/source/examples.rst | 8 +++----- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index e717c34b3..ca662a902 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -43,6 +43,7 @@ def fixed_init(self, app): # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ +'sphinx_gallery.gen_gallery', 'sphinx.ext.inheritance_diagram', 'numpydoc', 'sphinx.ext.viewcode', @@ -51,10 +52,16 @@ def fixed_init(self, app): 'sphinx.ext.autosummary', 'sphinx.ext.githubpages', 'sphinx_math_dollar', -'sphinx.ext.mathjax', -'sphinx_gallery.gen_gallery' +'sphinx.ext.mathjax' ] +# -- Options for sphinx_gallery ---------------------------------------------- +# 'ignore_pattern': r'maxwell_|poisson_|sample_|test_|visualize_' +sphinx_gallery_conf = { + 'examples_dirs': '../../examples/notebooks', # path to your example scripts + 'gallery_dirs': 'auto_examples' # path to where to save gallery generated output +} + from docutils.nodes import FixedTextElement, literal,math from docutils.nodes import comment, doctest_block, image, literal_block, math_block, paragraph, pending, raw, rubric, substitution_definition, target math_dollar_node_blacklist = (literal,math,doctest_block, image, literal_block, math_block, pending, raw,rubric, substitution_definition,target) @@ -92,11 +99,4 @@ def fixed_init(self, app): fontsize="12") inheritance_node_attrs = dict(shape='ellipse', fontsize="12", height=0.65, - color='maroon4', style='filled') - -# -- Options for sphinx_gallery ---------------------------------------------- -# 'ignore_pattern': r'maxwell_|poisson_|sample_|test_|visualize_' -sphinx_gallery_conf = { - 'examples_dirs': '../../examples/notebooks', # path to your example scripts - 'gallery_dirs': 'auto_examples' # path to where to save gallery generated output -} \ No newline at end of file + color='maroon4', style='filled') \ No newline at end of file diff --git a/docs/source/examples.rst b/docs/source/examples.rst index d05be7e0f..864040831 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -1,6 +1,4 @@ -Examples -======== +.. toctree:: + :maxdepth: 1 -+------------------------------------------------------------------------------------------------------------------------+ -| Here you will find examples of how to use PSYDAC and explanations thereof as well as links to notebooks in the future. | -+------------------------------------------------------------------------------------------------------------------------+ + auto_examples/index.rst