@@ -359,6 +359,7 @@ int Hermes::init(bool restarting) {
359359
360360 OPTION (optsc, ne_hyper_z, -1.0 );
361361 OPTION (optsc, pe_hyper_z, -1.0 );
362+ OPTION (optsc, pi_hyper_z, -1.0 );
362363
363364 OPTION (optsc, low_n_diffuse, false );
364365 OPTION (optsc, low_n_diffuse_perp, false );
@@ -701,7 +702,6 @@ int Hermes::init(bool restarting) {
701702 .doc (" Include a fixed fraction carbon impurity. < 0 means none." )
702703 .withDefault (-1 .);
703704 if (carbon_fraction > 0.0 ) {
704- SAVE_REPEAT (Rzrad);
705705 SAVE_ONCE (carbon_fraction);
706706 carbon_rad = new HutchinsonCarbonRadiation ();
707707 }
@@ -1870,6 +1870,7 @@ int Hermes::rhs(BoutReal t) {
18701870 Vi (r.ind , jy, jz) = -Vi (r.ind , mesh->ystart , jz);
18711871 NVi (r.ind , jy, jz) = -NVi (r.ind , mesh->ystart , jz);
18721872 Ve (r.ind , jy, jz) = -Ve (r.ind , mesh->ystart , jz);
1873+ VePsi (r.ind , jy, jz) = -VePsi (r.ind , mesh->ystart , jz);
18731874 Jpar (r.ind , jy, jz) = -Jpar (r.ind , mesh->ystart , jz);
18741875 }
18751876 }
@@ -3428,6 +3429,10 @@ int Hermes::rhs(BoutReal t) {
34283429 (2 . / 3 ) * FV::Div_a_Laplace_perp (anomalous_chi * DC (Ne), DC (Ti));
34293430 }
34303431
3432+ if (pi_hyper_z > 0.0 ) {
3433+ ddt (Pi) -= pi_hyper_z * SQ (SQ (coord->dz )) * D4DZ4 (Pi);
3434+ }
3435+
34313436 // /////////////////////////////////
34323437 // Heat transmission through sheath
34333438
@@ -4007,7 +4012,7 @@ int Hermes::rhs(BoutReal t) {
40074012 * @param[in] delta Not used here
40084013 */
40094014int Hermes::precon (BoutReal t, BoutReal gamma, BoutReal delta) {
4010- static InvertPar * inv = NULL ;
4015+ static std::unique_ptr< InvertPar> inv;
40114016 if (!inv) {
40124017 // Initialise parallel inversion class
40134018 auto inv = InvertPar::create ();
0 commit comments