[cig-commits] r19587 - long/3D/SNAC/trunk/Snac/plugins/plastic_BI

echoi at geodynamics.org echoi at geodynamics.org
Sat Feb 4 14:21:05 PST 2012


Author: echoi
Date: 2012-02-04 14:21:05 -0800 (Sat, 04 Feb 2012)
New Revision: 19587

Added:
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.c
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.h
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.c
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.h
Modified:
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Constitutive.c
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/ConstructExtensions.c
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Element.h
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/InitialConditions.c
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.c
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.h
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Remesh.c
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Remesh.h
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/make.log
   long/3D/SNAC/trunk/Snac/plugins/plastic_BI/types.h
Log:
Working on the barycentric interpolation for plastic strain.


Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Constitutive.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Constitutive.c	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Constitutive.c	2012-02-04 22:21:05 UTC (rev 19587)
@@ -1,11 +1,13 @@
 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 **
-** Copyright (C), 2003,
+** Copyright (C), 2004,
+**       Pururav Thoutireddy, Center for Advanced Computing Research, Caltech.
 **	Steve Quenette, 110 Victoria Street, Melbourne, Victoria, 3053, Australia.
 **	Californian Institute of Technology, 1200 East California Boulevard, Pasadena, California, 91125, USA.
 **	University of Texas, 1 University Station, Austin, Texas, 78712, USA.
 **
 ** Authors:
+**      Pururav Thoutireddy, Center for Advanced Computing Research, Caltech. ( puru at cacr.caltech.edu)
 **	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
 **	Stevan M. Quenette, Visitor in Geophysics, Caltech.
 **	Luc Lavier, Research Scientist, The University of Texas. (luc at utig.ug.utexas.edu)
@@ -44,7 +46,7 @@
 #ifndef PI
 #ifndef M_PIl
 #ifndef M_PI
-#define PI 3.14159265358979323846
+#define PI 4.0*atan(1.0)
 #else
 #define PI M_PI
 #endif
@@ -53,64 +55,63 @@
 #endif
 #endif
 
