123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
-
-
-
-
-
-
- #include "DCIPElectrode.h"
- #include "DCSurvey.h"
-
- using namespace Lemma;
-
- int main() {
-
-
-
- DCIPElectrode* Electrode2 = DCIPElectrode::New();
- DCIPElectrode* Electrode3 = DCIPElectrode::New();
- DCIPElectrode* Electrode4 = DCIPElectrode::New();
- DCIPElectrode* Electrode5 = DCIPElectrode::New();
- DCIPElectrode* Electrode6 = DCIPElectrode::New();
- DCIPElectrode* Electrode7 = DCIPElectrode::New();
- DCIPElectrode* Electrode8 = DCIPElectrode::New();
- DCIPElectrode* Electrode9 = DCIPElectrode::New();
-
-
- Electrode2->SetLocation( Vector3r( 13.23, 18.1, -25 ) );
- Electrode3->SetLocation( Vector3r( 13.23, 18.1, -25 ) );
- Electrode4->SetLocation( Vector3r( 13.23, 18.1, -25 ) );
- Electrode4->SetLocation( Vector3r( 13.23, 18.1, -25 ) );
- Electrode5->SetLocation( Vector3r( 13.23, 18.1, -25 ) );
- Electrode6->SetLocation( Vector3r( 13.23, 18.1, -25 ) );
- Electrode7->SetLocation( Vector3r( 13.23, 18.1, -25 ) );
- Electrode8->SetLocation( Vector3r( 13.23, 18.1, -25 ) );
- Electrode9->SetLocation( Vector3r( 13.23, 18.1, -25 ) );
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- DCSurvey* Survey = DCSurvey::New();
-
- DCIPElectrode* Electrode1 = Survey->PoundElectrode( Vector3r( 13.23, 18.1, -25 ), "L0-E0" );
- Survey->PoundElectrode( Electrode2 , "L0-E1" );
- Survey->PoundElectrode( Electrode3 , "L0-E2" );
- Survey->PoundElectrode( Electrode4 , "L0-E3" );
- Survey->PoundElectrode( Electrode5 , "L0-E4" );
- Survey->PoundElectrode( Electrode6 , "L0-E5" );
- Survey->PoundElectrode( Electrode7 , "L0-E6" );
- Survey->PoundElectrode( Electrode8 , "L0-E7" );
- Survey->PoundElectrode( Electrode9 , "L0-E8" );
-
- int J0 = Survey->AddInjection( Electrode1, Electrode2, 1.0 );
- Survey->AddMeasurement(J0, Electrode3, Electrode4 );
- Survey->AddMeasurement(J0, Electrode5, Electrode6 );
- Survey->AddMeasurement(J0, Electrode6, Electrode7 );
- Survey->AddMeasurement(J0, "L0-E7", "L0-E8" );
-
- int J1 = Survey->AddInjection( Electrode2, Electrode3, 1.0 );
- Survey->AddMeasurement(J1, Electrode3, Electrode4 );
- Survey->AddMeasurement(J1, Electrode5, Electrode6 );
- Survey->AddMeasurement(J1, Electrode6, Electrode7 );
-
- int J2 = Survey->AddInjection( Electrode3, Electrode4, 1.0 );
- Survey->AddMeasurement(J2, Electrode3, Electrode4 );
- Survey->AddMeasurement(J2, Electrode5, Electrode6 );
- Survey->AddMeasurement(J2, Electrode6, Electrode7 );
-
-
- std::cout << *Survey << std::endl;
-
- std::ofstream outstr("DC.yaml");
- outstr << *Survey << std::endl;
- outstr.close();
-
- Survey->Delete();
-
-
-
- std::ifstream ifstr2("DC.yaml");
- YAML::Node node2 = YAML::Load(ifstr2);
- DCSurvey* Survey2 = DCSurvey::DeSerialize(node2);
-
- std::cout << "==============================================================\n";
- std::cout << *Survey2 << std::endl;
-
- return(EXIT_SUCCESS);
-
- }
|