/*!\file Matpar.h
 * \brief: header file for matpar object
 */

#ifndef _MATPAR_H_
#define _MATPAR_H_

/*Headers:*/
/*{{{1*/
#include "./Material.h"
class IoModel;
/*}}}*/

class Matpar: public Material{

	private: 
		int	mid;
		double	rho_ice; 
		double	rho_water;
		double  mu_water;
		double  heatcapacity;
		double  thermalconductivity;
		double  latentheat;
		double  beta;
		double  meltingpoint;
		double  referencetemperature;
		double  mixed_layer_capacity;
		double  thermal_exchange_velocity;
		double  g;

		/*hydrology: */		 
		double  kn;			 
		double  hydro_p;		 
		double  hydro_q;		 
		double  hydro_CR;			 
		double  hydro_n; 

	public:
		Matpar();
		Matpar(int matpar_id, IoModel* iomodel);
		~Matpar();

		/*Object virtual functions definitions:{{{1 */
		void  Echo();
		void  DeepEcho();
		int   Id(); 
		int   MyRank();
		int   ObjectEnum();
		Object* copy();
		/*}}}*/
		/*Update virtual functions resolution: {{{1*/
		void   InputUpdateFromVector(double* vector, int name, int type);
		void   InputUpdateFromVector(int* vector, int name, int type);
		void   InputUpdateFromVector(bool* vector, int name, int type);
		void   InputUpdateFromMatrixDakota(double* matrix,int nrows,int ncols, int name, int type);
		void   InputUpdateFromVectorDakota(double* vector, int name, int type);
		void   InputUpdateFromVectorDakota(int* vector, int name, int type);
		void   InputUpdateFromVectorDakota(bool* vector, int name, int type);
		void   InputUpdateFromConstant(double constant, int name);
		void   InputUpdateFromConstant(int constant, int name);
		void   InputUpdateFromConstant(bool constant, int name);
		void   InputUpdateFromSolution(double* solution);
		void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
		/*}}}*/
		/*Material virtual functions resolution: {{{1*/
		void   InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");};
		void   Configure(Elements* elements);
		void   GetVectorFromInputs(Vector* vector,int input_enum){return;}
		/*}}}*/
		/*Numerics: {{{1*/
		double GetG();
		double GetRhoIce();
		double GetRhoWater();
		double GetMuWater();
		double GetMixedLayerCapacity();
		double GetThermalExchangeVelocity();
		double GetHeatCapacity();
		double GetThermalConductivity();
		double GetLatentHeat();
		double GetBeta();
		double GetMeltingPoint();
		double GetReferenceTemperature();
		double GetKn();
		double GetHydrologyP();
		double GetHydrologyQ();
		double GetHydrologyCR();
		double GetHydrologyN();
		double TMeltingPoint(double pressure);
		double PureIceEnthalpy(double pressure);
		double GetEnthalpyDiffusionParameter(double enthalpy,double pressure);
		void   EnthalpyToThermal(double* ptemperature,double* pwaterfraction,double enthalpy,double pressure);
		void   ThermalToEnthalpy(double* penthalpy,double temperature,double waterfraction,double pressure);
		/*}}}*/

};

#endif  /* _MATPAR_H_ */