-//#define DEBUG
 
 void SnacPlastic_Constitutive( void* _context, Element_LocalIndex element_lI ) {
-	Snac_Context			*context = (Snac_Context*)_context;
-	Snac_Element			*element = Snac_Element_At( context, element_lI );
-	SnacPlastic_Element		*plasticElement = ExtensionManager_Get( context->mesh->elementExtensionMgr, element, SnacPlastic_ElementHandle );
-	const Snac_Material		*material = &context->materialProperty[element->material_I];
+	Snac_Context* context = (Snac_Context*)_context;
+	Snac_Element* element = Snac_Element_At( context, element_lI );
+	SnacPlastic_Element* plasticElement = ExtensionManager_Get( context->mesh->elementExtensionMgr, element, SnacPlastic_ElementHandle );
+	const Snac_Material* material = &context->materialProperty[element->material_I];
 
+	/*ccccc*/
 	MeshLayout*			meshLayout = (MeshLayout*)context->meshLayout;
 	HexaMD*				decomp = (HexaMD*)meshLayout->decomp;
 	IJK				ijk;
 	Element_GlobalIndex		element_gI = _MeshDecomp_Element_LocalToGlobal1D( decomp, element_lI );
+	EntryPoint* 			temperatureEP;
+
 	RegularMeshUtils_Element_1DTo3D( decomp, element_gI, &ijk[0], &ijk[1], &ijk[2] );
+	/*ccccc*/
 
+	temperatureEP = Context_GetEntryPoint( context,	"Snac_EP_LoopElementsEnergy" );
+
+	/* If this is a Plastic material, calculate its stress. */
 	if ( material->rheology & Snac_Material_Plastic ) {
 		Tetrahedra_Index	tetra_I;
-		double			cohesion = 0.0f;
-		double			frictionAngle = 0.0f;
-		double			dilationAngle = 0.0f;
-		double			hardening = 0.0f;
-		double			sphi = 0.0f;
-		double			spsi = 0.0f;
-		double			st = 0.0f;
+
+		/* plastic material properties */
+		StressTensor*		stress;
+		StrainTensor*		strain;
+		Strain		        plasticStrain;
+		double				trace_strain;
+		plModel             yieldcriterion=material->yieldcriterion;
+		/* elasto-plastic material properties */
+		double				cohesion = 0.0f;
+		double				frictionAngle = 0.0f;
+		double				dilationAngle = 0.0f;
+		double				hardening = 0.0f;
+		double				tension_cutoff=0.0;
 		const double		degrad = PI / 180.0f;
-		double			totalVolume=0.0f,depls=0.0f;
+		double				totalVolume=0.0f,depls=0.0f;
 		int principal_stresses(StressTensor* stress,double sp[],double cn[3][3]);
-
-		unsigned int	        i;
-		double                  tmp = 0.0f;
-		double		        anphi = 0.0f;
-		double		        anpsi = 0.0f;
+		unsigned int		i;
+		double				tmp=0.0;
 		const double		a1 = material->lambda + 2.0f * material->mu ;
 		const double		a2 = material->lambda ;
-		int                     ind=0;
+		int					ind=0;
 
-                static char             plasticStrainReportedFlag=0;
+		/*    printf("Entered Plastic update \n"); */
 
-		/* 
-		 *   Work out the plastic material properties of this element 
-		*/
+		/* Work out the plastic material properties of this element */
 		for( tetra_I = 0; tetra_I < Tetrahedra_Count; tetra_I++ ) {
-			double		        cn[3][3] = {{0.0,0.0,0.0},{0.0,0.0,0.0},{0.0,0.0,0.0}};
-			double		        s[3] = {0.0,0.0,0.0};
-			double			alam=0.0f, dep1, dep2, dep3, depm;
-			double			fs,ft,aP,sP,h;
-			unsigned int		k, m, n;
-			double		        trace_strain;
-			StressTensor*		stress = &element->tetra[tetra_I].stress;
-			StrainTensor*		strain = &element->tetra[tetra_I].strain;
-			/*  
-			 *  CPS bug fix:  was set to zero, thus not picking up plastic strain weakening except at t=0
-			 */
-			Strain		        plasticStrain = plasticElement->plasticStrain[tetra_I];
+			double			cn[3][3] = {{0.0,0.0,0.0},{0.0,0.0,0.0},{0.0,0.0,0.0}};
+			double			s[3] = {0.0,0.0,0.0};
+			double			alam, dep1, dep2, dep3, depm;
+			/*ccccc*/
 
+			stress = &element->tetra[tetra_I].stress;
+			strain = &element->tetra[tetra_I].strain;
+			plasticStrain = plasticElement->plasticStrain[tetra_I];
 
-			/* 
-			 *  Compute elastic stress first 
-			 */
 			trace_strain = (*strain)[0][0] + (*strain)[1][1] + (*strain)[2][2];
 
 			(*stress)[0][0] += (2.0f * material->mu) * (*strain)[0][0] + material->lambda * (trace_strain );
@@ -122,14 +123,9 @@
 
 			principal_stresses(stress,s,cn);
 
-			/*
-			 *  Calculate material props (friction angle, cohesion, etc) from piecewise-linear
-			 *    functions defined in terms of plastic strain.
-			 */
-			Journal_DFirewall( (material->plstrain[0]==0.0), context->snacError, "The initial segment should start from the plastic strain of 0.0" );
-			Journal_OFirewall( (material->plstrain[0]==0.0), context->snacError,  __FILE__, __func__, __LINE__,
-							   "timeStep=%u rank=%u: The initial segment should start from the plastic strain of 0.0.",
-							   context->timeStep, context->rank );
+			/* compute friction and dilation angles based on accumulated plastic strain in tetrahedra */
+			/* Piece-wise linear softening */
+			/* Find current properties from linear interpolation */
 			for( i = 0; i < material->nsegments; i++ ) {
 				const double pl1 = material->plstrain[i];
 				const double pl2 = material->plstrain[i+1];
@@ -143,108 +139,114 @@
 					dilationAngle = material->dilationAngle[i] + tgd * (plasticStrain - pl1);
 					cohesion = material->cohesion[i] + tgc * (plasticStrain - pl1);
 					hardening = tgc;
-					break;
-				} else if(i==material->nsegments-1 && plasticStrain > pl2) {
-				    /*
-				     *  CPS mod:  one extra test if pl strain is outside piecewise range, is last piece, and 
-				     *    has pl strain larger than piece  -  then set physical params to maxima for this piece
-				     *  Purpose:  to prevent crazy behavior for extreme plastic strains
-				     */
-				    frictionAngle = material->frictionAngle[material->nsegments];
-				    dilationAngle = material->dilationAngle[material->nsegments];
-				    cohesion = material->cohesion[material->nsegments];
-				    hardening = 0.0;
-					break;
 				}
 			}
 
-			sphi = sin( frictionAngle * degrad );
-			spsi = sin( dilationAngle * degrad );
-			anphi = (1.0f + sphi) / (1.0f - sphi);
-			anpsi = (1.0f + spsi) / (1.0f - spsi);
-			
-			if( frictionAngle >= 0.0f ) {
-				st = material->ten_off;
+			if( frictionAngle > 0.0f ) {
+				tension_cutoff = material->ten_off;
 				if( frictionAngle > 0.0) {
 					tmp = cohesion / tan( frictionAngle * degrad);
-					if(tmp < st)st=tmp;
+					if(tmp < tension_cutoff) tension_cutoff=tmp;
 				}
 			}
 			else {
-				/* frictionAngle < 0.0 violates second law of thermodynamics */
-				abort();
-			}
-			
-			
-			/* CHECK FOR COMPOSITE YIELD CRITERION  */
-			fs = s[0] - s[2] * anphi + 2 * cohesion * sqrt( anphi );
-			ft = s[2] - st;
-                        ind=0;
-			if( fs < 0.0f || ft > 0.0f ) {
-                                if(!plasticStrainReportedFlag) {
-                                        plasticStrainReportedFlag=1;
-                                }
-				/*! Failure: shear or tensile */
-				ind=1;
-				aP = sqrt( 1.0f + anphi * anphi ) + anphi;
-				sP = st * anphi - 2 * cohesion * sqrt( anphi );
-				h = s[2] - st + aP * ( s[0] - sP );
-				
-				if( h < 0.0f ) {
-					/* !shear failure  */
-					alam = fs / ( a1 - a2 * anpsi + a1 * anphi * anpsi - a2 * anphi + 2.0*sqrt(anphi)*hardening );
-					s[0] -= alam * ( a1 - a2 * anpsi );
-					s[1] -= alam * a2 * ( 1.0f - anpsi );
-					s[2] -= alam * ( a2 - a1 * anpsi );
-					dep1 = alam;
-					dep2 = 0.0f;
-					dep3 = -alam * anpsi;
+				if( plasticStrain < 0.0 ) {
+					plasticElement->plasticStrain[tetra_I] = 0.0;
+					plasticStrain = plasticElement->plasticStrain[tetra_I];
+					fprintf(stderr,"Warning: negative plastic strain. Setting to zero, but check if remesher is on and this happended for an external tet. rank:%d elem:%d tet:%d plasticStrain=%e frictionAngle=%e\n",context->rank,element_lI,tetra_I,plasticStrain,frictionAngle);
+					frictionAngle = material->frictionAngle[0];
+					dilationAngle = material->dilationAngle[0];
+					cohesion = material->cohesion[0];
 				}
 				else {
-					/* tensile failure */
-					alam = ft / a1;
-					s[0] -= alam * a2;
-					s[1] -= alam * a2;
-					s[2] -= alam * a1;
-					dep1 = 0.0f;
-					dep2 = 0.0f;
-					dep3 = alam;
+					/* frictionAngle < 0.0 violates second law of thermodynamics */
+					fprintf(stderr,"Error due to an unknown reason: rank:%d elem:%d tet:%d plasticStrain=%e frictionAngle=%e\n",context->rank,element_lI,tetra_I,plasticStrain,frictionAngle);
+					assert(0);
 				}
 			}
-			else {
-				/* ! no failure - just elastic increament */
 
-				dep1 = 0.0f;
-				dep2 = 0.0f;
-				dep3 = 0.0f;
-			}
+			if( yieldcriterion == mohrcoulomb )
+				{
 
-			depm=0.0;
-			if(ind) {
-				/* Second invariant of accumulated plastic increament  */
-				depm = ( dep1 + dep2 + dep3 ) / 3.0f;
-				plasticElement->plasticStrain[tetra_I] += sqrt( 0.5f * ((dep1-depm) * (dep1-depm) + (dep2-depm) * (dep2-depm) + (dep3-depm) * (dep3-depm) + depm*depm) );
+					double sphi = sin( frictionAngle * degrad );
+					double spsi = sin( dilationAngle * degrad );
+					double anphi = (1.0f + sphi) / (1.0f - sphi);
+					double anpsi = (1.0f + spsi) / (1.0f - spsi);
+					double fs = s[0] - s[2] * anphi + 2 * cohesion * sqrt( anphi );
+					double ft = s[2] - tension_cutoff;
+					/* CHECK FOR COMPOSITE YIELD CRITERION  */
+					ind=0;
+					if( fs < 0.0f || ft > 0.0f ) {
+						/*! Failure: shear or tensile */
+						double aP = sqrt( 1.0f + anphi * anphi ) + anphi;
+						double sP = tension_cutoff * anphi - 2 * cohesion * sqrt( anphi );
+						double h = s[2] - tension_cutoff + aP * ( s[0] - sP );
 
-				memset( stress, 0, sizeof((*stress)) );
-				/* Resolve back to global axes  */
-				for( m = 0; m < 3; m++ ) {
-					for( n = m; n < 3; n++ ) {
-						for( k = 0; k < 3; k++ ) {
-							(*stress)[m][n] += cn[k][m] * cn[k][n] * s[k];
+						ind=1;
+
+						if( h < 0.0f ) {
+							/* !shear failure  */
+							alam = fs / ( a1 - a2 * anpsi + a1 * anphi * anpsi - a2 * anphi + 2.0*sqrt(anphi)*hardening );
+							s[0] -= alam * ( a1 - a2 * anpsi );
+							s[1] -= alam * a2 * ( 1.0f - anpsi );
+							s[2] -= alam * ( a2 - a1 * anpsi );
+							dep1 = alam;
+							dep2 = 0.0f;
+							dep3 = -alam * anpsi;
 						}
+						else {
+							/* tensile failure */
+							alam = ft / a1;
+							s[0] -= alam * a2;
+							s[1] -= alam * a2;
+							s[2] -= alam * a1;
+							dep1 = 0.0f;
+							dep2 = 0.0f;
+							dep3 = alam;
+						}
 					}
+					else {
+						/* ! no failure - just elastic increment */
+
+						dep1 = 0.0f;
+						dep2 = 0.0f;
+						dep3 = 0.0f;
+					}
+					if(ind) {
+						unsigned int k,m,n;
+						/* Second invariant of accumulated plastic increment  */
+						depm = ( dep1 + dep2 + dep3 ) / 3.0f;
+						plasticElement->plasticStrain[tetra_I] += sqrt( 0.5f * ((dep1-depm) * (dep1-depm) + (dep2-depm) * (dep2-depm) + (dep3-depm) * (dep3-depm) + depm*depm) );
+
+						/* Stress projection back to euclidean coordinates */
+						memset( stress, 0, sizeof((*stress)) );
+						/* Resolve back to global axes  */
+						for( m = 0; m < 3; m++ ) {
+							for( n = m; n < 3; n++ ) {
+								for( k = 0; k < 3; k++ ) {
+									(*stress)[m][n] += cn[k][m] * cn[k][n] * s[k];
+								}
+							}
+						}
+					}
 				}
-			}
+			else
+				Journal_Firewall( (0>1), "In %s: \"mohrcoulomb\" is the only available yield criterion.\n", __func__ );
+
+			/* linear healing: applied whether this tet has yielded or not. 
+			   Parameters are hardwired for now, but should be given through an input file. */
+			/* plasticElement->plasticStrain[tetra_I] *= (1.0/(1.0+context->dt/1.0e+12)); */
+			/* plasticElement->plasticStrain[tetra_I] *= (1.0/(1.0+context->dt/(ind?1.0e+13:5.0e+11))); */
+
 			depls += plasticElement->plasticStrain[tetra_I]*element->tetra[tetra_I].volume;
 			totalVolume += element->tetra[tetra_I].volume;
-/* 			if(element_lI==738) fprintf(stderr,"   *****  %d: depm=%g  acc plastic strain=%g\n", tetra_I, depm, element->tetra[tetra_I].volume); */
 		}
 		/* volume-averaged accumulated plastic strain, aps */
 		plasticElement->aps = depls/totalVolume;
-/* 		if(element_lI==738) fprintf(stderr,"   *****  acc plastic strain=%g\n", plasticElement->aps); */
 	}
 }
 
+
 int principal_stresses(StressTensor* stress, double sp[3], double cn[3][3])
 {
 
@@ -409,7 +411,7 @@
 }
 
 double **dmatrix(long nrl, long nrh, long ncl, long nch)
-	/* allocate a double matrix with subscript range m[nrl..nrh][ncl..nch] */
+/* allocate a double matrix with subscript range m[nrl..nrh][ncl..nch] */
 {
 	long i, nrow=nrh-nrl+1,ncol=nch-ncl+1;
 	double **m;
@@ -431,7 +433,7 @@
 
 
 void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch)
-	/* free a double matrix allocated by dmatrix() */
+/* free a double matrix allocated by dmatrix() */
 {
 	free((FREE_ARG) (m[nrl]+ncl-NR_END));
 	free((FREE_ARG) (m+nrl-NR_END));
@@ -448,7 +450,7 @@
 
 
 double *dvector(long nl, long nh)
-	/* allocate a double vector with subscript range v[nl..nh] */
+/* allocate a double vector with subscript range v[nl..nh] */
 {
 	double *v;
 	v=(double *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(double)));
@@ -457,7 +459,7 @@
 }
 
 int *ivector(long nl, long nh)
-	/* allocate an int vector with subscript range v[nl..nh] */
+/* allocate an int vector with subscript range v[nl..nh] */
 {
 	int *v;
 	v=(int *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(int)));
@@ -466,13 +468,13 @@
 }
 
 void free_dvector(double *v, long nl, long nh)
-	/* free a double vector allocated with dvector() */
+/* free a double vector allocated with dvector() */
 {
 	free((FREE_ARG) (v+nl-NR_END));
 }
 
 void free_ivector(int *v, long nl, long nh)
-	/* free an int vector allocated with ivector() */
+/* free an int vector allocated with ivector() */
 {
 	free((FREE_ARG) (v+nl-NR_END));
 }

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/ConstructExtensions.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/ConstructExtensions.c	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/ConstructExtensions.c	2012-02-04 22:21:05 UTC (rev 19587)
@@ -43,46 +43,18 @@
 	#define PATH_MAX 1024
 #endif
 
-void _SnacVelocity_VariableCondition( Index node_dI, Variable_Index var_I, void* _context, void* result ){
-	Snac_Context*			context = (Snac_Context*)_context;
-	Mesh*				mesh = context->mesh;
-	MeshLayout*			layout = (MeshLayout*)mesh->layout;
-	HexaMD*				decomp = (HexaMD*)layout->decomp;
-	
-	double*				velComponent = (double*)result;
-	IJK				ijk;
-	Node_GlobalIndex		node_gI = _MeshDecomp_Node_LocalToGlobal1D( decomp, node_dI );
-	Index              oneThird = (unsigned int)((11.0/30.0)*decomp->nodeGlobal3DCounts[0]);
-	Index              twoThirds = (unsigned int)((19.0/30.0)*decomp->nodeGlobal3DCounts[0]);
-
-	const double vmag = 1.4e-06;
-
-	RegularMeshUtils_Node_1DTo3D( decomp, node_gI, &ijk[0], &ijk[1], &ijk[2] );
-	
-	if( ijk[0] < oneThird )
-		(*velComponent) = -1.0*vmag;
-	else if( ijk[0] >= oneThird && ijk[0] <= twoThirds )
-		(*velComponent) =  -1.0*vmag + 2.0*vmag*((double)(ijk[0])-(double)oneThird)/((double)twoThirds-(double)oneThird);
-	else
-		(*velComponent) = vmag;
-}
-
 void _SnacPlastic_ConstructExtensions( void* _context, void* data ) {
 	Snac_Context*				context = (Snac_Context*)_context;
-	SnacPlastic_Context*			contextExt = ExtensionManager_Get(
-							context->extensionMgr,
-							context,
-							SnacPlastic_ContextHandle );
-	char					tmpBuf[PATH_MAX];
+	SnacPlastic_Context*		contextExt = ExtensionManager_Get(
+												context->extensionMgr,
+												context,
+												SnacPlastic_ContextHandle );
+	char						tmpBuf[PATH_MAX];
 
-	#if DEBUG
-		printf( "In %s()\n", __func__ );
-	#endif
+#if DEBUG
+	printf( "In %s()\n", __func__ );
+#endif
 
-		ConditionFunction_Register_Add(
-									   context->condFunc_Register,
-									   ConditionFunction_New( _SnacVelocity_VariableCondition, "variableVelBC" ) );
-
 	/* Prepare the dump and checkpoint file */
 	sprintf( tmpBuf, "%s/plStrain.%u", context->outputPath, context->rank );
 	if( (contextExt->plStrainOut = fopen( tmpBuf, "w+" )) == NULL ) {

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Element.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Element.h	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Element.h	2012-02-04 22:21:05 UTC (rev 19587)
@@ -44,7 +44,7 @@
 	/* Element Information */
 	struct _SnacPlastic_Element {
 		Strain			plasticStrain[Tetrahedra_Count];
-		Strain		        aps;
+		Strain			aps;
 	};
 
 	/* Print the contents of an Element */

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/InitialConditions.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/InitialConditions.c	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/InitialConditions.c	2012-02-04 22:21:05 UTC (rev 19587)
@@ -79,23 +79,25 @@
 			if( material->yieldcriterion == mohrcoulomb ) {
 				Tetrahedra_Index	tetra_I;
 				double              depls = 0.0f;
-				double              totalVolume = 0.0f;
+				/* double              totalVolume = 0.0f; */
 				
 				for( tetra_I = 0; tetra_I < Tetrahedra_Count; tetra_I++ ) {
 					double			tetraPlStrain;
 
 					fscanf( plStrainIn, "%le", &tetraPlStrain );
 					plasticElement->plasticStrain[tetra_I] = tetraPlStrain;
-					depls += plasticElement->plasticStrain[tetra_I]*element->tetra[tetra_I].volume;
-					totalVolume += element->tetra[tetra_I].volume;
+					/* depls += plasticElement->plasticStrain[tetra_I]*element->tetra[tetra_I].volume; */
+					/* totalVolume += element->tetra[tetra_I].volume; */
+					depls += plasticElement->plasticStrain[tetra_I];
 				}
 				/* volume-averaged accumulated plastic strain, aps */
-				plasticElement->aps = depls/totalVolume;
-			}//if(mohrcoulomb)
-		}//for elements
+				/* plasticElement->aps = depls/totalVolume; */
+				plasticElement->aps = depls/Tetrahedra_Count;
+			}/* if(mohrcoulomb) */
+		}/* for elements */
 		if( plStrainIn )
 			fclose( plStrainIn );
-	}//if restarting
+	}/* if restarting */
 	else {
 		/* Set the plastic element initial conditions */
 		for( element_lI = 0; element_lI < context->mesh->elementLocalCount; element_lI++ ) {

Added: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.c	                        (rev 0)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.c	2012-02-04 22:21:05 UTC (rev 19587)
@@ -0,0 +1,52 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003,
+**	Steve Quenette, 110 Victoria Street, Melbourne, Victoria, 3053, Australia.
+**	Californian Institute of Technology, 1200 East California Boulevard, Pasadena, California, 91125, USA.
+**	University of Texas, 1 University Station, Austin, Texas, 78712, USA.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Stevan M. Quenette, Visitor in Geophysics, Caltech.
+**	Luc Lavier, Research Scientist, The University of Texas. (luc at utig.ug.utexas.edu)
+**	Luc Lavier, Research Scientist, Caltech.
+**
+** This program is free software; you can redistribute it and/or modify it
+** under the terms of the GNU General Public License as published by the
+** Free Software Foundation; either version 2, or (at your option) any
+** later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+**
+** $Id: Mesh.c 3095 2005-07-13 09:50:46Z LukeHodkinson $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#include <mpi.h>
+#include <StGermain/StGermain.h>
+#include <StGermain/FD/FD.h>
+
+#include "Snac/Snac.h"
+#include "types.h"
+#include "Mesh.h"
+
+#include <stdio.h>
+
+
+/*
+** Due to the rewrite this func is severely useless.  Need to fix it.
+*/
+
+void SnacPlastic_Mesh_Print( void* mesh, Stream* stream ) {
+	SnacPlastic_Mesh*	self = (SnacPlastic_Mesh*)mesh;
+
+	Journal_Printf( stream, "SnacPlastic_Mesh:\n" );
+
+}

Added: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.h	                        (rev 0)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.h	2012-02-04 22:21:05 UTC (rev 19587)
@@ -0,0 +1,55 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003,
+**	Steve Quenette, 110 Victoria Street, Melbourne, Victoria, 3053, Australia.
+**	Californian Institute of Technology, 1200 East California Boulevard, Pasadena, California, 91125, USA.
+**	University of Texas, 1 University Station, Austin, Texas, 78712, USA.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Stevan M. Quenette, Visitor in Geophysics, Caltech.
+**	Luc Lavier, Research Scientist, The University of Texas. (luc at utig.ug.utexas.edu)
+**	Luc Lavier, Research Scientist, Caltech.
+**
+** This program is free software; you can redistribute it and/or modify it
+** under the terms of the GNU General Public License as published by the
+** Free Software Foundation; either version 2, or (at your option) any
+** later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+**
+*/
+/** \file
+** Role:
+**	Snac exchanger properties extensions to the mesh construct.
+**
+** Assumptions:
+**
+** Comments:
+**
+** $Id: Mesh.h 3173 2005-11-21 23:47:09Z LukeHodkinson $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#ifndef __SnacPlastic_Mesh_h__
+#define __SnacPlastic_Mesh_h__
+
+
+	/* Mesh Information */
+	struct _SnacPlastic_Mesh {
+		Snac_Node*	newNodes;
+	};
+	
+	/* Print the contents of a mesh */
+	void SnacPlastic_Mesh_Print( void* mesh, Stream* stream );
+	
+
+#endif /* __SnacPlastic_Mesh_h__ */
+

Added: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.c	                        (rev 0)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.c	2012-02-04 22:21:05 UTC (rev 19587)
@@ -0,0 +1,46 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003, 
+**	Steve Quenette, 110 Victoria Street, Melbourne, Victoria, 3053, Australia.
+**	Californian Institute of Technology, 1200 East California Boulevard, Pasadena, California, 91125, USA.
+**	University of Texas, 1 University Station, Austin, Texas, 78712, USA.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Stevan M. Quenette, Visitor in Geophysics, Caltech.
+**	Luc Lavier, Research Scientist, The University of Texas. (luc at utig.ug.utexas.edu)
+**	Luc Lavier, Research Scientist, Caltech.
+**
+** This program is free software; you can redistribute it and/or modify it
+** under the terms of the GNU General Public License as published by the
+** Free Software Foundation; either version 2, or (at your option) any
+** later version.
+** 
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+** 
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+**
+** $Id: Node.c 1792 2004-07-30 05:42:39Z SteveQuenette $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#include <mpi.h>
+#include <StGermain/StGermain.h>
+#include <StGermain/FD/FD.h>
+#include "Snac/Snac.h"
+#include "types.h"
+#include "Node.h"
+#include <stdio.h>
+
+void SnacPlastic_Node_Print( void* node ) {
+	SnacPlastic_Node*	self = (SnacPlastic_Node*)node;
+	
+	printf( "SnacPlastic_Node:\n" );
+	printf( "\tplasticStrainSPR: " );
+	printf( "%g, ", self->plStrainSPR );
+}

Added: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.h	                        (rev 0)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.h	2012-02-04 22:21:05 UTC (rev 19587)
@@ -0,0 +1,52 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+**
+** Copyright (C), 2003,
+**	Steve Quenette, 110 Victoria Street, Melbourne, Victoria, 3053, Australia.
+**	Californian Institute of Technology, 1200 East California Boulevard, Pasadena, California, 91125, USA.
+**	University of Texas, 1 University Station, Austin, Texas, 78712, USA.
+**
+** Authors:
+**	Stevan M. Quenette, Senior Software Engineer, VPAC. (steve at vpac.org)
+**	Stevan M. Quenette, Visitor in Geophysics, Caltech.
+**	Luc Lavier, Research Scientist, The University of Texas. (luc at utig.ug.utexas.edu)
+**	Luc Lavier, Research Scientist, Caltech.
+**
+** This program is free software; you can redistribute it and/or modify it
+** under the terms of the GNU General Public License as published by the
+** Free Software Foundation; either version 2, or (at your option) any
+** later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+**
+*/
+/** \file
+** Role:
+**	Snac plastic properties for an element.
+**
+** Assumptions:
+**
+** Comments:
+**
+** $Id: Node.h 1720 2004-07-22 18:33:41Z EunseoChoi $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#ifndef __SnacPlastic_Node_h__
+#define __SnacPlastic_Node_h__
+
+	/* Node Information */
+	struct _SnacPlastic_Node {
+		Strain			plStrainSPR;
+	};
+
+	/* Print the contents of an Node */
+	void SnacPlastic_Node_Print( void* element );
+
+#endif /* __SnacPlastic_Node_h__ */

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.c	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.c	2012-02-04 22:21:05 UTC (rev 19587)
@@ -34,7 +34,9 @@
 #include <StGermain/FD/FD.h>
 #include "Snac/Snac.h"
 #include "types.h"
+#include "Node.h"
 #include "Element.h"
+#include "Mesh.h"
 #include "Context.h"
 #include "Constitutive.h"
 #include "ConstructExtensions.h"
@@ -47,7 +49,9 @@
 /* Textual name of this class */
 const Type SnacPlastic_Type = "SnacPlastic";
 
+ExtensionInfo_Index SnacPlastic_NodeHandle;
 ExtensionInfo_Index SnacPlastic_ElementHandle;
+ExtensionInfo_Index SnacPlastic_MeshHandle;
 ExtensionInfo_Index SnacPlastic_ContextHandle;
 
 
@@ -87,11 +91,15 @@
 	#endif
 	
 	/* Add extensions to nodes, elements and the context */
+	SnacPlastic_NodeHandle = ExtensionManager_Add( context->mesh->nodeExtensionMgr, SnacPlastic_Type, sizeof(SnacPlastic_Node) );
 	SnacPlastic_ElementHandle = ExtensionManager_Add( context->mesh->elementExtensionMgr, SnacPlastic_Type, sizeof(SnacPlastic_Element) );
+	SnacPlastic_MeshHandle = ExtensionManager_Add( context->meshExtensionMgr, SnacPlastic_Type, sizeof(SnacPlastic_Mesh) );
 	SnacPlastic_ContextHandle = ExtensionManager_Add( context->extensionMgr, SnacPlastic_Type, sizeof(SnacPlastic_Context) );
 	
 	#ifdef DEBUG
 		printf( "\tcontext extension handle: %u\n", SnacPlastic_ContextHandle );
+		printf( "\tmesh extension handle: %u\n", SnacPlastic_MeshHandle );
+		printf( "\tnode extension handle: %u\n", SnacPlastic_NodeHandle );
 		printf( "\telement extension handle: %u\n", SnacPlastic_ElementHandle );
 	#endif
 	
@@ -122,13 +130,12 @@
 	interpolateElementEP = Context_GetEntryPoint( context,	"SnacRemesher_EP_InterpolateElement" );
 	if( interpolateElementEP ) {
 		EntryPoint_Append( 
-			interpolateElementEP,
-			SnacPlastic_Type, 
-			_SnacPlastic_InterpolateElement, 
-			SnacPlastic_Type );
+						  interpolateElementEP,
+						  SnacPlastic_Type, 
+						  _SnacPlastic_InterpolateElement, 
+						  SnacPlastic_Type );
 	}
 
-
 	/* Construct. */
 	_SnacPlastic_ConstructExtensions( context, data );
 }

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.h	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.h	2012-02-04 22:21:05 UTC (rev 19587)
@@ -44,8 +44,12 @@
 	/* Textual name of this class */
 	extern const Type SnacPlastic_Type;
 	
