An efficient C-based wavefront solver for PC finite element applications