Skip to content

Commit

Permalink
Improvements to demo_helmholtz.py and `demo_scattering_boundary_con…
Browse files Browse the repository at this point in the history
…ditions.py` (#2992)

* Delete the unused variable in demo_helmholtz

* Add a description for clarity in demo_scattering_boundary_conditions.py

* trim unwanted white spaces in demo_scattering_boundary_conditions.py
  • Loading branch information
RequieMa committed Jan 17, 2024
1 parent fa9183c commit 70ae092
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion python/demo/demo_helmholtz.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
n_elem = 128

msh = create_unit_square(MPI.COMM_WORLD, n_elem, n_elem)
n = ufl.FacetNormal(msh)

# Source amplitude
if np.issubdtype(PETSc.ScalarType, np.complexfloating): # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ def curl_2d(f: fem.Function):
#
# Cancelling $-(\nabla\times\mathbf{E}_s \times \bar{\mathbf{V}})
# \cdot\mathbf{n}$ and $\mathbf{n} \times \nabla \times \mathbf{E}_s
# \cdot \bar{\mathbf{V}}$ using the triple product rule $\mathbf{A}
# \cdot \bar{\mathbf{V}}$ and rearrange $\left((\mathbf{n} \times \mathbf{E}_s)
# \times \mathbf{n}\right) \cdot \bar{\mathbf{v}}$ to $ (\mathbf{E}_s \times\mathbf{n})
# \cdot (\bar{\mathbf{v}} \times \mathbf{n})$ using the triple product rule $\mathbf{A}
# \cdot(\mathbf{B} \times \mathbf{C})=\mathbf{B} \cdot(\mathbf{C} \times
# \mathbf{A})=\mathbf{C} \cdot(\mathbf{A} \times \mathbf{B})$, we get:
#
Expand Down

0 comments on commit 70ae092

Please sign in to comment.