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

Stokes/Elasticity using biharmonic/Laplace #162

Open
wants to merge 135 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
3b80ae7
Stokes/Elasticity using biharmonic/Laplace
isuruf Jun 27, 2022
7c93e23
Point sumpy back to main
isuruf Aug 2, 2022
e08de56
Add unit tests for pytential.symbolic.pde.system_utils
isuruf Sep 5, 2022
5375dfd
Throw RuntimeError
isuruf Sep 5, 2022
e796b88
Double back-ticks around IntG
isuruf Sep 5, 2022
7b32e5c
typing
isuruf Sep 5, 2022
9d1536e
Add an example to convert_target_transformation_to_source
isuruf Sep 5, 2022
37d17b1
use simpler expression
isuruf Sep 5, 2022
229eecc
Add abstractmethod
isuruf Sep 5, 2022
0629327
abstractmethod
isuruf Sep 5, 2022
8a99a2a
simplify loops
isuruf Sep 5, 2022
3116759
remove unnecessary code
isuruf Sep 5, 2022
afbe5e6
list -> tuple
isuruf Sep 5, 2022
e6c779e
Pass base_kernel in WrapperNaiveOrBiharmonic
isuruf Sep 5, 2022
972ef9a
No abstractmethod for apply_stress for now
isuruf Sep 5, 2022
1c72fde
correct some typos to fix tests
isuruf Sep 5, 2022
d3074a8
Fix refactor
isuruf Sep 5, 2022
4254f42
Turn StokesletWrapper into a function
isuruf Sep 5, 2022
8d07d96
more testing
isuruf Sep 6, 2022
aed8344
Fix tests for sympy
isuruf Sep 6, 2022
9d1b31d
rewrite_using_base_kernel for pressure as well
isuruf Sep 7, 2022
fb0b744
test PDE
isuruf Sep 7, 2022
9f84aba
disable biharmonic 3D
isuruf Sep 7, 2022
6bcb9e3
update warning message
isuruf Sep 7, 2022
785dce1
raise NotImplmentedError when base_kernel is not given
isuruf Sep 8, 2022
6572730
laplace works just fine for 2D too
isuruf Sep 8, 2022
560b1d0
check divergence too
isuruf Sep 8, 2022
30a4772
test laplace 2d too
isuruf Sep 8, 2022
4209d5b
remove pylint skips now that __new__ is not used anymore
isuruf Sep 8, 2022
c4580f0
test elasticity too
isuruf Sep 8, 2022
13cbf00
Update docs and remove unnecessary for loop
isuruf Sep 8, 2022
26497bc
no need of laplace kernel when nu == 0.5
isuruf Sep 8, 2022
f87b326
update copyright
isuruf Sep 8, 2022
5eacc2c
store the stresslet in StokesletWrapperYoshida
isuruf Sep 12, 2022
0b4d86e
nu default
isuruf Sep 12, 2022
ba5b6d2
Use sym.SympyToPymbolicMapper
isuruf Sep 12, 2022
057d041
consistent spacing
isuruf Sep 12, 2022
056ca0c
fix typo
isuruf Sep 12, 2022
afdb5ef
_get_kernel_expression -> _get_sympy_kernel_expression
isuruf Sep 12, 2022
32c3eb2
improved docstring
isuruf Sep 12, 2022
703a60e
Fix tuple types
isuruf Sep 12, 2022
77e37b1
improve docstring
isuruf Sep 12, 2022
bd894e8
pep8 naming
isuruf Sep 12, 2022
c5c4ef7
explain 2D StokesletWrapperYoshida
isuruf Sep 12, 2022
6de4ebc
Fix typo
isuruf Sep 13, 2022
f0fa2a2
check that the kernel is a derivative when const != 0
isuruf Sep 13, 2022
b8bfd7a
Add DOI link
isuruf Sep 13, 2022
ce7a55d
Fix formatting
isuruf Sep 13, 2022
eb1aa5c
Make Stokes be a child class of Elasticity
isuruf Sep 13, 2022
36a0183
restore apply_pressure and apply_stress
isuruf Sep 13, 2022
f0fd85b
Fix inheritance
isuruf Sep 13, 2022
ac3fc1d
Fix docs
isuruf Sep 13, 2022
36e591a
More doc fixes
isuruf Sep 13, 2022
d067eee
doc internals
isuruf Sep 13, 2022
8261725
Fix formatting
isuruf Sep 13, 2022
e6dc014
lu_solve_with_expand -> lu_with_post_division_callback
isuruf Sep 13, 2022
5edda7f
Fix default source/target
isuruf Sep 13, 2022
2ffca9d
Use a different source/target
isuruf Sep 14, 2022
8e1b4db
Fix setting geometry
isuruf Nov 23, 2022
67ecca5
document the assumption that potentials are smooth
isuruf Nov 23, 2022
69b9fad
explain the weights
isuruf Nov 23, 2022
4758d4c
get_int_g -> _get_int_g
isuruf Nov 23, 2022
9bdedc4
simplify using sym.nodes
isuruf Nov 23, 2022
3697594
use a better error message
isuruf Nov 23, 2022
6078ec8
rename convert_int_g_to_base -> rewrite_int_g_using_base_kernel
isuruf Nov 23, 2022
0340279
warning unknown target kernel
isuruf Nov 23, 2022
72468a1
add type hints for chop and lu_with_post_division_callback
isuruf Dec 5, 2022
f22edf8
use sym.nodes
isuruf Dec 5, 2022
2efd134
Use StokesletKernel when nu_sym == 0.5
isuruf Dec 5, 2022
e2bac2f
Use DEFAULT_SOURCE
isuruf Dec 5, 2022
14007e6
Fix test
isuruf Dec 5, 2022
b269685
Use _acf
isuruf Dec 13, 2022
1e5593a
Stokeslet -> Elasticity
isuruf Dec 13, 2022
5e62554
No need to raise for abstractmethod
isuruf Dec 13, 2022
c5db354
say which unsupported dim
isuruf Dec 13, 2022
5ffabcc
create_elasticity -> make_elasticity
isuruf Dec 13, 2022
726acd3
Fix DOI links and add yoshida method to internals
isuruf Dec 13, 2022
13f1227
Improve docs about assumptions
isuruf Dec 13, 2022
98895d9
Fix IntG in docs
isuruf Dec 13, 2022
2a6aace
Fix IntG markup
isuruf Dec 13, 2022
662fe92
fix formatting in docstrings
isuruf Dec 13, 2022
4b7f9a5
dataclass
isuruf Dec 13, 2022
f1c4587
mu_sym -> mu
isuruf Dec 13, 2022
a66aaf0
Use dataclasses
isuruf Dec 13, 2022
baec582
Use enum for method
isuruf Dec 13, 2022
38ca34a
make linter happy
isuruf Dec 13, 2022
a20c07c
Use laplacian instead of laplace
isuruf Dec 13, 2022
01ac0bd
defaults to a variable named
isuruf Dec 13, 2022
963d61d
refactor solve with lu
isuruf Dec 14, 2022
df420b9
type annotate base_kernel
isuruf Dec 14, 2022
8e3330d
warn if translation variant kernel is found and bail
isuruf Dec 14, 2022
f7ed1d7
refactor terms
isuruf Dec 14, 2022
97ba079
fix incomplete refactor
isuruf Dec 14, 2022
b4c20b9
improve commnet
isuruf Dec 14, 2022
a71941a
integral -> convolution
isuruf Dec 14, 2022
e1d4e07
fix bad refactor
isuruf Dec 14, 2022
281e892
pass through postprocess_division
isuruf Dec 14, 2022
a00c920
use a data class for deriv relation
isuruf Dec 14, 2022
b6d39cc
use a dataclass for LUFactorization
isuruf Dec 14, 2022
fe6f416
Fix type annotation
isuruf Dec 14, 2022
832164c
fix tests
isuruf Dec 14, 2022
51ac8e9
avoid creating IntGs with 0 densities
isuruf Dec 14, 2022
51f32fe
fix too long line
isuruf Dec 14, 2022
41f4f9f
Try both solutions instead of relying on the symbolic backend
isuruf Dec 14, 2022
b2aa55b
reduce diff
isuruf Dec 14, 2022
85668c6
Add a comment about not having spatial constant mapping methods
isuruf Dec 20, 2022
9a31f5a
fix bad merge
isuruf Dec 20, 2022
dbc4d79
Update warning message
isuruf Dec 20, 2022
b72ec65
explain -1, -1, -1 and 0, 0, 0
isuruf Dec 20, 2022
0e7b878
operator -> wrapper
isuruf Dec 20, 2022
5ff255d
-1 with size dim
isuruf Dec 20, 2022
4559899
List -> Sequence
isuruf Dec 20, 2022
fd33333
unit test for solve_from_lu
isuruf Dec 20, 2022
b1c1f26
import Sequence
isuruf Dec 20, 2022
e66ed4f
Fix applying extra_deriv_dirs
isuruf Dec 20, 2022
ccb8bc3
add a test for errors
isuruf Dec 20, 2022
33a8f84
formatting: 2 blank lines
isuruf Dec 20, 2022
1d589bb
simplify matrix
isuruf Dec 20, 2022
e9cd110
Check using calculus patch as well
isuruf Dec 25, 2022
0440885
describe the math
isuruf Dec 26, 2022
12ed6dc
mention column of ones in A
isuruf Dec 26, 2022
f889a9d
fix typo
isuruf Dec 27, 2022
1f641c9
Fix misleading naming in test_stokes
inducer Jan 6, 2023
49af3fb
Placate flake8-comprehensions
inducer Jan 12, 2023
39aa388
Placate flake8-comprehensions again
isuruf Mar 23, 2023
3d8cec7
fix typo
isuruf Mar 23, 2023
954c5d5
fix mypy errors
alexfikl Mar 14, 2024
6f598f6
improve docs for stokes and elasticity
alexfikl Mar 14, 2024
994a977
tests: update test_elasticity_pde method names
alexfikl Mar 14, 2024
40aa82a
qbx: allow scalar densities
alexfikl Mar 15, 2024
1dc57c4
fix ruff errors
alexfikl Jul 6, 2024
f879dcf
fix typos
alexfikl Jul 20, 2024
0023ae5
fix new ruff issues
alexfikl Sep 3, 2024
4df76e4
fix new ruff issues
alexfikl Nov 16, 2024
d1db7f6
feat: update to new pymbolic
alexfikl Nov 18, 2024
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
17 changes: 17 additions & 0 deletions doc/symbolic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ Maxwell's equations

