Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify usage of pow and abs #286

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/fenicsx-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12

- name: Install test dependencies
run: |
sudo apt-get install -y graphviz libgraphviz-dev ninja-build pkg-config

- name: Install UFL
run: |
pip3 install .
pip3 install --break-system-packages .

- name: Install Basix
run: |
Expand Down Expand Up @@ -65,12 +65,12 @@ jobs:

- name: Install UFL
run: |
pip3 install .
pip3 install --break-system-packages .

- name: Install Basix and FFCx
run: |
python3 -m pip install git+https://github.com/FEniCS/basix.git
python3 -m pip install git+https://github.com/FEniCS/ffcx.git
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/basix.git
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/ffcx.git

- name: Clone DOLFINx
uses: actions/checkout@v4
Expand All @@ -83,6 +83,6 @@ jobs:
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build -S dolfinx/cpp/
cmake --build build
cmake --install build
python3 -m pip -v install --no-build-isolation --check-build-dependencies --config-settings=cmake.build-type="Developer" dolfinx/python/
python3 -m pip -v install --break-system-packages --no-build-isolation --check-build-dependencies --config-settings=cmake.build-type="Developer" dolfinx/python/
- name: Run DOLFINx unit tests
run: python3 -m pytest -n auto dolfinx/python/test/unit
13 changes: 10 additions & 3 deletions doc/sphinx/source/manual/form_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -764,11 +764,10 @@ Basic nonlinear functions
Some basic nonlinear functions are also available, their meaning mostly
obvious.

* ``abs(f)``: the absolute value of f.
The following functions are defined and should be imported from `ufl`

* ``sign(f)``: the sign of f (+1 or -1).

* ``pow(f, g)`` or ``f**g``: f to the power g, :math:`f^g`
* ``sign(f)``: the sign of f (+1 or -1).

* ``sqrt(f)``: square root, :math:`\sqrt{f}`

Expand Down Expand Up @@ -806,6 +805,14 @@ obvious.

* ``bessel_K(nu, f)``: Modified Bessel function of the second kind, :math:`K_\nu(f)`

while the following Python built in functions can be used without an import statement

* ``abs(f)``: the absolute value of f.


* ``pow(f, g)`` or ``f**g``: f to the power g, :math:`f^g`


These functions do not accept non-scalar operands or operands with free
indices or ``Argument`` dependencies.

Expand Down
Loading