Views passed into functions do not update properly

Jean C. Marshall jcm at lanl.gov
Wed Apr 18 16:25:20 UTC 2001


Gang:
We have run into a problem in which passing views into a function causes 
the updaters to not be called. Here is an example.
John and Jean

	//======================================================================
	// Function -- QRelations<Traits>::calcEdgeSoundSpeed
	//======================================================================

	template <class Traits>
	void QRelations<Traits>::calcEdgeSoundSpeed ( const 
ScalarField&  EdgeSoundSpeed,
	                    	   			          const ScalarField&  VertSoundSpeed )
	{
		ENTER("QRelations::calcEdgeSoundSpeed");
		
		int d = getEdgeDirection(EdgeSoundSpeed);
                      // Without this explicit update call, the updaters do 
not get called for VertSoundSpeed
		VertSoundSpeed.update();
		EdgeSoundSpeed(CoarseEdges[d]) =
                        min( 
VertSoundSpeed(CoarseEdges[d]),VertSoundSpeed(EdgeNgbr[d]) );
		
	}           // end function calcEdgeSoundSpeed






More information about the pooma-dev mailing list