Dear all.
Im solving for the root of a complex determinant in a loop function. Due to the multiscale origin of the problem, I have to include a large number of digits (700!), which makes the root finding procedure relatively slow since I have to include arbitrary precision numbers. If you have a look into the attached example notebook, it takes about 5.7 sec to calculate the matrix Mtemp (which is the result matrix). Im not so familiar with Numerics in Mathematica, and thus I would like to ask if someone could help me to speed up the code to get simulation time substantially down. Maybe there is a trick which I missed so far.
All the best,
Markus
P.S.: The example attaches refers to a 4-layer optical slab waveguide in TM polarization with symmetry plane in the center of the structure. Using this notebook, the wavelength dependence of the effective mode index of the fundamental mode can be traced.
Attachments: