update src
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										8
									
								
								log.txt
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								log.txt
									
									
									
									
									
								
							| @@ -1,5 +1,5 @@ | |||||||
| tet-file  = data/pipeline/pipeline | tet-file  = data/prism/prism.1 | ||||||
| mag-file  = data/pipeline/magz.txt | mag-file  = (0,0,200) | ||||||
| site-file = data/pipeline/site.txt | site-file = -30/30/-30/30/10/81/81 | ||||||
| obs-file  = data/pipeline/pipeline | obs-file  = data/prism/prism | ||||||
| cal-type  = potential gradient tensor | cal-type  = potential gradient tensor | ||||||
|   | |||||||
| @@ -1,10 +1,6 @@ | |||||||
| #include "magtet.h" | #include "magtet.h" | ||||||
|  |  | ||||||
|  |  | ||||||
| magtet::magtet(){} |  | ||||||
|  |  | ||||||
| magtet::~magtet(){} |  | ||||||
|  |  | ||||||
| void magtet::read_tet(std::string tet_name) | void magtet::read_tet(std::string tet_name) | ||||||
| { | { | ||||||
| 	gctl::read_Tetgen_node(tet_name, node_); | 	gctl::read_Tetgen_node(tet_name, node_); | ||||||
| @@ -140,7 +136,7 @@ void magtet::cal_tensors() | |||||||
| 			v1 = *ele_[e].fget(i, 1) - *ele_[e].fget(i, 0); | 			v1 = *ele_[e].fget(i, 1) - *ele_[e].fget(i, 0); | ||||||
| 			v2 = *ele_[e].fget(i, 2) - *ele_[e].fget(i, 0); | 			v2 = *ele_[e].fget(i, 2) - *ele_[e].fget(i, 0); | ||||||
| 			nf = gctl::cross(v1, v2).normal(); | 			nf = gctl::cross(v1, v2).normal(); | ||||||
| 			// The space is declared by the read_magz() function | 			// The space is declared by the init_magz() function | ||||||
| 			ele_para_[e].fnorm[i] = nf; | 			ele_para_[e].fnorm[i] = nf; | ||||||
|  |  | ||||||
| 			for (int j = 0; j < 3; ++j) | 			for (int j = 0; j < 3; ++j) | ||||||
| @@ -151,7 +147,7 @@ void magtet::cal_tensors() | |||||||
| 				ele_para_[e].etang[j+i*3] = gctl::cross(nf, ne); | 				ele_para_[e].etang[j+i*3] = gctl::cross(nf, ne); | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			ele_para_[e].mag_amp[i] = gctl::dot(magz_[e], ele_para_[e].fnorm[i]); | 			ele_para_[e].mag_amp[i] = gctl::dot(magz_[e], nf); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		// link magtet_para to tetrahedron's attribute | 		// link magtet_para to tetrahedron's attribute | ||||||
|   | |||||||
| @@ -19,6 +19,11 @@ | |||||||
|  |  | ||||||
| #define RUN_ECHO(action, msg) do {std::clog << msg << "... \n"; action;} while(0); | #define RUN_ECHO(action, msg) do {std::clog << msg << "... \n"; action;} while(0); | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * @brief      计算磁场所需的四面体张量信息与磁化强度 | ||||||
|  |  *  | ||||||
|  |  * 此结构体将连接至四面体元素的att指针上 | ||||||
|  |  */ | ||||||
| struct magtet_para | struct magtet_para | ||||||
| { | { | ||||||
| 	double mag_amp[4]; | 	double mag_amp[4]; | ||||||
| @@ -28,9 +33,6 @@ struct magtet_para | |||||||
| class magtet | class magtet | ||||||
| { | { | ||||||
| public: | public: | ||||||
| 	magtet(); |  | ||||||
| 	virtual ~magtet(); |  | ||||||
|  |  | ||||||
| 	void read_tet(std::string tet_name); | 	void read_tet(std::string tet_name); | ||||||
| 	void init_magz(std::string para); | 	void init_magz(std::string para); | ||||||
| 	void init_site(std::string para); | 	void init_site(std::string para); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user