/*!\file: elements.h
 * \brief prototypes for elements.h
 */ 

#ifndef _SHARED_ELEMENTS_H_
#define  _SHARED_ELEMENTS_H_

#include "../../objects/objects.h"
#include "../../Container/Container.h"
class ElementMatrix;
class ElementVector;

<<<<<<< .working
double Paterson(double temperature);
double Arrhenius(double temperature,double depth,double n);
double PddSurfaceMassBlance(double* monthlytemperatures,  double* monthlyprec, double* pdds, double* pds, double signorm, double yts, double h, double s, double rho_ice, double rho_water);
void   GetVerticesCoordinates(double* xyz,  Node** nodes, int numvertices);
=======
IssmDouble Paterson(IssmDouble temperature);
IssmDouble Arrhenius(IssmDouble temperature,IssmDouble depth,IssmDouble n);
void   GetVerticesCoordinates(IssmDouble* xyz,  Node** nodes, int numvertices);
>>>>>>> .merge-right.r12703
int    GetNumberOfDofs( Node** nodes,int numnodes,int setenum,int approximation_enum);
int*   GetLocalDofList( Node** nodes,int numnodes,int setenum,int approximation_enum);
int*   GetGlobalDofList(Node** nodes,int numnodes,int setenum,int approximation_enum);
#ifdef _HAVE_DIAGNOSTIC_
void   CoordinateSystemTransform(IssmDouble** ptransform,Node** nodes,int numnodes,int* cs_array);
void   TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum);
void   TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array);
void   TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum);
void   TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array);
void   TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int cs_enum);
void   TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int* cs_array);
void   TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int cs_enum);
void   TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int* cs_array);
#endif

inline void printarray(IssmPDouble* array,int lines,int cols=1){
	_printLine_("");
	for(int i=0;i<lines;i++){  
		_printString_("   [ ");
		for(int j=0;j<cols;j++) _printString_( " " << setw(11) << setprecision (5) << array[i*cols+j]);
		_printLine_(" ]");
	}  
	_printLine_("");
}
inline void printarray(int* array,int lines,int cols=1){
	_printLine_("");
	for(int i=0;i<lines;i++){  
		_printString_("   [ ");
		for(int j=0;j<cols;j++) _printString_( " " << setw(11) << setprecision (5) << array[i*cols+j]);
		_printLine_(" ]");
	}  
	_printLine_("");
}
inline void printbinary(int n) {
	unsigned int i=1L<<(sizeof(n)*8-1);
	while (i>0) {
		if (n&i)
		 _printString_("1");
		else
		 _printString_("0");
		i>>=1;
	}
}

#endif //ifndef _SHARED_ELEMENTS_H_
