[cig-commits] commit: Make ParticleFeVariable handle NearestNeighbor mappers.

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


changeset:   437:e57fac93239b
user:        Walter Landry <wlandry at caltech.edu>
date:        Sun Oct 23 19:43:25 2011 -0700
files:       MaterialPoints/src/ParticleFeVariable.cxx
description:
Make ParticleFeVariable handle NearestNeighbor mappers.


diff -r bea29dceaf4c -r e57fac93239b MaterialPoints/src/ParticleFeVariable.cxx
--- a/MaterialPoints/src/ParticleFeVariable.cxx	Sun Oct 23 11:55:55 2011 -0700
+++ b/MaterialPoints/src/ParticleFeVariable.cxx	Sun Oct 23 19:43:25 2011 -0700
@@ -265,7 +265,14 @@ void ParticleFeVariable_AssembleElement(
 		/* Find this particle in the element */
 		particle = (IntegrationPoint*) Swarm_ParticleInCellAt( swarm, cell_I, cParticle_I );
 
-		ParticleFeVariable_ValueAtParticle( self, swarm, lElement_I, particle, particleValue );
+                /* Handle case where we are using gauss swarms with
+                   NearestNeighborMapper instead of a material
+                   swarm */
+                IntegrationPointsSwarm* NNswarm(swarm);
+                IntegrationPoint* NNparticle(particle);
+                NearestNeighbor_Replace(&NNswarm,&NNparticle,lElement_I,dim);
+
+		ParticleFeVariable_ValueAtParticle( self, NNswarm, lElement_I, NNparticle, particleValue );
 
 		/* get shape function and detJac */
 		ElementType_EvaluateShapeFunctionsAt( elementType, particle->xi, shapeFunc );



More information about the CIG-COMMITS mailing list