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 (685)
Showing with 314 additions and 592 deletions
version: 2
updates:
# Set update schedule for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# vim: sw=4
name: Gitlab mirror
on:
push:
branches:
- main
jobs:
autopush:
name: Automatic push to gitlab.tiker.net
if: startsWith(github.repository, 'inducer/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
curl -L -O https://tiker.net/ci-support-v0
. ./ci-support-v0
mirror_github_to_gitlab
env:
GITLAB_AUTOPUSH_KEY: ${{ secrets.GITLAB_AUTOPUSH_KEY }}
# vim: sw=4
......@@ -2,71 +2,132 @@ name: CI
on:
push:
branches:
- master
- main
pull_request:
paths-ignore:
- 'doc/*.rst'
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@v4
- name: "Main Script"
run: |
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@v2
-
uses: actions/setup-python@v1
with:
python-version: '3.x'
- uses: actions/checkout@v4
- name: "Main Script"
run: |
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-flake8.sh
. ./prepare-and-run-flake8.sh "$(basename $GITHUB_REPOSITORY)" examples test
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/master/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/master/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/master/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
# vim: sw=4
downstream_tests:
strategy:
matrix:
downstream_project: [mirgecom]
name: Tests for downstream project ${{ matrix.downstream_project }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Main Script"
env:
DOWNSTREAM_PROJECT: ${{ matrix.downstream_project }}
run: |
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_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/master/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/master/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/master/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/master/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,9 +67,13 @@ Python 3 Conda:
- linux
- large-node
script: |
CONDA_ENVIRONMENT=.test-conda-env.yml
grep -v libhwloc .test-conda-env-py3.yml > $CONDA_ENVIRONMENT
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh
export PYOPENCL_TEST=portable:cpu
CONDA_ENVIRONMENT=.test-conda-env-py3.yml
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
. ./build-and-test-py-project-within-miniconda.sh
Python 3 Conda Examples:
......@@ -77,25 +81,52 @@ Python 3 Conda Examples:
- linux
- large-node
script: |
CONDA_ENVIRONMENT=.test-conda-env.yml
grep -v libhwloc .test-conda-env-py3.yml > $CONDA_ENVIRONMENT
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/ci-support.sh
CONDA_ENVIRONMENT=.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
# Shut up ibverbs about fork(), e.g. https://gitlab.tiker.net/inducer/grudge/-/jobs/220796
export RDMAV_FORK_SAFE=1
run_examples
Documentation:
script:
- EXTRA_INSTALL="pybind11 numpy"
- curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/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/master/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
......@@ -5,12 +5,14 @@ channels:
dependencies:
- git
- numpy
# to avoid conflict with system openmpi's libhwloc
- libhwloc=1
- pocl
- libhwloc=2
# pocl 3.1 needed for SVM functionality
- pocl>=3.1
- islpy
- pyopencl
- python=3
- gmsh
# test scripts use ompi-specific arguments
- openmpi
- mpi4py
grudge
======
.. image:: https://gitlab.tiker.net/inducer/grudge/badges/master/pipeline.svg
.. image:: https://gitlab.tiker.net/inducer/grudge/badges/main/pipeline.svg
:alt: Gitlab Build Status
:target: https://gitlab.tiker.net/inducer/grudge/commits/master
.. image:: https://github.com/inducer/grudge/workflows/CI/badge.svg?branch=master&event=push
:target: https://gitlab.tiker.net/inducer/grudge/commits/main
.. image:: https://github.com/inducer/grudge/workflows/CI/badge.svg?branch=main&event=push
:alt: Github Build Status
:target: https://github.com/inducer/grudge/actions?query=branch%3Amaster+workflow%3ACI+event%3Apush
:target: https://github.com/inducer/grudge/actions?query=branch%3Amain+workflow%3ACI+event%3Apush
..
.. image:: https://badge.fury.io/py/grudge.png
......@@ -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)
# grudge documentation build configuration file, created by
# sphinx-quickstart on Sun Sep 27 13:08:30 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
from importlib import metadata
from urllib.request import urlopen
import sys # noqa
import os # noqa
import shlex # noqa
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath("."))
_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())
# -- General configuration ------------------------------------------------
extensions = globals()["extensions"] + [
"matplotlib.sphinxext.plot_directive"]
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = "1.0"
copyright = "2015-2024, Grudge contributors"
author = "Grudge contributors"
release = metadata.version("grudge")
version = ".".join(release.split(".")[:2])
# 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"]
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# 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 = {
}
html_sidebars = {
}
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ["_static"]
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not "", a "Last updated on:" timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = "%b %d, %Y"
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ""
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# "da", "de", "en", "es", "fi", "fr", "hu", "it", "ja"
# "nl", "no", "pt", "ro", "ru", "sv", "tr"
#html_search_language = "en"
# A dictionary with options for the search language support, empty by default.
# Now only "ja" uses this config value
#html_search_options = {"type": "default"}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = "scorer.js"
# Output file base name for HTML help builder.
htmlhelp_basename = "grudgedoc"
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ("letterpaper" or "a4paper").
#"papersize": "letterpaper",
# The font size ("10pt", "11pt" or "12pt").
#"pointsize": "10pt",
# Additional stuff for the LaTeX preamble.
#"preamble": "",
# Latex figure (float) alignment
#"figure_align": "htbp",
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "grudge.tex", "grudge Documentation",
"Andreas Kloeckner", "manual"),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, "grudge", "grudge Documentation",
[author], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, "grudge", "grudge Documentation",
author, "grudge", "One line description of project.",
"Miscellaneous"),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: "footnote", "no", or "inline".
#texinfo_show_urls = "footnote"
# If true, do not generate a @detailmenu in the "Top" node"s menu.
#texinfo_no_detailmenu = False
# 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"
"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>
......
......@@ -17,7 +17,11 @@ MacOS support is in the works.
Everywhere else, just making sure you have the ``g++`` package should be
enough.
#. Install `miniforge <https://github.com/conda-forge/miniforge>`__.
#. Install `miniforge <https://github.com/conda-forge/miniforge>`_::
curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh
# then run
bash ./Miniforge3-*.sh
#. ``export CONDA=/WHERE/YOU/INSTALLED/miniforge3``
......@@ -33,7 +37,12 @@ MacOS support is in the works.
#. Type the following command::
hash -r; for i in pymbolic cgen genpy modepy pyvisfile loopy meshmode dagrt leap grudge; do python -m pip install git+https://gitlab.tiker.net/inducer/$i.git; done
hash -r; for i in pymbolic cgen genpy modepy pyvisfile loopy arraycontext meshmode dagrt leap grudge; do python -m pip install --editable "git+https://github.com/inducer/$i.git#egg=$i"; done
.. note::
In each case, you may leave out the ``--editable`` flag if you would not like
an editable copy of the source code checked out in a subfolder.
Next time you want to use `grudge`, just run the following command::
......@@ -41,8 +50,8 @@ Next time you want to use `grudge`, just run the following command::
You may also like to add this to a startup file (like :file:`$HOME/.bashrc`) or create an alias for it.
After this, you should be able to run the `tests <https://gitlab.tiker.net/inducer/grudge/tree/master/test>`_
or `examples <https://gitlab.tiker.net/inducer/grudge/tree/master/examples>`_.
After this, you should be able to run the `tests <https://gitlab.tiker.net/inducer/grudge/tree/main/test>`_
or `examples <https://gitlab.tiker.net/inducer/grudge/tree/main/examples>`_.
Troubleshooting the Installation
--------------------------------
......@@ -95,7 +104,7 @@ Licensing
:mod:`grudge` is licensed to you under the MIT/X Consortium license:
Copyright (c) 2014-16 Andreas Klöckner and Contributors.
Copyright (c) 2014-21 Andreas Klöckner and Contributors.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
......@@ -121,12 +130,15 @@ OTHER DEALINGS IN THE SOFTWARE.
Acknowledgments
===============
Andreas Klöckner's work on :mod:`grudge` was supported in part by
Work on grudge was supported in part by
* US Navy ONR grant number N00014-14-1-0117
* the US National Science Foundation under grant number CCF-1524433.
* the Department of Energy, National Nuclear Security Administration,
under Award Number DE-NA0003963,
* the US Navy ONR, under grant number N00014-14-1-0117, and
* the US National Science Foundation under grant numbers CCF-1524433,
and OAC-1931577.
AK also gratefully acknowledges a hardware gift from Nvidia Corporation. The
views and opinions expressed herein do not necessarily reflect those of the
funding agencies.
AK also gratefully acknowledges a hardware gift from Nvidia Corporation.
The views and opinions expressed herein do not necessarily reflect those of the
funding agencies.