[cig-commits] commit: Fixes for NearestNeighbor mapper

Mercurial hg at geodynamics.org
Mon Oct 24 19:47:48 PDT 2011


changeset:   438:d49f4087c568
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Mon Oct 24 19:46:09 2011 -0700
files:       Utils/src/BuoyancyForceTermThermoChem.cxx Utils/src/DiffusionSMT.cxx
description:
Fixes for NearestNeighbor mapper


diff -r e57fac93239b -r d49f4087c568 Utils/src/BuoyancyForceTermThermoChem.cxx
--- a/Utils/src/BuoyancyForceTermThermoChem.cxx	Sun Oct 23 19:43:25 2011 -0700
+++ b/Utils/src/BuoyancyForceTermThermoChem.cxx	Mon Oct 24 19:46:09 2011 -0700
@@ -332,7 +332,11 @@ void _BuoyancyForceTermThermoChem_Assemb
 		if ( temperatureField )
 			FeVariable_InterpolateFromMeshLocalCoord( temperatureField, mesh, lElement_I, xi, &temperature );
 
-		material = IntegrationPointsSwarm_GetMaterialOn( (IntegrationPointsSwarm*) swarm, particle );
+                IntegrationPointsSwarm* NNswarm((IntegrationPointsSwarm*) swarm);
+                IntegrationPoint* NNparticle(particle);
+                NearestNeighbor_Replace(&NNswarm,&NNparticle,lElement_I,dim);
+
+		material = IntegrationPointsSwarm_GetMaterialOn(NNswarm, NNparticle);
 		materialExt = (BuoyancyForceTermThermoChem_MaterialExt*)ExtensionManager_Get( material->extensionMgr, material, self->materialExtHandle );
 
 		/* Calculate Force */
diff -r e57fac93239b -r d49f4087c568 Utils/src/DiffusionSMT.cxx
--- a/Utils/src/DiffusionSMT.cxx	Sun Oct 23 19:43:25 2011 -0700
+++ b/Utils/src/DiffusionSMT.cxx	Mon Oct 24 19:46:09 2011 -0700
@@ -269,8 +269,12 @@ void _DiffusionSMT_AssembleElement(
 	currIntegrationPoint = (IntegrationPoint*)Swarm_ParticleInCellAt(
 	    swarm, cell_I, cParticle_I );
 
-	material = IntegrationPointsSwarm_GetMaterialOn(
-	    (IntegrationPointsSwarm*) swarm, currIntegrationPoint );
+        IntegrationPointsSwarm* NNswarm((IntegrationPointsSwarm*) swarm);
+        IntegrationPoint* NNparticle(currIntegrationPoint);
+        NearestNeighbor_Replace(&NNswarm,&NNparticle,lElement_I,dim);
+
+	material = IntegrationPointsSwarm_GetMaterialOn(NNswarm,NNparticle);
+                                                        
 	materialExt = (DiffusionSMT_MaterialExt*)ExtensionManager_Get(material->extensionMgr, material, self->materialExtHandle );
 
 	xi = currIntegrationPoint->xi;



More information about the CIG-COMMITS mailing list