Pārlūkot izejas kodu

Fixed templated FHT class compilation issues with forward declarations

add-code-of-conduct-1
Trevor Irons 6 gadus atpakaļ
vecāks
revīzija
b9c03aa7b6

+ 1
- 0
Modules/FDEM1D/examples/Hantenna.cpp Parādīt failu

@@ -30,6 +30,7 @@
30 30
 #if defined(__clang__)
31 31
 	/* Clang/LLVM. ---------------------------------------------- */
32 32
     const char* compiler = "clang";
33
+    const char* ver = __VERSION__;
33 34
 #elif defined(__ICC) || defined(__INTEL_COMPILER)
34 35
 	/* Intel ICC/ICPC. ------------------------------------------ */
35 36
     const char* compiler = "icpc";

+ 8
- 1
Modules/FDEM1D/include/FHT.h Parādīt failu

@@ -169,6 +169,13 @@ namespace Lemma {
169 169
 
170 170
     }; // -----  end of class  FHT  ----
171 171
 
172
+    // Forward declarations
173
+    template<>
174
+    const Eigen::Matrix<Real, Eigen::Dynamic, 3>  FHT<FHTKEY201>::WT;
175
+    template<>
176
+    const Eigen::Matrix<Real, Eigen::Dynamic, 3>  FHT<FHTKEY101>::WT;
177
+    template<>
178
+    const Eigen::Matrix<Real, Eigen::Dynamic, 3>  FHT<FHTKEY51>::WT;
172 179
 
173 180
     template < HANKELTRANSFORMTYPE Type >
174 181
     Complex FHT<Type>::Zgauss(const int& ii, const Lemma::EMMODE& mode, const int& jj, const Real& val,
@@ -186,7 +193,7 @@ namespace Lemma {
186 193
         return WT(0,0)/WT(1,0);
187 194
     }
188 195
 
189
-    /* specializations could provide slighly better performance */
196
+    /* specializations could provide slighly better performance by reducing divides */
190 197
 //     template < >
191 198
 //     Real FHT< FHTKEY201 >::GetABSER() {
192 199
 //         return WT(0,0)/WT(1,0);

+ 4
- 2
Modules/FDEM1D/include/HankelTransformFactory.h Parādīt failu

@@ -101,9 +101,11 @@ namespace Lemma {
101 101
                     //return FHTKey201::NewSP();
102 102
                     return FHT<FHTKEY201>::NewSP();
103 103
                 case FHTKEY101:
104
-                    return FHTKey101::NewSP();
104
+                    return FHT<FHTKEY101>::NewSP();
105
+                    //return FHTKey101::NewSP();
105 106
                 case FHTKEY51:
106
-                    return FHTKey51::NewSP();
107
+                    return FHT<FHTKEY51>::NewSP();
108
+                    //return FHTKey51::NewSP();
107 109
                 case CHAVE:
108 110
                     return GQChave::NewSP();
109 111
                 case QWEKEY:

+ 0
- 7
Modules/FDEM1D/src/DipoleSource.cpp Parādīt failu

@@ -932,17 +932,11 @@ namespace Lemma {
932 932
                             }
933 933
                             break;
934 934
                         case H:
935
-                            std::cout << "Fuck me gently with a chainsaw..." << std::endl;
936
-                            //std::cout << f.cols() << "\t" << f.rows() << std::endl;
937
-                            //std::cout << "kern" <<  KernelManager->GetRAWKernel(ik[5]);
938
-                            //std::cout << "Inputs\t" << TM << "\t" << rho << "\t" << wavef << "\t" << ik[5] << "\t" << KernelManager->GetRAWKernel(ik[5])<< std::endl;
939
-                            //Hankel->Zgauss(5, TM, 0, rho, wavef, nullptr);
940 935
                             f(5) = Hankel->Zgauss(5, TM, 0, rho, wavef, KernelManager->GetRAWKernel(ik[5]));
941 936
                             f(6) = Hankel->Zgauss(6, TM, 1, rho, wavef, KernelManager->GetRAWKernel(ik[6]));
942 937
                             f(7) = Hankel->Zgauss(7, TE, 0, rho, wavef, KernelManager->GetRAWKernel(ik[7]))*KernelManager->GetRAWKernel(ik[7])->GetZs()/KernelManager->GetRAWKernel(ik[7])->GetZm();
943 938
                             f(8) = Hankel->Zgauss(8, TE, 1, rho, wavef, KernelManager->GetRAWKernel(ik[8]))*KernelManager->GetRAWKernel(ik[8])->GetZs()/KernelManager->GetRAWKernel(ik[8])->GetZm();
944 939
                             f(9) = Hankel->Zgauss(9, TE, 1, rho, wavef, KernelManager->GetRAWKernel(ik[9]))*KernelManager->GetRAWKernel(ik[9])->GetZs()/KernelManager->GetRAWKernel(ik[9])->GetZm();
945
-                            std::cout << "HARDER!!!!" << std::endl;
946 940
                             if (std::abs(Pol[1]) > 0) {
947 941
                                 this->Receivers->AppendHfield(ifreq, irec,
948 942
                                         Pol[1]*QPI*(sps*f(5)+c2p*f(6)/rho-cps*f(7)+c2p*f(8)/rho)*Moment,
@@ -957,7 +951,6 @@ namespace Lemma {
957 951
                                     Pol[0]*Moment*QPI*sp*f(9) );
958 952
                                 // Analytic whole space solution
959 953
                             }
960
-                            //std::cout << "ahhhhhh!!!!!!!!!" << std::endl;
961 954
                             break;
962 955
 
963 956
                         case BOTH:

+ 0
- 6
Modules/FDEM1D/src/FHT.cpp Parādīt failu

@@ -22,12 +22,6 @@
22 22
 namespace Lemma {
23 23
 
24 24
     template<>
25
-    FHT<FHTKEY201>::FHT( const ctor_key& key ) : HankelTransform(key)
26
-    {
27
-
28
-    }
29
-
30
-    template<>
31 25
     const Eigen::Matrix<Real, Eigen::Dynamic, 3>  FHT<FHTKEY201>::WT =
32 26
         ( Eigen::Matrix<Real, 201, 3>()   <<
33 27
         // Base                   J0                      J1

Notiek ielāde…
Atcelt
Saglabāt