|
Re: OPR Programming Challenge
Less busy now, so I met with Jim a few we made a few more passes. The attached image shows the top level LV diagram. And the zip has the code saved in LV 2014. The other image shows the time breakdown for the different portions.
The code runs in around 20ms on my laptop running a VM. It iterates until the residual is about 3 digits after the decimal.
Building the sparse matrix creates the diagonal terms and upper portion independently, which substantially speeds the elimination of duplicate terms. The complete solver was swapped out for one based on conjugate gradient.
The commented code loads from disk, the enabled code has the data in RAM, in a constant. Loading from disk adds another 20ms.
Greg McKaskle
|