/*!\file:  SeqMat.h
 * \brief wrapper to SeqMat objects, which are just wrappers to a simple IssmDouble* buffer.
 */ 

#ifndef _SEQMAT_H_
#define _SEQMAT_H_

/*Headers:*/
/*{{{*/
#ifdef HAVE_CONFIG_H
	#include <config.h>
#else
#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
#endif

#include "../toolkitsenums.h"

/*}}}*/
class SeqVec;

class SeqMat{

	public:
	
		int M,N; 
		IssmDouble* matrix; 

		/*SeqMat constructors, destructors {{{*/
		SeqMat();
		SeqMat(int M,int N);
		SeqMat(int M,int N,IssmDouble sparsity);
		SeqMat(IssmDouble* serial_mat,int M,int N,IssmDouble sparsity);
		SeqMat(int M,int N,int connectivity,int numberofdofspernode);
		~SeqMat();
		/*}}}*/
		/*SeqMat specific routines {{{*/
		void Echo(void);
		void Assemble(void);
		IssmDouble Norm(NormMode norm_type);
		void GetSize(int* pM,int* pN);
		void GetLocalSize(int* pM,int* pN);
		void MatMult(SeqVec* X,SeqVec* AX);
		SeqMat* Duplicate(void);
		IssmDouble* ToSerial(void);
		void SetValues(int m,int* idxm,int n,int* idxn,IssmDouble* values,InsMode mode);
		void Convert(MatrixType type);
		/*}}}*/

};
		
#endif //#ifndef _SEQMAT_H_
