/* $Id: sysmatma28.h,v 1.1.1.1 1996/10/02 10:35:54 roitzsch Exp $ */

#ifndef SYSMATMA28_H
#define SYSMATMA28_H

#include "general.h"

#include "kvector.h"
#include "fortran.h"

//-------------------------------------------------------------------------


class MA28Matrix
{
  protected:

    const 	int spaceDim;
    int		N, NZ, LIRN, LICN;
    Vector<Num> A, W;
    Vector<int> IRN, ICN, IKEEP, IW;

    Real	UPivot, defDropTol, ICNFactor, IRNFactor;
    int		NSearch, infoLinSystem;

  protected:

    MA28Matrix(int spaceDim);
    virtual ~MA28Matrix() { }

    void MA28Decompose(Real dropTol=0.0);
    void MA28FBSubst(Num* rhs);

    void MA28RemoveLUFactorization();
    void MA28ResizeArrays(Real dropTol);
    void MA28ExtendArrays(int FLAG);

    Real minDiag();

    virtual void fillMA28Vectors() = 0;
    virtual void countEntries(int* N, int* NZ) = 0;

    int MA28MemSpace(int print=0) const;
};

#endif
