Index: /issm/trunk/src/c/ComputePressurex/ComputePressurex.cpp
===================================================================
--- /issm/trunk/src/c/ComputePressurex/ComputePressurex.cpp	(revision 303)
+++ /issm/trunk/src/c/ComputePressurex/ComputePressurex.cpp	(revision 303)
@@ -0,0 +1,40 @@
+/*!\file ComputePressurex
+ * \brief: compute pressure according to each element
+ */
+
+#include "./ComputePressurex.h"
+
+#undef __FUNCT__ 
+#define __FUNCT__ "ComputePressurex"
+
+#include "../shared/shared.h"
+#include "../include/macros.h"
+#include "../toolkits/toolkits.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+void	ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes,DataSet* loads, DataSet* materials, int numberofnodes){
+
+	int i;
+
+	int  found=0;
+
+	/*output: */
+	Vec p_g=NULL;
+
+	/*Allocate p_g on numberofnodes (only 1 dof): */
+	p_g=NewVec(numberofnodes);
+
+	/*Get elements configured: */
+	elements->Configure(elements,loads, nodes, materials);
+
+	/*Call on dataset driver: */
+	elements->ComputePressure(p_g);
+
+	/*Assemble vector: */
+	VecAssemblyBegin(p_g);
+	VecAssemblyEnd(p_g);
+
+	/*Assign output pointers: */
+	*pp_g=p_g;
+	
+}
Index: /issm/trunk/src/c/ComputePressurex/ComputePressurex.h
===================================================================
--- /issm/trunk/src/c/ComputePressurex/ComputePressurex.h	(revision 303)
+++ /issm/trunk/src/c/ComputePressurex/ComputePressurex.h	(revision 303)
@@ -0,0 +1,14 @@
+/*!\file:  ComputePressurex.h
+ * \brief header file pressure computation
+ */ 
+
+#ifndef _COMPUTEPRESSUREX_H
+#define _COMPUTEPRESSUREX_H
+
+#include "../DataSet/DataSet.h"
+
+/* local prototypes: */
+void	ComputePressurex( Vec* pp_g,DataSet* elements,DataSet* nodes,DataSet* loads, DataSet* materials, int numberofnodes);
+
+#endif  /* _COMPUTEPRESSUREX_H */
+
Index: /issm/trunk/src/mex/ComputePressure/ComputePressure.cpp
===================================================================
--- /issm/trunk/src/mex/ComputePressure/ComputePressure.cpp	(revision 303)
+++ /issm/trunk/src/mex/ComputePressure/ComputePressure.cpp	(revision 303)
@@ -0,0 +1,56 @@
+/*\file ComputePressure.c
+ *\brief: recover pressure from elements
+ */
+
+#include "./ComputePressure.h"
+
+void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+
+	/*diverse: */
+	int   noerr=1;
+
+	/*input datasets: */
+	DataSet* elements=NULL;
+	DataSet* nodes=NULL;
+	DataSet* loads=NULL;
+	DataSet* materials=NULL;
+	int      numberofnodes;
+
+	/* output datasets: */
+	Vec p_g=NULL;
+
+	/*Boot module: */
+	MODULEBOOT();
+
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ComputePressureUsage);
+        
+	/*Input datasets: */
+	FetchData((void**)&elements,NULL,NULL,ELEMENTS,"DataSet",NULL);
+	FetchData((void**)&nodes,NULL,NULL,NODES,"DataSet",NULL);
+	FetchData((void**)&loads,NULL,NULL,LOADS,"DataSet",NULL);
+	FetchData((void**)&materials,NULL,NULL,MATERIALS,"DataSet",NULL);
+	FetchData((void**)&numberofnodes,NULL,NULL,mxGetField(PARAMS,0,"numberofnodes"),"Integer",NULL);
+
+	/*!Generate internal degree of freedom numbers: */
+	ComputePressurex(&p_g, elements,nodes,loads,materials,numberofnodes);
+
+	/*write output datasets: */
+	WriteData(PRESSURE,p_g,0,0,"Vector",NULL);
+
+	/*Free ressources: */
+	delete nodes;
+	delete elements;
+	delete materials;
+	delete loads;
+	VecFree(&p_g);
+
+	/*end module: */
+	MODULEEND();
+}
+
+void ComputePressureUsage(void) {
+	_printf_("\n");
+	_printf_("   usage: [p_g] = %s(elements, nodes, loads, materials, params);\n",__FUNCT__);
+	_printf_("\n");
+}
Index: /issm/trunk/src/mex/ComputePressure/ComputePressure.h
===================================================================
--- /issm/trunk/src/mex/ComputePressure/ComputePressure.h	(revision 303)
+++ /issm/trunk/src/mex/ComputePressure/ComputePressure.h	(revision 303)
@@ -0,0 +1,36 @@
+
+/*
+	ComputePressure.h
+*/
+
+
+#ifndef _COMPUTEPRESSURE_H
+#define _COMPUTEPRESSURE_H
+
+/* local prototypes: */
+void ComputePressureUsage(void);
+
+#include "../../c/issm.h"
+
+#undef __FUNCT__ 
+#define __FUNCT__  "ComputePressure"
+
+/* serial input macros: */
+#define ELEMENTS (mxArray*)prhs[0]
+#define NODES (mxArray*)prhs[1]
+#define LOADS (mxArray*)prhs[2]
+#define MATERIALS (mxArray*)prhs[3]
+#define PARAMS (mxArray*)prhs[4]
+
+/* serial output macros: */
+#define PRESSURE (mxArray**)&plhs[0]
+
+/* serial arg counts: */
+#undef NLHS
+#define NLHS  1
+#undef NRHS
+#define NRHS  5
+
+
+#endif  /* _COMPUTEPRESSURE_H */
+
