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; }