Skip to content

Commit b8c60cf

Browse files
authored
Update Evolve.h
Avoid dot product bug in Hydra
1 parent ce8a09c commit b8c60cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/simulation/Evolve.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ namespace evolve{
241241
auto Vdrift = k1 +ref;
242242

243243
//calculate current with Ramo's theorem
244-
hydra::get<5>(p)=hydra::get<_tc_charge>(p)*HCHARGE*(Vdrift.dot(wfvec));
244+
hydra::get<5>(p)=hydra::get<_tc_charge>(p)*HCHARGE*(Vdrift.get(0)*wfvec.get(0)+Vdrift.get(1)*wfvec.get(1)+Vdrift.get(2)*wfvec.get(2));
245245
}
246246

247247
size_t _fN;
@@ -373,7 +373,7 @@ namespace evolve{
373373
auto Vdrift = k1 +ref;
374374

375375
//calculate current with Ramo's theorem
376-
hydra::get<5>(p)=hydra::get<_tc_charge>(p)*HCHARGE*(Vdrift.dot(wfvec));
376+
hydra::get<5>(p)=hydra::get<_tc_charge>(p)*HCHARGE*(Vdrift.get(0)*wfvec.get(0)+Vdrift.get(1)*wfvec.get(1)+Vdrift.get(2)*wfvec.get(2));
377377

378378
}
379379

0 commit comments

Comments
 (0)