BSCOUPLER |
BSCoupler |
---|
BSlabModeArray bma ModeArray sma Polarization bspol double g double x0, x1 double z0, z1 int Nx int Nz Interval X Interval Z double hx double hz bool set_amp_flag Cmatrix amp Cmatrix p_amp Cmatrix T Cmatrix Tz Cmatrix S Cmatrix Sz bool inspect_flag Cvector IBSAmp Cmatrix Oi, Oo BSCoupler( BSCoupler &bsc_) BSCoupler() BSCoupler(BSlabModeArray bma_, ModeArray sma_, double g_, double x0_, double x1_, int Nx_, double z0_, double z1_, int Nz_) BSCoupler( BSlabModeArray bma_, ModeArray sma_, double g_, double z0_, double z1_, int Nz_) BSCoupler& operator=(const BSCoupler& bsc_) double theta(double z) Complex coverlap( Complex *field_1, Complex *field_2, Complex *field_1_mp, Complex *field_2_mp ) Complex coverlap_eps( double *eps, double *eps_mp, Complex *field_1, Complex *field_2, Complex *field_1_mp, Complex *field_2_mp ) Cmatrix f_TE(double z, int message) Cmatrix f_TM(double z, int message ) Cmatrix get_transfer_matrix(Cvector initial_Amp, int info) Cmatrix get_scattering_matrix(int info) Cmatrix reduced_S(void) void correction_matrix(double z, Cmatrix &O) void correction_matrix_field_match(double z, Cmatrix &O) void set_amp(Cvector iIBSAmp) Cvector get_amp(double z) bool inspect(void) Complex field(Fcomp cp, double x, double z) double field(Fcomp cp, Afo foa, double x, double z) Complex mirror_field(Fcomp cp, double x, double z) Dmatrix field(Fcomp cp, Afo foa, Interval dwx, int npx, Interval dwz, int npz) void fwrite( char *filename, int spec) void mfile(Fcomp cp, Afo foa, Interval disp, double z, int np, char ext0, char ext1, char pltype) void mfile(Fcomp cp, Afo foa, double x0, double x1, int Nx, double z0, double z1, int Nz, char ext0, char ext1, char pltype) void plot(Fcomp cp, Afo foa, double xbeg, double xend, double zbeg, double zend, int npx, int npz, char ext0, char ext1) |
BSlabModeArray bma
The bend waveguide mode array.
ModeArray sma
The straight waveguide mode array.
Polarization bspol
Polarization
double g
minimum distance of separation
double x0, x1
Interval along x axis [x0, x1]
double z0, z1
Interval along z axis [z0, z1]
int Nx
Number of discretization points along x direction
int Nz
Number of discretization points along z direction
Interval X
X = [x0, x1]
Interval Z
Z= [z0, z1]
double hx
Discretization step in x direction
double hz
Discretization step in z direction
bool set_amp_flag
Checks whether Cmatrix amp is filled or not
Cmatrix amp
It stores amplitudes at z levels. It is (bsa.num + sa.num) row and (Nz)
columns Complex number matrix. Each row corresponds to one mode and each col.
corresponds to one z point. The memory is alloted by the constructor.
Cmatrix p_amp
Projected amplitude - detail same as variable 'amp'. p_amp(z) := Oo(z) * amp(z)
Cmatrix T
Final propagation matrix elements
Cmatrix Tz
Collection of propagation matrix at each z
Cmatrix S
Scattering matrix for [z0, z1]
Cmatrix Sz
Collection of scattering matrix at each z
bool inspect_flag
To check whether all modes have same wavelength and polarization.
Cvector IBSAmp
Initial amplitude for coupler T matrix computation.
It is initialized in get_transfer_matrix().
Cmatrix Oi, Oo
Corrections matrices : Oi = correction at input, Oo = correction at output
Using these corrections, S = Oo * T * inv(Oi)
These matrices also required for field of complete MR.
BSCoupler(BSlabModeArray bma_,
ModeArray sma_,
double g_,
double x0_, double x1_, int Nx_,
double z0_, double z1_, int Nz_)
Constructor
BSCoupler( BSCoupler &bsc_)
Copy constructor
BSCoupler()
Default constructor
BSCoupler(
BSlabModeArray bma_,
ModeArray sma_,
double g_,
double z0_, double z1_, int Nz_)
Constructor for a coupler with [0, infinite] Interval in x direction
BSCoupler& operator=(const BSCoupler& bsc_)
Assignment for BSCoupler
double theta(double z)
Given angle theta (anticlockwise direction) of a 'z' position w.r.t. coupler window.
Complex coverlap(
Complex *field_1,
Complex *field_2,
Complex *field_1_mp,
Complex *field_2_mp
)
field_2 is conjugated
Complex coverlap_eps(
double *eps,
double *eps_mp,
Complex *field_1,
Complex *field_2,
Complex *field_1_mp,
Complex *field_2_mp
)
field_2 is conjugated
Cmatrix f_TE(double z, int message)
Defines f(x,z) for TE mode in coupled mode equation d_z(C(z)) = f(x,z). C(z)
message = 1 => write L and R matrices to file LR_TE.data
Cmatrix f_TM(double z, int message )
Defines f(x,z) for TM mode in coupled mode equation d_z(C(z)) = f(x,z). C(z)
message = 1 => write L and R matrices to file LR_TE.data
Cmatrix get_transfer_matrix(Cvector initial_Amp, int info)
Solve for transfer matrix, and return it.
Initial_Amp : first entries are for bend modes and then for straight waveguide modes
info = 1 => write coupled amplitudes evalution "coupled_amp.data".
info = 2 => Tz matrix data is written to file Tmatrix.data
Sz matrix data is written to file Smatrix.data.
Cmatrix get_scattering_matrix(int info)
Return scattering matrix.
info = 0 => don't display scattering matrix
info = 1 => display Complex S matrix
info = 2 => display absolute value of S
Cmatrix reduced_S(void)
S is a scattering matrix for z= [z0, z1]. reduced_S() reduces this
scattering matrix along line of symmetry z=0.
void correction_matrix(double z, Cmatrix &O)
Gives correction matrix at level z.
void set_amp(Cvector iIBSAmp)
Set `amp' corresponding to initial amplitudes given by iIBSAmp
Cvector get_amp(double z)
Get amplitudes at given z position
bool inspect(void)
To check various consistent conditions and other constraints
Complex field(Fcomp cp, double x, double z)
Field values at position (x, z). Complex mode profiles
cp: EX - HZ, ER, EP, HR, HP, SX, SY, SZ, SP, SR
Note the coordinate system convention.
double field(Fcomp cp, Afo foa, double x, double z)
Field values at position (x, z). Complex mode profiles
cp: EX - HZ, ER, EP, HR, HP, SX, SY, SZ, SP, SR
Note the coordinate system convention.
Complex mirror_field(Fcomp cp, double x, double z)
Field values at position (x, z). Complex mode profiles
cp: EX - HZ, ER, EP, HR, HP, SX, SY, SZ, SP, SR
Note the coordinate system convention.
Dmatrix field(Fcomp cp, Afo foa, Interval dwx, int npx,
Interval dwz, int npz)
The optical field, discretized on a regular rectangular mesh,
npx x npz points on a display window dwx x dwz
cp: one of EX, HZ, SX-SZ.
foa: ORG, MOD, SQR, REP, IMP (ORG = REP)
void fwrite( char *filename, int spec)
writes coupler specifications of type
void mfile(Fcomp cp, Afo foa, Interval disp, double z,
int np, char ext0, char ext1, char pltype)
field profile -> MATLAB .m file
cp: EX - HZ, SZ
foa: MOD, ORG, SQR
fac: output factor (typically 1.0 or -1.0)
disp: output region on the x axis
npx: number of points in output mesh
ext0, ext1: filename id characters
pltype: 'L': geometry information + plot commands (default)
'V': field, mesh, and plot command,
to be included into *L.m
void mfile(Fcomp cp, Afo foa,
double x0, double x1, int Nx,
double z0, double z1, int Nz,
char ext0, char ext1, char pltype)
Complete field profile on rectangular domain[x0, x1]x[z0,z1]
-> MATLAB .m file
cp: EX - HZ, SZ
foa: MOD, ORG, SQR
fac: output factor (typically 1.0 or -1.0)
Nx, Nz number of points in X and Z direction
ext0, ext1: filename id characters
pltype: 'L': geometry information + plot commands (default)
'V': field, mesh, and plot command,
to be included into *L.m
void plot(Fcomp cp, Afo foa,
double xbeg, double xend, double zbeg, double zend,
int npx, int npz, char ext0, char ext1)
image of component cp
cp: one of EX- HZ
foa: MOD, SQR, REP, IMP, ORG = REP
xbeg, xend, zbeg, zend: x resp. z extensions of the plot window
npx, npz: number of plot points in the x and z directions
ext0, ext1: filename id characters for the m.file