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

echoi at geodynamics.org echoi at geodynamics.org
Tue Jul 24 14:46:29 PDT 2012


Author: echoi
Date: 2012-07-24 14:46:28 -0700 (Tue, 24 Jul 2012)
New Revision: 20539

Removed:
   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/Plastic.h
   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
Log:
Cleaned up legacies from the SPR version.



Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Constitutive.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Constitutive.c	2012-07-24 19:54:30 UTC (rev 20538)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Constitutive.c	2012-07-24 21:46:28 UTC (rev 20539)
@@ -57,23 +57,13 @@
 
 
 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;
+	EntryPoint*				temperatureEP = Context_GetEntryPoint( context,	"Snac_EP_LoopElementsEnergy" );
 
-	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;

Deleted: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.c	2012-07-24 19:54:30 UTC (rev 20538)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.c	2012-07-24 21:46:28 UTC (rev 20539)
@@ -1,52 +0,0 @@
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-**
-** 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" );
-
-}

Deleted: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.h	2012-07-24 19:54:30 UTC (rev 20538)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Mesh.h	2012-07-24 21:46:28 UTC (rev 20539)
@@ -1,55 +0,0 @@
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-**
-** 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__ */
-

Deleted: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.c	2012-07-24 19:54:30 UTC (rev 20538)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.c	2012-07-24 21:46:28 UTC (rev 20539)
@@ -1,46 +0,0 @@
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-**
-** 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 );
-}

Deleted: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.h	2012-07-24 19:54:30 UTC (rev 20538)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Node.h	2012-07-24 21:46:28 UTC (rev 20539)
@@ -1,52 +0,0 @@
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-**
-** 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/Plastic.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Plastic.h	2012-07-24 19:54:30 UTC (rev 20538)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Plastic.h	2012-07-24 21:46:28 UTC (rev 20539)
@@ -41,13 +41,13 @@
 #ifndef __SnacPlastic_h__
 #define __SnacPlastic_h__
 	
+#include "Plastic.h"
 #include "Constitutive.h"
 #include "ConstructExtensions.h"
 #include "Context.h"
 #include "Element.h"
 #include "InitialConditions.h"
 #include "Output.h"
-#include "Plastic.h"
 #include "Register.h" 
 /* #include "Remesh.h" */
 #include "types.h"

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.c	2012-07-24 19:54:30 UTC (rev 20538)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.c	2012-07-24 21:46:28 UTC (rev 20539)
@@ -35,9 +35,7 @@
 #include "Snac/Snac.h"
 #include "Snac/Remesher/Remesher.h"
 #include "types.h"
-#include "Node.h"
 #include "Element.h"
-#include "Mesh.h"
 #include "Context.h"
 #include "Constitutive.h"
 #include "ConstructExtensions.h"
@@ -50,12 +48,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;
 
-
 Index _SnacPlastic_Register( PluginsManager* pluginsMgr ) {
 	return PluginsManager_Submit( pluginsMgr, 
 				      SnacPlastic_Type, 
@@ -91,20 +86,10 @@
 	#ifdef DEBUG
 		printf( "In: _SnacPlastic_Register( void*, void* )\n" );
 	#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
-	
+
 	/* Add extensions to the entry points */
 	EntryPoint_Append( 
 		Context_GetEntryPoint( context,	Snac_EP_Constitutive ),

Modified: long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.h
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.h	2012-07-24 19:54:30 UTC (rev 20538)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Register.h	2012-07-24 21:46:28 UTC (rev 20539)
@@ -44,12 +44,8 @@
 	/* 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-07-24 19:54:30 UTC (rev 20538)
+++ long/3D/SNAC/trunk/Snac/plugins/plastic_BI/Remesh.c	2012-07-24 21:46:28 UTC (rev 20539)
@@ -42,26 +42,26 @@
 #include "Remesh.h"
 #include "Register.h"
 
-void _SnacPlastic_InterpolateElement( void*			_context, 
-					Element_LocalIndex	dstEltInd, 
-					Tetrahedra_Index	dstTetInd, 
-					SnacRemesher_Element*	dstElements, 
-					Element_DomainIndex 	srcEltInd, 
-					Tetrahedra_Index	srcTetInd )
+void _SnacPlastic_InterpolateElement( void*		_context, 
+					Element_LocalIndex			dstEltInd, 
+					Tetrahedra_Index			dstTetInd, 
+					SnacRemesher_Element*		dstElements, 
+					Element_DomainIndex 		srcEltInd, 
+					Tetrahedra_Index			srcTetInd )
 {
 	Snac_Context* 			context = (Snac_Context*)_context;
-	Mesh*				mesh = context->mesh;
+	Mesh*					mesh = context->mesh;
 	SnacRemesher_Mesh*		meshExt = ExtensionManager_Get( context->meshExtensionMgr,
 									mesh, 
 									SnacRemesher_MeshHandle );
-	HexaMD*				decomp = (HexaMD*)mesh->layout->decomp;
-	SnacRemesher_Element* 		dstElt = &dstElements[dstEltInd];
-	Element_DomainIndex 		eltdI[8],eldI,eldJ,eldK;
-	Index 				coef_I;
+	HexaMD*					decomp = (HexaMD*)mesh->layout->decomp;
+	SnacRemesher_Element*	dstElt = &dstElements[dstEltInd];
+	Element_DomainIndex 	eltdI[8],eldI,eldJ,eldK;
+	Index 					coef_I;
 	Element_DomainIndex		neldI =  decomp->elementDomain3DCounts[0];
 	Element_DomainIndex		neldJ =  decomp->elementDomain3DCounts[1];
 	Element_DomainIndex		neldK =  decomp->elementDomain3DCounts[2];
-	enum				{ threeD, xy, undefined } geomType;
+	enum					{ threeD, xy, undefined } geomType;
 	
 #ifdef DEBUG
 	printf( "element_lI: %u, fromElement_lI: %u\n", dstElementInd, srcElementInd );
@@ -136,19 +136,19 @@
   Copy interpolated values stored in newElement array 
   back to the original element array. 
 */
-void _SnacPlastic_CopyElement( void* 			_context, 
-				Element_LocalIndex	eltInd, 
-				Tetrahedra_Index	tetInd, 
-				SnacRemesher_Element*	srcEltArray )
+void _SnacPlastic_CopyElement( void* 					_context, 
+							   Element_LocalIndex		eltInd, 
+							   Tetrahedra_Index			tetInd, 
+							   SnacRemesher_Element*	srcEltArray )
 {
 
-	Snac_Context*		context = (Snac_Context*)_context;
+	Snac_Context*			context = (Snac_Context*)_context;
 	SnacRemesher_Element* 	srcElt = &srcEltArray[eltInd];
-	Snac_Element* 		dstElt = Snac_Element_At( context, eltInd );
+	Snac_Element* 			dstElt = Snac_Element_At( context, eltInd );
 	SnacPlastic_Element*	dstEltExt = ExtensionManager_Get(
-						context->mesh->elementExtensionMgr,
-						dstElt,
-						SnacPlastic_ElementHandle );
+								context->mesh->elementExtensionMgr,
+								dstElt,
+								SnacPlastic_ElementHandle );
 
 	dstEltExt->plasticStrain[tetInd] = srcElt->plasticStrain[tetInd];
 



More information about the CIG-COMMITS mailing list