Parcourir la source

Fixed coupling back to coupling rather than phase angle

master
Trevor Irons il y a 7 ans
Parent
révision
ad7c692c63
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 1
    1
      examples/Coupling.cpp
  2. 2
    2
      src/Coupling.cpp

+ 1
- 1
examples/Coupling.cpp Voir le fichier

61
 
61
 
62
         Kern->SetIntegrationSize( (Vector3r() << 50,100,20).finished() );
62
         Kern->SetIntegrationSize( (Vector3r() << 50,100,20).finished() );
63
         Kern->SetIntegrationOrigin( (Vector3r() << 0,0,0.01).finished() );
63
         Kern->SetIntegrationOrigin( (Vector3r() << 0,0,0.01).finished() );
64
-        Kern->SetTolerance( 1e-2 ); // 1e-12
64
+        Kern->SetTolerance( 1e-12 ); // 1e-12
65
 
65
 
66
     std::vector<std::string> tx = {std::string("Coil 1")};//,std::string("Coil 2")};
66
     std::vector<std::string> tx = {std::string("Coil 1")};//,std::string("Coil 2")};
67
     std::vector<std::string> rx = {std::string("Coil 2")};
67
     std::vector<std::string> rx = {std::string("Coil 2")};

+ 2
- 2
src/Coupling.cpp Voir le fichier

252
     //      Method:  f
252
     //      Method:  f
253
     //--------------------------------------------------------------------------------------
253
     //--------------------------------------------------------------------------------------
254
     Complex Coupling::f( const Vector3r& r, const Real& volume, const Vector3cr& Ht, const Vector3cr& Hr ) {
254
     Complex Coupling::f( const Vector3r& r, const Real& volume, const Vector3cr& Ht, const Vector3cr& Hr ) {
255
-        //return volume * ( Ht.dot(Hr) );                              // coupling
255
+        return volume * ( Ht.dot(Hr) );                              // coupling
256
         //return volume * (1.-((Ht+Hr).norm()/(Hr.norm() + Ht.norm()))); // interference
256
         //return volume * (1.-((Ht+Hr).norm()/(Hr.norm() + Ht.norm()))); // interference
257
-        return volume * std::acos( (Ht.dot(Hr) / (Ht.norm()*Hr.norm())) ); // angle
257
+        //return volume * std::acos( (Ht.dot(Hr) / (Ht.norm()*Hr.norm())) ); // angle
258
     }
258
     }
259
 
259
 
260
     //--------------------------------------------------------------------------------------
260
     //--------------------------------------------------------------------------------------

Chargement…
Annuler
Enregistrer