[cig-commits] commit: Add FeMesh_GetBasis

Mercurial hg at geodynamics.org
Mon Sep 12 16:15:02 PDT 2011


changeset:   792:4b0d9dba05b0
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Mon Sep 12 14:35:15 2011 -0700
files:       Discretisation/src/FeMesh.cxx Discretisation/src/FeMesh.h
description:
Add FeMesh_GetBasis


diff -r 6ec2fc965f78 -r 4b0d9dba05b0 Discretisation/src/FeMesh.cxx
--- a/Discretisation/src/FeMesh.cxx	Mon Sep 12 14:34:19 2011 -0700
+++ b/Discretisation/src/FeMesh.cxx	Mon Sep 12 14:35:15 2011 -0700
@@ -68,6 +68,7 @@ FeMesh* _FeMesh_DefaultNew( Name name ) 
 	Stg_Component_ExecuteFunction*                        _execute = _FeMesh_Execute;
 	Stg_Component_DestroyFunction*                        _destroy = _FeMesh_Destroy;
 	AllocationType                              nameAllocationType = NON_GLOBAL;
+	Mesh_GetBasisFunction*                               _getBasis = _FeMesh_GetBasis;
 
 	/* The following terms are parameters that have been passed into or defined in this function but are being set before being passed onto the parent */
 	Stg_Class_CopyFunction*        _copy = NULL;
@@ -120,10 +121,6 @@ void _FeMesh_Print( void* feMesh, Stream
 void _FeMesh_Print( void* feMesh, Stream* stream ) {
 	FeMesh*	self = (FeMesh*)feMesh;
 	
-	/* Set the Journal for printing informations */
-	Stream* feMeshStream;
-	feMeshStream = Journal_Register( InfoStream_Type, (Name)"FeMeshStream"  );
-
 	/* Print parent */
 	Journal_Printf( stream, "FeMesh (ptr): (%p)\n", self );
 	_Mesh_Print( self, stream );
@@ -253,6 +250,12 @@ void _FeMesh_Destroy( void* feMesh, void
 	FeMesh_Destruct( self );
 	NewClass_Delete( self->inc );
    _Mesh_Destroy( self, data );
+}
+
+void _FeMesh_GetBasis(void* feMesh, double *localCoord, double *basis)
+{
+  FeMesh *self=(FeMesh*)feMesh;
+  ElementType_EvaluateShapeFunctionsAt(self->feElType,localCoord, basis);
 }
 
 
diff -r 6ec2fc965f78 -r 4b0d9dba05b0 Discretisation/src/FeMesh.h
--- a/Discretisation/src/FeMesh.h	Mon Sep 12 14:34:19 2011 -0700
+++ b/Discretisation/src/FeMesh.h	Mon Sep 12 14:35:15 2011 -0700
@@ -94,6 +94,7 @@
 	void _FeMesh_Initialise( void* feMesh, void* data );
 	void _FeMesh_Execute( void* feMesh, void* data );
 	void _FeMesh_Destroy( void* feMesh, void* data );
+        void _FeMesh_GetBasis(void* feMesh, double *localCoord, double *basis);
 
 	/*--------------------------------------------------------------------------------------------------------------------------
 	** Public functions



More information about the CIG-COMMITS mailing list