Fixed coupling back to coupling rather than phase angle
authorTrevor Irons <tirons@egi.utah.edu>
Thu, 1 Dec 2016 23:54:04 +0000 (16:54 -0700)
committerTrevor Irons <tirons@egi.utah.edu>
Thu, 1 Dec 2016 23:54:04 +0000 (16:54 -0700)
examples/Coupling.cpp
src/Coupling.cpp

index ae61e63..a327684 100644 (file)
@@ -61,7 +61,7 @@ int main(int argc, char** argv) {
 
         Kern->SetIntegrationSize( (Vector3r() << 50,100,20).finished() );
         Kern->SetIntegrationOrigin( (Vector3r() << 0,0,0.01).finished() );
-        Kern->SetTolerance( 1e-2 ); // 1e-12
+        Kern->SetTolerance( 1e-12 ); // 1e-12
 
     std::vector<std::string> tx = {std::string("Coil 1")};//,std::string("Coil 2")};
     std::vector<std::string> rx = {std::string("Coil 2")};
index 89294af..b67856e 100644 (file)
@@ -252,9 +252,9 @@ namespace Lemma {
     //      Method:  f
     //--------------------------------------------------------------------------------------
     Complex Coupling::f( const Vector3r& r, const Real& volume, const Vector3cr& Ht, const Vector3cr& Hr ) {
-        //return volume * ( Ht.dot(Hr) );                              // coupling
+        return volume * ( Ht.dot(Hr) );                              // coupling
         //return volume * (1.-((Ht+Hr).norm()/(Hr.norm() + Ht.norm()))); // interference
-        return volume * std::acos( (Ht.dot(Hr) / (Ht.norm()*Hr.norm())) ); // angle
+        //return volume * std::acos( (Ht.dot(Hr) / (Ht.norm()*Hr.norm())) ); // angle
     }
 
     //--------------------------------------------------------------------------------------