+	extern ExtensionInfo_Index SnacPlastic_NodeHandle;
+	
 	extern ExtensionInfo_Index SnacPlastic_ElementHandle;
 	
+	extern ExtensionInfo_Index SnacPlastic_MeshHandle;
+	
 	extern ExtensionInfo_Index SnacPlastic_ContextHandle;
 	
 	Index _SnacPlastic_Register( PluginsManager* pluginsMgr );

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Remesh.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Remesh.c	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Remesh.c	2012-02-04 22:21:05 UTC (rev 19587)
@@ -42,34 +42,34 @@
 #include "Remesh.h"
 #include "Register.h"
 
-void _SnacPlastic_InterpolateElement( void*				 	_context, 
-									  Element_LocalIndex 	dstEltInd, 
-									  Tetrahedra_Index	 	dstTetInd, 
-									  Snac_Element*	 		dstElements, 
-									  Element_DomainIndex 	srcEltInd, 
-									  Tetrahedra_Index		 srcTetInd )
+void _SnacPlastic_InterpolateElement(  void*				 	_context, 
+									   Element_LocalIndex	 	dstEltInd, 
+									   Tetrahedra_Index	 	dstTetInd, 
+									   Snac_Element*	 		dstElements, 
+									   Element_DomainIndex 	srcEltInd, 
+									   Tetrahedra_Index		srcTetInd )
 {
-	Snac_Context* 			context = (Snac_Context*)_context;
-	Mesh*					mesh = context->mesh;
-	SnacRemesher_Mesh*		meshExt = ExtensionManager_Get( context->meshExtensionMgr,
+	Snac_Context* 				context = (Snac_Context*)_context;
+	Mesh*						mesh = context->mesh;
+	SnacRemesher_Mesh*			meshExt = ExtensionManager_Get( context->meshExtensionMgr,
 															mesh, 
 															SnacRemesher_MeshHandle );
-	HexaMD*					decomp = (HexaMD*)mesh->layout->decomp;
-	Snac_Element*			element = (Snac_Element*)ExtensionManager_At( context->mesh->elementExtensionMgr, 
+	HexaMD*						decomp = (HexaMD*)mesh->layout->decomp;
+	Snac_Element*				element = (Snac_Element*)ExtensionManager_At( context->mesh->elementExtensionMgr, 
 										      dstElements, 
 										      dstEltInd );
 	SnacPlastic_Element*	elementExt = ExtensionManager_Get( context->mesh->elementExtensionMgr, 
 									   element, 
 									   SnacPlastic_ElementHandle );
-	Element_DomainIndex 	eltdI[8],eldI,eldJ,eldK;
-	Index 					coef_I;
-	Element_DomainIndex		neldI =  decomp->elementDomain3DCounts[0];
-	Element_DomainIndex		neldJ =  decomp->elementDomain3DCounts[1];
+	Element_DomainIndex 		eltdI[8],eldI,eldJ,eldK;
+	Index 						coef_I;
+	Element_DomainIndex			neldI =  decomp->elementDomain3DCounts[0];
+	Element_DomainIndex			neldJ =  decomp->elementDomain3DCounts[1];
 
 #ifdef DEBUG
-	printf( "element_lI: %u, fromElement_lI: %u\n", dstEltInd, srcEltInd );
+	printf( "element_lI: %u, fromElement_lI: %u\n", dstElementInd, srcElementInd );
 #endif
-	
+
 	/* Decompose srcEltInd into ijk indexes. */
 	eldI = (srcEltInd % neldI);
 	eldJ = (((srcEltInd-eldI)/neldI) % neldJ);
@@ -85,19 +85,19 @@
 	eltdI[6] = (eldI+1) + (eldJ+1)*neldI + (eldK+1)*neldI*neldJ;
 	eltdI[7] = eldI     + (eldJ+1)*neldI + (eldK+1)*neldI*neldJ;
 
+#if 0
 	elementExt->plasticStrain[dstTetInd] = 0.0;
 	for(coef_I=0;coef_I<4;coef_I++) {
-		/* The actual src elements are the apexes of the tet in the old barycenter grid. */
-		Snac_Element*			srcElt = (Snac_Element*)ExtensionManager_At( context->mesh->elementExtensionMgr, 
-												dstElements, 
-												meshExt->orderedToDomain[eltdI[TetraToNode[srcTetInd][coef_I]]] );
-		SnacPlastic_Element*	srcEltExt = ExtensionManager_Get( context->mesh->elementExtensionMgr, 
-																  srcElt, 
-																  SnacPlastic_ElementHandle );
+		/* The actual src elements are the four apexes of a tet (srcTetInd) in the old barycenter grid. */
+		Snac_Element* 			srcElt = Snac_Element_At( context, 
+														  meshExt->orderedToDomain[eltdI[TetraToNode[srcTetInd][coef_I]]] );
+		SnacPlastic_Element*	srcEltExt = ExtensionManager_Get(
+													context->mesh->elementExtensionMgr,
+													srcElt,
+													SnacPlastic_ElementHandle );
+		/* Weights are associated only with destination element but not on the tet level. 
+		   So, "dstTetInd" is used in both source and destination terms. */
 		elementExt->plasticStrain[dstTetInd] += meshExt->barcord[dstEltInd].L[coef_I]*srcEltExt->plasticStrain[dstTetInd];
 	}
-	/* if( (context->rank==1 && (dstElementInd <=7 && dstElementInd >= 6) ) ) //(context->rank==2 && dstElementInd <=2 ) */
-	/* 	fprintf(stderr, "element_lI: (%u %u %e), fromElement_lI: (%u %u %e)\n",  */
-	/* 			dstElementInd, dstTetInd, elementExt->plasticStrain[dstTetInd], */
-	/* 			srcElementInd, srcTetInd, fromElementExt->plasticStrain[srcTetInd] ); */
+#endif
 }

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Remesh.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Remesh.h	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Remesh.h	2012-02-04 22:21:05 UTC (rev 19587)
@@ -39,11 +39,12 @@
 
 #ifndef __SnacPlastic_Remesh_h__
 #define __SnacPlastic_Remesh_h__
-	void _SnacPlastic_InterpolateElement( void*				 	_context, 
-										  Element_LocalIndex 	dstEltInd, 
-										  Tetrahedra_Index	 	dstTetInd, 
-										  Snac_Element*	 		dstElements, 
-										  Element_DomainIndex 	srcEltInd, 
-										  Tetrahedra_Index		 srcTetInd );
 	
+void _SnacPlastic_InterpolateElement(  void*				_context, 
+									   Element_LocalIndex 	dstEltInd, 
+									   Tetrahedra_Index	 	dstTetInd, 
+									   Snac_Element*	 	dstElements, 
+									   Element_DomainIndex 	srcEltInd, 
+									   Tetrahedra_Index		srcTetInd );
+	
 #endif /* __SnacPlastic_Remesh_h__ */

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/make.log
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/make.log	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/make.log	2012-02-04 22:21:05 UTC (rev 19587)
@@ -1,5 +1,21 @@
 make[1]: Entering directory `/home/echoi/opt/SNAC_realclean/Snac/plugins/plastic_BI'
-/usr/bin/cc -pipe  -DVERSION=\"0\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -fPIC -c -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Remesh.o -I/home/echoi/opt/SNAC_realclean/build/include   -I/home/echoi/opt/SNAC_realclean/build/include/StGermain -I/home/echoi/opt/SNAC_realclean/build/include   -I/usr/lib/openmpi/include   -I/usr/include/libxml2     -I/usr/local/include -DHAVE_GSL=1    Remesh.c
-/usr/bin/cc -pipe  -DVERSION=\"0\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/SnacPlasticmodule.so /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Element.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Context.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/ConstructExtensions.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Constitutive.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Output.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Register.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/InitialConditions.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Remesh.o  -shared  -L/home/echoi/opt/SNAC_realclean/build/lib   -L/home/echoi/opt/SNAC_realclean/build/lib  -lSnac -lStGermain   -L/usr/lib/openmpi/lib -lmpi   -lxml2   -lm   -L/usr/local/lib -lgsl -lgslcblas   -Xlinker -rpath -Xlinker /usr/lib/openmpi/lib         -Xlinker -rpath -Xlinker /usr/local/lib   
+/usr/bin/cc -pipe  -DVERSION=\"19197\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -fPIC -c -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Element.o -I/home/echoi/opt/SNAC_realclean/build/include   -I/home/echoi/opt/SNAC_realclean/build/include/StGermain -I/home/echoi/opt/SNAC_realclean/build/include   -I/usr/lib/openmpi/include   -I/usr/include/libxml2     -I/usr/local/include -DHAVE_GSL=1    Element.c
+/usr/bin/cc -pipe  -DVERSION=\"19197\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -fPIC -c -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Context.o -I/home/echoi/opt/SNAC_realclean/build/include   -I/home/echoi/opt/SNAC_realclean/build/include/StGermain -I/home/echoi/opt/SNAC_realclean/build/include   -I/usr/lib/openmpi/include   -I/usr/include/libxml2     -I/usr/local/include -DHAVE_GSL=1    Context.c
+/usr/bin/cc -pipe  -DVERSION=\"19197\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -fPIC -c -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/ConstructExtensions.o -I/home/echoi/opt/SNAC_realclean/build/include   -I/home/echoi/opt/SNAC_realclean/build/include/StGermain -I/home/echoi/opt/SNAC_realclean/build/include   -I/usr/lib/openmpi/include   -I/usr/include/libxml2     -I/usr/local/include -DHAVE_GSL=1    ConstructExtensions.c
+/usr/bin/cc -pipe  -DVERSION=\"19197\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -fPIC -c -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Constitutive.o -I/home/echoi/opt/SNAC_realclean/build/include   -I/home/echoi/opt/SNAC_realclean/build/include/StGermain -I/home/echoi/opt/SNAC_realclean/build/include   -I/usr/lib/openmpi/include   -I/usr/include/libxml2     -I/usr/local/include -DHAVE_GSL=1    Constitutive.c
+Constitutive.c: In function ‘SnacPlastic_Constitutive’:
+Constitutive.c:234:5: warning: passing argument 3 of ‘Journal_Firewall’ discards ‘const’ qualifier from pointer target type [enabled by default]
+/home/echoi/opt/SNAC_realclean/build/include/StGermain/Base/IO/Journal.h:226:6: note: expected ‘char *’ but argument is of type ‘const char *’
+Constitutive.c:70:17: warning: variable ‘temperatureEP’ set but not used [-Wunused-but-set-variable]
+/usr/bin/cc -pipe  -DVERSION=\"19197\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -fPIC -c -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Output.o -I/home/echoi/opt/SNAC_realclean/build/include   -I/home/echoi/opt/SNAC_realclean/build/include/StGermain -I/home/echoi/opt/SNAC_realclean/build/include   -I/usr/lib/openmpi/include   -I/usr/include/libxml2     -I/usr/local/include -DHAVE_GSL=1    Output.c
+/usr/bin/cc -pipe  -DVERSION=\"19197\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -fPIC -c -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Register.o -I/home/echoi/opt/SNAC_realclean/build/include   -I/home/echoi/opt/SNAC_realclean/build/include/StGermain -I/home/echoi/opt/SNAC_realclean/build/include   -I/usr/lib/openmpi/include   -I/usr/include/libxml2     -I/usr/local/include -DHAVE_GSL=1    Register.c
+/usr/bin/cc -pipe  -DVERSION=\"19197\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -fPIC -c -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/InitialConditions.o -I/home/echoi/opt/SNAC_realclean/build/include   -I/home/echoi/opt/SNAC_realclean/build/include/StGermain -I/home/echoi/opt/SNAC_realclean/build/include   -I/usr/lib/openmpi/include   -I/usr/include/libxml2     -I/usr/local/include -DHAVE_GSL=1    InitialConditions.c
+/usr/bin/cc -pipe  -DVERSION=\"19197\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -fPIC -c -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Remesh.o -I/home/echoi/opt/SNAC_realclean/build/include   -I/home/echoi/opt/SNAC_realclean/build/include/StGermain -I/home/echoi/opt/SNAC_realclean/build/include   -I/usr/lib/openmpi/include   -I/usr/include/libxml2     -I/usr/local/include -DHAVE_GSL=1    Remesh.c
+Remesh.c: In function ‘_SnacPlastic_InterpolateElement’:
+Remesh.c:65:14: warning: unused variable ‘coef_I’ [-Wunused-variable]
+Remesh.c:64:24: warning: variable ‘eltdI’ set but not used [-Wunused-but-set-variable]
+Remesh.c:61:23: warning: unused variable ‘elementExt’ [-Wunused-variable]
+Remesh.c:54:23: warning: unused variable ‘meshExt’ [-Wunused-variable]
+/usr/bin/cc -pipe  -DVERSION=\"19197\" -DCURR_MODULE_NAME=\"SnacPlastic\" -DPLUGIN_NAME=SnacPlastic -Wall -g   -o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/SnacPlasticmodule.so /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Element.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Context.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/ConstructExtensions.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Constitutive.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Output.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Register.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/InitialConditions.o /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/Remesh.o  -shared  -L/home/echoi/opt/SNAC_realclean/build/lib   -L/home/echoi/opt/SNAC_realclean/build/lib  -lSnac -lStGermain   -L/usr/lib/openmpi/lib -lmpi   -lxml2   -lm   -L/usr/local/lib -lgsl -lgslcblas   -Xlinker -rpath -Xlinker /usr/lib/openmpi/lib         -Xlinker -rpath -Xlinker /usr/local/lib   
 /bin/cp -f /home/echoi/opt/SNAC_realclean/build/tmp/mod-SnacPlasticmodule.so/SnacPlasticmodule.so /home/echoi/opt/SNAC_realclean/build/lib/SnacPlasticmodule.so
 make[1]: Leaving directory `/home/echoi/opt/SNAC_realclean/Snac/plugins/plastic_BI'

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/types.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/types.h	2012-02-03 14:39:54 UTC (rev 19586)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/types.h	2012-02-04 22:21:05 UTC (rev 19587)
@@ -44,7 +44,9 @@
 #define __SnacPlastic_types_h__
 	
 	/* Plastic */
+	typedef struct _SnacPlastic_Node	SnacPlastic_Node;
 	typedef struct _SnacPlastic_Element	SnacPlastic_Element;
+	typedef struct _SnacPlastic_Mesh	SnacPlastic_Mesh;
 	typedef struct _SnacPlastic_Context	SnacPlastic_Context;
 	
 #endif /* __SnacPlastic_types_h__ */



More information about the CIG-COMMITS mailing list