123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #include "Lemma"
- #include "banner.h"
-
- using namespace Lemma;
-
- int main () {
-
- VectorXr maintimes;
- int ntimes;
-
-
- std::string name;
- std::string version;
- std::string usage;
- name = "TEM Inversion - 1D";
- version = "1.0beta";
- usage = "teminv1d [inputfile]";
- banner(name,version,usage);
-
- PolygonalWireAntenna* Trans = PolygonalWireAntenna::New();
- ReceiverPoints* Receivers = ReceiverPoints::New();
- LayeredEarthEM* StartingMod = LayeredEarthEM::New();
-
- InverseSolverTEM1D* Inverse = InverseSolverTEM1D::New();
-
-
- Trans->SetNumberOfPoints(5);
- Trans->SetPoint(0, Vector3r( 0, 0, -1e-3));
- Trans->SetPoint(1, Vector3r( 100, 0, -1e-3));
- Trans->SetPoint(2, Vector3r( 100, 100, -1e-3));
- Trans->SetPoint(3, Vector3r( 0, 100, -1e-3));
- Trans->SetPoint(4, Vector3r( 0, 0, -1e-3));
- Trans->SetCurrent(1);
- Trans->SetNumberOfTurns(1);
- Trans->SetMinDipoleRatio(1/2.);
-
- Vector3r loc;
- Real ox = 50.;
- Real oy = 50.;
- Real depth = -1.e-3;
- Receivers->SetNumberOfReceivers(1);
- loc << ox,oy,depth;
- Receivers->SetLocation(0,loc);
-
- StartingMod->SetNumberOfLayers(22);
- StartingMod->SetLayerConductivity( (VectorXcr(22) << 0.,1.e-3,
- 1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,
- 1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3,1.e-3).finished() );
- StartingMod->SetLayerThickness((VectorXr(20)<<4,4,4,4,4,4,4,4,4,4,4,4,4,
- 4,4,4,4,4,4,4).finished());
-
- ntimes = 30;
- maintimes.resize(ntimes);
- maintimes << 36.,45.25,57.,72.25,92.,117.,148.,186.5,234.,290.,
- 352.5,427.5,525.,647.5,802.5,1002.5,1257.5,1582.5,1997.5,2525.,
- 3197.5,4055.,5147.5,6542.5,8322.5,10592.,13490.,17187.,21902.,
- 27915.;
- maintimes = maintimes.array() /1000000;
-
- Inverse->AttachStartMod(StartingMod);
- Inverse->AttachWireAntenna(Trans);
- Inverse->AttachReceiver(Receivers);
- Inverse->SetTimes(maintimes);
- LayeredEarthEM* RecoveredMod = StartingMod->Clone();
- Inverse->AttachRecMod(RecoveredMod);
-
-
-
- std::fstream infile("rotateddat.dat",std::ios::in);
- if (infile.fail()) {
- std::cout << "Shit!" << std::endl;
- }
- MatrixXr rotinpdata;
- rotinpdata.resize(30,1);
- for (int ii=0;ii<30;ii++) {
- infile >> rotinpdata(ii);
- }
- infile.close();
-
-
- Inverse->AttachMeasuredData(rotinpdata);
-
-
-
- std::cout << *Inverse << std::endl;
-
- Inverse->Calculate();
-
-
-
- Inverse->Delete();
- RecoveredMod->Delete();
- StartingMod->Delete();
- Receivers->Delete();
- Trans->Delete();
-
- return EXIT_SUCCESS;
- }
|