-
Notifications
You must be signed in to change notification settings - Fork 21
NumCalc
The folder NumCalc in the Mesh2HRTF repository contains the source code for calculating HRTFs in the folder src, the compiled binary in the folder bin (see installation), and functions/scripts to optimally run NumCalc on Mesh2HRTF projects. The following explains how different ways to run NumCalc.
So most basic use is to run the command NumCalc in a terminal in a sub-directory NumCalc/source_x of a Mesh2HRTF project folder (directories containing a file named NC.inp). This will start a single NumCalc instance that will calculate the HRTF frequency by frequency.
The results are saved in the the folder be.out, and the shell output is written to the file NC.out. For details refer to Mesh2HRTF Project Folder.
Multiple NumCalc instances can run in parallel to speed up the calculations using the parameters istart and iend giving the first and last frequency step to be simulated (not the frequency in Hz). For example, four parallel instances could be started with the command:
NumCalc -istart 1 -iend 25 & NumCalc -istart 26 -iend 50 & NumCalc -istart 51 -iend 75 & NumCalc -istart 76 -iend 100
The results would be saved as in the example above in the folder be.out and the names of the output files in this case would be NC1-25.out, NC26-50.out, NC51-75.out, and NC76-100.out.
The function manage_numcalc (cf. Mesh2HRTF API available only in Python) or the script manage_numcalc_script.py on the repository folder NumCalc can be used to parallelize NumCalc in a close to optimal manner. The NumCalc manager monitors available resources (available threads, CPU, RAM) and starts a new NumCalc instance whenever possible.
-
-adapt_fmmlengthadapt the truncation parameter of the multipole expansion to the radii of the clusters. This experimental feature can resolve convergence issues of NumCalc but was not yet formally evaluated. -
-estimate_ramestimates required RAM per frequency step. The estimated values in GB are written to Memory.txt. This is used by the NumCalc manager and the estimates can be read with the functionread_ram_etimatesfrom the Mesh2HRTF API -
-nitermaxcontrols the maximum number of iterations done for each frequency. For example,NumCalc -nitermax 10allows maximally 10 iterations. This should usually not be required. -
-check_normalschecks if all face normals are pointing to the same domain. They must point outwards for computing HRTFs, because this is an exterior problem. -
>NumCalc.txtcreates an additional log file, in this case calles NumCalc.txt. -
2>NumCalcErr.txtcreates an additional error log file and can be combined with the above. For example,NumCalc >NumCalc.txt 2>NumCalcErr.txt