-
Notifications
You must be signed in to change notification settings - Fork 8
Description
@EduardBargues Removing the Math.NET dependency would be great. You could either use arrays like CSparse.NET (see Vector helper class) or implement a simple vector type which wraps a double array.
@epsi1on The ILinearSolver allows to choose whichever matrix implementation you like and the goal is to be completely independend of any third party library.
EDIT: introducing an array pool is a good idea, but might not be necessary. To eliminate the cloning of the array in the example code above, the Corrector would need to have a working array of the appropriate size (which could be initialized when the NonLinearSolver is built):
// equilibrium array/vector is a class member
info.InitialLoad.CopyTo(equilibrium);
equilibrium.Add(newState.Lambda, info.ReferenceLoad, equilibrium);
equilibrium.Add(-1.0, reaction, equilibrium);