  Head-related transfer functions (HRTFs) describe the directional filtering of
the incoming sound caused by the morphology of a listener's head and pinnae.
When an accurate model of a listener's morphology exists, HRTFs can be
calculated numerically with the boundary element method (BEM). However, the
general recommendation to model the head and pinnae with at least six elements
per wavelength renders the BEM as a time-consuming procedure when calculating
HRTFs for the full audible frequency range. In this study, a mesh preprocessing
algorithm is proposed, viz., a-priori mesh grading, which reduces the
computational costs in the HRTF calculation process significantly. The mesh
grading algorithm deliberately violates the recommendation of at least six
elements per wavelength in certain regions of the head and pinnae and varies
the size of elements gradually according to an a-priori defined grading
function. The evaluation of the algorithm involved HRTFs calculated for various
geometric objects including meshes of three human listeners and various grading
functions. The numerical accuracy and the predicted sound-localization
performance of calculated HRTFs were analyzed. A-priori mesh grading appeared
to be suitable for the numerical calculation of HRTFs in the full audible
frequency range and outperformed uniform meshes in terms of numerical errors,
perception based predictions of sound-localization performance, and
computational costs.
