Esempio n. 1
0
//*******************************************************
//function name: sinKP 
// construct single vector of PK for each (point, element)pair
// note: need to consider factors such as whether the point is in the element and whether it's related to the shape function
// being processed
//*******************************************************
void Tri3Cell::sinKP(BEM& bem, int isIn, int isFirst)
{
	if (isIn == 0)
		numInt(bem, isFirst);
	else
		sinInt();
}
Esempio n. 2
0
int TMathInt::cosInt(long t)
{
	if (t < 0)
	{
		return cosInt(-t);
	}
	return sinInt(t + 1024);
}
Esempio n. 3
0
int TMathInt::sinInt(long t)
{
	if (t < 0)
	{
		return -sinInt(-t);
	}
	
	t = t & 0x00000FFF; // 2Pi = 4096
	if (t <= 1024)
	{
		return sinArray[t];
	}
	else if (t <= 2048)
	{
		return sinArray[2048 - t];
	}
	else if (t <= 3072)
	{
		return -sinArray[t - 2048];
	}
	else return -sinArray[4096 - t];
}