|
@@ -325,7 +325,6 @@ namespace Lemma {
|
325
|
325
|
|
326
|
326
|
|
327
|
327
|
|
328
|
|
-#if 1
|
329
|
328
|
VectorXcr KernelV0::f( const Vector3r& r, const Real& volume, const Vector3cr& Ht, const Vector3cr& Hr ) {
|
330
|
329
|
|
331
|
330
|
|
|
@@ -352,26 +351,9 @@ namespace Lemma {
|
352
|
351
|
|
353
|
352
|
Real sintheta = std::sin(0.5*GAMMA*PulseI(iq)*Taup*(EBT.alpha-EBT.beta));
|
354
|
353
|
F(iq) = -volume*Complex(0,Larmor)*Mn0Abs*(EBR.alpha+EBR.beta)*ejztr*sintheta*PhaseTerm;
|
355
|
|
-
|
356
|
|
-
|
357
|
|
-
|
358
|
|
-
|
359
|
|
-
|
360
|
|
-
|
361
|
|
-
|
362
|
|
-
|
363
|
354
|
}
|
364
|
|
-
|
365
|
|
- return F;
|
366
|
|
- }
|
367
|
|
-#endif
|
368
|
|
-#if 0
|
369
|
|
- VectorXcr KernelV0::f( const Vector3r& r, const Real& volume, const Vector3cr& Ht, const Vector3cr& Hr ) {
|
370
|
|
- VectorXcr F = VectorXcr::Ones( PulseI.size() );
|
371
|
|
- F.array() *= volume * Complex(Ht.norm(), Hr.norm());
|
372
|
355
|
return F;
|
373
|
356
|
}
|
374
|
|
-#endif
|
375
|
357
|
|
376
|
358
|
|
377
|
359
|
|
|
@@ -404,8 +386,8 @@ namespace Lemma {
|
404
|
386
|
|
405
|
387
|
|
406
|
388
|
|
407
|
|
-
|
408
|
|
-
|
|
389
|
+
|
|
390
|
+
|
409
|
391
|
EllipticB ElipB = EllipticB();
|
410
|
392
|
Vector3cr Bperp = B - B0hat.dot(B)*B0hat;
|
411
|
393
|
Real BperpNorm = Bperp.norm();
|
|
@@ -415,8 +397,13 @@ namespace Lemma {
|
415
|
397
|
VectorXcr iB0 = Complex(0,1)*B0hat.cast<Complex>().array();
|
416
|
398
|
ElipB.eizt = std::sqrt(Bp2 / std::abs(Bp2));
|
417
|
399
|
ElipB.alpha = INVSQRT2*std::sqrt(BperpNorm*BperpNorm + std::abs(Bp2));
|
418
|
|
- ElipB.beta = std::copysign(1, std::real(iB0.dot( Bperp.cross(Bperp.conjugate())) )) *
|
|
400
|
+
|
|
401
|
+ ElipB.beta = sgn( std::real(iB0.dot( Bperp.cross(Bperp.conjugate())) )) *
|
419
|
402
|
(INVSQRT2*std::sqrt(BperpNorm*BperpNorm - std::abs(Bp2)));
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+ if (ElipB.beta != ElipB.beta) ElipB.beta = 0;
|
420
|
407
|
ElipB.bhat = ((Real)1./ElipB.alpha)*(((Real)1./ElipB.eizt)*Bperp.array()).real().array();
|
421
|
408
|
ElipB.bhatp = B0hat.cross(ElipB.bhat);
|
422
|
409
|
ElipB.zeta = std::real(std::log(ElipB.eizt)/Complex(0,1));
|
|
@@ -468,7 +455,6 @@ namespace Lemma {
|
468
|
455
|
0, step[1], step[2],
|
469
|
456
|
step[0], step[1], step[2] ).finished();
|
470
|
457
|
|
471
|
|
- MatrixXcr kvals(8, PulseI.size());
|
472
|
458
|
cpoints->ClearFields();
|
473
|
459
|
for (int ichild=0; ichild<8; ++ichild) {
|
474
|
460
|
Vector3r cp = pos;
|
|
@@ -498,6 +484,7 @@ namespace Lemma {
|
498
|
484
|
}
|
499
|
485
|
}
|
500
|
486
|
|
|
487
|
+ MatrixXcr kvals(8, PulseI.size());
|
501
|
488
|
for (int ichild=0; ichild<8; ++ichild) {
|
502
|
489
|
Vector3r cp = pos;
|
503
|
490
|
cp += posadd.row(ichild);
|