- Matlab R2017b or later
- Python3
- f2py - Required for using Fortran programs (forward/inverse single-trace and two-trace) within interface.
- Matlab Engine for Python - Required for using Wedge program within interface.
- numpy - Essential for handling complex arrays.
- mpmath - Required for computing exact solutions.
- cmath - Required for computing exact solutions.
- prompt_toolkit - Required for using CLI interface.
- importlib - Essential for loading Fortran modules.
- matplotlib - Required for saving plots.
- Parallel Computing Toolbox - Reccomended for using Wedge program.
- Optimization Toolbox - Essential for using Wedge program.
SSH:
git clone git@github.com:ucapdak/loewner.git
HTTPS:
git clone https://github.com/ucapdak/loewner.git
From the main directory enter python Start.py
to launch the CLI. This will initialise the "main" menu. From here you can enter the following commands:
forsin
- Start forward single-trace modeinvsin
- Start inverse single-trace modetwo
- Start two-trace modewedge
- Start wedge trace modeexact
- Exact forward or single-trace modeexactinv
- Start exact inverse solution mode.
Other Important Commands:
df
- Print a list of driving functionsq
orquit
- Exit the programh
orhelp
- Display a help messageb
orback
- Return to the main menu
To run the program in for the various driving functions you have to use the following index system:
Using much of the program within the CLI requires compiling certain files as Python modules.
For most driving functions, using the forward and two-trace modes requires compiling at least once for each of the different driving functions. If this isn't done then the program will fail. For subsequent runs, you won't have to recompile the modules so long as ForwardLoewner.F90
isn't changed.
For the kappa, calpha, and constant driving functions you have to recompile the module every time these values are changed.
After selecting a mode you have to set certain parameters for the driving functions you wish to run. This is done by entering [parameter] [value]
in the CLI.
starttime
- Start time for the runs. Must be greater than zero.finaltime
- Final time for the runs. Must be greater than the start time.outerres
- Outer resolution. Must be greater than zero.innerres
- Inner resolution. Must be greater than zero.compile
- Whether or not to compile modules. Typically only has to be done on the first execution of the program, or not at all, depending on the algorithm. See more.savedata
- Save the output as .dat files. These are seperated by a space.saveplots
- Save the output as .pdf plots.
e.g. Loewner >> starttime 0
to use a start time of zero. For compilation and saving data your response must be given in the form of y
or n
, e.g. Loewner >>saveplots y
. In the case of kappa-driving any final time greater than 1 will be automatically changed to 1.
Alternative arguments:
times [start time] [final time]
- Quicker way for entering times values.res [outer res] [inner res]
- Quicker way for enterting resolution values.
Extra parameters:
wedgealpha
- Only required for wedge mode.constant
- Only required if you intend to run constant-driving.kappa
- Only required if you intend to run kappa-driving.drivealpha
- Only required if you intend to run c-alpha-driving.
Additional commands:
run
- Enter the list of driving functions you wish to use for a certain algorithm in the formrun INDEX1 INDEX2
start
Executes the algotihm once parameters and driving functions have been chosen.cleardriving
- Clear the driving function selection and start over.printdriving
- Print the current driving function selection.error
- Displays information on why entertingstart
failed and algorithm could not be performed. This will be caused when parameters haven't been set or have bad values.
This mode allows you to run one or more driving functions with the option to save and/or plot the results. This can only run constant, kappa, and c-alpha runs once.
- Enter
forsin
/invsin
/two
from the main menu - Enter the run-parameters.
- Enter
run
with a list of driving functions you wish to use seperated by a space. - Enter
start
. - If the parameters are successfully validated, then the program will execute these runs and save the output.
Upon completion, the forward single-trace results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/SingleTrace/Forward/
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/SingleTrace/Forward/
The numerical inverse single-trace results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/SingleTrace/Inverse/
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/SingleTrace/Inverse/
The two-trace results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/TwoTrace/Forward/
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/TwoTrace/Forward/
This mode allows you to run one or more driving functions with the option to save and/or plot the results. This can only run constant, kappa, and c-alpha runs once.
- Enter
exactinv
from the main menu - Enter the run-parameters. The only resolution argument required is
outerres
. There is no need to set thecompile
value as this isn't required for the exact inverse procedure. - Enter
run
followed by a list of driving functions you wish to use seperated by a space. - Enter
start
to carry out the algorithm. - If the parameters are successfully validated, then the program will execute these runs and save the output.
Upon completion, the results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/ExactInverse/
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/ExactInverse/
This mode allows you to run one or more driving functions with the option to save and/or plot the results. This can only run constant, kappa, and c-alpha runs once.
- Enter
wedge
from the main menu - Enter the run-parameters. Also enter a
wedgealpha
argument in the form of radians. - Enter
run
followed by a list of driving functions you wish to use seperated by a space, e.g.Loewner >> run INDEX1 INDEX2 INDEX3
. This can allow 'standard' driving functions more than once, but cannot be used to run the driving functions that require extra arguments more than once. - Enter
start
to carry out the algorithm. - If the parameters are successfully validated, then the program will execute these runs and save the output.
Upon completion, the results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/WedgeGrowth/Forward/
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/WedgeGrowth/Forward/
This mode allows you to run exact forward solutions for constant, linear, and xi(t) = sqrt(1 + t) driving functions. For linear drviving there is the option to use two different equations.
- Enter
exact
from the main menu
- Enter the run-parameters: start time, final time, outer resolution, save plots, save data. The constant parmater is automatically set to 1.
- Enter
run 0
- Enter
start
to carry out the algorithm. - If the parameters are successfully validated, then the program will execute these runs and save the output.
Upon completion, the results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/TwoTrace/ExactSolutions/
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/TwoTrace/ExactSolutions/
For linear driving there is the optoo
- Enter the run-parameters: outer resolution, save plots, save data.
- Set the paramters
startphi
andfinalphi
. These must be greater than zero. Any final value greater than pi will be automatically be set to pi. - Set
linearexplicit
to True. - Set
linearimplicit
to False. (if not desired) - Enter
run 1
- Enter
start
to carry out the algorithm. - If the parameters are successfully validated, then the program will execute these runs and save the output.
Upon completion, the results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/SingleTrace/ExactForward/
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/SingleTrace/ExactForward/
- Enter the run-parameters: start time, final time, outer resolution, save plots, save data.
- Set
linearexplicit
to False (if not desired). - Set
linearimplicit
to True. - Enter
run 1
- Enter
start
to carry out the algorithm. - If the parameters are successfully validated, then the program will execute these runs and save the output.
Upon completion, the results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/SingleTrace/ExactForward/
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/SingleTrace/ExactForward/
- Enter the run-parameters: start time, final time, outer resolution, save plots, save data.
- Enter
run 14
- Enter
start
to carry out the algorithm. - If the parameters are successfully validated, then the program will execute these runs and save the output.
Upon completion, the results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/TwoTrace/ExactSolutions/
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/TwoTrace/ExactSolutions/
This mode allows you to run multiple kappa-driving forward single-trace evolutions for a range of driving functions.
- Enter
kappa
orcalpha
from the main menu - Enter the run-parameters: start time, final time, outer resolution, inner resolution, save plots, save data.
- For kappa the final time will be set to set to 1 if you enter a value larger than 1.
- Compile is automatically set to true.
- Enter the parameters in te form:
- Kappa:
kappas [start kappa] [final kappa] step [step value]
orkappas [start kappa] [final kappa] num [number of kappa runs]
depending on how you want to divide the interval. - C-Alphas:
calphas [start alpha] [final alpha] step [step value]
orcalphas [start alpha] [final alpha] num [number of calpha runs]
depending on how you want to divide the interval.
- Enter
start
to carry out the algorithm. - If the parameters are successfully validated, then the program will execute these runs and save the output.
Upon completion, the results will be saved to:
Data:
[LOEWNER DIRECTORY]/main/Output/Data/SingleTrace/Forward/ (kappa and calpha)
[LOEWNER DIRECTORY]/main/Output/Data/SingleTrace/TranslatedForward/ (kappa only)
Plots:
[LOEWNER DIRECTORY]/main/Output/Plots/SingleTrace/Forward/ (kappa and calpha)
[LOEWNER DIRECTORY]/main/Output/Plots/SingleTrace/TranslatedForward/ (kappa only)
Plots are saved as PDFs, data is saved in DAT files. The DAT files have 18 decimal places of precision and the columns are seperated by a space. The time/kappa/wegde angle/alpha parameters are represented in the filename with 5 decimal places of precision, so there is a risk of ovewritting results for near-identical results where certain parameters are rounded to the same value.
For numerical single-trace forward and inverse, the output filename will take the form:
[INDEX]-[START TIME]-[FINAL TIME]-[OUTER RESOLUTION]-[INNER RESOLUTION].EXT
where .EXT
is either .dat or .pdf depending on the output type.
For kappa and c-alpha the files are saved in the format:
[INDEX]-[KAPPA OR ALPHA VALUE]-[START TIME]-[FINAL TIME]-[OUTER RESOLUTION]-[INNER RESOLUTION].EXT
For the wedge algorithm, the output filename will take the form:
[INDEX]-[WEDGE ANGLE]-[FINAL TIME]-[OUTER RESOLUTION]-[INNER RESOLUTION].EXT
For the explicit linear exact solution, the output filename will take the form:
[INDEX]-PHI-[START PHI]-[FINAL PHI]-[OUTER RESOLUTION].EXT
Call python -m unittest discover Tests
from main directory.
This project is licensed under the MIT License - see the LICENSE.md file for details.