/// <summary> /// allocates and initializes matrix, and allocates /// memory for unknowns and right hand side. /// </summary> /// <param name="M"></param> public void DefineMatrix(IMutableMatrixEx M) { if (m_Matrix != null) { throw new ApplicationException("matrix is allready defined. 'DefineMatrix'-method can be invoked only once in the lifetime of this object."); } m_Matrix = new IJMatrix(M); //m_Unknowns = new IJVector(M.RowPartiton); //m_Rhs = new IJVector(M.RowPartiton); //if (m_MatrixToFile != null) // DumpMatrix(M); }
/// <summary> /// frees internal memory (Matrix, RHS and solution vector); /// </summary> public virtual void Dispose() { if (m_Matrix != null) { m_Matrix.Dispose(); //m_Rhs.Dispose(); //m_Unknowns.Dispose(); m_Matrix = null; //m_Rhs = null; //m_Unknowns = null; } }