📄 linrort.c
字号:
fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f %6.1f %6.1f %6.1f %6.1f \n \n", Iso_e[0], Iso_e[1], Iso_e[2], Iso_e[3], Iso_e[4]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpp: isotropic component: maximum error %6.1f(in percent) exceeds the desired accuracy \n", Max); }*/ /* P upper halfspace */ fprintf(out_Error_p,"\n B) Anisotropic incidence halfspace component: (tested in the vicinity of inc. angle=%6.2fdeg) \n", Rp_1st.angle[0]*180/PI); fprintf(out_Error_p,"\n Azimuth: \t \t 0deg 90deg \n"); fprintf(out_Error_p," --------------------------------------------\n"); fprintf(out_Error_p," First Order: \t \t %8.5f %8.5f \n", Rp_1st.upper[0],Rp_1st.upper[1]); fprintf(out_Error_p," Second Order: \t \t %8.5f %8.5f \n", Rp_2nd.upper[0],Rp_2nd.upper[1]); fprintf(out_Error_p," --------------------------------------------\n"); Max=0.; for(n=0; n < 2 ; n++){ if(fabs(Rp_1st.upper[n]) > 0.0001){ Iso_e[n]=(Rp_2nd.upper[n]/fabs(Rp_1st.upper[n]))*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f %6.1f \n \n", Iso_e[0], Iso_e[1]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpp: aniso component: inc. hlfspc: maximum error %6.1f(in percent) exceeds the desired accuracy \n \n", Max); }*/ /* P lower */ fprintf(out_Error_p,"\n C) Anisotropic reflecting halfspace component: (tested in the vicinity of inc. angle=%6.2fdeg) \n", Rp_1st.angle[0]*180/PI); fprintf(out_Error_p,"\n Azimuth: \t \t 0deg 90deg \n"); fprintf(out_Error_p," --------------------------------------------\n"); fprintf(out_Error_p," First Order: \t \t %8.5f %8.5f \n", Rp_1st.lower[0],Rp_1st.lower[1]); fprintf(out_Error_p," Second Order: \t \t %8.5f %8.5f \n", Rp_2nd.lower[0],Rp_2nd.lower[1]); fprintf(out_Error_p," --------------------------------------------\n"); Max=0.; for(n=0; n < 2 ; n++){ if(fabs(Rp_1st.lower[n]) > 0.0001){ Iso_e[n]=(Rp_2nd.lower[n]/fabs(Rp_1st.lower[n]))*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f %6.1f \n \n", Iso_e[0], Iso_e[1]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpp: aniso component: refl. hlfspc: maximum error %6.1f(in percent) exceeds the desired accuracy \n \n", Max); }*/ /* P global */ fprintf(out_Error_p,"\n D) Global error due to anisotropy: (tested in the vicinity of inc. angle=%6.2fdeg and for kappa=%6.2fdeg )\n", Rp_1st.angle[0]*180/PI, kappa); fprintf(out_Error_p,"\n Azimuth: \t \t 0deg 30deg 60deg 90deg \n"); fprintf(out_Error_p," ---------------------------------------------------------------------------\n"); fprintf(out_Error_p," First Order: \t \t %8.5f %8.5f %8.5f %8.5f \n", Rp_1st.global[0],Rp_1st.global[2],Rp_1st.global[3],Rp_1st.global[1]); fprintf(out_Error_p," Second Order: \t \t %8.5f %8.5f %8.5f %8.5f \n", Rp_2nd.global[0],Rp_2nd.global[2],Rp_2nd.global[3],Rp_2nd.global[1]); fprintf(out_Error_p," ---------------------------------------------------------------------------\n"); Max=0.; for(n=0; n < 4 ; n++){ if(fabs(Rp_1st.global[n]) > 0.0001){ Iso_e[n]=(Rp_2nd.global[n]/fabs(Rp_1st.global[n]))*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f %6.1f %6.1f %6.1f \n \n", Iso_e[0], Iso_e[2],Iso_e[3],Iso_e[1]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpp: aniso component: global: maximum error %6.1f(in percent) exceeds the desired accuracy \n \n", Max); }*/ /* SV COMPONENT SECOND */ fprintf(out_Error_p,"\n Rpsv COEFFICIENT: \n"); fprintf(out_Error_p,"******************* \n"); /* SV isotropic */ fprintf(out_Error_p,"\n A) Isotropic component (due to velocity and density contrasts): \n"); fprintf(out_Error_p,"\n Inc. Angle: \t \t 15deg 20deg 25deg 30deg 35deg \n"); fprintf(out_Error_p," ----------------------------------------------------------------------------- \n"); fprintf(out_Error_p," Exact: \t \t %7.4f %7.4f %7.4f %7.4f %7.4f \n", Rsv_2nd.iso[0],Rsv_2nd.iso[1],Rsv_2nd.iso[2],Rsv_2nd.iso[3], Rsv_2nd.iso[4]); fprintf(out_Error_p," Approximation: \t %7.4f %7.4f %7.4f %7.4f %7.4f \n", Rsv_1st.iso[0],Rsv_1st.iso[1],Rsv_1st.iso[2],Rsv_1st.iso[3], Rsv_1st.iso[4]); fprintf(out_Error_p," ------------------------------------------------------------------------------ \n"); Max=0.; for(n=0; n < 5 ; n++){ if(fabs(Rsv_2nd.iso[n]) > 0.0001){ Iso_e[n]=(Rsv_1st.iso[n]/Rsv_2nd.iso[n]-1)*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f %6.1f %6.1f %6.1f %6.1f \n \n", Iso_e[0], Iso_e[1], Iso_e[2], Iso_e[3], Iso_e[4]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpsv: isotropic component: maximum error %6.1f(in percent) exceeds the desired accuracy \n", Max); }*/ /* SV upper halfspace */ fprintf(out_Error_p,"\n B) Anisotropic incidence halfspace component: (tested in the vicinity of inc. angle=%6.2fdeg) \n", Rsv_1st.angle[0]*180/PI); fprintf(out_Error_p,"\n Azimuth: \t \t 0deg 90deg \n"); fprintf(out_Error_p," --------------------------------------------\n"); fprintf(out_Error_p," First Order: \t \t %8.5f %8.5f \n", Rsv_1st.upper[0],Rsv_1st.upper[1]); fprintf(out_Error_p," Second Order: \t \t %8.5f %8.5f \n", Rsv_2nd.upper[0],Rsv_2nd.upper[1]); fprintf(out_Error_p," --------------------------------------------\n"); Max=0.; for(n=0; n < 2 ; n++){ if(fabs(Rsv_1st.upper[n]) > 0.0001){ Iso_e[n]=(Rsv_2nd.upper[n]/fabs(Rsv_1st.upper[n]))*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f %6.1f \n \n", Iso_e[0], Iso_e[1]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpsv: aniso component: inc. hlfspc: maximum error %6.1f(in percent) exceeds the desired accuracy \n \n", Max); }*/ /* SV lower */ fprintf(out_Error_p,"\n C) Anisotropic reflecting halfspace component: (tested in the vicinity of inc. angle=%6.2fdeg) \n", Rsv_1st.angle[0]*180/PI); fprintf(out_Error_p,"\n Azimuth: \t \t 0deg 90deg \n"); fprintf(out_Error_p," --------------------------------------------\n"); fprintf(out_Error_p," First Order: \t \t %8.5f %8.5f \n", Rsv_1st.lower[0],Rsv_1st.lower[1]); fprintf(out_Error_p," Second Order: \t \t %8.5f %8.5f \n", Rsv_2nd.lower[0],Rsv_2nd.lower[1]); fprintf(out_Error_p," --------------------------------------------\n"); Max=0.; for(n=0; n < 2 ; n++){ if(fabs(Rsv_1st.lower[n]) > 0.0001){ Iso_e[n]=(Rsv_2nd.lower[n]/fabs(Rsv_1st.lower[n]))*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f %6.1f \n \n", Iso_e[0], Iso_e[1]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpsv: aniso component: refl. hlfspc: maximum error %6.1f(in percent) exceeds the desired accuracy \n \n", Max); }*/ /* SV global */ fprintf(out_Error_p,"\n D) Global error due to anisotropy: (tested in the vicinity of inc. angle=%6.2fdeg and for kappa=%6.2fdeg )\n", Rsv_1st.angle[0]*180/PI, kappa); fprintf(out_Error_p,"\n Azimuth: \t \t 0deg 30deg 60deg 90deg \n"); fprintf(out_Error_p," ---------------------------------------------------------------------------\n"); fprintf(out_Error_p," First Order: \t \t %8.5f %8.5f %8.5f %8.5f \n", Rsv_1st.global[0],Rsv_1st.global[2],Rsv_1st.global[3],Rsv_1st.global[1]); fprintf(out_Error_p," Second Order: \t \t %8.5f %8.5f %8.5f %8.5f \n", Rsv_2nd.global[0],Rsv_2nd.global[2],Rsv_2nd.global[3],Rsv_2nd.global[1]); fprintf(out_Error_p," ---------------------------------------------------------------------------\n"); Max=0.; for(n=0; n < 4 ; n++){ if(fabs(Rsv_1st.global[n]) > 0.0001){ Iso_e[n]=(Rsv_2nd.global[n]/fabs(Rsv_1st.global[n]))*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f %6.1f %6.1f %6.1f \n \n", Iso_e[0], Iso_e[2],Iso_e[3],Iso_e[1]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpsv: aniso component: global: maximum error %6.1f(in percent) exceeds the desired accuracy \n \n", Max); }*/ /*SH COMPONENT*/ fprintf(out_Error_p,"\n Rpsh COEFFICIENT: \n"); fprintf(out_Error_p,"******************* \n"); /* SH upper halfspace */ fprintf(out_Error_p,"\n A) Anisotropic incidence halfspace component: (tested in the vicinity of inc. angle=%6.2fdeg) \n", Rsh_1st.angle[0]*180/PI); fprintf(out_Error_p,"\n Azimuth: \t \t 45deg \n"); fprintf(out_Error_p," ----------------------------------\n"); fprintf(out_Error_p," First Order: \t \t %8.5f \n", Rsh_1st.upper[0]); fprintf(out_Error_p," Second Order: \t \t %8.5f \n", Rsh_2nd.upper[0]); fprintf(out_Error_p," ----------------------------------\n"); Max=0.; for(n=0; n < 1 ; n++){ if(fabs(Rsh_1st.upper[n]) > 0.0001){ Iso_e[n]=(Rsh_2nd.upper[n]/fabs(Rsh_1st.upper[n]))*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f \n \n", Iso_e[0]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpsh: aniso component: inc. hlfspc: maximum error %6.1f(in percent) exceeds the desired accuracy \n \n", Max); }*/ /* SH lower */ fprintf(out_Error_p,"\n B) Anisotropic reflecting halfspace component: (tested in the vicinity of inc. angle=%6.2fdeg) \n", Rsh_1st.angle[0]*180/PI); fprintf(out_Error_p,"\n Azimuth: \t \t 45deg \n"); fprintf(out_Error_p," ----------------------------------\n"); fprintf(out_Error_p," First Order: \t \t %8.5f \n", Rsh_1st.lower[0]); fprintf(out_Error_p," Second Order: \t \t %8.5f \n", Rsh_2nd.lower[0]); fprintf(out_Error_p," ----------------------------------\n"); Max=0.; for(n=0; n < 1 ; n++){ if(fabs(Rsh_1st.lower[n]) > 0.0001){ Iso_e[n]=(Rsh_2nd.lower[n]/fabs(Rsh_1st.lower[n]))*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f \n \n", Iso_e[0]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpsh: aniso component: refl. hlfspc: maximum error %6.1f(in percent) exceeds the desired accuracy \n \n", Max); }*/ /* SH global */ fprintf(out_Error_p,"\n C) Global error due to anisotropy: (tested in the vicinity of inc. angle=%6.2fdeg and for kappa=%6.2fdeg )\n", Rsh_1st.angle[0]*180/PI, kappa); fprintf(out_Error_p,"\n Azimuth: \t \t 20deg 45deg 70deg \n"); fprintf(out_Error_p," -----------------------------------------------------------\n"); fprintf(out_Error_p," First Order: \t \t %8.5f %8.5f %8.5f \n", Rsh_1st.global[0], Rsh_1st.global[1], Rsh_1st.global[2] ); fprintf(out_Error_p," Second Order: \t \t %8.5f %8.5f %8.5f \n", Rsh_2nd.global[0], Rsh_2nd.global[1], Rsh_2nd.global[2]); fprintf(out_Error_p," -----------------------------------------------------------\n"); Max=0.; for(n=0; n < 3 ; n++){ if(fabs(Rsh_1st.global[n]) > 0.0001){ Iso_e[n]=(Rsh_2nd.global[n]/fabs(Rsh_1st.global[n]))*100.; Max = fabs(Max) > fabs(Iso_e[n]) ? Max : Iso_e[n]; } else{ Iso_e[n]=999.9; } } fprintf(out_Error_p," Rel. Error (in percent): \t %6.1f %6.1f %6.1f \n \n", Iso_e[0], Iso_e[1], Iso_e[2]); /*if(fabs(Max) >= 15.) { fprintf(stdout,"\n !!! ACCURACY-ERROR MESSAGE !!! \n"); fprintf(stdout," Rpsh: aniso component: global: maximum error %6.1f(in percent) exceeds the desired accuracy \n \n", Max); }*/ fprintf(out_Error_p,"\n \n END OF FILE \n"); } else{ fprintf(out_Error_p,"\n THE ERROR ESTIMATES CANNOT BE EVALUATED FOR THE S-WAVE BACKGROUND VELOCITIES CORRESPONDING TO A44 (APPLIES TO BOTH HALFSPACES) \n"); } /* done with the out_Error error file */ /* last step - closing the files */ if (strcmp(a_file,"-1")) fclose(a_file_p); fclose(out_inf_p); fclose(out_P_p); fclose(out_S_p); fclose(out_SVSH_p); fclose(out_Error_p); fprintf(stdout," ...LinRORT done.\n"); /* we are done */ return(CWP_Exit());}/************************************************************************//************************ END OF THE SOURCE FILE ************************//************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -