1
- export Custom,Circle,Rectangle,Ellipse
1
+ export Custom,Circle,Rectangle,Ellipse,CustomR
2
2
using SpecialFunctions
3
3
"""
4
4
Circle(d)
@@ -29,6 +29,15 @@ A custom inclusion
29
29
struct Custom <: Geometry
30
30
F:: Array{Complex{Float64},2}
31
31
end
32
+ """
33
+ CustomR(f)
34
+ A custom inclusion
35
+ # Attributes
36
+ * `f` : predefinded custom real space matrix
37
+ """
38
+ struct Custom <: Geometry
39
+ f:: Array{Complex{Float64},2}
40
+ end
32
41
"""
33
42
Ellipse(dx,dy)
34
43
An elliptic inclusion
50
59
function reciprocal (c:: Custom ,dnx,dny)
51
60
return c. F
52
61
end
62
+ function reciprocal (c:: CustomR ,dnx,dny)
63
+ return real2recip (dnx,dny,c. f)
64
+ end
53
65
function reciprocal (e:: Ellipse ,dnx,dny)
54
66
radix= Matrix (.5 * sqrt .((dnx* e. dx). ^ 2 + (dny* e. dy). ^ 2 ))
55
67
result= besselj .(1 ,2 * pi * radix)./ radix
@@ -69,6 +81,10 @@ function drawable(c::Custom)
69
81
@warn " The drawable method is not implemented for Custom geometries."
70
82
return 0 ,0
71
83
end
84
+ function drawable (c:: CustomR )
85
+ @warn " The drawable method is not implemented for Custom geometries."
86
+ return 0 ,0
87
+ end
72
88
function drawable (c:: Circle )
73
89
phivals= 2pi * (0 : .01 : 1 )
74
90
return c. d* .5 cos .(phivals),c. d* .5 sin .(phivals)
0 commit comments