Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • inducer/grudge
  • jdsteve2/grudge
  • eshoag2/grudge
  • mattwala/grudge
  • kaushikcfd/grudge
  • fikl2/grudge
6 results
Show changes
Commits on Source (613)
Showing with 246 additions and 416 deletions
version: 2
updates:
# Set update schedule for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# vim: sw=4
......@@ -7,14 +7,15 @@ on:
jobs:
autopush:
name: Automatic push to gitlab.tiker.net
if: startsWith(github.repository, 'inducer/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: |
mkdir ~/.ssh && echo -e "Host gitlab.tiker.net\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
eval $(ssh-agent) && echo "$GITLAB_AUTOPUSH_KEY" | ssh-add -
git fetch --unshallow
git push "git@gitlab.tiker.net:inducer/$(basename $GITHUB_REPOSITORY).git" main
curl -L -O https://tiker.net/ci-support-v0
. ./ci-support-v0
mirror_github_to_gitlab
env:
GITLAB_AUTOPUSH_KEY: ${{ secrets.GITLAB_AUTOPUSH_KEY }}
......
......@@ -7,61 +7,104 @@ on:
schedule:
- cron: '17 3 * * 0'
concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
flake8:
name: Flake8
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: actions/setup-python@v1
with:
# matches compat target in setup.py
python-version: '3.6'
- uses: actions/checkout@v4
- name: "Main Script"
run: |
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-flake8.sh
. ./prepare-and-run-flake8.sh "$(basename $GITHUB_REPOSITORY)" examples test
pipx install ruff
ruff check
mypy:
name: Mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Main Script"
run: |
curl -L -O https://tiker.net/ci-support-v0
. ./ci-support-v0
build_py_project_in_conda_env
python -m pip install mypy
./run-mypy.sh
typos:
name: Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master
pylint:
name: Pylint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Main Script"
run: |
echo "- matplotlib" >> .test-conda-env-py3.yml
echo "- scipy" >> .test-conda-env-py3.yml
echo "-------------------------------------------"
cat $CONDA_ENVIRONMENT
echo "-------------------------------------------"
USE_CONDA_BUILD=1
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-pylint.sh
. ./prepare-and-run-pylint.sh "$(basename $GITHUB_REPOSITORY)" test/*.py \
$(find examples -name '*.py')
pytest3:
name: Pytest on Py3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: "Main Script"
run: |
sudo apt-get update
sudo apt-get install openmpi-bin libopenmpi-dev
CONDA_ENVIRONMENT=.test-conda-env-py3.yml
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh
. ./build-and-test-py-project-within-miniconda.sh
pyexamples3:
name: Examples on Py3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: "Main Script"
run: |
sudo apt-get update
sudo apt-get install openmpi-bin libopenmpi-dev
CONDA_ENVIRONMENT=.test-conda-env-py3.yml
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
. ci-support.sh
curl -L -O https://tiker.net/ci-support-v0
. ci-support-v0
build_py_project_in_conda_env
run_examples
python wave/wave-op-mpi.py --lazy
python wave/wave-op-mpi.py --lazy --quad --nonaffine
python euler/acoustic_pulse.py --lazy
python euler/vortex.py --oi --lazy
# --oversubscribe is an option for Open MPI (which is what the CI uses)
# It allows the CI to succeed even if the CI runner does not
# have a sufficient number of cores.
mpiexec -np 2 --oversubscribe python wave/wave-op-mpi.py --lazy
mpiexec -np 2 --oversubscribe python wave/wave-op-mpi.py --numpy
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: "Main Script"
run: |
sudo apt-get update
sudo apt-get install openmpi-bin libopenmpi-dev
CONDA_ENVIRONMENT=.test-conda-env-py3.yml
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
echo "- matplotlib" >> .test-conda-env-py3.yml
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
. ci-support.sh
build_py_project_in_conda_env
build_docs
......@@ -73,36 +116,18 @@ jobs:
name: Tests for downstream project ${{ matrix.downstream_project }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: "Main Script"
env:
DOWNSTREAM_PROJECT: ${{ matrix.downstream_project }}
run: |
if test "$DOWNSTREAM_PROJECT" = "mirgecom"; then
git clone "https://github.com/illinois-ceesd/$DOWNSTREAM_PROJECT.git"
else
git clone "https://github.com/inducer/$DOWNSTREAM_PROJECT.git"
fi
cd "$DOWNSTREAM_PROJECT"
echo "*** $DOWNSTREAM_PROJECT version: $(git rev-parse --short HEAD)"
sed -i "/egg=grudge/ c git+file://$(readlink -f ..)#egg=grudge" requirements.txt
# Avoid slow or complicated tests in downstream projects
export PYTEST_ADDOPTS="-k 'not (slowtest or octave or mpi)'"
if test "$DOWNSTREAM_PROJECT" = "mirgecom"; then
# can't turn off MPI in mirgecom
sudo apt-get update
sudo apt-get install openmpi-bin libopenmpi-dev
export CONDA_ENVIRONMENT=conda-env.yml
else
sed -i "/mpi4py/ d" requirements.txt
export CONDA_ENVIRONMENT=.test-conda-env-py3.yml
fi
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/ci-support.sh
. ./ci-support.sh
build_py_project_in_conda_env
curl -L -O -k https://tiker.net/ci-support-v0
. ./ci-support-v0
# https://github.com/inducer/grudge/issues/211
export CISUPPORT_PARALLEL_PYTEST=no
test_py_project
test_downstream "$DOWNSTREAM_PROJECT"
# vim: sw=4
......@@ -35,3 +35,7 @@ run-debug-*
.pytest_cache
*.json
# pylint stuff
.pylintrc.yml
.run-pylint.py
Python 3 POCL:
script:
- export PY_EXE=python3
- export PYOPENCL_TEST=portable:pthread
- export PYOPENCL_TEST=portable:cpu
- export EXTRA_INSTALL="pybind11 numpy mako"
- curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
- curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
- ". ./build-and-test-py-project.sh"
tags:
- python3
......@@ -21,7 +21,7 @@ Python 3 Intel:
- export EXTRA_INSTALL="pybind11 numpy mako"
- source /opt/enable-intel-cl.sh
- export PYOPENCL_TEST="intel(r):pu"
- curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
- curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
- ". ./build-and-test-py-project.sh"
tags:
- python3
......@@ -36,9 +36,9 @@ Python 3 Intel:
Python 3 POCL Examples:
script:
- export PY_EXE=python3
- export PYOPENCL_TEST=portable:pthread
- export PYOPENCL_TEST=portable:cpu
- export EXTRA_INSTALL="pybind11 numpy mako mpi4py pyvisfile pymetis"
- curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-py-project-and-run-examples.sh
- curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-py-project-and-run-examples.sh
- ". ./build-py-project-and-run-examples.sh"
tags:
- python3
......@@ -53,7 +53,7 @@ Python 3 Intel Examples:
- source /opt/enable-intel-cl.sh
- export PYOPENCL_TEST="intel(r):pu"
- export EXTRA_INSTALL="pybind11 numpy mako mpi4py pyvisfile pymetis"
- curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-py-project-and-run-examples.sh
- curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-py-project-and-run-examples.sh
- ". ./build-py-project-and-run-examples.sh"
tags:
- python3
......@@ -67,8 +67,9 @@ Python 3 Conda:
- linux
- large-node
script: |
export PYOPENCL_TEST=portable:cpu
CONDA_ENVIRONMENT=.test-conda-env-py3.yml
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project-within-miniconda.sh
# Shut up ibverbs about fork(), e.g. https://gitlab.tiker.net/inducer/grudge/-/jobs/220796
export RDMAV_FORK_SAFE=1
......@@ -81,7 +82,7 @@ Python 3 Conda Examples:
- large-node
script: |
CONDA_ENVIRONMENT=.test-conda-env-py3.yml
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
. ci-support.sh
build_py_project_in_conda_env
......@@ -91,17 +92,41 @@ Python 3 Conda Examples:
run_examples
Documentation:
script:
- EXTRA_INSTALL="pybind11 numpy"
- curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/build-docs.sh
- ". ./build-docs.sh"
script: |
EXTRA_INSTALL="pybind11 numpy matplotlib"
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-docs.sh
. ./build-docs.sh
tags:
- python3
Flake8:
Ruff:
script:
- curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-flake8.sh
- . ./prepare-and-run-flake8.sh "$CI_PROJECT_NAME" examples test
- pipx install ruff
- ruff check
tags:
- docker-runner
except:
- tags
Mypy:
script: |
EXTRA_INSTALL="Cython mpi4py"
curl -L -O https://tiker.net/ci-support-v0
. ./ci-support-v0
build_py_project_in_venv
python -m pip install mypy
./run-mypy.sh
tags:
- python3
except:
- tags
Pylint:
script: |
EXTRA_INSTALL="pybind11 make numpy scipy matplotlib mpi4py"
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-pylint.sh
. ./prepare-and-run-pylint.sh "$CI_PROJECT_NAME" test/*.py \
$(find examples -name '*.py')
tags:
- python3
except:
......
- arg: py-version
val: '3.10'
- arg: ignore
val:
- mappers
- arg: ignored-modules
val:
- sympy
......@@ -6,8 +6,13 @@ dependencies:
- git
- numpy
- libhwloc=2
- pocl
# pocl 3.1 needed for SVM functionality
- pocl>=3.1
- islpy
- pyopencl
- python=3
- gmsh
# test scripts use ompi-specific arguments
- openmpi
- mpi4py
include doc/*.rst
include doc/Makefile
include doc/*.py
include doc/conf.py
include examples/*.py
include examples/*/*.py
include test/*.py
include pytest.ini
recursive-include contrib *.tm *.mac *.fig *.cpp *.ts
......@@ -22,8 +22,6 @@ It relies on
* `modepy <https://pypi.org/project/modepy>`_ for modes and nodes on simplices
* `meshmode <https://pypi.org/project/meshmode>`_ for modes and nodes on simplices
* `loopy <https://pypi.org/project/loopy>`_ for fast array operations
* `leap <https://pypi.org/project/leap>`_ for time integration
* `dagrt <https://pypi.org/project/dagrt>`_ as an execution runtime
* `pytest <https://pypi.org/project/pytest>`_ for automated testing
and, indirectly,
......
......@@ -44,19 +44,19 @@ psi_cand:E_0*sin(k_x*x)*sin(k_y*y);
wave_eqn(f, gam_s):=nabla_t_squared(f) + mu*epsilon*gam_s*f;
gam_s : gamma^2;
wave_eqn(f, gamma_s):=nabla_t_squared(f) + mu*epsilon*gamma_s*f;
gamma_s : gamma^2;
/* The _t indicates transverse components (i.e. x and y components only) */
/*
E_t(psi):=(-k_z/gam_s)*sin(k_z * z)* nabla_t(psi);
H_t(psi):=crossprod((%i * omega /gam_s)*cos(k_z * z)* [0,0,1], nabla_t(psi));
E_t(psi):=(-k_z/gamma_s)*sin(k_z * z)* nabla_t(psi);
H_t(psi):=crossprod((%i * omega /gamma_s)*cos(k_z * z)* [0,0,1], nabla_t(psi));
*/
E_t(psi):=(-k_z/gam_s)*sin(k_z * z)* nabla_t(psi);
H_t(psi):=crossprod((%i * omega * epsilon/gam_s)*cos(k_z * z)* [0,0,1], nabla_t(psi));
E_t(psi):=(-k_z/gamma_s)*sin(k_z * z)* nabla_t(psi);
H_t(psi):=crossprod((%i * omega * epsilon/gamma_s)*cos(k_z * z)* [0,0,1], nabla_t(psi));
/* These are used as the analytic solution for a rectangular cavity resonator
/* These are used as the analytic solution for a rectangular cavity resonator
with travsverse magnetic waves */
E : E_t(psi_cand) + [0,0,psi_cand * cos(k_z * z)];
......
......@@ -57,7 +57,7 @@ hypdiagonalize(A):=block([evA, V, invV,D],
/* ------------------------------------------------------------------------- */
/* compute upwind flux for a given operator with eigenvalues evs, sorted
* in ascending order.
* Sign assumptions for all variables occuring in evs must be in place.
* Sign assumptions for all variables occurring in evs must be in place.
*/
/* ------------------------------------------------------------------------- */
hyp_upwind_flux(evs, D):=block([evvars, Dp, Dm, n, midstates, states, unknowns],
......
......@@ -51,13 +51,13 @@ wave_known_dirbdrywp:vstack([-n.wave_vm/2 + um/2 + ubc],
assert(norm_2_squared(fullhypsimp(wave_known_dirbdrywp - wave_dirbdrywp))=0);
print("Hom-dirichlet in characteristic:");
print("Homogeneous-dirichlet in characteristic:");
print(fullhypsimp(wave_invV.vstack(
-columnvector(first(wave_wmins)),
rest(wave_wmins))
));
print("Hom-Neumann in characteristic:");
print("Homogeneous-Neumann in characteristic:");
print(fullhypsimp(wave_invV.vstack(
columnvector(first(wave_wmins)),
-rest(wave_wmins))
......
......@@ -231,7 +231,7 @@ void dumka3(double& t, const double& tend, const double& h0,const double& atol,
stepOK = false;
f.isStepAccepted = false;
//long _size=y.size();
/* code for paraller exceution via OpemMP - you may want to use it
/* code for paraller execution via OpenMP - you may want to use it
#pragma parallel shared(y,z0,z2,z3) local(j)
#pragma pfor
*/
......@@ -257,7 +257,7 @@ void dumka3(double& t, const double& tend, const double& h0,const double& atol,
//delete [] z;
};
/* norm1 - function isStepAccepted can use different norms, but we implemente "max=max|u_i|, i= 1..n" norm
/* norm1 - function isStepAccepted can use different norms, but we implemented "max=max|u_i|, i= 1..n" norm
* one can optimized this function by replacing qrt(z[i]*z[i]) to abs(z[i]), but you must define
* function abs for Element of the Vector
*/
......
......@@ -802,7 +802,7 @@
<with|math-font-series|bold|N+Z+1>, \<ldots\>, n>> as anisotropic
(directionally-biased) unknowns with explicit connections to the
<math|<with|math-font-series|bold|s><rsup|\<asterisk\>(i)>> given by the
auxilliary equations
auxiliary equations
<\equation>
<tabular|<tformat|<table|<row|<cell|(D\<b-s\>)<rsup|*\<ast\>(i)> =
......@@ -861,7 +861,7 @@
\;
You make the comment above that ``We simply regard
<math|(D\<b-s\>)<rsup|\<ast\>(k)>> as another unkown of the system, which,
<math|(D\<b-s\>)<rsup|\<ast\>(k)>> as another unknown of the system, which,
in addition to <math|{\<b-s\><rsup|*\<ast\>(i)>}<rsub|1><rsup|n-1>>, brings
us to <math|n> unknowns.''
......@@ -1100,7 +1100,7 @@
</equation*>
where the unknowns are <math|\<nu\><rsub|1>> and <math|\<nu\><rsub|3>>.
Note that we *need* this equation to be satisifed independent of the
Note that we *need* this equation to be satisfied independent of the
unknowns <math|\<mu\><rsub|1><rsup|+>> and <math|\<mu\><rsub|3><rsup|->>,
which are dependent on the incoming waves
<math|<with|math-font-series|bold|u><rsup|\<pm\>>>, over which we have no
......
# Makefile for Sphinx documentation
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?= -n
SPHINXBUILD ?= python $(shell which sphinx-build)
SOURCEDIR = .
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
# Put it first so that "make" without argument is like "make help".
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/grudge.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/grudge.qhc"
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/grudge"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/grudge"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: help Makefile
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
import sys # noqa
import os # noqa
import shlex # noqa
import os
from importlib import metadata
from urllib.request import urlopen
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = "1.0"
_conf_url = \
"https://raw.githubusercontent.com/inducer/sphinxconfig/main/sphinxconfig.py"
with urlopen(_conf_url) as _inf:
exec(compile(_inf.read(), _conf_url, "exec"), globals())
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named "sphinx.ext.*") or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx_copybutton",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = [".rst", ".md"]
source_suffix = ".rst"
# The encoding of source files.
#source_encoding = "utf-8-sig"
# The master toctree document.
master_doc = "index"
# General information about the project.
project = "grudge"
copyright = "2015, Andreas Kloeckner"
author = "Andreas Kloeckner"
# The version info for the project you"re documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
def get_version():
conf = {}
src = "../grudge/version.py"
exec(
compile(open(src).read(), src, "exec"),
conf)
return conf["VERSION_TEXT"]
version = get_version()
# The full version, including alpha/beta/rc tags.
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ""
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = "%B %d, %Y"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build"]
extensions = globals()["extensions"] + [
"matplotlib.sphinxext.plot_directive"]
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
copyright = "2015-2024, Grudge contributors"
author = "Grudge contributors"
release = metadata.version("grudge")
version = ".".join(release.split(".")[:2])
# If true, "()" will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
html_theme = "furo"
html_theme_options = {}
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"https://docs.python.org/3/": None,
"https://numpy.org/doc/stable/": None,
"https://documen.tician.de/pyopencl/": None,
"https://documen.tician.de/modepy/": None,
"https://documen.tician.de/pymbolic/": None,
"https://documen.tician.de/meshmode/": None,
"https://documen.tician.de/loopy/": None,
}
autoclass_content = "class"
autodoc_typehints = "description"
"arraycontext": ("https://documen.tician.de/arraycontext/", None),
"loopy": ("https://documen.tician.de/loopy/", None),
"meshmode": ("https://documen.tician.de/meshmode/", None),
"modepy": ("https://documen.tician.de/modepy/", None),
"mpi4py": ("https://mpi4py.readthedocs.io/en/stable", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pymbolic": ("https://documen.tician.de/pymbolic/", None),
"pyopencl": ("https://documen.tician.de/pyopencl/", None),
"python": ("https://docs.python.org/3/", None),
}
# index-page demo uses pyopencl via plot_directive
os.environ["PYOPENCL_TEST"] = "port:cpu"
nitpick_ignore_regex = [
["py:class", r"np\.ndarray"],
["py:data|py:class", r"arraycontext.*ContainerTc"],
]
Discretization
==============
Discretization Collection
=========================
.. module:: grudge
.. automodule:: grudge.discretization
Discretization with Eager Evaluation
====================================
.. automodule:: grudge.eager
Degree of freedom (DOF) descriptions
====================================
.. automodule:: grudge.dof_desc
Metric terms and transformations
================================
.. automodule:: grudge.geometry.metrics
Welcome to grudge's Documentation!
==================================
Here's an example to solve the PDE
.. math::
\begin{cases}
u_t + 2\pi u_x = 0, \\
u(0, t) = -\sin(2\pi t), \\
u(x, 0) = \sin(x),
\end{cases}
on the domain :math:`x \in [0, 2\pi]`. We closely follow Chapter 3 of
[Hesthaven_2008]_.
.. literalinclude:: ../examples/hello-grudge.py
:start-after: BEGINEXAMPLE
:end-before: ENDEXAMPLE
Plotting numerical solution ``uh`` in results in
.. plot:: ../examples/hello-grudge.py
Contents:
.. toctree::
:maxdepth: 2
discretization
symbolic
dof_desc
geometry
operators
utils
models
references
misc
🚀 Github <https://github.com/inducer/grudge>
💾 Download Releases <https://pypi.org/project/grudge>
......