this allocation should be avoided for speed
traversing four line quadratures should be replaced by traversing their Descartes product
singularity type should use singularity type and template instantiation from parameter