initial upload

This commit is contained in:
2024-09-10 20:25:18 +08:00
parent b8de03ee4f
commit f1cc876972
377 changed files with 2721267 additions and 34 deletions

View File

@@ -0,0 +1,20 @@
#include "xyz2shc.h"
int XYZ2SHC::OutShc(char* filename){
int start_index,flow_index;
ofstream outfile;
if (open_outfile(outfile,filename)) return -1;
for (int i = 0; i < shc_order_+1; i++){
//按列优先排列将球谐系数输出 由列号计算数组中的起始位置
start_index = int(0.5*i*(2*shc_order_+3-i));
for (int j = 0; j < shc_order_+1; j++){
//根据行号计算偏移量
flow_index = j - i;
outfile << j << " " << i << setprecision(16) << " " << shc_value_[start_index+flow_index] << " " << shc_value_[start_index+flow_index+half_shc_num_] << endl;
}
}
outfile.close();
return 0;
}