123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
-
-
-
-
-
-
- #include <random>
- #include "FDEM1D"
-
- using namespace Lemma;
-
- int main() {
-
- std::random_device rd;
- std::mt19937 gen(rd());
- std::discrete_distribution<> d({0,0,40, 10, 10, 40});
- int nl = d(gen);
-
- std::uniform_real_distribution<> dis(0, 1);
- VectorXcr con = VectorXcr(nl);
- VectorXr thick = VectorXr(nl-2);
- con(0) = 0;
- for ( int i=1; i<nl; ++i ) {
- con(i) = Complex(dis(gen), dis(gen));
- }
- for ( int i=0; i<nl-2; ++i ) {
- thick(i) = dis(gen);
- }
- auto Obj = LayeredEarthEM::NewSP();
- Obj->SetNumberOfLayers(nl);
- Obj->SetLayerConductivity(con);
- Obj->SetLayerThickness(thick);
-
- auto model2 = LayeredEarthEM::DeSerialize(Obj->Serialize());
-
- std::cout << *Obj << std::endl;
-
-
-
- }
|