.. automodule:: pytential.symbolic.pde.maxwell

Elasticity equations
^^^^^^^^^^^^^^^^^^^^

.. automodule:: pytential.symbolic.elasticity

Stokes' equations
^^^^^^^^^^^^^^^^^

Expand All @@ -48,6 +53,11 @@ Scalar Beltrami equations

.. automodule:: pytential.symbolic.pde.beltrami

Rewriting expressions with layer potentials
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pytential.symbolic.pde.system_utils

Internal affairs
----------------

Expand All @@ -62,3 +72,10 @@ How a symbolic operator gets executed
.. automodule:: pytential.symbolic.execution

.. automodule:: pytential.symbolic.compiler

Rewriting expressions with ``IntG``\ s internals
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automethod:: pytential.symbolic.pde.system_utils.convert_target_transformation_to_source
.. automethod:: pytential.symbolic.pde.system_utils.rewrite_int_g_using_base_kernel

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ extend-ignore-re = [
"(?Rm)^.*(#|//)\\s*spellchecker:\\s*disable-line$"
]

[tool.typos.default.extend-words]
# short for multi-indices
mis = "mis"

[tool.mypy]
python_version = "3.10"
warn_unused_ignores = true
Expand Down
5 changes: 4 additions & 1 deletion pytential/qbx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,9 +968,12 @@ def get_flat_strengths_from_densities(
places,
sym.weights_and_area_elements(places.ambient_dim, dofdesc=dofdesc),
)(actx)

from numbers import Number

density_dofarrays = [evaluate(density) for density in densities]
for i, ary in enumerate(density_dofarrays):
if not isinstance(ary, DOFArray):
if not isinstance(ary, DOFArray | Number):
raise ValueError(
f"DOFArray expected for density '{densities[i]}', "
f"{type(ary)} received instead")
Expand Down
Loading
Loading