本文整理汇总了C++中Vertices::Svertka方法的典型用法代码示例。如果您正苦于以下问题:C++ Vertices::Svertka方法的具体用法?C++ Vertices::Svertka怎么用?C++ Vertices::Svertka使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vertices
的用法示例。
在下文中一共展示了Vertices::Svertka方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalcIntegral
double CalcIntegral(Surfaces &s, PointsXYZ &m){
//return;
int ns=s.size(); // число треугольников
CoordXYZ x[3];
for (int i = 0; i < 3; i++)
x[i].resize(3);
//============= init ===================
vrt.Init(m.size(),p_DeltaT);
CoordXYZ w(3);
CoordXYZ control_point(3);
CoordXYZ position_of_source(3);
w[0] = 0;
w[1] = 0;
w[2] = 0;
position_of_source[0] = e_x0;
position_of_source[1] = e_y0;
position_of_source[2] = e_z0;
control_point[0] = p_control_x;
control_point[1] = p_control_y;
control_point[2] = p_control_z;
double omega = p_omega;
SourceOfNoise source_of_noise(omega, position_of_source,w);//,control_point);
//========== end of init ===============
double Sintegral;
// for(double z=90.;z<100.;z+=(100.-90.)/200.)
double T=0.;
// for(;T<110.;T+=(110.-90.)/230.)
{
for (int i = 0; i < 3; ++i)
IntN[i]=0;
S_Surf=0.;
// control_point[2]=z;
Sintegral=0;
for(int j=0;j<ns;j++)
{
int err;
Sintegral+=CalcIntegralOfFullTrg(s[j],m,T,source_of_noise, control_point,err);
if(err)
{
cout << " ERROR 3_ ret=" << err << " j= " << j << endl;
return 0.;
}
}
{
static int ugu=0;
if(!ugu) cout << " S_Surf=" << S_Surf << " (" << S_Surf/(4.*M_PI*kva(p_Rsphere)) << ") IntN " << IntN[0] << " " << IntN[1] << " " << IntN[2] << endl<< endl;
ugu=1;
}
// cout << control_point[2] << " " << Sintegral << " " << source_of_noise.GetRho(control_point,T) << endl;
if(!isbp)
cout << T << "\t" << source_of_noise.GetRho(control_point,T) << " " << Sintegral << endl;
}
if(isbp)
{
vrt.PutData("koeff.txt");
// следует выполнить свёртку!
int nk=150,ik;
double dt=(p_T2-p_T1)/nk;
for(ik=0,T=p_T1;ik<=nk;ik++,T+=dt)
{
Sintegral=vrt.Svertka(s,m,source_of_noise,T);
cout << T << "\t" << source_of_noise.GetRho(control_point,T) << " " << Sintegral << endl;
}
}
cout << endl;
cout << " S_Surf=" << S_Surf << " (" << S_Surf/(4.*M_PI*kva(p_Rsphere)) << ") Int_N " << IntN[0] << " " << IntN[1] << " " << IntN[2] << endl;
return Sintegral;
}