|
@@ -147,10 +147,10 @@ namespace Lemma {
|
147
|
147
|
std::vector< std::shared_ptr<KernelEM1DBase> > KernelVec;
|
148
|
148
|
|
149
|
149
|
/** Reflection base used for TE mode */
|
150
|
|
- std::shared_ptr<KernelEM1DReflBase> TEReflBase;
|
|
150
|
+ std::shared_ptr<KernelEM1DReflBase> TEReflBase = nullptr;
|
151
|
151
|
|
152
|
152
|
/** Reflection base used for TM mode */
|
153
|
|
- std::shared_ptr<KernelEM1DReflBase> TMReflBase;
|
|
153
|
+ std::shared_ptr<KernelEM1DReflBase> TMReflBase = nullptr;
|
154
|
154
|
|
155
|
155
|
/** EmEarth Class */
|
156
|
156
|
std::shared_ptr<LayeredEarthEM> Earth;
|
|
@@ -175,8 +175,7 @@ namespace Lemma {
|
175
|
175
|
int KernelEM1DManager::AddKernel( ) {
|
176
|
176
|
|
177
|
177
|
auto NewKern = KernelEM1DSpec<Mode, Ikernel, Isource, Irecv>::NewSP();
|
178
|
|
- KernelVec.push_back( NewKern );
|
179
|
|
- NewKern->managerIdx = KernelVec.size()-1;
|
|
178
|
+ NewKern->managerIdx = KernelVec.size();
|
180
|
179
|
switch (Mode) {
|
181
|
180
|
case TE:
|
182
|
181
|
if (TEReflBase == nullptr) {
|
|
@@ -197,6 +196,7 @@ namespace Lemma {
|
197
|
196
|
NewKern->SetReflBase(TMReflBase);
|
198
|
197
|
break;
|
199
|
198
|
}
|
|
199
|
+ KernelVec.push_back( std::move(NewKern) );
|
200
|
200
|
return static_cast<int>(KernelVec.size()-1);
|
201
|
201
|
}
|
202
|
202
|
|