[cig-commits] commit: Update discontinuous meshes after the background mesh has been remeshed

Mercurial hg at geodynamics.org
Tue Oct 4 15:10:37 PDT 2011


changeset:   880:5378fdc6b2ca
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Tue Oct 04 15:09:02 2011 -0700
files:       plugins/EulerDeform/Context.h plugins/EulerDeform/EulerDeform.cxx
description:
Update discontinuous meshes after the background mesh has been remeshed


diff -r b37fd0b597cd -r 5378fdc6b2ca plugins/EulerDeform/Context.h
--- a/plugins/EulerDeform/Context.h	Tue Oct 04 14:19:17 2011 -0700
+++ b/plugins/EulerDeform/Context.h	Tue Oct 04 15:09:02 2011 -0700
@@ -36,6 +36,7 @@
 
 	struct EulerDeform_System {
 		Mesh*		mesh;
+		Mesh*		inner_mesh;
 		double*		verts;
 	        FeVariable*     dispField;
 		Remesher*	remesher;
diff -r b37fd0b597cd -r 5378fdc6b2ca plugins/EulerDeform/EulerDeform.cxx
--- a/plugins/EulerDeform/EulerDeform.cxx	Tue Oct 04 14:19:17 2011 -0700
+++ b/plugins/EulerDeform/EulerDeform.cxx	Tue Oct 04 15:09:02 2011 -0700
@@ -150,6 +150,7 @@ void _Underworld_EulerDeform_Build( void
 
 			/* Read contents. */
 			meshName = Dictionary_GetString( sysDict, (Dictionary_Entry_Key)"mesh"  );
+                        char *innerMeshName=Dictionary_GetString( sysDict, (Dictionary_Entry_Key)"innerMesh"  );
 			remesherName = Dictionary_GetString( sysDict, (Dictionary_Entry_Key)"remesher"  );
 
 			if( strcmp( remesherName, "" ) )
@@ -166,6 +167,7 @@ void _Underworld_EulerDeform_Build( void
 			sys->wrapBottom = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"wrapBottom", False  );
 			sys->wrapLeft = Dictionary_GetBool_WithDefault( sysDict, (Dictionary_Entry_Key)"wrapLeft", False  );
 			sys->mesh = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)meshName, Mesh, True, data  );
+			sys->inner_mesh = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)innerMeshName, Mesh, True, data  );
 			/* This line is currently not working, have to manually set the velocity field name.
 				This should be fixed once this plugin has been converted to a component. */
 			/*sys->velField = Stg_ComponentFactory_ConstructByName( uwCtx->CF, (Name)velFieldName, FieldVariable, True, data  );*/
@@ -1022,6 +1024,12 @@ void EulerDeform_Remesh( TimeIntegrand* 
     Mesh_DeformationUpdate( sys->mesh );
     for( var_i = 0; var_i < sys->nFields; var_i++ )
       FeVariable_SyncShadowValues( sys->fields[var_i] );
+
+    /* Reset the coordinates of the inner, discontinuous mesh */
+
+    if(sys->inner_mesh!=NULL)
+      InnerGenerator_SetCoordinates((InnerGenerator*)(sys->inner_mesh->generator),
+                                    (FeMesh*)(sys->inner_mesh));
   }
 }
 



More information about the CIG-COMMITS mailing list