コード例 #1
0
ファイル: TriCubicHermite.cpp プロジェクト: pbosler/lpmCxx
Field TriCubicHermite::scalarLaplacian( const Particles& aParticles ) const
{
	assert(data->nDim() == 1);
	Field result("n/a","n/a", 1, aParticles.N());
	if ( !allFacesReady ) 
	{
		OutputMessage statusMsg("interp coefficients not defined ", OutputMessage::errorPriority, "(Field) TriCubicHermite::scalarLaplacian");
		log->logMessage(statusMsg);
		return result;
	}
	
	for ( int i = 0; i < aParticles.N(); ++i )
	{
		double newVal = scalarLaplacian( aParticles.physCoord(i) );
		result.insertScalarToField( i, newVal );
	}
	return result;
};
コード例 #2
0
ファイル: TriCubicHermite.cpp プロジェクト: pbosler/lpmCxx
Field TriCubicHermite::scalarGradient( const Particles& aParticles ) const
{
	assert(data->nDim() == 1);
	Field result("n/a","n/a", 2, aParticles.N());
	if ( !allFacesReady ) 
	{
		OutputMessage statusMsg("interp coefficients not defined ", OutputMessage::errorPriority, "(Field) TriCubicHermite::scalarGradient");
		log->logMessage(statusMsg);
		return result;
	}
	
	for ( int i = 0; i < aParticles.N(); ++i )
	{
		xyzVector newGrad = scalarGradient( aParticles.physCoord(i) );
		result.insertVectorToField( i, newGrad );
	}
	return result;
};