PLaSK library
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
ζ
ξ
φ
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
ζ
ξ
φ
Typedefs
a
c
d
e
f
i
l
m
o
p
r
s
t
u
x
Enumerations
Enumerator
_
a
b
c
e
f
i
l
m
o
p
r
s
t
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
Enumerations
a
b
c
d
e
f
i
k
m
n
p
r
s
t
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Properties
o
Related Symbols
a
b
d
e
f
g
l
m
n
o
p
r
s
t
w
Files
File List
File Members
All
_
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
i
k
m
r
s
t
w
x
z
Variables
Typedefs
a
c
d
e
f
h
i
j
k
l
m
n
r
s
u
v
x
z
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
l
m
n
o
p
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
bisection.hpp
Go to the documentation of this file.
1
/*
2
* This file is part of PLaSK (https://plask.app) by Photonics Group at TUL
3
* Copyright (c) 2022 Lodz University of Technology
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, version 3.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*/
14
#ifndef PLASK__OPTICAL_EFFECTIVE_BISECTION_H
15
#define PLASK__OPTICAL_EFFECTIVE_BISECTION_H
16
17
#include <
plask/plask.hpp
>
18
19
namespace
plask
{
namespace
optical {
namespace
effective {
20
21
struct
Contour
{
22
23
const
Solver
*
solver
;
24
25
const
std::function<dcomplex(dcomplex)>&
fun
;
26
27
double
re0
,
28
im0
,
29
re1
,
30
im1
;
31
32
DataVector<dcomplex>
bottom
,
33
right
,
34
top
,
35
left
;
36
37
Contour
(
const
Solver
*
solver
,
const
std::function<dcomplex(dcomplex)>&
fun
):
solver
(
solver
),
fun
(
fun
) {};
38
39
Contour
(
const
Contour
& src):
solver
(src.
solver
),
fun
(src.
fun
),
re0
(src.
re0
),
im0
(src.
im0
),
re1
(src.
re1
),
im1
(src.
im1
),
40
bottom
(src.
bottom
),
right
(src.
right
),
top
(src.
top
),
left
(src.
left
) {}
39
Contour
(
const
Contour
& src):
solver
(src.
solver
),
fun
(src.
fun
),
re0
(src.
re0
),
im0
(src.
im0
),
re1
(src.
re1
),
im1
(src.
im1
), {
…
}
41
42
Contour
(
Contour
&& src):
solver
(src.
solver
),
fun
(src.
fun
),
re0
(src.
re0
),
im0
(src.
im0
),
re1
(src.
re1
),
im1
(src.
im1
),
43
bottom
(
std
::move(src.
bottom
)),
right
(
std
::move(src.
right
)),
top
(
std
::move(src.
top
)),
left
(
std
::move(src.
left
)) {}
42
Contour
(
Contour
&& src):
solver
(src.
solver
),
fun
(src.
fun
),
re0
(src.
re0
),
im0
(src.
im0
),
re1
(src.
re1
),
im1
(src.
im1
), {
…
}
44
52
Contour
(
const
Solver
*
solver
,
const
std::function<dcomplex(dcomplex)>&
fun
, dcomplex
corner0
, dcomplex
corner1
,
size_t
ren
,
size_t
imn
);
53
58
int
winding
()
const
{
59
return
crossings(
bottom
,
re0
,
im0
,
re1
,
im0
)
60
+ crossings(
right
,
re1
,
im0
,
re1
,
im1
)
61
- crossings(
top
,
re1
,
im1
,
re0
,
im1
)
62
- crossings(
left
,
re0
,
im1
,
re0
,
im0
);
63
}
58
int
winding
()
const
{
…
}
64
72
std::pair<Contour,Contour>
divide
(
double
reps,
double
ieps)
const
;
73
74
private
:
75
77
int
crossings(
const
DataVector<dcomplex>
& line,
double
r0
,
double
i0
,
double
r1
,
double
i1
)
const
;
78
79
};
21
struct
Contour
{
…
};
80
90
std::vector<std::pair<dcomplex,dcomplex>>
findZeros
(
const
Solver
* solver,
const
std::function<dcomplex(dcomplex)>&
fun
,
91
dcomplex
corner0
, dcomplex
corner1
,
size_t
resteps
,
size_t
imsteps
, dcomplex eps);
92
93
}}}
// namespace plask::optical::effective
94
95
#endif
// PLASK__OPTICAL_EFFECTIVE_BISECTION_H
solvers
optical
effective
bisection.hpp
Generated by
1.9.8