Skip to content

Commit 626c07f

Browse files
Merge pull request #162 from goggle/typos01
Fix some typos
2 parents 2effd0c + a54f179 commit 626c07f

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Join to our [gitter](https://gitter.im/Gridap-jl/community) chat to ask question
6464

6565
## How to cite Gridap
6666

67-
In order to give credit to the `Gridap` contributors, we simply ask you to cite the refence below in any publication in which you have made use of `Gridap` packages:
67+
In order to give credit to the `Gridap` contributors, we simply ask you to cite the reference below in any publication in which you have made use of `Gridap` packages:
6868

6969
```
7070
@article{Badia2020,

src/TopOptEMFocus.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ LHp=(L/2, h1+h2) # Start of PML for x,y > 0
199199
LHn=(L/2, 0) # Start of PML for x,y < 0
200200
phys_params = (; k, n_metal, n_air, μ, R, dpml, LHp, LHn)
201201

202-
# PML coordinate streching functions
202+
# PML coordinate stretching functions
203203
function s_PML(x; phys_params)
204204
σ = -3 / 4 * log(phys_params.R) / phys_params.dpml / phys_params.n_air
205205
xf = Tuple(x)
@@ -230,7 +230,7 @@ Fields.∇(Λf::Λ) = x -> TensorValue{2, 2, ComplexF64}(-(Λf(x)[1])^2 * ds_PML
230230

231231
# ## Filter and threshold
232232
#
233-
# Here we use the filter and threshold dicussed above. The parameters for the filter and threshold are extracted from Ref [6]. Note that every integral in the filter is only defined on $\Omega_d$
233+
# Here we use the filter and threshold discussed above. The parameters for the filter and threshold are extracted from Ref [6]. Note that every integral in the filter is only defined on $\Omega_d$
234234
#
235235

236236
r = 5/sqrt(3) # Filter radius
@@ -344,7 +344,7 @@ Dξdpf(pf, n_air, n_metal, β, η)= 2 * (n_air - n_metal) / (n_air + (n_metal -
344344
DAdpf(u, v, pfh; phys_params, β, η) = ((p -> Dξdpf(p, phys_params.n_air, phys_params.n_metal, β, η)) pfh) * ((v) (u))
345345

346346

347-
# Then we create a function `gf_pf` that depends directly on $p_f$ and write out the derivate using adjoint method formula. Note that the threshold chainrule is already implemented in the functions above.
347+
# Then we create a function `gf_pf` that depends directly on $p_f$ and write out the derivative using adjoint method formula. Note that the threshold chainrule is already implemented in the functions above.
348348
#
349349

350350
function gf_pf(pf_vec; β, η, phys_params, fem_params)
@@ -440,7 +440,7 @@ g1-g0, grad'*δp
440440

441441
# ## Optimization with NLopt
442442
#
443-
# Now we use NLopt.jl package to implement the MMA algorithm for optimization. Note that we start with $\beta=8$ and then gradually increase it to $\beta=32$ in consistant with Ref. [6].
443+
# Now we use NLopt.jl package to implement the MMA algorithm for optimization. Note that we start with $\beta=8$ and then gradually increase it to $\beta=32$ in consistent with Ref. [6].
444444
#
445445

446446
using NLopt
@@ -500,7 +500,7 @@ save("shape.png", fig)
500500
# ![](../assets/TopOptEMFocus/shape.png)
501501
#
502502

503-
# For the electric field, recall that $\vert E\vert^2\sim\vert \frac{1}{\epsilon}\nabla H\vert^2$, the factor 2 below comes from the amplitude compared to the incident plane wave. We can see that the optimized shapes are very similiar to the optimized shape in Ref. [6], proving our results.
503+
# For the electric field, recall that $\vert E\vert^2\sim\vert \frac{1}{\epsilon}\nabla H\vert^2$, the factor 2 below comes from the amplitude compared to the incident plane wave. We can see that the optimized shapes are very similar to the optimized shape in Ref. [6], proving our results.
504504
#
505505

506506
maxe = 30 # Maximum electric field magnitude compared to the incident plane wave
@@ -529,6 +529,6 @@ save("Field.png", fig)
529529
#
530530
# [5] B. S. Lazarov and O. Sigmund, "[Filters in topology optimization based on Helmholtz-type differential equations](https://en.wikipedia.org/wiki/Jacobi%E2%80%93Anger_expansion)", International Journal for Numerical Methods in Engineering, vol. 86, pp. 765-781, December 2010.
531531
#
532-
# [6] R.E. Christiansen, J. Michon, M. Benzaouia, O. Sigmund, and S.G. Johnson, "[Inverse design of nanoparticles for enhanced Raman scattering](https://opg.optica.org/oe/fulltext.cfm?uri=oe-28-4-4444&id=426514)," Optical Express, vol. 28, pp. 4444-4462, Feburary 2020.
532+
# [6] R.E. Christiansen, J. Michon, M. Benzaouia, O. Sigmund, and S.G. Johnson, "[Inverse design of nanoparticles for enhanced Raman scattering](https://opg.optica.org/oe/fulltext.cfm?uri=oe-28-4-4444&id=426514)," Optical Express, vol. 28, pp. 4444-4462, February 2020.
533533
#
534534

src/emscatter.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ model = GmshDiscreteModel("../models/geometry.msh")
8989

9090
# ## FE spaces
9191
#
92-
# We use the first-order lagrangian as the finite element function space basis. The dirihlet edges are labeld with `DirichletEdges` in the mesh file. Since our problem involves complex numbers (because of PML), we need to assign the `vector_type` to be `Vector{ComplexF64}`.
92+
# We use the first-order lagrangian as the finite element function space basis. The Dirichlet edges are labeled with `DirichletEdges` in the mesh file. Since our problem involves complex numbers (because of PML), we need to assign the `vector_type` to be `Vector{ComplexF64}`.
9393
#
9494

9595
# ### Test and trial finite element function space
@@ -100,7 +100,7 @@ U = V # mathematically equivalent to TrialFESpace(V,0)
100100

101101
# ## Numerical integration
102102
#
103-
# We generate the triangulation and a second-order Gaussian quadrature for the numerial integration. Note that we create a boundary triangulation from a `Source` tag for the line excitation. Generally, we do not need such additional mesh tags for the source, we can use a delta function to approximate such line source excitation. However, by generating a line mesh, we can increase the accuracy of this source excitation.
103+
# We generate the triangulation and a second-order Gaussian quadrature for the numerical integration. Note that we create a boundary triangulation from a `Source` tag for the line excitation. Generally, we do not need such additional mesh tags for the source, we can use a delta function to approximate such line source excitation. However, by generating a line mesh, we can increase the accuracy of this source excitation.
104104
#
105105

106106
# ### Generate triangulation and quadrature from model
@@ -118,11 +118,11 @@ dΓ = Measure(Γ,degree)
118118
#
119119

120120
# ### PML parameters
121-
Rpml = 1e-12 # Tolerence for PML reflection
121+
Rpml = 1e-12 # Tolerance for PML reflection
122122
σ = -3/4*log(Rpml)/d_pml # σ_0
123123
LH = (L,H) # Size of the PML inner boundary (a rectangular centere at (0,0))
124124

125-
# ### PML coordinate streching functions
125+
# ### PML coordinate stretching functions
126126
function s_PML(x,σ,k,LH,d_pml)
127127
u = abs.(Tuple(x)).-LH./2 # get the depth into PML
128128
return @. ifelse(u > 0, 1+(1im*σ/k)*(u/d_pml)^2, $(1.0+0im))
@@ -196,7 +196,7 @@ uh = solve(op)
196196
# H_0=\sum_m i^mJ_m(kr)e^{im\theta},
197197
# ```
198198
#
199-
# where $m=0,\pm 1,\pm 2,\dots$ and $J_m(z)$ is the Bessel function of the fisrt kind.
199+
# where $m=0,\pm 1,\pm 2,\dots$ and $J_m(z)$ is the Bessel function of the first kind.
200200
#
201201
# For simplicity, we start with only the $m$-th component and take it as the incident part:
202202
#

src/fsi_tutorial.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ a_f((u,p),(v,q)) = ∫( ε(v) ⊙ (σ_dev_f ∘ ε(u)) - (∇⋅v)*p + q*(∇⋅
288288
a_fs((us,uf,p),(vs,vf,q)) = ( α*(jump_Γ(vf,vs)jump_Γ(uf,us)) +
289289
jump_Γ(vf,vs)t_Γfs(1,p,uf,n_Γfs) +
290290
t_Γfs(χ,q,vf,n_Γfs)jump_Γ(uf,us) )dΓ_fs
291-
# Where $\chi$ is a parameter that can take values $1.0$ or $-1.0$ and it is used to define the symmetric or antisymmetric version of the method, respectively. To difine this form we used the well known Nitsche's method, which enforces the continuity of fluid and solid velocities as well as the continuity of the normal stresses, see for instance [2].
291+
# Where $\chi$ is a parameter that can take values $1.0$ or $-1.0$ and it is used to define the symmetric or antisymmetric version of the method, respectively. To define this form we used the well known Nitsche's method, which enforces the continuity of fluid and solid velocities as well as the continuity of the normal stresses, see for instance [2].
292292
const γ = 1.0
293293
const χ = -1.0
294294
jump_Γ(wf,ws) = wf.⁺-ws.⁻

src/poisson_transient.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# ## Problem statement
88

9-
# We solve the heat equation in a 2-dimensional domain $\Omega$, the unit square, with Homogenous Dirichlet boundaries on the whole boundary $\partial \Omega$. We consider a time-dependent conductivity $\kappa(t)=1.0 + 0.95\sin(2\pi t)$, a time-dependent volumetric forcing term $f(t) = \sin(\pi t)$ and a constant Homogenous boundary condition $g = 0.0$. The initial solution is $u(x,0) = u_0 = 0$. With these definitions, the strong form of the problem reads:
9+
# We solve the heat equation in a 2-dimensional domain $\Omega$, the unit square, with Homogeneous Dirichlet boundaries on the whole boundary $\partial \Omega$. We consider a time-dependent conductivity $\kappa(t)=1.0 + 0.95\sin(2\pi t)$, a time-dependent volumetric forcing term $f(t) = \sin(\pi t)$ and a constant Homogeneous boundary condition $g = 0.0$. The initial solution is $u(x,0) = u_0 = 0$. With these definitions, the strong form of the problem reads:
1010

1111
# ```math
1212
# \left\lbrace
@@ -54,7 +54,7 @@ refFE = ReferenceFE(lagrangian,Float64,1)
5454
# The space of test functions is constant in time and is defined in steady problems:
5555
V = TestFESpace(𝒯,refFE,dirichlet_tags="boundary")
5656

57-
# The trial space is now a `TransientTrialFESpace`, wich is constructed from a `TestFESpace` and a function (or vector of functions) for the Dirichlet boundary condition/s. In that case, the boundary condition function is a time-independent constant, but it could also be a time-dependent field depending on the coordinates $x$ and time $t$.
57+
# The trial space is now a `TransientTrialFESpace`, which is constructed from a `TestFESpace` and a function (or vector of functions) for the Dirichlet boundary condition/s. In that case, the boundary condition function is a time-independent constant, but it could also be a time-dependent field depending on the coordinates $x$ and time $t$.
5858
g(x,t::Real) = 0.0
5959
g(t::Real) = x -> g(x,t)
6060
U = TransientTrialFESpace(V,g)

0 commit comments

Comments
 (0)