|
@@ -42,8 +42,9 @@ int main(int argc, char** argv) {
|
42
|
42
|
Kern->SetLayeredEarthEM( earth );
|
43
|
43
|
|
44
|
44
|
Kern->SetIntegrationSize( (Vector3r() << 200,200,200).finished() );
|
45
|
|
- Kern->SetIntegrationOrigin( (Vector3r() << 0,0,0).finished() );
|
46
|
|
- Kern->SetTolerance( 1e-10 ); // 1e-12
|
|
45
|
+ Kern->SetIntegrationOrigin( (Vector3r() << -100, -100, .5).finished() );
|
|
46
|
+ Real tol(1e-9);
|
|
47
|
+ Kern->SetTolerance( tol ); // 1e-12
|
47
|
48
|
|
48
|
49
|
// Kern->AlignWithAkvoDataset( YAML::LoadFile(argv[2]) );
|
49
|
50
|
|
|
@@ -62,7 +63,7 @@ int main(int argc, char** argv) {
|
62
|
63
|
Kern->SetPulseCurrent( I ); // nbins, low, high
|
63
|
64
|
|
64
|
65
|
//VectorXr interfaces = VectorXr::LinSpaced( 41, .5, 45.5 ); // nlay, low, high
|
65
|
|
- VectorXr interfaces = VectorXr::LinSpaced( 51, .5, 45.5 ); // nlay, low, high
|
|
66
|
+ VectorXr interfaces = VectorXr::LinSpaced( 61, .5, 45.5 ); // nlay, low, high
|
66
|
67
|
Real thick = .5;
|
67
|
68
|
for (int ilay=1; ilay<interfaces.size(); ++ilay) {
|
68
|
69
|
interfaces(ilay) = interfaces(ilay-1) + thick;
|
|
@@ -74,10 +75,19 @@ int main(int argc, char** argv) {
|
74
|
75
|
// may be more natural to work with?
|
75
|
76
|
std::vector<std::string> tx = {std::string("Coil 1")};
|
76
|
77
|
std::vector<std::string> rx = {std::string("Coil 2")};
|
77
|
|
- Kern->CalculateK0( tx, rx, false );
|
|
78
|
+ Kern->CalculateK0( tx, rx, false ); // 3rd argument is vtk output
|
|
79
|
+
|
|
80
|
+ std::ofstream dout = std::ofstream(std::string("Rx-")+std::string(argv[3])+std::string(".dat"));
|
|
81
|
+ dout << "# Transmitters: ";
|
|
82
|
+ for (auto lp : tx) {
|
|
83
|
+ dout << lp << "\t";
|
|
84
|
+ }
|
|
85
|
+ dout << "\n# Receivers: ";
|
|
86
|
+ for (auto lp : rx) {
|
|
87
|
+ dout << lp << "\t";
|
|
88
|
+ }
|
|
89
|
+ dout << "\n# Tolerance: " << tol << std::endl;
|
78
|
90
|
|
79
|
|
- std::ofstream dout = std::ofstream(std::string("test-")+ std::string(argv[1])+ std::string(".dat"));
|
80
|
|
- //std::ofstream dout = std::ofstream(std::string("k-coincident.dat"));
|
81
|
91
|
dout << interfaces.transpose() << std::endl;
|
82
|
92
|
dout << I.transpose() << std::endl;
|
83
|
93
|
dout << "#real\n";
|
|
@@ -86,7 +96,7 @@ int main(int argc, char** argv) {
|
86
|
96
|
dout << Kern->GetKernel().imag() << std::endl;
|
87
|
97
|
dout.close();
|
88
|
98
|
|
89
|
|
- std::ofstream out = std::ofstream(std::string("test-")+std::string(argv[1])+std::string(".yaml"));
|
|
99
|
+ std::ofstream out = std::ofstream(std::string("Rx-")+std::string(argv[2])+std::string(".yaml"));
|
90
|
100
|
//std::ofstream out = std::ofstream(std::string("k-coincident.yaml"));
|
91
|
101
|
out << *Kern;
|
92
|
102
|
out.close();
|