From b2de224a3ef7040834c2858346c2a9e0ddba1308 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Fri, 1 Sep 2023 09:04:19 -0400 Subject: [PATCH 01/19] During the course of the bhat-fix development, there was a point (commit 8cbf3d9) after the discovery of the missing mass factor in the consistent div(p_par b) pressure force in which low-guide field force-free reconnection stably ran well past the point of peak reconnection. Unfortunately, in the subsequent clean up of pkpm over the next month in preparation for the bhat-fix branch merge, low guide field reconnection became less robust (still much more robust than before all the bhat-fix work, but less robust than commit 8cbf3d9). There were two further core changes in the subsequent clean up. The first was the final elimination of recovery from the PKPM algorithm so that the parallel streaming is handled with a modified Lax flux: vpar/2 ( {{b}}{{F}} - max(|b_i|)/2 sign(vpar) (F^+ - F^-) ), which reduces to our upwind flux in the limit that b_l = b_r. The second was a switch to computing *surface* expansions of derived quantities such as b, u, p_ij, etc, under the logic that because all these derived quantities are computed with weak equality (especially weak division in many places), a more accurate representation of these quantities is to evaluate the base quantity at the relevant surfaces before doing the weak operations. This branch will explore reverting the second development. It is possible the second development is less robust without corresponding changes to the volume kernels, since the volume kernels are inclusive of the boundaries but in the current formulation with the "more accurate" surface expansions, the interior volumes are, in a sense, disconnected from the edges. In fact, this disconnection may be why all the robust entropy-stable DG schemes use high order Gauss-Lobatto quadrature, so that quantities computed at the surface are included in the volume integral evaluation. More testing is needed (moving to Frontera and GPU machines to run force-free). Right now just changing b_hat. If this improves things, we will change u and p_ij as well to match this program flow --- apps/gkyl_vlasov_priv.h | 3 - apps/vm_field.c | 5 +- kernels/maxwell/em_calc_surf_BB_1x_ser_p1.c | 42 - kernels/maxwell/em_calc_surf_BB_1x_ser_p2.c | 42 - kernels/maxwell/em_calc_surf_BB_2x_ser_p1.c | 103 - .../maxwell/em_calc_surf_BB_2x_tensor_p2.c | 115 - kernels/maxwell/em_calc_surf_BB_3x_ser_p1.c | 183 - .../maxwell/em_calc_surf_BB_3x_tensor_p2.c | 273 -- kernels/maxwell/em_surf_copy_bvar_1x_ser_p1.c | 55 - kernels/maxwell/em_surf_copy_bvar_1x_ser_p2.c | 55 - kernels/maxwell/em_surf_copy_bvar_2x_ser_p1.c | 157 - .../maxwell/em_surf_copy_bvar_2x_tensor_p2.c | 191 - kernels/maxwell/em_surf_copy_bvar_3x_ser_p1.c | 326 -- .../maxwell/em_surf_copy_bvar_3x_tensor_p2.c | 581 --- kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c | 81 +- kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c | 81 +- kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c | 249 +- .../maxwell/em_surf_set_bvar_2x_tensor_p2.c | 443 +-- kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c | 473 +-- .../maxwell/em_surf_set_bvar_3x_tensor_p2.c | 3188 ++--------------- kernels/maxwell/gkyl_maxwell_kernels.h | 32 +- zero/dg_calc_em_vars.c | 69 +- zero/dg_calc_em_vars_cu.cu | 82 +- zero/gkyl_dg_calc_em_vars.h | 15 +- zero/gkyl_dg_calc_em_vars_priv.h | 95 +- 25 files changed, 657 insertions(+), 6282 deletions(-) delete mode 100644 kernels/maxwell/em_calc_surf_BB_1x_ser_p1.c delete mode 100644 kernels/maxwell/em_calc_surf_BB_1x_ser_p2.c delete mode 100644 kernels/maxwell/em_calc_surf_BB_2x_ser_p1.c delete mode 100644 kernels/maxwell/em_calc_surf_BB_2x_tensor_p2.c delete mode 100644 kernels/maxwell/em_calc_surf_BB_3x_ser_p1.c delete mode 100644 kernels/maxwell/em_calc_surf_BB_3x_tensor_p2.c delete mode 100644 kernels/maxwell/em_surf_copy_bvar_1x_ser_p1.c delete mode 100644 kernels/maxwell/em_surf_copy_bvar_1x_ser_p2.c delete mode 100644 kernels/maxwell/em_surf_copy_bvar_2x_ser_p1.c delete mode 100644 kernels/maxwell/em_surf_copy_bvar_2x_tensor_p2.c delete mode 100644 kernels/maxwell/em_surf_copy_bvar_3x_ser_p1.c delete mode 100644 kernels/maxwell/em_surf_copy_bvar_3x_tensor_p2.c diff --git a/apps/gkyl_vlasov_priv.h b/apps/gkyl_vlasov_priv.h index 1758a5b3e..36c3ae87a 100644 --- a/apps/gkyl_vlasov_priv.h +++ b/apps/gkyl_vlasov_priv.h @@ -302,9 +302,6 @@ struct vm_field { // Determined when constructing the matrix if |B|^2 < 0.0 at control points struct gkyl_array *bvar; // magnetic field unit vector and tensor (diagnostic and for use in pkpm model) struct gkyl_array *ExB; // E x B velocity = E x B/|B|^2 (diagnostic and for use in relativistic pkpm model) - struct gkyl_array *cell_avg_magB2_surf; // Integer array for whether |B|^2 *only* uses cell averages for weak division on a surface - // 2*cdim components, defined on each individual surface (xl, xr, yl, yr, zl, & zr) - // Determined when constructing the matrix if |B|^2 < 0.0 at control points struct gkyl_array *bvar_surf; // Surface expansion magnetic field unit vector and tensor (for use in pkpm model) struct gkyl_array *div_b; // Volume expansion of div(b) (for use in pkpm model) struct gkyl_array *max_b; // max(|b_i|) penalization (for use in pkpm model) diff --git a/apps/vm_field.c b/apps/vm_field.c index d6765ace5..0f46ad7a4 100644 --- a/apps/vm_field.c +++ b/apps/vm_field.c @@ -77,7 +77,6 @@ vm_field_new(struct gkyl_vm *vm, struct gkyl_vlasov_app *app) int cdim = app->cdim; int Ncomp_surf = 2*cdim*4; int Nbasis_surf = app->confBasis.num_basis/(app->confBasis.poly_order + 1); // *only valid for tensor bases for cdim > 1* - f->cell_avg_magB2_surf = mk_int_arr(app->use_gpu, 2*cdim, app->local_ext.volume); f->bvar_surf = mkarr(app->use_gpu, Ncomp_surf*Nbasis_surf, app->local_ext.volume); // Volume expansion of div(b) f->div_b = mkarr(app->use_gpu, app->confBasis.num_basis, app->local_ext.volume); @@ -278,8 +277,7 @@ vm_field_calc_bvar(gkyl_vlasov_app *app, struct vm_field *field, // unit vector and unit tensor are defined everywhere in the domain gkyl_dg_calc_em_vars_advance(field->calc_bvar, field->tot_em, field->cell_avg_magB2, field->bvar); - gkyl_dg_calc_em_vars_surf_advance(field->calc_bvar, field->tot_em, - field->cell_avg_magB2_surf, field->bvar_surf); + gkyl_dg_calc_em_vars_surf_advance(field->calc_bvar, field->bvar, field->bvar_surf); // Compute div(b) and max_b = max(|b_i_l|, |b_i_r|) gkyl_array_clear(field->div_b, 0.0); // Incremented in each dimension, so clear beforehand @@ -471,7 +469,6 @@ vm_field_release(const gkyl_vlasov_app* app, struct vm_field *f) gkyl_array_release(f->cell_avg_magB2); gkyl_array_release(f->bvar); gkyl_array_release(f->ExB); - gkyl_array_release(f->cell_avg_magB2_surf); gkyl_array_release(f->bvar_surf); gkyl_array_release(f->div_b); gkyl_array_release(f->max_b); diff --git a/kernels/maxwell/em_calc_surf_BB_1x_ser_p1.c b/kernels/maxwell/em_calc_surf_BB_1x_ser_p1.c deleted file mode 100644 index 1d68d8c66..000000000 --- a/kernels/maxwell/em_calc_surf_BB_1x_ser_p1.c +++ /dev/null @@ -1,42 +0,0 @@ -#include -GKYL_CU_DH void em_calc_surf_BB_1x_ser_p1(const double *em, double* GKYL_RESTRICT out_surf) -{ - // em: Input electromagnetic fields. - // out_surf: Output [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - - double *Bx_sq_xl = &out_surf[0]; - double *Bx_sq_xr = &out_surf[1]; - double *By_sq_xl = &out_surf[2]; - double *By_sq_xr = &out_surf[3]; - double *Bz_sq_xl = &out_surf[4]; - double *Bz_sq_xr = &out_surf[5]; - double *B_x_B_y_xl = &out_surf[6]; - double *B_x_B_y_xr = &out_surf[7]; - double *B_x_B_z_xl = &out_surf[8]; - double *B_x_B_z_xr = &out_surf[9]; - - const double *B_x = &em[6]; - const double *B_y = &em[8]; - const double *B_z = &em[10]; - - double B_x_l = 0.7071067811865475*B_x[0]-1.224744871391589*B_x[1]; - double B_x_r = 1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - double B_y_l = 0.7071067811865475*B_y[0]-1.224744871391589*B_y[1]; - double B_y_r = 1.224744871391589*B_y[1]+0.7071067811865475*B_y[0]; - double B_z_l = 0.7071067811865475*B_z[0]-1.224744871391589*B_z[1]; - double B_z_r = 1.224744871391589*B_z[1]+0.7071067811865475*B_z[0]; - Bx_sq_xl[0] = B_x_l*B_x_l; - By_sq_xl[0] = B_y_l*B_y_l; - Bz_sq_xl[0] = B_z_l*B_z_l; - B_x_B_y_xl[0] = B_x_l*B_y_l; - B_x_B_z_xl[0] = B_x_l*B_z_l; - Bx_sq_xr[0] = B_x_r*B_x_r; - By_sq_xr[0] = B_y_r*B_y_r; - Bz_sq_xr[0] = B_z_r*B_z_r; - B_x_B_y_xr[0] = B_x_r*B_y_r; - B_x_B_z_xr[0] = B_x_r*B_z_r; - -} - diff --git a/kernels/maxwell/em_calc_surf_BB_1x_ser_p2.c b/kernels/maxwell/em_calc_surf_BB_1x_ser_p2.c deleted file mode 100644 index fd0b51a33..000000000 --- a/kernels/maxwell/em_calc_surf_BB_1x_ser_p2.c +++ /dev/null @@ -1,42 +0,0 @@ -#include -GKYL_CU_DH void em_calc_surf_BB_1x_ser_p2(const double *em, double* GKYL_RESTRICT out_surf) -{ - // em: Input electromagnetic fields. - // out_surf: Output [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - - double *Bx_sq_xl = &out_surf[0]; - double *Bx_sq_xr = &out_surf[1]; - double *By_sq_xl = &out_surf[2]; - double *By_sq_xr = &out_surf[3]; - double *Bz_sq_xl = &out_surf[4]; - double *Bz_sq_xr = &out_surf[5]; - double *B_x_B_y_xl = &out_surf[6]; - double *B_x_B_y_xr = &out_surf[7]; - double *B_x_B_z_xl = &out_surf[8]; - double *B_x_B_z_xr = &out_surf[9]; - - const double *B_x = &em[9]; - const double *B_y = &em[12]; - const double *B_z = &em[15]; - - double B_x_l = 1.58113883008419*B_x[2]-1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - double B_x_r = 1.58113883008419*B_x[2]+1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - double B_y_l = 1.58113883008419*B_y[2]-1.224744871391589*B_y[1]+0.7071067811865475*B_y[0]; - double B_y_r = 1.58113883008419*B_y[2]+1.224744871391589*B_y[1]+0.7071067811865475*B_y[0]; - double B_z_l = 1.58113883008419*B_z[2]-1.224744871391589*B_z[1]+0.7071067811865475*B_z[0]; - double B_z_r = 1.58113883008419*B_z[2]+1.224744871391589*B_z[1]+0.7071067811865475*B_z[0]; - Bx_sq_xl[0] = B_x_l*B_x_l; - By_sq_xl[0] = B_y_l*B_y_l; - Bz_sq_xl[0] = B_z_l*B_z_l; - B_x_B_y_xl[0] = B_x_l*B_y_l; - B_x_B_z_xl[0] = B_x_l*B_z_l; - Bx_sq_xr[0] = B_x_r*B_x_r; - By_sq_xr[0] = B_y_r*B_y_r; - Bz_sq_xr[0] = B_z_r*B_z_r; - B_x_B_y_xr[0] = B_x_r*B_y_r; - B_x_B_z_xr[0] = B_x_r*B_z_r; - -} - diff --git a/kernels/maxwell/em_calc_surf_BB_2x_ser_p1.c b/kernels/maxwell/em_calc_surf_BB_2x_ser_p1.c deleted file mode 100644 index 809a7aca2..000000000 --- a/kernels/maxwell/em_calc_surf_BB_2x_ser_p1.c +++ /dev/null @@ -1,103 +0,0 @@ -#include -#include -GKYL_CU_DH void em_calc_surf_BB_2x_ser_p1(const double *em, double* GKYL_RESTRICT out_surf) -{ - // em: Input electromagnetic fields. - // out_surf: Output [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - - double *Bx_sq_xl = &out_surf[0]; - double *Bx_sq_xr = &out_surf[2]; - double *By_sq_xl = &out_surf[4]; - double *By_sq_xr = &out_surf[6]; - double *Bz_sq_xl = &out_surf[8]; - double *Bz_sq_xr = &out_surf[10]; - double *B_x_B_y_xl = &out_surf[12]; - double *B_x_B_y_xr = &out_surf[14]; - double *B_x_B_z_xl = &out_surf[16]; - double *B_x_B_z_xr = &out_surf[18]; - - double *Bx_sq_yl = &out_surf[20]; - double *Bx_sq_yr = &out_surf[22]; - double *By_sq_yl = &out_surf[24]; - double *By_sq_yr = &out_surf[26]; - double *Bz_sq_yl = &out_surf[28]; - double *Bz_sq_yr = &out_surf[30]; - double *B_x_B_y_yl = &out_surf[32]; - double *B_x_B_y_yr = &out_surf[34]; - double *B_y_B_z_yl = &out_surf[36]; - double *B_y_B_z_yr = &out_surf[38]; - - const double *B_x = &em[12]; - const double *B_y = &em[16]; - const double *B_z = &em[20]; - - double B_x_xl[2] = {0.0}; - double B_x_xr[2] = {0.0}; - double B_y_xl[2] = {0.0}; - double B_y_xr[2] = {0.0}; - double B_z_xl[2] = {0.0}; - double B_z_xr[2] = {0.0}; - - B_x_xl[0] = 0.7071067811865475*B_x[0]-1.224744871391589*B_x[1]; - B_x_xl[1] = 0.7071067811865475*B_x[2]-1.224744871391589*B_x[3]; - B_x_xr[0] = 1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xr[1] = 1.224744871391589*B_x[3]+0.7071067811865475*B_x[2]; - B_y_xl[0] = 0.7071067811865475*B_y[0]-1.224744871391589*B_y[1]; - B_y_xl[1] = 0.7071067811865475*B_y[2]-1.224744871391589*B_y[3]; - B_y_xr[0] = 1.224744871391589*B_y[1]+0.7071067811865475*B_y[0]; - B_y_xr[1] = 1.224744871391589*B_y[3]+0.7071067811865475*B_y[2]; - B_z_xl[0] = 0.7071067811865475*B_z[0]-1.224744871391589*B_z[1]; - B_z_xl[1] = 0.7071067811865475*B_z[2]-1.224744871391589*B_z[3]; - B_z_xr[0] = 1.224744871391589*B_z[1]+0.7071067811865475*B_z[0]; - B_z_xr[1] = 1.224744871391589*B_z[3]+0.7071067811865475*B_z[2]; - // Calculate B_i B_j on the left x interface. - binop_mul_1d_ser_p1(B_x_xl, B_x_xl, Bx_sq_xl); - binop_mul_1d_ser_p1(B_y_xl, B_y_xl, By_sq_xl); - binop_mul_1d_ser_p1(B_z_xl, B_z_xl, Bz_sq_xl); - binop_mul_1d_ser_p1(B_x_xl, B_y_xl, B_x_B_y_xl); - binop_mul_1d_ser_p1(B_x_xl, B_z_xl, B_x_B_z_xl); - - // Calculate B_i B_j on the right x interface. - binop_mul_1d_ser_p1(B_x_xr, B_x_xr, Bx_sq_xr); - binop_mul_1d_ser_p1(B_y_xr, B_y_xr, By_sq_xr); - binop_mul_1d_ser_p1(B_z_xr, B_z_xr, Bz_sq_xr); - binop_mul_1d_ser_p1(B_x_xr, B_y_xr, B_x_B_y_xr); - binop_mul_1d_ser_p1(B_x_xr, B_z_xr, B_x_B_z_xr); - - double B_x_yl[2] = {0.0}; - double B_x_yr[2] = {0.0}; - double B_y_yl[2] = {0.0}; - double B_y_yr[2] = {0.0}; - double B_z_yl[2] = {0.0}; - double B_z_yr[2] = {0.0}; - - B_x_yl[0] = 0.7071067811865475*B_x[0]-1.224744871391589*B_x[2]; - B_x_yl[1] = 0.7071067811865475*B_x[1]-1.224744871391589*B_x[3]; - B_x_yr[0] = 1.224744871391589*B_x[2]+0.7071067811865475*B_x[0]; - B_x_yr[1] = 1.224744871391589*B_x[3]+0.7071067811865475*B_x[1]; - B_y_yl[0] = 0.7071067811865475*B_y[0]-1.224744871391589*B_y[2]; - B_y_yl[1] = 0.7071067811865475*B_y[1]-1.224744871391589*B_y[3]; - B_y_yr[0] = 1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yr[1] = 1.224744871391589*B_y[3]+0.7071067811865475*B_y[1]; - B_z_yl[0] = 0.7071067811865475*B_z[0]-1.224744871391589*B_z[2]; - B_z_yl[1] = 0.7071067811865475*B_z[1]-1.224744871391589*B_z[3]; - B_z_yr[0] = 1.224744871391589*B_z[2]+0.7071067811865475*B_z[0]; - B_z_yr[1] = 1.224744871391589*B_z[3]+0.7071067811865475*B_z[1]; - // Calculate B_i B_j on the left y interface. - binop_mul_1d_ser_p1(B_x_yl, B_x_yl, Bx_sq_yl); - binop_mul_1d_ser_p1(B_y_yl, B_y_yl, By_sq_yl); - binop_mul_1d_ser_p1(B_z_yl, B_z_yl, Bz_sq_yl); - binop_mul_1d_ser_p1(B_x_yl, B_y_yl, B_x_B_y_yl); - binop_mul_1d_ser_p1(B_y_yl, B_z_yl, B_y_B_z_yl); - - // Calculate B_i B_j on the right y interface. - binop_mul_1d_ser_p1(B_x_yr, B_x_yr, Bx_sq_yr); - binop_mul_1d_ser_p1(B_y_yr, B_y_yr, By_sq_yr); - binop_mul_1d_ser_p1(B_z_yr, B_z_yr, Bz_sq_yr); - binop_mul_1d_ser_p1(B_x_yr, B_y_yr, B_x_B_y_yr); - binop_mul_1d_ser_p1(B_y_yr, B_z_yr, B_y_B_z_yr); - -} - diff --git a/kernels/maxwell/em_calc_surf_BB_2x_tensor_p2.c b/kernels/maxwell/em_calc_surf_BB_2x_tensor_p2.c deleted file mode 100644 index 9443f4cfd..000000000 --- a/kernels/maxwell/em_calc_surf_BB_2x_tensor_p2.c +++ /dev/null @@ -1,115 +0,0 @@ -#include -#include -GKYL_CU_DH void em_calc_surf_BB_2x_tensor_p2(const double *em, double* GKYL_RESTRICT out_surf) -{ - // em: Input electromagnetic fields. - // out_surf: Output [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - - double *Bx_sq_xl = &out_surf[0]; - double *Bx_sq_xr = &out_surf[3]; - double *By_sq_xl = &out_surf[6]; - double *By_sq_xr = &out_surf[9]; - double *Bz_sq_xl = &out_surf[12]; - double *Bz_sq_xr = &out_surf[15]; - double *B_x_B_y_xl = &out_surf[18]; - double *B_x_B_y_xr = &out_surf[21]; - double *B_x_B_z_xl = &out_surf[24]; - double *B_x_B_z_xr = &out_surf[27]; - - double *Bx_sq_yl = &out_surf[30]; - double *Bx_sq_yr = &out_surf[33]; - double *By_sq_yl = &out_surf[36]; - double *By_sq_yr = &out_surf[39]; - double *Bz_sq_yl = &out_surf[42]; - double *Bz_sq_yr = &out_surf[45]; - double *B_x_B_y_yl = &out_surf[48]; - double *B_x_B_y_yr = &out_surf[51]; - double *B_y_B_z_yl = &out_surf[54]; - double *B_y_B_z_yr = &out_surf[57]; - - const double *B_x = &em[27]; - const double *B_y = &em[36]; - const double *B_z = &em[45]; - - double B_x_xl[3] = {0.0}; - double B_x_xr[3] = {0.0}; - double B_y_xl[3] = {0.0}; - double B_y_xr[3] = {0.0}; - double B_z_xl[3] = {0.0}; - double B_z_xr[3] = {0.0}; - - B_x_xl[0] = 1.58113883008419*B_x[4]-1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xl[1] = 1.58113883008419*B_x[6]-1.224744871391589*B_x[3]+0.7071067811865475*B_x[2]; - B_x_xl[2] = 1.58113883008419*B_x[8]-1.224744871391589*B_x[7]+0.7071067811865475*B_x[5]; - B_x_xr[0] = 1.58113883008419*B_x[4]+1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xr[1] = 1.58113883008419*B_x[6]+1.224744871391589*B_x[3]+0.7071067811865475*B_x[2]; - B_x_xr[2] = 1.58113883008419*B_x[8]+1.224744871391589*B_x[7]+0.7071067811865475*B_x[5]; - B_y_xl[0] = 1.58113883008419*B_y[4]-1.224744871391589*B_y[1]+0.7071067811865475*B_y[0]; - B_y_xl[1] = 1.58113883008419*B_y[6]-1.224744871391589*B_y[3]+0.7071067811865475*B_y[2]; - B_y_xl[2] = 1.58113883008419*B_y[8]-1.224744871391589*B_y[7]+0.7071067811865475*B_y[5]; - B_y_xr[0] = 1.58113883008419*B_y[4]+1.224744871391589*B_y[1]+0.7071067811865475*B_y[0]; - B_y_xr[1] = 1.58113883008419*B_y[6]+1.224744871391589*B_y[3]+0.7071067811865475*B_y[2]; - B_y_xr[2] = 1.58113883008419*B_y[8]+1.224744871391589*B_y[7]+0.7071067811865475*B_y[5]; - B_z_xl[0] = 1.58113883008419*B_z[4]-1.224744871391589*B_z[1]+0.7071067811865475*B_z[0]; - B_z_xl[1] = 1.58113883008419*B_z[6]-1.224744871391589*B_z[3]+0.7071067811865475*B_z[2]; - B_z_xl[2] = 1.58113883008419*B_z[8]-1.224744871391589*B_z[7]+0.7071067811865475*B_z[5]; - B_z_xr[0] = 1.58113883008419*B_z[4]+1.224744871391589*B_z[1]+0.7071067811865475*B_z[0]; - B_z_xr[1] = 1.58113883008419*B_z[6]+1.224744871391589*B_z[3]+0.7071067811865475*B_z[2]; - B_z_xr[2] = 1.58113883008419*B_z[8]+1.224744871391589*B_z[7]+0.7071067811865475*B_z[5]; - // Calculate B_i B_j on the left x interface. - binop_mul_1d_ser_p2(B_x_xl, B_x_xl, Bx_sq_xl); - binop_mul_1d_ser_p2(B_y_xl, B_y_xl, By_sq_xl); - binop_mul_1d_ser_p2(B_z_xl, B_z_xl, Bz_sq_xl); - binop_mul_1d_ser_p2(B_x_xl, B_y_xl, B_x_B_y_xl); - binop_mul_1d_ser_p2(B_x_xl, B_z_xl, B_x_B_z_xl); - - // Calculate B_i B_j on the right x interface. - binop_mul_1d_ser_p2(B_x_xr, B_x_xr, Bx_sq_xr); - binop_mul_1d_ser_p2(B_y_xr, B_y_xr, By_sq_xr); - binop_mul_1d_ser_p2(B_z_xr, B_z_xr, Bz_sq_xr); - binop_mul_1d_ser_p2(B_x_xr, B_y_xr, B_x_B_y_xr); - binop_mul_1d_ser_p2(B_x_xr, B_z_xr, B_x_B_z_xr); - - double B_x_yl[3] = {0.0}; - double B_x_yr[3] = {0.0}; - double B_y_yl[3] = {0.0}; - double B_y_yr[3] = {0.0}; - double B_z_yl[3] = {0.0}; - double B_z_yr[3] = {0.0}; - - B_x_yl[0] = 1.58113883008419*B_x[5]-1.224744871391589*B_x[2]+0.7071067811865475*B_x[0]; - B_x_yl[1] = 1.58113883008419*B_x[7]-1.224744871391589*B_x[3]+0.7071067811865475*B_x[1]; - B_x_yl[2] = 1.58113883008419*B_x[8]-1.224744871391589*B_x[6]+0.7071067811865475*B_x[4]; - B_x_yr[0] = 1.58113883008419*B_x[5]+1.224744871391589*B_x[2]+0.7071067811865475*B_x[0]; - B_x_yr[1] = 1.58113883008419*B_x[7]+1.224744871391589*B_x[3]+0.7071067811865475*B_x[1]; - B_x_yr[2] = 1.58113883008419*B_x[8]+1.224744871391589*B_x[6]+0.7071067811865475*B_x[4]; - B_y_yl[0] = 1.58113883008419*B_y[5]-1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yl[1] = 1.58113883008419*B_y[7]-1.224744871391589*B_y[3]+0.7071067811865475*B_y[1]; - B_y_yl[2] = 1.58113883008419*B_y[8]-1.224744871391589*B_y[6]+0.7071067811865475*B_y[4]; - B_y_yr[0] = 1.58113883008419*B_y[5]+1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yr[1] = 1.58113883008419*B_y[7]+1.224744871391589*B_y[3]+0.7071067811865475*B_y[1]; - B_y_yr[2] = 1.58113883008419*B_y[8]+1.224744871391589*B_y[6]+0.7071067811865475*B_y[4]; - B_z_yl[0] = 1.58113883008419*B_z[5]-1.224744871391589*B_z[2]+0.7071067811865475*B_z[0]; - B_z_yl[1] = 1.58113883008419*B_z[7]-1.224744871391589*B_z[3]+0.7071067811865475*B_z[1]; - B_z_yl[2] = 1.58113883008419*B_z[8]-1.224744871391589*B_z[6]+0.7071067811865475*B_z[4]; - B_z_yr[0] = 1.58113883008419*B_z[5]+1.224744871391589*B_z[2]+0.7071067811865475*B_z[0]; - B_z_yr[1] = 1.58113883008419*B_z[7]+1.224744871391589*B_z[3]+0.7071067811865475*B_z[1]; - B_z_yr[2] = 1.58113883008419*B_z[8]+1.224744871391589*B_z[6]+0.7071067811865475*B_z[4]; - // Calculate B_i B_j on the left y interface. - binop_mul_1d_ser_p2(B_x_yl, B_x_yl, Bx_sq_yl); - binop_mul_1d_ser_p2(B_y_yl, B_y_yl, By_sq_yl); - binop_mul_1d_ser_p2(B_z_yl, B_z_yl, Bz_sq_yl); - binop_mul_1d_ser_p2(B_x_yl, B_y_yl, B_x_B_y_yl); - binop_mul_1d_ser_p2(B_y_yl, B_z_yl, B_y_B_z_yl); - - // Calculate B_i B_j on the right y interface. - binop_mul_1d_ser_p2(B_x_yr, B_x_yr, Bx_sq_yr); - binop_mul_1d_ser_p2(B_y_yr, B_y_yr, By_sq_yr); - binop_mul_1d_ser_p2(B_z_yr, B_z_yr, Bz_sq_yr); - binop_mul_1d_ser_p2(B_x_yr, B_y_yr, B_x_B_y_yr); - binop_mul_1d_ser_p2(B_y_yr, B_z_yr, B_y_B_z_yr); - -} - diff --git a/kernels/maxwell/em_calc_surf_BB_3x_ser_p1.c b/kernels/maxwell/em_calc_surf_BB_3x_ser_p1.c deleted file mode 100644 index a05fb3b10..000000000 --- a/kernels/maxwell/em_calc_surf_BB_3x_ser_p1.c +++ /dev/null @@ -1,183 +0,0 @@ -#include -#include -GKYL_CU_DH void em_calc_surf_BB_3x_ser_p1(const double *em, double* GKYL_RESTRICT out_surf) -{ - // em: Input electromagnetic fields. - // out_surf: Output [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - - double *Bx_sq_xl = &out_surf[0]; - double *Bx_sq_xr = &out_surf[4]; - double *By_sq_xl = &out_surf[8]; - double *By_sq_xr = &out_surf[12]; - double *Bz_sq_xl = &out_surf[16]; - double *Bz_sq_xr = &out_surf[20]; - double *B_x_B_y_xl = &out_surf[24]; - double *B_x_B_y_xr = &out_surf[28]; - double *B_x_B_z_xl = &out_surf[32]; - double *B_x_B_z_xr = &out_surf[36]; - - double *Bx_sq_yl = &out_surf[40]; - double *Bx_sq_yr = &out_surf[44]; - double *By_sq_yl = &out_surf[48]; - double *By_sq_yr = &out_surf[52]; - double *Bz_sq_yl = &out_surf[56]; - double *Bz_sq_yr = &out_surf[60]; - double *B_x_B_y_yl = &out_surf[64]; - double *B_x_B_y_yr = &out_surf[68]; - double *B_y_B_z_yl = &out_surf[72]; - double *B_y_B_z_yr = &out_surf[76]; - - double *Bx_sq_zl = &out_surf[80]; - double *Bx_sq_zr = &out_surf[84]; - double *By_sq_zl = &out_surf[88]; - double *By_sq_zr = &out_surf[92]; - double *Bz_sq_zl = &out_surf[96]; - double *Bz_sq_zr = &out_surf[100]; - double *B_x_B_z_zl = &out_surf[104]; - double *B_x_B_z_zr = &out_surf[108]; - double *B_y_B_z_zl = &out_surf[112]; - double *B_y_B_z_zr = &out_surf[116]; - - const double *B_x = &em[24]; - const double *B_y = &em[32]; - const double *B_z = &em[40]; - - double B_x_xl[4] = {0.0}; - double B_x_xr[4] = {0.0}; - double B_y_xl[4] = {0.0}; - double B_y_xr[4] = {0.0}; - double B_z_xl[4] = {0.0}; - double B_z_xr[4] = {0.0}; - - B_x_xl[0] = 0.7071067811865475*B_x[0]-1.224744871391589*B_x[1]; - B_x_xl[1] = 0.7071067811865475*B_x[2]-1.224744871391589*B_x[4]; - B_x_xl[2] = 0.7071067811865475*B_x[3]-1.224744871391589*B_x[5]; - B_x_xl[3] = 0.7071067811865475*B_x[6]-1.224744871391589*B_x[7]; - B_x_xr[0] = 1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xr[1] = 1.224744871391589*B_x[4]+0.7071067811865475*B_x[2]; - B_x_xr[2] = 1.224744871391589*B_x[5]+0.7071067811865475*B_x[3]; - B_x_xr[3] = 1.224744871391589*B_x[7]+0.7071067811865475*B_x[6]; - B_y_xl[0] = 0.7071067811865475*B_y[0]-1.224744871391589*B_y[1]; - B_y_xl[1] = 0.7071067811865475*B_y[2]-1.224744871391589*B_y[4]; - B_y_xl[2] = 0.7071067811865475*B_y[3]-1.224744871391589*B_y[5]; - B_y_xl[3] = 0.7071067811865475*B_y[6]-1.224744871391589*B_y[7]; - B_y_xr[0] = 1.224744871391589*B_y[1]+0.7071067811865475*B_y[0]; - B_y_xr[1] = 1.224744871391589*B_y[4]+0.7071067811865475*B_y[2]; - B_y_xr[2] = 1.224744871391589*B_y[5]+0.7071067811865475*B_y[3]; - B_y_xr[3] = 1.224744871391589*B_y[7]+0.7071067811865475*B_y[6]; - B_z_xl[0] = 0.7071067811865475*B_z[0]-1.224744871391589*B_z[1]; - B_z_xl[1] = 0.7071067811865475*B_z[2]-1.224744871391589*B_z[4]; - B_z_xl[2] = 0.7071067811865475*B_z[3]-1.224744871391589*B_z[5]; - B_z_xl[3] = 0.7071067811865475*B_z[6]-1.224744871391589*B_z[7]; - B_z_xr[0] = 1.224744871391589*B_z[1]+0.7071067811865475*B_z[0]; - B_z_xr[1] = 1.224744871391589*B_z[4]+0.7071067811865475*B_z[2]; - B_z_xr[2] = 1.224744871391589*B_z[5]+0.7071067811865475*B_z[3]; - B_z_xr[3] = 1.224744871391589*B_z[7]+0.7071067811865475*B_z[6]; - // Calculate B_i B_j on the left x interface. - binop_mul_2d_ser_p1(B_x_xl, B_x_xl, Bx_sq_xl); - binop_mul_2d_ser_p1(B_y_xl, B_y_xl, By_sq_xl); - binop_mul_2d_ser_p1(B_z_xl, B_z_xl, Bz_sq_xl); - binop_mul_2d_ser_p1(B_x_xl, B_y_xl, B_x_B_y_xl); - binop_mul_2d_ser_p1(B_x_xl, B_z_xl, B_x_B_z_xl); - - // Calculate B_i B_j on the right x interface. - binop_mul_2d_ser_p1(B_x_xr, B_x_xr, Bx_sq_xr); - binop_mul_2d_ser_p1(B_y_xr, B_y_xr, By_sq_xr); - binop_mul_2d_ser_p1(B_z_xr, B_z_xr, Bz_sq_xr); - binop_mul_2d_ser_p1(B_x_xr, B_y_xr, B_x_B_y_xr); - binop_mul_2d_ser_p1(B_x_xr, B_z_xr, B_x_B_z_xr); - - double B_x_yl[4] = {0.0}; - double B_x_yr[4] = {0.0}; - double B_y_yl[4] = {0.0}; - double B_y_yr[4] = {0.0}; - double B_z_yl[4] = {0.0}; - double B_z_yr[4] = {0.0}; - - B_x_yl[0] = 0.7071067811865475*B_x[0]-1.224744871391589*B_x[2]; - B_x_yl[1] = 0.7071067811865475*B_x[1]-1.224744871391589*B_x[4]; - B_x_yl[2] = 0.7071067811865475*B_x[3]-1.224744871391589*B_x[6]; - B_x_yl[3] = 0.7071067811865475*B_x[5]-1.224744871391589*B_x[7]; - B_x_yr[0] = 1.224744871391589*B_x[2]+0.7071067811865475*B_x[0]; - B_x_yr[1] = 1.224744871391589*B_x[4]+0.7071067811865475*B_x[1]; - B_x_yr[2] = 1.224744871391589*B_x[6]+0.7071067811865475*B_x[3]; - B_x_yr[3] = 1.224744871391589*B_x[7]+0.7071067811865475*B_x[5]; - B_y_yl[0] = 0.7071067811865475*B_y[0]-1.224744871391589*B_y[2]; - B_y_yl[1] = 0.7071067811865475*B_y[1]-1.224744871391589*B_y[4]; - B_y_yl[2] = 0.7071067811865475*B_y[3]-1.224744871391589*B_y[6]; - B_y_yl[3] = 0.7071067811865475*B_y[5]-1.224744871391589*B_y[7]; - B_y_yr[0] = 1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yr[1] = 1.224744871391589*B_y[4]+0.7071067811865475*B_y[1]; - B_y_yr[2] = 1.224744871391589*B_y[6]+0.7071067811865475*B_y[3]; - B_y_yr[3] = 1.224744871391589*B_y[7]+0.7071067811865475*B_y[5]; - B_z_yl[0] = 0.7071067811865475*B_z[0]-1.224744871391589*B_z[2]; - B_z_yl[1] = 0.7071067811865475*B_z[1]-1.224744871391589*B_z[4]; - B_z_yl[2] = 0.7071067811865475*B_z[3]-1.224744871391589*B_z[6]; - B_z_yl[3] = 0.7071067811865475*B_z[5]-1.224744871391589*B_z[7]; - B_z_yr[0] = 1.224744871391589*B_z[2]+0.7071067811865475*B_z[0]; - B_z_yr[1] = 1.224744871391589*B_z[4]+0.7071067811865475*B_z[1]; - B_z_yr[2] = 1.224744871391589*B_z[6]+0.7071067811865475*B_z[3]; - B_z_yr[3] = 1.224744871391589*B_z[7]+0.7071067811865475*B_z[5]; - // Calculate B_i B_j on the left y interface. - binop_mul_2d_ser_p1(B_x_yl, B_x_yl, Bx_sq_yl); - binop_mul_2d_ser_p1(B_y_yl, B_y_yl, By_sq_yl); - binop_mul_2d_ser_p1(B_z_yl, B_z_yl, Bz_sq_yl); - binop_mul_2d_ser_p1(B_x_yl, B_y_yl, B_x_B_y_yl); - binop_mul_2d_ser_p1(B_y_yl, B_z_yl, B_y_B_z_yl); - - // Calculate B_i B_j on the right y interface. - binop_mul_2d_ser_p1(B_x_yr, B_x_yr, Bx_sq_yr); - binop_mul_2d_ser_p1(B_y_yr, B_y_yr, By_sq_yr); - binop_mul_2d_ser_p1(B_z_yr, B_z_yr, Bz_sq_yr); - binop_mul_2d_ser_p1(B_x_yr, B_y_yr, B_x_B_y_yr); - binop_mul_2d_ser_p1(B_y_yr, B_z_yr, B_y_B_z_yr); - - double B_x_zl[4] = {0.0}; - double B_x_zr[4] = {0.0}; - double B_y_zl[4] = {0.0}; - double B_y_zr[4] = {0.0}; - double B_z_zl[4] = {0.0}; - double B_z_zr[4] = {0.0}; - - B_x_zl[0] = 0.7071067811865475*B_x[0]-1.224744871391589*B_x[3]; - B_x_zl[1] = 0.7071067811865475*B_x[1]-1.224744871391589*B_x[5]; - B_x_zl[2] = 0.7071067811865475*B_x[2]-1.224744871391589*B_x[6]; - B_x_zl[3] = 0.7071067811865475*B_x[4]-1.224744871391589*B_x[7]; - B_x_zr[0] = 1.224744871391589*B_x[3]+0.7071067811865475*B_x[0]; - B_x_zr[1] = 1.224744871391589*B_x[5]+0.7071067811865475*B_x[1]; - B_x_zr[2] = 1.224744871391589*B_x[6]+0.7071067811865475*B_x[2]; - B_x_zr[3] = 1.224744871391589*B_x[7]+0.7071067811865475*B_x[4]; - B_y_zl[0] = 0.7071067811865475*B_y[0]-1.224744871391589*B_y[3]; - B_y_zl[1] = 0.7071067811865475*B_y[1]-1.224744871391589*B_y[5]; - B_y_zl[2] = 0.7071067811865475*B_y[2]-1.224744871391589*B_y[6]; - B_y_zl[3] = 0.7071067811865475*B_y[4]-1.224744871391589*B_y[7]; - B_y_zr[0] = 1.224744871391589*B_y[3]+0.7071067811865475*B_y[0]; - B_y_zr[1] = 1.224744871391589*B_y[5]+0.7071067811865475*B_y[1]; - B_y_zr[2] = 1.224744871391589*B_y[6]+0.7071067811865475*B_y[2]; - B_y_zr[3] = 1.224744871391589*B_y[7]+0.7071067811865475*B_y[4]; - B_z_zl[0] = 0.7071067811865475*B_z[0]-1.224744871391589*B_z[3]; - B_z_zl[1] = 0.7071067811865475*B_z[1]-1.224744871391589*B_z[5]; - B_z_zl[2] = 0.7071067811865475*B_z[2]-1.224744871391589*B_z[6]; - B_z_zl[3] = 0.7071067811865475*B_z[4]-1.224744871391589*B_z[7]; - B_z_zr[0] = 1.224744871391589*B_z[3]+0.7071067811865475*B_z[0]; - B_z_zr[1] = 1.224744871391589*B_z[5]+0.7071067811865475*B_z[1]; - B_z_zr[2] = 1.224744871391589*B_z[6]+0.7071067811865475*B_z[2]; - B_z_zr[3] = 1.224744871391589*B_z[7]+0.7071067811865475*B_z[4]; - // Calculate B_i B_j on the left z interface. - binop_mul_2d_ser_p1(B_x_zl, B_x_zl, Bx_sq_zl); - binop_mul_2d_ser_p1(B_y_zl, B_y_zl, By_sq_zl); - binop_mul_2d_ser_p1(B_z_zl, B_z_zl, Bz_sq_zl); - binop_mul_2d_ser_p1(B_x_zl, B_z_zl, B_x_B_z_zl); - binop_mul_2d_ser_p1(B_y_zl, B_z_zl, B_y_B_z_zl); - - // Calculate B_i B_j on the right z interface. - binop_mul_2d_ser_p1(B_x_zr, B_x_zr, Bx_sq_zr); - binop_mul_2d_ser_p1(B_y_zr, B_y_zr, By_sq_zr); - binop_mul_2d_ser_p1(B_z_zr, B_z_zr, Bz_sq_zr); - binop_mul_2d_ser_p1(B_x_zr, B_z_zr, B_x_B_z_zr); - binop_mul_2d_ser_p1(B_y_zr, B_z_zr, B_y_B_z_zr); - -} - diff --git a/kernels/maxwell/em_calc_surf_BB_3x_tensor_p2.c b/kernels/maxwell/em_calc_surf_BB_3x_tensor_p2.c deleted file mode 100644 index e5933c880..000000000 --- a/kernels/maxwell/em_calc_surf_BB_3x_tensor_p2.c +++ /dev/null @@ -1,273 +0,0 @@ -#include -#include -GKYL_CU_DH void em_calc_surf_BB_3x_tensor_p2(const double *em, double* GKYL_RESTRICT out_surf) -{ - // em: Input electromagnetic fields. - // out_surf: Output [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - - double *Bx_sq_xl = &out_surf[0]; - double *Bx_sq_xr = &out_surf[9]; - double *By_sq_xl = &out_surf[18]; - double *By_sq_xr = &out_surf[27]; - double *Bz_sq_xl = &out_surf[36]; - double *Bz_sq_xr = &out_surf[45]; - double *B_x_B_y_xl = &out_surf[54]; - double *B_x_B_y_xr = &out_surf[63]; - double *B_x_B_z_xl = &out_surf[72]; - double *B_x_B_z_xr = &out_surf[81]; - - double *Bx_sq_yl = &out_surf[90]; - double *Bx_sq_yr = &out_surf[99]; - double *By_sq_yl = &out_surf[108]; - double *By_sq_yr = &out_surf[117]; - double *Bz_sq_yl = &out_surf[126]; - double *Bz_sq_yr = &out_surf[135]; - double *B_x_B_y_yl = &out_surf[144]; - double *B_x_B_y_yr = &out_surf[153]; - double *B_y_B_z_yl = &out_surf[162]; - double *B_y_B_z_yr = &out_surf[171]; - - double *Bx_sq_zl = &out_surf[180]; - double *Bx_sq_zr = &out_surf[189]; - double *By_sq_zl = &out_surf[198]; - double *By_sq_zr = &out_surf[207]; - double *Bz_sq_zl = &out_surf[216]; - double *Bz_sq_zr = &out_surf[225]; - double *B_x_B_z_zl = &out_surf[234]; - double *B_x_B_z_zr = &out_surf[243]; - double *B_y_B_z_zl = &out_surf[252]; - double *B_y_B_z_zr = &out_surf[261]; - - const double *B_x = &em[81]; - const double *B_y = &em[108]; - const double *B_z = &em[135]; - - double B_x_xl[9] = {0.0}; - double B_x_xr[9] = {0.0}; - double B_y_xl[9] = {0.0}; - double B_y_xr[9] = {0.0}; - double B_z_xl[9] = {0.0}; - double B_z_xr[9] = {0.0}; - - B_x_xl[0] = 1.58113883008419*B_x[7]-1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xl[1] = 1.58113883008419*B_x[11]-1.224744871391589*B_x[4]+0.7071067811865475*B_x[2]; - B_x_xl[2] = 1.58113883008419*B_x[13]-1.224744871391589*B_x[5]+0.7071067811865475*B_x[3]; - B_x_xl[3] = 1.58113883008419*B_x[17]-1.224744871391589*B_x[10]+0.7071067811865475*B_x[6]; - B_x_xl[4] = 1.58113883008419*B_x[20]-1.224744871391589*B_x[12]+0.7071067811865475*B_x[8]; - B_x_xl[5] = 1.58113883008419*B_x[21]-1.224744871391589*B_x[15]+0.7071067811865475*B_x[9]; - B_x_xl[6] = 1.58113883008419*B_x[23]-1.224744871391589*B_x[18]+0.7071067811865475*B_x[14]; - B_x_xl[7] = 1.58113883008419*B_x[24]-1.224744871391589*B_x[19]+0.7071067811865475*B_x[16]; - B_x_xl[8] = 1.58113883008419*B_x[26]-1.224744871391589*B_x[25]+0.7071067811865475*B_x[22]; - B_x_xr[0] = 1.58113883008419*B_x[7]+1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xr[1] = 1.58113883008419*B_x[11]+1.224744871391589*B_x[4]+0.7071067811865475*B_x[2]; - B_x_xr[2] = 1.58113883008419*B_x[13]+1.224744871391589*B_x[5]+0.7071067811865475*B_x[3]; - B_x_xr[3] = 1.58113883008419*B_x[17]+1.224744871391589*B_x[10]+0.7071067811865475*B_x[6]; - B_x_xr[4] = 1.58113883008419*B_x[20]+1.224744871391589*B_x[12]+0.7071067811865475*B_x[8]; - B_x_xr[5] = 1.58113883008419*B_x[21]+1.224744871391589*B_x[15]+0.7071067811865475*B_x[9]; - B_x_xr[6] = 1.58113883008419*B_x[23]+1.224744871391589*B_x[18]+0.7071067811865475*B_x[14]; - B_x_xr[7] = 1.58113883008419*B_x[24]+1.224744871391589*B_x[19]+0.7071067811865475*B_x[16]; - B_x_xr[8] = 1.58113883008419*B_x[26]+1.224744871391589*B_x[25]+0.7071067811865475*B_x[22]; - B_y_xl[0] = 1.58113883008419*B_y[7]-1.224744871391589*B_y[1]+0.7071067811865475*B_y[0]; - B_y_xl[1] = 1.58113883008419*B_y[11]-1.224744871391589*B_y[4]+0.7071067811865475*B_y[2]; - B_y_xl[2] = 1.58113883008419*B_y[13]-1.224744871391589*B_y[5]+0.7071067811865475*B_y[3]; - B_y_xl[3] = 1.58113883008419*B_y[17]-1.224744871391589*B_y[10]+0.7071067811865475*B_y[6]; - B_y_xl[4] = 1.58113883008419*B_y[20]-1.224744871391589*B_y[12]+0.7071067811865475*B_y[8]; - B_y_xl[5] = 1.58113883008419*B_y[21]-1.224744871391589*B_y[15]+0.7071067811865475*B_y[9]; - B_y_xl[6] = 1.58113883008419*B_y[23]-1.224744871391589*B_y[18]+0.7071067811865475*B_y[14]; - B_y_xl[7] = 1.58113883008419*B_y[24]-1.224744871391589*B_y[19]+0.7071067811865475*B_y[16]; - B_y_xl[8] = 1.58113883008419*B_y[26]-1.224744871391589*B_y[25]+0.7071067811865475*B_y[22]; - B_y_xr[0] = 1.58113883008419*B_y[7]+1.224744871391589*B_y[1]+0.7071067811865475*B_y[0]; - B_y_xr[1] = 1.58113883008419*B_y[11]+1.224744871391589*B_y[4]+0.7071067811865475*B_y[2]; - B_y_xr[2] = 1.58113883008419*B_y[13]+1.224744871391589*B_y[5]+0.7071067811865475*B_y[3]; - B_y_xr[3] = 1.58113883008419*B_y[17]+1.224744871391589*B_y[10]+0.7071067811865475*B_y[6]; - B_y_xr[4] = 1.58113883008419*B_y[20]+1.224744871391589*B_y[12]+0.7071067811865475*B_y[8]; - B_y_xr[5] = 1.58113883008419*B_y[21]+1.224744871391589*B_y[15]+0.7071067811865475*B_y[9]; - B_y_xr[6] = 1.58113883008419*B_y[23]+1.224744871391589*B_y[18]+0.7071067811865475*B_y[14]; - B_y_xr[7] = 1.58113883008419*B_y[24]+1.224744871391589*B_y[19]+0.7071067811865475*B_y[16]; - B_y_xr[8] = 1.58113883008419*B_y[26]+1.224744871391589*B_y[25]+0.7071067811865475*B_y[22]; - B_z_xl[0] = 1.58113883008419*B_z[7]-1.224744871391589*B_z[1]+0.7071067811865475*B_z[0]; - B_z_xl[1] = 1.58113883008419*B_z[11]-1.224744871391589*B_z[4]+0.7071067811865475*B_z[2]; - B_z_xl[2] = 1.58113883008419*B_z[13]-1.224744871391589*B_z[5]+0.7071067811865475*B_z[3]; - B_z_xl[3] = 1.58113883008419*B_z[17]-1.224744871391589*B_z[10]+0.7071067811865475*B_z[6]; - B_z_xl[4] = 1.58113883008419*B_z[20]-1.224744871391589*B_z[12]+0.7071067811865475*B_z[8]; - B_z_xl[5] = 1.58113883008419*B_z[21]-1.224744871391589*B_z[15]+0.7071067811865475*B_z[9]; - B_z_xl[6] = 1.58113883008419*B_z[23]-1.224744871391589*B_z[18]+0.7071067811865475*B_z[14]; - B_z_xl[7] = 1.58113883008419*B_z[24]-1.224744871391589*B_z[19]+0.7071067811865475*B_z[16]; - B_z_xl[8] = 1.58113883008419*B_z[26]-1.224744871391589*B_z[25]+0.7071067811865475*B_z[22]; - B_z_xr[0] = 1.58113883008419*B_z[7]+1.224744871391589*B_z[1]+0.7071067811865475*B_z[0]; - B_z_xr[1] = 1.58113883008419*B_z[11]+1.224744871391589*B_z[4]+0.7071067811865475*B_z[2]; - B_z_xr[2] = 1.58113883008419*B_z[13]+1.224744871391589*B_z[5]+0.7071067811865475*B_z[3]; - B_z_xr[3] = 1.58113883008419*B_z[17]+1.224744871391589*B_z[10]+0.7071067811865475*B_z[6]; - B_z_xr[4] = 1.58113883008419*B_z[20]+1.224744871391589*B_z[12]+0.7071067811865475*B_z[8]; - B_z_xr[5] = 1.58113883008419*B_z[21]+1.224744871391589*B_z[15]+0.7071067811865475*B_z[9]; - B_z_xr[6] = 1.58113883008419*B_z[23]+1.224744871391589*B_z[18]+0.7071067811865475*B_z[14]; - B_z_xr[7] = 1.58113883008419*B_z[24]+1.224744871391589*B_z[19]+0.7071067811865475*B_z[16]; - B_z_xr[8] = 1.58113883008419*B_z[26]+1.224744871391589*B_z[25]+0.7071067811865475*B_z[22]; - // Calculate B_i B_j on the left x interface. - binop_mul_2d_tensor_p2(B_x_xl, B_x_xl, Bx_sq_xl); - binop_mul_2d_tensor_p2(B_y_xl, B_y_xl, By_sq_xl); - binop_mul_2d_tensor_p2(B_z_xl, B_z_xl, Bz_sq_xl); - binop_mul_2d_tensor_p2(B_x_xl, B_y_xl, B_x_B_y_xl); - binop_mul_2d_tensor_p2(B_x_xl, B_z_xl, B_x_B_z_xl); - - // Calculate B_i B_j on the right x interface. - binop_mul_2d_tensor_p2(B_x_xr, B_x_xr, Bx_sq_xr); - binop_mul_2d_tensor_p2(B_y_xr, B_y_xr, By_sq_xr); - binop_mul_2d_tensor_p2(B_z_xr, B_z_xr, Bz_sq_xr); - binop_mul_2d_tensor_p2(B_x_xr, B_y_xr, B_x_B_y_xr); - binop_mul_2d_tensor_p2(B_x_xr, B_z_xr, B_x_B_z_xr); - - double B_x_yl[9] = {0.0}; - double B_x_yr[9] = {0.0}; - double B_y_yl[9] = {0.0}; - double B_y_yr[9] = {0.0}; - double B_z_yl[9] = {0.0}; - double B_z_yr[9] = {0.0}; - - B_x_yl[0] = 1.58113883008419*B_x[8]-1.224744871391589*B_x[2]+0.7071067811865475*B_x[0]; - B_x_yl[1] = 1.58113883008419*B_x[12]-1.224744871391589*B_x[4]+0.7071067811865475*B_x[1]; - B_x_yl[2] = 1.58113883008419*B_x[14]-1.224744871391589*B_x[6]+0.7071067811865475*B_x[3]; - B_x_yl[3] = 1.58113883008419*B_x[18]-1.224744871391589*B_x[10]+0.7071067811865475*B_x[5]; - B_x_yl[4] = 1.58113883008419*B_x[20]-1.224744871391589*B_x[11]+0.7071067811865475*B_x[7]; - B_x_yl[5] = 1.58113883008419*B_x[22]-1.224744871391589*B_x[16]+0.7071067811865475*B_x[9]; - B_x_yl[6] = 1.58113883008419*B_x[23]-1.224744871391589*B_x[17]+0.7071067811865475*B_x[13]; - B_x_yl[7] = 1.58113883008419*B_x[25]-1.224744871391589*B_x[19]+0.7071067811865475*B_x[15]; - B_x_yl[8] = 1.58113883008419*B_x[26]-1.224744871391589*B_x[24]+0.7071067811865475*B_x[21]; - B_x_yr[0] = 1.58113883008419*B_x[8]+1.224744871391589*B_x[2]+0.7071067811865475*B_x[0]; - B_x_yr[1] = 1.58113883008419*B_x[12]+1.224744871391589*B_x[4]+0.7071067811865475*B_x[1]; - B_x_yr[2] = 1.58113883008419*B_x[14]+1.224744871391589*B_x[6]+0.7071067811865475*B_x[3]; - B_x_yr[3] = 1.58113883008419*B_x[18]+1.224744871391589*B_x[10]+0.7071067811865475*B_x[5]; - B_x_yr[4] = 1.58113883008419*B_x[20]+1.224744871391589*B_x[11]+0.7071067811865475*B_x[7]; - B_x_yr[5] = 1.58113883008419*B_x[22]+1.224744871391589*B_x[16]+0.7071067811865475*B_x[9]; - B_x_yr[6] = 1.58113883008419*B_x[23]+1.224744871391589*B_x[17]+0.7071067811865475*B_x[13]; - B_x_yr[7] = 1.58113883008419*B_x[25]+1.224744871391589*B_x[19]+0.7071067811865475*B_x[15]; - B_x_yr[8] = 1.58113883008419*B_x[26]+1.224744871391589*B_x[24]+0.7071067811865475*B_x[21]; - B_y_yl[0] = 1.58113883008419*B_y[8]-1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yl[1] = 1.58113883008419*B_y[12]-1.224744871391589*B_y[4]+0.7071067811865475*B_y[1]; - B_y_yl[2] = 1.58113883008419*B_y[14]-1.224744871391589*B_y[6]+0.7071067811865475*B_y[3]; - B_y_yl[3] = 1.58113883008419*B_y[18]-1.224744871391589*B_y[10]+0.7071067811865475*B_y[5]; - B_y_yl[4] = 1.58113883008419*B_y[20]-1.224744871391589*B_y[11]+0.7071067811865475*B_y[7]; - B_y_yl[5] = 1.58113883008419*B_y[22]-1.224744871391589*B_y[16]+0.7071067811865475*B_y[9]; - B_y_yl[6] = 1.58113883008419*B_y[23]-1.224744871391589*B_y[17]+0.7071067811865475*B_y[13]; - B_y_yl[7] = 1.58113883008419*B_y[25]-1.224744871391589*B_y[19]+0.7071067811865475*B_y[15]; - B_y_yl[8] = 1.58113883008419*B_y[26]-1.224744871391589*B_y[24]+0.7071067811865475*B_y[21]; - B_y_yr[0] = 1.58113883008419*B_y[8]+1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yr[1] = 1.58113883008419*B_y[12]+1.224744871391589*B_y[4]+0.7071067811865475*B_y[1]; - B_y_yr[2] = 1.58113883008419*B_y[14]+1.224744871391589*B_y[6]+0.7071067811865475*B_y[3]; - B_y_yr[3] = 1.58113883008419*B_y[18]+1.224744871391589*B_y[10]+0.7071067811865475*B_y[5]; - B_y_yr[4] = 1.58113883008419*B_y[20]+1.224744871391589*B_y[11]+0.7071067811865475*B_y[7]; - B_y_yr[5] = 1.58113883008419*B_y[22]+1.224744871391589*B_y[16]+0.7071067811865475*B_y[9]; - B_y_yr[6] = 1.58113883008419*B_y[23]+1.224744871391589*B_y[17]+0.7071067811865475*B_y[13]; - B_y_yr[7] = 1.58113883008419*B_y[25]+1.224744871391589*B_y[19]+0.7071067811865475*B_y[15]; - B_y_yr[8] = 1.58113883008419*B_y[26]+1.224744871391589*B_y[24]+0.7071067811865475*B_y[21]; - B_z_yl[0] = 1.58113883008419*B_z[8]-1.224744871391589*B_z[2]+0.7071067811865475*B_z[0]; - B_z_yl[1] = 1.58113883008419*B_z[12]-1.224744871391589*B_z[4]+0.7071067811865475*B_z[1]; - B_z_yl[2] = 1.58113883008419*B_z[14]-1.224744871391589*B_z[6]+0.7071067811865475*B_z[3]; - B_z_yl[3] = 1.58113883008419*B_z[18]-1.224744871391589*B_z[10]+0.7071067811865475*B_z[5]; - B_z_yl[4] = 1.58113883008419*B_z[20]-1.224744871391589*B_z[11]+0.7071067811865475*B_z[7]; - B_z_yl[5] = 1.58113883008419*B_z[22]-1.224744871391589*B_z[16]+0.7071067811865475*B_z[9]; - B_z_yl[6] = 1.58113883008419*B_z[23]-1.224744871391589*B_z[17]+0.7071067811865475*B_z[13]; - B_z_yl[7] = 1.58113883008419*B_z[25]-1.224744871391589*B_z[19]+0.7071067811865475*B_z[15]; - B_z_yl[8] = 1.58113883008419*B_z[26]-1.224744871391589*B_z[24]+0.7071067811865475*B_z[21]; - B_z_yr[0] = 1.58113883008419*B_z[8]+1.224744871391589*B_z[2]+0.7071067811865475*B_z[0]; - B_z_yr[1] = 1.58113883008419*B_z[12]+1.224744871391589*B_z[4]+0.7071067811865475*B_z[1]; - B_z_yr[2] = 1.58113883008419*B_z[14]+1.224744871391589*B_z[6]+0.7071067811865475*B_z[3]; - B_z_yr[3] = 1.58113883008419*B_z[18]+1.224744871391589*B_z[10]+0.7071067811865475*B_z[5]; - B_z_yr[4] = 1.58113883008419*B_z[20]+1.224744871391589*B_z[11]+0.7071067811865475*B_z[7]; - B_z_yr[5] = 1.58113883008419*B_z[22]+1.224744871391589*B_z[16]+0.7071067811865475*B_z[9]; - B_z_yr[6] = 1.58113883008419*B_z[23]+1.224744871391589*B_z[17]+0.7071067811865475*B_z[13]; - B_z_yr[7] = 1.58113883008419*B_z[25]+1.224744871391589*B_z[19]+0.7071067811865475*B_z[15]; - B_z_yr[8] = 1.58113883008419*B_z[26]+1.224744871391589*B_z[24]+0.7071067811865475*B_z[21]; - // Calculate B_i B_j on the left y interface. - binop_mul_2d_tensor_p2(B_x_yl, B_x_yl, Bx_sq_yl); - binop_mul_2d_tensor_p2(B_y_yl, B_y_yl, By_sq_yl); - binop_mul_2d_tensor_p2(B_z_yl, B_z_yl, Bz_sq_yl); - binop_mul_2d_tensor_p2(B_x_yl, B_y_yl, B_x_B_y_yl); - binop_mul_2d_tensor_p2(B_y_yl, B_z_yl, B_y_B_z_yl); - - // Calculate B_i B_j on the right y interface. - binop_mul_2d_tensor_p2(B_x_yr, B_x_yr, Bx_sq_yr); - binop_mul_2d_tensor_p2(B_y_yr, B_y_yr, By_sq_yr); - binop_mul_2d_tensor_p2(B_z_yr, B_z_yr, Bz_sq_yr); - binop_mul_2d_tensor_p2(B_x_yr, B_y_yr, B_x_B_y_yr); - binop_mul_2d_tensor_p2(B_y_yr, B_z_yr, B_y_B_z_yr); - - double B_x_zl[9] = {0.0}; - double B_x_zr[9] = {0.0}; - double B_y_zl[9] = {0.0}; - double B_y_zr[9] = {0.0}; - double B_z_zl[9] = {0.0}; - double B_z_zr[9] = {0.0}; - - B_x_zl[0] = 1.58113883008419*B_x[9]-1.224744871391589*B_x[3]+0.7071067811865475*B_x[0]; - B_x_zl[1] = 1.58113883008419*B_x[15]-1.224744871391589*B_x[5]+0.7071067811865475*B_x[1]; - B_x_zl[2] = 1.58113883008419*B_x[16]-1.224744871391589*B_x[6]+0.7071067811865475*B_x[2]; - B_x_zl[3] = 1.58113883008419*B_x[19]-1.224744871391589*B_x[10]+0.7071067811865475*B_x[4]; - B_x_zl[4] = 1.58113883008419*B_x[21]-1.224744871391589*B_x[13]+0.7071067811865475*B_x[7]; - B_x_zl[5] = 1.58113883008419*B_x[22]-1.224744871391589*B_x[14]+0.7071067811865475*B_x[8]; - B_x_zl[6] = 1.58113883008419*B_x[24]-1.224744871391589*B_x[17]+0.7071067811865475*B_x[11]; - B_x_zl[7] = 1.58113883008419*B_x[25]-1.224744871391589*B_x[18]+0.7071067811865475*B_x[12]; - B_x_zl[8] = 1.58113883008419*B_x[26]-1.224744871391589*B_x[23]+0.7071067811865475*B_x[20]; - B_x_zr[0] = 1.58113883008419*B_x[9]+1.224744871391589*B_x[3]+0.7071067811865475*B_x[0]; - B_x_zr[1] = 1.58113883008419*B_x[15]+1.224744871391589*B_x[5]+0.7071067811865475*B_x[1]; - B_x_zr[2] = 1.58113883008419*B_x[16]+1.224744871391589*B_x[6]+0.7071067811865475*B_x[2]; - B_x_zr[3] = 1.58113883008419*B_x[19]+1.224744871391589*B_x[10]+0.7071067811865475*B_x[4]; - B_x_zr[4] = 1.58113883008419*B_x[21]+1.224744871391589*B_x[13]+0.7071067811865475*B_x[7]; - B_x_zr[5] = 1.58113883008419*B_x[22]+1.224744871391589*B_x[14]+0.7071067811865475*B_x[8]; - B_x_zr[6] = 1.58113883008419*B_x[24]+1.224744871391589*B_x[17]+0.7071067811865475*B_x[11]; - B_x_zr[7] = 1.58113883008419*B_x[25]+1.224744871391589*B_x[18]+0.7071067811865475*B_x[12]; - B_x_zr[8] = 1.58113883008419*B_x[26]+1.224744871391589*B_x[23]+0.7071067811865475*B_x[20]; - B_y_zl[0] = 1.58113883008419*B_y[9]-1.224744871391589*B_y[3]+0.7071067811865475*B_y[0]; - B_y_zl[1] = 1.58113883008419*B_y[15]-1.224744871391589*B_y[5]+0.7071067811865475*B_y[1]; - B_y_zl[2] = 1.58113883008419*B_y[16]-1.224744871391589*B_y[6]+0.7071067811865475*B_y[2]; - B_y_zl[3] = 1.58113883008419*B_y[19]-1.224744871391589*B_y[10]+0.7071067811865475*B_y[4]; - B_y_zl[4] = 1.58113883008419*B_y[21]-1.224744871391589*B_y[13]+0.7071067811865475*B_y[7]; - B_y_zl[5] = 1.58113883008419*B_y[22]-1.224744871391589*B_y[14]+0.7071067811865475*B_y[8]; - B_y_zl[6] = 1.58113883008419*B_y[24]-1.224744871391589*B_y[17]+0.7071067811865475*B_y[11]; - B_y_zl[7] = 1.58113883008419*B_y[25]-1.224744871391589*B_y[18]+0.7071067811865475*B_y[12]; - B_y_zl[8] = 1.58113883008419*B_y[26]-1.224744871391589*B_y[23]+0.7071067811865475*B_y[20]; - B_y_zr[0] = 1.58113883008419*B_y[9]+1.224744871391589*B_y[3]+0.7071067811865475*B_y[0]; - B_y_zr[1] = 1.58113883008419*B_y[15]+1.224744871391589*B_y[5]+0.7071067811865475*B_y[1]; - B_y_zr[2] = 1.58113883008419*B_y[16]+1.224744871391589*B_y[6]+0.7071067811865475*B_y[2]; - B_y_zr[3] = 1.58113883008419*B_y[19]+1.224744871391589*B_y[10]+0.7071067811865475*B_y[4]; - B_y_zr[4] = 1.58113883008419*B_y[21]+1.224744871391589*B_y[13]+0.7071067811865475*B_y[7]; - B_y_zr[5] = 1.58113883008419*B_y[22]+1.224744871391589*B_y[14]+0.7071067811865475*B_y[8]; - B_y_zr[6] = 1.58113883008419*B_y[24]+1.224744871391589*B_y[17]+0.7071067811865475*B_y[11]; - B_y_zr[7] = 1.58113883008419*B_y[25]+1.224744871391589*B_y[18]+0.7071067811865475*B_y[12]; - B_y_zr[8] = 1.58113883008419*B_y[26]+1.224744871391589*B_y[23]+0.7071067811865475*B_y[20]; - B_z_zl[0] = 1.58113883008419*B_z[9]-1.224744871391589*B_z[3]+0.7071067811865475*B_z[0]; - B_z_zl[1] = 1.58113883008419*B_z[15]-1.224744871391589*B_z[5]+0.7071067811865475*B_z[1]; - B_z_zl[2] = 1.58113883008419*B_z[16]-1.224744871391589*B_z[6]+0.7071067811865475*B_z[2]; - B_z_zl[3] = 1.58113883008419*B_z[19]-1.224744871391589*B_z[10]+0.7071067811865475*B_z[4]; - B_z_zl[4] = 1.58113883008419*B_z[21]-1.224744871391589*B_z[13]+0.7071067811865475*B_z[7]; - B_z_zl[5] = 1.58113883008419*B_z[22]-1.224744871391589*B_z[14]+0.7071067811865475*B_z[8]; - B_z_zl[6] = 1.58113883008419*B_z[24]-1.224744871391589*B_z[17]+0.7071067811865475*B_z[11]; - B_z_zl[7] = 1.58113883008419*B_z[25]-1.224744871391589*B_z[18]+0.7071067811865475*B_z[12]; - B_z_zl[8] = 1.58113883008419*B_z[26]-1.224744871391589*B_z[23]+0.7071067811865475*B_z[20]; - B_z_zr[0] = 1.58113883008419*B_z[9]+1.224744871391589*B_z[3]+0.7071067811865475*B_z[0]; - B_z_zr[1] = 1.58113883008419*B_z[15]+1.224744871391589*B_z[5]+0.7071067811865475*B_z[1]; - B_z_zr[2] = 1.58113883008419*B_z[16]+1.224744871391589*B_z[6]+0.7071067811865475*B_z[2]; - B_z_zr[3] = 1.58113883008419*B_z[19]+1.224744871391589*B_z[10]+0.7071067811865475*B_z[4]; - B_z_zr[4] = 1.58113883008419*B_z[21]+1.224744871391589*B_z[13]+0.7071067811865475*B_z[7]; - B_z_zr[5] = 1.58113883008419*B_z[22]+1.224744871391589*B_z[14]+0.7071067811865475*B_z[8]; - B_z_zr[6] = 1.58113883008419*B_z[24]+1.224744871391589*B_z[17]+0.7071067811865475*B_z[11]; - B_z_zr[7] = 1.58113883008419*B_z[25]+1.224744871391589*B_z[18]+0.7071067811865475*B_z[12]; - B_z_zr[8] = 1.58113883008419*B_z[26]+1.224744871391589*B_z[23]+0.7071067811865475*B_z[20]; - // Calculate B_i B_j on the left z interface. - binop_mul_2d_tensor_p2(B_x_zl, B_x_zl, Bx_sq_zl); - binop_mul_2d_tensor_p2(B_y_zl, B_y_zl, By_sq_zl); - binop_mul_2d_tensor_p2(B_z_zl, B_z_zl, Bz_sq_zl); - binop_mul_2d_tensor_p2(B_x_zl, B_z_zl, B_x_B_z_zl); - binop_mul_2d_tensor_p2(B_y_zl, B_z_zl, B_y_B_z_zl); - - // Calculate B_i B_j on the right z interface. - binop_mul_2d_tensor_p2(B_x_zr, B_x_zr, Bx_sq_zr); - binop_mul_2d_tensor_p2(B_y_zr, B_y_zr, By_sq_zr); - binop_mul_2d_tensor_p2(B_z_zr, B_z_zr, Bz_sq_zr); - binop_mul_2d_tensor_p2(B_x_zr, B_z_zr, B_x_B_z_zr); - binop_mul_2d_tensor_p2(B_y_zr, B_z_zr, B_y_B_z_zr); - -} - diff --git a/kernels/maxwell/em_surf_copy_bvar_1x_ser_p1.c b/kernels/maxwell/em_surf_copy_bvar_1x_ser_p1.c deleted file mode 100644 index 1a5cfa679..000000000 --- a/kernels/maxwell/em_surf_copy_bvar_1x_ser_p1.c +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include -GKYL_CU_DH void em_surf_copy_bvar_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf) -{ - // count: Integer to indicate which matrix being fetched. - // x: Input solution vector. - // em: Input electromagnetic fields. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - // bvar_surf: Output magnetic field unit tensor and unit vector at surfaces. - // [bx_xl, bx_xr, bxbx_xl, bxbx_xr, bxby_xl, bxby_xr, bxbz_xl, bxbz_xr, - // by_yl, by_yr, byby_yl, byby_yr, bxby_yl, bxby_yr, bybz_yl, bybz_yr, - // bz_zl, bz_zr, bzbz_zl, bzbz_zr, bxbz_zl, bxbz_zr, bybz_zl, bybz_zr] - - struct gkyl_mat x_bxbx_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_bxbx_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_bxby_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_bxby_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_bxbz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_bxbz_xr = gkyl_nmat_get(x, count+5); - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[1]; - double *bxbx_xl = &bvar_surf[2]; - double *bxbx_xr = &bvar_surf[3]; - double *bxby_xl = &bvar_surf[4]; - double *bxby_xr = &bvar_surf[5]; - double *bxbz_xl = &bvar_surf[6]; - double *bxbz_xr = &bvar_surf[7]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - bxbx_xl[0] = gkyl_mat_get(&x_bxbx_xl,0,0); - bxbx_xr[0] = gkyl_mat_get(&x_bxbx_xr,0,0); - bxby_xl[0] = gkyl_mat_get(&x_bxby_xl,0,0); - bxby_xr[0] = gkyl_mat_get(&x_bxby_xr,0,0); - bxbz_xl[0] = gkyl_mat_get(&x_bxbz_xl,0,0); - bxbz_xr[0] = gkyl_mat_get(&x_bxbz_xr,0,0); - - const double *B_x = &em[6]; - const double *B_y = &em[8]; - const double *B_z = &em[10]; - - double B_x_xl = 0.7071067811865475*B_x[0]-1.224744871391589*B_x[1]; - double B_x_xr = 1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - if (B_x_xl < 0.0) - bx_xl[0] = -sqrt(bxbx_xl[0]); - else - bx_xl[0] = sqrt(bxbx_xl[0]); - - if (B_x_xr < 0.0) - bx_xr[0] = -sqrt(bxbx_xr[0]); - else - bx_xr[0] = sqrt(bxbx_xr[0]); -} - diff --git a/kernels/maxwell/em_surf_copy_bvar_1x_ser_p2.c b/kernels/maxwell/em_surf_copy_bvar_1x_ser_p2.c deleted file mode 100644 index 8e66c570d..000000000 --- a/kernels/maxwell/em_surf_copy_bvar_1x_ser_p2.c +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include -GKYL_CU_DH void em_surf_copy_bvar_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf) -{ - // count: Integer to indicate which matrix being fetched. - // x: Input solution vector. - // em: Input electromagnetic fields. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - // bvar_surf: Output magnetic field unit tensor and unit vector at surfaces. - // [bx_xl, bx_xr, bxbx_xl, bxbx_xr, bxby_xl, bxby_xr, bxbz_xl, bxbz_xr, - // by_yl, by_yr, byby_yl, byby_yr, bxby_yl, bxby_yr, bybz_yl, bybz_yr, - // bz_zl, bz_zr, bzbz_zl, bzbz_zr, bxbz_zl, bxbz_zr, bybz_zl, bybz_zr] - - struct gkyl_mat x_bxbx_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_bxbx_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_bxby_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_bxby_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_bxbz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_bxbz_xr = gkyl_nmat_get(x, count+5); - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[1]; - double *bxbx_xl = &bvar_surf[2]; - double *bxbx_xr = &bvar_surf[3]; - double *bxby_xl = &bvar_surf[4]; - double *bxby_xr = &bvar_surf[5]; - double *bxbz_xl = &bvar_surf[6]; - double *bxbz_xr = &bvar_surf[7]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - bxbx_xl[0] = gkyl_mat_get(&x_bxbx_xl,0,0); - bxbx_xr[0] = gkyl_mat_get(&x_bxbx_xr,0,0); - bxby_xl[0] = gkyl_mat_get(&x_bxby_xl,0,0); - bxby_xr[0] = gkyl_mat_get(&x_bxby_xr,0,0); - bxbz_xl[0] = gkyl_mat_get(&x_bxbz_xl,0,0); - bxbz_xr[0] = gkyl_mat_get(&x_bxbz_xr,0,0); - - const double *B_x = &em[9]; - const double *B_y = &em[12]; - const double *B_z = &em[15]; - - double B_x_xl = 1.58113883008419*B_x[2]-1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - double B_x_xr = 1.58113883008419*B_x[2]+1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - if (B_x_xl < 0.0) - bx_xl[0] = -sqrt(bxbx_xl[0]); - else - bx_xl[0] = sqrt(bxbx_xl[0]); - - if (B_x_xr < 0.0) - bx_xr[0] = -sqrt(bxbx_xr[0]); - else - bx_xr[0] = sqrt(bxbx_xr[0]); -} - diff --git a/kernels/maxwell/em_surf_copy_bvar_2x_ser_p1.c b/kernels/maxwell/em_surf_copy_bvar_2x_ser_p1.c deleted file mode 100644 index ca164211b..000000000 --- a/kernels/maxwell/em_surf_copy_bvar_2x_ser_p1.c +++ /dev/null @@ -1,157 +0,0 @@ -#include -#include -#include -GKYL_CU_DH void em_surf_copy_bvar_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf) -{ - // count: Integer to indicate which matrix being fetched. - // x: Input solution vector. - // em: Input electromagnetic fields. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - // bvar_surf: Output magnetic field unit tensor and unit vector at surfaces. - // [bx_xl, bx_xr, bxbx_xl, bxbx_xr, bxby_xl, bxby_xr, bxbz_xl, bxbz_xr, - // by_yl, by_yr, byby_yl, byby_yr, bxby_yl, bxby_yr, bybz_yl, bybz_yr, - // bz_zl, bz_zr, bzbz_zl, bzbz_zr, bxbz_zl, bxbz_zr, bybz_zl, bybz_zr] - - struct gkyl_mat x_bxbx_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_bxbx_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_bxby_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_bxby_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_bxbz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_bxbz_xr = gkyl_nmat_get(x, count+5); - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[2]; - double *bxbx_xl = &bvar_surf[4]; - double *bxbx_xr = &bvar_surf[6]; - double *bxby_xl = &bvar_surf[8]; - double *bxby_xr = &bvar_surf[10]; - double *bxbz_xl = &bvar_surf[12]; - double *bxbz_xr = &bvar_surf[14]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - struct gkyl_mat x_byby_yl = gkyl_nmat_get(x, count+6); - struct gkyl_mat x_byby_yr = gkyl_nmat_get(x, count+7); - struct gkyl_mat x_bxby_yl = gkyl_nmat_get(x, count+8); - struct gkyl_mat x_bxby_yr = gkyl_nmat_get(x, count+9); - struct gkyl_mat x_bybz_yl = gkyl_nmat_get(x, count+10); - struct gkyl_mat x_bybz_yr = gkyl_nmat_get(x, count+11); - - double *by_yl = &bvar_surf[16]; - double *by_yr = &bvar_surf[18]; - double *byby_yl = &bvar_surf[20]; - double *byby_yr = &bvar_surf[22]; - double *bxby_yl = &bvar_surf[24]; - double *bxby_yr = &bvar_surf[26]; - double *bybz_yl = &bvar_surf[28]; - double *bybz_yr = &bvar_surf[30]; - int *cell_avg_magB2_yl = &cell_avg_magB2_surf[2]; - int *cell_avg_magB2_yr = &cell_avg_magB2_surf[3]; - - bxbx_xl[0] = gkyl_mat_get(&x_bxbx_xl,0,0); - bxbx_xr[0] = gkyl_mat_get(&x_bxbx_xr,0,0); - bxby_xl[0] = gkyl_mat_get(&x_bxby_xl,0,0); - bxby_xr[0] = gkyl_mat_get(&x_bxby_xr,0,0); - bxbz_xl[0] = gkyl_mat_get(&x_bxbz_xl,0,0); - bxbz_xr[0] = gkyl_mat_get(&x_bxbz_xr,0,0); - - byby_yl[0] = gkyl_mat_get(&x_byby_yl,0,0); - byby_yr[0] = gkyl_mat_get(&x_byby_yr,0,0); - bxby_yl[0] = gkyl_mat_get(&x_bxby_yl,0,0); - bxby_yr[0] = gkyl_mat_get(&x_bxby_yr,0,0); - bybz_yl[0] = gkyl_mat_get(&x_bybz_yl,0,0); - bybz_yr[0] = gkyl_mat_get(&x_bybz_yr,0,0); - - bxbx_xl[1] = gkyl_mat_get(&x_bxbx_xl,1,0); - bxbx_xr[1] = gkyl_mat_get(&x_bxbx_xr,1,0); - bxby_xl[1] = gkyl_mat_get(&x_bxby_xl,1,0); - bxby_xr[1] = gkyl_mat_get(&x_bxby_xr,1,0); - bxbz_xl[1] = gkyl_mat_get(&x_bxbz_xl,1,0); - bxbz_xr[1] = gkyl_mat_get(&x_bxbz_xr,1,0); - - byby_yl[1] = gkyl_mat_get(&x_byby_yl,1,0); - byby_yr[1] = gkyl_mat_get(&x_byby_yr,1,0); - bxby_yl[1] = gkyl_mat_get(&x_bxby_yl,1,0); - bxby_yr[1] = gkyl_mat_get(&x_bxby_yr,1,0); - bybz_yl[1] = gkyl_mat_get(&x_bybz_yl,1,0); - bybz_yr[1] = gkyl_mat_get(&x_bybz_yr,1,0); - - const double *B_x = &em[12]; - const double *B_y = &em[16]; - const double *B_z = &em[20]; - - int cell_avg_xl = 0; - int cell_avg_xr = 0; - if (0.7071067811865475*bxbx_xl[0]-0.7071067811865475*bxbx_xl[1] < 0.0) cell_avg_xl = 1; - if (0.7071067811865475*bxbx_xr[0]-0.7071067811865475*bxbx_xr[1] < 0.0) cell_avg_xr = 1; - if (0.7071067811865475*bxbx_xl[1]+0.7071067811865475*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.7071067811865475*bxbx_xr[1]+0.7071067811865475*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - - if (cell_avg_xl || cell_avg_magB2_xl[0]) { - bxbx_xl[1] = 0.0; - bxby_xl[1] = 0.0; - bxbz_xl[1] = 0.0; - // If bxbx, bxby, or bxbz < 0.0 at the lower x surface quadrature points, - // set cell_avg_magB2_xl to be true in case it was not true before. - cell_avg_magB2_xl[0] = 1; - } - - if (cell_avg_xr || cell_avg_magB2_xr[0]) { - bxbx_xr[1] = 0.0; - bxby_xr[1] = 0.0; - bxbz_xr[1] = 0.0; - // If bxbx, bxby, or bxbz < 0.0 at the upper x surface quadrature points, - // set cell_avg_magB2_xr to be true in case it was not true before. - cell_avg_magB2_xr[0] = 1; - } - - int cell_avg_yl = 0; - int cell_avg_yr = 0; - if (0.7071067811865475*byby_yl[0]-0.7071067811865475*byby_yl[1] < 0.0) cell_avg_yl = 1; - if (0.7071067811865475*byby_yr[0]-0.7071067811865475*byby_yr[1] < 0.0) cell_avg_yr = 1; - if (0.7071067811865475*byby_yl[1]+0.7071067811865475*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.7071067811865475*byby_yr[1]+0.7071067811865475*byby_yr[0] < 0.0) cell_avg_yr = 1; - - if (cell_avg_yl || cell_avg_magB2_yl[0]) { - byby_yl[1] = 0.0; - bxby_yl[1] = 0.0; - bybz_yl[1] = 0.0; - // If byby, bxby, or bybz < 0.0 at the lower y surface quadrature points, - // set cell_avg_magB2_yl to be true in case it was not true before. - cell_avg_magB2_yl[0] = 1; - } - - if (cell_avg_yr || cell_avg_magB2_yr[0]) { - byby_yr[1] = 0.0; - bxby_yr[1] = 0.0; - bybz_yr[1] = 0.0; - // If byby, bxby, or bybz < 0.0 at the upper y surface quadrature points, - // set cell_avg_magB2_yr to be true in case it was not true before. - cell_avg_magB2_yr[0] = 1; - } - - // Calculate b_i = B_i/|B| by taking square root of B_i^2/|B|^2 at quadrature points. - // Uses the sign of B_i at quadrature points *on the surface* to get the correct sign of b_i *on the surface*. - // Note: positivity check already happened, so only uses cell average if needed to avoid imaginary values of b_hat. - double B_x_xl[2] = {0.0}; - double B_x_xr[2] = {0.0}; - - B_x_xl[0] = 0.7071067811865475*B_x[0]-1.224744871391589*B_x[1]; - B_x_xl[1] = 0.7071067811865475*B_x[2]-1.224744871391589*B_x[3]; - B_x_xr[0] = 1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xr[1] = 1.224744871391589*B_x[3]+0.7071067811865475*B_x[2]; - ser_1x_p1_sqrt_with_sign(B_x_xl, bxbx_xl, bx_xl); - ser_1x_p1_sqrt_with_sign(B_x_xr, bxbx_xr, bx_xr); - - double B_y_yl[2] = {0.0}; - double B_y_yr[2] = {0.0}; - - B_y_yl[0] = 0.7071067811865475*B_y[0]-1.224744871391589*B_y[2]; - B_y_yl[1] = 0.7071067811865475*B_y[1]-1.224744871391589*B_y[3]; - B_y_yr[0] = 1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yr[1] = 1.224744871391589*B_y[3]+0.7071067811865475*B_y[1]; - ser_1x_p1_sqrt_with_sign(B_y_yl, byby_yl, by_yl); - ser_1x_p1_sqrt_with_sign(B_y_yr, byby_yr, by_yr); - -} - diff --git a/kernels/maxwell/em_surf_copy_bvar_2x_tensor_p2.c b/kernels/maxwell/em_surf_copy_bvar_2x_tensor_p2.c deleted file mode 100644 index 273d9422a..000000000 --- a/kernels/maxwell/em_surf_copy_bvar_2x_tensor_p2.c +++ /dev/null @@ -1,191 +0,0 @@ -#include -#include -#include -GKYL_CU_DH void em_surf_copy_bvar_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf) -{ - // count: Integer to indicate which matrix being fetched. - // x: Input solution vector. - // em: Input electromagnetic fields. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - // bvar_surf: Output magnetic field unit tensor and unit vector at surfaces. - // [bx_xl, bx_xr, bxbx_xl, bxbx_xr, bxby_xl, bxby_xr, bxbz_xl, bxbz_xr, - // by_yl, by_yr, byby_yl, byby_yr, bxby_yl, bxby_yr, bybz_yl, bybz_yr, - // bz_zl, bz_zr, bzbz_zl, bzbz_zr, bxbz_zl, bxbz_zr, bybz_zl, bybz_zr] - - struct gkyl_mat x_bxbx_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_bxbx_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_bxby_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_bxby_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_bxbz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_bxbz_xr = gkyl_nmat_get(x, count+5); - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[3]; - double *bxbx_xl = &bvar_surf[6]; - double *bxbx_xr = &bvar_surf[9]; - double *bxby_xl = &bvar_surf[12]; - double *bxby_xr = &bvar_surf[15]; - double *bxbz_xl = &bvar_surf[18]; - double *bxbz_xr = &bvar_surf[21]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - struct gkyl_mat x_byby_yl = gkyl_nmat_get(x, count+6); - struct gkyl_mat x_byby_yr = gkyl_nmat_get(x, count+7); - struct gkyl_mat x_bxby_yl = gkyl_nmat_get(x, count+8); - struct gkyl_mat x_bxby_yr = gkyl_nmat_get(x, count+9); - struct gkyl_mat x_bybz_yl = gkyl_nmat_get(x, count+10); - struct gkyl_mat x_bybz_yr = gkyl_nmat_get(x, count+11); - - double *by_yl = &bvar_surf[24]; - double *by_yr = &bvar_surf[27]; - double *byby_yl = &bvar_surf[30]; - double *byby_yr = &bvar_surf[33]; - double *bxby_yl = &bvar_surf[36]; - double *bxby_yr = &bvar_surf[39]; - double *bybz_yl = &bvar_surf[42]; - double *bybz_yr = &bvar_surf[45]; - int *cell_avg_magB2_yl = &cell_avg_magB2_surf[2]; - int *cell_avg_magB2_yr = &cell_avg_magB2_surf[3]; - - bxbx_xl[0] = gkyl_mat_get(&x_bxbx_xl,0,0); - bxbx_xr[0] = gkyl_mat_get(&x_bxbx_xr,0,0); - bxby_xl[0] = gkyl_mat_get(&x_bxby_xl,0,0); - bxby_xr[0] = gkyl_mat_get(&x_bxby_xr,0,0); - bxbz_xl[0] = gkyl_mat_get(&x_bxbz_xl,0,0); - bxbz_xr[0] = gkyl_mat_get(&x_bxbz_xr,0,0); - - byby_yl[0] = gkyl_mat_get(&x_byby_yl,0,0); - byby_yr[0] = gkyl_mat_get(&x_byby_yr,0,0); - bxby_yl[0] = gkyl_mat_get(&x_bxby_yl,0,0); - bxby_yr[0] = gkyl_mat_get(&x_bxby_yr,0,0); - bybz_yl[0] = gkyl_mat_get(&x_bybz_yl,0,0); - bybz_yr[0] = gkyl_mat_get(&x_bybz_yr,0,0); - - bxbx_xl[1] = gkyl_mat_get(&x_bxbx_xl,1,0); - bxbx_xr[1] = gkyl_mat_get(&x_bxbx_xr,1,0); - bxby_xl[1] = gkyl_mat_get(&x_bxby_xl,1,0); - bxby_xr[1] = gkyl_mat_get(&x_bxby_xr,1,0); - bxbz_xl[1] = gkyl_mat_get(&x_bxbz_xl,1,0); - bxbz_xr[1] = gkyl_mat_get(&x_bxbz_xr,1,0); - - byby_yl[1] = gkyl_mat_get(&x_byby_yl,1,0); - byby_yr[1] = gkyl_mat_get(&x_byby_yr,1,0); - bxby_yl[1] = gkyl_mat_get(&x_bxby_yl,1,0); - bxby_yr[1] = gkyl_mat_get(&x_bxby_yr,1,0); - bybz_yl[1] = gkyl_mat_get(&x_bybz_yl,1,0); - bybz_yr[1] = gkyl_mat_get(&x_bybz_yr,1,0); - - bxbx_xl[2] = gkyl_mat_get(&x_bxbx_xl,2,0); - bxbx_xr[2] = gkyl_mat_get(&x_bxbx_xr,2,0); - bxby_xl[2] = gkyl_mat_get(&x_bxby_xl,2,0); - bxby_xr[2] = gkyl_mat_get(&x_bxby_xr,2,0); - bxbz_xl[2] = gkyl_mat_get(&x_bxbz_xl,2,0); - bxbz_xr[2] = gkyl_mat_get(&x_bxbz_xr,2,0); - - byby_yl[2] = gkyl_mat_get(&x_byby_yl,2,0); - byby_yr[2] = gkyl_mat_get(&x_byby_yr,2,0); - bxby_yl[2] = gkyl_mat_get(&x_bxby_yl,2,0); - bxby_yr[2] = gkyl_mat_get(&x_bxby_yr,2,0); - bybz_yl[2] = gkyl_mat_get(&x_bybz_yl,2,0); - bybz_yr[2] = gkyl_mat_get(&x_bybz_yr,2,0); - - const double *B_x = &em[27]; - const double *B_y = &em[36]; - const double *B_z = &em[45]; - - int cell_avg_xl = 0; - int cell_avg_xr = 0; - if (0.6324555320336759*bxbx_xl[2]-0.9486832980505137*bxbx_xl[1]+0.7071067811865475*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.6324555320336759*bxbx_xr[2]-0.9486832980505137*bxbx_xr[1]+0.7071067811865475*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if (0.7071067811865475*bxbx_xl[0]-0.7905694150420947*bxbx_xl[2] < 0.0) cell_avg_xl = 1; - if (0.7071067811865475*bxbx_xr[0]-0.7905694150420947*bxbx_xr[2] < 0.0) cell_avg_xr = 1; - if (0.6324555320336759*bxbx_xl[2]+0.9486832980505137*bxbx_xl[1]+0.7071067811865475*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.6324555320336759*bxbx_xr[2]+0.9486832980505137*bxbx_xr[1]+0.7071067811865475*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - - if (cell_avg_xl || cell_avg_magB2_xl[0]) { - bxbx_xl[1] = 0.0; - bxby_xl[1] = 0.0; - bxbz_xl[1] = 0.0; - bxbx_xl[2] = 0.0; - bxby_xl[2] = 0.0; - bxbz_xl[2] = 0.0; - // If bxbx, bxby, or bxbz < 0.0 at the lower x surface quadrature points, - // set cell_avg_magB2_xl to be true in case it was not true before. - cell_avg_magB2_xl[0] = 1; - } - - if (cell_avg_xr || cell_avg_magB2_xr[0]) { - bxbx_xr[1] = 0.0; - bxby_xr[1] = 0.0; - bxbz_xr[1] = 0.0; - bxbx_xr[2] = 0.0; - bxby_xr[2] = 0.0; - bxbz_xr[2] = 0.0; - // If bxbx, bxby, or bxbz < 0.0 at the upper x surface quadrature points, - // set cell_avg_magB2_xr to be true in case it was not true before. - cell_avg_magB2_xr[0] = 1; - } - - int cell_avg_yl = 0; - int cell_avg_yr = 0; - if (0.6324555320336759*byby_yl[2]-0.9486832980505137*byby_yl[1]+0.7071067811865475*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.6324555320336759*byby_yr[2]-0.9486832980505137*byby_yr[1]+0.7071067811865475*byby_yr[0] < 0.0) cell_avg_yr = 1; - if (0.7071067811865475*byby_yl[0]-0.7905694150420947*byby_yl[2] < 0.0) cell_avg_yl = 1; - if (0.7071067811865475*byby_yr[0]-0.7905694150420947*byby_yr[2] < 0.0) cell_avg_yr = 1; - if (0.6324555320336759*byby_yl[2]+0.9486832980505137*byby_yl[1]+0.7071067811865475*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.6324555320336759*byby_yr[2]+0.9486832980505137*byby_yr[1]+0.7071067811865475*byby_yr[0] < 0.0) cell_avg_yr = 1; - - if (cell_avg_yl || cell_avg_magB2_yl[0]) { - byby_yl[1] = 0.0; - bxby_yl[1] = 0.0; - bybz_yl[1] = 0.0; - byby_yl[2] = 0.0; - bxby_yl[2] = 0.0; - bybz_yl[2] = 0.0; - // If byby, bxby, or bybz < 0.0 at the lower y surface quadrature points, - // set cell_avg_magB2_yl to be true in case it was not true before. - cell_avg_magB2_yl[0] = 1; - } - - if (cell_avg_yr || cell_avg_magB2_yr[0]) { - byby_yr[1] = 0.0; - bxby_yr[1] = 0.0; - bybz_yr[1] = 0.0; - byby_yr[2] = 0.0; - bxby_yr[2] = 0.0; - bybz_yr[2] = 0.0; - // If byby, bxby, or bybz < 0.0 at the upper y surface quadrature points, - // set cell_avg_magB2_yr to be true in case it was not true before. - cell_avg_magB2_yr[0] = 1; - } - - // Calculate b_i = B_i/|B| by taking square root of B_i^2/|B|^2 at quadrature points. - // Uses the sign of B_i at quadrature points *on the surface* to get the correct sign of b_i *on the surface*. - // Note: positivity check already happened, so only uses cell average if needed to avoid imaginary values of b_hat. - double B_x_xl[3] = {0.0}; - double B_x_xr[3] = {0.0}; - - B_x_xl[0] = 1.58113883008419*B_x[4]-1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xl[1] = 1.58113883008419*B_x[6]-1.224744871391589*B_x[3]+0.7071067811865475*B_x[2]; - B_x_xl[2] = 1.58113883008419*B_x[8]-1.224744871391589*B_x[7]+0.7071067811865475*B_x[5]; - B_x_xr[0] = 1.58113883008419*B_x[4]+1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xr[1] = 1.58113883008419*B_x[6]+1.224744871391589*B_x[3]+0.7071067811865475*B_x[2]; - B_x_xr[2] = 1.58113883008419*B_x[8]+1.224744871391589*B_x[7]+0.7071067811865475*B_x[5]; - ser_1x_p2_sqrt_with_sign(B_x_xl, bxbx_xl, bx_xl); - ser_1x_p2_sqrt_with_sign(B_x_xr, bxbx_xr, bx_xr); - - double B_y_yl[3] = {0.0}; - double B_y_yr[3] = {0.0}; - - B_y_yl[0] = 1.58113883008419*B_y[5]-1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yl[1] = 1.58113883008419*B_y[7]-1.224744871391589*B_y[3]+0.7071067811865475*B_y[1]; - B_y_yl[2] = 1.58113883008419*B_y[8]-1.224744871391589*B_y[6]+0.7071067811865475*B_y[4]; - B_y_yr[0] = 1.58113883008419*B_y[5]+1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yr[1] = 1.58113883008419*B_y[7]+1.224744871391589*B_y[3]+0.7071067811865475*B_y[1]; - B_y_yr[2] = 1.58113883008419*B_y[8]+1.224744871391589*B_y[6]+0.7071067811865475*B_y[4]; - ser_1x_p2_sqrt_with_sign(B_y_yl, byby_yl, by_yl); - ser_1x_p2_sqrt_with_sign(B_y_yr, byby_yr, by_yr); - -} - diff --git a/kernels/maxwell/em_surf_copy_bvar_3x_ser_p1.c b/kernels/maxwell/em_surf_copy_bvar_3x_ser_p1.c deleted file mode 100644 index 3b0c5b914..000000000 --- a/kernels/maxwell/em_surf_copy_bvar_3x_ser_p1.c +++ /dev/null @@ -1,326 +0,0 @@ -#include -#include -#include -GKYL_CU_DH void em_surf_copy_bvar_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf) -{ - // count: Integer to indicate which matrix being fetched. - // x: Input solution vector. - // em: Input electromagnetic fields. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - // bvar_surf: Output magnetic field unit tensor and unit vector at surfaces. - // [bx_xl, bx_xr, bxbx_xl, bxbx_xr, bxby_xl, bxby_xr, bxbz_xl, bxbz_xr, - // by_yl, by_yr, byby_yl, byby_yr, bxby_yl, bxby_yr, bybz_yl, bybz_yr, - // bz_zl, bz_zr, bzbz_zl, bzbz_zr, bxbz_zl, bxbz_zr, bybz_zl, bybz_zr] - - struct gkyl_mat x_bxbx_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_bxbx_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_bxby_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_bxby_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_bxbz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_bxbz_xr = gkyl_nmat_get(x, count+5); - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[4]; - double *bxbx_xl = &bvar_surf[8]; - double *bxbx_xr = &bvar_surf[12]; - double *bxby_xl = &bvar_surf[16]; - double *bxby_xr = &bvar_surf[20]; - double *bxbz_xl = &bvar_surf[24]; - double *bxbz_xr = &bvar_surf[28]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - struct gkyl_mat x_byby_yl = gkyl_nmat_get(x, count+6); - struct gkyl_mat x_byby_yr = gkyl_nmat_get(x, count+7); - struct gkyl_mat x_bxby_yl = gkyl_nmat_get(x, count+8); - struct gkyl_mat x_bxby_yr = gkyl_nmat_get(x, count+9); - struct gkyl_mat x_bybz_yl = gkyl_nmat_get(x, count+10); - struct gkyl_mat x_bybz_yr = gkyl_nmat_get(x, count+11); - - double *by_yl = &bvar_surf[32]; - double *by_yr = &bvar_surf[36]; - double *byby_yl = &bvar_surf[40]; - double *byby_yr = &bvar_surf[44]; - double *bxby_yl = &bvar_surf[48]; - double *bxby_yr = &bvar_surf[52]; - double *bybz_yl = &bvar_surf[56]; - double *bybz_yr = &bvar_surf[60]; - int *cell_avg_magB2_yl = &cell_avg_magB2_surf[2]; - int *cell_avg_magB2_yr = &cell_avg_magB2_surf[3]; - - struct gkyl_mat x_bzbz_zl = gkyl_nmat_get(x, count+12); - struct gkyl_mat x_bzbz_zr = gkyl_nmat_get(x, count+13); - struct gkyl_mat x_bxbz_zl = gkyl_nmat_get(x, count+14); - struct gkyl_mat x_bxbz_zr = gkyl_nmat_get(x, count+15); - struct gkyl_mat x_bybz_zl = gkyl_nmat_get(x, count+16); - struct gkyl_mat x_bybz_zr = gkyl_nmat_get(x, count+17); - - double *bz_zl = &bvar_surf[64]; - double *bz_zr = &bvar_surf[68]; - double *bzbz_zl = &bvar_surf[72]; - double *bzbz_zr = &bvar_surf[76]; - double *bxbz_zl = &bvar_surf[80]; - double *bxbz_zr = &bvar_surf[84]; - double *bybz_zl = &bvar_surf[88]; - double *bybz_zr = &bvar_surf[92]; - int *cell_avg_magB2_zl = &cell_avg_magB2_surf[4]; - int *cell_avg_magB2_zr = &cell_avg_magB2_surf[5]; - - bxbx_xl[0] = gkyl_mat_get(&x_bxbx_xl,0,0); - bxbx_xr[0] = gkyl_mat_get(&x_bxbx_xr,0,0); - bxby_xl[0] = gkyl_mat_get(&x_bxby_xl,0,0); - bxby_xr[0] = gkyl_mat_get(&x_bxby_xr,0,0); - bxbz_xl[0] = gkyl_mat_get(&x_bxbz_xl,0,0); - bxbz_xr[0] = gkyl_mat_get(&x_bxbz_xr,0,0); - - byby_yl[0] = gkyl_mat_get(&x_byby_yl,0,0); - byby_yr[0] = gkyl_mat_get(&x_byby_yr,0,0); - bxby_yl[0] = gkyl_mat_get(&x_bxby_yl,0,0); - bxby_yr[0] = gkyl_mat_get(&x_bxby_yr,0,0); - bybz_yl[0] = gkyl_mat_get(&x_bybz_yl,0,0); - bybz_yr[0] = gkyl_mat_get(&x_bybz_yr,0,0); - - bzbz_zl[0] = gkyl_mat_get(&x_bzbz_zl,0,0); - bzbz_zr[0] = gkyl_mat_get(&x_bzbz_zr,0,0); - bxbz_zl[0] = gkyl_mat_get(&x_bxbz_zl,0,0); - bxbz_zr[0] = gkyl_mat_get(&x_bxbz_zr,0,0); - bybz_zl[0] = gkyl_mat_get(&x_bybz_zl,0,0); - bybz_zr[0] = gkyl_mat_get(&x_bybz_zr,0,0); - - bxbx_xl[1] = gkyl_mat_get(&x_bxbx_xl,1,0); - bxbx_xr[1] = gkyl_mat_get(&x_bxbx_xr,1,0); - bxby_xl[1] = gkyl_mat_get(&x_bxby_xl,1,0); - bxby_xr[1] = gkyl_mat_get(&x_bxby_xr,1,0); - bxbz_xl[1] = gkyl_mat_get(&x_bxbz_xl,1,0); - bxbz_xr[1] = gkyl_mat_get(&x_bxbz_xr,1,0); - - byby_yl[1] = gkyl_mat_get(&x_byby_yl,1,0); - byby_yr[1] = gkyl_mat_get(&x_byby_yr,1,0); - bxby_yl[1] = gkyl_mat_get(&x_bxby_yl,1,0); - bxby_yr[1] = gkyl_mat_get(&x_bxby_yr,1,0); - bybz_yl[1] = gkyl_mat_get(&x_bybz_yl,1,0); - bybz_yr[1] = gkyl_mat_get(&x_bybz_yr,1,0); - - bzbz_zl[1] = gkyl_mat_get(&x_bzbz_zl,1,0); - bzbz_zr[1] = gkyl_mat_get(&x_bzbz_zr,1,0); - bxbz_zl[1] = gkyl_mat_get(&x_bxbz_zl,1,0); - bxbz_zr[1] = gkyl_mat_get(&x_bxbz_zr,1,0); - bybz_zl[1] = gkyl_mat_get(&x_bybz_zl,1,0); - bybz_zr[1] = gkyl_mat_get(&x_bybz_zr,1,0); - - bxbx_xl[2] = gkyl_mat_get(&x_bxbx_xl,2,0); - bxbx_xr[2] = gkyl_mat_get(&x_bxbx_xr,2,0); - bxby_xl[2] = gkyl_mat_get(&x_bxby_xl,2,0); - bxby_xr[2] = gkyl_mat_get(&x_bxby_xr,2,0); - bxbz_xl[2] = gkyl_mat_get(&x_bxbz_xl,2,0); - bxbz_xr[2] = gkyl_mat_get(&x_bxbz_xr,2,0); - - byby_yl[2] = gkyl_mat_get(&x_byby_yl,2,0); - byby_yr[2] = gkyl_mat_get(&x_byby_yr,2,0); - bxby_yl[2] = gkyl_mat_get(&x_bxby_yl,2,0); - bxby_yr[2] = gkyl_mat_get(&x_bxby_yr,2,0); - bybz_yl[2] = gkyl_mat_get(&x_bybz_yl,2,0); - bybz_yr[2] = gkyl_mat_get(&x_bybz_yr,2,0); - - bzbz_zl[2] = gkyl_mat_get(&x_bzbz_zl,2,0); - bzbz_zr[2] = gkyl_mat_get(&x_bzbz_zr,2,0); - bxbz_zl[2] = gkyl_mat_get(&x_bxbz_zl,2,0); - bxbz_zr[2] = gkyl_mat_get(&x_bxbz_zr,2,0); - bybz_zl[2] = gkyl_mat_get(&x_bybz_zl,2,0); - bybz_zr[2] = gkyl_mat_get(&x_bybz_zr,2,0); - - bxbx_xl[3] = gkyl_mat_get(&x_bxbx_xl,3,0); - bxbx_xr[3] = gkyl_mat_get(&x_bxbx_xr,3,0); - bxby_xl[3] = gkyl_mat_get(&x_bxby_xl,3,0); - bxby_xr[3] = gkyl_mat_get(&x_bxby_xr,3,0); - bxbz_xl[3] = gkyl_mat_get(&x_bxbz_xl,3,0); - bxbz_xr[3] = gkyl_mat_get(&x_bxbz_xr,3,0); - - byby_yl[3] = gkyl_mat_get(&x_byby_yl,3,0); - byby_yr[3] = gkyl_mat_get(&x_byby_yr,3,0); - bxby_yl[3] = gkyl_mat_get(&x_bxby_yl,3,0); - bxby_yr[3] = gkyl_mat_get(&x_bxby_yr,3,0); - bybz_yl[3] = gkyl_mat_get(&x_bybz_yl,3,0); - bybz_yr[3] = gkyl_mat_get(&x_bybz_yr,3,0); - - bzbz_zl[3] = gkyl_mat_get(&x_bzbz_zl,3,0); - bzbz_zr[3] = gkyl_mat_get(&x_bzbz_zr,3,0); - bxbz_zl[3] = gkyl_mat_get(&x_bxbz_zl,3,0); - bxbz_zr[3] = gkyl_mat_get(&x_bxbz_zr,3,0); - bybz_zl[3] = gkyl_mat_get(&x_bybz_zl,3,0); - bybz_zr[3] = gkyl_mat_get(&x_bybz_zr,3,0); - - const double *B_x = &em[24]; - const double *B_y = &em[32]; - const double *B_z = &em[40]; - - int cell_avg_xl = 0; - int cell_avg_xr = 0; - if (0.5*bxbx_xl[3]-0.5*bxbx_xl[2]-0.5*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.5*bxbx_xr[3]-0.5*bxbx_xr[2]-0.5*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if ((-0.5*bxbx_xl[3])+0.5*bxbx_xl[2]-0.5*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if ((-0.5*bxbx_xr[3])+0.5*bxbx_xr[2]-0.5*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if ((-0.5*bxbx_xl[3])-0.5*bxbx_xl[2]+0.5*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if ((-0.5*bxbx_xr[3])-0.5*bxbx_xr[2]+0.5*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if (0.5*bxbx_xl[3]+0.5*bxbx_xl[2]+0.5*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.5*bxbx_xr[3]+0.5*bxbx_xr[2]+0.5*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - - if (cell_avg_xl || cell_avg_magB2_xl[0]) { - bxbx_xl[1] = 0.0; - bxby_xl[1] = 0.0; - bxbz_xl[1] = 0.0; - bxbx_xl[2] = 0.0; - bxby_xl[2] = 0.0; - bxbz_xl[2] = 0.0; - bxbx_xl[3] = 0.0; - bxby_xl[3] = 0.0; - bxbz_xl[3] = 0.0; - // If bxbx, bxby, or bxbz < 0.0 at the lower x surface quadrature points, - // set cell_avg_magB2_xl to be true in case it was not true before. - cell_avg_magB2_xl[0] = 1; - } - - if (cell_avg_xr || cell_avg_magB2_xr[0]) { - bxbx_xr[1] = 0.0; - bxby_xr[1] = 0.0; - bxbz_xr[1] = 0.0; - bxbx_xr[2] = 0.0; - bxby_xr[2] = 0.0; - bxbz_xr[2] = 0.0; - bxbx_xr[3] = 0.0; - bxby_xr[3] = 0.0; - bxbz_xr[3] = 0.0; - // If bxbx, bxby, or bxbz < 0.0 at the upper x surface quadrature points, - // set cell_avg_magB2_xr to be true in case it was not true before. - cell_avg_magB2_xr[0] = 1; - } - - int cell_avg_yl = 0; - int cell_avg_yr = 0; - if (0.5*byby_yl[3]-0.5*byby_yl[2]-0.5*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.5*byby_yr[3]-0.5*byby_yr[2]-0.5*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if ((-0.5*byby_yl[3])+0.5*byby_yl[2]-0.5*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if ((-0.5*byby_yr[3])+0.5*byby_yr[2]-0.5*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if ((-0.5*byby_yl[3])-0.5*byby_yl[2]+0.5*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if ((-0.5*byby_yr[3])-0.5*byby_yr[2]+0.5*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if (0.5*byby_yl[3]+0.5*byby_yl[2]+0.5*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.5*byby_yr[3]+0.5*byby_yr[2]+0.5*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - - if (cell_avg_yl || cell_avg_magB2_yl[0]) { - byby_yl[1] = 0.0; - bxby_yl[1] = 0.0; - bybz_yl[1] = 0.0; - byby_yl[2] = 0.0; - bxby_yl[2] = 0.0; - bybz_yl[2] = 0.0; - byby_yl[3] = 0.0; - bxby_yl[3] = 0.0; - bybz_yl[3] = 0.0; - // If byby, bxby, or bybz < 0.0 at the lower y surface quadrature points, - // set cell_avg_magB2_yl to be true in case it was not true before. - cell_avg_magB2_yl[0] = 1; - } - - if (cell_avg_yr || cell_avg_magB2_yr[0]) { - byby_yr[1] = 0.0; - bxby_yr[1] = 0.0; - bybz_yr[1] = 0.0; - byby_yr[2] = 0.0; - bxby_yr[2] = 0.0; - bybz_yr[2] = 0.0; - byby_yr[3] = 0.0; - bxby_yr[3] = 0.0; - bybz_yr[3] = 0.0; - // If byby, bxby, or bybz < 0.0 at the upper y surface quadrature points, - // set cell_avg_magB2_yr to be true in case it was not true before. - cell_avg_magB2_yr[0] = 1; - } - - int cell_avg_zl = 0; - int cell_avg_zr = 0; - if (0.5*bzbz_zl[3]-0.5*bzbz_zl[2]-0.5*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if (0.5*bzbz_zr[3]-0.5*bzbz_zr[2]-0.5*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if ((-0.5*bzbz_zl[3])+0.5*bzbz_zl[2]-0.5*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if ((-0.5*bzbz_zr[3])+0.5*bzbz_zr[2]-0.5*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if ((-0.5*bzbz_zl[3])-0.5*bzbz_zl[2]+0.5*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if ((-0.5*bzbz_zr[3])-0.5*bzbz_zr[2]+0.5*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if (0.5*bzbz_zl[3]+0.5*bzbz_zl[2]+0.5*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if (0.5*bzbz_zr[3]+0.5*bzbz_zr[2]+0.5*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - - if (cell_avg_zl || cell_avg_magB2_zl[0]) { - bzbz_zl[1] = 0.0; - bxbz_zl[1] = 0.0; - bybz_zl[1] = 0.0; - bzbz_zl[2] = 0.0; - bxbz_zl[2] = 0.0; - bybz_zl[2] = 0.0; - bzbz_zl[3] = 0.0; - bxbz_zl[3] = 0.0; - bybz_zl[3] = 0.0; - // If bzbz, bxbz, or bybz < 0.0 at the lower z surface quadrature points, - // set cell_avg_magB2_zl to be true in case it was not true before. - cell_avg_magB2_zl[0] = 1; - } - - if (cell_avg_zr || cell_avg_magB2_zr[0]) { - bzbz_zr[1] = 0.0; - bxbz_zr[1] = 0.0; - bybz_zr[1] = 0.0; - bzbz_zr[2] = 0.0; - bxbz_zr[2] = 0.0; - bybz_zr[2] = 0.0; - bzbz_zr[3] = 0.0; - bxbz_zr[3] = 0.0; - bybz_zr[3] = 0.0; - // If bzbz, bxbz, or bybz < 0.0 at the upper z surface quadrature points, - // set cell_avg_magB2_zr to be true in case it was not true before. - cell_avg_magB2_zr[0] = 1; - } - - // Calculate b_i = B_i/|B| by taking square root of B_i^2/|B|^2 at quadrature points. - // Uses the sign of B_i at quadrature points *on the surface* to get the correct sign of b_i *on the surface*. - // Note: positivity check already happened, so only uses cell average if needed to avoid imaginary values of b_hat. - double B_x_xl[4] = {0.0}; - double B_x_xr[4] = {0.0}; - - B_x_xl[0] = 0.7071067811865475*B_x[0]-1.224744871391589*B_x[1]; - B_x_xl[1] = 0.7071067811865475*B_x[2]-1.224744871391589*B_x[4]; - B_x_xl[2] = 0.7071067811865475*B_x[3]-1.224744871391589*B_x[5]; - B_x_xl[3] = 0.7071067811865475*B_x[6]-1.224744871391589*B_x[7]; - B_x_xr[0] = 1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xr[1] = 1.224744871391589*B_x[4]+0.7071067811865475*B_x[2]; - B_x_xr[2] = 1.224744871391589*B_x[5]+0.7071067811865475*B_x[3]; - B_x_xr[3] = 1.224744871391589*B_x[7]+0.7071067811865475*B_x[6]; - ser_2x_p1_sqrt_with_sign(B_x_xl, bxbx_xl, bx_xl); - ser_2x_p1_sqrt_with_sign(B_x_xr, bxbx_xr, bx_xr); - - double B_y_yl[4] = {0.0}; - double B_y_yr[4] = {0.0}; - - B_y_yl[0] = 0.7071067811865475*B_y[0]-1.224744871391589*B_y[2]; - B_y_yl[1] = 0.7071067811865475*B_y[1]-1.224744871391589*B_y[4]; - B_y_yl[2] = 0.7071067811865475*B_y[3]-1.224744871391589*B_y[6]; - B_y_yl[3] = 0.7071067811865475*B_y[5]-1.224744871391589*B_y[7]; - B_y_yr[0] = 1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yr[1] = 1.224744871391589*B_y[4]+0.7071067811865475*B_y[1]; - B_y_yr[2] = 1.224744871391589*B_y[6]+0.7071067811865475*B_y[3]; - B_y_yr[3] = 1.224744871391589*B_y[7]+0.7071067811865475*B_y[5]; - ser_2x_p1_sqrt_with_sign(B_y_yl, byby_yl, by_yl); - ser_2x_p1_sqrt_with_sign(B_y_yr, byby_yr, by_yr); - - double B_z_zl[4] = {0.0}; - double B_z_zr[4] = {0.0}; - - B_z_zl[0] = 0.7071067811865475*B_z[0]-1.224744871391589*B_z[3]; - B_z_zl[1] = 0.7071067811865475*B_z[1]-1.224744871391589*B_z[5]; - B_z_zl[2] = 0.7071067811865475*B_z[2]-1.224744871391589*B_z[6]; - B_z_zl[3] = 0.7071067811865475*B_z[4]-1.224744871391589*B_z[7]; - B_z_zr[0] = 1.224744871391589*B_z[3]+0.7071067811865475*B_z[0]; - B_z_zr[1] = 1.224744871391589*B_z[5]+0.7071067811865475*B_z[1]; - B_z_zr[2] = 1.224744871391589*B_z[6]+0.7071067811865475*B_z[2]; - B_z_zr[3] = 1.224744871391589*B_z[7]+0.7071067811865475*B_z[4]; - ser_2x_p1_sqrt_with_sign(B_z_zl, bzbz_zl, bz_zl); - ser_2x_p1_sqrt_with_sign(B_z_zl, bzbz_zl, bz_zl); - -} - diff --git a/kernels/maxwell/em_surf_copy_bvar_3x_tensor_p2.c b/kernels/maxwell/em_surf_copy_bvar_3x_tensor_p2.c deleted file mode 100644 index 479efb246..000000000 --- a/kernels/maxwell/em_surf_copy_bvar_3x_tensor_p2.c +++ /dev/null @@ -1,581 +0,0 @@ -#include -#include -#include -GKYL_CU_DH void em_surf_copy_bvar_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf) -{ - // count: Integer to indicate which matrix being fetched. - // x: Input solution vector. - // em: Input electromagnetic fields. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - // bvar_surf: Output magnetic field unit tensor and unit vector at surfaces. - // [bx_xl, bx_xr, bxbx_xl, bxbx_xr, bxby_xl, bxby_xr, bxbz_xl, bxbz_xr, - // by_yl, by_yr, byby_yl, byby_yr, bxby_yl, bxby_yr, bybz_yl, bybz_yr, - // bz_zl, bz_zr, bzbz_zl, bzbz_zr, bxbz_zl, bxbz_zr, bybz_zl, bybz_zr] - - struct gkyl_mat x_bxbx_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_bxbx_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_bxby_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_bxby_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_bxbz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_bxbz_xr = gkyl_nmat_get(x, count+5); - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[9]; - double *bxbx_xl = &bvar_surf[18]; - double *bxbx_xr = &bvar_surf[27]; - double *bxby_xl = &bvar_surf[36]; - double *bxby_xr = &bvar_surf[45]; - double *bxbz_xl = &bvar_surf[54]; - double *bxbz_xr = &bvar_surf[63]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - struct gkyl_mat x_byby_yl = gkyl_nmat_get(x, count+6); - struct gkyl_mat x_byby_yr = gkyl_nmat_get(x, count+7); - struct gkyl_mat x_bxby_yl = gkyl_nmat_get(x, count+8); - struct gkyl_mat x_bxby_yr = gkyl_nmat_get(x, count+9); - struct gkyl_mat x_bybz_yl = gkyl_nmat_get(x, count+10); - struct gkyl_mat x_bybz_yr = gkyl_nmat_get(x, count+11); - - double *by_yl = &bvar_surf[72]; - double *by_yr = &bvar_surf[81]; - double *byby_yl = &bvar_surf[90]; - double *byby_yr = &bvar_surf[99]; - double *bxby_yl = &bvar_surf[108]; - double *bxby_yr = &bvar_surf[117]; - double *bybz_yl = &bvar_surf[126]; - double *bybz_yr = &bvar_surf[135]; - int *cell_avg_magB2_yl = &cell_avg_magB2_surf[2]; - int *cell_avg_magB2_yr = &cell_avg_magB2_surf[3]; - - struct gkyl_mat x_bzbz_zl = gkyl_nmat_get(x, count+12); - struct gkyl_mat x_bzbz_zr = gkyl_nmat_get(x, count+13); - struct gkyl_mat x_bxbz_zl = gkyl_nmat_get(x, count+14); - struct gkyl_mat x_bxbz_zr = gkyl_nmat_get(x, count+15); - struct gkyl_mat x_bybz_zl = gkyl_nmat_get(x, count+16); - struct gkyl_mat x_bybz_zr = gkyl_nmat_get(x, count+17); - - double *bz_zl = &bvar_surf[144]; - double *bz_zr = &bvar_surf[153]; - double *bzbz_zl = &bvar_surf[162]; - double *bzbz_zr = &bvar_surf[171]; - double *bxbz_zl = &bvar_surf[180]; - double *bxbz_zr = &bvar_surf[189]; - double *bybz_zl = &bvar_surf[198]; - double *bybz_zr = &bvar_surf[207]; - int *cell_avg_magB2_zl = &cell_avg_magB2_surf[4]; - int *cell_avg_magB2_zr = &cell_avg_magB2_surf[5]; - - bxbx_xl[0] = gkyl_mat_get(&x_bxbx_xl,0,0); - bxbx_xr[0] = gkyl_mat_get(&x_bxbx_xr,0,0); - bxby_xl[0] = gkyl_mat_get(&x_bxby_xl,0,0); - bxby_xr[0] = gkyl_mat_get(&x_bxby_xr,0,0); - bxbz_xl[0] = gkyl_mat_get(&x_bxbz_xl,0,0); - bxbz_xr[0] = gkyl_mat_get(&x_bxbz_xr,0,0); - - byby_yl[0] = gkyl_mat_get(&x_byby_yl,0,0); - byby_yr[0] = gkyl_mat_get(&x_byby_yr,0,0); - bxby_yl[0] = gkyl_mat_get(&x_bxby_yl,0,0); - bxby_yr[0] = gkyl_mat_get(&x_bxby_yr,0,0); - bybz_yl[0] = gkyl_mat_get(&x_bybz_yl,0,0); - bybz_yr[0] = gkyl_mat_get(&x_bybz_yr,0,0); - - bzbz_zl[0] = gkyl_mat_get(&x_bzbz_zl,0,0); - bzbz_zr[0] = gkyl_mat_get(&x_bzbz_zr,0,0); - bxbz_zl[0] = gkyl_mat_get(&x_bxbz_zl,0,0); - bxbz_zr[0] = gkyl_mat_get(&x_bxbz_zr,0,0); - bybz_zl[0] = gkyl_mat_get(&x_bybz_zl,0,0); - bybz_zr[0] = gkyl_mat_get(&x_bybz_zr,0,0); - - bxbx_xl[1] = gkyl_mat_get(&x_bxbx_xl,1,0); - bxbx_xr[1] = gkyl_mat_get(&x_bxbx_xr,1,0); - bxby_xl[1] = gkyl_mat_get(&x_bxby_xl,1,0); - bxby_xr[1] = gkyl_mat_get(&x_bxby_xr,1,0); - bxbz_xl[1] = gkyl_mat_get(&x_bxbz_xl,1,0); - bxbz_xr[1] = gkyl_mat_get(&x_bxbz_xr,1,0); - - byby_yl[1] = gkyl_mat_get(&x_byby_yl,1,0); - byby_yr[1] = gkyl_mat_get(&x_byby_yr,1,0); - bxby_yl[1] = gkyl_mat_get(&x_bxby_yl,1,0); - bxby_yr[1] = gkyl_mat_get(&x_bxby_yr,1,0); - bybz_yl[1] = gkyl_mat_get(&x_bybz_yl,1,0); - bybz_yr[1] = gkyl_mat_get(&x_bybz_yr,1,0); - - bzbz_zl[1] = gkyl_mat_get(&x_bzbz_zl,1,0); - bzbz_zr[1] = gkyl_mat_get(&x_bzbz_zr,1,0); - bxbz_zl[1] = gkyl_mat_get(&x_bxbz_zl,1,0); - bxbz_zr[1] = gkyl_mat_get(&x_bxbz_zr,1,0); - bybz_zl[1] = gkyl_mat_get(&x_bybz_zl,1,0); - bybz_zr[1] = gkyl_mat_get(&x_bybz_zr,1,0); - - bxbx_xl[2] = gkyl_mat_get(&x_bxbx_xl,2,0); - bxbx_xr[2] = gkyl_mat_get(&x_bxbx_xr,2,0); - bxby_xl[2] = gkyl_mat_get(&x_bxby_xl,2,0); - bxby_xr[2] = gkyl_mat_get(&x_bxby_xr,2,0); - bxbz_xl[2] = gkyl_mat_get(&x_bxbz_xl,2,0); - bxbz_xr[2] = gkyl_mat_get(&x_bxbz_xr,2,0); - - byby_yl[2] = gkyl_mat_get(&x_byby_yl,2,0); - byby_yr[2] = gkyl_mat_get(&x_byby_yr,2,0); - bxby_yl[2] = gkyl_mat_get(&x_bxby_yl,2,0); - bxby_yr[2] = gkyl_mat_get(&x_bxby_yr,2,0); - bybz_yl[2] = gkyl_mat_get(&x_bybz_yl,2,0); - bybz_yr[2] = gkyl_mat_get(&x_bybz_yr,2,0); - - bzbz_zl[2] = gkyl_mat_get(&x_bzbz_zl,2,0); - bzbz_zr[2] = gkyl_mat_get(&x_bzbz_zr,2,0); - bxbz_zl[2] = gkyl_mat_get(&x_bxbz_zl,2,0); - bxbz_zr[2] = gkyl_mat_get(&x_bxbz_zr,2,0); - bybz_zl[2] = gkyl_mat_get(&x_bybz_zl,2,0); - bybz_zr[2] = gkyl_mat_get(&x_bybz_zr,2,0); - - bxbx_xl[3] = gkyl_mat_get(&x_bxbx_xl,3,0); - bxbx_xr[3] = gkyl_mat_get(&x_bxbx_xr,3,0); - bxby_xl[3] = gkyl_mat_get(&x_bxby_xl,3,0); - bxby_xr[3] = gkyl_mat_get(&x_bxby_xr,3,0); - bxbz_xl[3] = gkyl_mat_get(&x_bxbz_xl,3,0); - bxbz_xr[3] = gkyl_mat_get(&x_bxbz_xr,3,0); - - byby_yl[3] = gkyl_mat_get(&x_byby_yl,3,0); - byby_yr[3] = gkyl_mat_get(&x_byby_yr,3,0); - bxby_yl[3] = gkyl_mat_get(&x_bxby_yl,3,0); - bxby_yr[3] = gkyl_mat_get(&x_bxby_yr,3,0); - bybz_yl[3] = gkyl_mat_get(&x_bybz_yl,3,0); - bybz_yr[3] = gkyl_mat_get(&x_bybz_yr,3,0); - - bzbz_zl[3] = gkyl_mat_get(&x_bzbz_zl,3,0); - bzbz_zr[3] = gkyl_mat_get(&x_bzbz_zr,3,0); - bxbz_zl[3] = gkyl_mat_get(&x_bxbz_zl,3,0); - bxbz_zr[3] = gkyl_mat_get(&x_bxbz_zr,3,0); - bybz_zl[3] = gkyl_mat_get(&x_bybz_zl,3,0); - bybz_zr[3] = gkyl_mat_get(&x_bybz_zr,3,0); - - bxbx_xl[4] = gkyl_mat_get(&x_bxbx_xl,4,0); - bxbx_xr[4] = gkyl_mat_get(&x_bxbx_xr,4,0); - bxby_xl[4] = gkyl_mat_get(&x_bxby_xl,4,0); - bxby_xr[4] = gkyl_mat_get(&x_bxby_xr,4,0); - bxbz_xl[4] = gkyl_mat_get(&x_bxbz_xl,4,0); - bxbz_xr[4] = gkyl_mat_get(&x_bxbz_xr,4,0); - - byby_yl[4] = gkyl_mat_get(&x_byby_yl,4,0); - byby_yr[4] = gkyl_mat_get(&x_byby_yr,4,0); - bxby_yl[4] = gkyl_mat_get(&x_bxby_yl,4,0); - bxby_yr[4] = gkyl_mat_get(&x_bxby_yr,4,0); - bybz_yl[4] = gkyl_mat_get(&x_bybz_yl,4,0); - bybz_yr[4] = gkyl_mat_get(&x_bybz_yr,4,0); - - bzbz_zl[4] = gkyl_mat_get(&x_bzbz_zl,4,0); - bzbz_zr[4] = gkyl_mat_get(&x_bzbz_zr,4,0); - bxbz_zl[4] = gkyl_mat_get(&x_bxbz_zl,4,0); - bxbz_zr[4] = gkyl_mat_get(&x_bxbz_zr,4,0); - bybz_zl[4] = gkyl_mat_get(&x_bybz_zl,4,0); - bybz_zr[4] = gkyl_mat_get(&x_bybz_zr,4,0); - - bxbx_xl[5] = gkyl_mat_get(&x_bxbx_xl,5,0); - bxbx_xr[5] = gkyl_mat_get(&x_bxbx_xr,5,0); - bxby_xl[5] = gkyl_mat_get(&x_bxby_xl,5,0); - bxby_xr[5] = gkyl_mat_get(&x_bxby_xr,5,0); - bxbz_xl[5] = gkyl_mat_get(&x_bxbz_xl,5,0); - bxbz_xr[5] = gkyl_mat_get(&x_bxbz_xr,5,0); - - byby_yl[5] = gkyl_mat_get(&x_byby_yl,5,0); - byby_yr[5] = gkyl_mat_get(&x_byby_yr,5,0); - bxby_yl[5] = gkyl_mat_get(&x_bxby_yl,5,0); - bxby_yr[5] = gkyl_mat_get(&x_bxby_yr,5,0); - bybz_yl[5] = gkyl_mat_get(&x_bybz_yl,5,0); - bybz_yr[5] = gkyl_mat_get(&x_bybz_yr,5,0); - - bzbz_zl[5] = gkyl_mat_get(&x_bzbz_zl,5,0); - bzbz_zr[5] = gkyl_mat_get(&x_bzbz_zr,5,0); - bxbz_zl[5] = gkyl_mat_get(&x_bxbz_zl,5,0); - bxbz_zr[5] = gkyl_mat_get(&x_bxbz_zr,5,0); - bybz_zl[5] = gkyl_mat_get(&x_bybz_zl,5,0); - bybz_zr[5] = gkyl_mat_get(&x_bybz_zr,5,0); - - bxbx_xl[6] = gkyl_mat_get(&x_bxbx_xl,6,0); - bxbx_xr[6] = gkyl_mat_get(&x_bxbx_xr,6,0); - bxby_xl[6] = gkyl_mat_get(&x_bxby_xl,6,0); - bxby_xr[6] = gkyl_mat_get(&x_bxby_xr,6,0); - bxbz_xl[6] = gkyl_mat_get(&x_bxbz_xl,6,0); - bxbz_xr[6] = gkyl_mat_get(&x_bxbz_xr,6,0); - - byby_yl[6] = gkyl_mat_get(&x_byby_yl,6,0); - byby_yr[6] = gkyl_mat_get(&x_byby_yr,6,0); - bxby_yl[6] = gkyl_mat_get(&x_bxby_yl,6,0); - bxby_yr[6] = gkyl_mat_get(&x_bxby_yr,6,0); - bybz_yl[6] = gkyl_mat_get(&x_bybz_yl,6,0); - bybz_yr[6] = gkyl_mat_get(&x_bybz_yr,6,0); - - bzbz_zl[6] = gkyl_mat_get(&x_bzbz_zl,6,0); - bzbz_zr[6] = gkyl_mat_get(&x_bzbz_zr,6,0); - bxbz_zl[6] = gkyl_mat_get(&x_bxbz_zl,6,0); - bxbz_zr[6] = gkyl_mat_get(&x_bxbz_zr,6,0); - bybz_zl[6] = gkyl_mat_get(&x_bybz_zl,6,0); - bybz_zr[6] = gkyl_mat_get(&x_bybz_zr,6,0); - - bxbx_xl[7] = gkyl_mat_get(&x_bxbx_xl,7,0); - bxbx_xr[7] = gkyl_mat_get(&x_bxbx_xr,7,0); - bxby_xl[7] = gkyl_mat_get(&x_bxby_xl,7,0); - bxby_xr[7] = gkyl_mat_get(&x_bxby_xr,7,0); - bxbz_xl[7] = gkyl_mat_get(&x_bxbz_xl,7,0); - bxbz_xr[7] = gkyl_mat_get(&x_bxbz_xr,7,0); - - byby_yl[7] = gkyl_mat_get(&x_byby_yl,7,0); - byby_yr[7] = gkyl_mat_get(&x_byby_yr,7,0); - bxby_yl[7] = gkyl_mat_get(&x_bxby_yl,7,0); - bxby_yr[7] = gkyl_mat_get(&x_bxby_yr,7,0); - bybz_yl[7] = gkyl_mat_get(&x_bybz_yl,7,0); - bybz_yr[7] = gkyl_mat_get(&x_bybz_yr,7,0); - - bzbz_zl[7] = gkyl_mat_get(&x_bzbz_zl,7,0); - bzbz_zr[7] = gkyl_mat_get(&x_bzbz_zr,7,0); - bxbz_zl[7] = gkyl_mat_get(&x_bxbz_zl,7,0); - bxbz_zr[7] = gkyl_mat_get(&x_bxbz_zr,7,0); - bybz_zl[7] = gkyl_mat_get(&x_bybz_zl,7,0); - bybz_zr[7] = gkyl_mat_get(&x_bybz_zr,7,0); - - bxbx_xl[8] = gkyl_mat_get(&x_bxbx_xl,8,0); - bxbx_xr[8] = gkyl_mat_get(&x_bxbx_xr,8,0); - bxby_xl[8] = gkyl_mat_get(&x_bxby_xl,8,0); - bxby_xr[8] = gkyl_mat_get(&x_bxby_xr,8,0); - bxbz_xl[8] = gkyl_mat_get(&x_bxbz_xl,8,0); - bxbz_xr[8] = gkyl_mat_get(&x_bxbz_xr,8,0); - - byby_yl[8] = gkyl_mat_get(&x_byby_yl,8,0); - byby_yr[8] = gkyl_mat_get(&x_byby_yr,8,0); - bxby_yl[8] = gkyl_mat_get(&x_bxby_yl,8,0); - bxby_yr[8] = gkyl_mat_get(&x_bxby_yr,8,0); - bybz_yl[8] = gkyl_mat_get(&x_bybz_yl,8,0); - bybz_yr[8] = gkyl_mat_get(&x_bybz_yr,8,0); - - bzbz_zl[8] = gkyl_mat_get(&x_bzbz_zl,8,0); - bzbz_zr[8] = gkyl_mat_get(&x_bzbz_zr,8,0); - bxbz_zl[8] = gkyl_mat_get(&x_bxbz_zl,8,0); - bxbz_zr[8] = gkyl_mat_get(&x_bxbz_zr,8,0); - bybz_zl[8] = gkyl_mat_get(&x_bybz_zl,8,0); - bybz_zr[8] = gkyl_mat_get(&x_bybz_zr,8,0); - - const double *B_x = &em[81]; - const double *B_y = &em[108]; - const double *B_z = &em[135]; - - int cell_avg_xl = 0; - int cell_avg_xr = 0; - if (0.4*bxbx_xl[8]-0.5999999999999995*bxbx_xl[7]-0.5999999999999999*bxbx_xl[6]+0.4472135954999579*bxbx_xl[5]+0.4472135954999579*bxbx_xl[4]+0.9*bxbx_xl[3]-0.6708203932499369*bxbx_xl[2]-0.6708203932499369*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.4*bxbx_xr[8]-0.5999999999999995*bxbx_xr[7]-0.5999999999999999*bxbx_xr[6]+0.4472135954999579*bxbx_xr[5]+0.4472135954999579*bxbx_xr[4]+0.9*bxbx_xr[3]-0.6708203932499369*bxbx_xr[2]-0.6708203932499369*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if ((-0.5*bxbx_xl[8])+0.75*bxbx_xl[7]-0.5590169943749475*bxbx_xl[5]+0.4472135954999579*bxbx_xl[4]-0.6708203932499369*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if ((-0.5*bxbx_xr[8])+0.75*bxbx_xr[7]-0.5590169943749475*bxbx_xr[5]+0.4472135954999579*bxbx_xr[4]-0.6708203932499369*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if (0.4*bxbx_xl[8]-0.5999999999999995*bxbx_xl[7]+0.5999999999999999*bxbx_xl[6]+0.4472135954999579*bxbx_xl[5]+0.4472135954999579*bxbx_xl[4]-0.9*bxbx_xl[3]+0.6708203932499369*bxbx_xl[2]-0.6708203932499369*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.4*bxbx_xr[8]-0.5999999999999995*bxbx_xr[7]+0.5999999999999999*bxbx_xr[6]+0.4472135954999579*bxbx_xr[5]+0.4472135954999579*bxbx_xr[4]-0.9*bxbx_xr[3]+0.6708203932499369*bxbx_xr[2]-0.6708203932499369*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if ((-0.5*bxbx_xl[8])+0.75*bxbx_xl[6]+0.4472135954999579*bxbx_xl[5]-0.5590169943749475*bxbx_xl[4]-0.6708203932499369*bxbx_xl[2]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if ((-0.5*bxbx_xr[8])+0.75*bxbx_xr[6]+0.4472135954999579*bxbx_xr[5]-0.5590169943749475*bxbx_xr[4]-0.6708203932499369*bxbx_xr[2]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if (0.625*bxbx_xl[8]-0.5590169943749475*bxbx_xl[5]-0.5590169943749475*bxbx_xl[4]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.625*bxbx_xr[8]-0.5590169943749475*bxbx_xr[5]-0.5590169943749475*bxbx_xr[4]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if ((-0.5*bxbx_xl[8])-0.75*bxbx_xl[6]+0.4472135954999579*bxbx_xl[5]-0.5590169943749475*bxbx_xl[4]+0.6708203932499369*bxbx_xl[2]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if ((-0.5*bxbx_xr[8])-0.75*bxbx_xr[6]+0.4472135954999579*bxbx_xr[5]-0.5590169943749475*bxbx_xr[4]+0.6708203932499369*bxbx_xr[2]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if (0.4*bxbx_xl[8]+0.5999999999999995*bxbx_xl[7]-0.5999999999999999*bxbx_xl[6]+0.4472135954999579*bxbx_xl[5]+0.4472135954999579*bxbx_xl[4]-0.9*bxbx_xl[3]-0.6708203932499369*bxbx_xl[2]+0.6708203932499369*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.4*bxbx_xr[8]+0.5999999999999995*bxbx_xr[7]-0.5999999999999999*bxbx_xr[6]+0.4472135954999579*bxbx_xr[5]+0.4472135954999579*bxbx_xr[4]-0.9*bxbx_xr[3]-0.6708203932499369*bxbx_xr[2]+0.6708203932499369*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if ((-0.5*bxbx_xl[8])-0.75*bxbx_xl[7]-0.5590169943749475*bxbx_xl[5]+0.4472135954999579*bxbx_xl[4]+0.6708203932499369*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if ((-0.5*bxbx_xr[8])-0.75*bxbx_xr[7]-0.5590169943749475*bxbx_xr[5]+0.4472135954999579*bxbx_xr[4]+0.6708203932499369*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - if (0.4*bxbx_xl[8]+0.5999999999999995*bxbx_xl[7]+0.5999999999999999*bxbx_xl[6]+0.4472135954999579*bxbx_xl[5]+0.4472135954999579*bxbx_xl[4]+0.9*bxbx_xl[3]+0.6708203932499369*bxbx_xl[2]+0.6708203932499369*bxbx_xl[1]+0.5*bxbx_xl[0] < 0.0) cell_avg_xl = 1; - if (0.4*bxbx_xr[8]+0.5999999999999995*bxbx_xr[7]+0.5999999999999999*bxbx_xr[6]+0.4472135954999579*bxbx_xr[5]+0.4472135954999579*bxbx_xr[4]+0.9*bxbx_xr[3]+0.6708203932499369*bxbx_xr[2]+0.6708203932499369*bxbx_xr[1]+0.5*bxbx_xr[0] < 0.0) cell_avg_xr = 1; - - if (cell_avg_xl || cell_avg_magB2_xl[0]) { - bxbx_xl[1] = 0.0; - bxby_xl[1] = 0.0; - bxbz_xl[1] = 0.0; - bxbx_xl[2] = 0.0; - bxby_xl[2] = 0.0; - bxbz_xl[2] = 0.0; - bxbx_xl[3] = 0.0; - bxby_xl[3] = 0.0; - bxbz_xl[3] = 0.0; - bxbx_xl[4] = 0.0; - bxby_xl[4] = 0.0; - bxbz_xl[4] = 0.0; - bxbx_xl[5] = 0.0; - bxby_xl[5] = 0.0; - bxbz_xl[5] = 0.0; - bxbx_xl[6] = 0.0; - bxby_xl[6] = 0.0; - bxbz_xl[6] = 0.0; - bxbx_xl[7] = 0.0; - bxby_xl[7] = 0.0; - bxbz_xl[7] = 0.0; - bxbx_xl[8] = 0.0; - bxby_xl[8] = 0.0; - bxbz_xl[8] = 0.0; - // If bxbx, bxby, or bxbz < 0.0 at the lower x surface quadrature points, - // set cell_avg_magB2_xl to be true in case it was not true before. - cell_avg_magB2_xl[0] = 1; - } - - if (cell_avg_xr || cell_avg_magB2_xr[0]) { - bxbx_xr[1] = 0.0; - bxby_xr[1] = 0.0; - bxbz_xr[1] = 0.0; - bxbx_xr[2] = 0.0; - bxby_xr[2] = 0.0; - bxbz_xr[2] = 0.0; - bxbx_xr[3] = 0.0; - bxby_xr[3] = 0.0; - bxbz_xr[3] = 0.0; - bxbx_xr[4] = 0.0; - bxby_xr[4] = 0.0; - bxbz_xr[4] = 0.0; - bxbx_xr[5] = 0.0; - bxby_xr[5] = 0.0; - bxbz_xr[5] = 0.0; - bxbx_xr[6] = 0.0; - bxby_xr[6] = 0.0; - bxbz_xr[6] = 0.0; - bxbx_xr[7] = 0.0; - bxby_xr[7] = 0.0; - bxbz_xr[7] = 0.0; - bxbx_xr[8] = 0.0; - bxby_xr[8] = 0.0; - bxbz_xr[8] = 0.0; - // If bxbx, bxby, or bxbz < 0.0 at the upper x surface quadrature points, - // set cell_avg_magB2_xr to be true in case it was not true before. - cell_avg_magB2_xr[0] = 1; - } - - int cell_avg_yl = 0; - int cell_avg_yr = 0; - if (0.4*byby_yl[8]-0.5999999999999995*byby_yl[7]-0.5999999999999999*byby_yl[6]+0.4472135954999579*byby_yl[5]+0.4472135954999579*byby_yl[4]+0.9*byby_yl[3]-0.6708203932499369*byby_yl[2]-0.6708203932499369*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.4*byby_yr[8]-0.5999999999999995*byby_yr[7]-0.5999999999999999*byby_yr[6]+0.4472135954999579*byby_yr[5]+0.4472135954999579*byby_yr[4]+0.9*byby_yr[3]-0.6708203932499369*byby_yr[2]-0.6708203932499369*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if ((-0.5*byby_yl[8])+0.75*byby_yl[7]-0.5590169943749475*byby_yl[5]+0.4472135954999579*byby_yl[4]-0.6708203932499369*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if ((-0.5*byby_yr[8])+0.75*byby_yr[7]-0.5590169943749475*byby_yr[5]+0.4472135954999579*byby_yr[4]-0.6708203932499369*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if (0.4*byby_yl[8]-0.5999999999999995*byby_yl[7]+0.5999999999999999*byby_yl[6]+0.4472135954999579*byby_yl[5]+0.4472135954999579*byby_yl[4]-0.9*byby_yl[3]+0.6708203932499369*byby_yl[2]-0.6708203932499369*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.4*byby_yr[8]-0.5999999999999995*byby_yr[7]+0.5999999999999999*byby_yr[6]+0.4472135954999579*byby_yr[5]+0.4472135954999579*byby_yr[4]-0.9*byby_yr[3]+0.6708203932499369*byby_yr[2]-0.6708203932499369*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if ((-0.5*byby_yl[8])+0.75*byby_yl[6]+0.4472135954999579*byby_yl[5]-0.5590169943749475*byby_yl[4]-0.6708203932499369*byby_yl[2]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if ((-0.5*byby_yr[8])+0.75*byby_yr[6]+0.4472135954999579*byby_yr[5]-0.5590169943749475*byby_yr[4]-0.6708203932499369*byby_yr[2]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if (0.625*byby_yl[8]-0.5590169943749475*byby_yl[5]-0.5590169943749475*byby_yl[4]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.625*byby_yr[8]-0.5590169943749475*byby_yr[5]-0.5590169943749475*byby_yr[4]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if ((-0.5*byby_yl[8])-0.75*byby_yl[6]+0.4472135954999579*byby_yl[5]-0.5590169943749475*byby_yl[4]+0.6708203932499369*byby_yl[2]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if ((-0.5*byby_yr[8])-0.75*byby_yr[6]+0.4472135954999579*byby_yr[5]-0.5590169943749475*byby_yr[4]+0.6708203932499369*byby_yr[2]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if (0.4*byby_yl[8]+0.5999999999999995*byby_yl[7]-0.5999999999999999*byby_yl[6]+0.4472135954999579*byby_yl[5]+0.4472135954999579*byby_yl[4]-0.9*byby_yl[3]-0.6708203932499369*byby_yl[2]+0.6708203932499369*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.4*byby_yr[8]+0.5999999999999995*byby_yr[7]-0.5999999999999999*byby_yr[6]+0.4472135954999579*byby_yr[5]+0.4472135954999579*byby_yr[4]-0.9*byby_yr[3]-0.6708203932499369*byby_yr[2]+0.6708203932499369*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if ((-0.5*byby_yl[8])-0.75*byby_yl[7]-0.5590169943749475*byby_yl[5]+0.4472135954999579*byby_yl[4]+0.6708203932499369*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if ((-0.5*byby_yr[8])-0.75*byby_yr[7]-0.5590169943749475*byby_yr[5]+0.4472135954999579*byby_yr[4]+0.6708203932499369*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - if (0.4*byby_yl[8]+0.5999999999999995*byby_yl[7]+0.5999999999999999*byby_yl[6]+0.4472135954999579*byby_yl[5]+0.4472135954999579*byby_yl[4]+0.9*byby_yl[3]+0.6708203932499369*byby_yl[2]+0.6708203932499369*byby_yl[1]+0.5*byby_yl[0] < 0.0) cell_avg_yl = 1; - if (0.4*byby_yr[8]+0.5999999999999995*byby_yr[7]+0.5999999999999999*byby_yr[6]+0.4472135954999579*byby_yr[5]+0.4472135954999579*byby_yr[4]+0.9*byby_yr[3]+0.6708203932499369*byby_yr[2]+0.6708203932499369*byby_yr[1]+0.5*byby_yr[0] < 0.0) cell_avg_yr = 1; - - if (cell_avg_yl || cell_avg_magB2_yl[0]) { - byby_yl[1] = 0.0; - bxby_yl[1] = 0.0; - bybz_yl[1] = 0.0; - byby_yl[2] = 0.0; - bxby_yl[2] = 0.0; - bybz_yl[2] = 0.0; - byby_yl[3] = 0.0; - bxby_yl[3] = 0.0; - bybz_yl[3] = 0.0; - byby_yl[4] = 0.0; - bxby_yl[4] = 0.0; - bybz_yl[4] = 0.0; - byby_yl[5] = 0.0; - bxby_yl[5] = 0.0; - bybz_yl[5] = 0.0; - byby_yl[6] = 0.0; - bxby_yl[6] = 0.0; - bybz_yl[6] = 0.0; - byby_yl[7] = 0.0; - bxby_yl[7] = 0.0; - bybz_yl[7] = 0.0; - byby_yl[8] = 0.0; - bxby_yl[8] = 0.0; - bybz_yl[8] = 0.0; - // If byby, bxby, or bybz < 0.0 at the lower y surface quadrature points, - // set cell_avg_magB2_yl to be true in case it was not true before. - cell_avg_magB2_yl[0] = 1; - } - - if (cell_avg_yr || cell_avg_magB2_yr[0]) { - byby_yr[1] = 0.0; - bxby_yr[1] = 0.0; - bybz_yr[1] = 0.0; - byby_yr[2] = 0.0; - bxby_yr[2] = 0.0; - bybz_yr[2] = 0.0; - byby_yr[3] = 0.0; - bxby_yr[3] = 0.0; - bybz_yr[3] = 0.0; - byby_yr[4] = 0.0; - bxby_yr[4] = 0.0; - bybz_yr[4] = 0.0; - byby_yr[5] = 0.0; - bxby_yr[5] = 0.0; - bybz_yr[5] = 0.0; - byby_yr[6] = 0.0; - bxby_yr[6] = 0.0; - bybz_yr[6] = 0.0; - byby_yr[7] = 0.0; - bxby_yr[7] = 0.0; - bybz_yr[7] = 0.0; - byby_yr[8] = 0.0; - bxby_yr[8] = 0.0; - bybz_yr[8] = 0.0; - // If byby, bxby, or bybz < 0.0 at the upper y surface quadrature points, - // set cell_avg_magB2_yr to be true in case it was not true before. - cell_avg_magB2_yr[0] = 1; - } - - int cell_avg_zl = 0; - int cell_avg_zr = 0; - if (0.4*bzbz_zl[8]-0.5999999999999995*bzbz_zl[7]-0.5999999999999999*bzbz_zl[6]+0.4472135954999579*bzbz_zl[5]+0.4472135954999579*bzbz_zl[4]+0.9*bzbz_zl[3]-0.6708203932499369*bzbz_zl[2]-0.6708203932499369*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if (0.4*bzbz_zr[8]-0.5999999999999995*bzbz_zr[7]-0.5999999999999999*bzbz_zr[6]+0.4472135954999579*bzbz_zr[5]+0.4472135954999579*bzbz_zr[4]+0.9*bzbz_zr[3]-0.6708203932499369*bzbz_zr[2]-0.6708203932499369*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if ((-0.5*bzbz_zl[8])+0.75*bzbz_zl[7]-0.5590169943749475*bzbz_zl[5]+0.4472135954999579*bzbz_zl[4]-0.6708203932499369*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if ((-0.5*bzbz_zr[8])+0.75*bzbz_zr[7]-0.5590169943749475*bzbz_zr[5]+0.4472135954999579*bzbz_zr[4]-0.6708203932499369*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if (0.4*bzbz_zl[8]-0.5999999999999995*bzbz_zl[7]+0.5999999999999999*bzbz_zl[6]+0.4472135954999579*bzbz_zl[5]+0.4472135954999579*bzbz_zl[4]-0.9*bzbz_zl[3]+0.6708203932499369*bzbz_zl[2]-0.6708203932499369*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if (0.4*bzbz_zr[8]-0.5999999999999995*bzbz_zr[7]+0.5999999999999999*bzbz_zr[6]+0.4472135954999579*bzbz_zr[5]+0.4472135954999579*bzbz_zr[4]-0.9*bzbz_zr[3]+0.6708203932499369*bzbz_zr[2]-0.6708203932499369*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if ((-0.5*bzbz_zl[8])+0.75*bzbz_zl[6]+0.4472135954999579*bzbz_zl[5]-0.5590169943749475*bzbz_zl[4]-0.6708203932499369*bzbz_zl[2]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if ((-0.5*bzbz_zr[8])+0.75*bzbz_zr[6]+0.4472135954999579*bzbz_zr[5]-0.5590169943749475*bzbz_zr[4]-0.6708203932499369*bzbz_zr[2]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if (0.625*bzbz_zl[8]-0.5590169943749475*bzbz_zl[5]-0.5590169943749475*bzbz_zl[4]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if (0.625*bzbz_zr[8]-0.5590169943749475*bzbz_zr[5]-0.5590169943749475*bzbz_zr[4]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if ((-0.5*bzbz_zl[8])-0.75*bzbz_zl[6]+0.4472135954999579*bzbz_zl[5]-0.5590169943749475*bzbz_zl[4]+0.6708203932499369*bzbz_zl[2]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if ((-0.5*bzbz_zr[8])-0.75*bzbz_zr[6]+0.4472135954999579*bzbz_zr[5]-0.5590169943749475*bzbz_zr[4]+0.6708203932499369*bzbz_zr[2]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if (0.4*bzbz_zl[8]+0.5999999999999995*bzbz_zl[7]-0.5999999999999999*bzbz_zl[6]+0.4472135954999579*bzbz_zl[5]+0.4472135954999579*bzbz_zl[4]-0.9*bzbz_zl[3]-0.6708203932499369*bzbz_zl[2]+0.6708203932499369*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if (0.4*bzbz_zr[8]+0.5999999999999995*bzbz_zr[7]-0.5999999999999999*bzbz_zr[6]+0.4472135954999579*bzbz_zr[5]+0.4472135954999579*bzbz_zr[4]-0.9*bzbz_zr[3]-0.6708203932499369*bzbz_zr[2]+0.6708203932499369*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if ((-0.5*bzbz_zl[8])-0.75*bzbz_zl[7]-0.5590169943749475*bzbz_zl[5]+0.4472135954999579*bzbz_zl[4]+0.6708203932499369*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if ((-0.5*bzbz_zr[8])-0.75*bzbz_zr[7]-0.5590169943749475*bzbz_zr[5]+0.4472135954999579*bzbz_zr[4]+0.6708203932499369*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - if (0.4*bzbz_zl[8]+0.5999999999999995*bzbz_zl[7]+0.5999999999999999*bzbz_zl[6]+0.4472135954999579*bzbz_zl[5]+0.4472135954999579*bzbz_zl[4]+0.9*bzbz_zl[3]+0.6708203932499369*bzbz_zl[2]+0.6708203932499369*bzbz_zl[1]+0.5*bzbz_zl[0] < 0.0) cell_avg_zl = 1; - if (0.4*bzbz_zr[8]+0.5999999999999995*bzbz_zr[7]+0.5999999999999999*bzbz_zr[6]+0.4472135954999579*bzbz_zr[5]+0.4472135954999579*bzbz_zr[4]+0.9*bzbz_zr[3]+0.6708203932499369*bzbz_zr[2]+0.6708203932499369*bzbz_zr[1]+0.5*bzbz_zr[0] < 0.0) cell_avg_zr = 1; - - if (cell_avg_zl || cell_avg_magB2_zl[0]) { - bzbz_zl[1] = 0.0; - bxbz_zl[1] = 0.0; - bybz_zl[1] = 0.0; - bzbz_zl[2] = 0.0; - bxbz_zl[2] = 0.0; - bybz_zl[2] = 0.0; - bzbz_zl[3] = 0.0; - bxbz_zl[3] = 0.0; - bybz_zl[3] = 0.0; - bzbz_zl[4] = 0.0; - bxbz_zl[4] = 0.0; - bybz_zl[4] = 0.0; - bzbz_zl[5] = 0.0; - bxbz_zl[5] = 0.0; - bybz_zl[5] = 0.0; - bzbz_zl[6] = 0.0; - bxbz_zl[6] = 0.0; - bybz_zl[6] = 0.0; - bzbz_zl[7] = 0.0; - bxbz_zl[7] = 0.0; - bybz_zl[7] = 0.0; - bzbz_zl[8] = 0.0; - bxbz_zl[8] = 0.0; - bybz_zl[8] = 0.0; - // If bzbz, bxbz, or bybz < 0.0 at the lower z surface quadrature points, - // set cell_avg_magB2_zl to be true in case it was not true before. - cell_avg_magB2_zl[0] = 1; - } - - if (cell_avg_zr || cell_avg_magB2_zr[0]) { - bzbz_zr[1] = 0.0; - bxbz_zr[1] = 0.0; - bybz_zr[1] = 0.0; - bzbz_zr[2] = 0.0; - bxbz_zr[2] = 0.0; - bybz_zr[2] = 0.0; - bzbz_zr[3] = 0.0; - bxbz_zr[3] = 0.0; - bybz_zr[3] = 0.0; - bzbz_zr[4] = 0.0; - bxbz_zr[4] = 0.0; - bybz_zr[4] = 0.0; - bzbz_zr[5] = 0.0; - bxbz_zr[5] = 0.0; - bybz_zr[5] = 0.0; - bzbz_zr[6] = 0.0; - bxbz_zr[6] = 0.0; - bybz_zr[6] = 0.0; - bzbz_zr[7] = 0.0; - bxbz_zr[7] = 0.0; - bybz_zr[7] = 0.0; - bzbz_zr[8] = 0.0; - bxbz_zr[8] = 0.0; - bybz_zr[8] = 0.0; - // If bzbz, bxbz, or bybz < 0.0 at the upper z surface quadrature points, - // set cell_avg_magB2_zr to be true in case it was not true before. - cell_avg_magB2_zr[0] = 1; - } - - // Calculate b_i = B_i/|B| by taking square root of B_i^2/|B|^2 at quadrature points. - // Uses the sign of B_i at quadrature points *on the surface* to get the correct sign of b_i *on the surface*. - // Note: positivity check already happened, so only uses cell average if needed to avoid imaginary values of b_hat. - double B_x_xl[9] = {0.0}; - double B_x_xr[9] = {0.0}; - - B_x_xl[0] = 1.58113883008419*B_x[7]-1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xl[1] = 1.58113883008419*B_x[11]-1.224744871391589*B_x[4]+0.7071067811865475*B_x[2]; - B_x_xl[2] = 1.58113883008419*B_x[13]-1.224744871391589*B_x[5]+0.7071067811865475*B_x[3]; - B_x_xl[3] = 1.58113883008419*B_x[17]-1.224744871391589*B_x[10]+0.7071067811865475*B_x[6]; - B_x_xl[4] = 1.58113883008419*B_x[20]-1.224744871391589*B_x[12]+0.7071067811865475*B_x[8]; - B_x_xl[5] = 1.58113883008419*B_x[21]-1.224744871391589*B_x[15]+0.7071067811865475*B_x[9]; - B_x_xl[6] = 1.58113883008419*B_x[23]-1.224744871391589*B_x[18]+0.7071067811865475*B_x[14]; - B_x_xl[7] = 1.58113883008419*B_x[24]-1.224744871391589*B_x[19]+0.7071067811865475*B_x[16]; - B_x_xl[8] = 1.58113883008419*B_x[26]-1.224744871391589*B_x[25]+0.7071067811865475*B_x[22]; - B_x_xr[0] = 1.58113883008419*B_x[7]+1.224744871391589*B_x[1]+0.7071067811865475*B_x[0]; - B_x_xr[1] = 1.58113883008419*B_x[11]+1.224744871391589*B_x[4]+0.7071067811865475*B_x[2]; - B_x_xr[2] = 1.58113883008419*B_x[13]+1.224744871391589*B_x[5]+0.7071067811865475*B_x[3]; - B_x_xr[3] = 1.58113883008419*B_x[17]+1.224744871391589*B_x[10]+0.7071067811865475*B_x[6]; - B_x_xr[4] = 1.58113883008419*B_x[20]+1.224744871391589*B_x[12]+0.7071067811865475*B_x[8]; - B_x_xr[5] = 1.58113883008419*B_x[21]+1.224744871391589*B_x[15]+0.7071067811865475*B_x[9]; - B_x_xr[6] = 1.58113883008419*B_x[23]+1.224744871391589*B_x[18]+0.7071067811865475*B_x[14]; - B_x_xr[7] = 1.58113883008419*B_x[24]+1.224744871391589*B_x[19]+0.7071067811865475*B_x[16]; - B_x_xr[8] = 1.58113883008419*B_x[26]+1.224744871391589*B_x[25]+0.7071067811865475*B_x[22]; - tensor_2x_p2_sqrt_with_sign(B_x_xl, bxbx_xl, bx_xl); - tensor_2x_p2_sqrt_with_sign(B_x_xr, bxbx_xr, bx_xr); - - double B_y_yl[9] = {0.0}; - double B_y_yr[9] = {0.0}; - - B_y_yl[0] = 1.58113883008419*B_y[8]-1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yl[1] = 1.58113883008419*B_y[12]-1.224744871391589*B_y[4]+0.7071067811865475*B_y[1]; - B_y_yl[2] = 1.58113883008419*B_y[14]-1.224744871391589*B_y[6]+0.7071067811865475*B_y[3]; - B_y_yl[3] = 1.58113883008419*B_y[18]-1.224744871391589*B_y[10]+0.7071067811865475*B_y[5]; - B_y_yl[4] = 1.58113883008419*B_y[20]-1.224744871391589*B_y[11]+0.7071067811865475*B_y[7]; - B_y_yl[5] = 1.58113883008419*B_y[22]-1.224744871391589*B_y[16]+0.7071067811865475*B_y[9]; - B_y_yl[6] = 1.58113883008419*B_y[23]-1.224744871391589*B_y[17]+0.7071067811865475*B_y[13]; - B_y_yl[7] = 1.58113883008419*B_y[25]-1.224744871391589*B_y[19]+0.7071067811865475*B_y[15]; - B_y_yl[8] = 1.58113883008419*B_y[26]-1.224744871391589*B_y[24]+0.7071067811865475*B_y[21]; - B_y_yr[0] = 1.58113883008419*B_y[8]+1.224744871391589*B_y[2]+0.7071067811865475*B_y[0]; - B_y_yr[1] = 1.58113883008419*B_y[12]+1.224744871391589*B_y[4]+0.7071067811865475*B_y[1]; - B_y_yr[2] = 1.58113883008419*B_y[14]+1.224744871391589*B_y[6]+0.7071067811865475*B_y[3]; - B_y_yr[3] = 1.58113883008419*B_y[18]+1.224744871391589*B_y[10]+0.7071067811865475*B_y[5]; - B_y_yr[4] = 1.58113883008419*B_y[20]+1.224744871391589*B_y[11]+0.7071067811865475*B_y[7]; - B_y_yr[5] = 1.58113883008419*B_y[22]+1.224744871391589*B_y[16]+0.7071067811865475*B_y[9]; - B_y_yr[6] = 1.58113883008419*B_y[23]+1.224744871391589*B_y[17]+0.7071067811865475*B_y[13]; - B_y_yr[7] = 1.58113883008419*B_y[25]+1.224744871391589*B_y[19]+0.7071067811865475*B_y[15]; - B_y_yr[8] = 1.58113883008419*B_y[26]+1.224744871391589*B_y[24]+0.7071067811865475*B_y[21]; - tensor_2x_p2_sqrt_with_sign(B_y_yl, byby_yl, by_yl); - tensor_2x_p2_sqrt_with_sign(B_y_yr, byby_yr, by_yr); - - double B_z_zl[9] = {0.0}; - double B_z_zr[9] = {0.0}; - - B_z_zl[0] = 1.58113883008419*B_z[9]-1.224744871391589*B_z[3]+0.7071067811865475*B_z[0]; - B_z_zl[1] = 1.58113883008419*B_z[15]-1.224744871391589*B_z[5]+0.7071067811865475*B_z[1]; - B_z_zl[2] = 1.58113883008419*B_z[16]-1.224744871391589*B_z[6]+0.7071067811865475*B_z[2]; - B_z_zl[3] = 1.58113883008419*B_z[19]-1.224744871391589*B_z[10]+0.7071067811865475*B_z[4]; - B_z_zl[4] = 1.58113883008419*B_z[21]-1.224744871391589*B_z[13]+0.7071067811865475*B_z[7]; - B_z_zl[5] = 1.58113883008419*B_z[22]-1.224744871391589*B_z[14]+0.7071067811865475*B_z[8]; - B_z_zl[6] = 1.58113883008419*B_z[24]-1.224744871391589*B_z[17]+0.7071067811865475*B_z[11]; - B_z_zl[7] = 1.58113883008419*B_z[25]-1.224744871391589*B_z[18]+0.7071067811865475*B_z[12]; - B_z_zl[8] = 1.58113883008419*B_z[26]-1.224744871391589*B_z[23]+0.7071067811865475*B_z[20]; - B_z_zr[0] = 1.58113883008419*B_z[9]+1.224744871391589*B_z[3]+0.7071067811865475*B_z[0]; - B_z_zr[1] = 1.58113883008419*B_z[15]+1.224744871391589*B_z[5]+0.7071067811865475*B_z[1]; - B_z_zr[2] = 1.58113883008419*B_z[16]+1.224744871391589*B_z[6]+0.7071067811865475*B_z[2]; - B_z_zr[3] = 1.58113883008419*B_z[19]+1.224744871391589*B_z[10]+0.7071067811865475*B_z[4]; - B_z_zr[4] = 1.58113883008419*B_z[21]+1.224744871391589*B_z[13]+0.7071067811865475*B_z[7]; - B_z_zr[5] = 1.58113883008419*B_z[22]+1.224744871391589*B_z[14]+0.7071067811865475*B_z[8]; - B_z_zr[6] = 1.58113883008419*B_z[24]+1.224744871391589*B_z[17]+0.7071067811865475*B_z[11]; - B_z_zr[7] = 1.58113883008419*B_z[25]+1.224744871391589*B_z[18]+0.7071067811865475*B_z[12]; - B_z_zr[8] = 1.58113883008419*B_z[26]+1.224744871391589*B_z[23]+0.7071067811865475*B_z[20]; - tensor_2x_p2_sqrt_with_sign(B_z_zl, bzbz_zl, bz_zl); - tensor_2x_p2_sqrt_with_sign(B_z_zl, bzbz_zl, bz_zl); - -} - diff --git a/kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c b/kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c index 9026b06db..7d49d52ac 100644 --- a/kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c +++ b/kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c @@ -1,57 +1,36 @@ -#include #include -GKYL_CU_DH void em_surf_set_bvar_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf) +GKYL_CU_DH void em_surf_set_bvar_1x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf) { - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // BB_surf: Surface B_i B_j [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - - struct gkyl_mat rhs_bxbx_xl = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_bxbx_xr = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_bxby_xl = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_bxby_xr = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_bxbz_xl = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_bxbz_xr = gkyl_nmat_get(rhs, count+5); - // Clear rhs for each component of surface magnetic field unit tensor and vector being solved for - gkyl_mat_clear(&rhs_bxbx_xl, 0.0); - gkyl_mat_clear(&rhs_bxbx_xr, 0.0); - gkyl_mat_clear(&rhs_bxby_xl, 0.0); - gkyl_mat_clear(&rhs_bxby_xr, 0.0); - gkyl_mat_clear(&rhs_bxbz_xl, 0.0); - gkyl_mat_clear(&rhs_bxbz_xr, 0.0); - const double *Bx_sq_xl = &BB_surf[0]; - const double *Bx_sq_xr = &BB_surf[1]; - const double *By_sq_xl = &BB_surf[2]; - const double *By_sq_xr = &BB_surf[3]; - const double *Bz_sq_xl = &BB_surf[4]; - const double *Bz_sq_xr = &BB_surf[5]; - const double *B_x_B_y_xl = &BB_surf[6]; - const double *B_x_B_y_xr = &BB_surf[7]; - const double *B_x_B_z_xl = &BB_surf[8]; - const double *B_x_B_z_xr = &BB_surf[9]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; + // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. - double magB2_xl = Bx_sq_xl[0] + By_sq_xl[0] + Bz_sq_xl[0]; - double magB2_xr = Bx_sq_xr[0] + By_sq_xr[0] + Bz_sq_xr[0]; + const double *bx = &bvar[0]; + const double *by = &bvar[2]; + const double *bz = &bvar[4]; + const double *bxbx = &bvar[6]; + const double *bxby = &bvar[8]; + const double *bxbz = &bvar[10]; + const double *byby = &bvar[12]; + const double *bybz = &bvar[14]; + const double *bzbz = &bvar[16]; - cell_avg_magB2_xl[0] = 0; - cell_avg_magB2_xr[0] = 0; + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[1]; + double *bxbx_xl = &bvar_surf[2]; + double *bxbx_xr = &bvar_surf[3]; + double *bxby_xl = &bvar_surf[4]; + double *bxby_xr = &bvar_surf[5]; + double *bxbz_xl = &bvar_surf[6]; + double *bxbz_xr = &bvar_surf[7]; + + bx_xl[0] = 0.7071067811865475*bx[0]-1.224744871391589*bx[1]; + bx_xr[0] = 1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bxbx_xl[0] = 0.7071067811865475*bxbx[0]-1.224744871391589*bxbx[1]; + bxbx_xr[0] = 1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxby_xl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[1]; + bxby_xr[0] = 1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxbz_xl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[1]; + bxbz_xr[0] = 1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - double bxbx_xl = Bx_sq_xl[0]/magB2_xl; - double bxby_xl = B_x_B_y_xl[0]/magB2_xl; - double bxbz_xl = B_x_B_z_xl[0]/magB2_xl; - double bxbx_xr = Bx_sq_xr[0]/magB2_xr; - double bxby_xr = B_x_B_y_xr[0]/magB2_xr; - double bxbz_xr = B_x_B_z_xr[0]/magB2_xr; - gkyl_mat_set(&rhs_bxbx_xl,0,0,bxbx_xl); - gkyl_mat_set(&rhs_bxbx_xr,0,0,bxbx_xr); - gkyl_mat_set(&rhs_bxby_xl,0,0,bxby_xl); - gkyl_mat_set(&rhs_bxby_xr,0,0,bxby_xr); - gkyl_mat_set(&rhs_bxbz_xl,0,0,bxbz_xl); - gkyl_mat_set(&rhs_bxbz_xr,0,0,bxbz_xr); } + diff --git a/kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c b/kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c index b72320128..d9d37fb1c 100644 --- a/kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c +++ b/kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c @@ -1,57 +1,36 @@ -#include #include -GKYL_CU_DH void em_surf_set_bvar_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf) +GKYL_CU_DH void em_surf_set_bvar_1x_ser_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf) { - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // BB_surf: Surface B_i B_j [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - - struct gkyl_mat rhs_bxbx_xl = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_bxbx_xr = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_bxby_xl = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_bxby_xr = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_bxbz_xl = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_bxbz_xr = gkyl_nmat_get(rhs, count+5); - // Clear rhs for each component of surface magnetic field unit tensor and vector being solved for - gkyl_mat_clear(&rhs_bxbx_xl, 0.0); - gkyl_mat_clear(&rhs_bxbx_xr, 0.0); - gkyl_mat_clear(&rhs_bxby_xl, 0.0); - gkyl_mat_clear(&rhs_bxby_xr, 0.0); - gkyl_mat_clear(&rhs_bxbz_xl, 0.0); - gkyl_mat_clear(&rhs_bxbz_xr, 0.0); - const double *Bx_sq_xl = &BB_surf[0]; - const double *Bx_sq_xr = &BB_surf[1]; - const double *By_sq_xl = &BB_surf[2]; - const double *By_sq_xr = &BB_surf[3]; - const double *Bz_sq_xl = &BB_surf[4]; - const double *Bz_sq_xr = &BB_surf[5]; - const double *B_x_B_y_xl = &BB_surf[6]; - const double *B_x_B_y_xr = &BB_surf[7]; - const double *B_x_B_z_xl = &BB_surf[8]; - const double *B_x_B_z_xr = &BB_surf[9]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; + // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. - double magB2_xl = Bx_sq_xl[0] + By_sq_xl[0] + Bz_sq_xl[0]; - double magB2_xr = Bx_sq_xr[0] + By_sq_xr[0] + Bz_sq_xr[0]; + const double *bx = &bvar[0]; + const double *by = &bvar[3]; + const double *bz = &bvar[6]; + const double *bxbx = &bvar[9]; + const double *bxby = &bvar[12]; + const double *bxbz = &bvar[15]; + const double *byby = &bvar[18]; + const double *bybz = &bvar[21]; + const double *bzbz = &bvar[24]; - cell_avg_magB2_xl[0] = 0; - cell_avg_magB2_xr[0] = 0; + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[1]; + double *bxbx_xl = &bvar_surf[2]; + double *bxbx_xr = &bvar_surf[3]; + double *bxby_xl = &bvar_surf[4]; + double *bxby_xr = &bvar_surf[5]; + double *bxbz_xl = &bvar_surf[6]; + double *bxbz_xr = &bvar_surf[7]; + + bx_xl[0] = 1.58113883008419*bx[2]-1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[0] = 1.58113883008419*bx[2]+1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bxbx_xl[0] = 1.58113883008419*bxbx[2]-1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[0] = 1.58113883008419*bxbx[2]+1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxby_xl[0] = 1.58113883008419*bxby[2]-1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[0] = 1.58113883008419*bxby[2]+1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxbz_xl[0] = 1.58113883008419*bxbz[2]-1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[0] = 1.58113883008419*bxbz[2]+1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - double bxbx_xl = Bx_sq_xl[0]/magB2_xl; - double bxby_xl = B_x_B_y_xl[0]/magB2_xl; - double bxbz_xl = B_x_B_z_xl[0]/magB2_xl; - double bxbx_xr = Bx_sq_xr[0]/magB2_xr; - double bxby_xr = B_x_B_y_xr[0]/magB2_xr; - double bxbz_xr = B_x_B_z_xr[0]/magB2_xr; - gkyl_mat_set(&rhs_bxbx_xl,0,0,bxbx_xl); - gkyl_mat_set(&rhs_bxbx_xr,0,0,bxbx_xr); - gkyl_mat_set(&rhs_bxby_xl,0,0,bxby_xl); - gkyl_mat_set(&rhs_bxby_xr,0,0,bxby_xr); - gkyl_mat_set(&rhs_bxbz_xl,0,0,bxbz_xl); - gkyl_mat_set(&rhs_bxbz_xr,0,0,bxbz_xr); } + diff --git a/kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c b/kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c index f21bc535d..9dc747cee 100644 --- a/kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c +++ b/kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c @@ -1,185 +1,72 @@ -#include #include -#include -#include -GKYL_CU_DH void em_surf_set_bvar_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf) +GKYL_CU_DH void em_surf_set_bvar_2x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf) { - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // BB_surf: Surface B_i B_j [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - - struct gkyl_mat rhs_bxbx_xl = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_bxbx_xr = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_bxby_xl = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_bxby_xr = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_bxbz_xl = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_bxbz_xr = gkyl_nmat_get(rhs, count+5); - gkyl_mat_clear(&rhs_bxbx_xl, 0.0); - gkyl_mat_clear(&rhs_bxbx_xr, 0.0); - gkyl_mat_clear(&rhs_bxby_xl, 0.0); - gkyl_mat_clear(&rhs_bxby_xr, 0.0); - gkyl_mat_clear(&rhs_bxbz_xl, 0.0); - gkyl_mat_clear(&rhs_bxbz_xr, 0.0); - const double *Bx_sq_xl = &BB_surf[0]; - const double *Bx_sq_xr = &BB_surf[2]; - const double *By_sq_xl = &BB_surf[4]; - const double *By_sq_xr = &BB_surf[6]; - const double *Bz_sq_xl = &BB_surf[8]; - const double *Bz_sq_xr = &BB_surf[10]; - const double *B_x_B_y_xl = &BB_surf[12]; - const double *B_x_B_y_xr = &BB_surf[14]; - const double *B_x_B_z_xl = &BB_surf[16]; - const double *B_x_B_z_xr = &BB_surf[18]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - struct gkyl_mat rhs_byby_yl = gkyl_nmat_get(rhs, count+6); - struct gkyl_mat rhs_byby_yr = gkyl_nmat_get(rhs, count+7); - struct gkyl_mat rhs_bxby_yl = gkyl_nmat_get(rhs, count+8); - struct gkyl_mat rhs_bxby_yr = gkyl_nmat_get(rhs, count+9); - struct gkyl_mat rhs_bybz_yl = gkyl_nmat_get(rhs, count+10); - struct gkyl_mat rhs_bybz_yr = gkyl_nmat_get(rhs, count+11); - gkyl_mat_clear(&rhs_byby_yl, 0.0); - gkyl_mat_clear(&rhs_byby_yr, 0.0); - gkyl_mat_clear(&rhs_bxby_yl, 0.0); - gkyl_mat_clear(&rhs_bxby_yr, 0.0); - gkyl_mat_clear(&rhs_bybz_yl, 0.0); - gkyl_mat_clear(&rhs_bybz_yr, 0.0); - const double *Bx_sq_yl = &BB_surf[20]; - const double *Bx_sq_yr = &BB_surf[22]; - const double *By_sq_yl = &BB_surf[24]; - const double *By_sq_yr = &BB_surf[26]; - const double *Bz_sq_yl = &BB_surf[28]; - const double *Bz_sq_yr = &BB_surf[30]; - const double *B_x_B_y_yl = &BB_surf[32]; - const double *B_x_B_y_yr = &BB_surf[34]; - const double *B_y_B_z_yl = &BB_surf[36]; - const double *B_y_B_z_yr = &BB_surf[38]; - int *cell_avg_magB2_yl = &cell_avg_magB2_surf[2]; - int *cell_avg_magB2_yr = &cell_avg_magB2_surf[3]; - - double magB2_xl[2] = {0.0}; - double magB2_xr[2] = {0.0}; - double magB2_yl[2] = {0.0}; - double magB2_yr[2] = {0.0}; - magB2_xl[0] = Bx_sq_xl[0] + By_sq_xl[0] + Bz_sq_xl[0]; - magB2_xr[0] = Bx_sq_xr[0] + By_sq_xr[0] + Bz_sq_xr[0]; - magB2_yl[0] = Bx_sq_yl[0] + By_sq_yl[0] + Bz_sq_yl[0]; - magB2_yr[0] = Bx_sq_yr[0] + By_sq_yr[0] + Bz_sq_yr[0]; - magB2_xl[1] = Bx_sq_xl[1] + By_sq_xl[1] + Bz_sq_xl[1]; - magB2_xr[1] = Bx_sq_xr[1] + By_sq_xr[1] + Bz_sq_xr[1]; - magB2_yl[1] = Bx_sq_yl[1] + By_sq_yl[1] + Bz_sq_yl[1]; - magB2_yr[1] = Bx_sq_yr[1] + By_sq_yr[1] + Bz_sq_yr[1]; - // If |B|^2 < 0 at control points along a surface, only use cell average to get 1/|B|^2. - // Each surface is checked independently. - int cell_avg_xl = 0; - double bxbx_xl[2] = {0.0}; - double bxby_xl[2] = {0.0}; - double bxbz_xl[2] = {0.0}; - - int cell_avg_xr = 0; - double bxbx_xr[2] = {0.0}; - double bxby_xr[2] = {0.0}; - double bxbz_xr[2] = {0.0}; - - int cell_avg_yl = 0; - double byby_yl[2] = {0.0}; - double bxby_yl[2] = {0.0}; - double bybz_yl[2] = {0.0}; - - int cell_avg_yr = 0; - double byby_yr[2] = {0.0}; - double bxby_yr[2] = {0.0}; - double bybz_yr[2] = {0.0}; - - if (0.7071067811865475*magB2_xl[0]-1.224744871391589*magB2_xl[1] < 0.0) cell_avg_xl = 1; - if (0.7071067811865475*magB2_xr[0]-1.224744871391589*magB2_xr[1] < 0.0) cell_avg_xr = 1; - if (0.7071067811865475*magB2_yl[0]-1.224744871391589*magB2_yl[1] < 0.0) cell_avg_yl = 1; - if (0.7071067811865475*magB2_yr[0]-1.224744871391589*magB2_yr[1] < 0.0) cell_avg_yr = 1; - if (1.224744871391589*magB2_xl[1]+0.7071067811865475*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (1.224744871391589*magB2_xr[1]+0.7071067811865475*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (1.224744871391589*magB2_yl[1]+0.7071067811865475*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (1.224744871391589*magB2_yr[1]+0.7071067811865475*magB2_yr[0] < 0.0) cell_avg_yr = 1; - - cell_avg_magB2_xl[0] = cell_avg_xl; - cell_avg_magB2_xr[0] = cell_avg_xr; - cell_avg_magB2_yl[0] = cell_avg_yl; - cell_avg_magB2_yr[0] = cell_avg_yr; - - double magB2_inv_xl[2] = {0.0}; - - if (cell_avg_xl) { - magB2_inv_xl[0] = 2.0/magB2_xl[0]; - } else { - ser_1x_p1_inv(magB2_xl, magB2_inv_xl); - } - binop_mul_1d_ser_p1(magB2_inv_xl, Bx_sq_xl, bxbx_xl); - binop_mul_1d_ser_p1(magB2_inv_xl, B_x_B_y_xl, bxby_xl); - binop_mul_1d_ser_p1(magB2_inv_xl, B_x_B_z_xl, bxbz_xl); - - double magB2_inv_xr[2] = {0.0}; - - if (cell_avg_xr) { - magB2_inv_xr[0] = 2.0/magB2_xr[0]; - } else { - ser_1x_p1_inv(magB2_xr, magB2_inv_xr); - } - binop_mul_1d_ser_p1(magB2_inv_xr, Bx_sq_xr, bxbx_xr); - binop_mul_1d_ser_p1(magB2_inv_xr, B_x_B_y_xr, bxby_xr); - binop_mul_1d_ser_p1(magB2_inv_xr, B_x_B_z_xr, bxbz_xr); - - double magB2_inv_yl[2] = {0.0}; - - if (cell_avg_yl) { - magB2_inv_yl[0] = 2.0/magB2_yl[0]; - } else { - ser_1x_p1_inv(magB2_yl, magB2_inv_yl); - } - binop_mul_1d_ser_p1(magB2_inv_yl, By_sq_yl, byby_yl); - binop_mul_1d_ser_p1(magB2_inv_yl, B_x_B_y_yl, bxby_yl); - binop_mul_1d_ser_p1(magB2_inv_yl, B_y_B_z_yl, bybz_yl); - - double magB2_inv_yr[2] = {0.0}; - - if (cell_avg_yr) { - magB2_inv_yr[0] = 2.0/magB2_yr[0]; - } else { - ser_1x_p1_inv(magB2_yr, magB2_inv_yr); - } - binop_mul_1d_ser_p1(magB2_inv_yr, By_sq_yr, byby_yr); - binop_mul_1d_ser_p1(magB2_inv_yr, B_x_B_y_yr, bxby_yr); - binop_mul_1d_ser_p1(magB2_inv_yr, B_y_B_z_yr, bybz_yr); - - gkyl_mat_set(&rhs_bxbx_xl,0,0,bxbx_xl[0]); - gkyl_mat_set(&rhs_bxbx_xr,0,0,bxbx_xr[0]); - gkyl_mat_set(&rhs_bxby_xl,0,0,bxby_xl[0]); - gkyl_mat_set(&rhs_bxby_xr,0,0,bxby_xr[0]); - gkyl_mat_set(&rhs_bxbz_xl,0,0,bxbz_xl[0]); - gkyl_mat_set(&rhs_bxbz_xr,0,0,bxbz_xr[0]); - - gkyl_mat_set(&rhs_byby_yl,0,0,byby_yl[0]); - gkyl_mat_set(&rhs_byby_yr,0,0,byby_yr[0]); - gkyl_mat_set(&rhs_bxby_yl,0,0,bxby_yl[0]); - gkyl_mat_set(&rhs_bxby_yr,0,0,bxby_yr[0]); - gkyl_mat_set(&rhs_bybz_yl,0,0,bybz_yl[0]); - gkyl_mat_set(&rhs_bybz_yr,0,0,bybz_yr[0]); - - gkyl_mat_set(&rhs_bxbx_xl,1,0,bxbx_xl[1]); - gkyl_mat_set(&rhs_bxbx_xr,1,0,bxbx_xr[1]); - gkyl_mat_set(&rhs_bxby_xl,1,0,bxby_xl[1]); - gkyl_mat_set(&rhs_bxby_xr,1,0,bxby_xr[1]); - gkyl_mat_set(&rhs_bxbz_xl,1,0,bxbz_xl[1]); - gkyl_mat_set(&rhs_bxbz_xr,1,0,bxbz_xr[1]); - - gkyl_mat_set(&rhs_byby_yl,1,0,byby_yl[1]); - gkyl_mat_set(&rhs_byby_yr,1,0,byby_yr[1]); - gkyl_mat_set(&rhs_bxby_yl,1,0,bxby_yl[1]); - gkyl_mat_set(&rhs_bxby_yr,1,0,bxby_yr[1]); - gkyl_mat_set(&rhs_bybz_yl,1,0,bybz_yl[1]); - gkyl_mat_set(&rhs_bybz_yr,1,0,bybz_yr[1]); + // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. + + const double *bx = &bvar[0]; + const double *by = &bvar[4]; + const double *bz = &bvar[8]; + const double *bxbx = &bvar[12]; + const double *bxby = &bvar[16]; + const double *bxbz = &bvar[20]; + const double *byby = &bvar[24]; + const double *bybz = &bvar[28]; + const double *bzbz = &bvar[32]; + + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[2]; + double *bxbx_xl = &bvar_surf[4]; + double *bxbx_xr = &bvar_surf[6]; + double *bxby_xl = &bvar_surf[8]; + double *bxby_xr = &bvar_surf[10]; + double *bxbz_xl = &bvar_surf[12]; + double *bxbz_xr = &bvar_surf[14]; + + bx_xl[0] = 0.7071067811865475*bx[0]-1.224744871391589*bx[1]; + bx_xl[1] = 0.7071067811865475*bx[2]-1.224744871391589*bx[3]; + bxbx_xl[0] = 0.7071067811865475*bxbx[0]-1.224744871391589*bxbx[1]; + bxbx_xl[1] = 0.7071067811865475*bxbx[2]-1.224744871391589*bxbx[3]; + bxby_xl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[1]; + bxby_xl[1] = 0.7071067811865475*bxby[2]-1.224744871391589*bxby[3]; + bxbz_xl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[1]; + bxbz_xl[1] = 0.7071067811865475*bxbz[2]-1.224744871391589*bxbz[3]; + + bx_xr[0] = 1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[1] = 1.224744871391589*bx[3]+0.7071067811865475*bx[2]; + bxbx_xr[0] = 1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[1] = 1.224744871391589*bxbx[3]+0.7071067811865475*bxbx[2]; + bxby_xr[0] = 1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[1] = 1.224744871391589*bxby[3]+0.7071067811865475*bxby[2]; + bxbz_xr[0] = 1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[1] = 1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[2]; + + double *by_yl = &bvar_surf[16]; + double *by_yr = &bvar_surf[18]; + double *bxby_yl = &bvar_surf[20]; + double *bxby_yr = &bvar_surf[22]; + double *byby_yl = &bvar_surf[24]; + double *byby_yr = &bvar_surf[26]; + double *bybz_yl = &bvar_surf[28]; + double *bybz_yr = &bvar_surf[30]; + + by_yl[0] = 0.7071067811865475*by[0]-1.224744871391589*by[2]; + by_yl[1] = 0.7071067811865475*by[1]-1.224744871391589*by[3]; + bxby_yl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[2]; + bxby_yl[1] = 0.7071067811865475*bxby[1]-1.224744871391589*bxby[3]; + byby_yl[0] = 0.7071067811865475*byby[0]-1.224744871391589*byby[2]; + byby_yl[1] = 0.7071067811865475*byby[1]-1.224744871391589*byby[3]; + bybz_yl[0] = 0.7071067811865475*bybz[0]-1.224744871391589*bybz[2]; + bybz_yl[1] = 0.7071067811865475*bybz[1]-1.224744871391589*bybz[3]; + + by_yr[0] = 1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yr[1] = 1.224744871391589*by[3]+0.7071067811865475*by[1]; + bxby_yr[0] = 1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yr[1] = 1.224744871391589*bxby[3]+0.7071067811865475*bxby[1]; + byby_yr[0] = 1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yr[1] = 1.224744871391589*byby[3]+0.7071067811865475*byby[1]; + bybz_yr[0] = 1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yr[1] = 1.224744871391589*bybz[3]+0.7071067811865475*bybz[1]; } + diff --git a/kernels/maxwell/em_surf_set_bvar_2x_tensor_p2.c b/kernels/maxwell/em_surf_set_bvar_2x_tensor_p2.c index e75977954..fe4bb00a8 100644 --- a/kernels/maxwell/em_surf_set_bvar_2x_tensor_p2.c +++ b/kernels/maxwell/em_surf_set_bvar_2x_tensor_p2.c @@ -1,363 +1,88 @@ -#include #include -#include -GKYL_CU_DH void em_surf_set_bvar_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf) +GKYL_CU_DH void em_surf_set_bvar_2x_tensor_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf) { - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // BB_surf: Surface B_i B_j [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - - struct gkyl_mat A_bxbx_xl = gkyl_nmat_get(A, count); - struct gkyl_mat A_bxbx_xr = gkyl_nmat_get(A, count+1); - struct gkyl_mat A_bxby_xl = gkyl_nmat_get(A, count+2); - struct gkyl_mat A_bxby_xr = gkyl_nmat_get(A, count+3); - struct gkyl_mat A_bxbz_xl = gkyl_nmat_get(A, count+4); - struct gkyl_mat A_bxbz_xr = gkyl_nmat_get(A, count+5); - struct gkyl_mat rhs_bxbx_xl = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_bxbx_xr = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_bxby_xl = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_bxby_xr = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_bxbz_xl = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_bxbz_xr = gkyl_nmat_get(rhs, count+5); - gkyl_mat_clear(&A_bxbx_xl, 0.0); gkyl_mat_clear(&rhs_bxbx_xl, 0.0); - gkyl_mat_clear(&A_bxbx_xr, 0.0); gkyl_mat_clear(&rhs_bxbx_xr, 0.0); - gkyl_mat_clear(&A_bxby_xl, 0.0); gkyl_mat_clear(&rhs_bxby_xl, 0.0); - gkyl_mat_clear(&A_bxby_xr, 0.0); gkyl_mat_clear(&rhs_bxby_xr, 0.0); - gkyl_mat_clear(&A_bxbz_xl, 0.0); gkyl_mat_clear(&rhs_bxbz_xl, 0.0); - gkyl_mat_clear(&A_bxbz_xr, 0.0); gkyl_mat_clear(&rhs_bxbz_xr, 0.0); - const double *Bx_sq_xl = &BB_surf[0]; - const double *Bx_sq_xr = &BB_surf[3]; - const double *By_sq_xl = &BB_surf[6]; - const double *By_sq_xr = &BB_surf[9]; - const double *Bz_sq_xl = &BB_surf[12]; - const double *Bz_sq_xr = &BB_surf[15]; - const double *B_x_B_y_xl = &BB_surf[18]; - const double *B_x_B_y_xr = &BB_surf[21]; - const double *B_x_B_z_xl = &BB_surf[24]; - const double *B_x_B_z_xr = &BB_surf[27]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - struct gkyl_mat A_byby_yl = gkyl_nmat_get(A, count+6); - struct gkyl_mat A_byby_yr = gkyl_nmat_get(A, count+7); - struct gkyl_mat A_bxby_yl = gkyl_nmat_get(A, count+8); - struct gkyl_mat A_bxby_yr = gkyl_nmat_get(A, count+9); - struct gkyl_mat A_bybz_yl = gkyl_nmat_get(A, count+10); - struct gkyl_mat A_bybz_yr = gkyl_nmat_get(A, count+11); - struct gkyl_mat rhs_byby_yl = gkyl_nmat_get(rhs, count+6); - struct gkyl_mat rhs_byby_yr = gkyl_nmat_get(rhs, count+7); - struct gkyl_mat rhs_bxby_yl = gkyl_nmat_get(rhs, count+8); - struct gkyl_mat rhs_bxby_yr = gkyl_nmat_get(rhs, count+9); - struct gkyl_mat rhs_bybz_yl = gkyl_nmat_get(rhs, count+10); - struct gkyl_mat rhs_bybz_yr = gkyl_nmat_get(rhs, count+11); - gkyl_mat_clear(&A_byby_yl, 0.0); gkyl_mat_clear(&rhs_byby_yl, 0.0); - gkyl_mat_clear(&A_byby_yr, 0.0); gkyl_mat_clear(&rhs_byby_yr, 0.0); - gkyl_mat_clear(&A_bxby_yl, 0.0); gkyl_mat_clear(&rhs_bxby_yl, 0.0); - gkyl_mat_clear(&A_bxby_yr, 0.0); gkyl_mat_clear(&rhs_bxby_yr, 0.0); - gkyl_mat_clear(&A_bybz_yl, 0.0); gkyl_mat_clear(&rhs_bybz_yl, 0.0); - gkyl_mat_clear(&A_bybz_yr, 0.0); gkyl_mat_clear(&rhs_bybz_yr, 0.0); - const double *Bx_sq_yl = &BB_surf[30]; - const double *Bx_sq_yr = &BB_surf[33]; - const double *By_sq_yl = &BB_surf[36]; - const double *By_sq_yr = &BB_surf[39]; - const double *Bz_sq_yl = &BB_surf[42]; - const double *Bz_sq_yr = &BB_surf[45]; - const double *B_x_B_y_yl = &BB_surf[48]; - const double *B_x_B_y_yr = &BB_surf[51]; - const double *B_y_B_z_yl = &BB_surf[54]; - const double *B_y_B_z_yr = &BB_surf[57]; - int *cell_avg_magB2_yl = &cell_avg_magB2_surf[2]; - int *cell_avg_magB2_yr = &cell_avg_magB2_surf[3]; - - double magB2_xl[3] = {0.0}; - double magB2_xr[3] = {0.0}; - double magB2_yl[3] = {0.0}; - double magB2_yr[3] = {0.0}; - magB2_xl[0] = Bx_sq_xl[0] + By_sq_xl[0] + Bz_sq_xl[0]; - magB2_xr[0] = Bx_sq_xr[0] + By_sq_xr[0] + Bz_sq_xr[0]; - magB2_yl[0] = Bx_sq_yl[0] + By_sq_yl[0] + Bz_sq_yl[0]; - magB2_yr[0] = Bx_sq_yr[0] + By_sq_yr[0] + Bz_sq_yr[0]; - magB2_xl[1] = Bx_sq_xl[1] + By_sq_xl[1] + Bz_sq_xl[1]; - magB2_xr[1] = Bx_sq_xr[1] + By_sq_xr[1] + Bz_sq_xr[1]; - magB2_yl[1] = Bx_sq_yl[1] + By_sq_yl[1] + Bz_sq_yl[1]; - magB2_yr[1] = Bx_sq_yr[1] + By_sq_yr[1] + Bz_sq_yr[1]; - magB2_xl[2] = Bx_sq_xl[2] + By_sq_xl[2] + Bz_sq_xl[2]; - magB2_xr[2] = Bx_sq_xr[2] + By_sq_xr[2] + Bz_sq_xr[2]; - magB2_yl[2] = Bx_sq_yl[2] + By_sq_yl[2] + Bz_sq_yl[2]; - magB2_yr[2] = Bx_sq_yr[2] + By_sq_yr[2] + Bz_sq_yr[2]; - // If |B|^2 < 0 at control points along a surface, only use cell average to get 1/|B|^2. - // Each surface is checked independently. - int cell_avg_xl = 0; - int cell_avg_xr = 0; - int cell_avg_yl = 0; - int cell_avg_yr = 0; - - if (1.58113883008419*magB2_xl[2]-1.224744871391589*magB2_xl[1]+0.7071067811865475*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (1.58113883008419*magB2_xr[2]-1.224744871391589*magB2_xr[1]+0.7071067811865475*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (1.58113883008419*magB2_yl[2]-1.224744871391589*magB2_yl[1]+0.7071067811865475*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (1.58113883008419*magB2_yr[2]-1.224744871391589*magB2_yr[1]+0.7071067811865475*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if (0.7071067811865475*magB2_xl[0]-0.7905694150420947*magB2_xl[2] < 0.0) cell_avg_xl = 1; - if (0.7071067811865475*magB2_xr[0]-0.7905694150420947*magB2_xr[2] < 0.0) cell_avg_xr = 1; - if (0.7071067811865475*magB2_yl[0]-0.7905694150420947*magB2_yl[2] < 0.0) cell_avg_yl = 1; - if (0.7071067811865475*magB2_yr[0]-0.7905694150420947*magB2_yr[2] < 0.0) cell_avg_yr = 1; - if (1.58113883008419*magB2_xl[2]+1.224744871391589*magB2_xl[1]+0.7071067811865475*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (1.58113883008419*magB2_xr[2]+1.224744871391589*magB2_xr[1]+0.7071067811865475*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (1.58113883008419*magB2_yl[2]+1.224744871391589*magB2_yl[1]+0.7071067811865475*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (1.58113883008419*magB2_yr[2]+1.224744871391589*magB2_yr[1]+0.7071067811865475*magB2_yr[0] < 0.0) cell_avg_yr = 1; - - cell_avg_magB2_xl[0] = cell_avg_xl; - cell_avg_magB2_xr[0] = cell_avg_xr; - cell_avg_magB2_yl[0] = cell_avg_yl; - cell_avg_magB2_yr[0] = cell_avg_yr; - - if (cell_avg_xl) { - magB2_xl[1] = 0.0; - magB2_xl[2] = 0.0; - } - - if (cell_avg_xr) { - magB2_xr[1] = 0.0; - magB2_xr[2] = 0.0; - } - - if (cell_avg_yl) { - magB2_yl[1] = 0.0; - magB2_yl[2] = 0.0; - } - - if (cell_avg_yr) { - magB2_yr[1] = 0.0; - magB2_yr[2] = 0.0; - } - - gkyl_mat_set(&rhs_bxbx_xl,0,0,Bx_sq_xl[0]); - gkyl_mat_set(&rhs_bxbx_xr,0,0,Bx_sq_xr[0]); - gkyl_mat_set(&rhs_bxby_xl,0,0,B_x_B_y_xl[0]); - gkyl_mat_set(&rhs_bxby_xr,0,0,B_x_B_y_xr[0]); - gkyl_mat_set(&rhs_bxbz_xl,0,0,B_x_B_z_xl[0]); - gkyl_mat_set(&rhs_bxbz_xr,0,0,B_x_B_z_xr[0]); - - gkyl_mat_set(&rhs_byby_yl,0,0,By_sq_yl[0]); - gkyl_mat_set(&rhs_byby_yr,0,0,By_sq_yr[0]); - gkyl_mat_set(&rhs_bxby_yl,0,0,B_x_B_y_yl[0]); - gkyl_mat_set(&rhs_bxby_yr,0,0,B_x_B_y_yr[0]); - gkyl_mat_set(&rhs_bybz_yl,0,0,B_y_B_z_yl[0]); - gkyl_mat_set(&rhs_bybz_yr,0,0,B_y_B_z_yr[0]); - - gkyl_mat_set(&rhs_bxbx_xl,1,0,Bx_sq_xl[1]); - gkyl_mat_set(&rhs_bxbx_xr,1,0,Bx_sq_xr[1]); - gkyl_mat_set(&rhs_bxby_xl,1,0,B_x_B_y_xl[1]); - gkyl_mat_set(&rhs_bxby_xr,1,0,B_x_B_y_xr[1]); - gkyl_mat_set(&rhs_bxbz_xl,1,0,B_x_B_z_xl[1]); - gkyl_mat_set(&rhs_bxbz_xr,1,0,B_x_B_z_xr[1]); - - gkyl_mat_set(&rhs_byby_yl,1,0,By_sq_yl[1]); - gkyl_mat_set(&rhs_byby_yr,1,0,By_sq_yr[1]); - gkyl_mat_set(&rhs_bxby_yl,1,0,B_x_B_y_yl[1]); - gkyl_mat_set(&rhs_bxby_yr,1,0,B_x_B_y_yr[1]); - gkyl_mat_set(&rhs_bybz_yl,1,0,B_y_B_z_yl[1]); - gkyl_mat_set(&rhs_bybz_yr,1,0,B_y_B_z_yr[1]); - - gkyl_mat_set(&rhs_bxbx_xl,2,0,Bx_sq_xl[2]); - gkyl_mat_set(&rhs_bxbx_xr,2,0,Bx_sq_xr[2]); - gkyl_mat_set(&rhs_bxby_xl,2,0,B_x_B_y_xl[2]); - gkyl_mat_set(&rhs_bxby_xr,2,0,B_x_B_y_xr[2]); - gkyl_mat_set(&rhs_bxbz_xl,2,0,B_x_B_z_xl[2]); - gkyl_mat_set(&rhs_bxbz_xr,2,0,B_x_B_z_xr[2]); - - gkyl_mat_set(&rhs_byby_yl,2,0,By_sq_yl[2]); - gkyl_mat_set(&rhs_byby_yr,2,0,By_sq_yr[2]); - gkyl_mat_set(&rhs_bxby_yl,2,0,B_x_B_y_yl[2]); - gkyl_mat_set(&rhs_bxby_yr,2,0,B_x_B_y_yr[2]); - gkyl_mat_set(&rhs_bybz_yl,2,0,B_y_B_z_yl[2]); - gkyl_mat_set(&rhs_bybz_yr,2,0,B_y_B_z_yr[2]); - - double temp_magB2_xl = 0.0; - double temp_magB2_xr = 0.0; - double temp_magB2_yl = 0.0; - double temp_magB2_yr = 0.0; - temp_magB2_xl = 0.7071067811865475*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,0,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,0,temp_magB2_xl); - - temp_magB2_xr = 0.7071067811865475*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,0,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,0,temp_magB2_xr); - - temp_magB2_yl = 0.7071067811865475*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,0,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,0,temp_magB2_yl); - - temp_magB2_yr = 0.7071067811865475*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,0,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,0,temp_magB2_yr); - - temp_magB2_xl = 0.7071067811865475*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,0,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,1,temp_magB2_xl); - - temp_magB2_xr = 0.7071067811865475*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,0,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,1,temp_magB2_xr); - - temp_magB2_yl = 0.7071067811865475*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,0,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,1,temp_magB2_yl); - - temp_magB2_yr = 0.7071067811865475*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,0,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,1,temp_magB2_yr); - - temp_magB2_xl = 0.7071067811865475*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,0,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,2,temp_magB2_xl); - - temp_magB2_xr = 0.7071067811865475*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,0,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,2,temp_magB2_xr); - - temp_magB2_yl = 0.7071067811865475*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,0,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,2,temp_magB2_yl); - - temp_magB2_yr = 0.7071067811865475*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,0,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,2,temp_magB2_yr); - - temp_magB2_xl = 0.7071067811865475*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,1,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,0,temp_magB2_xl); - - temp_magB2_xr = 0.7071067811865475*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,1,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,0,temp_magB2_xr); - - temp_magB2_yl = 0.7071067811865475*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,1,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,0,temp_magB2_yl); - - temp_magB2_yr = 0.7071067811865475*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,1,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,0,temp_magB2_yr); - - temp_magB2_xl = 0.6324555320336759*magB2_xl[2]+0.7071067811865475*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,1,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,1,temp_magB2_xl); - - temp_magB2_xr = 0.6324555320336759*magB2_xr[2]+0.7071067811865475*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,1,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,1,temp_magB2_xr); - - temp_magB2_yl = 0.6324555320336759*magB2_yl[2]+0.7071067811865475*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,1,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,1,temp_magB2_yl); - - temp_magB2_yr = 0.6324555320336759*magB2_yr[2]+0.7071067811865475*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,1,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,1,temp_magB2_yr); - - temp_magB2_xl = 0.6324555320336759*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,1,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,2,temp_magB2_xl); - - temp_magB2_xr = 0.6324555320336759*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,1,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,2,temp_magB2_xr); - - temp_magB2_yl = 0.6324555320336759*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,1,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,2,temp_magB2_yl); - - temp_magB2_yr = 0.6324555320336759*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,1,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,2,temp_magB2_yr); - - temp_magB2_xl = 0.7071067811865475*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,2,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,0,temp_magB2_xl); - - temp_magB2_xr = 0.7071067811865475*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,2,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,0,temp_magB2_xr); - - temp_magB2_yl = 0.7071067811865475*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,2,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,0,temp_magB2_yl); - - temp_magB2_yr = 0.7071067811865475*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,2,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,0,temp_magB2_yr); - - temp_magB2_xl = 0.6324555320336759*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,2,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,1,temp_magB2_xl); - - temp_magB2_xr = 0.6324555320336759*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,2,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,1,temp_magB2_xr); - - temp_magB2_yl = 0.6324555320336759*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,2,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,1,temp_magB2_yl); - - temp_magB2_yr = 0.6324555320336759*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,2,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,1,temp_magB2_yr); - - temp_magB2_xl = 0.4517539514526256*magB2_xl[2]+0.7071067811865475*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,2,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,2,temp_magB2_xl); - - temp_magB2_xr = 0.4517539514526256*magB2_xr[2]+0.7071067811865475*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,2,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,2,temp_magB2_xr); - - temp_magB2_yl = 0.4517539514526256*magB2_yl[2]+0.7071067811865475*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,2,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,2,temp_magB2_yl); - - temp_magB2_yr = 0.4517539514526256*magB2_yr[2]+0.7071067811865475*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,2,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,2,temp_magB2_yr); + // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. + + const double *bx = &bvar[0]; + const double *by = &bvar[9]; + const double *bz = &bvar[18]; + const double *bxbx = &bvar[27]; + const double *bxby = &bvar[36]; + const double *bxbz = &bvar[45]; + const double *byby = &bvar[54]; + const double *bybz = &bvar[63]; + const double *bzbz = &bvar[72]; + + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[3]; + double *bxbx_xl = &bvar_surf[6]; + double *bxbx_xr = &bvar_surf[9]; + double *bxby_xl = &bvar_surf[12]; + double *bxby_xr = &bvar_surf[15]; + double *bxbz_xl = &bvar_surf[18]; + double *bxbz_xr = &bvar_surf[21]; + + bx_xl[0] = 1.58113883008419*bx[4]-1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xl[1] = 1.58113883008419*bx[6]-1.224744871391589*bx[3]+0.7071067811865475*bx[2]; + bx_xl[2] = 1.58113883008419*bx[8]-1.224744871391589*bx[7]+0.7071067811865475*bx[5]; + bxbx_xl[0] = 1.58113883008419*bxbx[4]-1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xl[1] = 1.58113883008419*bxbx[6]-1.224744871391589*bxbx[3]+0.7071067811865475*bxbx[2]; + bxbx_xl[2] = 1.58113883008419*bxbx[8]-1.224744871391589*bxbx[7]+0.7071067811865475*bxbx[5]; + bxby_xl[0] = 1.58113883008419*bxby[4]-1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xl[1] = 1.58113883008419*bxby[6]-1.224744871391589*bxby[3]+0.7071067811865475*bxby[2]; + bxby_xl[2] = 1.58113883008419*bxby[8]-1.224744871391589*bxby[7]+0.7071067811865475*bxby[5]; + bxbz_xl[0] = 1.58113883008419*bxbz[4]-1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xl[1] = 1.58113883008419*bxbz[6]-1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[2]; + bxbz_xl[2] = 1.58113883008419*bxbz[8]-1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[5]; + + bx_xr[0] = 1.58113883008419*bx[4]+1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[1] = 1.58113883008419*bx[6]+1.224744871391589*bx[3]+0.7071067811865475*bx[2]; + bx_xr[2] = 1.58113883008419*bx[8]+1.224744871391589*bx[7]+0.7071067811865475*bx[5]; + bxbx_xr[0] = 1.58113883008419*bxbx[4]+1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[1] = 1.58113883008419*bxbx[6]+1.224744871391589*bxbx[3]+0.7071067811865475*bxbx[2]; + bxbx_xr[2] = 1.58113883008419*bxbx[8]+1.224744871391589*bxbx[7]+0.7071067811865475*bxbx[5]; + bxby_xr[0] = 1.58113883008419*bxby[4]+1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[1] = 1.58113883008419*bxby[6]+1.224744871391589*bxby[3]+0.7071067811865475*bxby[2]; + bxby_xr[2] = 1.58113883008419*bxby[8]+1.224744871391589*bxby[7]+0.7071067811865475*bxby[5]; + bxbz_xr[0] = 1.58113883008419*bxbz[4]+1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[1] = 1.58113883008419*bxbz[6]+1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[2]; + bxbz_xr[2] = 1.58113883008419*bxbz[8]+1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[5]; + + double *by_yl = &bvar_surf[24]; + double *by_yr = &bvar_surf[27]; + double *bxby_yl = &bvar_surf[30]; + double *bxby_yr = &bvar_surf[33]; + double *byby_yl = &bvar_surf[36]; + double *byby_yr = &bvar_surf[39]; + double *bybz_yl = &bvar_surf[42]; + double *bybz_yr = &bvar_surf[45]; + + by_yl[0] = 1.58113883008419*by[5]-1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yl[1] = 1.58113883008419*by[7]-1.224744871391589*by[3]+0.7071067811865475*by[1]; + by_yl[2] = 1.58113883008419*by[8]-1.224744871391589*by[6]+0.7071067811865475*by[4]; + bxby_yl[0] = 1.58113883008419*bxby[5]-1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yl[1] = 1.58113883008419*bxby[7]-1.224744871391589*bxby[3]+0.7071067811865475*bxby[1]; + bxby_yl[2] = 1.58113883008419*bxby[8]-1.224744871391589*bxby[6]+0.7071067811865475*bxby[4]; + byby_yl[0] = 1.58113883008419*byby[5]-1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yl[1] = 1.58113883008419*byby[7]-1.224744871391589*byby[3]+0.7071067811865475*byby[1]; + byby_yl[2] = 1.58113883008419*byby[8]-1.224744871391589*byby[6]+0.7071067811865475*byby[4]; + bybz_yl[0] = 1.58113883008419*bybz[5]-1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yl[1] = 1.58113883008419*bybz[7]-1.224744871391589*bybz[3]+0.7071067811865475*bybz[1]; + bybz_yl[2] = 1.58113883008419*bybz[8]-1.224744871391589*bybz[6]+0.7071067811865475*bybz[4]; + + by_yr[0] = 1.58113883008419*by[5]+1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yr[1] = 1.58113883008419*by[7]+1.224744871391589*by[3]+0.7071067811865475*by[1]; + by_yr[2] = 1.58113883008419*by[8]+1.224744871391589*by[6]+0.7071067811865475*by[4]; + bxby_yr[0] = 1.58113883008419*bxby[5]+1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yr[1] = 1.58113883008419*bxby[7]+1.224744871391589*bxby[3]+0.7071067811865475*bxby[1]; + bxby_yr[2] = 1.58113883008419*bxby[8]+1.224744871391589*bxby[6]+0.7071067811865475*bxby[4]; + byby_yr[0] = 1.58113883008419*byby[5]+1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yr[1] = 1.58113883008419*byby[7]+1.224744871391589*byby[3]+0.7071067811865475*byby[1]; + byby_yr[2] = 1.58113883008419*byby[8]+1.224744871391589*byby[6]+0.7071067811865475*byby[4]; + bybz_yr[0] = 1.58113883008419*bybz[5]+1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yr[1] = 1.58113883008419*bybz[7]+1.224744871391589*bybz[3]+0.7071067811865475*bybz[1]; + bybz_yr[2] = 1.58113883008419*bybz[8]+1.224744871391589*bybz[6]+0.7071067811865475*bybz[4]; } + diff --git a/kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c b/kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c index 5521dda13..0e3767e59 100644 --- a/kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c +++ b/kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c @@ -1,334 +1,147 @@ -#include #include -#include -#include -GKYL_CU_DH void em_surf_set_bvar_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf) +GKYL_CU_DH void em_surf_set_bvar_3x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf) { - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // BB_surf: Surface B_i B_j [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - - struct gkyl_mat rhs_bxbx_xl = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_bxbx_xr = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_bxby_xl = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_bxby_xr = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_bxbz_xl = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_bxbz_xr = gkyl_nmat_get(rhs, count+5); - gkyl_mat_clear(&rhs_bxbx_xl, 0.0); - gkyl_mat_clear(&rhs_bxbx_xr, 0.0); - gkyl_mat_clear(&rhs_bxby_xl, 0.0); - gkyl_mat_clear(&rhs_bxby_xr, 0.0); - gkyl_mat_clear(&rhs_bxbz_xl, 0.0); - gkyl_mat_clear(&rhs_bxbz_xr, 0.0); - const double *Bx_sq_xl = &BB_surf[0]; - const double *Bx_sq_xr = &BB_surf[4]; - const double *By_sq_xl = &BB_surf[8]; - const double *By_sq_xr = &BB_surf[12]; - const double *Bz_sq_xl = &BB_surf[16]; - const double *Bz_sq_xr = &BB_surf[20]; - const double *B_x_B_y_xl = &BB_surf[24]; - const double *B_x_B_y_xr = &BB_surf[28]; - const double *B_x_B_z_xl = &BB_surf[32]; - const double *B_x_B_z_xr = &BB_surf[36]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - struct gkyl_mat rhs_byby_yl = gkyl_nmat_get(rhs, count+6); - struct gkyl_mat rhs_byby_yr = gkyl_nmat_get(rhs, count+7); - struct gkyl_mat rhs_bxby_yl = gkyl_nmat_get(rhs, count+8); - struct gkyl_mat rhs_bxby_yr = gkyl_nmat_get(rhs, count+9); - struct gkyl_mat rhs_bybz_yl = gkyl_nmat_get(rhs, count+10); - struct gkyl_mat rhs_bybz_yr = gkyl_nmat_get(rhs, count+11); - gkyl_mat_clear(&rhs_byby_yl, 0.0); - gkyl_mat_clear(&rhs_byby_yr, 0.0); - gkyl_mat_clear(&rhs_bxby_yl, 0.0); - gkyl_mat_clear(&rhs_bxby_yr, 0.0); - gkyl_mat_clear(&rhs_bybz_yl, 0.0); - gkyl_mat_clear(&rhs_bybz_yr, 0.0); - const double *Bx_sq_yl = &BB_surf[40]; - const double *Bx_sq_yr = &BB_surf[44]; - const double *By_sq_yl = &BB_surf[48]; - const double *By_sq_yr = &BB_surf[52]; - const double *Bz_sq_yl = &BB_surf[56]; - const double *Bz_sq_yr = &BB_surf[60]; - const double *B_x_B_y_yl = &BB_surf[64]; - const double *B_x_B_y_yr = &BB_surf[68]; - const double *B_y_B_z_yl = &BB_surf[72]; - const double *B_y_B_z_yr = &BB_surf[76]; - int *cell_avg_magB2_yl = &cell_avg_magB2_surf[2]; - int *cell_avg_magB2_yr = &cell_avg_magB2_surf[3]; - - struct gkyl_mat rhs_bzbz_zl = gkyl_nmat_get(rhs, count+12); - struct gkyl_mat rhs_bzbz_zr = gkyl_nmat_get(rhs, count+13); - struct gkyl_mat rhs_bxbz_zl = gkyl_nmat_get(rhs, count+14); - struct gkyl_mat rhs_bxbz_zr = gkyl_nmat_get(rhs, count+15); - struct gkyl_mat rhs_bybz_zl = gkyl_nmat_get(rhs, count+16); - struct gkyl_mat rhs_bybz_zr = gkyl_nmat_get(rhs, count+17); - gkyl_mat_clear(&rhs_bzbz_zl, 0.0); - gkyl_mat_clear(&rhs_bzbz_zr, 0.0); - gkyl_mat_clear(&rhs_bxbz_zl, 0.0); - gkyl_mat_clear(&rhs_bxbz_zr, 0.0); - gkyl_mat_clear(&rhs_bybz_zl, 0.0); - gkyl_mat_clear(&rhs_bybz_zr, 0.0); - const double *Bx_sq_zl = &BB_surf[80]; - const double *Bx_sq_zr = &BB_surf[84]; - const double *By_sq_zl = &BB_surf[88]; - const double *By_sq_zr = &BB_surf[92]; - const double *Bz_sq_zl = &BB_surf[96]; - const double *Bz_sq_zr = &BB_surf[100]; - const double *B_x_B_z_zl = &BB_surf[104]; - const double *B_x_B_z_zr = &BB_surf[108]; - const double *B_y_B_z_zl = &BB_surf[112]; - const double *B_y_B_z_zr = &BB_surf[116]; - int *cell_avg_magB2_zl = &cell_avg_magB2_surf[4]; - int *cell_avg_magB2_zr = &cell_avg_magB2_surf[5]; - - double magB2_xl[4] = {0.0}; - double magB2_xr[4] = {0.0}; - double magB2_yl[4] = {0.0}; - double magB2_yr[4] = {0.0}; - double magB2_zl[4] = {0.0}; - double magB2_zr[4] = {0.0}; - magB2_xl[0] = Bx_sq_xl[0] + By_sq_xl[0] + Bz_sq_xl[0]; - magB2_xr[0] = Bx_sq_xr[0] + By_sq_xr[0] + Bz_sq_xr[0]; - magB2_yl[0] = Bx_sq_yl[0] + By_sq_yl[0] + Bz_sq_yl[0]; - magB2_yr[0] = Bx_sq_yr[0] + By_sq_yr[0] + Bz_sq_yr[0]; - magB2_zl[0] = Bx_sq_zl[0] + By_sq_zl[0] + Bz_sq_zl[0]; - magB2_zr[0] = Bx_sq_zr[0] + By_sq_zr[0] + Bz_sq_zr[0]; - magB2_xl[1] = Bx_sq_xl[1] + By_sq_xl[1] + Bz_sq_xl[1]; - magB2_xr[1] = Bx_sq_xr[1] + By_sq_xr[1] + Bz_sq_xr[1]; - magB2_yl[1] = Bx_sq_yl[1] + By_sq_yl[1] + Bz_sq_yl[1]; - magB2_yr[1] = Bx_sq_yr[1] + By_sq_yr[1] + Bz_sq_yr[1]; - magB2_zl[1] = Bx_sq_zl[1] + By_sq_zl[1] + Bz_sq_zl[1]; - magB2_zr[1] = Bx_sq_zr[1] + By_sq_zr[1] + Bz_sq_zr[1]; - magB2_xl[2] = Bx_sq_xl[2] + By_sq_xl[2] + Bz_sq_xl[2]; - magB2_xr[2] = Bx_sq_xr[2] + By_sq_xr[2] + Bz_sq_xr[2]; - magB2_yl[2] = Bx_sq_yl[2] + By_sq_yl[2] + Bz_sq_yl[2]; - magB2_yr[2] = Bx_sq_yr[2] + By_sq_yr[2] + Bz_sq_yr[2]; - magB2_zl[2] = Bx_sq_zl[2] + By_sq_zl[2] + Bz_sq_zl[2]; - magB2_zr[2] = Bx_sq_zr[2] + By_sq_zr[2] + Bz_sq_zr[2]; - magB2_xl[3] = Bx_sq_xl[3] + By_sq_xl[3] + Bz_sq_xl[3]; - magB2_xr[3] = Bx_sq_xr[3] + By_sq_xr[3] + Bz_sq_xr[3]; - magB2_yl[3] = Bx_sq_yl[3] + By_sq_yl[3] + Bz_sq_yl[3]; - magB2_yr[3] = Bx_sq_yr[3] + By_sq_yr[3] + Bz_sq_yr[3]; - magB2_zl[3] = Bx_sq_zl[3] + By_sq_zl[3] + Bz_sq_zl[3]; - magB2_zr[3] = Bx_sq_zr[3] + By_sq_zr[3] + Bz_sq_zr[3]; - // If |B|^2 < 0 at control points along a surface, only use cell average to get 1/|B|^2. - // Each surface is checked independently. - int cell_avg_xl = 0; - double bxbx_xl[4] = {0.0}; - double bxby_xl[4] = {0.0}; - double bxbz_xl[4] = {0.0}; - - int cell_avg_xr = 0; - double bxbx_xr[4] = {0.0}; - double bxby_xr[4] = {0.0}; - double bxbz_xr[4] = {0.0}; - - int cell_avg_yl = 0; - double byby_yl[4] = {0.0}; - double bxby_yl[4] = {0.0}; - double bybz_yl[4] = {0.0}; - - int cell_avg_yr = 0; - double byby_yr[4] = {0.0}; - double bxby_yr[4] = {0.0}; - double bybz_yr[4] = {0.0}; - - int cell_avg_zl = 0; - double bzbz_zl[4] = {0.0}; - double bxbz_zl[4] = {0.0}; - double bybz_zl[4] = {0.0}; - - int cell_avg_zr = 0; - double bzbz_zr[4] = {0.0}; - double bxbz_zr[4] = {0.0}; - double bybz_zr[4] = {0.0}; - - if (1.5*magB2_xl[3]-0.8660254037844386*magB2_xl[2]-0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (1.5*magB2_xr[3]-0.8660254037844386*magB2_xr[2]-0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (1.5*magB2_yl[3]-0.8660254037844386*magB2_yl[2]-0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (1.5*magB2_yr[3]-0.8660254037844386*magB2_yr[2]-0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if (1.5*magB2_zl[3]-0.8660254037844386*magB2_zl[2]-0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if (1.5*magB2_zr[3]-0.8660254037844386*magB2_zr[2]-0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if ((-1.5*magB2_xl[3])-0.8660254037844386*magB2_xl[2]+0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if ((-1.5*magB2_xr[3])-0.8660254037844386*magB2_xr[2]+0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if ((-1.5*magB2_yl[3])-0.8660254037844386*magB2_yl[2]+0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if ((-1.5*magB2_yr[3])-0.8660254037844386*magB2_yr[2]+0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if ((-1.5*magB2_zl[3])-0.8660254037844386*magB2_zl[2]+0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if ((-1.5*magB2_zr[3])-0.8660254037844386*magB2_zr[2]+0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if ((-1.5*magB2_xl[3])+0.8660254037844386*magB2_xl[2]-0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if ((-1.5*magB2_xr[3])+0.8660254037844386*magB2_xr[2]-0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if ((-1.5*magB2_yl[3])+0.8660254037844386*magB2_yl[2]-0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if ((-1.5*magB2_yr[3])+0.8660254037844386*magB2_yr[2]-0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if ((-1.5*magB2_zl[3])+0.8660254037844386*magB2_zl[2]-0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if ((-1.5*magB2_zr[3])+0.8660254037844386*magB2_zr[2]-0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if (1.5*magB2_xl[3]+0.8660254037844386*magB2_xl[2]+0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (1.5*magB2_xr[3]+0.8660254037844386*magB2_xr[2]+0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (1.5*magB2_yl[3]+0.8660254037844386*magB2_yl[2]+0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (1.5*magB2_yr[3]+0.8660254037844386*magB2_yr[2]+0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if (1.5*magB2_zl[3]+0.8660254037844386*magB2_zl[2]+0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if (1.5*magB2_zr[3]+0.8660254037844386*magB2_zr[2]+0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - - cell_avg_magB2_xl[0] = cell_avg_xl; - cell_avg_magB2_xr[0] = cell_avg_xr; - cell_avg_magB2_yl[0] = cell_avg_yl; - cell_avg_magB2_yr[0] = cell_avg_yr; - cell_avg_magB2_zl[0] = cell_avg_zl; - cell_avg_magB2_zr[0] = cell_avg_zr; - - double magB2_inv_xl[4] = {0.0}; - - if (cell_avg_xl) { - magB2_inv_xl[0] = 4.0/magB2_xl[0]; - } else { - ser_2x_p1_inv(magB2_xl, magB2_inv_xl); - } - binop_mul_2d_ser_p1(magB2_inv_xl, Bx_sq_xl, bxbx_xl); - binop_mul_2d_ser_p1(magB2_inv_xl, B_x_B_y_xl, bxby_xl); - binop_mul_2d_ser_p1(magB2_inv_xl, B_x_B_z_xl, bxbz_xl); - - double magB2_inv_xr[4] = {0.0}; - - if (cell_avg_xr) { - magB2_inv_xr[0] = 4.0/magB2_xr[0]; - } else { - ser_2x_p1_inv(magB2_xr, magB2_inv_xr); - } - binop_mul_2d_ser_p1(magB2_inv_xr, Bx_sq_xr, bxbx_xr); - binop_mul_2d_ser_p1(magB2_inv_xr, B_x_B_y_xr, bxby_xr); - binop_mul_2d_ser_p1(magB2_inv_xr, B_x_B_z_xr, bxbz_xr); - - double magB2_inv_yl[4] = {0.0}; - - if (cell_avg_yl) { - magB2_inv_yl[0] = 4.0/magB2_yl[0]; - } else { - ser_2x_p1_inv(magB2_yl, magB2_inv_yl); - } - binop_mul_2d_ser_p1(magB2_inv_yl, By_sq_yl, byby_yl); - binop_mul_2d_ser_p1(magB2_inv_yl, B_x_B_y_yl, bxby_yl); - binop_mul_2d_ser_p1(magB2_inv_yl, B_y_B_z_yl, bybz_yl); - - double magB2_inv_yr[4] = {0.0}; - - if (cell_avg_yr) { - magB2_inv_yr[0] = 4.0/magB2_yr[0]; - } else { - ser_2x_p1_inv(magB2_yr, magB2_inv_yr); - } - binop_mul_2d_ser_p1(magB2_inv_yr, By_sq_yr, byby_yr); - binop_mul_2d_ser_p1(magB2_inv_yr, B_x_B_y_yr, bxby_yr); - binop_mul_2d_ser_p1(magB2_inv_yr, B_y_B_z_yr, bybz_yr); - - double magB2_inv_zl[4] = {0.0}; - - if (cell_avg_zl) { - magB2_inv_zl[0] = 4.0/magB2_zl[0]; - } else { - ser_2x_p1_inv(magB2_zl, magB2_inv_zl); - } - binop_mul_2d_ser_p1(magB2_inv_zl, Bz_sq_zl, bzbz_zl); - binop_mul_2d_ser_p1(magB2_inv_zl, B_x_B_z_zl, bxbz_zl); - binop_mul_2d_ser_p1(magB2_inv_zl, B_y_B_z_zl, bybz_zl); - - double magB2_inv_zr[4] = {0.0}; - - if (cell_avg_zr) { - magB2_inv_zr[0] = 4.0/magB2_zr[0]; - } else { - ser_2x_p1_inv(magB2_zr, magB2_inv_zr); - } - binop_mul_2d_ser_p1(magB2_inv_zr, Bz_sq_zr, bzbz_zr); - binop_mul_2d_ser_p1(magB2_inv_zr, B_x_B_z_zr, bxbz_zr); - binop_mul_2d_ser_p1(magB2_inv_zr, B_y_B_z_zr, bybz_zr); - - gkyl_mat_set(&rhs_bxbx_xl,0,0,bxbx_xl[0]); - gkyl_mat_set(&rhs_bxbx_xr,0,0,bxbx_xr[0]); - gkyl_mat_set(&rhs_bxby_xl,0,0,bxby_xl[0]); - gkyl_mat_set(&rhs_bxby_xr,0,0,bxby_xr[0]); - gkyl_mat_set(&rhs_bxbz_xl,0,0,bxbz_xl[0]); - gkyl_mat_set(&rhs_bxbz_xr,0,0,bxbz_xr[0]); - - gkyl_mat_set(&rhs_byby_yl,0,0,byby_yl[0]); - gkyl_mat_set(&rhs_byby_yr,0,0,byby_yr[0]); - gkyl_mat_set(&rhs_bxby_yl,0,0,bxby_yl[0]); - gkyl_mat_set(&rhs_bxby_yr,0,0,bxby_yr[0]); - gkyl_mat_set(&rhs_bybz_yl,0,0,bybz_yl[0]); - gkyl_mat_set(&rhs_bybz_yr,0,0,bybz_yr[0]); - - gkyl_mat_set(&rhs_bzbz_zl,0,0,bzbz_zl[0]); - gkyl_mat_set(&rhs_bzbz_zr,0,0,bzbz_zr[0]); - gkyl_mat_set(&rhs_bxbz_zl,0,0,bxbz_zl[0]); - gkyl_mat_set(&rhs_bxbz_zr,0,0,bxbz_zr[0]); - gkyl_mat_set(&rhs_bybz_zl,0,0,bybz_zl[0]); - gkyl_mat_set(&rhs_bybz_zr,0,0,bybz_zr[0]); - - gkyl_mat_set(&rhs_bxbx_xl,1,0,bxbx_xl[1]); - gkyl_mat_set(&rhs_bxbx_xr,1,0,bxbx_xr[1]); - gkyl_mat_set(&rhs_bxby_xl,1,0,bxby_xl[1]); - gkyl_mat_set(&rhs_bxby_xr,1,0,bxby_xr[1]); - gkyl_mat_set(&rhs_bxbz_xl,1,0,bxbz_xl[1]); - gkyl_mat_set(&rhs_bxbz_xr,1,0,bxbz_xr[1]); - - gkyl_mat_set(&rhs_byby_yl,1,0,byby_yl[1]); - gkyl_mat_set(&rhs_byby_yr,1,0,byby_yr[1]); - gkyl_mat_set(&rhs_bxby_yl,1,0,bxby_yl[1]); - gkyl_mat_set(&rhs_bxby_yr,1,0,bxby_yr[1]); - gkyl_mat_set(&rhs_bybz_yl,1,0,bybz_yl[1]); - gkyl_mat_set(&rhs_bybz_yr,1,0,bybz_yr[1]); - - gkyl_mat_set(&rhs_bzbz_zl,1,0,bzbz_zl[1]); - gkyl_mat_set(&rhs_bzbz_zr,1,0,bzbz_zr[1]); - gkyl_mat_set(&rhs_bxbz_zl,1,0,bxbz_zl[1]); - gkyl_mat_set(&rhs_bxbz_zr,1,0,bxbz_zr[1]); - gkyl_mat_set(&rhs_bybz_zl,1,0,bybz_zl[1]); - gkyl_mat_set(&rhs_bybz_zr,1,0,bybz_zr[1]); - - gkyl_mat_set(&rhs_bxbx_xl,2,0,bxbx_xl[2]); - gkyl_mat_set(&rhs_bxbx_xr,2,0,bxbx_xr[2]); - gkyl_mat_set(&rhs_bxby_xl,2,0,bxby_xl[2]); - gkyl_mat_set(&rhs_bxby_xr,2,0,bxby_xr[2]); - gkyl_mat_set(&rhs_bxbz_xl,2,0,bxbz_xl[2]); - gkyl_mat_set(&rhs_bxbz_xr,2,0,bxbz_xr[2]); - - gkyl_mat_set(&rhs_byby_yl,2,0,byby_yl[2]); - gkyl_mat_set(&rhs_byby_yr,2,0,byby_yr[2]); - gkyl_mat_set(&rhs_bxby_yl,2,0,bxby_yl[2]); - gkyl_mat_set(&rhs_bxby_yr,2,0,bxby_yr[2]); - gkyl_mat_set(&rhs_bybz_yl,2,0,bybz_yl[2]); - gkyl_mat_set(&rhs_bybz_yr,2,0,bybz_yr[2]); - - gkyl_mat_set(&rhs_bzbz_zl,2,0,bzbz_zl[2]); - gkyl_mat_set(&rhs_bzbz_zr,2,0,bzbz_zr[2]); - gkyl_mat_set(&rhs_bxbz_zl,2,0,bxbz_zl[2]); - gkyl_mat_set(&rhs_bxbz_zr,2,0,bxbz_zr[2]); - gkyl_mat_set(&rhs_bybz_zl,2,0,bybz_zl[2]); - gkyl_mat_set(&rhs_bybz_zr,2,0,bybz_zr[2]); - - gkyl_mat_set(&rhs_bxbx_xl,3,0,bxbx_xl[3]); - gkyl_mat_set(&rhs_bxbx_xr,3,0,bxbx_xr[3]); - gkyl_mat_set(&rhs_bxby_xl,3,0,bxby_xl[3]); - gkyl_mat_set(&rhs_bxby_xr,3,0,bxby_xr[3]); - gkyl_mat_set(&rhs_bxbz_xl,3,0,bxbz_xl[3]); - gkyl_mat_set(&rhs_bxbz_xr,3,0,bxbz_xr[3]); - - gkyl_mat_set(&rhs_byby_yl,3,0,byby_yl[3]); - gkyl_mat_set(&rhs_byby_yr,3,0,byby_yr[3]); - gkyl_mat_set(&rhs_bxby_yl,3,0,bxby_yl[3]); - gkyl_mat_set(&rhs_bxby_yr,3,0,bxby_yr[3]); - gkyl_mat_set(&rhs_bybz_yl,3,0,bybz_yl[3]); - gkyl_mat_set(&rhs_bybz_yr,3,0,bybz_yr[3]); - - gkyl_mat_set(&rhs_bzbz_zl,3,0,bzbz_zl[3]); - gkyl_mat_set(&rhs_bzbz_zr,3,0,bzbz_zr[3]); - gkyl_mat_set(&rhs_bxbz_zl,3,0,bxbz_zl[3]); - gkyl_mat_set(&rhs_bxbz_zr,3,0,bxbz_zr[3]); - gkyl_mat_set(&rhs_bybz_zl,3,0,bybz_zl[3]); - gkyl_mat_set(&rhs_bybz_zr,3,0,bybz_zr[3]); + // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. + + const double *bx = &bvar[0]; + const double *by = &bvar[8]; + const double *bz = &bvar[16]; + const double *bxbx = &bvar[24]; + const double *bxby = &bvar[32]; + const double *bxbz = &bvar[40]; + const double *byby = &bvar[48]; + const double *bybz = &bvar[56]; + const double *bzbz = &bvar[64]; + + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[4]; + double *bxbx_xl = &bvar_surf[8]; + double *bxbx_xr = &bvar_surf[12]; + double *bxby_xl = &bvar_surf[16]; + double *bxby_xr = &bvar_surf[20]; + double *bxbz_xl = &bvar_surf[24]; + double *bxbz_xr = &bvar_surf[28]; + + bx_xl[0] = 0.7071067811865475*bx[0]-1.224744871391589*bx[1]; + bx_xl[1] = 0.7071067811865475*bx[2]-1.224744871391589*bx[4]; + bx_xl[2] = 0.7071067811865475*bx[3]-1.224744871391589*bx[5]; + bx_xl[3] = 0.7071067811865475*bx[6]-1.224744871391589*bx[7]; + bxbx_xl[0] = 0.7071067811865475*bxbx[0]-1.224744871391589*bxbx[1]; + bxbx_xl[1] = 0.7071067811865475*bxbx[2]-1.224744871391589*bxbx[4]; + bxbx_xl[2] = 0.7071067811865475*bxbx[3]-1.224744871391589*bxbx[5]; + bxbx_xl[3] = 0.7071067811865475*bxbx[6]-1.224744871391589*bxbx[7]; + bxby_xl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[1]; + bxby_xl[1] = 0.7071067811865475*bxby[2]-1.224744871391589*bxby[4]; + bxby_xl[2] = 0.7071067811865475*bxby[3]-1.224744871391589*bxby[5]; + bxby_xl[3] = 0.7071067811865475*bxby[6]-1.224744871391589*bxby[7]; + bxbz_xl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[1]; + bxbz_xl[1] = 0.7071067811865475*bxbz[2]-1.224744871391589*bxbz[4]; + bxbz_xl[2] = 0.7071067811865475*bxbz[3]-1.224744871391589*bxbz[5]; + bxbz_xl[3] = 0.7071067811865475*bxbz[6]-1.224744871391589*bxbz[7]; + + bx_xr[0] = 1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[1] = 1.224744871391589*bx[4]+0.7071067811865475*bx[2]; + bx_xr[2] = 1.224744871391589*bx[5]+0.7071067811865475*bx[3]; + bx_xr[3] = 1.224744871391589*bx[7]+0.7071067811865475*bx[6]; + bxbx_xr[0] = 1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[1] = 1.224744871391589*bxbx[4]+0.7071067811865475*bxbx[2]; + bxbx_xr[2] = 1.224744871391589*bxbx[5]+0.7071067811865475*bxbx[3]; + bxbx_xr[3] = 1.224744871391589*bxbx[7]+0.7071067811865475*bxbx[6]; + bxby_xr[0] = 1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[1] = 1.224744871391589*bxby[4]+0.7071067811865475*bxby[2]; + bxby_xr[2] = 1.224744871391589*bxby[5]+0.7071067811865475*bxby[3]; + bxby_xr[3] = 1.224744871391589*bxby[7]+0.7071067811865475*bxby[6]; + bxbz_xr[0] = 1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[1] = 1.224744871391589*bxbz[4]+0.7071067811865475*bxbz[2]; + bxbz_xr[2] = 1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[3]; + bxbz_xr[3] = 1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[6]; + + double *by_yl = &bvar_surf[32]; + double *by_yr = &bvar_surf[36]; + double *bxby_yl = &bvar_surf[40]; + double *bxby_yr = &bvar_surf[44]; + double *byby_yl = &bvar_surf[48]; + double *byby_yr = &bvar_surf[52]; + double *bybz_yl = &bvar_surf[56]; + double *bybz_yr = &bvar_surf[60]; + + by_yl[0] = 0.7071067811865475*by[0]-1.224744871391589*by[2]; + by_yl[1] = 0.7071067811865475*by[1]-1.224744871391589*by[4]; + by_yl[2] = 0.7071067811865475*by[3]-1.224744871391589*by[6]; + by_yl[3] = 0.7071067811865475*by[5]-1.224744871391589*by[7]; + bxby_yl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[2]; + bxby_yl[1] = 0.7071067811865475*bxby[1]-1.224744871391589*bxby[4]; + bxby_yl[2] = 0.7071067811865475*bxby[3]-1.224744871391589*bxby[6]; + bxby_yl[3] = 0.7071067811865475*bxby[5]-1.224744871391589*bxby[7]; + byby_yl[0] = 0.7071067811865475*byby[0]-1.224744871391589*byby[2]; + byby_yl[1] = 0.7071067811865475*byby[1]-1.224744871391589*byby[4]; + byby_yl[2] = 0.7071067811865475*byby[3]-1.224744871391589*byby[6]; + byby_yl[3] = 0.7071067811865475*byby[5]-1.224744871391589*byby[7]; + bybz_yl[0] = 0.7071067811865475*bybz[0]-1.224744871391589*bybz[2]; + bybz_yl[1] = 0.7071067811865475*bybz[1]-1.224744871391589*bybz[4]; + bybz_yl[2] = 0.7071067811865475*bybz[3]-1.224744871391589*bybz[6]; + bybz_yl[3] = 0.7071067811865475*bybz[5]-1.224744871391589*bybz[7]; + + by_yr[0] = 1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yr[1] = 1.224744871391589*by[4]+0.7071067811865475*by[1]; + by_yr[2] = 1.224744871391589*by[6]+0.7071067811865475*by[3]; + by_yr[3] = 1.224744871391589*by[7]+0.7071067811865475*by[5]; + bxby_yr[0] = 1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yr[1] = 1.224744871391589*bxby[4]+0.7071067811865475*bxby[1]; + bxby_yr[2] = 1.224744871391589*bxby[6]+0.7071067811865475*bxby[3]; + bxby_yr[3] = 1.224744871391589*bxby[7]+0.7071067811865475*bxby[5]; + byby_yr[0] = 1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yr[1] = 1.224744871391589*byby[4]+0.7071067811865475*byby[1]; + byby_yr[2] = 1.224744871391589*byby[6]+0.7071067811865475*byby[3]; + byby_yr[3] = 1.224744871391589*byby[7]+0.7071067811865475*byby[5]; + bybz_yr[0] = 1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yr[1] = 1.224744871391589*bybz[4]+0.7071067811865475*bybz[1]; + bybz_yr[2] = 1.224744871391589*bybz[6]+0.7071067811865475*bybz[3]; + bybz_yr[3] = 1.224744871391589*bybz[7]+0.7071067811865475*bybz[5]; + + double *bz_zl = &bvar_surf[64]; + double *bz_zr = &bvar_surf[68]; + double *bxbz_zl = &bvar_surf[72]; + double *bxbz_zr = &bvar_surf[76]; + double *bybz_zl = &bvar_surf[80]; + double *bybz_zr = &bvar_surf[84]; + double *bzbz_zl = &bvar_surf[88]; + double *bzbz_zr = &bvar_surf[92]; + + bz_zl[0] = 0.7071067811865475*bz[0]-1.224744871391589*bz[3]; + bz_zl[1] = 0.7071067811865475*bz[1]-1.224744871391589*bz[5]; + bz_zl[2] = 0.7071067811865475*bz[2]-1.224744871391589*bz[6]; + bz_zl[3] = 0.7071067811865475*bz[4]-1.224744871391589*bz[7]; + bxbz_zl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[3]; + bxbz_zl[1] = 0.7071067811865475*bxbz[1]-1.224744871391589*bxbz[5]; + bxbz_zl[2] = 0.7071067811865475*bxbz[2]-1.224744871391589*bxbz[6]; + bxbz_zl[3] = 0.7071067811865475*bxbz[4]-1.224744871391589*bxbz[7]; + bybz_zl[0] = 0.7071067811865475*bybz[0]-1.224744871391589*bybz[3]; + bybz_zl[1] = 0.7071067811865475*bybz[1]-1.224744871391589*bybz[5]; + bybz_zl[2] = 0.7071067811865475*bybz[2]-1.224744871391589*bybz[6]; + bybz_zl[3] = 0.7071067811865475*bybz[4]-1.224744871391589*bybz[7]; + bzbz_zl[0] = 0.7071067811865475*bzbz[0]-1.224744871391589*bzbz[3]; + bzbz_zl[1] = 0.7071067811865475*bzbz[1]-1.224744871391589*bzbz[5]; + bzbz_zl[2] = 0.7071067811865475*bzbz[2]-1.224744871391589*bzbz[6]; + bzbz_zl[3] = 0.7071067811865475*bzbz[4]-1.224744871391589*bzbz[7]; + + bz_zr[0] = 1.224744871391589*bz[3]+0.7071067811865475*bz[0]; + bz_zr[1] = 1.224744871391589*bz[5]+0.7071067811865475*bz[1]; + bz_zr[2] = 1.224744871391589*bz[6]+0.7071067811865475*bz[2]; + bz_zr[3] = 1.224744871391589*bz[7]+0.7071067811865475*bz[4]; + bxbz_zr[0] = 1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[0]; + bxbz_zr[1] = 1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[1]; + bxbz_zr[2] = 1.224744871391589*bxbz[6]+0.7071067811865475*bxbz[2]; + bxbz_zr[3] = 1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[4]; + bybz_zr[0] = 1.224744871391589*bybz[3]+0.7071067811865475*bybz[0]; + bybz_zr[1] = 1.224744871391589*bybz[5]+0.7071067811865475*bybz[1]; + bybz_zr[2] = 1.224744871391589*bybz[6]+0.7071067811865475*bybz[2]; + bybz_zr[3] = 1.224744871391589*bybz[7]+0.7071067811865475*bybz[4]; + bzbz_zr[0] = 1.224744871391589*bzbz[3]+0.7071067811865475*bzbz[0]; + bzbz_zr[1] = 1.224744871391589*bzbz[5]+0.7071067811865475*bzbz[1]; + bzbz_zr[2] = 1.224744871391589*bzbz[6]+0.7071067811865475*bzbz[2]; + bzbz_zr[3] = 1.224744871391589*bzbz[7]+0.7071067811865475*bzbz[4]; } + diff --git a/kernels/maxwell/em_surf_set_bvar_3x_tensor_p2.c b/kernels/maxwell/em_surf_set_bvar_3x_tensor_p2.c index 55feba3f7..4f271fc98 100644 --- a/kernels/maxwell/em_surf_set_bvar_3x_tensor_p2.c +++ b/kernels/maxwell/em_surf_set_bvar_3x_tensor_p2.c @@ -1,2929 +1,267 @@ -#include #include -#include -GKYL_CU_DH void em_surf_set_bvar_3x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf) +GKYL_CU_DH void em_surf_set_bvar_3x_tensor_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf) { - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // BB_surf: Surface B_i B_j [BxBx_xl, BxBx_xr, ByBy_xl, ByBy_xr, BzBz_xl, BzBz_xr, BxBy_xl, BxBy_xr, BxBz_xl, BxBz_xr, - // BxBx_yl, BxBx_yr, ByBy_yl, ByBy_yr, BzBz_yl, BzBz_yr, BxBy_yl, BxBy_yr, ByBz_yl, ByBz_yr, - // BxBx_zl, BxBx_zr, ByBy_zl, ByBy_zr, BzBz_zl, BzBz_zr, BxBz_zl, BxBz_zr, ByBz_zl, ByBz_zr]. - // cell_avg_magB2_surf: Output flag for cell average if 1/|B|^2 at a surface only used cell averages. - - struct gkyl_mat A_bxbx_xl = gkyl_nmat_get(A, count); - struct gkyl_mat A_bxbx_xr = gkyl_nmat_get(A, count+1); - struct gkyl_mat A_bxby_xl = gkyl_nmat_get(A, count+2); - struct gkyl_mat A_bxby_xr = gkyl_nmat_get(A, count+3); - struct gkyl_mat A_bxbz_xl = gkyl_nmat_get(A, count+4); - struct gkyl_mat A_bxbz_xr = gkyl_nmat_get(A, count+5); - struct gkyl_mat rhs_bxbx_xl = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_bxbx_xr = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_bxby_xl = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_bxby_xr = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_bxbz_xl = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_bxbz_xr = gkyl_nmat_get(rhs, count+5); - gkyl_mat_clear(&A_bxbx_xl, 0.0); gkyl_mat_clear(&rhs_bxbx_xl, 0.0); - gkyl_mat_clear(&A_bxbx_xr, 0.0); gkyl_mat_clear(&rhs_bxbx_xr, 0.0); - gkyl_mat_clear(&A_bxby_xl, 0.0); gkyl_mat_clear(&rhs_bxby_xl, 0.0); - gkyl_mat_clear(&A_bxby_xr, 0.0); gkyl_mat_clear(&rhs_bxby_xr, 0.0); - gkyl_mat_clear(&A_bxbz_xl, 0.0); gkyl_mat_clear(&rhs_bxbz_xl, 0.0); - gkyl_mat_clear(&A_bxbz_xr, 0.0); gkyl_mat_clear(&rhs_bxbz_xr, 0.0); - const double *Bx_sq_xl = &BB_surf[0]; - const double *Bx_sq_xr = &BB_surf[9]; - const double *By_sq_xl = &BB_surf[18]; - const double *By_sq_xr = &BB_surf[27]; - const double *Bz_sq_xl = &BB_surf[36]; - const double *Bz_sq_xr = &BB_surf[45]; - const double *B_x_B_y_xl = &BB_surf[54]; - const double *B_x_B_y_xr = &BB_surf[63]; - const double *B_x_B_z_xl = &BB_surf[72]; - const double *B_x_B_z_xr = &BB_surf[81]; - int *cell_avg_magB2_xl = &cell_avg_magB2_surf[0]; - int *cell_avg_magB2_xr = &cell_avg_magB2_surf[1]; - - struct gkyl_mat A_byby_yl = gkyl_nmat_get(A, count+6); - struct gkyl_mat A_byby_yr = gkyl_nmat_get(A, count+7); - struct gkyl_mat A_bxby_yl = gkyl_nmat_get(A, count+8); - struct gkyl_mat A_bxby_yr = gkyl_nmat_get(A, count+9); - struct gkyl_mat A_bybz_yl = gkyl_nmat_get(A, count+10); - struct gkyl_mat A_bybz_yr = gkyl_nmat_get(A, count+11); - struct gkyl_mat rhs_byby_yl = gkyl_nmat_get(rhs, count+6); - struct gkyl_mat rhs_byby_yr = gkyl_nmat_get(rhs, count+7); - struct gkyl_mat rhs_bxby_yl = gkyl_nmat_get(rhs, count+8); - struct gkyl_mat rhs_bxby_yr = gkyl_nmat_get(rhs, count+9); - struct gkyl_mat rhs_bybz_yl = gkyl_nmat_get(rhs, count+10); - struct gkyl_mat rhs_bybz_yr = gkyl_nmat_get(rhs, count+11); - gkyl_mat_clear(&A_byby_yl, 0.0); gkyl_mat_clear(&rhs_byby_yl, 0.0); - gkyl_mat_clear(&A_byby_yr, 0.0); gkyl_mat_clear(&rhs_byby_yr, 0.0); - gkyl_mat_clear(&A_bxby_yl, 0.0); gkyl_mat_clear(&rhs_bxby_yl, 0.0); - gkyl_mat_clear(&A_bxby_yr, 0.0); gkyl_mat_clear(&rhs_bxby_yr, 0.0); - gkyl_mat_clear(&A_bybz_yl, 0.0); gkyl_mat_clear(&rhs_bybz_yl, 0.0); - gkyl_mat_clear(&A_bybz_yr, 0.0); gkyl_mat_clear(&rhs_bybz_yr, 0.0); - const double *Bx_sq_yl = &BB_surf[90]; - const double *Bx_sq_yr = &BB_surf[99]; - const double *By_sq_yl = &BB_surf[108]; - const double *By_sq_yr = &BB_surf[117]; - const double *Bz_sq_yl = &BB_surf[126]; - const double *Bz_sq_yr = &BB_surf[135]; - const double *B_x_B_y_yl = &BB_surf[144]; - const double *B_x_B_y_yr = &BB_surf[153]; - const double *B_y_B_z_yl = &BB_surf[162]; - const double *B_y_B_z_yr = &BB_surf[171]; - int *cell_avg_magB2_yl = &cell_avg_magB2_surf[2]; - int *cell_avg_magB2_yr = &cell_avg_magB2_surf[3]; - - struct gkyl_mat A_bzbz_zl = gkyl_nmat_get(A, count+12); - struct gkyl_mat A_bzbz_zr = gkyl_nmat_get(A, count+13); - struct gkyl_mat A_bxbz_zl = gkyl_nmat_get(A, count+14); - struct gkyl_mat A_bxbz_zr = gkyl_nmat_get(A, count+15); - struct gkyl_mat A_bybz_zl = gkyl_nmat_get(A, count+16); - struct gkyl_mat A_bybz_zr = gkyl_nmat_get(A, count+17); - struct gkyl_mat rhs_bzbz_zl = gkyl_nmat_get(rhs, count+12); - struct gkyl_mat rhs_bzbz_zr = gkyl_nmat_get(rhs, count+13); - struct gkyl_mat rhs_bxbz_zl = gkyl_nmat_get(rhs, count+14); - struct gkyl_mat rhs_bxbz_zr = gkyl_nmat_get(rhs, count+15); - struct gkyl_mat rhs_bybz_zl = gkyl_nmat_get(rhs, count+16); - struct gkyl_mat rhs_bybz_zr = gkyl_nmat_get(rhs, count+17); - gkyl_mat_clear(&A_bzbz_zl, 0.0); gkyl_mat_clear(&rhs_bzbz_zl, 0.0); - gkyl_mat_clear(&A_bzbz_zr, 0.0); gkyl_mat_clear(&rhs_bzbz_zr, 0.0); - gkyl_mat_clear(&A_bxbz_zl, 0.0); gkyl_mat_clear(&rhs_bxbz_zl, 0.0); - gkyl_mat_clear(&A_bxbz_zr, 0.0); gkyl_mat_clear(&rhs_bxbz_zr, 0.0); - gkyl_mat_clear(&A_bybz_zl, 0.0); gkyl_mat_clear(&rhs_bybz_zl, 0.0); - gkyl_mat_clear(&A_bybz_zr, 0.0); gkyl_mat_clear(&rhs_bybz_zr, 0.0); - const double *Bx_sq_zl = &BB_surf[180]; - const double *Bx_sq_zr = &BB_surf[189]; - const double *By_sq_zl = &BB_surf[198]; - const double *By_sq_zr = &BB_surf[207]; - const double *Bz_sq_zl = &BB_surf[216]; - const double *Bz_sq_zr = &BB_surf[225]; - const double *B_x_B_z_zl = &BB_surf[234]; - const double *B_x_B_z_zr = &BB_surf[243]; - const double *B_y_B_z_zl = &BB_surf[252]; - const double *B_y_B_z_zr = &BB_surf[261]; - int *cell_avg_magB2_zl = &cell_avg_magB2_surf[4]; - int *cell_avg_magB2_zr = &cell_avg_magB2_surf[5]; - - double magB2_xl[9] = {0.0}; - double magB2_xr[9] = {0.0}; - double magB2_yl[9] = {0.0}; - double magB2_yr[9] = {0.0}; - double magB2_zl[9] = {0.0}; - double magB2_zr[9] = {0.0}; - magB2_xl[0] = Bx_sq_xl[0] + By_sq_xl[0] + Bz_sq_xl[0]; - magB2_xr[0] = Bx_sq_xr[0] + By_sq_xr[0] + Bz_sq_xr[0]; - magB2_yl[0] = Bx_sq_yl[0] + By_sq_yl[0] + Bz_sq_yl[0]; - magB2_yr[0] = Bx_sq_yr[0] + By_sq_yr[0] + Bz_sq_yr[0]; - magB2_zl[0] = Bx_sq_zl[0] + By_sq_zl[0] + Bz_sq_zl[0]; - magB2_zr[0] = Bx_sq_zr[0] + By_sq_zr[0] + Bz_sq_zr[0]; - magB2_xl[1] = Bx_sq_xl[1] + By_sq_xl[1] + Bz_sq_xl[1]; - magB2_xr[1] = Bx_sq_xr[1] + By_sq_xr[1] + Bz_sq_xr[1]; - magB2_yl[1] = Bx_sq_yl[1] + By_sq_yl[1] + Bz_sq_yl[1]; - magB2_yr[1] = Bx_sq_yr[1] + By_sq_yr[1] + Bz_sq_yr[1]; - magB2_zl[1] = Bx_sq_zl[1] + By_sq_zl[1] + Bz_sq_zl[1]; - magB2_zr[1] = Bx_sq_zr[1] + By_sq_zr[1] + Bz_sq_zr[1]; - magB2_xl[2] = Bx_sq_xl[2] + By_sq_xl[2] + Bz_sq_xl[2]; - magB2_xr[2] = Bx_sq_xr[2] + By_sq_xr[2] + Bz_sq_xr[2]; - magB2_yl[2] = Bx_sq_yl[2] + By_sq_yl[2] + Bz_sq_yl[2]; - magB2_yr[2] = Bx_sq_yr[2] + By_sq_yr[2] + Bz_sq_yr[2]; - magB2_zl[2] = Bx_sq_zl[2] + By_sq_zl[2] + Bz_sq_zl[2]; - magB2_zr[2] = Bx_sq_zr[2] + By_sq_zr[2] + Bz_sq_zr[2]; - magB2_xl[3] = Bx_sq_xl[3] + By_sq_xl[3] + Bz_sq_xl[3]; - magB2_xr[3] = Bx_sq_xr[3] + By_sq_xr[3] + Bz_sq_xr[3]; - magB2_yl[3] = Bx_sq_yl[3] + By_sq_yl[3] + Bz_sq_yl[3]; - magB2_yr[3] = Bx_sq_yr[3] + By_sq_yr[3] + Bz_sq_yr[3]; - magB2_zl[3] = Bx_sq_zl[3] + By_sq_zl[3] + Bz_sq_zl[3]; - magB2_zr[3] = Bx_sq_zr[3] + By_sq_zr[3] + Bz_sq_zr[3]; - magB2_xl[4] = Bx_sq_xl[4] + By_sq_xl[4] + Bz_sq_xl[4]; - magB2_xr[4] = Bx_sq_xr[4] + By_sq_xr[4] + Bz_sq_xr[4]; - magB2_yl[4] = Bx_sq_yl[4] + By_sq_yl[4] + Bz_sq_yl[4]; - magB2_yr[4] = Bx_sq_yr[4] + By_sq_yr[4] + Bz_sq_yr[4]; - magB2_zl[4] = Bx_sq_zl[4] + By_sq_zl[4] + Bz_sq_zl[4]; - magB2_zr[4] = Bx_sq_zr[4] + By_sq_zr[4] + Bz_sq_zr[4]; - magB2_xl[5] = Bx_sq_xl[5] + By_sq_xl[5] + Bz_sq_xl[5]; - magB2_xr[5] = Bx_sq_xr[5] + By_sq_xr[5] + Bz_sq_xr[5]; - magB2_yl[5] = Bx_sq_yl[5] + By_sq_yl[5] + Bz_sq_yl[5]; - magB2_yr[5] = Bx_sq_yr[5] + By_sq_yr[5] + Bz_sq_yr[5]; - magB2_zl[5] = Bx_sq_zl[5] + By_sq_zl[5] + Bz_sq_zl[5]; - magB2_zr[5] = Bx_sq_zr[5] + By_sq_zr[5] + Bz_sq_zr[5]; - magB2_xl[6] = Bx_sq_xl[6] + By_sq_xl[6] + Bz_sq_xl[6]; - magB2_xr[6] = Bx_sq_xr[6] + By_sq_xr[6] + Bz_sq_xr[6]; - magB2_yl[6] = Bx_sq_yl[6] + By_sq_yl[6] + Bz_sq_yl[6]; - magB2_yr[6] = Bx_sq_yr[6] + By_sq_yr[6] + Bz_sq_yr[6]; - magB2_zl[6] = Bx_sq_zl[6] + By_sq_zl[6] + Bz_sq_zl[6]; - magB2_zr[6] = Bx_sq_zr[6] + By_sq_zr[6] + Bz_sq_zr[6]; - magB2_xl[7] = Bx_sq_xl[7] + By_sq_xl[7] + Bz_sq_xl[7]; - magB2_xr[7] = Bx_sq_xr[7] + By_sq_xr[7] + Bz_sq_xr[7]; - magB2_yl[7] = Bx_sq_yl[7] + By_sq_yl[7] + Bz_sq_yl[7]; - magB2_yr[7] = Bx_sq_yr[7] + By_sq_yr[7] + Bz_sq_yr[7]; - magB2_zl[7] = Bx_sq_zl[7] + By_sq_zl[7] + Bz_sq_zl[7]; - magB2_zr[7] = Bx_sq_zr[7] + By_sq_zr[7] + Bz_sq_zr[7]; - magB2_xl[8] = Bx_sq_xl[8] + By_sq_xl[8] + Bz_sq_xl[8]; - magB2_xr[8] = Bx_sq_xr[8] + By_sq_xr[8] + Bz_sq_xr[8]; - magB2_yl[8] = Bx_sq_yl[8] + By_sq_yl[8] + Bz_sq_yl[8]; - magB2_yr[8] = Bx_sq_yr[8] + By_sq_yr[8] + Bz_sq_yr[8]; - magB2_zl[8] = Bx_sq_zl[8] + By_sq_zl[8] + Bz_sq_zl[8]; - magB2_zr[8] = Bx_sq_zr[8] + By_sq_zr[8] + Bz_sq_zr[8]; - // If |B|^2 < 0 at control points along a surface, only use cell average to get 1/|B|^2. - // Each surface is checked independently. - int cell_avg_xl = 0; - int cell_avg_xr = 0; - int cell_avg_yl = 0; - int cell_avg_yr = 0; - int cell_avg_zl = 0; - int cell_avg_zr = 0; - - if (2.5*magB2_xl[8]-1.936491673103709*magB2_xl[7]-1.936491673103709*magB2_xl[6]+1.118033988749895*magB2_xl[5]+1.118033988749895*magB2_xl[4]+1.5*magB2_xl[3]-0.8660254037844386*magB2_xl[2]-0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (2.5*magB2_xr[8]-1.936491673103709*magB2_xr[7]-1.936491673103709*magB2_xr[6]+1.118033988749895*magB2_xr[5]+1.118033988749895*magB2_xr[4]+1.5*magB2_xr[3]-0.8660254037844386*magB2_xr[2]-0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (2.5*magB2_yl[8]-1.936491673103709*magB2_yl[7]-1.936491673103709*magB2_yl[6]+1.118033988749895*magB2_yl[5]+1.118033988749895*magB2_yl[4]+1.5*magB2_yl[3]-0.8660254037844386*magB2_yl[2]-0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (2.5*magB2_yr[8]-1.936491673103709*magB2_yr[7]-1.936491673103709*magB2_yr[6]+1.118033988749895*magB2_yr[5]+1.118033988749895*magB2_yr[4]+1.5*magB2_yr[3]-0.8660254037844386*magB2_yr[2]-0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if (2.5*magB2_zl[8]-1.936491673103709*magB2_zl[7]-1.936491673103709*magB2_zl[6]+1.118033988749895*magB2_zl[5]+1.118033988749895*magB2_zl[4]+1.5*magB2_zl[3]-0.8660254037844386*magB2_zl[2]-0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if (2.5*magB2_zr[8]-1.936491673103709*magB2_zr[7]-1.936491673103709*magB2_zr[6]+1.118033988749895*magB2_zr[5]+1.118033988749895*magB2_zr[4]+1.5*magB2_zr[3]-0.8660254037844386*magB2_zr[2]-0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if ((-1.25*magB2_xl[8])+0.9682458365518543*magB2_xl[6]+1.118033988749895*magB2_xl[5]-0.5590169943749475*magB2_xl[4]-0.8660254037844386*magB2_xl[2]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if ((-1.25*magB2_xr[8])+0.9682458365518543*magB2_xr[6]+1.118033988749895*magB2_xr[5]-0.5590169943749475*magB2_xr[4]-0.8660254037844386*magB2_xr[2]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if ((-1.25*magB2_yl[8])+0.9682458365518543*magB2_yl[6]+1.118033988749895*magB2_yl[5]-0.5590169943749475*magB2_yl[4]-0.8660254037844386*magB2_yl[2]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if ((-1.25*magB2_yr[8])+0.9682458365518543*magB2_yr[6]+1.118033988749895*magB2_yr[5]-0.5590169943749475*magB2_yr[4]-0.8660254037844386*magB2_yr[2]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if ((-1.25*magB2_zl[8])+0.9682458365518543*magB2_zl[6]+1.118033988749895*magB2_zl[5]-0.5590169943749475*magB2_zl[4]-0.8660254037844386*magB2_zl[2]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if ((-1.25*magB2_zr[8])+0.9682458365518543*magB2_zr[6]+1.118033988749895*magB2_zr[5]-0.5590169943749475*magB2_zr[4]-0.8660254037844386*magB2_zr[2]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if (2.5*magB2_xl[8]+1.936491673103709*magB2_xl[7]-1.936491673103709*magB2_xl[6]+1.118033988749895*magB2_xl[5]+1.118033988749895*magB2_xl[4]-1.5*magB2_xl[3]-0.8660254037844386*magB2_xl[2]+0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (2.5*magB2_xr[8]+1.936491673103709*magB2_xr[7]-1.936491673103709*magB2_xr[6]+1.118033988749895*magB2_xr[5]+1.118033988749895*magB2_xr[4]-1.5*magB2_xr[3]-0.8660254037844386*magB2_xr[2]+0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (2.5*magB2_yl[8]+1.936491673103709*magB2_yl[7]-1.936491673103709*magB2_yl[6]+1.118033988749895*magB2_yl[5]+1.118033988749895*magB2_yl[4]-1.5*magB2_yl[3]-0.8660254037844386*magB2_yl[2]+0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (2.5*magB2_yr[8]+1.936491673103709*magB2_yr[7]-1.936491673103709*magB2_yr[6]+1.118033988749895*magB2_yr[5]+1.118033988749895*magB2_yr[4]-1.5*magB2_yr[3]-0.8660254037844386*magB2_yr[2]+0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if (2.5*magB2_zl[8]+1.936491673103709*magB2_zl[7]-1.936491673103709*magB2_zl[6]+1.118033988749895*magB2_zl[5]+1.118033988749895*magB2_zl[4]-1.5*magB2_zl[3]-0.8660254037844386*magB2_zl[2]+0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if (2.5*magB2_zr[8]+1.936491673103709*magB2_zr[7]-1.936491673103709*magB2_zr[6]+1.118033988749895*magB2_zr[5]+1.118033988749895*magB2_zr[4]-1.5*magB2_zr[3]-0.8660254037844386*magB2_zr[2]+0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if ((-1.25*magB2_xl[8])+0.9682458365518543*magB2_xl[7]-0.5590169943749475*magB2_xl[5]+1.118033988749895*magB2_xl[4]-0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if ((-1.25*magB2_xr[8])+0.9682458365518543*magB2_xr[7]-0.5590169943749475*magB2_xr[5]+1.118033988749895*magB2_xr[4]-0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if ((-1.25*magB2_yl[8])+0.9682458365518543*magB2_yl[7]-0.5590169943749475*magB2_yl[5]+1.118033988749895*magB2_yl[4]-0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if ((-1.25*magB2_yr[8])+0.9682458365518543*magB2_yr[7]-0.5590169943749475*magB2_yr[5]+1.118033988749895*magB2_yr[4]-0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if ((-1.25*magB2_zl[8])+0.9682458365518543*magB2_zl[7]-0.5590169943749475*magB2_zl[5]+1.118033988749895*magB2_zl[4]-0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if ((-1.25*magB2_zr[8])+0.9682458365518543*magB2_zr[7]-0.5590169943749475*magB2_zr[5]+1.118033988749895*magB2_zr[4]-0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if (0.625*magB2_xl[8]-0.5590169943749475*magB2_xl[5]-0.5590169943749475*magB2_xl[4]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (0.625*magB2_xr[8]-0.5590169943749475*magB2_xr[5]-0.5590169943749475*magB2_xr[4]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (0.625*magB2_yl[8]-0.5590169943749475*magB2_yl[5]-0.5590169943749475*magB2_yl[4]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (0.625*magB2_yr[8]-0.5590169943749475*magB2_yr[5]-0.5590169943749475*magB2_yr[4]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if (0.625*magB2_zl[8]-0.5590169943749475*magB2_zl[5]-0.5590169943749475*magB2_zl[4]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if (0.625*magB2_zr[8]-0.5590169943749475*magB2_zr[5]-0.5590169943749475*magB2_zr[4]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if ((-1.25*magB2_xl[8])-0.9682458365518543*magB2_xl[7]-0.5590169943749475*magB2_xl[5]+1.118033988749895*magB2_xl[4]+0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if ((-1.25*magB2_xr[8])-0.9682458365518543*magB2_xr[7]-0.5590169943749475*magB2_xr[5]+1.118033988749895*magB2_xr[4]+0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if ((-1.25*magB2_yl[8])-0.9682458365518543*magB2_yl[7]-0.5590169943749475*magB2_yl[5]+1.118033988749895*magB2_yl[4]+0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if ((-1.25*magB2_yr[8])-0.9682458365518543*magB2_yr[7]-0.5590169943749475*magB2_yr[5]+1.118033988749895*magB2_yr[4]+0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if ((-1.25*magB2_zl[8])-0.9682458365518543*magB2_zl[7]-0.5590169943749475*magB2_zl[5]+1.118033988749895*magB2_zl[4]+0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if ((-1.25*magB2_zr[8])-0.9682458365518543*magB2_zr[7]-0.5590169943749475*magB2_zr[5]+1.118033988749895*magB2_zr[4]+0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if (2.5*magB2_xl[8]-1.936491673103709*magB2_xl[7]+1.936491673103709*magB2_xl[6]+1.118033988749895*magB2_xl[5]+1.118033988749895*magB2_xl[4]-1.5*magB2_xl[3]+0.8660254037844386*magB2_xl[2]-0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (2.5*magB2_xr[8]-1.936491673103709*magB2_xr[7]+1.936491673103709*magB2_xr[6]+1.118033988749895*magB2_xr[5]+1.118033988749895*magB2_xr[4]-1.5*magB2_xr[3]+0.8660254037844386*magB2_xr[2]-0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (2.5*magB2_yl[8]-1.936491673103709*magB2_yl[7]+1.936491673103709*magB2_yl[6]+1.118033988749895*magB2_yl[5]+1.118033988749895*magB2_yl[4]-1.5*magB2_yl[3]+0.8660254037844386*magB2_yl[2]-0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (2.5*magB2_yr[8]-1.936491673103709*magB2_yr[7]+1.936491673103709*magB2_yr[6]+1.118033988749895*magB2_yr[5]+1.118033988749895*magB2_yr[4]-1.5*magB2_yr[3]+0.8660254037844386*magB2_yr[2]-0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if (2.5*magB2_zl[8]-1.936491673103709*magB2_zl[7]+1.936491673103709*magB2_zl[6]+1.118033988749895*magB2_zl[5]+1.118033988749895*magB2_zl[4]-1.5*magB2_zl[3]+0.8660254037844386*magB2_zl[2]-0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if (2.5*magB2_zr[8]-1.936491673103709*magB2_zr[7]+1.936491673103709*magB2_zr[6]+1.118033988749895*magB2_zr[5]+1.118033988749895*magB2_zr[4]-1.5*magB2_zr[3]+0.8660254037844386*magB2_zr[2]-0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if ((-1.25*magB2_xl[8])-0.9682458365518543*magB2_xl[6]+1.118033988749895*magB2_xl[5]-0.5590169943749475*magB2_xl[4]+0.8660254037844386*magB2_xl[2]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if ((-1.25*magB2_xr[8])-0.9682458365518543*magB2_xr[6]+1.118033988749895*magB2_xr[5]-0.5590169943749475*magB2_xr[4]+0.8660254037844386*magB2_xr[2]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if ((-1.25*magB2_yl[8])-0.9682458365518543*magB2_yl[6]+1.118033988749895*magB2_yl[5]-0.5590169943749475*magB2_yl[4]+0.8660254037844386*magB2_yl[2]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if ((-1.25*magB2_yr[8])-0.9682458365518543*magB2_yr[6]+1.118033988749895*magB2_yr[5]-0.5590169943749475*magB2_yr[4]+0.8660254037844386*magB2_yr[2]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if ((-1.25*magB2_zl[8])-0.9682458365518543*magB2_zl[6]+1.118033988749895*magB2_zl[5]-0.5590169943749475*magB2_zl[4]+0.8660254037844386*magB2_zl[2]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if ((-1.25*magB2_zr[8])-0.9682458365518543*magB2_zr[6]+1.118033988749895*magB2_zr[5]-0.5590169943749475*magB2_zr[4]+0.8660254037844386*magB2_zr[2]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - if (2.5*magB2_xl[8]+1.936491673103709*magB2_xl[7]+1.936491673103709*magB2_xl[6]+1.118033988749895*magB2_xl[5]+1.118033988749895*magB2_xl[4]+1.5*magB2_xl[3]+0.8660254037844386*magB2_xl[2]+0.8660254037844386*magB2_xl[1]+0.5*magB2_xl[0] < 0.0) cell_avg_xl = 1; - if (2.5*magB2_xr[8]+1.936491673103709*magB2_xr[7]+1.936491673103709*magB2_xr[6]+1.118033988749895*magB2_xr[5]+1.118033988749895*magB2_xr[4]+1.5*magB2_xr[3]+0.8660254037844386*magB2_xr[2]+0.8660254037844386*magB2_xr[1]+0.5*magB2_xr[0] < 0.0) cell_avg_xr = 1; - if (2.5*magB2_yl[8]+1.936491673103709*magB2_yl[7]+1.936491673103709*magB2_yl[6]+1.118033988749895*magB2_yl[5]+1.118033988749895*magB2_yl[4]+1.5*magB2_yl[3]+0.8660254037844386*magB2_yl[2]+0.8660254037844386*magB2_yl[1]+0.5*magB2_yl[0] < 0.0) cell_avg_yl = 1; - if (2.5*magB2_yr[8]+1.936491673103709*magB2_yr[7]+1.936491673103709*magB2_yr[6]+1.118033988749895*magB2_yr[5]+1.118033988749895*magB2_yr[4]+1.5*magB2_yr[3]+0.8660254037844386*magB2_yr[2]+0.8660254037844386*magB2_yr[1]+0.5*magB2_yr[0] < 0.0) cell_avg_yr = 1; - if (2.5*magB2_zl[8]+1.936491673103709*magB2_zl[7]+1.936491673103709*magB2_zl[6]+1.118033988749895*magB2_zl[5]+1.118033988749895*magB2_zl[4]+1.5*magB2_zl[3]+0.8660254037844386*magB2_zl[2]+0.8660254037844386*magB2_zl[1]+0.5*magB2_zl[0] < 0.0) cell_avg_zl = 1; - if (2.5*magB2_zr[8]+1.936491673103709*magB2_zr[7]+1.936491673103709*magB2_zr[6]+1.118033988749895*magB2_zr[5]+1.118033988749895*magB2_zr[4]+1.5*magB2_zr[3]+0.8660254037844386*magB2_zr[2]+0.8660254037844386*magB2_zr[1]+0.5*magB2_zr[0] < 0.0) cell_avg_zr = 1; - - cell_avg_magB2_xl[0] = cell_avg_xl; - cell_avg_magB2_xr[0] = cell_avg_xr; - cell_avg_magB2_yl[0] = cell_avg_yl; - cell_avg_magB2_yr[0] = cell_avg_yr; - cell_avg_magB2_zl[0] = cell_avg_zl; - cell_avg_magB2_zr[0] = cell_avg_zr; - - if (cell_avg_xl) { - magB2_xl[1] = 0.0; - magB2_xl[2] = 0.0; - magB2_xl[3] = 0.0; - magB2_xl[4] = 0.0; - magB2_xl[5] = 0.0; - magB2_xl[6] = 0.0; - magB2_xl[7] = 0.0; - magB2_xl[8] = 0.0; - } - - if (cell_avg_xr) { - magB2_xr[1] = 0.0; - magB2_xr[2] = 0.0; - magB2_xr[3] = 0.0; - magB2_xr[4] = 0.0; - magB2_xr[5] = 0.0; - magB2_xr[6] = 0.0; - magB2_xr[7] = 0.0; - magB2_xr[8] = 0.0; - } - - if (cell_avg_yl) { - magB2_yl[1] = 0.0; - magB2_yl[2] = 0.0; - magB2_yl[3] = 0.0; - magB2_yl[4] = 0.0; - magB2_yl[5] = 0.0; - magB2_yl[6] = 0.0; - magB2_yl[7] = 0.0; - magB2_yl[8] = 0.0; - } - - if (cell_avg_yr) { - magB2_yr[1] = 0.0; - magB2_yr[2] = 0.0; - magB2_yr[3] = 0.0; - magB2_yr[4] = 0.0; - magB2_yr[5] = 0.0; - magB2_yr[6] = 0.0; - magB2_yr[7] = 0.0; - magB2_yr[8] = 0.0; - } - - if (cell_avg_zl) { - magB2_zl[1] = 0.0; - magB2_zl[2] = 0.0; - magB2_zl[3] = 0.0; - magB2_zl[4] = 0.0; - magB2_zl[5] = 0.0; - magB2_zl[6] = 0.0; - magB2_zl[7] = 0.0; - magB2_zl[8] = 0.0; - } - - if (cell_avg_zr) { - magB2_zr[1] = 0.0; - magB2_zr[2] = 0.0; - magB2_zr[3] = 0.0; - magB2_zr[4] = 0.0; - magB2_zr[5] = 0.0; - magB2_zr[6] = 0.0; - magB2_zr[7] = 0.0; - magB2_zr[8] = 0.0; - } - - gkyl_mat_set(&rhs_bxbx_xl,0,0,Bx_sq_xl[0]); - gkyl_mat_set(&rhs_bxbx_xr,0,0,Bx_sq_xr[0]); - gkyl_mat_set(&rhs_bxby_xl,0,0,B_x_B_y_xl[0]); - gkyl_mat_set(&rhs_bxby_xr,0,0,B_x_B_y_xr[0]); - gkyl_mat_set(&rhs_bxbz_xl,0,0,B_x_B_z_xl[0]); - gkyl_mat_set(&rhs_bxbz_xr,0,0,B_x_B_z_xr[0]); - - gkyl_mat_set(&rhs_byby_yl,0,0,By_sq_yl[0]); - gkyl_mat_set(&rhs_byby_yr,0,0,By_sq_yr[0]); - gkyl_mat_set(&rhs_bxby_yl,0,0,B_x_B_y_yl[0]); - gkyl_mat_set(&rhs_bxby_yr,0,0,B_x_B_y_yr[0]); - gkyl_mat_set(&rhs_bybz_yl,0,0,B_y_B_z_yl[0]); - gkyl_mat_set(&rhs_bybz_yr,0,0,B_y_B_z_yr[0]); - - gkyl_mat_set(&rhs_bzbz_zl,0,0,Bz_sq_zl[0]); - gkyl_mat_set(&rhs_bzbz_zr,0,0,Bz_sq_zr[0]); - gkyl_mat_set(&rhs_bxbz_zl,0,0,B_x_B_z_zl[0]); - gkyl_mat_set(&rhs_bxbz_zr,0,0,B_x_B_z_zr[0]); - gkyl_mat_set(&rhs_bybz_zl,0,0,B_y_B_z_zl[0]); - gkyl_mat_set(&rhs_bybz_zr,0,0,B_y_B_z_zr[0]); - - gkyl_mat_set(&rhs_bxbx_xl,1,0,Bx_sq_xl[1]); - gkyl_mat_set(&rhs_bxbx_xr,1,0,Bx_sq_xr[1]); - gkyl_mat_set(&rhs_bxby_xl,1,0,B_x_B_y_xl[1]); - gkyl_mat_set(&rhs_bxby_xr,1,0,B_x_B_y_xr[1]); - gkyl_mat_set(&rhs_bxbz_xl,1,0,B_x_B_z_xl[1]); - gkyl_mat_set(&rhs_bxbz_xr,1,0,B_x_B_z_xr[1]); - - gkyl_mat_set(&rhs_byby_yl,1,0,By_sq_yl[1]); - gkyl_mat_set(&rhs_byby_yr,1,0,By_sq_yr[1]); - gkyl_mat_set(&rhs_bxby_yl,1,0,B_x_B_y_yl[1]); - gkyl_mat_set(&rhs_bxby_yr,1,0,B_x_B_y_yr[1]); - gkyl_mat_set(&rhs_bybz_yl,1,0,B_y_B_z_yl[1]); - gkyl_mat_set(&rhs_bybz_yr,1,0,B_y_B_z_yr[1]); - - gkyl_mat_set(&rhs_bzbz_zl,1,0,Bz_sq_zl[1]); - gkyl_mat_set(&rhs_bzbz_zr,1,0,Bz_sq_zr[1]); - gkyl_mat_set(&rhs_bxbz_zl,1,0,B_x_B_z_zl[1]); - gkyl_mat_set(&rhs_bxbz_zr,1,0,B_x_B_z_zr[1]); - gkyl_mat_set(&rhs_bybz_zl,1,0,B_y_B_z_zl[1]); - gkyl_mat_set(&rhs_bybz_zr,1,0,B_y_B_z_zr[1]); - - gkyl_mat_set(&rhs_bxbx_xl,2,0,Bx_sq_xl[2]); - gkyl_mat_set(&rhs_bxbx_xr,2,0,Bx_sq_xr[2]); - gkyl_mat_set(&rhs_bxby_xl,2,0,B_x_B_y_xl[2]); - gkyl_mat_set(&rhs_bxby_xr,2,0,B_x_B_y_xr[2]); - gkyl_mat_set(&rhs_bxbz_xl,2,0,B_x_B_z_xl[2]); - gkyl_mat_set(&rhs_bxbz_xr,2,0,B_x_B_z_xr[2]); - - gkyl_mat_set(&rhs_byby_yl,2,0,By_sq_yl[2]); - gkyl_mat_set(&rhs_byby_yr,2,0,By_sq_yr[2]); - gkyl_mat_set(&rhs_bxby_yl,2,0,B_x_B_y_yl[2]); - gkyl_mat_set(&rhs_bxby_yr,2,0,B_x_B_y_yr[2]); - gkyl_mat_set(&rhs_bybz_yl,2,0,B_y_B_z_yl[2]); - gkyl_mat_set(&rhs_bybz_yr,2,0,B_y_B_z_yr[2]); - - gkyl_mat_set(&rhs_bzbz_zl,2,0,Bz_sq_zl[2]); - gkyl_mat_set(&rhs_bzbz_zr,2,0,Bz_sq_zr[2]); - gkyl_mat_set(&rhs_bxbz_zl,2,0,B_x_B_z_zl[2]); - gkyl_mat_set(&rhs_bxbz_zr,2,0,B_x_B_z_zr[2]); - gkyl_mat_set(&rhs_bybz_zl,2,0,B_y_B_z_zl[2]); - gkyl_mat_set(&rhs_bybz_zr,2,0,B_y_B_z_zr[2]); - - gkyl_mat_set(&rhs_bxbx_xl,3,0,Bx_sq_xl[3]); - gkyl_mat_set(&rhs_bxbx_xr,3,0,Bx_sq_xr[3]); - gkyl_mat_set(&rhs_bxby_xl,3,0,B_x_B_y_xl[3]); - gkyl_mat_set(&rhs_bxby_xr,3,0,B_x_B_y_xr[3]); - gkyl_mat_set(&rhs_bxbz_xl,3,0,B_x_B_z_xl[3]); - gkyl_mat_set(&rhs_bxbz_xr,3,0,B_x_B_z_xr[3]); - - gkyl_mat_set(&rhs_byby_yl,3,0,By_sq_yl[3]); - gkyl_mat_set(&rhs_byby_yr,3,0,By_sq_yr[3]); - gkyl_mat_set(&rhs_bxby_yl,3,0,B_x_B_y_yl[3]); - gkyl_mat_set(&rhs_bxby_yr,3,0,B_x_B_y_yr[3]); - gkyl_mat_set(&rhs_bybz_yl,3,0,B_y_B_z_yl[3]); - gkyl_mat_set(&rhs_bybz_yr,3,0,B_y_B_z_yr[3]); - - gkyl_mat_set(&rhs_bzbz_zl,3,0,Bz_sq_zl[3]); - gkyl_mat_set(&rhs_bzbz_zr,3,0,Bz_sq_zr[3]); - gkyl_mat_set(&rhs_bxbz_zl,3,0,B_x_B_z_zl[3]); - gkyl_mat_set(&rhs_bxbz_zr,3,0,B_x_B_z_zr[3]); - gkyl_mat_set(&rhs_bybz_zl,3,0,B_y_B_z_zl[3]); - gkyl_mat_set(&rhs_bybz_zr,3,0,B_y_B_z_zr[3]); - - gkyl_mat_set(&rhs_bxbx_xl,4,0,Bx_sq_xl[4]); - gkyl_mat_set(&rhs_bxbx_xr,4,0,Bx_sq_xr[4]); - gkyl_mat_set(&rhs_bxby_xl,4,0,B_x_B_y_xl[4]); - gkyl_mat_set(&rhs_bxby_xr,4,0,B_x_B_y_xr[4]); - gkyl_mat_set(&rhs_bxbz_xl,4,0,B_x_B_z_xl[4]); - gkyl_mat_set(&rhs_bxbz_xr,4,0,B_x_B_z_xr[4]); - - gkyl_mat_set(&rhs_byby_yl,4,0,By_sq_yl[4]); - gkyl_mat_set(&rhs_byby_yr,4,0,By_sq_yr[4]); - gkyl_mat_set(&rhs_bxby_yl,4,0,B_x_B_y_yl[4]); - gkyl_mat_set(&rhs_bxby_yr,4,0,B_x_B_y_yr[4]); - gkyl_mat_set(&rhs_bybz_yl,4,0,B_y_B_z_yl[4]); - gkyl_mat_set(&rhs_bybz_yr,4,0,B_y_B_z_yr[4]); - - gkyl_mat_set(&rhs_bzbz_zl,4,0,Bz_sq_zl[4]); - gkyl_mat_set(&rhs_bzbz_zr,4,0,Bz_sq_zr[4]); - gkyl_mat_set(&rhs_bxbz_zl,4,0,B_x_B_z_zl[4]); - gkyl_mat_set(&rhs_bxbz_zr,4,0,B_x_B_z_zr[4]); - gkyl_mat_set(&rhs_bybz_zl,4,0,B_y_B_z_zl[4]); - gkyl_mat_set(&rhs_bybz_zr,4,0,B_y_B_z_zr[4]); - - gkyl_mat_set(&rhs_bxbx_xl,5,0,Bx_sq_xl[5]); - gkyl_mat_set(&rhs_bxbx_xr,5,0,Bx_sq_xr[5]); - gkyl_mat_set(&rhs_bxby_xl,5,0,B_x_B_y_xl[5]); - gkyl_mat_set(&rhs_bxby_xr,5,0,B_x_B_y_xr[5]); - gkyl_mat_set(&rhs_bxbz_xl,5,0,B_x_B_z_xl[5]); - gkyl_mat_set(&rhs_bxbz_xr,5,0,B_x_B_z_xr[5]); - - gkyl_mat_set(&rhs_byby_yl,5,0,By_sq_yl[5]); - gkyl_mat_set(&rhs_byby_yr,5,0,By_sq_yr[5]); - gkyl_mat_set(&rhs_bxby_yl,5,0,B_x_B_y_yl[5]); - gkyl_mat_set(&rhs_bxby_yr,5,0,B_x_B_y_yr[5]); - gkyl_mat_set(&rhs_bybz_yl,5,0,B_y_B_z_yl[5]); - gkyl_mat_set(&rhs_bybz_yr,5,0,B_y_B_z_yr[5]); - - gkyl_mat_set(&rhs_bzbz_zl,5,0,Bz_sq_zl[5]); - gkyl_mat_set(&rhs_bzbz_zr,5,0,Bz_sq_zr[5]); - gkyl_mat_set(&rhs_bxbz_zl,5,0,B_x_B_z_zl[5]); - gkyl_mat_set(&rhs_bxbz_zr,5,0,B_x_B_z_zr[5]); - gkyl_mat_set(&rhs_bybz_zl,5,0,B_y_B_z_zl[5]); - gkyl_mat_set(&rhs_bybz_zr,5,0,B_y_B_z_zr[5]); - - gkyl_mat_set(&rhs_bxbx_xl,6,0,Bx_sq_xl[6]); - gkyl_mat_set(&rhs_bxbx_xr,6,0,Bx_sq_xr[6]); - gkyl_mat_set(&rhs_bxby_xl,6,0,B_x_B_y_xl[6]); - gkyl_mat_set(&rhs_bxby_xr,6,0,B_x_B_y_xr[6]); - gkyl_mat_set(&rhs_bxbz_xl,6,0,B_x_B_z_xl[6]); - gkyl_mat_set(&rhs_bxbz_xr,6,0,B_x_B_z_xr[6]); - - gkyl_mat_set(&rhs_byby_yl,6,0,By_sq_yl[6]); - gkyl_mat_set(&rhs_byby_yr,6,0,By_sq_yr[6]); - gkyl_mat_set(&rhs_bxby_yl,6,0,B_x_B_y_yl[6]); - gkyl_mat_set(&rhs_bxby_yr,6,0,B_x_B_y_yr[6]); - gkyl_mat_set(&rhs_bybz_yl,6,0,B_y_B_z_yl[6]); - gkyl_mat_set(&rhs_bybz_yr,6,0,B_y_B_z_yr[6]); - - gkyl_mat_set(&rhs_bzbz_zl,6,0,Bz_sq_zl[6]); - gkyl_mat_set(&rhs_bzbz_zr,6,0,Bz_sq_zr[6]); - gkyl_mat_set(&rhs_bxbz_zl,6,0,B_x_B_z_zl[6]); - gkyl_mat_set(&rhs_bxbz_zr,6,0,B_x_B_z_zr[6]); - gkyl_mat_set(&rhs_bybz_zl,6,0,B_y_B_z_zl[6]); - gkyl_mat_set(&rhs_bybz_zr,6,0,B_y_B_z_zr[6]); - - gkyl_mat_set(&rhs_bxbx_xl,7,0,Bx_sq_xl[7]); - gkyl_mat_set(&rhs_bxbx_xr,7,0,Bx_sq_xr[7]); - gkyl_mat_set(&rhs_bxby_xl,7,0,B_x_B_y_xl[7]); - gkyl_mat_set(&rhs_bxby_xr,7,0,B_x_B_y_xr[7]); - gkyl_mat_set(&rhs_bxbz_xl,7,0,B_x_B_z_xl[7]); - gkyl_mat_set(&rhs_bxbz_xr,7,0,B_x_B_z_xr[7]); - - gkyl_mat_set(&rhs_byby_yl,7,0,By_sq_yl[7]); - gkyl_mat_set(&rhs_byby_yr,7,0,By_sq_yr[7]); - gkyl_mat_set(&rhs_bxby_yl,7,0,B_x_B_y_yl[7]); - gkyl_mat_set(&rhs_bxby_yr,7,0,B_x_B_y_yr[7]); - gkyl_mat_set(&rhs_bybz_yl,7,0,B_y_B_z_yl[7]); - gkyl_mat_set(&rhs_bybz_yr,7,0,B_y_B_z_yr[7]); - - gkyl_mat_set(&rhs_bzbz_zl,7,0,Bz_sq_zl[7]); - gkyl_mat_set(&rhs_bzbz_zr,7,0,Bz_sq_zr[7]); - gkyl_mat_set(&rhs_bxbz_zl,7,0,B_x_B_z_zl[7]); - gkyl_mat_set(&rhs_bxbz_zr,7,0,B_x_B_z_zr[7]); - gkyl_mat_set(&rhs_bybz_zl,7,0,B_y_B_z_zl[7]); - gkyl_mat_set(&rhs_bybz_zr,7,0,B_y_B_z_zr[7]); - - gkyl_mat_set(&rhs_bxbx_xl,8,0,Bx_sq_xl[8]); - gkyl_mat_set(&rhs_bxbx_xr,8,0,Bx_sq_xr[8]); - gkyl_mat_set(&rhs_bxby_xl,8,0,B_x_B_y_xl[8]); - gkyl_mat_set(&rhs_bxby_xr,8,0,B_x_B_y_xr[8]); - gkyl_mat_set(&rhs_bxbz_xl,8,0,B_x_B_z_xl[8]); - gkyl_mat_set(&rhs_bxbz_xr,8,0,B_x_B_z_xr[8]); - - gkyl_mat_set(&rhs_byby_yl,8,0,By_sq_yl[8]); - gkyl_mat_set(&rhs_byby_yr,8,0,By_sq_yr[8]); - gkyl_mat_set(&rhs_bxby_yl,8,0,B_x_B_y_yl[8]); - gkyl_mat_set(&rhs_bxby_yr,8,0,B_x_B_y_yr[8]); - gkyl_mat_set(&rhs_bybz_yl,8,0,B_y_B_z_yl[8]); - gkyl_mat_set(&rhs_bybz_yr,8,0,B_y_B_z_yr[8]); - - gkyl_mat_set(&rhs_bzbz_zl,8,0,Bz_sq_zl[8]); - gkyl_mat_set(&rhs_bzbz_zr,8,0,Bz_sq_zr[8]); - gkyl_mat_set(&rhs_bxbz_zl,8,0,B_x_B_z_zl[8]); - gkyl_mat_set(&rhs_bxbz_zr,8,0,B_x_B_z_zr[8]); - gkyl_mat_set(&rhs_bybz_zl,8,0,B_y_B_z_zl[8]); - gkyl_mat_set(&rhs_bybz_zr,8,0,B_y_B_z_zr[8]); - - double temp_magB2_xl = 0.0; - double temp_magB2_xr = 0.0; - double temp_magB2_yl = 0.0; - double temp_magB2_yr = 0.0; - double temp_magB2_zl = 0.0; - double temp_magB2_zr = 0.0; - temp_magB2_xl = 0.5*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,0,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,0,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,0,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,0,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,0,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,0,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,0,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,0,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[0]; - gkyl_mat_set(&A_bzbz_zl,0,0,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,0,0,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,0,0,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[0]; - gkyl_mat_set(&A_bzbz_zr,0,0,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,0,0,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,0,0,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,0,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,1,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,0,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,1,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,0,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,1,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,0,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,1,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,0,1,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,0,1,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,0,1,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,0,1,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,0,1,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,0,1,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,0,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,2,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,0,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,2,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,0,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,2,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,0,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,2,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,0,2,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,0,2,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,0,2,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,0,2,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,0,2,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,0,2,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,0,3,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,3,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,3,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,0,3,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,3,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,3,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,0,3,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,3,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,3,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,0,3,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,3,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,3,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,0,3,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,0,3,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,0,3,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,0,3,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,0,3,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,0,3,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[4]; - gkyl_mat_set(&A_bxbx_xl,0,4,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,4,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,4,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[4]; - gkyl_mat_set(&A_bxbx_xr,0,4,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,4,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,4,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[4]; - gkyl_mat_set(&A_byby_yl,0,4,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,4,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,4,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[4]; - gkyl_mat_set(&A_byby_yr,0,4,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,4,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,4,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[4]; - gkyl_mat_set(&A_bzbz_zl,0,4,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,0,4,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,0,4,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[4]; - gkyl_mat_set(&A_bzbz_zr,0,4,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,0,4,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,0,4,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[5]; - gkyl_mat_set(&A_bxbx_xl,0,5,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,5,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,5,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[5]; - gkyl_mat_set(&A_bxbx_xr,0,5,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,5,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,5,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[5]; - gkyl_mat_set(&A_byby_yl,0,5,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,5,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,5,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[5]; - gkyl_mat_set(&A_byby_yr,0,5,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,5,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,5,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[5]; - gkyl_mat_set(&A_bzbz_zl,0,5,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,0,5,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,0,5,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[5]; - gkyl_mat_set(&A_bzbz_zr,0,5,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,0,5,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,0,5,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[6]; - gkyl_mat_set(&A_bxbx_xl,0,6,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,6,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,6,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[6]; - gkyl_mat_set(&A_bxbx_xr,0,6,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,6,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,6,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[6]; - gkyl_mat_set(&A_byby_yl,0,6,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,6,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,6,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[6]; - gkyl_mat_set(&A_byby_yr,0,6,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,6,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,6,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[6]; - gkyl_mat_set(&A_bzbz_zl,0,6,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,0,6,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,0,6,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[6]; - gkyl_mat_set(&A_bzbz_zr,0,6,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,0,6,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,0,6,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[7]; - gkyl_mat_set(&A_bxbx_xl,0,7,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,7,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,7,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[7]; - gkyl_mat_set(&A_bxbx_xr,0,7,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,7,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,7,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[7]; - gkyl_mat_set(&A_byby_yl,0,7,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,7,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,7,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[7]; - gkyl_mat_set(&A_byby_yr,0,7,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,7,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,7,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[7]; - gkyl_mat_set(&A_bzbz_zl,0,7,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,0,7,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,0,7,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[7]; - gkyl_mat_set(&A_bzbz_zr,0,7,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,0,7,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,0,7,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[8]; - gkyl_mat_set(&A_bxbx_xl,0,8,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,0,8,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,0,8,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[8]; - gkyl_mat_set(&A_bxbx_xr,0,8,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,0,8,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,0,8,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[8]; - gkyl_mat_set(&A_byby_yl,0,8,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,0,8,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,0,8,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[8]; - gkyl_mat_set(&A_byby_yr,0,8,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,0,8,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,0,8,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[8]; - gkyl_mat_set(&A_bzbz_zl,0,8,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,0,8,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,0,8,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[8]; - gkyl_mat_set(&A_bzbz_zr,0,8,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,0,8,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,0,8,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,1,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,0,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,1,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,0,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,1,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,0,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,1,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,0,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,1,0,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,1,0,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,1,0,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,1,0,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,1,0,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,1,0,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[4]+0.5*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,1,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,1,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[4]+0.5*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,1,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,1,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[4]+0.5*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,1,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,1,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[4]+0.5*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,1,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,1,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[4]+0.5*magB2_zl[0]; - gkyl_mat_set(&A_bzbz_zl,1,1,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,1,1,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,1,1,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[4]+0.5*magB2_zr[0]; - gkyl_mat_set(&A_bzbz_zr,1,1,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,1,1,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,1,1,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,1,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,2,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,1,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,2,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,1,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,2,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,1,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,2,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,1,2,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,1,2,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,1,2,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,1,2,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,1,2,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,1,2,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[6]+0.5*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,1,3,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,3,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,3,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[6]+0.5*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,1,3,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,3,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,3,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[6]+0.5*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,1,3,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,3,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,3,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[6]+0.5*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,1,3,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,3,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,3,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[6]+0.5*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,1,3,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,1,3,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,1,3,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[6]+0.5*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,1,3,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,1,3,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,1,3,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,1,4,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,4,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,4,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,1,4,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,4,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,4,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,1,4,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,4,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,4,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,1,4,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,4,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,4,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,1,4,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,1,4,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,1,4,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,1,4,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,1,4,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,1,4,temp_magB2_zr); - - temp_magB2_xl = 0.5000000000000001*magB2_xl[7]; - gkyl_mat_set(&A_bxbx_xl,1,5,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,5,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,5,temp_magB2_xl); - - temp_magB2_xr = 0.5000000000000001*magB2_xr[7]; - gkyl_mat_set(&A_bxbx_xr,1,5,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,5,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,5,temp_magB2_xr); - - temp_magB2_yl = 0.5000000000000001*magB2_yl[7]; - gkyl_mat_set(&A_byby_yl,1,5,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,5,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,5,temp_magB2_yl); - - temp_magB2_yr = 0.5000000000000001*magB2_yr[7]; - gkyl_mat_set(&A_byby_yr,1,5,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,5,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,5,temp_magB2_yr); - - temp_magB2_zl = 0.5000000000000001*magB2_zl[7]; - gkyl_mat_set(&A_bzbz_zl,1,5,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,1,5,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,1,5,temp_magB2_zl); - - temp_magB2_zr = 0.5000000000000001*magB2_zr[7]; - gkyl_mat_set(&A_bzbz_zr,1,5,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,1,5,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,1,5,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,1,6,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,6,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,6,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,1,6,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,6,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,6,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,1,6,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,6,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,6,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,1,6,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,6,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,6,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,1,6,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,1,6,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,1,6,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,1,6,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,1,6,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,1,6,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[8]+0.5000000000000001*magB2_xl[5]; - gkyl_mat_set(&A_bxbx_xl,1,7,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,7,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,7,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[8]+0.5000000000000001*magB2_xr[5]; - gkyl_mat_set(&A_bxbx_xr,1,7,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,7,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,7,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[8]+0.5000000000000001*magB2_yl[5]; - gkyl_mat_set(&A_byby_yl,1,7,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,7,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,7,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[8]+0.5000000000000001*magB2_yr[5]; - gkyl_mat_set(&A_byby_yr,1,7,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,7,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,7,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[8]+0.5000000000000001*magB2_zl[5]; - gkyl_mat_set(&A_bzbz_zl,1,7,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,1,7,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,1,7,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[8]+0.5000000000000001*magB2_zr[5]; - gkyl_mat_set(&A_bzbz_zr,1,7,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,1,7,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,1,7,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[7]; - gkyl_mat_set(&A_bxbx_xl,1,8,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,1,8,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,1,8,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[7]; - gkyl_mat_set(&A_bxbx_xr,1,8,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,1,8,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,1,8,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[7]; - gkyl_mat_set(&A_byby_yl,1,8,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,1,8,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,1,8,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[7]; - gkyl_mat_set(&A_byby_yr,1,8,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,1,8,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,1,8,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[7]; - gkyl_mat_set(&A_bzbz_zl,1,8,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,1,8,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,1,8,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[7]; - gkyl_mat_set(&A_bzbz_zr,1,8,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,1,8,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,1,8,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,2,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,0,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,2,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,0,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,2,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,0,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,2,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,0,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,2,0,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,2,0,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,2,0,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,2,0,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,2,0,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,2,0,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,2,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,1,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,2,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,1,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,2,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,1,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,2,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,1,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,2,1,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,2,1,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,2,1,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,2,1,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,2,1,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,2,1,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[5]+0.5*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,2,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,2,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[5]+0.5*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,2,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,2,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[5]+0.5*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,2,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,2,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[5]+0.5*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,2,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,2,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[5]+0.5*magB2_zl[0]; - gkyl_mat_set(&A_bzbz_zl,2,2,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,2,2,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,2,2,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[5]+0.5*magB2_zr[0]; - gkyl_mat_set(&A_bzbz_zr,2,2,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,2,2,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,2,2,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[7]+0.5*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,2,3,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,3,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,3,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[7]+0.5*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,2,3,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,3,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,3,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[7]+0.5*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,2,3,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,3,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,3,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[7]+0.5*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,2,3,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,3,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,3,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[7]+0.5*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,2,3,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,2,3,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,2,3,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[7]+0.5*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,2,3,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,2,3,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,2,3,temp_magB2_zr); - - temp_magB2_xl = 0.5000000000000001*magB2_xl[6]; - gkyl_mat_set(&A_bxbx_xl,2,4,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,4,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,4,temp_magB2_xl); - - temp_magB2_xr = 0.5000000000000001*magB2_xr[6]; - gkyl_mat_set(&A_bxbx_xr,2,4,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,4,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,4,temp_magB2_xr); - - temp_magB2_yl = 0.5000000000000001*magB2_yl[6]; - gkyl_mat_set(&A_byby_yl,2,4,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,4,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,4,temp_magB2_yl); - - temp_magB2_yr = 0.5000000000000001*magB2_yr[6]; - gkyl_mat_set(&A_byby_yr,2,4,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,4,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,4,temp_magB2_yr); - - temp_magB2_zl = 0.5000000000000001*magB2_zl[6]; - gkyl_mat_set(&A_bzbz_zl,2,4,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,2,4,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,2,4,temp_magB2_zl); - - temp_magB2_zr = 0.5000000000000001*magB2_zr[6]; - gkyl_mat_set(&A_bzbz_zr,2,4,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,2,4,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,2,4,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,2,5,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,5,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,5,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,2,5,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,5,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,5,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,2,5,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,5,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,5,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,2,5,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,5,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,5,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,2,5,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,2,5,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,2,5,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,2,5,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,2,5,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,2,5,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[8]+0.5000000000000001*magB2_xl[4]; - gkyl_mat_set(&A_bxbx_xl,2,6,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,6,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,6,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[8]+0.5000000000000001*magB2_xr[4]; - gkyl_mat_set(&A_bxbx_xr,2,6,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,6,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,6,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[8]+0.5000000000000001*magB2_yl[4]; - gkyl_mat_set(&A_byby_yl,2,6,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,6,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,6,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[8]+0.5000000000000001*magB2_yr[4]; - gkyl_mat_set(&A_byby_yr,2,6,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,6,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,6,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[8]+0.5000000000000001*magB2_zl[4]; - gkyl_mat_set(&A_bzbz_zl,2,6,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,2,6,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,2,6,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[8]+0.5000000000000001*magB2_zr[4]; - gkyl_mat_set(&A_bzbz_zr,2,6,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,2,6,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,2,6,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,2,7,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,7,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,7,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,2,7,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,7,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,7,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,2,7,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,7,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,7,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,2,7,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,7,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,7,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,2,7,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,2,7,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,2,7,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,2,7,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,2,7,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,2,7,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[6]; - gkyl_mat_set(&A_bxbx_xl,2,8,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,2,8,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,2,8,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[6]; - gkyl_mat_set(&A_bxbx_xr,2,8,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,2,8,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,2,8,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[6]; - gkyl_mat_set(&A_byby_yl,2,8,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,2,8,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,2,8,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[6]; - gkyl_mat_set(&A_byby_yr,2,8,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,2,8,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,2,8,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[6]; - gkyl_mat_set(&A_bzbz_zl,2,8,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,2,8,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,2,8,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[6]; - gkyl_mat_set(&A_bzbz_zr,2,8,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,2,8,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,2,8,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,3,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,3,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,3,0,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,3,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,3,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,3,0,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,3,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,3,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,3,0,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,3,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,3,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,3,0,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,3,0,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,3,0,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,3,0,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,3,0,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,3,0,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,3,0,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[6]+0.5*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,3,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,3,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,3,1,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[6]+0.5*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,3,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,3,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,3,1,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[6]+0.5*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,3,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,3,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,3,1,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[6]+0.5*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,3,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,3,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,3,1,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[6]+0.5*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,3,1,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,3,1,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,3,1,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[6]+0.5*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,3,1,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,3,1,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,3,1,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[7]+0.5*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,3,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,3,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,3,2,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[7]+0.5*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,3,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,3,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,3,2,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[7]+0.5*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,3,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,3,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,3,2,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[7]+0.5*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,3,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,3,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,3,2,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[7]+0.5*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,3,2,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,3,2,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,3,2,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[7]+0.5*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,3,2,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,3,2,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,3,2,temp_magB2_zr); - - temp_magB2_xl = 0.4*magB2_xl[8]+0.4472135954999579*magB2_xl[5]+0.4472135954999579*magB2_xl[4]+0.5*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,3,3,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,3,3,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,3,3,temp_magB2_xl); - - temp_magB2_xr = 0.4*magB2_xr[8]+0.4472135954999579*magB2_xr[5]+0.4472135954999579*magB2_xr[4]+0.5*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,3,3,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,3,3,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,3,3,temp_magB2_xr); - - temp_magB2_yl = 0.4*magB2_yl[8]+0.4472135954999579*magB2_yl[5]+0.4472135954999579*magB2_yl[4]+0.5*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,3,3,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,3,3,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,3,3,temp_magB2_yl); - - temp_magB2_yr = 0.4*magB2_yr[8]+0.4472135954999579*magB2_yr[5]+0.4472135954999579*magB2_yr[4]+0.5*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,3,3,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,3,3,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,3,3,temp_magB2_yr); - - temp_magB2_zl = 0.4*magB2_zl[8]+0.4472135954999579*magB2_zl[5]+0.4472135954999579*magB2_zl[4]+0.5*magB2_zl[0]; - gkyl_mat_set(&A_bzbz_zl,3,3,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,3,3,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,3,3,temp_magB2_zl); - - temp_magB2_zr = 0.4*magB2_zr[8]+0.4472135954999579*magB2_zr[5]+0.4472135954999579*magB2_zr[4]+0.5*magB2_zr[0]; - gkyl_mat_set(&A_bzbz_zr,3,3,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,3,3,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,3,3,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,3,4,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,3,4,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,3,4,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,3,4,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,3,4,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,3,4,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,3,4,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,3,4,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,3,4,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,3,4,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,3,4,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,3,4,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,3,4,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,3,4,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,3,4,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,3,4,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,3,4,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,3,4,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,3,5,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,3,5,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,3,5,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,3,5,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,3,5,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,3,5,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,3,5,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,3,5,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,3,5,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,3,5,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,3,5,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,3,5,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,3,5,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,3,5,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,3,5,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,3,5,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,3,5,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,3,5,temp_magB2_zr); - - temp_magB2_xl = 0.4*magB2_xl[7]+0.447213595499958*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,3,6,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,3,6,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,3,6,temp_magB2_xl); - - temp_magB2_xr = 0.4*magB2_xr[7]+0.447213595499958*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,3,6,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,3,6,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,3,6,temp_magB2_xr); - - temp_magB2_yl = 0.4*magB2_yl[7]+0.447213595499958*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,3,6,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,3,6,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,3,6,temp_magB2_yl); - - temp_magB2_yr = 0.4*magB2_yr[7]+0.447213595499958*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,3,6,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,3,6,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,3,6,temp_magB2_yr); - - temp_magB2_zl = 0.4*magB2_zl[7]+0.447213595499958*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,3,6,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,3,6,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,3,6,temp_magB2_zl); - - temp_magB2_zr = 0.4*magB2_zr[7]+0.447213595499958*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,3,6,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,3,6,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,3,6,temp_magB2_zr); - - temp_magB2_xl = 0.4*magB2_xl[6]+0.447213595499958*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,3,7,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,3,7,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,3,7,temp_magB2_xl); - - temp_magB2_xr = 0.4*magB2_xr[6]+0.447213595499958*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,3,7,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,3,7,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,3,7,temp_magB2_xr); - - temp_magB2_yl = 0.4*magB2_yl[6]+0.447213595499958*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,3,7,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,3,7,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,3,7,temp_magB2_yl); - - temp_magB2_yr = 0.4*magB2_yr[6]+0.447213595499958*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,3,7,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,3,7,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,3,7,temp_magB2_yr); - - temp_magB2_zl = 0.4*magB2_zl[6]+0.447213595499958*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,3,7,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,3,7,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,3,7,temp_magB2_zl); - - temp_magB2_zr = 0.4*magB2_zr[6]+0.447213595499958*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,3,7,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,3,7,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,3,7,temp_magB2_zr); - - temp_magB2_xl = 0.4*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,3,8,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,3,8,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,3,8,temp_magB2_xl); - - temp_magB2_xr = 0.4*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,3,8,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,3,8,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,3,8,temp_magB2_xr); - - temp_magB2_yl = 0.4*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,3,8,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,3,8,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,3,8,temp_magB2_yl); - - temp_magB2_yr = 0.4*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,3,8,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,3,8,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,3,8,temp_magB2_yr); - - temp_magB2_zl = 0.4*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,3,8,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,3,8,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,3,8,temp_magB2_zl); - - temp_magB2_zr = 0.4*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,3,8,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,3,8,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,3,8,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[4]; - gkyl_mat_set(&A_bxbx_xl,4,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,4,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,4,0,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[4]; - gkyl_mat_set(&A_bxbx_xr,4,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,4,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,4,0,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[4]; - gkyl_mat_set(&A_byby_yl,4,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,4,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,4,0,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[4]; - gkyl_mat_set(&A_byby_yr,4,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,4,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,4,0,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[4]; - gkyl_mat_set(&A_bzbz_zl,4,0,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,4,0,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,4,0,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[4]; - gkyl_mat_set(&A_bzbz_zr,4,0,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,4,0,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,4,0,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,4,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,4,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,4,1,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,4,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,4,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,4,1,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,4,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,4,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,4,1,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,4,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,4,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,4,1,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,4,1,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,4,1,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,4,1,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,4,1,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,4,1,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,4,1,temp_magB2_zr); - - temp_magB2_xl = 0.5000000000000001*magB2_xl[6]; - gkyl_mat_set(&A_bxbx_xl,4,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,4,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,4,2,temp_magB2_xl); - - temp_magB2_xr = 0.5000000000000001*magB2_xr[6]; - gkyl_mat_set(&A_bxbx_xr,4,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,4,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,4,2,temp_magB2_xr); - - temp_magB2_yl = 0.5000000000000001*magB2_yl[6]; - gkyl_mat_set(&A_byby_yl,4,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,4,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,4,2,temp_magB2_yl); - - temp_magB2_yr = 0.5000000000000001*magB2_yr[6]; - gkyl_mat_set(&A_byby_yr,4,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,4,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,4,2,temp_magB2_yr); - - temp_magB2_zl = 0.5000000000000001*magB2_zl[6]; - gkyl_mat_set(&A_bzbz_zl,4,2,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,4,2,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,4,2,temp_magB2_zl); - - temp_magB2_zr = 0.5000000000000001*magB2_zr[6]; - gkyl_mat_set(&A_bzbz_zr,4,2,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,4,2,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,4,2,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,4,3,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,4,3,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,4,3,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,4,3,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,4,3,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,4,3,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,4,3,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,4,3,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,4,3,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,4,3,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,4,3,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,4,3,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,4,3,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,4,3,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,4,3,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,4,3,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,4,3,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,4,3,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[4]+0.5*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,4,4,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,4,4,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,4,4,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[4]+0.5*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,4,4,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,4,4,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,4,4,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[4]+0.5*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,4,4,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,4,4,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,4,4,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[4]+0.5*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,4,4,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,4,4,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,4,4,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[4]+0.5*magB2_zl[0]; - gkyl_mat_set(&A_bzbz_zl,4,4,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,4,4,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,4,4,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[4]+0.5*magB2_zr[0]; - gkyl_mat_set(&A_bzbz_zr,4,4,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,4,4,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,4,4,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[8]; - gkyl_mat_set(&A_bxbx_xl,4,5,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,4,5,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,4,5,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[8]; - gkyl_mat_set(&A_bxbx_xr,4,5,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,4,5,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,4,5,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[8]; - gkyl_mat_set(&A_byby_yl,4,5,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,4,5,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,4,5,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[8]; - gkyl_mat_set(&A_byby_yr,4,5,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,4,5,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,4,5,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[8]; - gkyl_mat_set(&A_bzbz_zl,4,5,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,4,5,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,4,5,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[8]; - gkyl_mat_set(&A_bzbz_zr,4,5,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,4,5,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,4,5,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[6]+0.5000000000000001*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,4,6,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,4,6,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,4,6,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[6]+0.5000000000000001*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,4,6,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,4,6,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,4,6,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[6]+0.5000000000000001*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,4,6,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,4,6,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,4,6,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[6]+0.5000000000000001*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,4,6,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,4,6,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,4,6,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[6]+0.5000000000000001*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,4,6,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,4,6,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,4,6,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[6]+0.5000000000000001*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,4,6,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,4,6,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,4,6,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[7]; - gkyl_mat_set(&A_bxbx_xl,4,7,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,4,7,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,4,7,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[7]; - gkyl_mat_set(&A_bxbx_xr,4,7,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,4,7,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,4,7,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[7]; - gkyl_mat_set(&A_byby_yl,4,7,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,4,7,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,4,7,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[7]; - gkyl_mat_set(&A_byby_yr,4,7,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,4,7,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,4,7,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[7]; - gkyl_mat_set(&A_bzbz_zl,4,7,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,4,7,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,4,7,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[7]; - gkyl_mat_set(&A_bzbz_zr,4,7,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,4,7,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,4,7,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[8]+0.5*magB2_xl[5]; - gkyl_mat_set(&A_bxbx_xl,4,8,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,4,8,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,4,8,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[8]+0.5*magB2_xr[5]; - gkyl_mat_set(&A_bxbx_xr,4,8,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,4,8,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,4,8,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[8]+0.5*magB2_yl[5]; - gkyl_mat_set(&A_byby_yl,4,8,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,4,8,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,4,8,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[8]+0.5*magB2_yr[5]; - gkyl_mat_set(&A_byby_yr,4,8,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,4,8,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,4,8,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[8]+0.5*magB2_zl[5]; - gkyl_mat_set(&A_bzbz_zl,4,8,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,4,8,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,4,8,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[8]+0.5*magB2_zr[5]; - gkyl_mat_set(&A_bzbz_zr,4,8,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,4,8,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,4,8,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[5]; - gkyl_mat_set(&A_bxbx_xl,5,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,5,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,5,0,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[5]; - gkyl_mat_set(&A_bxbx_xr,5,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,5,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,5,0,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[5]; - gkyl_mat_set(&A_byby_yl,5,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,5,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,5,0,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[5]; - gkyl_mat_set(&A_byby_yr,5,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,5,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,5,0,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[5]; - gkyl_mat_set(&A_bzbz_zl,5,0,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,5,0,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,5,0,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[5]; - gkyl_mat_set(&A_bzbz_zr,5,0,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,5,0,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,5,0,temp_magB2_zr); - - temp_magB2_xl = 0.5000000000000001*magB2_xl[7]; - gkyl_mat_set(&A_bxbx_xl,5,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,5,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,5,1,temp_magB2_xl); - - temp_magB2_xr = 0.5000000000000001*magB2_xr[7]; - gkyl_mat_set(&A_bxbx_xr,5,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,5,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,5,1,temp_magB2_xr); - - temp_magB2_yl = 0.5000000000000001*magB2_yl[7]; - gkyl_mat_set(&A_byby_yl,5,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,5,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,5,1,temp_magB2_yl); - - temp_magB2_yr = 0.5000000000000001*magB2_yr[7]; - gkyl_mat_set(&A_byby_yr,5,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,5,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,5,1,temp_magB2_yr); - - temp_magB2_zl = 0.5000000000000001*magB2_zl[7]; - gkyl_mat_set(&A_bzbz_zl,5,1,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,5,1,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,5,1,temp_magB2_zl); - - temp_magB2_zr = 0.5000000000000001*magB2_zr[7]; - gkyl_mat_set(&A_bzbz_zr,5,1,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,5,1,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,5,1,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,5,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,5,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,5,2,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,5,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,5,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,5,2,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,5,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,5,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,5,2,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,5,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,5,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,5,2,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,5,2,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,5,2,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,5,2,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,5,2,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,5,2,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,5,2,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,5,3,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,5,3,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,5,3,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,5,3,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,5,3,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,5,3,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,5,3,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,5,3,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,5,3,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,5,3,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,5,3,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,5,3,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,5,3,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,5,3,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,5,3,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,5,3,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,5,3,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,5,3,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[8]; - gkyl_mat_set(&A_bxbx_xl,5,4,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,5,4,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,5,4,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[8]; - gkyl_mat_set(&A_bxbx_xr,5,4,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,5,4,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,5,4,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[8]; - gkyl_mat_set(&A_byby_yl,5,4,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,5,4,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,5,4,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[8]; - gkyl_mat_set(&A_byby_yr,5,4,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,5,4,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,5,4,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[8]; - gkyl_mat_set(&A_bzbz_zl,5,4,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,5,4,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,5,4,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[8]; - gkyl_mat_set(&A_bzbz_zr,5,4,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,5,4,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,5,4,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[5]+0.5*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,5,5,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,5,5,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,5,5,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[5]+0.5*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,5,5,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,5,5,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,5,5,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[5]+0.5*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,5,5,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,5,5,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,5,5,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[5]+0.5*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,5,5,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,5,5,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,5,5,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[5]+0.5*magB2_zl[0]; - gkyl_mat_set(&A_bzbz_zl,5,5,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,5,5,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,5,5,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[5]+0.5*magB2_zr[0]; - gkyl_mat_set(&A_bzbz_zr,5,5,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,5,5,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,5,5,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[6]; - gkyl_mat_set(&A_bxbx_xl,5,6,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,5,6,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,5,6,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[6]; - gkyl_mat_set(&A_bxbx_xr,5,6,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,5,6,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,5,6,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[6]; - gkyl_mat_set(&A_byby_yl,5,6,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,5,6,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,5,6,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[6]; - gkyl_mat_set(&A_byby_yr,5,6,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,5,6,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,5,6,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[6]; - gkyl_mat_set(&A_bzbz_zl,5,6,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,5,6,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,5,6,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[6]; - gkyl_mat_set(&A_bzbz_zr,5,6,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,5,6,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,5,6,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[7]+0.5000000000000001*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,5,7,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,5,7,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,5,7,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[7]+0.5000000000000001*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,5,7,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,5,7,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,5,7,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[7]+0.5000000000000001*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,5,7,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,5,7,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,5,7,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[7]+0.5000000000000001*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,5,7,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,5,7,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,5,7,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[7]+0.5000000000000001*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,5,7,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,5,7,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,5,7,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[7]+0.5000000000000001*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,5,7,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,5,7,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,5,7,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[8]+0.5*magB2_xl[4]; - gkyl_mat_set(&A_bxbx_xl,5,8,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,5,8,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,5,8,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[8]+0.5*magB2_xr[4]; - gkyl_mat_set(&A_bxbx_xr,5,8,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,5,8,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,5,8,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[8]+0.5*magB2_yl[4]; - gkyl_mat_set(&A_byby_yl,5,8,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,5,8,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,5,8,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[8]+0.5*magB2_yr[4]; - gkyl_mat_set(&A_byby_yr,5,8,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,5,8,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,5,8,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[8]+0.5*magB2_zl[4]; - gkyl_mat_set(&A_bzbz_zl,5,8,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,5,8,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,5,8,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[8]+0.5*magB2_zr[4]; - gkyl_mat_set(&A_bzbz_zr,5,8,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,5,8,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,5,8,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[6]; - gkyl_mat_set(&A_bxbx_xl,6,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,6,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,6,0,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[6]; - gkyl_mat_set(&A_bxbx_xr,6,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,6,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,6,0,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[6]; - gkyl_mat_set(&A_byby_yl,6,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,6,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,6,0,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[6]; - gkyl_mat_set(&A_byby_yr,6,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,6,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,6,0,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[6]; - gkyl_mat_set(&A_bzbz_zl,6,0,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,6,0,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,6,0,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[6]; - gkyl_mat_set(&A_bzbz_zr,6,0,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,6,0,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,6,0,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,6,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,6,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,6,1,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,6,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,6,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,6,1,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,6,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,6,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,6,1,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,6,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,6,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,6,1,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,6,1,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,6,1,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,6,1,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,6,1,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,6,1,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,6,1,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[8]+0.5000000000000001*magB2_xl[4]; - gkyl_mat_set(&A_bxbx_xl,6,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,6,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,6,2,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[8]+0.5000000000000001*magB2_xr[4]; - gkyl_mat_set(&A_bxbx_xr,6,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,6,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,6,2,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[8]+0.5000000000000001*magB2_yl[4]; - gkyl_mat_set(&A_byby_yl,6,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,6,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,6,2,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[8]+0.5000000000000001*magB2_yr[4]; - gkyl_mat_set(&A_byby_yr,6,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,6,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,6,2,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[8]+0.5000000000000001*magB2_zl[4]; - gkyl_mat_set(&A_bzbz_zl,6,2,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,6,2,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,6,2,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[8]+0.5000000000000001*magB2_zr[4]; - gkyl_mat_set(&A_bzbz_zr,6,2,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,6,2,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,6,2,temp_magB2_zr); - - temp_magB2_xl = 0.4*magB2_xl[7]+0.447213595499958*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,6,3,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,6,3,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,6,3,temp_magB2_xl); - - temp_magB2_xr = 0.4*magB2_xr[7]+0.447213595499958*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,6,3,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,6,3,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,6,3,temp_magB2_xr); - - temp_magB2_yl = 0.4*magB2_yl[7]+0.447213595499958*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,6,3,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,6,3,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,6,3,temp_magB2_yl); - - temp_magB2_yr = 0.4*magB2_yr[7]+0.447213595499958*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,6,3,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,6,3,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,6,3,temp_magB2_yr); - - temp_magB2_zl = 0.4*magB2_zl[7]+0.447213595499958*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,6,3,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,6,3,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,6,3,temp_magB2_zl); - - temp_magB2_zr = 0.4*magB2_zr[7]+0.447213595499958*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,6,3,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,6,3,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,6,3,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[6]+0.5000000000000001*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,6,4,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,6,4,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,6,4,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[6]+0.5000000000000001*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,6,4,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,6,4,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,6,4,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[6]+0.5000000000000001*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,6,4,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,6,4,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,6,4,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[6]+0.5000000000000001*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,6,4,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,6,4,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,6,4,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[6]+0.5000000000000001*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,6,4,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,6,4,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,6,4,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[6]+0.5000000000000001*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,6,4,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,6,4,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,6,4,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[6]; - gkyl_mat_set(&A_bxbx_xl,6,5,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,6,5,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,6,5,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[6]; - gkyl_mat_set(&A_bxbx_xr,6,5,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,6,5,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,6,5,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[6]; - gkyl_mat_set(&A_byby_yl,6,5,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,6,5,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,6,5,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[6]; - gkyl_mat_set(&A_byby_yr,6,5,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,6,5,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,6,5,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[6]; - gkyl_mat_set(&A_bzbz_zl,6,5,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,6,5,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,6,5,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[6]; - gkyl_mat_set(&A_bzbz_zr,6,5,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,6,5,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,6,5,temp_magB2_zr); - - temp_magB2_xl = 0.2857142857142857*magB2_xl[8]+0.4472135954999579*magB2_xl[5]+0.31943828249997*magB2_xl[4]+0.5*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,6,6,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,6,6,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,6,6,temp_magB2_xl); - - temp_magB2_xr = 0.2857142857142857*magB2_xr[8]+0.4472135954999579*magB2_xr[5]+0.31943828249997*magB2_xr[4]+0.5*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,6,6,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,6,6,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,6,6,temp_magB2_xr); - - temp_magB2_yl = 0.2857142857142857*magB2_yl[8]+0.4472135954999579*magB2_yl[5]+0.31943828249997*magB2_yl[4]+0.5*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,6,6,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,6,6,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,6,6,temp_magB2_yl); - - temp_magB2_yr = 0.2857142857142857*magB2_yr[8]+0.4472135954999579*magB2_yr[5]+0.31943828249997*magB2_yr[4]+0.5*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,6,6,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,6,6,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,6,6,temp_magB2_yr); - - temp_magB2_zl = 0.2857142857142857*magB2_zl[8]+0.4472135954999579*magB2_zl[5]+0.31943828249997*magB2_zl[4]+0.5*magB2_zl[0]; - gkyl_mat_set(&A_bzbz_zl,6,6,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,6,6,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,6,6,temp_magB2_zl); - - temp_magB2_zr = 0.2857142857142857*magB2_zr[8]+0.4472135954999579*magB2_zr[5]+0.31943828249997*magB2_zr[4]+0.5*magB2_zr[0]; - gkyl_mat_set(&A_bzbz_zr,6,6,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,6,6,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,6,6,temp_magB2_zr); - - temp_magB2_xl = 0.4*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,6,7,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,6,7,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,6,7,temp_magB2_xl); - - temp_magB2_xr = 0.4*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,6,7,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,6,7,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,6,7,temp_magB2_xr); - - temp_magB2_yl = 0.4*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,6,7,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,6,7,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,6,7,temp_magB2_yl); - - temp_magB2_yr = 0.4*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,6,7,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,6,7,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,6,7,temp_magB2_yr); - - temp_magB2_zl = 0.4*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,6,7,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,6,7,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,6,7,temp_magB2_zl); - - temp_magB2_zr = 0.4*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,6,7,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,6,7,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,6,7,temp_magB2_zr); - - temp_magB2_xl = 0.2857142857142857*magB2_xl[6]+0.447213595499958*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,6,8,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,6,8,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,6,8,temp_magB2_xl); - - temp_magB2_xr = 0.2857142857142857*magB2_xr[6]+0.447213595499958*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,6,8,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,6,8,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,6,8,temp_magB2_xr); - - temp_magB2_yl = 0.2857142857142857*magB2_yl[6]+0.447213595499958*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,6,8,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,6,8,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,6,8,temp_magB2_yl); - - temp_magB2_yr = 0.2857142857142857*magB2_yr[6]+0.447213595499958*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,6,8,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,6,8,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,6,8,temp_magB2_yr); - - temp_magB2_zl = 0.2857142857142857*magB2_zl[6]+0.447213595499958*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,6,8,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,6,8,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,6,8,temp_magB2_zl); - - temp_magB2_zr = 0.2857142857142857*magB2_zr[6]+0.447213595499958*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,6,8,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,6,8,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,6,8,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[7]; - gkyl_mat_set(&A_bxbx_xl,7,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,7,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,7,0,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[7]; - gkyl_mat_set(&A_bxbx_xr,7,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,7,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,7,0,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[7]; - gkyl_mat_set(&A_byby_yl,7,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,7,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,7,0,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[7]; - gkyl_mat_set(&A_byby_yr,7,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,7,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,7,0,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[7]; - gkyl_mat_set(&A_bzbz_zl,7,0,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,7,0,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,7,0,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[7]; - gkyl_mat_set(&A_bzbz_zr,7,0,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,7,0,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,7,0,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[8]+0.5000000000000001*magB2_xl[5]; - gkyl_mat_set(&A_bxbx_xl,7,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,7,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,7,1,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[8]+0.5000000000000001*magB2_xr[5]; - gkyl_mat_set(&A_bxbx_xr,7,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,7,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,7,1,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[8]+0.5000000000000001*magB2_yl[5]; - gkyl_mat_set(&A_byby_yl,7,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,7,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,7,1,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[8]+0.5000000000000001*magB2_yr[5]; - gkyl_mat_set(&A_byby_yr,7,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,7,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,7,1,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[8]+0.5000000000000001*magB2_zl[5]; - gkyl_mat_set(&A_bzbz_zl,7,1,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,7,1,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,7,1,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[8]+0.5000000000000001*magB2_zr[5]; - gkyl_mat_set(&A_bzbz_zr,7,1,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,7,1,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,7,1,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,7,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,7,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,7,2,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,7,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,7,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,7,2,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,7,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,7,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,7,2,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,7,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,7,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,7,2,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,7,2,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,7,2,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,7,2,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,7,2,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,7,2,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,7,2,temp_magB2_zr); - - temp_magB2_xl = 0.4*magB2_xl[6]+0.447213595499958*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,7,3,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,7,3,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,7,3,temp_magB2_xl); - - temp_magB2_xr = 0.4*magB2_xr[6]+0.447213595499958*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,7,3,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,7,3,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,7,3,temp_magB2_xr); - - temp_magB2_yl = 0.4*magB2_yl[6]+0.447213595499958*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,7,3,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,7,3,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,7,3,temp_magB2_yl); - - temp_magB2_yr = 0.4*magB2_yr[6]+0.447213595499958*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,7,3,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,7,3,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,7,3,temp_magB2_yr); - - temp_magB2_zl = 0.4*magB2_zl[6]+0.447213595499958*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,7,3,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,7,3,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,7,3,temp_magB2_zl); - - temp_magB2_zr = 0.4*magB2_zr[6]+0.447213595499958*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,7,3,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,7,3,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,7,3,temp_magB2_zr); - - temp_magB2_xl = 0.4472135954999579*magB2_xl[7]; - gkyl_mat_set(&A_bxbx_xl,7,4,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,7,4,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,7,4,temp_magB2_xl); - - temp_magB2_xr = 0.4472135954999579*magB2_xr[7]; - gkyl_mat_set(&A_bxbx_xr,7,4,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,7,4,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,7,4,temp_magB2_xr); - - temp_magB2_yl = 0.4472135954999579*magB2_yl[7]; - gkyl_mat_set(&A_byby_yl,7,4,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,7,4,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,7,4,temp_magB2_yl); - - temp_magB2_yr = 0.4472135954999579*magB2_yr[7]; - gkyl_mat_set(&A_byby_yr,7,4,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,7,4,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,7,4,temp_magB2_yr); - - temp_magB2_zl = 0.4472135954999579*magB2_zl[7]; - gkyl_mat_set(&A_bzbz_zl,7,4,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,7,4,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,7,4,temp_magB2_zl); - - temp_magB2_zr = 0.4472135954999579*magB2_zr[7]; - gkyl_mat_set(&A_bzbz_zr,7,4,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,7,4,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,7,4,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[7]+0.5000000000000001*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,7,5,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,7,5,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,7,5,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[7]+0.5000000000000001*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,7,5,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,7,5,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,7,5,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[7]+0.5000000000000001*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,7,5,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,7,5,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,7,5,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[7]+0.5000000000000001*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,7,5,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,7,5,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,7,5,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[7]+0.5000000000000001*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,7,5,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,7,5,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,7,5,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[7]+0.5000000000000001*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,7,5,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,7,5,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,7,5,temp_magB2_zr); - - temp_magB2_xl = 0.4*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,7,6,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,7,6,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,7,6,temp_magB2_xl); - - temp_magB2_xr = 0.4*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,7,6,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,7,6,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,7,6,temp_magB2_xr); - - temp_magB2_yl = 0.4*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,7,6,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,7,6,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,7,6,temp_magB2_yl); - - temp_magB2_yr = 0.4*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,7,6,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,7,6,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,7,6,temp_magB2_yr); - - temp_magB2_zl = 0.4*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,7,6,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,7,6,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,7,6,temp_magB2_zl); - - temp_magB2_zr = 0.4*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,7,6,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,7,6,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,7,6,temp_magB2_zr); - - temp_magB2_xl = 0.2857142857142857*magB2_xl[8]+0.31943828249997*magB2_xl[5]+0.4472135954999579*magB2_xl[4]+0.5*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,7,7,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,7,7,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,7,7,temp_magB2_xl); - - temp_magB2_xr = 0.2857142857142857*magB2_xr[8]+0.31943828249997*magB2_xr[5]+0.4472135954999579*magB2_xr[4]+0.5*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,7,7,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,7,7,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,7,7,temp_magB2_xr); - - temp_magB2_yl = 0.2857142857142857*magB2_yl[8]+0.31943828249997*magB2_yl[5]+0.4472135954999579*magB2_yl[4]+0.5*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,7,7,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,7,7,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,7,7,temp_magB2_yl); - - temp_magB2_yr = 0.2857142857142857*magB2_yr[8]+0.31943828249997*magB2_yr[5]+0.4472135954999579*magB2_yr[4]+0.5*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,7,7,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,7,7,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,7,7,temp_magB2_yr); - - temp_magB2_zl = 0.2857142857142857*magB2_zl[8]+0.31943828249997*magB2_zl[5]+0.4472135954999579*magB2_zl[4]+0.5*magB2_zl[0]; - gkyl_mat_set(&A_bzbz_zl,7,7,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,7,7,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,7,7,temp_magB2_zl); - - temp_magB2_zr = 0.2857142857142857*magB2_zr[8]+0.31943828249997*magB2_zr[5]+0.4472135954999579*magB2_zr[4]+0.5*magB2_zr[0]; - gkyl_mat_set(&A_bzbz_zr,7,7,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,7,7,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,7,7,temp_magB2_zr); - - temp_magB2_xl = 0.2857142857142857*magB2_xl[7]+0.447213595499958*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,7,8,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,7,8,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,7,8,temp_magB2_xl); - - temp_magB2_xr = 0.2857142857142857*magB2_xr[7]+0.447213595499958*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,7,8,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,7,8,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,7,8,temp_magB2_xr); - - temp_magB2_yl = 0.2857142857142857*magB2_yl[7]+0.447213595499958*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,7,8,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,7,8,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,7,8,temp_magB2_yl); - - temp_magB2_yr = 0.2857142857142857*magB2_yr[7]+0.447213595499958*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,7,8,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,7,8,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,7,8,temp_magB2_yr); - - temp_magB2_zl = 0.2857142857142857*magB2_zl[7]+0.447213595499958*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,7,8,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,7,8,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,7,8,temp_magB2_zl); - - temp_magB2_zr = 0.2857142857142857*magB2_zr[7]+0.447213595499958*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,7,8,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,7,8,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,7,8,temp_magB2_zr); - - temp_magB2_xl = 0.5*magB2_xl[8]; - gkyl_mat_set(&A_bxbx_xl,8,0,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,8,0,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,8,0,temp_magB2_xl); - - temp_magB2_xr = 0.5*magB2_xr[8]; - gkyl_mat_set(&A_bxbx_xr,8,0,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,8,0,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,8,0,temp_magB2_xr); - - temp_magB2_yl = 0.5*magB2_yl[8]; - gkyl_mat_set(&A_byby_yl,8,0,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,8,0,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,8,0,temp_magB2_yl); - - temp_magB2_yr = 0.5*magB2_yr[8]; - gkyl_mat_set(&A_byby_yr,8,0,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,8,0,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,8,0,temp_magB2_yr); - - temp_magB2_zl = 0.5*magB2_zl[8]; - gkyl_mat_set(&A_bzbz_zl,8,0,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,8,0,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,8,0,temp_magB2_zl); - - temp_magB2_zr = 0.5*magB2_zr[8]; - gkyl_mat_set(&A_bzbz_zr,8,0,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,8,0,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,8,0,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[7]; - gkyl_mat_set(&A_bxbx_xl,8,1,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,8,1,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,8,1,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[7]; - gkyl_mat_set(&A_bxbx_xr,8,1,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,8,1,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,8,1,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[7]; - gkyl_mat_set(&A_byby_yl,8,1,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,8,1,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,8,1,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[7]; - gkyl_mat_set(&A_byby_yr,8,1,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,8,1,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,8,1,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[7]; - gkyl_mat_set(&A_bzbz_zl,8,1,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,8,1,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,8,1,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[7]; - gkyl_mat_set(&A_bzbz_zr,8,1,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,8,1,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,8,1,temp_magB2_zr); - - temp_magB2_xl = 0.447213595499958*magB2_xl[6]; - gkyl_mat_set(&A_bxbx_xl,8,2,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,8,2,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,8,2,temp_magB2_xl); - - temp_magB2_xr = 0.447213595499958*magB2_xr[6]; - gkyl_mat_set(&A_bxbx_xr,8,2,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,8,2,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,8,2,temp_magB2_xr); - - temp_magB2_yl = 0.447213595499958*magB2_yl[6]; - gkyl_mat_set(&A_byby_yl,8,2,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,8,2,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,8,2,temp_magB2_yl); - - temp_magB2_yr = 0.447213595499958*magB2_yr[6]; - gkyl_mat_set(&A_byby_yr,8,2,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,8,2,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,8,2,temp_magB2_yr); - - temp_magB2_zl = 0.447213595499958*magB2_zl[6]; - gkyl_mat_set(&A_bzbz_zl,8,2,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,8,2,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,8,2,temp_magB2_zl); - - temp_magB2_zr = 0.447213595499958*magB2_zr[6]; - gkyl_mat_set(&A_bzbz_zr,8,2,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,8,2,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,8,2,temp_magB2_zr); - - temp_magB2_xl = 0.4*magB2_xl[3]; - gkyl_mat_set(&A_bxbx_xl,8,3,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,8,3,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,8,3,temp_magB2_xl); - - temp_magB2_xr = 0.4*magB2_xr[3]; - gkyl_mat_set(&A_bxbx_xr,8,3,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,8,3,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,8,3,temp_magB2_xr); - - temp_magB2_yl = 0.4*magB2_yl[3]; - gkyl_mat_set(&A_byby_yl,8,3,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,8,3,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,8,3,temp_magB2_yl); - - temp_magB2_yr = 0.4*magB2_yr[3]; - gkyl_mat_set(&A_byby_yr,8,3,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,8,3,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,8,3,temp_magB2_yr); - - temp_magB2_zl = 0.4*magB2_zl[3]; - gkyl_mat_set(&A_bzbz_zl,8,3,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,8,3,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,8,3,temp_magB2_zl); - - temp_magB2_zr = 0.4*magB2_zr[3]; - gkyl_mat_set(&A_bzbz_zr,8,3,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,8,3,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,8,3,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[8]+0.5*magB2_xl[5]; - gkyl_mat_set(&A_bxbx_xl,8,4,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,8,4,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,8,4,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[8]+0.5*magB2_xr[5]; - gkyl_mat_set(&A_bxbx_xr,8,4,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,8,4,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,8,4,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[8]+0.5*magB2_yl[5]; - gkyl_mat_set(&A_byby_yl,8,4,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,8,4,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,8,4,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[8]+0.5*magB2_yr[5]; - gkyl_mat_set(&A_byby_yr,8,4,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,8,4,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,8,4,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[8]+0.5*magB2_zl[5]; - gkyl_mat_set(&A_bzbz_zl,8,4,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,8,4,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,8,4,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[8]+0.5*magB2_zr[5]; - gkyl_mat_set(&A_bzbz_zr,8,4,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,8,4,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,8,4,temp_magB2_zr); - - temp_magB2_xl = 0.31943828249997*magB2_xl[8]+0.5*magB2_xl[4]; - gkyl_mat_set(&A_bxbx_xl,8,5,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,8,5,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,8,5,temp_magB2_xl); - - temp_magB2_xr = 0.31943828249997*magB2_xr[8]+0.5*magB2_xr[4]; - gkyl_mat_set(&A_bxbx_xr,8,5,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,8,5,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,8,5,temp_magB2_xr); - - temp_magB2_yl = 0.31943828249997*magB2_yl[8]+0.5*magB2_yl[4]; - gkyl_mat_set(&A_byby_yl,8,5,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,8,5,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,8,5,temp_magB2_yl); - - temp_magB2_yr = 0.31943828249997*magB2_yr[8]+0.5*magB2_yr[4]; - gkyl_mat_set(&A_byby_yr,8,5,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,8,5,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,8,5,temp_magB2_yr); - - temp_magB2_zl = 0.31943828249997*magB2_zl[8]+0.5*magB2_zl[4]; - gkyl_mat_set(&A_bzbz_zl,8,5,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,8,5,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,8,5,temp_magB2_zl); - - temp_magB2_zr = 0.31943828249997*magB2_zr[8]+0.5*magB2_zr[4]; - gkyl_mat_set(&A_bzbz_zr,8,5,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,8,5,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,8,5,temp_magB2_zr); - - temp_magB2_xl = 0.2857142857142857*magB2_xl[6]+0.447213595499958*magB2_xl[2]; - gkyl_mat_set(&A_bxbx_xl,8,6,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,8,6,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,8,6,temp_magB2_xl); - - temp_magB2_xr = 0.2857142857142857*magB2_xr[6]+0.447213595499958*magB2_xr[2]; - gkyl_mat_set(&A_bxbx_xr,8,6,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,8,6,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,8,6,temp_magB2_xr); - - temp_magB2_yl = 0.2857142857142857*magB2_yl[6]+0.447213595499958*magB2_yl[2]; - gkyl_mat_set(&A_byby_yl,8,6,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,8,6,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,8,6,temp_magB2_yl); - - temp_magB2_yr = 0.2857142857142857*magB2_yr[6]+0.447213595499958*magB2_yr[2]; - gkyl_mat_set(&A_byby_yr,8,6,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,8,6,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,8,6,temp_magB2_yr); - - temp_magB2_zl = 0.2857142857142857*magB2_zl[6]+0.447213595499958*magB2_zl[2]; - gkyl_mat_set(&A_bzbz_zl,8,6,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,8,6,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,8,6,temp_magB2_zl); - - temp_magB2_zr = 0.2857142857142857*magB2_zr[6]+0.447213595499958*magB2_zr[2]; - gkyl_mat_set(&A_bzbz_zr,8,6,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,8,6,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,8,6,temp_magB2_zr); - - temp_magB2_xl = 0.2857142857142857*magB2_xl[7]+0.447213595499958*magB2_xl[1]; - gkyl_mat_set(&A_bxbx_xl,8,7,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,8,7,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,8,7,temp_magB2_xl); - - temp_magB2_xr = 0.2857142857142857*magB2_xr[7]+0.447213595499958*magB2_xr[1]; - gkyl_mat_set(&A_bxbx_xr,8,7,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,8,7,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,8,7,temp_magB2_xr); - - temp_magB2_yl = 0.2857142857142857*magB2_yl[7]+0.447213595499958*magB2_yl[1]; - gkyl_mat_set(&A_byby_yl,8,7,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,8,7,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,8,7,temp_magB2_yl); - - temp_magB2_yr = 0.2857142857142857*magB2_yr[7]+0.447213595499958*magB2_yr[1]; - gkyl_mat_set(&A_byby_yr,8,7,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,8,7,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,8,7,temp_magB2_yr); - - temp_magB2_zl = 0.2857142857142857*magB2_zl[7]+0.447213595499958*magB2_zl[1]; - gkyl_mat_set(&A_bzbz_zl,8,7,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,8,7,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,8,7,temp_magB2_zl); - - temp_magB2_zr = 0.2857142857142857*magB2_zr[7]+0.447213595499958*magB2_zr[1]; - gkyl_mat_set(&A_bzbz_zr,8,7,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,8,7,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,8,7,temp_magB2_zr); - - temp_magB2_xl = 0.2040816326530612*magB2_xl[8]+0.31943828249997*magB2_xl[5]+0.31943828249997*magB2_xl[4]+0.5*magB2_xl[0]; - gkyl_mat_set(&A_bxbx_xl,8,8,temp_magB2_xl); - gkyl_mat_set(&A_bxby_xl,8,8,temp_magB2_xl); - gkyl_mat_set(&A_bxbz_xl,8,8,temp_magB2_xl); - - temp_magB2_xr = 0.2040816326530612*magB2_xr[8]+0.31943828249997*magB2_xr[5]+0.31943828249997*magB2_xr[4]+0.5*magB2_xr[0]; - gkyl_mat_set(&A_bxbx_xr,8,8,temp_magB2_xr); - gkyl_mat_set(&A_bxby_xr,8,8,temp_magB2_xr); - gkyl_mat_set(&A_bxbz_xr,8,8,temp_magB2_xr); - - temp_magB2_yl = 0.2040816326530612*magB2_yl[8]+0.31943828249997*magB2_yl[5]+0.31943828249997*magB2_yl[4]+0.5*magB2_yl[0]; - gkyl_mat_set(&A_byby_yl,8,8,temp_magB2_yl); - gkyl_mat_set(&A_bxby_yl,8,8,temp_magB2_yl); - gkyl_mat_set(&A_bybz_yl,8,8,temp_magB2_yl); - - temp_magB2_yr = 0.2040816326530612*magB2_yr[8]+0.31943828249997*magB2_yr[5]+0.31943828249997*magB2_yr[4]+0.5*magB2_yr[0]; - gkyl_mat_set(&A_byby_yr,8,8,temp_magB2_yr); - gkyl_mat_set(&A_bxby_yr,8,8,temp_magB2_yr); - gkyl_mat_set(&A_bybz_yr,8,8,temp_magB2_yr); - - temp_magB2_zl = 0.2040816326530612*magB2_zl[8]+0.31943828249997*magB2_zl[5]+0.31943828249997*magB2_zl[4]+0.5*magB2_zl[0]; - gkyl_mat_set(&A_bzbz_zl,8,8,temp_magB2_zl); - gkyl_mat_set(&A_bxbz_zl,8,8,temp_magB2_zl); - gkyl_mat_set(&A_bybz_zl,8,8,temp_magB2_zl); - - temp_magB2_zr = 0.2040816326530612*magB2_zr[8]+0.31943828249997*magB2_zr[5]+0.31943828249997*magB2_zr[4]+0.5*magB2_zr[0]; - gkyl_mat_set(&A_bzbz_zr,8,8,temp_magB2_zr); - gkyl_mat_set(&A_bxbz_zr,8,8,temp_magB2_zr); - gkyl_mat_set(&A_bybz_zr,8,8,temp_magB2_zr); + // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. + + const double *bx = &bvar[0]; + const double *by = &bvar[27]; + const double *bz = &bvar[54]; + const double *bxbx = &bvar[81]; + const double *bxby = &bvar[108]; + const double *bxbz = &bvar[135]; + const double *byby = &bvar[162]; + const double *bybz = &bvar[189]; + const double *bzbz = &bvar[216]; + + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[9]; + double *bxbx_xl = &bvar_surf[18]; + double *bxbx_xr = &bvar_surf[27]; + double *bxby_xl = &bvar_surf[36]; + double *bxby_xr = &bvar_surf[45]; + double *bxbz_xl = &bvar_surf[54]; + double *bxbz_xr = &bvar_surf[63]; + + bx_xl[0] = 1.58113883008419*bx[7]-1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xl[1] = 1.58113883008419*bx[11]-1.224744871391589*bx[4]+0.7071067811865475*bx[2]; + bx_xl[2] = 1.58113883008419*bx[13]-1.224744871391589*bx[5]+0.7071067811865475*bx[3]; + bx_xl[3] = 1.58113883008419*bx[17]-1.224744871391589*bx[10]+0.7071067811865475*bx[6]; + bx_xl[4] = 1.58113883008419*bx[20]-1.224744871391589*bx[12]+0.7071067811865475*bx[8]; + bx_xl[5] = 1.58113883008419*bx[21]-1.224744871391589*bx[15]+0.7071067811865475*bx[9]; + bx_xl[6] = 1.58113883008419*bx[23]-1.224744871391589*bx[18]+0.7071067811865475*bx[14]; + bx_xl[7] = 1.58113883008419*bx[24]-1.224744871391589*bx[19]+0.7071067811865475*bx[16]; + bx_xl[8] = 1.58113883008419*bx[26]-1.224744871391589*bx[25]+0.7071067811865475*bx[22]; + bxbx_xl[0] = 1.58113883008419*bxbx[7]-1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xl[1] = 1.58113883008419*bxbx[11]-1.224744871391589*bxbx[4]+0.7071067811865475*bxbx[2]; + bxbx_xl[2] = 1.58113883008419*bxbx[13]-1.224744871391589*bxbx[5]+0.7071067811865475*bxbx[3]; + bxbx_xl[3] = 1.58113883008419*bxbx[17]-1.224744871391589*bxbx[10]+0.7071067811865475*bxbx[6]; + bxbx_xl[4] = 1.58113883008419*bxbx[20]-1.224744871391589*bxbx[12]+0.7071067811865475*bxbx[8]; + bxbx_xl[5] = 1.58113883008419*bxbx[21]-1.224744871391589*bxbx[15]+0.7071067811865475*bxbx[9]; + bxbx_xl[6] = 1.58113883008419*bxbx[23]-1.224744871391589*bxbx[18]+0.7071067811865475*bxbx[14]; + bxbx_xl[7] = 1.58113883008419*bxbx[24]-1.224744871391589*bxbx[19]+0.7071067811865475*bxbx[16]; + bxbx_xl[8] = 1.58113883008419*bxbx[26]-1.224744871391589*bxbx[25]+0.7071067811865475*bxbx[22]; + bxby_xl[0] = 1.58113883008419*bxby[7]-1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xl[1] = 1.58113883008419*bxby[11]-1.224744871391589*bxby[4]+0.7071067811865475*bxby[2]; + bxby_xl[2] = 1.58113883008419*bxby[13]-1.224744871391589*bxby[5]+0.7071067811865475*bxby[3]; + bxby_xl[3] = 1.58113883008419*bxby[17]-1.224744871391589*bxby[10]+0.7071067811865475*bxby[6]; + bxby_xl[4] = 1.58113883008419*bxby[20]-1.224744871391589*bxby[12]+0.7071067811865475*bxby[8]; + bxby_xl[5] = 1.58113883008419*bxby[21]-1.224744871391589*bxby[15]+0.7071067811865475*bxby[9]; + bxby_xl[6] = 1.58113883008419*bxby[23]-1.224744871391589*bxby[18]+0.7071067811865475*bxby[14]; + bxby_xl[7] = 1.58113883008419*bxby[24]-1.224744871391589*bxby[19]+0.7071067811865475*bxby[16]; + bxby_xl[8] = 1.58113883008419*bxby[26]-1.224744871391589*bxby[25]+0.7071067811865475*bxby[22]; + bxbz_xl[0] = 1.58113883008419*bxbz[7]-1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xl[1] = 1.58113883008419*bxbz[11]-1.224744871391589*bxbz[4]+0.7071067811865475*bxbz[2]; + bxbz_xl[2] = 1.58113883008419*bxbz[13]-1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[3]; + bxbz_xl[3] = 1.58113883008419*bxbz[17]-1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[6]; + bxbz_xl[4] = 1.58113883008419*bxbz[20]-1.224744871391589*bxbz[12]+0.7071067811865475*bxbz[8]; + bxbz_xl[5] = 1.58113883008419*bxbz[21]-1.224744871391589*bxbz[15]+0.7071067811865475*bxbz[9]; + bxbz_xl[6] = 1.58113883008419*bxbz[23]-1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[14]; + bxbz_xl[7] = 1.58113883008419*bxbz[24]-1.224744871391589*bxbz[19]+0.7071067811865475*bxbz[16]; + bxbz_xl[8] = 1.58113883008419*bxbz[26]-1.224744871391589*bxbz[25]+0.7071067811865475*bxbz[22]; + + bx_xr[0] = 1.58113883008419*bx[7]+1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[1] = 1.58113883008419*bx[11]+1.224744871391589*bx[4]+0.7071067811865475*bx[2]; + bx_xr[2] = 1.58113883008419*bx[13]+1.224744871391589*bx[5]+0.7071067811865475*bx[3]; + bx_xr[3] = 1.58113883008419*bx[17]+1.224744871391589*bx[10]+0.7071067811865475*bx[6]; + bx_xr[4] = 1.58113883008419*bx[20]+1.224744871391589*bx[12]+0.7071067811865475*bx[8]; + bx_xr[5] = 1.58113883008419*bx[21]+1.224744871391589*bx[15]+0.7071067811865475*bx[9]; + bx_xr[6] = 1.58113883008419*bx[23]+1.224744871391589*bx[18]+0.7071067811865475*bx[14]; + bx_xr[7] = 1.58113883008419*bx[24]+1.224744871391589*bx[19]+0.7071067811865475*bx[16]; + bx_xr[8] = 1.58113883008419*bx[26]+1.224744871391589*bx[25]+0.7071067811865475*bx[22]; + bxbx_xr[0] = 1.58113883008419*bxbx[7]+1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[1] = 1.58113883008419*bxbx[11]+1.224744871391589*bxbx[4]+0.7071067811865475*bxbx[2]; + bxbx_xr[2] = 1.58113883008419*bxbx[13]+1.224744871391589*bxbx[5]+0.7071067811865475*bxbx[3]; + bxbx_xr[3] = 1.58113883008419*bxbx[17]+1.224744871391589*bxbx[10]+0.7071067811865475*bxbx[6]; + bxbx_xr[4] = 1.58113883008419*bxbx[20]+1.224744871391589*bxbx[12]+0.7071067811865475*bxbx[8]; + bxbx_xr[5] = 1.58113883008419*bxbx[21]+1.224744871391589*bxbx[15]+0.7071067811865475*bxbx[9]; + bxbx_xr[6] = 1.58113883008419*bxbx[23]+1.224744871391589*bxbx[18]+0.7071067811865475*bxbx[14]; + bxbx_xr[7] = 1.58113883008419*bxbx[24]+1.224744871391589*bxbx[19]+0.7071067811865475*bxbx[16]; + bxbx_xr[8] = 1.58113883008419*bxbx[26]+1.224744871391589*bxbx[25]+0.7071067811865475*bxbx[22]; + bxby_xr[0] = 1.58113883008419*bxby[7]+1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[1] = 1.58113883008419*bxby[11]+1.224744871391589*bxby[4]+0.7071067811865475*bxby[2]; + bxby_xr[2] = 1.58113883008419*bxby[13]+1.224744871391589*bxby[5]+0.7071067811865475*bxby[3]; + bxby_xr[3] = 1.58113883008419*bxby[17]+1.224744871391589*bxby[10]+0.7071067811865475*bxby[6]; + bxby_xr[4] = 1.58113883008419*bxby[20]+1.224744871391589*bxby[12]+0.7071067811865475*bxby[8]; + bxby_xr[5] = 1.58113883008419*bxby[21]+1.224744871391589*bxby[15]+0.7071067811865475*bxby[9]; + bxby_xr[6] = 1.58113883008419*bxby[23]+1.224744871391589*bxby[18]+0.7071067811865475*bxby[14]; + bxby_xr[7] = 1.58113883008419*bxby[24]+1.224744871391589*bxby[19]+0.7071067811865475*bxby[16]; + bxby_xr[8] = 1.58113883008419*bxby[26]+1.224744871391589*bxby[25]+0.7071067811865475*bxby[22]; + bxbz_xr[0] = 1.58113883008419*bxbz[7]+1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[1] = 1.58113883008419*bxbz[11]+1.224744871391589*bxbz[4]+0.7071067811865475*bxbz[2]; + bxbz_xr[2] = 1.58113883008419*bxbz[13]+1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[3]; + bxbz_xr[3] = 1.58113883008419*bxbz[17]+1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[6]; + bxbz_xr[4] = 1.58113883008419*bxbz[20]+1.224744871391589*bxbz[12]+0.7071067811865475*bxbz[8]; + bxbz_xr[5] = 1.58113883008419*bxbz[21]+1.224744871391589*bxbz[15]+0.7071067811865475*bxbz[9]; + bxbz_xr[6] = 1.58113883008419*bxbz[23]+1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[14]; + bxbz_xr[7] = 1.58113883008419*bxbz[24]+1.224744871391589*bxbz[19]+0.7071067811865475*bxbz[16]; + bxbz_xr[8] = 1.58113883008419*bxbz[26]+1.224744871391589*bxbz[25]+0.7071067811865475*bxbz[22]; + + double *by_yl = &bvar_surf[72]; + double *by_yr = &bvar_surf[81]; + double *bxby_yl = &bvar_surf[90]; + double *bxby_yr = &bvar_surf[99]; + double *byby_yl = &bvar_surf[108]; + double *byby_yr = &bvar_surf[117]; + double *bybz_yl = &bvar_surf[126]; + double *bybz_yr = &bvar_surf[135]; + + by_yl[0] = 1.58113883008419*by[8]-1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yl[1] = 1.58113883008419*by[12]-1.224744871391589*by[4]+0.7071067811865475*by[1]; + by_yl[2] = 1.58113883008419*by[14]-1.224744871391589*by[6]+0.7071067811865475*by[3]; + by_yl[3] = 1.58113883008419*by[18]-1.224744871391589*by[10]+0.7071067811865475*by[5]; + by_yl[4] = 1.58113883008419*by[20]-1.224744871391589*by[11]+0.7071067811865475*by[7]; + by_yl[5] = 1.58113883008419*by[22]-1.224744871391589*by[16]+0.7071067811865475*by[9]; + by_yl[6] = 1.58113883008419*by[23]-1.224744871391589*by[17]+0.7071067811865475*by[13]; + by_yl[7] = 1.58113883008419*by[25]-1.224744871391589*by[19]+0.7071067811865475*by[15]; + by_yl[8] = 1.58113883008419*by[26]-1.224744871391589*by[24]+0.7071067811865475*by[21]; + bxby_yl[0] = 1.58113883008419*bxby[8]-1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yl[1] = 1.58113883008419*bxby[12]-1.224744871391589*bxby[4]+0.7071067811865475*bxby[1]; + bxby_yl[2] = 1.58113883008419*bxby[14]-1.224744871391589*bxby[6]+0.7071067811865475*bxby[3]; + bxby_yl[3] = 1.58113883008419*bxby[18]-1.224744871391589*bxby[10]+0.7071067811865475*bxby[5]; + bxby_yl[4] = 1.58113883008419*bxby[20]-1.224744871391589*bxby[11]+0.7071067811865475*bxby[7]; + bxby_yl[5] = 1.58113883008419*bxby[22]-1.224744871391589*bxby[16]+0.7071067811865475*bxby[9]; + bxby_yl[6] = 1.58113883008419*bxby[23]-1.224744871391589*bxby[17]+0.7071067811865475*bxby[13]; + bxby_yl[7] = 1.58113883008419*bxby[25]-1.224744871391589*bxby[19]+0.7071067811865475*bxby[15]; + bxby_yl[8] = 1.58113883008419*bxby[26]-1.224744871391589*bxby[24]+0.7071067811865475*bxby[21]; + byby_yl[0] = 1.58113883008419*byby[8]-1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yl[1] = 1.58113883008419*byby[12]-1.224744871391589*byby[4]+0.7071067811865475*byby[1]; + byby_yl[2] = 1.58113883008419*byby[14]-1.224744871391589*byby[6]+0.7071067811865475*byby[3]; + byby_yl[3] = 1.58113883008419*byby[18]-1.224744871391589*byby[10]+0.7071067811865475*byby[5]; + byby_yl[4] = 1.58113883008419*byby[20]-1.224744871391589*byby[11]+0.7071067811865475*byby[7]; + byby_yl[5] = 1.58113883008419*byby[22]-1.224744871391589*byby[16]+0.7071067811865475*byby[9]; + byby_yl[6] = 1.58113883008419*byby[23]-1.224744871391589*byby[17]+0.7071067811865475*byby[13]; + byby_yl[7] = 1.58113883008419*byby[25]-1.224744871391589*byby[19]+0.7071067811865475*byby[15]; + byby_yl[8] = 1.58113883008419*byby[26]-1.224744871391589*byby[24]+0.7071067811865475*byby[21]; + bybz_yl[0] = 1.58113883008419*bybz[8]-1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yl[1] = 1.58113883008419*bybz[12]-1.224744871391589*bybz[4]+0.7071067811865475*bybz[1]; + bybz_yl[2] = 1.58113883008419*bybz[14]-1.224744871391589*bybz[6]+0.7071067811865475*bybz[3]; + bybz_yl[3] = 1.58113883008419*bybz[18]-1.224744871391589*bybz[10]+0.7071067811865475*bybz[5]; + bybz_yl[4] = 1.58113883008419*bybz[20]-1.224744871391589*bybz[11]+0.7071067811865475*bybz[7]; + bybz_yl[5] = 1.58113883008419*bybz[22]-1.224744871391589*bybz[16]+0.7071067811865475*bybz[9]; + bybz_yl[6] = 1.58113883008419*bybz[23]-1.224744871391589*bybz[17]+0.7071067811865475*bybz[13]; + bybz_yl[7] = 1.58113883008419*bybz[25]-1.224744871391589*bybz[19]+0.7071067811865475*bybz[15]; + bybz_yl[8] = 1.58113883008419*bybz[26]-1.224744871391589*bybz[24]+0.7071067811865475*bybz[21]; + + by_yr[0] = 1.58113883008419*by[8]+1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yr[1] = 1.58113883008419*by[12]+1.224744871391589*by[4]+0.7071067811865475*by[1]; + by_yr[2] = 1.58113883008419*by[14]+1.224744871391589*by[6]+0.7071067811865475*by[3]; + by_yr[3] = 1.58113883008419*by[18]+1.224744871391589*by[10]+0.7071067811865475*by[5]; + by_yr[4] = 1.58113883008419*by[20]+1.224744871391589*by[11]+0.7071067811865475*by[7]; + by_yr[5] = 1.58113883008419*by[22]+1.224744871391589*by[16]+0.7071067811865475*by[9]; + by_yr[6] = 1.58113883008419*by[23]+1.224744871391589*by[17]+0.7071067811865475*by[13]; + by_yr[7] = 1.58113883008419*by[25]+1.224744871391589*by[19]+0.7071067811865475*by[15]; + by_yr[8] = 1.58113883008419*by[26]+1.224744871391589*by[24]+0.7071067811865475*by[21]; + bxby_yr[0] = 1.58113883008419*bxby[8]+1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yr[1] = 1.58113883008419*bxby[12]+1.224744871391589*bxby[4]+0.7071067811865475*bxby[1]; + bxby_yr[2] = 1.58113883008419*bxby[14]+1.224744871391589*bxby[6]+0.7071067811865475*bxby[3]; + bxby_yr[3] = 1.58113883008419*bxby[18]+1.224744871391589*bxby[10]+0.7071067811865475*bxby[5]; + bxby_yr[4] = 1.58113883008419*bxby[20]+1.224744871391589*bxby[11]+0.7071067811865475*bxby[7]; + bxby_yr[5] = 1.58113883008419*bxby[22]+1.224744871391589*bxby[16]+0.7071067811865475*bxby[9]; + bxby_yr[6] = 1.58113883008419*bxby[23]+1.224744871391589*bxby[17]+0.7071067811865475*bxby[13]; + bxby_yr[7] = 1.58113883008419*bxby[25]+1.224744871391589*bxby[19]+0.7071067811865475*bxby[15]; + bxby_yr[8] = 1.58113883008419*bxby[26]+1.224744871391589*bxby[24]+0.7071067811865475*bxby[21]; + byby_yr[0] = 1.58113883008419*byby[8]+1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yr[1] = 1.58113883008419*byby[12]+1.224744871391589*byby[4]+0.7071067811865475*byby[1]; + byby_yr[2] = 1.58113883008419*byby[14]+1.224744871391589*byby[6]+0.7071067811865475*byby[3]; + byby_yr[3] = 1.58113883008419*byby[18]+1.224744871391589*byby[10]+0.7071067811865475*byby[5]; + byby_yr[4] = 1.58113883008419*byby[20]+1.224744871391589*byby[11]+0.7071067811865475*byby[7]; + byby_yr[5] = 1.58113883008419*byby[22]+1.224744871391589*byby[16]+0.7071067811865475*byby[9]; + byby_yr[6] = 1.58113883008419*byby[23]+1.224744871391589*byby[17]+0.7071067811865475*byby[13]; + byby_yr[7] = 1.58113883008419*byby[25]+1.224744871391589*byby[19]+0.7071067811865475*byby[15]; + byby_yr[8] = 1.58113883008419*byby[26]+1.224744871391589*byby[24]+0.7071067811865475*byby[21]; + bybz_yr[0] = 1.58113883008419*bybz[8]+1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yr[1] = 1.58113883008419*bybz[12]+1.224744871391589*bybz[4]+0.7071067811865475*bybz[1]; + bybz_yr[2] = 1.58113883008419*bybz[14]+1.224744871391589*bybz[6]+0.7071067811865475*bybz[3]; + bybz_yr[3] = 1.58113883008419*bybz[18]+1.224744871391589*bybz[10]+0.7071067811865475*bybz[5]; + bybz_yr[4] = 1.58113883008419*bybz[20]+1.224744871391589*bybz[11]+0.7071067811865475*bybz[7]; + bybz_yr[5] = 1.58113883008419*bybz[22]+1.224744871391589*bybz[16]+0.7071067811865475*bybz[9]; + bybz_yr[6] = 1.58113883008419*bybz[23]+1.224744871391589*bybz[17]+0.7071067811865475*bybz[13]; + bybz_yr[7] = 1.58113883008419*bybz[25]+1.224744871391589*bybz[19]+0.7071067811865475*bybz[15]; + bybz_yr[8] = 1.58113883008419*bybz[26]+1.224744871391589*bybz[24]+0.7071067811865475*bybz[21]; + + double *bz_zl = &bvar_surf[144]; + double *bz_zr = &bvar_surf[153]; + double *bxbz_zl = &bvar_surf[162]; + double *bxbz_zr = &bvar_surf[171]; + double *bybz_zl = &bvar_surf[180]; + double *bybz_zr = &bvar_surf[189]; + double *bzbz_zl = &bvar_surf[198]; + double *bzbz_zr = &bvar_surf[207]; + + bz_zl[0] = 1.58113883008419*bz[9]-1.224744871391589*bz[3]+0.7071067811865475*bz[0]; + bz_zl[1] = 1.58113883008419*bz[15]-1.224744871391589*bz[5]+0.7071067811865475*bz[1]; + bz_zl[2] = 1.58113883008419*bz[16]-1.224744871391589*bz[6]+0.7071067811865475*bz[2]; + bz_zl[3] = 1.58113883008419*bz[19]-1.224744871391589*bz[10]+0.7071067811865475*bz[4]; + bz_zl[4] = 1.58113883008419*bz[21]-1.224744871391589*bz[13]+0.7071067811865475*bz[7]; + bz_zl[5] = 1.58113883008419*bz[22]-1.224744871391589*bz[14]+0.7071067811865475*bz[8]; + bz_zl[6] = 1.58113883008419*bz[24]-1.224744871391589*bz[17]+0.7071067811865475*bz[11]; + bz_zl[7] = 1.58113883008419*bz[25]-1.224744871391589*bz[18]+0.7071067811865475*bz[12]; + bz_zl[8] = 1.58113883008419*bz[26]-1.224744871391589*bz[23]+0.7071067811865475*bz[20]; + bxbz_zl[0] = 1.58113883008419*bxbz[9]-1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[0]; + bxbz_zl[1] = 1.58113883008419*bxbz[15]-1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[1]; + bxbz_zl[2] = 1.58113883008419*bxbz[16]-1.224744871391589*bxbz[6]+0.7071067811865475*bxbz[2]; + bxbz_zl[3] = 1.58113883008419*bxbz[19]-1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[4]; + bxbz_zl[4] = 1.58113883008419*bxbz[21]-1.224744871391589*bxbz[13]+0.7071067811865475*bxbz[7]; + bxbz_zl[5] = 1.58113883008419*bxbz[22]-1.224744871391589*bxbz[14]+0.7071067811865475*bxbz[8]; + bxbz_zl[6] = 1.58113883008419*bxbz[24]-1.224744871391589*bxbz[17]+0.7071067811865475*bxbz[11]; + bxbz_zl[7] = 1.58113883008419*bxbz[25]-1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[12]; + bxbz_zl[8] = 1.58113883008419*bxbz[26]-1.224744871391589*bxbz[23]+0.7071067811865475*bxbz[20]; + bybz_zl[0] = 1.58113883008419*bybz[9]-1.224744871391589*bybz[3]+0.7071067811865475*bybz[0]; + bybz_zl[1] = 1.58113883008419*bybz[15]-1.224744871391589*bybz[5]+0.7071067811865475*bybz[1]; + bybz_zl[2] = 1.58113883008419*bybz[16]-1.224744871391589*bybz[6]+0.7071067811865475*bybz[2]; + bybz_zl[3] = 1.58113883008419*bybz[19]-1.224744871391589*bybz[10]+0.7071067811865475*bybz[4]; + bybz_zl[4] = 1.58113883008419*bybz[21]-1.224744871391589*bybz[13]+0.7071067811865475*bybz[7]; + bybz_zl[5] = 1.58113883008419*bybz[22]-1.224744871391589*bybz[14]+0.7071067811865475*bybz[8]; + bybz_zl[6] = 1.58113883008419*bybz[24]-1.224744871391589*bybz[17]+0.7071067811865475*bybz[11]; + bybz_zl[7] = 1.58113883008419*bybz[25]-1.224744871391589*bybz[18]+0.7071067811865475*bybz[12]; + bybz_zl[8] = 1.58113883008419*bybz[26]-1.224744871391589*bybz[23]+0.7071067811865475*bybz[20]; + bzbz_zl[0] = 1.58113883008419*bzbz[9]-1.224744871391589*bzbz[3]+0.7071067811865475*bzbz[0]; + bzbz_zl[1] = 1.58113883008419*bzbz[15]-1.224744871391589*bzbz[5]+0.7071067811865475*bzbz[1]; + bzbz_zl[2] = 1.58113883008419*bzbz[16]-1.224744871391589*bzbz[6]+0.7071067811865475*bzbz[2]; + bzbz_zl[3] = 1.58113883008419*bzbz[19]-1.224744871391589*bzbz[10]+0.7071067811865475*bzbz[4]; + bzbz_zl[4] = 1.58113883008419*bzbz[21]-1.224744871391589*bzbz[13]+0.7071067811865475*bzbz[7]; + bzbz_zl[5] = 1.58113883008419*bzbz[22]-1.224744871391589*bzbz[14]+0.7071067811865475*bzbz[8]; + bzbz_zl[6] = 1.58113883008419*bzbz[24]-1.224744871391589*bzbz[17]+0.7071067811865475*bzbz[11]; + bzbz_zl[7] = 1.58113883008419*bzbz[25]-1.224744871391589*bzbz[18]+0.7071067811865475*bzbz[12]; + bzbz_zl[8] = 1.58113883008419*bzbz[26]-1.224744871391589*bzbz[23]+0.7071067811865475*bzbz[20]; + + bz_zr[0] = 1.58113883008419*bz[9]+1.224744871391589*bz[3]+0.7071067811865475*bz[0]; + bz_zr[1] = 1.58113883008419*bz[15]+1.224744871391589*bz[5]+0.7071067811865475*bz[1]; + bz_zr[2] = 1.58113883008419*bz[16]+1.224744871391589*bz[6]+0.7071067811865475*bz[2]; + bz_zr[3] = 1.58113883008419*bz[19]+1.224744871391589*bz[10]+0.7071067811865475*bz[4]; + bz_zr[4] = 1.58113883008419*bz[21]+1.224744871391589*bz[13]+0.7071067811865475*bz[7]; + bz_zr[5] = 1.58113883008419*bz[22]+1.224744871391589*bz[14]+0.7071067811865475*bz[8]; + bz_zr[6] = 1.58113883008419*bz[24]+1.224744871391589*bz[17]+0.7071067811865475*bz[11]; + bz_zr[7] = 1.58113883008419*bz[25]+1.224744871391589*bz[18]+0.7071067811865475*bz[12]; + bz_zr[8] = 1.58113883008419*bz[26]+1.224744871391589*bz[23]+0.7071067811865475*bz[20]; + bxbz_zr[0] = 1.58113883008419*bxbz[9]+1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[0]; + bxbz_zr[1] = 1.58113883008419*bxbz[15]+1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[1]; + bxbz_zr[2] = 1.58113883008419*bxbz[16]+1.224744871391589*bxbz[6]+0.7071067811865475*bxbz[2]; + bxbz_zr[3] = 1.58113883008419*bxbz[19]+1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[4]; + bxbz_zr[4] = 1.58113883008419*bxbz[21]+1.224744871391589*bxbz[13]+0.7071067811865475*bxbz[7]; + bxbz_zr[5] = 1.58113883008419*bxbz[22]+1.224744871391589*bxbz[14]+0.7071067811865475*bxbz[8]; + bxbz_zr[6] = 1.58113883008419*bxbz[24]+1.224744871391589*bxbz[17]+0.7071067811865475*bxbz[11]; + bxbz_zr[7] = 1.58113883008419*bxbz[25]+1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[12]; + bxbz_zr[8] = 1.58113883008419*bxbz[26]+1.224744871391589*bxbz[23]+0.7071067811865475*bxbz[20]; + bybz_zr[0] = 1.58113883008419*bybz[9]+1.224744871391589*bybz[3]+0.7071067811865475*bybz[0]; + bybz_zr[1] = 1.58113883008419*bybz[15]+1.224744871391589*bybz[5]+0.7071067811865475*bybz[1]; + bybz_zr[2] = 1.58113883008419*bybz[16]+1.224744871391589*bybz[6]+0.7071067811865475*bybz[2]; + bybz_zr[3] = 1.58113883008419*bybz[19]+1.224744871391589*bybz[10]+0.7071067811865475*bybz[4]; + bybz_zr[4] = 1.58113883008419*bybz[21]+1.224744871391589*bybz[13]+0.7071067811865475*bybz[7]; + bybz_zr[5] = 1.58113883008419*bybz[22]+1.224744871391589*bybz[14]+0.7071067811865475*bybz[8]; + bybz_zr[6] = 1.58113883008419*bybz[24]+1.224744871391589*bybz[17]+0.7071067811865475*bybz[11]; + bybz_zr[7] = 1.58113883008419*bybz[25]+1.224744871391589*bybz[18]+0.7071067811865475*bybz[12]; + bybz_zr[8] = 1.58113883008419*bybz[26]+1.224744871391589*bybz[23]+0.7071067811865475*bybz[20]; + bzbz_zr[0] = 1.58113883008419*bzbz[9]+1.224744871391589*bzbz[3]+0.7071067811865475*bzbz[0]; + bzbz_zr[1] = 1.58113883008419*bzbz[15]+1.224744871391589*bzbz[5]+0.7071067811865475*bzbz[1]; + bzbz_zr[2] = 1.58113883008419*bzbz[16]+1.224744871391589*bzbz[6]+0.7071067811865475*bzbz[2]; + bzbz_zr[3] = 1.58113883008419*bzbz[19]+1.224744871391589*bzbz[10]+0.7071067811865475*bzbz[4]; + bzbz_zr[4] = 1.58113883008419*bzbz[21]+1.224744871391589*bzbz[13]+0.7071067811865475*bzbz[7]; + bzbz_zr[5] = 1.58113883008419*bzbz[22]+1.224744871391589*bzbz[14]+0.7071067811865475*bzbz[8]; + bzbz_zr[6] = 1.58113883008419*bzbz[24]+1.224744871391589*bzbz[17]+0.7071067811865475*bzbz[11]; + bzbz_zr[7] = 1.58113883008419*bzbz[25]+1.224744871391589*bzbz[18]+0.7071067811865475*bzbz[12]; + bzbz_zr[8] = 1.58113883008419*bzbz[26]+1.224744871391589*bzbz[23]+0.7071067811865475*bzbz[20]; } + diff --git a/kernels/maxwell/gkyl_maxwell_kernels.h b/kernels/maxwell/gkyl_maxwell_kernels.h index a77b76227..62e5df90f 100644 --- a/kernels/maxwell/gkyl_maxwell_kernels.h +++ b/kernels/maxwell/gkyl_maxwell_kernels.h @@ -12,26 +12,22 @@ GKYL_CU_DH double maxwell_vol_1x_ser_p2(const gkyl_maxwell_inp *meq, const doubl GKYL_CU_DH double maxwell_surfx_1x_ser_p2(const gkyl_maxwell_inp *meq, const double *w, const double *dx, const double *ql, const double *qc, const double *qr, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_BB_1x_ser_p1(const double *em, double* GKYL_RESTRICT out); -GKYL_CU_DH void em_calc_surf_BB_1x_ser_p1(const double *em, double* GKYL_RESTRICT out_surf); GKYL_CU_DH void em_calc_num_ExB_1x_ser_p1(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf); +GKYL_CU_DH void em_surf_set_bvar_1x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); GKYL_CU_DH void em_copy_bvar_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_surf_copy_bvar_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH void em_copy_ExB_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); GKYL_CU_DH void em_div_b_x_1x_ser_p1(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); GKYL_CU_DH void em_calc_BB_1x_ser_p2(const double *em, double* GKYL_RESTRICT out); -GKYL_CU_DH void em_calc_surf_BB_1x_ser_p2(const double *em, double* GKYL_RESTRICT out_surf); GKYL_CU_DH void em_calc_num_ExB_1x_ser_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf); +GKYL_CU_DH void em_surf_set_bvar_1x_ser_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); GKYL_CU_DH void em_copy_bvar_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_surf_copy_bvar_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH void em_copy_ExB_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); GKYL_CU_DH void em_div_b_x_1x_ser_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, @@ -46,13 +42,11 @@ GKYL_CU_DH double maxwell_surfx_2x_ser_p2(const gkyl_maxwell_inp *meq, const dou GKYL_CU_DH double maxwell_surfy_2x_ser_p2(const gkyl_maxwell_inp *meq, const double *w, const double *dx, const double *ql, const double *qc, const double *qr, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_BB_2x_ser_p1(const double *em, double* GKYL_RESTRICT out); -GKYL_CU_DH void em_calc_surf_BB_2x_ser_p1(const double *em, double* GKYL_RESTRICT out_surf); GKYL_CU_DH void em_calc_num_ExB_2x_ser_p1(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf); +GKYL_CU_DH void em_surf_set_bvar_2x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); GKYL_CU_DH void em_copy_bvar_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_surf_copy_bvar_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH void em_copy_ExB_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); GKYL_CU_DH void em_div_b_x_2x_ser_p1(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, @@ -62,13 +56,11 @@ GKYL_CU_DH void em_div_b_y_2x_ser_p1(const double *dxv, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); GKYL_CU_DH void em_calc_BB_2x_ser_p2(const double *em, double* GKYL_RESTRICT out); -GKYL_CU_DH void em_calc_surf_BB_2x_ser_p2(const double *em, double* GKYL_RESTRICT out_surf); GKYL_CU_DH void em_calc_num_ExB_2x_ser_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_2x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_2x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf); +GKYL_CU_DH void em_surf_set_bvar_2x_ser_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_2x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); GKYL_CU_DH void em_copy_bvar_2x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_surf_copy_bvar_2x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH void em_copy_ExB_2x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); GKYL_CU_DH void em_div_b_x_2x_ser_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, @@ -88,13 +80,11 @@ GKYL_CU_DH double maxwell_surfy_3x_ser_p2(const gkyl_maxwell_inp *meq, const dou GKYL_CU_DH double maxwell_surfz_3x_ser_p2(const gkyl_maxwell_inp *meq, const double *w, const double *dx, const double *ql, const double *qc, const double *qr, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_BB_3x_ser_p1(const double *em, double* GKYL_RESTRICT out); -GKYL_CU_DH void em_calc_surf_BB_3x_ser_p1(const double *em, double* GKYL_RESTRICT out_surf); GKYL_CU_DH void em_calc_num_ExB_3x_ser_p1(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf); +GKYL_CU_DH void em_surf_set_bvar_3x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); GKYL_CU_DH void em_copy_bvar_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_surf_copy_bvar_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH void em_copy_ExB_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); GKYL_CU_DH void em_div_b_x_3x_ser_p1(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, @@ -107,13 +97,11 @@ GKYL_CU_DH void em_div_b_z_3x_ser_p1(const double *dxv, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); GKYL_CU_DH void em_calc_BB_3x_ser_p2(const double *em, double* GKYL_RESTRICT out); -GKYL_CU_DH void em_calc_surf_BB_3x_ser_p2(const double *em, double* GKYL_RESTRICT out_surf); GKYL_CU_DH void em_calc_num_ExB_3x_ser_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_3x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_3x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf); +GKYL_CU_DH void em_surf_set_bvar_3x_ser_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_3x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); GKYL_CU_DH void em_copy_bvar_3x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_surf_copy_bvar_3x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH void em_copy_ExB_3x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); GKYL_CU_DH void em_div_b_x_3x_ser_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, @@ -130,13 +118,11 @@ GKYL_CU_DH double maxwell_surfx_2x_tensor_p2(const gkyl_maxwell_inp *meq, const GKYL_CU_DH double maxwell_surfy_2x_tensor_p2(const gkyl_maxwell_inp *meq, const double *w, const double *dx, const double *ql, const double *qc, const double *qr, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_BB_2x_tensor_p2(const double *em, double* GKYL_RESTRICT out); -GKYL_CU_DH void em_calc_surf_BB_2x_tensor_p2(const double *em, double* GKYL_RESTRICT out_surf); GKYL_CU_DH void em_calc_num_ExB_2x_tensor_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf); +GKYL_CU_DH void em_surf_set_bvar_2x_tensor_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); GKYL_CU_DH void em_copy_bvar_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_surf_copy_bvar_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH void em_copy_ExB_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); GKYL_CU_DH void em_div_b_x_2x_tensor_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, @@ -151,13 +137,11 @@ GKYL_CU_DH double maxwell_surfy_3x_tensor_p2(const gkyl_maxwell_inp *meq, const GKYL_CU_DH double maxwell_surfz_3x_tensor_p2(const gkyl_maxwell_inp *meq, const double *w, const double *dx, const double *ql, const double *qc, const double *qr, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_BB_3x_tensor_p2(const double *em, double* GKYL_RESTRICT out); -GKYL_CU_DH void em_calc_surf_BB_3x_tensor_p2(const double *em, double* GKYL_RESTRICT out_surf); GKYL_CU_DH void em_calc_num_ExB_3x_tensor_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_3x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_3x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf); +GKYL_CU_DH void em_surf_set_bvar_3x_tensor_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_3x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); GKYL_CU_DH void em_copy_bvar_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_surf_copy_bvar_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2_surf, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH void em_copy_ExB_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); GKYL_CU_DH void em_div_b_x_3x_tensor_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, diff --git a/zero/dg_calc_em_vars.c b/zero/dg_calc_em_vars.c index f976be7a0..a9ea6534d 100644 --- a/zero/dg_calc_em_vars.c +++ b/zero/dg_calc_em_vars.c @@ -24,28 +24,24 @@ gkyl_dg_calc_em_vars_new(const struct gkyl_rect_grid *conf_grid, up->conf_grid = *conf_grid; int nc = cbasis->num_basis; int cdim = cbasis->ndim; - enum gkyl_basis_type b_type = cbasis->b_type; int poly_order = cbasis->poly_order; - int nc_surf = cbasis->num_basis/(poly_order+1); // *only valid for tensor bases for cdim > 1* + enum gkyl_basis_type b_type = cbasis->b_type; up->cdim = cdim; up->poly_order = poly_order; + up->mem_range = *mem_range; if (is_ExB) { up->Ncomp = 3; - up->Ncomp_surf = 2*cdim; // Surface E x B NYI! up->em_calc_temp = choose_em_calc_num_ExB_kern(b_type, cdim, poly_order); up->em_set = choose_em_set_ExB_kern(b_type, cdim, poly_order); up->em_copy = choose_em_copy_ExB_kern(b_type, cdim, poly_order); } else { up->Ncomp = 6; - up->Ncomp_surf = 2*cdim*3; up->em_calc_temp = choose_em_calc_BB_kern(b_type, cdim, poly_order); - up->em_calc_surf_temp = choose_em_calc_surf_BB_kern(b_type, cdim, poly_order); up->em_set = choose_em_set_bvar_kern(b_type, cdim, poly_order); up->em_surf_set = choose_em_surf_set_bvar_kern(b_type, cdim, poly_order); - up->em_copy = choose_em_copy_bvar_kern(b_type, cdim, poly_order); - up->em_surf_copy = choose_em_surf_copy_bvar_kern(b_type, cdim, poly_order); + up->em_copy = choose_em_copy_bvar_kern(b_type, cdim, poly_order); // Fetch the kernels in each direction for (int d=0; dem_div_b[d] = choose_em_div_b_kern(d, b_type, cdim, poly_order); @@ -60,19 +56,6 @@ gkyl_dg_calc_em_vars_new(const struct gkyl_rect_grid *conf_grid, // or (E x B)_i and B_i^2 (for computing E x B/|B|^2) up->temp_var = gkyl_array_new(GKYL_DOUBLE, 6*nc, mem_range->volume); - // There are Ncomp_surf*range->volume linear systems to be solved - // Each linear system is nc_surf x nc_surf (only solved over the surface basis and only when poly_order and cdim > 1) - // 2*cdim*3: bxbx, bxby, bxbz (xl and xr), byby, bxby, bybz (yl and yr), bzbz, bxbz, bybz (zl and zr) - // bx (xl and xr), by (yl and yr), and bz (zl and zr) constructed during copy method with sqrt_with_sign - up->As_surf = gkyl_nmat_new(up->Ncomp_surf*mem_range->volume, nc_surf, nc_surf); - up->xs_surf = gkyl_nmat_new(up->Ncomp_surf*mem_range->volume, nc_surf, 1); - up->mem_surf = gkyl_nmat_linsolve_lu_new(up->As_surf->num, up->As_surf->nr); - // 10*cdim component temporary variable for storing Bx^2, By^2, Bz^2 and two components of B_i B_j at the surface - // Temporary variables are computed at the left and right in each dimension (xl, xr, yl, yr, zl, & zr) - up->temp_var_surf = gkyl_array_new(GKYL_DOUBLE, 10*cdim*nc_surf, mem_range->volume); - - up->mem_range = *mem_range; - up->flags = 0; GKYL_CLEAR_CU_ALLOC(up->flags); up->on_dev = up; // self-reference on host @@ -126,53 +109,22 @@ void gkyl_dg_calc_em_vars_advance(struct gkyl_dg_calc_em_vars *up, } void gkyl_dg_calc_em_vars_surf_advance(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2_surf, struct gkyl_array* bvar_surf) + const struct gkyl_array* bvar, struct gkyl_array* bvar_surf) { #ifdef GKYL_HAVE_CUDA if (gkyl_array_is_cu_dev(bvar_surf)) { - return gkyl_dg_calc_em_vars_surf_advance_cu(up, em, cell_avg_magB2_surf, bvar_surf); + return gkyl_dg_calc_em_vars_surf_advance_cu(up, bvar, bvar_surf); } #endif - gkyl_array_clear(up->temp_var_surf, 0.0); - - // First loop over mem_range for setting matrices to solve linear systems - // to compute surface magnetic field unit tensor and vector struct gkyl_range_iter iter; gkyl_range_iter_init(&iter, &up->mem_range); - long count = 0; while (gkyl_range_iter_next(&iter)) { long loc = gkyl_range_idx(&up->mem_range, iter.idx); - const double *em_d = gkyl_array_cfetch(em, loc); - int* cell_avg_magB2_surf_d = gkyl_array_fetch(cell_avg_magB2_surf, loc); - - up->em_calc_surf_temp(em_d, gkyl_array_fetch(up->temp_var_surf, loc)); - - up->em_surf_set(count, up->As_surf, up->xs_surf, - gkyl_array_cfetch(up->temp_var_surf, loc), cell_avg_magB2_surf_d); - - count += up->Ncomp_surf; - } - - // Only need to solve the linear system if both poly_order and cdim > 1 - if (up->poly_order > 1 && up->cdim > 1) { - bool status = gkyl_nmat_linsolve_lu_pa(up->mem_surf, up->As_surf, up->xs_surf); - assert(status); + const double *bvar_d = gkyl_array_cfetch(bvar, loc); + double *bvar_surf_d = gkyl_array_fetch(bvar_surf, loc); + up->em_surf_set(bvar_d, bvar_surf_d); } - - gkyl_range_iter_init(&iter, &up->mem_range); - count = 0; - while (gkyl_range_iter_next(&iter)) { - long loc = gkyl_range_idx(&up->mem_range, iter.idx); - - const double *em_d = gkyl_array_cfetch(em, loc); - int* cell_avg_magB2_surf_d = gkyl_array_fetch(cell_avg_magB2_surf, loc); - double* bvar_surf_d = gkyl_array_fetch(bvar_surf, loc); - - up->em_surf_copy(count, up->xs_surf, em_d, cell_avg_magB2_surf_d, bvar_surf_d); - - count += up->Ncomp_surf; - } } void gkyl_dg_calc_em_vars_div_b(struct gkyl_dg_calc_em_vars *up, const struct gkyl_range *conf_range, @@ -224,11 +176,6 @@ void gkyl_dg_calc_em_vars_release(gkyl_dg_calc_em_vars *up) gkyl_nmat_release(up->xs); gkyl_nmat_linsolve_lu_release(up->mem); gkyl_array_release(up->temp_var); - - gkyl_nmat_release(up->As_surf); - gkyl_nmat_release(up->xs_surf); - gkyl_nmat_linsolve_lu_release(up->mem_surf); - gkyl_array_release(up->temp_var_surf); if (GKYL_IS_CU_ALLOC(up->flags)) gkyl_cu_free(up->on_dev); diff --git a/zero/dg_calc_em_vars_cu.cu b/zero/dg_calc_em_vars_cu.cu index 0aedc27e9..cb50bded6 100644 --- a/zero/dg_calc_em_vars_cu.cu +++ b/zero/dg_calc_em_vars_cu.cu @@ -94,9 +94,8 @@ void gkyl_dg_calc_em_vars_advance_cu(struct gkyl_dg_calc_em_vars *up, } __global__ static void -gkyl_dg_calc_em_vars_surf_set_cu_kernel(struct gkyl_dg_calc_em_vars* up, - struct gkyl_nmat *As, struct gkyl_nmat *xs, struct gkyl_range conf_range, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2_surf, struct gkyl_array* temp_var_surf) +gkyl_dg_calc_em_vars_surf_set_cu_kernel(gkyl_dg_calc_em_vars* up, struct gkyl_range conf_range, + const struct gkyl_array* bvar, struct gkyl_array* bvar_surf) { int idx[GKYL_MAX_DIM]; @@ -112,66 +111,21 @@ gkyl_dg_calc_em_vars_surf_set_cu_kernel(struct gkyl_dg_calc_em_vars* up, // convert back to a linear index on the super-range (with ghost cells) // linc will have jumps in it to jump over ghost cells long loc = gkyl_range_idx(&conf_range, idx); - // fetch the correct count in the matrix (since we solve Ncomp systems in each cell) - long count = linc1*up->Ncomp_surf; - - const double *em_d = (const double*) gkyl_array_cfetch(em, loc); - int *cell_avg_magB2_surf_d = (int*) gkyl_array_fetch(cell_avg_magB2_surf, loc); - - up->em_calc_surf_temp(em_d, (double*) gkyl_array_fetch(temp_var_surf, loc)); - up->em_surf_set(count, As, xs, - (const double*) gkyl_array_cfetch(temp_var_surf, loc), cell_avg_magB2_surf_d); - } -} -__global__ static void -gkyl_dg_calc_em_vars_surf_copy_cu_kernel(struct gkyl_dg_calc_em_vars* up, - struct gkyl_nmat *xs, struct gkyl_range conf_range, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2_surf, struct gkyl_array* bvar_surf) -{ - int idx[GKYL_MAX_DIM]; - - for (unsigned long linc1 = threadIdx.x + blockIdx.x*blockDim.x; - linc1 < conf_range.volume; - linc1 += gridDim.x*blockDim.x) - { - // inverse index from linc1 to idx - // must use gkyl_sub_range_inv_idx so that linc1=0 maps to idx={1,1,...} - // since update_range is a subrange - gkyl_sub_range_inv_idx(&conf_range, linc1, idx); - - // convert back to a linear index on the super-range (with ghost cells) - // linc will have jumps in it to jump over ghost cells - long loc = gkyl_range_idx(&conf_range, idx); - // fetch the correct count in the matrix (since we solve Ncomp_surf systems in each cell) - long count = linc1*up->Ncomp_surf; - - const double *em_d = (const double*) gkyl_array_cfetch(em, loc); - int *cell_avg_magB2_surf_d = (int*) gkyl_array_fetch(cell_avg_magB2_surf, loc); + const double *bvar_d = (const double*) gkyl_array_cfetch(bvar, loc); double *bvar_surf_d = (double*) gkyl_array_fetch(bvar_surf, loc); - up->em_surf_copy(count, xs, em_d, cell_avg_magB2_surf_d, bvar_surf_d); + up->em_surf_set(bvar_d, bvar_surf_d); } } void gkyl_dg_calc_em_vars_surf_advance_cu(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2_surf, struct gkyl_array* bvar_surf) + const struct gkyl_array* bvar, struct gkyl_array* bvar_surf) { - gkyl_array_clear(up->temp_var_surf, 0.0); struct gkyl_range conf_range = up->mem_range; - - gkyl_dg_calc_em_vars_surf_set_cu_kernel<<>>(up->on_dev, - up->As_surf->on_dev, up->xs_surf->on_dev, conf_range, - em->on_dev, cell_avg_magB2_surf->on_dev, up->temp_var_surf->on_dev); - if (up->poly_order > 1 && up->cdim > 1) { - bool status = gkyl_nmat_linsolve_lu_pa(up->mem_surf, up->As_surf, up->xs_surf); - assert(status); - } - - gkyl_dg_calc_em_vars_surf_copy_cu_kernel<<>>(up->on_dev, - up->xs_surf->on_dev, conf_range, - em->on_dev, cell_avg_magB2_surf->on_dev, bvar_surf->on_dev); + gkyl_dg_calc_em_vars_surf_set_cu_kernel<<>>(up->on_dev, + conf_range, bvar->on_dev, bvar_surf->on_dev); } __global__ void @@ -245,11 +199,9 @@ dg_calc_em_vars_set_cu_dev_ptrs(struct gkyl_dg_calc_em_vars *up, enum gkyl_basis } else { up->em_calc_temp = choose_em_calc_BB_kern(b_type, cdim, poly_order); - up->em_calc_surf_temp = choose_em_calc_surf_BB_kern(b_type, cdim, poly_order); up->em_set = choose_em_set_bvar_kern(b_type, cdim, poly_order); up->em_surf_set = choose_em_surf_set_bvar_kern(b_type, cdim, poly_order); up->em_copy = choose_em_copy_bvar_kern(b_type, cdim, poly_order); - up->em_surf_copy = choose_em_surf_copy_bvar_kern(b_type, cdim, poly_order); // Fetch the kernels in each direction for (int d=0; dem_div_b[d] = choose_em_div_b_kern(d, b_type, cdim, poly_order); @@ -267,20 +219,15 @@ gkyl_dg_calc_em_vars_cu_dev_new(const struct gkyl_rect_grid *conf_grid, int nc = cbasis->num_basis; int cdim = cbasis->ndim; int poly_order = cbasis->poly_order; - int nc_surf = cbasis->num_basis/(poly_order+1); // *only valid for tensor bases for cdim > 1* enum gkyl_basis_type b_type = cbasis->b_type; up->cdim = cdim; up->poly_order = poly_order; up->mem_range = *mem_range; - if (is_ExB) { + if (is_ExB) up->Ncomp = 3; - up->Ncomp_surf = 2*cdim; - } - else { + else up->Ncomp = 6; - up->Ncomp_surf = 2*cdim*3; - } // There are Ncomp more linear systems to be solved // 6 components of bb and 3 components of E x B @@ -291,17 +238,6 @@ gkyl_dg_calc_em_vars_cu_dev_new(const struct gkyl_rect_grid *conf_grid, // or (E x B)_i and B_i^2 (for computing E x B/|B|^2) up->temp_var = gkyl_array_cu_dev_new(GKYL_DOUBLE, 6*nc, mem_range->volume); - // There are Ncomp_surf*range->volume linear systems to be solved - // Each linear system is nc_surf x nc_surf (only solved over the surface basis and only when poly_order and cdim > 1) - // 2*cdim*3: bxbx, bxby, bxbz (xl and xr), byby, bxby, bybz (yl and yr), bzbz, bxbz, bybz (zl and zr) - // bx (xl and xr), by (yl and yr), and bz (zl and zr) constructed during copy method with sqrt_with_sign - up->As_surf = gkyl_nmat_cu_dev_new(up->Ncomp_surf*mem_range->volume, nc_surf, nc_surf); - up->xs_surf = gkyl_nmat_cu_dev_new(up->Ncomp_surf*mem_range->volume, nc_surf, 1); - up->mem_surf = gkyl_nmat_linsolve_lu_cu_dev_new(up->As_surf->num, up->As_surf->nr); - // 10*cdim component temporary variable for storing Bx^2, By^2, Bz^2 and two components of B_i B_j at the surface - // Temporary variables are computed at the left and right in each dimension (xl, xr, yl, yr, zl, & zr) - up->temp_var_surf = gkyl_array_cu_dev_new(GKYL_DOUBLE, 10*cdim*nc_surf, mem_range->volume); - up->flags = 0; GKYL_SET_CU_ALLOC(up->flags); diff --git a/zero/gkyl_dg_calc_em_vars.h b/zero/gkyl_dg_calc_em_vars.h index 9096c29ed..30aa7b3fd 100644 --- a/zero/gkyl_dg_calc_em_vars.h +++ b/zero/gkyl_dg_calc_em_vars.h @@ -62,20 +62,17 @@ void gkyl_dg_calc_em_vars_advance(struct gkyl_dg_calc_em_vars *up, /** * Compute surface expansion of bvar * - * @param up Updater for computing pkpm variables - * @param em Input array which contain EM fields (Ex, Ey, Ez, Bx, By, Bz) - * @param cell_avg_magB2_surf Array for storing boolean value of whether |B|^2 on the surface - * uses *only* cell averages (2*cdim components: xl, xr, yl, yr, zl, & zr) - * to minimize positivity violations (default: false) - * @param bvar_surf Output array of surface expansions of bvar + * @param up Updater for computing em variables + * @param bvar Input array of volume expansion of bvar + * @param bvar_surf Output array of surface expansions of bvar */ void gkyl_dg_calc_em_vars_surf_advance(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2_surf, struct gkyl_array* bvar_surf); + const struct gkyl_array* bvar, struct gkyl_array* bvar_surf); /** * Compute div(b) and max(|b_i|) penalization * - * @param up Updater for computing pkpm variables + * @param up Updater for computing em variables * @param conf_range Configuration space range * @param bvar_surf Input array of surface expansions of bvar * @param bvar Input array of volume expansion of bvar @@ -101,7 +98,7 @@ void gkyl_dg_calc_em_vars_advance_cu(struct gkyl_dg_calc_em_vars *up, const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2, struct gkyl_array* out); void gkyl_dg_calc_em_vars_surf_advance_cu(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2_surf, struct gkyl_array* bvar_surf); + const struct gkyl_array* bvar, struct gkyl_array* bvar_surf); void gkyl_dg_calc_em_vars_div_b_cu(struct gkyl_dg_calc_em_vars *up, const struct gkyl_range *conf_range, const struct gkyl_array* bvar_surf, const struct gkyl_array* bvar, diff --git a/zero/gkyl_dg_calc_em_vars_priv.h b/zero/gkyl_dg_calc_em_vars_priv.h index 75e69253a..2fa53ab3c 100644 --- a/zero/gkyl_dg_calc_em_vars_priv.h +++ b/zero/gkyl_dg_calc_em_vars_priv.h @@ -12,7 +12,7 @@ typedef void (*em_calc_temp_t)(const double *em, double* GKYL_RESTRICT out); typedef int (*em_set_t)(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *temp); -typedef void (*em_surf_set_t)(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB_surf, int* cell_avg_magB2_surf); +typedef void (*em_surf_set_t)(const double *bvar, double* GKYL_RESTRICT bvar_surf); typedef void (*em_copy_t)(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT out); typedef void (*em_div_b_t)(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, @@ -20,13 +20,11 @@ typedef void (*em_div_b_t)(const double *dxv, // for use in kernel tables typedef struct { em_calc_temp_t kernels[3]; } gkyl_dg_em_calc_BB_kern_list; -typedef struct { em_calc_temp_t kernels[3]; } gkyl_dg_em_calc_surf_BB_kern_list; typedef struct { em_calc_temp_t kernels[3]; } gkyl_dg_em_calc_num_ExB_kern_list; typedef struct { em_set_t kernels[3]; } gkyl_dg_em_set_bvar_kern_list; typedef struct { em_set_t kernels[3]; } gkyl_dg_em_set_ExB_kern_list; typedef struct { em_surf_set_t kernels[3]; } gkyl_dg_em_surf_set_bvar_kern_list; typedef struct { em_copy_t kernels[3]; } gkyl_dg_em_copy_bvar_kern_list; -typedef struct { em_copy_t kernels[3]; } gkyl_dg_em_surf_copy_bvar_kern_list; typedef struct { em_copy_t kernels[3]; } gkyl_dg_em_copy_ExB_kern_list; typedef struct { em_div_b_t kernels[3]; } gkyl_dg_em_div_b_kern_list; @@ -41,17 +39,10 @@ struct gkyl_dg_calc_em_vars { struct gkyl_array *temp_var; // intermediate variable for storing weak multiplications int Ncomp; // number of components in the linear solve (3 for E x B, 6 for bb) - struct gkyl_nmat *As_surf, *xs_surf; // matrices for LHS and RHS for surface variable solve - gkyl_nmat_mem *mem_surf; // memory for use in batched linear solve for surface variables - struct gkyl_array *temp_var_surf; // intermediate variable for storing weak multiplications of surface expansions - int Ncomp_surf; // number of components in the surface linear solve (4*cdim) - em_calc_temp_t em_calc_temp; // kernel for intermediate variable computation - em_calc_temp_t em_calc_surf_temp; // kernel for intermediate surface variable computation em_set_t em_set; // kernel for setting matrices for linear solve em_surf_set_t em_surf_set; // kernel for getting surface expansions of bvar em_copy_t em_copy; // kernel for copying solution to output - em_copy_t em_surf_copy; // kernel for copying solution of surface expansion solve to output em_div_b_t em_div_b[3]; // kernel for computing div(b) and max(|b_i|) penalization uint32_t flags; @@ -74,22 +65,6 @@ static const gkyl_dg_em_calc_BB_kern_list ten_em_calc_BB_kernels[] = { { NULL, em_calc_BB_3x_ser_p1, em_calc_BB_3x_tensor_p2 }, // 2 }; -// Compute surface BB tensor for computing surface bb and b (Serendipity basis) -GKYL_CU_D -static const gkyl_dg_em_calc_surf_BB_kern_list ser_em_calc_surf_BB_kernels[] = { - { NULL, em_calc_surf_BB_1x_ser_p1, em_calc_surf_BB_1x_ser_p2 }, // 0 - { NULL, em_calc_surf_BB_2x_ser_p1, NULL }, // 1 - { NULL, em_calc_surf_BB_3x_ser_p1, NULL }, // 2 -}; - -// Compute surface BB tensor for computing surface bb and b (Tensor basis) -GKYL_CU_D -static const gkyl_dg_em_calc_surf_BB_kern_list ten_em_calc_surf_BB_kernels[] = { - { NULL, em_calc_surf_BB_1x_ser_p1, em_calc_surf_BB_1x_ser_p2 }, // 0 - { NULL, em_calc_surf_BB_2x_ser_p1, em_calc_surf_BB_2x_tensor_p2 }, // 1 - { NULL, em_calc_surf_BB_3x_ser_p1, em_calc_surf_BB_3x_tensor_p2 }, // 2 -}; - // Compute (E x B)_i and B_i^2 (numerator and denominator of E x B velocity) (Serendipity basis) GKYL_CU_D static const gkyl_dg_em_calc_num_ExB_kern_list ser_em_calc_num_ExB_kernels[] = { @@ -170,22 +145,6 @@ static const gkyl_dg_em_copy_bvar_kern_list ten_em_copy_bvar_kernels[] = { { NULL, em_copy_bvar_3x_ser_p1, em_copy_bvar_3x_tensor_p2 }, // 2 }; -// Magnetic field unit vector and unit tensor kernel list copy solution (Serendipity basis) -GKYL_CU_D -static const gkyl_dg_em_surf_copy_bvar_kern_list ser_em_surf_copy_bvar_kernels[] = { - { NULL, em_surf_copy_bvar_1x_ser_p1, em_surf_copy_bvar_1x_ser_p2 }, // 0 - { NULL, em_surf_copy_bvar_2x_ser_p1, NULL }, // 1 - { NULL, em_surf_copy_bvar_3x_ser_p1, NULL }, // 2 -}; - -// Magnetic field unit vector and unit tensor kernel list copy solution (Tensor basis) -GKYL_CU_D -static const gkyl_dg_em_surf_copy_bvar_kern_list ten_em_surf_copy_bvar_kernels[] = { - { NULL, em_surf_copy_bvar_1x_ser_p1, em_surf_copy_bvar_1x_ser_p2 }, // 0 - { NULL, em_surf_copy_bvar_2x_ser_p1, em_surf_copy_bvar_2x_tensor_p2 }, // 1 - { NULL, em_surf_copy_bvar_3x_ser_p1, em_surf_copy_bvar_3x_tensor_p2 }, // 2 -}; - // E x B velocity kernel list copy solution (Serendipity basis) GKYL_CU_D static const gkyl_dg_em_copy_ExB_kern_list ser_em_copy_ExB_kernels[] = { @@ -201,8 +160,7 @@ static const gkyl_dg_em_copy_ExB_kern_list ten_em_copy_ExB_kernels[] = { { NULL, em_copy_ExB_3x_ser_p1, em_copy_ExB_3x_tensor_p2 }, // 2 }; -// PKPM acceleration variables, e.g., bb:grad(u), -// and Lax penalization (lambda_i = |u_i| + sqrt(3*T_ii/m)) (in x) (Serendipity kernels) +// div(b) and max(|b_i|) penalization (in x) (Serendipity kernels) GKYL_CU_D static const gkyl_dg_em_div_b_kern_list ser_em_div_b_x_kernels[] = { { NULL, em_div_b_x_1x_ser_p1, em_div_b_x_1x_ser_p2 }, // 0 @@ -210,8 +168,7 @@ static const gkyl_dg_em_div_b_kern_list ser_em_div_b_x_kernels[] = { { NULL, em_div_b_x_3x_ser_p1, NULL }, // 2 }; -// PKPM acceleration variables, e.g., bb:grad(u), -// and Lax penalization (lambda_i = |u_i| + sqrt(3*T_ii/m)) (in y) (Serendipity kernels) +// div(b) and max(|b_i|) penalization (in y) (Serendipity kernels) GKYL_CU_D static const gkyl_dg_em_div_b_kern_list ser_em_div_b_y_kernels[] = { { NULL, NULL, NULL }, // 0 @@ -219,8 +176,7 @@ static const gkyl_dg_em_div_b_kern_list ser_em_div_b_y_kernels[] = { { NULL, em_div_b_y_3x_ser_p1, NULL }, // 2 }; -// PKPM acceleration variables, e.g., bb:grad(u), -// and Lax penalization (lambda_i = |u_i| + sqrt(3*T_ii/m)) (in z) (Serendipity kernels) +// div(b) and max(|b_i|) penalization (in z) (Serendipity kernels) GKYL_CU_D static const gkyl_dg_em_div_b_kern_list ser_em_div_b_z_kernels[] = { { NULL, NULL, NULL }, // 0 @@ -228,8 +184,7 @@ static const gkyl_dg_em_div_b_kern_list ser_em_div_b_z_kernels[] = { { NULL, em_div_b_z_3x_ser_p1, NULL }, // 2 }; -// PKPM acceleration variables, e.g., bb:grad(u), -// and Lax penalization (lambda_i = |u_i| + sqrt(3*T_ii/m)) (in x) (Tensor kernels) +// div(b) and max(|b_i|) penalization (in x) (Tensor kernels) GKYL_CU_D static const gkyl_dg_em_div_b_kern_list ten_em_div_b_x_kernels[] = { { NULL, em_div_b_x_1x_ser_p1, em_div_b_x_1x_ser_p2 }, // 0 @@ -237,8 +192,7 @@ static const gkyl_dg_em_div_b_kern_list ten_em_div_b_x_kernels[] = { { NULL, em_div_b_x_3x_ser_p1, NULL }, // 2 }; -// PKPM acceleration variables, e.g., bb:grad(u), -// and Lax penalization (lambda_i = |u_i| + sqrt(3*T_ii/m)) (in y) (Tensor kernels) +// div(b) and max(|b_i|) penalization (in y) (Tensor kernels) GKYL_CU_D static const gkyl_dg_em_div_b_kern_list ten_em_div_b_y_kernels[] = { { NULL, NULL, NULL }, // 0 @@ -246,8 +200,7 @@ static const gkyl_dg_em_div_b_kern_list ten_em_div_b_y_kernels[] = { { NULL, em_div_b_y_3x_ser_p1, NULL }, // 2 }; -// PKPM acceleration variables, e.g., bb:grad(u), -// and Lax penalization (lambda_i = |u_i| + sqrt(3*T_ii/m)) (in z) (Tensor kernels) +// div(b) and max(|b_i|) penalization (in z) (Tensor kernels) GKYL_CU_D static const gkyl_dg_em_div_b_kern_list ten_em_div_b_z_kernels[] = { { NULL, NULL, NULL }, // 0 @@ -272,23 +225,6 @@ choose_em_calc_BB_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) } } -GKYL_CU_D -static em_calc_temp_t -choose_em_calc_surf_BB_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) -{ - switch (b_type) { - case GKYL_BASIS_MODAL_SERENDIPITY: - return ser_em_calc_surf_BB_kernels[cdim-1].kernels[poly_order]; - break; - case GKYL_BASIS_MODAL_TENSOR: - return ten_em_calc_surf_BB_kernels[cdim-1].kernels[poly_order]; - break; - default: - assert(false); - break; - } -} - GKYL_CU_D static em_calc_temp_t choose_em_calc_num_ExB_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) @@ -374,23 +310,6 @@ choose_em_copy_bvar_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) } } -GKYL_CU_D -static em_copy_t -choose_em_surf_copy_bvar_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) -{ - switch (b_type) { - case GKYL_BASIS_MODAL_SERENDIPITY: - return ser_em_surf_copy_bvar_kernels[cdim-1].kernels[poly_order]; - break; - case GKYL_BASIS_MODAL_TENSOR: - return ten_em_surf_copy_bvar_kernels[cdim-1].kernels[poly_order]; - break; - default: - assert(false); - break; - } -} - GKYL_CU_D static em_copy_t choose_em_copy_ExB_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) From 7b2f86c9caf707e74c23641d571f48120a3aa7a9 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Fri, 1 Sep 2023 11:01:25 -0400 Subject: [PATCH 02/19] With the changes to the bc application, the G0 app needs to be careful on parallel simulations to not accidentally operate on an buffer of zero size, so we check both the size of the lower and upper skin ranges. --- apps/vm_field.c | 2 +- apps/vm_fluid_species.c | 2 +- apps/vm_species.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/vm_field.c b/apps/vm_field.c index 0f46ad7a4..44cd8c82c 100644 --- a/apps/vm_field.c +++ b/apps/vm_field.c @@ -135,7 +135,7 @@ vm_field_new(struct gkyl_vm *vm, struct gkyl_vlasov_app *app) long buff_sz = 0; // compute buffer size needed for (int d=0; dcdim; ++d) { - long vol = app->skin_ghost.lower_skin[d].volume; + long vol = max(app->skin_ghost.lower_skin[d].volume, app->skin_ghost.upper_skin[d].volume); buff_sz = buff_sz > vol ? buff_sz : vol; } f->bc_buffer = mkarr(app->use_gpu, 8*app->confBasis.num_basis, buff_sz); diff --git a/apps/vm_fluid_species.c b/apps/vm_fluid_species.c index 5f0c4f23f..6ab21d2de 100644 --- a/apps/vm_fluid_species.c +++ b/apps/vm_fluid_species.c @@ -27,7 +27,7 @@ vm_fluid_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm long buff_sz = 0; // compute buffer size needed for (int d=0; dcdim; ++d) { - long vol = app->skin_ghost.lower_skin[d].volume; + long vol = max(app->skin_ghost.lower_skin[d].volume, app->skin_ghost.upper_skin[d].volume); buff_sz = buff_sz > vol ? buff_sz : vol; } f->bc_buffer = mkarr(app->use_gpu, num_eqn*app->confBasis.num_basis, buff_sz); diff --git a/apps/vm_species.c b/apps/vm_species.c index 3f7d16117..8de723dc8 100644 --- a/apps/vm_species.c +++ b/apps/vm_species.c @@ -84,7 +84,7 @@ vm_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm_speci long buff_sz = 0; // compute buffer size needed for (int d=0; dskin_ghost.lower_skin[d].volume; + long vol = max(s->skin_ghost.lower_skin[d].volume, s->skin_ghost.upper_skin[d].volume); buff_sz = buff_sz > vol ? buff_sz : vol; } From 1452c5c7208da503490d527a340a5b2a803b232e Mon Sep 17 00:00:00 2001 From: Junoravin Date: Fri, 1 Sep 2023 11:07:21 -0400 Subject: [PATCH 03/19] max is not a function in C. Fortunately we have GKYL_MAX --- apps/vm_field.c | 2 +- apps/vm_fluid_species.c | 2 +- apps/vm_species.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/vm_field.c b/apps/vm_field.c index 44cd8c82c..092e82323 100644 --- a/apps/vm_field.c +++ b/apps/vm_field.c @@ -135,7 +135,7 @@ vm_field_new(struct gkyl_vm *vm, struct gkyl_vlasov_app *app) long buff_sz = 0; // compute buffer size needed for (int d=0; dcdim; ++d) { - long vol = max(app->skin_ghost.lower_skin[d].volume, app->skin_ghost.upper_skin[d].volume); + long vol = GKYL_MAX(app->skin_ghost.lower_skin[d].volume, app->skin_ghost.upper_skin[d].volume); buff_sz = buff_sz > vol ? buff_sz : vol; } f->bc_buffer = mkarr(app->use_gpu, 8*app->confBasis.num_basis, buff_sz); diff --git a/apps/vm_fluid_species.c b/apps/vm_fluid_species.c index 6ab21d2de..1298f26a9 100644 --- a/apps/vm_fluid_species.c +++ b/apps/vm_fluid_species.c @@ -27,7 +27,7 @@ vm_fluid_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm long buff_sz = 0; // compute buffer size needed for (int d=0; dcdim; ++d) { - long vol = max(app->skin_ghost.lower_skin[d].volume, app->skin_ghost.upper_skin[d].volume); + long vol = GKYL_MAX(app->skin_ghost.lower_skin[d].volume, app->skin_ghost.upper_skin[d].volume); buff_sz = buff_sz > vol ? buff_sz : vol; } f->bc_buffer = mkarr(app->use_gpu, num_eqn*app->confBasis.num_basis, buff_sz); diff --git a/apps/vm_species.c b/apps/vm_species.c index 8de723dc8..0fc2c3ef1 100644 --- a/apps/vm_species.c +++ b/apps/vm_species.c @@ -84,7 +84,7 @@ vm_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm_speci long buff_sz = 0; // compute buffer size needed for (int d=0; dskin_ghost.lower_skin[d].volume, s->skin_ghost.upper_skin[d].volume); + long vol = GKYL_MAX(s->skin_ghost.lower_skin[d].volume, s->skin_ghost.upper_skin[d].volume); buff_sz = buff_sz > vol ? buff_sz : vol; } From 64a86138b07a9ee523e393d9827959b1c398b20f Mon Sep 17 00:00:00 2001 From: Junoravin Date: Fri, 1 Sep 2023 11:41:38 -0400 Subject: [PATCH 04/19] For reasons I find slightly confusing, the new way of applying BCs broke parallel G0 simulations. Currently testing whether just creating local skin and ghost ranges like before restores parallel functionality since we overwrite interior ghost cells with communication --- apps/gkyl_vlasov_priv.h | 15 +++++++++++++++ apps/vm_field.c | 8 ++++++-- apps/vm_fluid_species.c | 8 ++++++-- apps/vm_species.c | 9 +++++++-- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/apps/gkyl_vlasov_priv.h b/apps/gkyl_vlasov_priv.h index 36c3ae87a..aec669588 100644 --- a/apps/gkyl_vlasov_priv.h +++ b/apps/gkyl_vlasov_priv.h @@ -248,6 +248,11 @@ struct vm_species { // Pointers to updaters that apply BC. struct gkyl_bc_basic *bc_lo[3]; struct gkyl_bc_basic *bc_up[3]; + // To simplify BC application, store local skin and ghost ranges + struct gkyl_range lower_skin[GKYL_MAX_DIM]; + struct gkyl_range lower_ghost[GKYL_MAX_DIM]; + struct gkyl_range upper_skin[GKYL_MAX_DIM]; + struct gkyl_range upper_ghost[GKYL_MAX_DIM]; bool bc_is_absorb; // boolean for absorbing BCs since 1/rho is undefined in absorbing BCs // If BCs are *not* absorbing, primitive variables can be calculated on *extended* range @@ -321,6 +326,11 @@ struct vm_field { // Pointers to updaters that apply BC. struct gkyl_bc_basic *bc_lo[3]; struct gkyl_bc_basic *bc_up[3]; + // To simplify BC application, store local skin and ghost ranges + struct gkyl_range lower_skin[GKYL_MAX_DIM]; + struct gkyl_range lower_ghost[GKYL_MAX_DIM]; + struct gkyl_range upper_skin[GKYL_MAX_DIM]; + struct gkyl_range upper_ghost[GKYL_MAX_DIM]; double* omegaCfl_ptr; }; @@ -371,6 +381,11 @@ struct vm_fluid_species { // Pointers to updaters that apply BC. struct gkyl_bc_basic *bc_lo[3]; struct gkyl_bc_basic *bc_up[3]; + // To simplify BC application, store local skin and ghost ranges + struct gkyl_range lower_skin[GKYL_MAX_DIM]; + struct gkyl_range lower_ghost[GKYL_MAX_DIM]; + struct gkyl_range upper_skin[GKYL_MAX_DIM]; + struct gkyl_range upper_ghost[GKYL_MAX_DIM]; bool bc_is_absorb; // boolean for absorbing BCs since 1/rho is undefined in absorbing BCs // If BCs are *not* absorbing, primitive variables can be calculated on *extended* range diff --git a/apps/vm_field.c b/apps/vm_field.c index 092e82323..a2a09fe70 100644 --- a/apps/vm_field.c +++ b/apps/vm_field.c @@ -197,8 +197,10 @@ vm_field_new(struct gkyl_vm *vm, struct gkyl_vlasov_app *app) else if (f->lower_bc[d] == GKYL_FIELD_RESERVOIR) bctype = GKYL_BC_MAXWELL_RESERVOIR; + // Create local lower skin and ghost ranges + gkyl_skin_ghost_ranges(&f->lower_skin[d], &f->lower_ghost[d], d, GKYL_LOWER_EDGE, &app->local_ext, ghost); f->bc_lo[d] = gkyl_bc_basic_new(d, GKYL_LOWER_EDGE, bctype, app->basis_on_dev.confBasis, - &app->skin_ghost.lower_skin[d], &app->skin_ghost.lower_ghost[d], f->em->ncomp, app->cdim, app->use_gpu); + &f->lower_skin[d], &f->lower_ghost[d], f->em->ncomp, app->cdim, app->use_gpu); // Upper BC updater. Copy BCs by default. if (f->upper_bc[d] == GKYL_FIELD_COPY) @@ -210,8 +212,10 @@ vm_field_new(struct gkyl_vm *vm, struct gkyl_vlasov_app *app) else if (f->upper_bc[d] == GKYL_FIELD_RESERVOIR) bctype = GKYL_BC_MAXWELL_RESERVOIR; + // Create local upper skin and ghost ranges + gkyl_skin_ghost_ranges(&f->upper_skin[d], &f->upper_ghost[d], d, GKYL_UPPER_EDGE, &app->local_ext, ghost); f->bc_up[d] = gkyl_bc_basic_new(d, GKYL_UPPER_EDGE, bctype, app->basis_on_dev.confBasis, - &app->skin_ghost.upper_skin[d], &app->skin_ghost.upper_ghost[d], f->em->ncomp, app->cdim, app->use_gpu); + &f->upper_skin[d], &f->upper_ghost[d], f->em->ncomp, app->cdim, app->use_gpu); } gkyl_dg_eqn_release(eqn); diff --git a/apps/vm_fluid_species.c b/apps/vm_fluid_species.c index 1298f26a9..943329a1d 100644 --- a/apps/vm_fluid_species.c +++ b/apps/vm_fluid_species.c @@ -222,8 +222,10 @@ vm_fluid_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm bctype = GKYL_BC_PKPM_MOM_NO_SLIP; } + // Create local lower skin and ghost ranges + gkyl_skin_ghost_ranges(&f->lower_skin[d], &f->lower_ghost[d], d, GKYL_LOWER_EDGE, &app->local_ext, ghost); f->bc_lo[d] = gkyl_bc_basic_new(d, GKYL_LOWER_EDGE, bctype, app->basis_on_dev.confBasis, - &app->skin_ghost.lower_skin[d], &app->skin_ghost.lower_ghost[d], f->fluid->ncomp, app->cdim, app->use_gpu); + &f->lower_skin[d], &f->lower_ghost[d], f->fluid->ncomp, app->cdim, app->use_gpu); // Upper BC updater. Copy BCs by default. if (f->upper_bc[d] == GKYL_SPECIES_COPY) { @@ -240,8 +242,10 @@ vm_fluid_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm bctype = GKYL_BC_PKPM_MOM_NO_SLIP; } + // Create local upper skin and ghost ranges + gkyl_skin_ghost_ranges(&f->upper_skin[d], &f->upper_ghost[d], d, GKYL_UPPER_EDGE, &app->local_ext, ghost); f->bc_up[d] = gkyl_bc_basic_new(d, GKYL_UPPER_EDGE, bctype, app->basis_on_dev.confBasis, - &app->skin_ghost.upper_skin[d], &app->skin_ghost.upper_ghost[d], f->fluid->ncomp, app->cdim, app->use_gpu); + &f->upper_skin[d], &f->upper_ghost[d], f->fluid->ncomp, app->cdim, app->use_gpu); } } diff --git a/apps/vm_species.c b/apps/vm_species.c index 0fc2c3ef1..eb8de2b45 100644 --- a/apps/vm_species.c +++ b/apps/vm_species.c @@ -366,6 +366,7 @@ vm_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm_speci s->upper_bc[dir] = bc[1]; } } + // Certain operations fail if absorbing BCs used because absorbing BCs // means the mass density is 0 in the ghost cells (divide by zero) s->bc_is_absorb = false; @@ -389,8 +390,10 @@ vm_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm_speci bctype = GKYL_BC_FIXED_FUNC; } + // Create local lower skin and ghost ranges + gkyl_skin_ghost_ranges(&s->lower_skin[d], &s->lower_ghost[d], d, GKYL_LOWER_EDGE, &s->local_ext, ghost); s->bc_lo[d] = gkyl_bc_basic_new(d, GKYL_LOWER_EDGE, bctype, app->basis_on_dev.basis, - &s->skin_ghost.lower_skin[d], &s->skin_ghost.lower_ghost[d], s->f->ncomp, app->cdim, app->use_gpu); + &s->lower_skin[d], &s->lower_ghost[d], s->f->ncomp, app->cdim, app->use_gpu); // Upper BC updater. Copy BCs by default. if (s->upper_bc[d] == GKYL_SPECIES_COPY) { bctype = GKYL_BC_COPY; @@ -409,8 +412,10 @@ vm_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm_speci bctype = GKYL_BC_FIXED_FUNC; } + // Create local upper skin and ghost ranges + gkyl_skin_ghost_ranges(&s->upper_skin[d], &s->upper_ghost[d], d, GKYL_UPPER_EDGE, &s->local_ext, ghost); s->bc_up[d] = gkyl_bc_basic_new(d, GKYL_UPPER_EDGE, bctype, app->basis_on_dev.basis, - &s->skin_ghost.upper_skin[d], &s->skin_ghost.upper_ghost[d], s->f->ncomp, app->cdim, app->use_gpu); + &s->upper_skin[d], &s->upper_ghost[d], s->f->ncomp, app->cdim, app->use_gpu); } } From 0dd12bd64d62de2b09107d6e968bcbdd41b6afed Mon Sep 17 00:00:00 2001 From: Junoravin Date: Sat, 2 Sep 2023 09:52:13 -0400 Subject: [PATCH 05/19] Complete rework of surface expansions for robustness testing. Now, after the weak operations are done on the volume expansions of bb, b, u, and p_ij, we immediately evaluate these quantities at the needed surfaces (keeping the same program flow from before when we did linear solves for these variables). The most important robustness improvement may be the elimination of the use of the cell_avg flag from the primitive variables. Preliminary testing in main suggests actually the second this flag reduced the order of the primitive variables, the simulations would quickly crash. Intuitively, this would be because we rely on 1/rho * rho = 1 so that now spurious flows develop due to the pressure forces, and if we throw away the high order information in 1/rho, this will lead to an error propagating through the algorithm. Of course if rho becomes negative that is unphysical and can crash a simulation in its own right, but it is interesting that is better to take a timestep with some amount of negative rho rather than to reduce the order of the weak division. In general, a true positivity fix is needed. --- apps/gkyl_vlasov_priv.h | 2 - apps/vm_field.c | 27 +- apps/vm_species.c | 24 +- kernels/maxwell/em_copy_ExB_1x_ser_p1.c | 3 +- kernels/maxwell/em_copy_ExB_1x_ser_p2.c | 3 +- kernels/maxwell/em_copy_ExB_2x_ser_p1.c | 3 +- kernels/maxwell/em_copy_ExB_2x_tensor_p2.c | 3 +- kernels/maxwell/em_copy_ExB_3x_ser_p1.c | 3 +- kernels/maxwell/em_copy_ExB_3x_tensor_p2.c | 3 +- kernels/maxwell/em_copy_bvar_1x_ser_p1.c | 23 +- kernels/maxwell/em_copy_bvar_1x_ser_p2.c | 23 +- kernels/maxwell/em_copy_bvar_2x_ser_p1.c | 59 +- kernels/maxwell/em_copy_bvar_2x_tensor_p2.c | 75 +- kernels/maxwell/em_copy_bvar_3x_ser_p1.c | 134 +- kernels/maxwell/em_copy_bvar_3x_tensor_p2.c | 254 +++- kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c | 36 - kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c | 36 - kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c | 72 -- .../maxwell/em_surf_set_bvar_2x_tensor_p2.c | 88 -- kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c | 147 --- .../maxwell/em_surf_set_bvar_3x_tensor_p2.c | 267 ---- kernels/maxwell/gkyl_maxwell_kernels.h | 56 +- kernels/pkpm/gkyl_euler_pkpm_kernels.h | 49 +- kernels/pkpm/pkpm_vars_copy_1x_ser_p1.c | 45 +- kernels/pkpm/pkpm_vars_copy_1x_ser_p2.c | 48 +- kernels/pkpm/pkpm_vars_copy_2x_ser_p1.c | 87 +- kernels/pkpm/pkpm_vars_copy_2x_tensor_p2.c | 118 +- kernels/pkpm/pkpm_vars_copy_3x_ser_p1.c | 174 ++- kernels/pkpm/pkpm_vars_pressure_1x_ser_p1.c | 22 +- kernels/pkpm/pkpm_vars_pressure_1x_ser_p2.c | 22 +- kernels/pkpm/pkpm_vars_pressure_2x_ser_p1.c | 139 +- .../pkpm/pkpm_vars_pressure_2x_tensor_p2.c | 177 +-- kernels/pkpm/pkpm_vars_pressure_3x_ser_p1.c | 322 ++--- kernels/pkpm/pkpm_vars_set_1x_ser_p1.c | 52 +- kernels/pkpm/pkpm_vars_set_1x_ser_p2.c | 202 +-- kernels/pkpm/pkpm_vars_set_2x_ser_p1.c | 72 +- kernels/pkpm/pkpm_vars_set_2x_tensor_p2.c | 1138 ++++++++++------- kernels/pkpm/pkpm_vars_set_3x_ser_p1.c | 112 +- kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p1.c | 37 - kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p2.c | 37 - kernels/pkpm/pkpm_vars_surf_copy_2x_ser_p1.c | 82 -- .../pkpm/pkpm_vars_surf_copy_2x_tensor_p2.c | 100 -- kernels/pkpm/pkpm_vars_surf_copy_3x_ser_p1.c | 172 --- kernels/pkpm/pkpm_vars_surf_set_1x_ser_p1.c | 90 -- kernels/pkpm/pkpm_vars_surf_set_1x_ser_p2.c | 90 -- kernels/pkpm/pkpm_vars_surf_set_2x_ser_p1.c | 211 --- .../pkpm/pkpm_vars_surf_set_2x_tensor_p2.c | 489 ------- kernels/pkpm/pkpm_vars_surf_set_3x_ser_p1.c | 403 ------ unit/ctest_dg_em_vars.c | 20 +- zero/dg_calc_em_vars.c | 28 +- zero/dg_calc_em_vars_cu.cu | 48 +- zero/dg_calc_pkpm_vars.c | 85 +- zero/dg_calc_pkpm_vars_cu.cu | 117 +- zero/gkyl_dg_calc_em_vars.h | 22 +- zero/gkyl_dg_calc_em_vars_priv.h | 41 +- zero/gkyl_dg_calc_pkpm_vars.h | 49 +- zero/gkyl_dg_calc_pkpm_vars_priv.h | 85 +- 57 files changed, 2217 insertions(+), 4109 deletions(-) delete mode 100644 kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c delete mode 100644 kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c delete mode 100644 kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c delete mode 100644 kernels/maxwell/em_surf_set_bvar_2x_tensor_p2.c delete mode 100644 kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c delete mode 100644 kernels/maxwell/em_surf_set_bvar_3x_tensor_p2.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p1.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p2.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_copy_2x_ser_p1.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_copy_2x_tensor_p2.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_copy_3x_ser_p1.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_set_1x_ser_p1.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_set_1x_ser_p2.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_set_2x_ser_p1.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_set_2x_tensor_p2.c delete mode 100644 kernels/pkpm/pkpm_vars_surf_set_3x_ser_p1.c diff --git a/apps/gkyl_vlasov_priv.h b/apps/gkyl_vlasov_priv.h index aec669588..d603647c4 100644 --- a/apps/gkyl_vlasov_priv.h +++ b/apps/gkyl_vlasov_priv.h @@ -306,12 +306,10 @@ struct vm_field { struct gkyl_array *cell_avg_magB2; // Integer array for whether |B|^2 *only* uses cell averages for weak division // Determined when constructing the matrix if |B|^2 < 0.0 at control points struct gkyl_array *bvar; // magnetic field unit vector and tensor (diagnostic and for use in pkpm model) - struct gkyl_array *ExB; // E x B velocity = E x B/|B|^2 (diagnostic and for use in relativistic pkpm model) struct gkyl_array *bvar_surf; // Surface expansion magnetic field unit vector and tensor (for use in pkpm model) struct gkyl_array *div_b; // Volume expansion of div(b) (for use in pkpm model) struct gkyl_array *max_b; // max(|b_i|) penalization (for use in pkpm model) struct gkyl_dg_calc_em_vars *calc_bvar; // Updater to compute magnetic field unit vector and tensor - struct gkyl_dg_calc_em_vars *calc_ExB; // Updater to compute ExB velocity gkyl_hyper_dg *slvr; // Maxwell solver diff --git a/apps/vm_field.c b/apps/vm_field.c index a2a09fe70..49bcdb48f 100644 --- a/apps/vm_field.c +++ b/apps/vm_field.c @@ -69,7 +69,6 @@ vm_field_new(struct gkyl_vm *vm, struct gkyl_vlasov_app *app) // ExB = E x B velocity, E x B/|B|^2 f->cell_avg_magB2 = mk_int_arr(app->use_gpu, 1, app->local_ext.volume); f->bvar = mkarr(app->use_gpu, 9*app->confBasis.num_basis, app->local_ext.volume); - f->ExB = mkarr(app->use_gpu, 3*app->confBasis.num_basis, app->local_ext.volume); // Surface magnetic field vector organized as: // [bx_xl, bx_xr, bxbx_xl, bxbx_xr, bxby_xl, bxby_xr, bxbz_xl, bxbz_xr, // by_yl, by_yr, bxby_yl, bxby_yr, byby_yl, byby_yr, bybz_yl, bybz_yr, @@ -83,9 +82,8 @@ vm_field_new(struct gkyl_vm *vm, struct gkyl_vlasov_app *app) // Surface expansion of max b penalization for streaming in PKPM system max(|b_i_l|, |b_i_r|) f->max_b = mkarr(app->use_gpu, 2*cdim*Nbasis_surf, app->local_ext.volume); - // Create updaters for bvar and ExB + // Create updaters for bvar (needed by PKPM model) f->calc_bvar = gkyl_dg_calc_em_vars_new(&app->grid, &app->confBasis, &app->local_ext, 0, app->use_gpu); - f->calc_ExB = gkyl_dg_calc_em_vars_new(&app->grid, &app->confBasis, &app->local_ext, 1, app->use_gpu); f->has_ext_em = false; f->ext_em_evolve = false; @@ -280,8 +278,7 @@ vm_field_calc_bvar(gkyl_vlasov_app *app, struct vm_field *field, // Assumes magnetic field boundary conditions applied so magnetic field // unit vector and unit tensor are defined everywhere in the domain gkyl_dg_calc_em_vars_advance(field->calc_bvar, field->tot_em, - field->cell_avg_magB2, field->bvar); - gkyl_dg_calc_em_vars_surf_advance(field->calc_bvar, field->bvar, field->bvar_surf); + field->cell_avg_magB2, field->bvar, field->bvar_surf); // Compute div(b) and max_b = max(|b_i_l|, |b_i_r|) gkyl_array_clear(field->div_b, 0.0); // Incremented in each dimension, so clear beforehand @@ -292,24 +289,6 @@ vm_field_calc_bvar(gkyl_vlasov_app *app, struct vm_field *field, app->stat.field_em_vars_tm += gkyl_time_diff_now_sec(tm); } -void -vm_field_calc_ExB(gkyl_vlasov_app *app, struct vm_field *field, - const struct gkyl_array *em) -{ - struct timespec tm = gkyl_wall_clock(); - - gkyl_array_clear(field->tot_em, 0.0); - gkyl_array_set(field->tot_em, 1.0, em); - if (field->has_ext_em) - gkyl_array_accumulate(field->tot_em, 1.0, field->ext_em); - // Assumes electric field and magnetic field boundary conditions applied - // so E x B velocity is defined everywhere in the domain - gkyl_dg_calc_em_vars_advance(field->calc_ExB, field->tot_em, - field->cell_avg_magB2, field->ExB); - - app->stat.field_em_vars_tm += gkyl_time_diff_now_sec(tm); -} - void vm_field_accumulate_current(gkyl_vlasov_app *app, const struct gkyl_array *fin[], const struct gkyl_array *fluidin[], @@ -472,12 +451,10 @@ vm_field_release(const gkyl_vlasov_app* app, struct vm_field *f) gkyl_array_release(f->cell_avg_magB2); gkyl_array_release(f->bvar); - gkyl_array_release(f->ExB); gkyl_array_release(f->bvar_surf); gkyl_array_release(f->div_b); gkyl_array_release(f->max_b); gkyl_dg_calc_em_vars_release(f->calc_bvar); - gkyl_dg_calc_em_vars_release(f->calc_ExB); if (f->has_ext_em) { gkyl_array_release(f->ext_em); diff --git a/apps/vm_species.c b/apps/vm_species.c index eb8de2b45..a2d99e9d8 100644 --- a/apps/vm_species.c +++ b/apps/vm_species.c @@ -218,7 +218,7 @@ vm_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm_speci s->pkpm_div_ppar = mkarr(app->use_gpu, app->confBasis.num_basis, app->local_ext.volume); // allocate array to store primitive moments : [ux, uy, uz, 1/rho*div(p_par b), T_perp/m, m/T_perp] // pressure p_ij : (p_par - p_perp) b_i b_j + p_perp g_ij - s->pkpm_prim = mkarr(app->use_gpu, 6*app->confBasis.num_basis, app->local_ext.volume); + s->pkpm_prim = mkarr(app->use_gpu, 9*app->confBasis.num_basis, app->local_ext.volume); s->pkpm_p_ij = mkarr(app->use_gpu, 6*app->confBasis.num_basis, app->local_ext.volume); // boolean array for if we are only using the cell average for primitive variables s->cell_avg_prim = mk_int_arr(app->use_gpu, 1, app->local_ext.volume); @@ -489,26 +489,16 @@ vm_species_calc_pkpm_vars(gkyl_vlasov_app *app, struct vm_species *species, app->field->bvar, app->field->bvar_surf, species->pkpm_moms.marr, species->pkpm_p_ij, species->pkpm_p_ij_surf); // Compute primitive variables in both the volume and on surfaces - if (species->bc_is_absorb) { + if (species->bc_is_absorb) gkyl_dg_calc_pkpm_vars_advance(species->calc_pkpm_vars, species->pkpm_moms.marr, fluidin[species->pkpm_fluid_index], - species->pkpm_div_ppar, species->cell_avg_prim, - species->pkpm_prim); - gkyl_dg_calc_pkpm_vars_surf_advance(species->calc_pkpm_vars, - species->pkpm_moms.marr, fluidin[species->pkpm_fluid_index], - species->pkpm_p_ij_surf, species->cell_avg_prim, - species->pkpm_prim_surf); - } - else { + species->pkpm_p_ij, species->pkpm_div_ppar, + species->cell_avg_prim, species->pkpm_prim, species->pkpm_prim_surf); + else gkyl_dg_calc_pkpm_vars_advance(species->calc_pkpm_vars_ext, species->pkpm_moms.marr, fluidin[species->pkpm_fluid_index], - species->pkpm_div_ppar, species->cell_avg_prim, - species->pkpm_prim); - gkyl_dg_calc_pkpm_vars_surf_advance(species->calc_pkpm_vars_ext, - species->pkpm_moms.marr, fluidin[species->pkpm_fluid_index], - species->pkpm_p_ij_surf, species->cell_avg_prim, - species->pkpm_prim_surf); - } + species->pkpm_p_ij, species->pkpm_div_ppar, + species->cell_avg_prim, species->pkpm_prim, species->pkpm_prim_surf); } app->stat.species_pkpm_vars_tm += gkyl_time_diff_now_sec(tm); } diff --git a/kernels/maxwell/em_copy_ExB_1x_ser_p1.c b/kernels/maxwell/em_copy_ExB_1x_ser_p1.c index fe414b783..bfe0b33d3 100644 --- a/kernels/maxwell/em_copy_ExB_1x_ser_p1.c +++ b/kernels/maxwell/em_copy_ExB_1x_ser_p1.c @@ -1,6 +1,7 @@ #include #include -GKYL_CU_DH void em_copy_ExB_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB) +GKYL_CU_DH void em_copy_ExB_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. diff --git a/kernels/maxwell/em_copy_ExB_1x_ser_p2.c b/kernels/maxwell/em_copy_ExB_1x_ser_p2.c index a4303cea5..b39a44a8f 100644 --- a/kernels/maxwell/em_copy_ExB_1x_ser_p2.c +++ b/kernels/maxwell/em_copy_ExB_1x_ser_p2.c @@ -1,6 +1,7 @@ #include #include -GKYL_CU_DH void em_copy_ExB_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB) +GKYL_CU_DH void em_copy_ExB_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. diff --git a/kernels/maxwell/em_copy_ExB_2x_ser_p1.c b/kernels/maxwell/em_copy_ExB_2x_ser_p1.c index a3d517afd..f137585e1 100644 --- a/kernels/maxwell/em_copy_ExB_2x_ser_p1.c +++ b/kernels/maxwell/em_copy_ExB_2x_ser_p1.c @@ -1,6 +1,7 @@ #include #include -GKYL_CU_DH void em_copy_ExB_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB) +GKYL_CU_DH void em_copy_ExB_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. diff --git a/kernels/maxwell/em_copy_ExB_2x_tensor_p2.c b/kernels/maxwell/em_copy_ExB_2x_tensor_p2.c index 3671e51b5..215dd16e3 100644 --- a/kernels/maxwell/em_copy_ExB_2x_tensor_p2.c +++ b/kernels/maxwell/em_copy_ExB_2x_tensor_p2.c @@ -1,6 +1,7 @@ #include #include -GKYL_CU_DH void em_copy_ExB_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB) +GKYL_CU_DH void em_copy_ExB_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. diff --git a/kernels/maxwell/em_copy_ExB_3x_ser_p1.c b/kernels/maxwell/em_copy_ExB_3x_ser_p1.c index 6b47cb307..fe2676bfe 100644 --- a/kernels/maxwell/em_copy_ExB_3x_ser_p1.c +++ b/kernels/maxwell/em_copy_ExB_3x_ser_p1.c @@ -1,6 +1,7 @@ #include #include -GKYL_CU_DH void em_copy_ExB_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB) +GKYL_CU_DH void em_copy_ExB_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. diff --git a/kernels/maxwell/em_copy_ExB_3x_tensor_p2.c b/kernels/maxwell/em_copy_ExB_3x_tensor_p2.c index 4d272d792..4417751fa 100644 --- a/kernels/maxwell/em_copy_ExB_3x_tensor_p2.c +++ b/kernels/maxwell/em_copy_ExB_3x_tensor_p2.c @@ -1,6 +1,7 @@ #include #include -GKYL_CU_DH void em_copy_ExB_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB) +GKYL_CU_DH void em_copy_ExB_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. diff --git a/kernels/maxwell/em_copy_bvar_1x_ser_p1.c b/kernels/maxwell/em_copy_bvar_1x_ser_p1.c index e91013cee..867fce2d0 100644 --- a/kernels/maxwell/em_copy_bvar_1x_ser_p1.c +++ b/kernels/maxwell/em_copy_bvar_1x_ser_p1.c @@ -1,13 +1,14 @@ #include #include #include -GKYL_CU_DH void em_copy_bvar_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar) +GKYL_CU_DH void em_copy_bvar_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. // em: Input electromagnetic fields. // cell_avg_magB2: Input flag for cell average if 1/|B|^2 only used cell averages. - // bvar: Output b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar: Output volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). struct gkyl_mat x_bxbx = gkyl_nmat_get(x, count); struct gkyl_mat x_bxby = gkyl_nmat_get(x, count+1); @@ -65,5 +66,23 @@ GKYL_CU_DH void em_copy_bvar_1x_ser_p1(int count, struct gkyl_nmat *x, const dou ser_1x_p1_sqrt_with_sign(B_x, bxbx, bx); ser_1x_p1_sqrt_with_sign(B_y, byby, by); ser_1x_p1_sqrt_with_sign(B_z, bzbz, bz); + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[1]; + double *bxbx_xl = &bvar_surf[2]; + double *bxbx_xr = &bvar_surf[3]; + double *bxby_xl = &bvar_surf[4]; + double *bxby_xr = &bvar_surf[5]; + double *bxbz_xl = &bvar_surf[6]; + double *bxbz_xr = &bvar_surf[7]; + + bx_xl[0] = 0.7071067811865475*bx[0]-1.224744871391589*bx[1]; + bx_xr[0] = 1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bxbx_xl[0] = 0.7071067811865475*bxbx[0]-1.224744871391589*bxbx[1]; + bxbx_xr[0] = 1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxby_xl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[1]; + bxby_xr[0] = 1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxbz_xl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[1]; + bxbz_xr[0] = 1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + } diff --git a/kernels/maxwell/em_copy_bvar_1x_ser_p2.c b/kernels/maxwell/em_copy_bvar_1x_ser_p2.c index 4b9334bc6..3f2396391 100644 --- a/kernels/maxwell/em_copy_bvar_1x_ser_p2.c +++ b/kernels/maxwell/em_copy_bvar_1x_ser_p2.c @@ -1,13 +1,14 @@ #include #include #include -GKYL_CU_DH void em_copy_bvar_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar) +GKYL_CU_DH void em_copy_bvar_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. // em: Input electromagnetic fields. // cell_avg_magB2: Input flag for cell average if 1/|B|^2 only used cell averages. - // bvar: Output b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar: Output volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). struct gkyl_mat x_bxbx = gkyl_nmat_get(x, count); struct gkyl_mat x_bxby = gkyl_nmat_get(x, count+1); @@ -80,5 +81,23 @@ GKYL_CU_DH void em_copy_bvar_1x_ser_p2(int count, struct gkyl_nmat *x, const dou ser_1x_p2_sqrt_with_sign(B_x, bxbx, bx); ser_1x_p2_sqrt_with_sign(B_y, byby, by); ser_1x_p2_sqrt_with_sign(B_z, bzbz, bz); + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[1]; + double *bxbx_xl = &bvar_surf[2]; + double *bxbx_xr = &bvar_surf[3]; + double *bxby_xl = &bvar_surf[4]; + double *bxby_xr = &bvar_surf[5]; + double *bxbz_xl = &bvar_surf[6]; + double *bxbz_xr = &bvar_surf[7]; + + bx_xl[0] = 1.58113883008419*bx[2]-1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[0] = 1.58113883008419*bx[2]+1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bxbx_xl[0] = 1.58113883008419*bxbx[2]-1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[0] = 1.58113883008419*bxbx[2]+1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxby_xl[0] = 1.58113883008419*bxby[2]-1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[0] = 1.58113883008419*bxby[2]+1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxbz_xl[0] = 1.58113883008419*bxbz[2]-1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[0] = 1.58113883008419*bxbz[2]+1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + } diff --git a/kernels/maxwell/em_copy_bvar_2x_ser_p1.c b/kernels/maxwell/em_copy_bvar_2x_ser_p1.c index 4a102bdf2..6666c23b6 100644 --- a/kernels/maxwell/em_copy_bvar_2x_ser_p1.c +++ b/kernels/maxwell/em_copy_bvar_2x_ser_p1.c @@ -1,13 +1,14 @@ #include #include #include -GKYL_CU_DH void em_copy_bvar_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar) +GKYL_CU_DH void em_copy_bvar_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. // em: Input electromagnetic fields. // cell_avg_magB2: Input flag for cell average if 1/|B|^2 only used cell averages. - // bvar: Output b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar: Output volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). struct gkyl_mat x_bxbx = gkyl_nmat_get(x, count); struct gkyl_mat x_bxby = gkyl_nmat_get(x, count+1); @@ -95,5 +96,59 @@ GKYL_CU_DH void em_copy_bvar_2x_ser_p1(int count, struct gkyl_nmat *x, const dou ser_2x_p1_sqrt_with_sign(B_x, bxbx, bx); ser_2x_p1_sqrt_with_sign(B_y, byby, by); ser_2x_p1_sqrt_with_sign(B_z, bzbz, bz); + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[2]; + double *bxbx_xl = &bvar_surf[4]; + double *bxbx_xr = &bvar_surf[6]; + double *bxby_xl = &bvar_surf[8]; + double *bxby_xr = &bvar_surf[10]; + double *bxbz_xl = &bvar_surf[12]; + double *bxbz_xr = &bvar_surf[14]; + + bx_xl[0] = 0.7071067811865475*bx[0]-1.224744871391589*bx[1]; + bx_xl[1] = 0.7071067811865475*bx[2]-1.224744871391589*bx[3]; + bxbx_xl[0] = 0.7071067811865475*bxbx[0]-1.224744871391589*bxbx[1]; + bxbx_xl[1] = 0.7071067811865475*bxbx[2]-1.224744871391589*bxbx[3]; + bxby_xl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[1]; + bxby_xl[1] = 0.7071067811865475*bxby[2]-1.224744871391589*bxby[3]; + bxbz_xl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[1]; + bxbz_xl[1] = 0.7071067811865475*bxbz[2]-1.224744871391589*bxbz[3]; + + bx_xr[0] = 1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[1] = 1.224744871391589*bx[3]+0.7071067811865475*bx[2]; + bxbx_xr[0] = 1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[1] = 1.224744871391589*bxbx[3]+0.7071067811865475*bxbx[2]; + bxby_xr[0] = 1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[1] = 1.224744871391589*bxby[3]+0.7071067811865475*bxby[2]; + bxbz_xr[0] = 1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[1] = 1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[2]; + + double *by_yl = &bvar_surf[16]; + double *by_yr = &bvar_surf[18]; + double *bxby_yl = &bvar_surf[20]; + double *bxby_yr = &bvar_surf[22]; + double *byby_yl = &bvar_surf[24]; + double *byby_yr = &bvar_surf[26]; + double *bybz_yl = &bvar_surf[28]; + double *bybz_yr = &bvar_surf[30]; + + by_yl[0] = 0.7071067811865475*by[0]-1.224744871391589*by[2]; + by_yl[1] = 0.7071067811865475*by[1]-1.224744871391589*by[3]; + bxby_yl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[2]; + bxby_yl[1] = 0.7071067811865475*bxby[1]-1.224744871391589*bxby[3]; + byby_yl[0] = 0.7071067811865475*byby[0]-1.224744871391589*byby[2]; + byby_yl[1] = 0.7071067811865475*byby[1]-1.224744871391589*byby[3]; + bybz_yl[0] = 0.7071067811865475*bybz[0]-1.224744871391589*bybz[2]; + bybz_yl[1] = 0.7071067811865475*bybz[1]-1.224744871391589*bybz[3]; + + by_yr[0] = 1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yr[1] = 1.224744871391589*by[3]+0.7071067811865475*by[1]; + bxby_yr[0] = 1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yr[1] = 1.224744871391589*bxby[3]+0.7071067811865475*bxby[1]; + byby_yr[0] = 1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yr[1] = 1.224744871391589*byby[3]+0.7071067811865475*byby[1]; + bybz_yr[0] = 1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yr[1] = 1.224744871391589*bybz[3]+0.7071067811865475*bybz[1]; + } diff --git a/kernels/maxwell/em_copy_bvar_2x_tensor_p2.c b/kernels/maxwell/em_copy_bvar_2x_tensor_p2.c index baa7ddc18..4c8ca845f 100644 --- a/kernels/maxwell/em_copy_bvar_2x_tensor_p2.c +++ b/kernels/maxwell/em_copy_bvar_2x_tensor_p2.c @@ -1,13 +1,14 @@ #include #include #include -GKYL_CU_DH void em_copy_bvar_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar) +GKYL_CU_DH void em_copy_bvar_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. // em: Input electromagnetic fields. // cell_avg_magB2: Input flag for cell average if 1/|B|^2 only used cell averages. - // bvar: Output b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar: Output volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). struct gkyl_mat x_bxbx = gkyl_nmat_get(x, count); struct gkyl_mat x_bxby = gkyl_nmat_get(x, count+1); @@ -170,5 +171,75 @@ GKYL_CU_DH void em_copy_bvar_2x_tensor_p2(int count, struct gkyl_nmat *x, const tensor_2x_p2_sqrt_with_sign(B_x, bxbx, bx); tensor_2x_p2_sqrt_with_sign(B_y, byby, by); tensor_2x_p2_sqrt_with_sign(B_z, bzbz, bz); + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[3]; + double *bxbx_xl = &bvar_surf[6]; + double *bxbx_xr = &bvar_surf[9]; + double *bxby_xl = &bvar_surf[12]; + double *bxby_xr = &bvar_surf[15]; + double *bxbz_xl = &bvar_surf[18]; + double *bxbz_xr = &bvar_surf[21]; + + bx_xl[0] = 1.58113883008419*bx[4]-1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xl[1] = 1.58113883008419*bx[6]-1.224744871391589*bx[3]+0.7071067811865475*bx[2]; + bx_xl[2] = 1.58113883008419*bx[8]-1.224744871391589*bx[7]+0.7071067811865475*bx[5]; + bxbx_xl[0] = 1.58113883008419*bxbx[4]-1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xl[1] = 1.58113883008419*bxbx[6]-1.224744871391589*bxbx[3]+0.7071067811865475*bxbx[2]; + bxbx_xl[2] = 1.58113883008419*bxbx[8]-1.224744871391589*bxbx[7]+0.7071067811865475*bxbx[5]; + bxby_xl[0] = 1.58113883008419*bxby[4]-1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xl[1] = 1.58113883008419*bxby[6]-1.224744871391589*bxby[3]+0.7071067811865475*bxby[2]; + bxby_xl[2] = 1.58113883008419*bxby[8]-1.224744871391589*bxby[7]+0.7071067811865475*bxby[5]; + bxbz_xl[0] = 1.58113883008419*bxbz[4]-1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xl[1] = 1.58113883008419*bxbz[6]-1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[2]; + bxbz_xl[2] = 1.58113883008419*bxbz[8]-1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[5]; + + bx_xr[0] = 1.58113883008419*bx[4]+1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[1] = 1.58113883008419*bx[6]+1.224744871391589*bx[3]+0.7071067811865475*bx[2]; + bx_xr[2] = 1.58113883008419*bx[8]+1.224744871391589*bx[7]+0.7071067811865475*bx[5]; + bxbx_xr[0] = 1.58113883008419*bxbx[4]+1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[1] = 1.58113883008419*bxbx[6]+1.224744871391589*bxbx[3]+0.7071067811865475*bxbx[2]; + bxbx_xr[2] = 1.58113883008419*bxbx[8]+1.224744871391589*bxbx[7]+0.7071067811865475*bxbx[5]; + bxby_xr[0] = 1.58113883008419*bxby[4]+1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[1] = 1.58113883008419*bxby[6]+1.224744871391589*bxby[3]+0.7071067811865475*bxby[2]; + bxby_xr[2] = 1.58113883008419*bxby[8]+1.224744871391589*bxby[7]+0.7071067811865475*bxby[5]; + bxbz_xr[0] = 1.58113883008419*bxbz[4]+1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[1] = 1.58113883008419*bxbz[6]+1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[2]; + bxbz_xr[2] = 1.58113883008419*bxbz[8]+1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[5]; + + double *by_yl = &bvar_surf[24]; + double *by_yr = &bvar_surf[27]; + double *bxby_yl = &bvar_surf[30]; + double *bxby_yr = &bvar_surf[33]; + double *byby_yl = &bvar_surf[36]; + double *byby_yr = &bvar_surf[39]; + double *bybz_yl = &bvar_surf[42]; + double *bybz_yr = &bvar_surf[45]; + + by_yl[0] = 1.58113883008419*by[5]-1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yl[1] = 1.58113883008419*by[7]-1.224744871391589*by[3]+0.7071067811865475*by[1]; + by_yl[2] = 1.58113883008419*by[8]-1.224744871391589*by[6]+0.7071067811865475*by[4]; + bxby_yl[0] = 1.58113883008419*bxby[5]-1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yl[1] = 1.58113883008419*bxby[7]-1.224744871391589*bxby[3]+0.7071067811865475*bxby[1]; + bxby_yl[2] = 1.58113883008419*bxby[8]-1.224744871391589*bxby[6]+0.7071067811865475*bxby[4]; + byby_yl[0] = 1.58113883008419*byby[5]-1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yl[1] = 1.58113883008419*byby[7]-1.224744871391589*byby[3]+0.7071067811865475*byby[1]; + byby_yl[2] = 1.58113883008419*byby[8]-1.224744871391589*byby[6]+0.7071067811865475*byby[4]; + bybz_yl[0] = 1.58113883008419*bybz[5]-1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yl[1] = 1.58113883008419*bybz[7]-1.224744871391589*bybz[3]+0.7071067811865475*bybz[1]; + bybz_yl[2] = 1.58113883008419*bybz[8]-1.224744871391589*bybz[6]+0.7071067811865475*bybz[4]; + + by_yr[0] = 1.58113883008419*by[5]+1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yr[1] = 1.58113883008419*by[7]+1.224744871391589*by[3]+0.7071067811865475*by[1]; + by_yr[2] = 1.58113883008419*by[8]+1.224744871391589*by[6]+0.7071067811865475*by[4]; + bxby_yr[0] = 1.58113883008419*bxby[5]+1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yr[1] = 1.58113883008419*bxby[7]+1.224744871391589*bxby[3]+0.7071067811865475*bxby[1]; + bxby_yr[2] = 1.58113883008419*bxby[8]+1.224744871391589*bxby[6]+0.7071067811865475*bxby[4]; + byby_yr[0] = 1.58113883008419*byby[5]+1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yr[1] = 1.58113883008419*byby[7]+1.224744871391589*byby[3]+0.7071067811865475*byby[1]; + byby_yr[2] = 1.58113883008419*byby[8]+1.224744871391589*byby[6]+0.7071067811865475*byby[4]; + bybz_yr[0] = 1.58113883008419*bybz[5]+1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yr[1] = 1.58113883008419*bybz[7]+1.224744871391589*bybz[3]+0.7071067811865475*bybz[1]; + bybz_yr[2] = 1.58113883008419*bybz[8]+1.224744871391589*bybz[6]+0.7071067811865475*bybz[4]; + } diff --git a/kernels/maxwell/em_copy_bvar_3x_ser_p1.c b/kernels/maxwell/em_copy_bvar_3x_ser_p1.c index 5820a34e1..f503bddd8 100644 --- a/kernels/maxwell/em_copy_bvar_3x_ser_p1.c +++ b/kernels/maxwell/em_copy_bvar_3x_ser_p1.c @@ -1,13 +1,14 @@ #include #include #include -GKYL_CU_DH void em_copy_bvar_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar) +GKYL_CU_DH void em_copy_bvar_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. // em: Input electromagnetic fields. // cell_avg_magB2: Input flag for cell average if 1/|B|^2 only used cell averages. - // bvar: Output b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar: Output volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). struct gkyl_mat x_bxbx = gkyl_nmat_get(x, count); struct gkyl_mat x_bxby = gkyl_nmat_get(x, count+1); @@ -155,5 +156,134 @@ GKYL_CU_DH void em_copy_bvar_3x_ser_p1(int count, struct gkyl_nmat *x, const dou ser_3x_p1_sqrt_with_sign(B_x, bxbx, bx); ser_3x_p1_sqrt_with_sign(B_y, byby, by); ser_3x_p1_sqrt_with_sign(B_z, bzbz, bz); + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[4]; + double *bxbx_xl = &bvar_surf[8]; + double *bxbx_xr = &bvar_surf[12]; + double *bxby_xl = &bvar_surf[16]; + double *bxby_xr = &bvar_surf[20]; + double *bxbz_xl = &bvar_surf[24]; + double *bxbz_xr = &bvar_surf[28]; + + bx_xl[0] = 0.7071067811865475*bx[0]-1.224744871391589*bx[1]; + bx_xl[1] = 0.7071067811865475*bx[2]-1.224744871391589*bx[4]; + bx_xl[2] = 0.7071067811865475*bx[3]-1.224744871391589*bx[5]; + bx_xl[3] = 0.7071067811865475*bx[6]-1.224744871391589*bx[7]; + bxbx_xl[0] = 0.7071067811865475*bxbx[0]-1.224744871391589*bxbx[1]; + bxbx_xl[1] = 0.7071067811865475*bxbx[2]-1.224744871391589*bxbx[4]; + bxbx_xl[2] = 0.7071067811865475*bxbx[3]-1.224744871391589*bxbx[5]; + bxbx_xl[3] = 0.7071067811865475*bxbx[6]-1.224744871391589*bxbx[7]; + bxby_xl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[1]; + bxby_xl[1] = 0.7071067811865475*bxby[2]-1.224744871391589*bxby[4]; + bxby_xl[2] = 0.7071067811865475*bxby[3]-1.224744871391589*bxby[5]; + bxby_xl[3] = 0.7071067811865475*bxby[6]-1.224744871391589*bxby[7]; + bxbz_xl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[1]; + bxbz_xl[1] = 0.7071067811865475*bxbz[2]-1.224744871391589*bxbz[4]; + bxbz_xl[2] = 0.7071067811865475*bxbz[3]-1.224744871391589*bxbz[5]; + bxbz_xl[3] = 0.7071067811865475*bxbz[6]-1.224744871391589*bxbz[7]; + + bx_xr[0] = 1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[1] = 1.224744871391589*bx[4]+0.7071067811865475*bx[2]; + bx_xr[2] = 1.224744871391589*bx[5]+0.7071067811865475*bx[3]; + bx_xr[3] = 1.224744871391589*bx[7]+0.7071067811865475*bx[6]; + bxbx_xr[0] = 1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[1] = 1.224744871391589*bxbx[4]+0.7071067811865475*bxbx[2]; + bxbx_xr[2] = 1.224744871391589*bxbx[5]+0.7071067811865475*bxbx[3]; + bxbx_xr[3] = 1.224744871391589*bxbx[7]+0.7071067811865475*bxbx[6]; + bxby_xr[0] = 1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[1] = 1.224744871391589*bxby[4]+0.7071067811865475*bxby[2]; + bxby_xr[2] = 1.224744871391589*bxby[5]+0.7071067811865475*bxby[3]; + bxby_xr[3] = 1.224744871391589*bxby[7]+0.7071067811865475*bxby[6]; + bxbz_xr[0] = 1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[1] = 1.224744871391589*bxbz[4]+0.7071067811865475*bxbz[2]; + bxbz_xr[2] = 1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[3]; + bxbz_xr[3] = 1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[6]; + + double *by_yl = &bvar_surf[32]; + double *by_yr = &bvar_surf[36]; + double *bxby_yl = &bvar_surf[40]; + double *bxby_yr = &bvar_surf[44]; + double *byby_yl = &bvar_surf[48]; + double *byby_yr = &bvar_surf[52]; + double *bybz_yl = &bvar_surf[56]; + double *bybz_yr = &bvar_surf[60]; + + by_yl[0] = 0.7071067811865475*by[0]-1.224744871391589*by[2]; + by_yl[1] = 0.7071067811865475*by[1]-1.224744871391589*by[4]; + by_yl[2] = 0.7071067811865475*by[3]-1.224744871391589*by[6]; + by_yl[3] = 0.7071067811865475*by[5]-1.224744871391589*by[7]; + bxby_yl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[2]; + bxby_yl[1] = 0.7071067811865475*bxby[1]-1.224744871391589*bxby[4]; + bxby_yl[2] = 0.7071067811865475*bxby[3]-1.224744871391589*bxby[6]; + bxby_yl[3] = 0.7071067811865475*bxby[5]-1.224744871391589*bxby[7]; + byby_yl[0] = 0.7071067811865475*byby[0]-1.224744871391589*byby[2]; + byby_yl[1] = 0.7071067811865475*byby[1]-1.224744871391589*byby[4]; + byby_yl[2] = 0.7071067811865475*byby[3]-1.224744871391589*byby[6]; + byby_yl[3] = 0.7071067811865475*byby[5]-1.224744871391589*byby[7]; + bybz_yl[0] = 0.7071067811865475*bybz[0]-1.224744871391589*bybz[2]; + bybz_yl[1] = 0.7071067811865475*bybz[1]-1.224744871391589*bybz[4]; + bybz_yl[2] = 0.7071067811865475*bybz[3]-1.224744871391589*bybz[6]; + bybz_yl[3] = 0.7071067811865475*bybz[5]-1.224744871391589*bybz[7]; + + by_yr[0] = 1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yr[1] = 1.224744871391589*by[4]+0.7071067811865475*by[1]; + by_yr[2] = 1.224744871391589*by[6]+0.7071067811865475*by[3]; + by_yr[3] = 1.224744871391589*by[7]+0.7071067811865475*by[5]; + bxby_yr[0] = 1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yr[1] = 1.224744871391589*bxby[4]+0.7071067811865475*bxby[1]; + bxby_yr[2] = 1.224744871391589*bxby[6]+0.7071067811865475*bxby[3]; + bxby_yr[3] = 1.224744871391589*bxby[7]+0.7071067811865475*bxby[5]; + byby_yr[0] = 1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yr[1] = 1.224744871391589*byby[4]+0.7071067811865475*byby[1]; + byby_yr[2] = 1.224744871391589*byby[6]+0.7071067811865475*byby[3]; + byby_yr[3] = 1.224744871391589*byby[7]+0.7071067811865475*byby[5]; + bybz_yr[0] = 1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yr[1] = 1.224744871391589*bybz[4]+0.7071067811865475*bybz[1]; + bybz_yr[2] = 1.224744871391589*bybz[6]+0.7071067811865475*bybz[3]; + bybz_yr[3] = 1.224744871391589*bybz[7]+0.7071067811865475*bybz[5]; + + double *bz_zl = &bvar_surf[64]; + double *bz_zr = &bvar_surf[68]; + double *bxbz_zl = &bvar_surf[72]; + double *bxbz_zr = &bvar_surf[76]; + double *bybz_zl = &bvar_surf[80]; + double *bybz_zr = &bvar_surf[84]; + double *bzbz_zl = &bvar_surf[88]; + double *bzbz_zr = &bvar_surf[92]; + + bz_zl[0] = 0.7071067811865475*bz[0]-1.224744871391589*bz[3]; + bz_zl[1] = 0.7071067811865475*bz[1]-1.224744871391589*bz[5]; + bz_zl[2] = 0.7071067811865475*bz[2]-1.224744871391589*bz[6]; + bz_zl[3] = 0.7071067811865475*bz[4]-1.224744871391589*bz[7]; + bxbz_zl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[3]; + bxbz_zl[1] = 0.7071067811865475*bxbz[1]-1.224744871391589*bxbz[5]; + bxbz_zl[2] = 0.7071067811865475*bxbz[2]-1.224744871391589*bxbz[6]; + bxbz_zl[3] = 0.7071067811865475*bxbz[4]-1.224744871391589*bxbz[7]; + bybz_zl[0] = 0.7071067811865475*bybz[0]-1.224744871391589*bybz[3]; + bybz_zl[1] = 0.7071067811865475*bybz[1]-1.224744871391589*bybz[5]; + bybz_zl[2] = 0.7071067811865475*bybz[2]-1.224744871391589*bybz[6]; + bybz_zl[3] = 0.7071067811865475*bybz[4]-1.224744871391589*bybz[7]; + bzbz_zl[0] = 0.7071067811865475*bzbz[0]-1.224744871391589*bzbz[3]; + bzbz_zl[1] = 0.7071067811865475*bzbz[1]-1.224744871391589*bzbz[5]; + bzbz_zl[2] = 0.7071067811865475*bzbz[2]-1.224744871391589*bzbz[6]; + bzbz_zl[3] = 0.7071067811865475*bzbz[4]-1.224744871391589*bzbz[7]; + + bz_zr[0] = 1.224744871391589*bz[3]+0.7071067811865475*bz[0]; + bz_zr[1] = 1.224744871391589*bz[5]+0.7071067811865475*bz[1]; + bz_zr[2] = 1.224744871391589*bz[6]+0.7071067811865475*bz[2]; + bz_zr[3] = 1.224744871391589*bz[7]+0.7071067811865475*bz[4]; + bxbz_zr[0] = 1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[0]; + bxbz_zr[1] = 1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[1]; + bxbz_zr[2] = 1.224744871391589*bxbz[6]+0.7071067811865475*bxbz[2]; + bxbz_zr[3] = 1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[4]; + bybz_zr[0] = 1.224744871391589*bybz[3]+0.7071067811865475*bybz[0]; + bybz_zr[1] = 1.224744871391589*bybz[5]+0.7071067811865475*bybz[1]; + bybz_zr[2] = 1.224744871391589*bybz[6]+0.7071067811865475*bybz[2]; + bybz_zr[3] = 1.224744871391589*bybz[7]+0.7071067811865475*bybz[4]; + bzbz_zr[0] = 1.224744871391589*bzbz[3]+0.7071067811865475*bzbz[0]; + bzbz_zr[1] = 1.224744871391589*bzbz[5]+0.7071067811865475*bzbz[1]; + bzbz_zr[2] = 1.224744871391589*bzbz[6]+0.7071067811865475*bzbz[2]; + bzbz_zr[3] = 1.224744871391589*bzbz[7]+0.7071067811865475*bzbz[4]; + } diff --git a/kernels/maxwell/em_copy_bvar_3x_tensor_p2.c b/kernels/maxwell/em_copy_bvar_3x_tensor_p2.c index ccb2231d5..719df9ac9 100644 --- a/kernels/maxwell/em_copy_bvar_3x_tensor_p2.c +++ b/kernels/maxwell/em_copy_bvar_3x_tensor_p2.c @@ -1,13 +1,14 @@ #include #include #include -GKYL_CU_DH void em_copy_bvar_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar) +GKYL_CU_DH void em_copy_bvar_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf) { // count: Integer to indicate which matrix being fetched. // x: Input solution vector. // em: Input electromagnetic fields. // cell_avg_magB2: Input flag for cell average if 1/|B|^2 only used cell averages. - // bvar: Output b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). + // bvar: Output volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). struct gkyl_mat x_bxbx = gkyl_nmat_get(x, count); struct gkyl_mat x_bxby = gkyl_nmat_get(x, count+1); @@ -440,5 +441,254 @@ GKYL_CU_DH void em_copy_bvar_3x_tensor_p2(int count, struct gkyl_nmat *x, const tensor_3x_p2_sqrt_with_sign(B_x, bxbx, bx); tensor_3x_p2_sqrt_with_sign(B_y, byby, by); tensor_3x_p2_sqrt_with_sign(B_z, bzbz, bz); + double *bx_xl = &bvar_surf[0]; + double *bx_xr = &bvar_surf[9]; + double *bxbx_xl = &bvar_surf[18]; + double *bxbx_xr = &bvar_surf[27]; + double *bxby_xl = &bvar_surf[36]; + double *bxby_xr = &bvar_surf[45]; + double *bxbz_xl = &bvar_surf[54]; + double *bxbz_xr = &bvar_surf[63]; + + bx_xl[0] = 1.58113883008419*bx[7]-1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xl[1] = 1.58113883008419*bx[11]-1.224744871391589*bx[4]+0.7071067811865475*bx[2]; + bx_xl[2] = 1.58113883008419*bx[13]-1.224744871391589*bx[5]+0.7071067811865475*bx[3]; + bx_xl[3] = 1.58113883008419*bx[17]-1.224744871391589*bx[10]+0.7071067811865475*bx[6]; + bx_xl[4] = 1.58113883008419*bx[20]-1.224744871391589*bx[12]+0.7071067811865475*bx[8]; + bx_xl[5] = 1.58113883008419*bx[21]-1.224744871391589*bx[15]+0.7071067811865475*bx[9]; + bx_xl[6] = 1.58113883008419*bx[23]-1.224744871391589*bx[18]+0.7071067811865475*bx[14]; + bx_xl[7] = 1.58113883008419*bx[24]-1.224744871391589*bx[19]+0.7071067811865475*bx[16]; + bx_xl[8] = 1.58113883008419*bx[26]-1.224744871391589*bx[25]+0.7071067811865475*bx[22]; + bxbx_xl[0] = 1.58113883008419*bxbx[7]-1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xl[1] = 1.58113883008419*bxbx[11]-1.224744871391589*bxbx[4]+0.7071067811865475*bxbx[2]; + bxbx_xl[2] = 1.58113883008419*bxbx[13]-1.224744871391589*bxbx[5]+0.7071067811865475*bxbx[3]; + bxbx_xl[3] = 1.58113883008419*bxbx[17]-1.224744871391589*bxbx[10]+0.7071067811865475*bxbx[6]; + bxbx_xl[4] = 1.58113883008419*bxbx[20]-1.224744871391589*bxbx[12]+0.7071067811865475*bxbx[8]; + bxbx_xl[5] = 1.58113883008419*bxbx[21]-1.224744871391589*bxbx[15]+0.7071067811865475*bxbx[9]; + bxbx_xl[6] = 1.58113883008419*bxbx[23]-1.224744871391589*bxbx[18]+0.7071067811865475*bxbx[14]; + bxbx_xl[7] = 1.58113883008419*bxbx[24]-1.224744871391589*bxbx[19]+0.7071067811865475*bxbx[16]; + bxbx_xl[8] = 1.58113883008419*bxbx[26]-1.224744871391589*bxbx[25]+0.7071067811865475*bxbx[22]; + bxby_xl[0] = 1.58113883008419*bxby[7]-1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xl[1] = 1.58113883008419*bxby[11]-1.224744871391589*bxby[4]+0.7071067811865475*bxby[2]; + bxby_xl[2] = 1.58113883008419*bxby[13]-1.224744871391589*bxby[5]+0.7071067811865475*bxby[3]; + bxby_xl[3] = 1.58113883008419*bxby[17]-1.224744871391589*bxby[10]+0.7071067811865475*bxby[6]; + bxby_xl[4] = 1.58113883008419*bxby[20]-1.224744871391589*bxby[12]+0.7071067811865475*bxby[8]; + bxby_xl[5] = 1.58113883008419*bxby[21]-1.224744871391589*bxby[15]+0.7071067811865475*bxby[9]; + bxby_xl[6] = 1.58113883008419*bxby[23]-1.224744871391589*bxby[18]+0.7071067811865475*bxby[14]; + bxby_xl[7] = 1.58113883008419*bxby[24]-1.224744871391589*bxby[19]+0.7071067811865475*bxby[16]; + bxby_xl[8] = 1.58113883008419*bxby[26]-1.224744871391589*bxby[25]+0.7071067811865475*bxby[22]; + bxbz_xl[0] = 1.58113883008419*bxbz[7]-1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xl[1] = 1.58113883008419*bxbz[11]-1.224744871391589*bxbz[4]+0.7071067811865475*bxbz[2]; + bxbz_xl[2] = 1.58113883008419*bxbz[13]-1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[3]; + bxbz_xl[3] = 1.58113883008419*bxbz[17]-1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[6]; + bxbz_xl[4] = 1.58113883008419*bxbz[20]-1.224744871391589*bxbz[12]+0.7071067811865475*bxbz[8]; + bxbz_xl[5] = 1.58113883008419*bxbz[21]-1.224744871391589*bxbz[15]+0.7071067811865475*bxbz[9]; + bxbz_xl[6] = 1.58113883008419*bxbz[23]-1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[14]; + bxbz_xl[7] = 1.58113883008419*bxbz[24]-1.224744871391589*bxbz[19]+0.7071067811865475*bxbz[16]; + bxbz_xl[8] = 1.58113883008419*bxbz[26]-1.224744871391589*bxbz[25]+0.7071067811865475*bxbz[22]; + + bx_xr[0] = 1.58113883008419*bx[7]+1.224744871391589*bx[1]+0.7071067811865475*bx[0]; + bx_xr[1] = 1.58113883008419*bx[11]+1.224744871391589*bx[4]+0.7071067811865475*bx[2]; + bx_xr[2] = 1.58113883008419*bx[13]+1.224744871391589*bx[5]+0.7071067811865475*bx[3]; + bx_xr[3] = 1.58113883008419*bx[17]+1.224744871391589*bx[10]+0.7071067811865475*bx[6]; + bx_xr[4] = 1.58113883008419*bx[20]+1.224744871391589*bx[12]+0.7071067811865475*bx[8]; + bx_xr[5] = 1.58113883008419*bx[21]+1.224744871391589*bx[15]+0.7071067811865475*bx[9]; + bx_xr[6] = 1.58113883008419*bx[23]+1.224744871391589*bx[18]+0.7071067811865475*bx[14]; + bx_xr[7] = 1.58113883008419*bx[24]+1.224744871391589*bx[19]+0.7071067811865475*bx[16]; + bx_xr[8] = 1.58113883008419*bx[26]+1.224744871391589*bx[25]+0.7071067811865475*bx[22]; + bxbx_xr[0] = 1.58113883008419*bxbx[7]+1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; + bxbx_xr[1] = 1.58113883008419*bxbx[11]+1.224744871391589*bxbx[4]+0.7071067811865475*bxbx[2]; + bxbx_xr[2] = 1.58113883008419*bxbx[13]+1.224744871391589*bxbx[5]+0.7071067811865475*bxbx[3]; + bxbx_xr[3] = 1.58113883008419*bxbx[17]+1.224744871391589*bxbx[10]+0.7071067811865475*bxbx[6]; + bxbx_xr[4] = 1.58113883008419*bxbx[20]+1.224744871391589*bxbx[12]+0.7071067811865475*bxbx[8]; + bxbx_xr[5] = 1.58113883008419*bxbx[21]+1.224744871391589*bxbx[15]+0.7071067811865475*bxbx[9]; + bxbx_xr[6] = 1.58113883008419*bxbx[23]+1.224744871391589*bxbx[18]+0.7071067811865475*bxbx[14]; + bxbx_xr[7] = 1.58113883008419*bxbx[24]+1.224744871391589*bxbx[19]+0.7071067811865475*bxbx[16]; + bxbx_xr[8] = 1.58113883008419*bxbx[26]+1.224744871391589*bxbx[25]+0.7071067811865475*bxbx[22]; + bxby_xr[0] = 1.58113883008419*bxby[7]+1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; + bxby_xr[1] = 1.58113883008419*bxby[11]+1.224744871391589*bxby[4]+0.7071067811865475*bxby[2]; + bxby_xr[2] = 1.58113883008419*bxby[13]+1.224744871391589*bxby[5]+0.7071067811865475*bxby[3]; + bxby_xr[3] = 1.58113883008419*bxby[17]+1.224744871391589*bxby[10]+0.7071067811865475*bxby[6]; + bxby_xr[4] = 1.58113883008419*bxby[20]+1.224744871391589*bxby[12]+0.7071067811865475*bxby[8]; + bxby_xr[5] = 1.58113883008419*bxby[21]+1.224744871391589*bxby[15]+0.7071067811865475*bxby[9]; + bxby_xr[6] = 1.58113883008419*bxby[23]+1.224744871391589*bxby[18]+0.7071067811865475*bxby[14]; + bxby_xr[7] = 1.58113883008419*bxby[24]+1.224744871391589*bxby[19]+0.7071067811865475*bxby[16]; + bxby_xr[8] = 1.58113883008419*bxby[26]+1.224744871391589*bxby[25]+0.7071067811865475*bxby[22]; + bxbz_xr[0] = 1.58113883008419*bxbz[7]+1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; + bxbz_xr[1] = 1.58113883008419*bxbz[11]+1.224744871391589*bxbz[4]+0.7071067811865475*bxbz[2]; + bxbz_xr[2] = 1.58113883008419*bxbz[13]+1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[3]; + bxbz_xr[3] = 1.58113883008419*bxbz[17]+1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[6]; + bxbz_xr[4] = 1.58113883008419*bxbz[20]+1.224744871391589*bxbz[12]+0.7071067811865475*bxbz[8]; + bxbz_xr[5] = 1.58113883008419*bxbz[21]+1.224744871391589*bxbz[15]+0.7071067811865475*bxbz[9]; + bxbz_xr[6] = 1.58113883008419*bxbz[23]+1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[14]; + bxbz_xr[7] = 1.58113883008419*bxbz[24]+1.224744871391589*bxbz[19]+0.7071067811865475*bxbz[16]; + bxbz_xr[8] = 1.58113883008419*bxbz[26]+1.224744871391589*bxbz[25]+0.7071067811865475*bxbz[22]; + + double *by_yl = &bvar_surf[72]; + double *by_yr = &bvar_surf[81]; + double *bxby_yl = &bvar_surf[90]; + double *bxby_yr = &bvar_surf[99]; + double *byby_yl = &bvar_surf[108]; + double *byby_yr = &bvar_surf[117]; + double *bybz_yl = &bvar_surf[126]; + double *bybz_yr = &bvar_surf[135]; + + by_yl[0] = 1.58113883008419*by[8]-1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yl[1] = 1.58113883008419*by[12]-1.224744871391589*by[4]+0.7071067811865475*by[1]; + by_yl[2] = 1.58113883008419*by[14]-1.224744871391589*by[6]+0.7071067811865475*by[3]; + by_yl[3] = 1.58113883008419*by[18]-1.224744871391589*by[10]+0.7071067811865475*by[5]; + by_yl[4] = 1.58113883008419*by[20]-1.224744871391589*by[11]+0.7071067811865475*by[7]; + by_yl[5] = 1.58113883008419*by[22]-1.224744871391589*by[16]+0.7071067811865475*by[9]; + by_yl[6] = 1.58113883008419*by[23]-1.224744871391589*by[17]+0.7071067811865475*by[13]; + by_yl[7] = 1.58113883008419*by[25]-1.224744871391589*by[19]+0.7071067811865475*by[15]; + by_yl[8] = 1.58113883008419*by[26]-1.224744871391589*by[24]+0.7071067811865475*by[21]; + bxby_yl[0] = 1.58113883008419*bxby[8]-1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yl[1] = 1.58113883008419*bxby[12]-1.224744871391589*bxby[4]+0.7071067811865475*bxby[1]; + bxby_yl[2] = 1.58113883008419*bxby[14]-1.224744871391589*bxby[6]+0.7071067811865475*bxby[3]; + bxby_yl[3] = 1.58113883008419*bxby[18]-1.224744871391589*bxby[10]+0.7071067811865475*bxby[5]; + bxby_yl[4] = 1.58113883008419*bxby[20]-1.224744871391589*bxby[11]+0.7071067811865475*bxby[7]; + bxby_yl[5] = 1.58113883008419*bxby[22]-1.224744871391589*bxby[16]+0.7071067811865475*bxby[9]; + bxby_yl[6] = 1.58113883008419*bxby[23]-1.224744871391589*bxby[17]+0.7071067811865475*bxby[13]; + bxby_yl[7] = 1.58113883008419*bxby[25]-1.224744871391589*bxby[19]+0.7071067811865475*bxby[15]; + bxby_yl[8] = 1.58113883008419*bxby[26]-1.224744871391589*bxby[24]+0.7071067811865475*bxby[21]; + byby_yl[0] = 1.58113883008419*byby[8]-1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yl[1] = 1.58113883008419*byby[12]-1.224744871391589*byby[4]+0.7071067811865475*byby[1]; + byby_yl[2] = 1.58113883008419*byby[14]-1.224744871391589*byby[6]+0.7071067811865475*byby[3]; + byby_yl[3] = 1.58113883008419*byby[18]-1.224744871391589*byby[10]+0.7071067811865475*byby[5]; + byby_yl[4] = 1.58113883008419*byby[20]-1.224744871391589*byby[11]+0.7071067811865475*byby[7]; + byby_yl[5] = 1.58113883008419*byby[22]-1.224744871391589*byby[16]+0.7071067811865475*byby[9]; + byby_yl[6] = 1.58113883008419*byby[23]-1.224744871391589*byby[17]+0.7071067811865475*byby[13]; + byby_yl[7] = 1.58113883008419*byby[25]-1.224744871391589*byby[19]+0.7071067811865475*byby[15]; + byby_yl[8] = 1.58113883008419*byby[26]-1.224744871391589*byby[24]+0.7071067811865475*byby[21]; + bybz_yl[0] = 1.58113883008419*bybz[8]-1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yl[1] = 1.58113883008419*bybz[12]-1.224744871391589*bybz[4]+0.7071067811865475*bybz[1]; + bybz_yl[2] = 1.58113883008419*bybz[14]-1.224744871391589*bybz[6]+0.7071067811865475*bybz[3]; + bybz_yl[3] = 1.58113883008419*bybz[18]-1.224744871391589*bybz[10]+0.7071067811865475*bybz[5]; + bybz_yl[4] = 1.58113883008419*bybz[20]-1.224744871391589*bybz[11]+0.7071067811865475*bybz[7]; + bybz_yl[5] = 1.58113883008419*bybz[22]-1.224744871391589*bybz[16]+0.7071067811865475*bybz[9]; + bybz_yl[6] = 1.58113883008419*bybz[23]-1.224744871391589*bybz[17]+0.7071067811865475*bybz[13]; + bybz_yl[7] = 1.58113883008419*bybz[25]-1.224744871391589*bybz[19]+0.7071067811865475*bybz[15]; + bybz_yl[8] = 1.58113883008419*bybz[26]-1.224744871391589*bybz[24]+0.7071067811865475*bybz[21]; + + by_yr[0] = 1.58113883008419*by[8]+1.224744871391589*by[2]+0.7071067811865475*by[0]; + by_yr[1] = 1.58113883008419*by[12]+1.224744871391589*by[4]+0.7071067811865475*by[1]; + by_yr[2] = 1.58113883008419*by[14]+1.224744871391589*by[6]+0.7071067811865475*by[3]; + by_yr[3] = 1.58113883008419*by[18]+1.224744871391589*by[10]+0.7071067811865475*by[5]; + by_yr[4] = 1.58113883008419*by[20]+1.224744871391589*by[11]+0.7071067811865475*by[7]; + by_yr[5] = 1.58113883008419*by[22]+1.224744871391589*by[16]+0.7071067811865475*by[9]; + by_yr[6] = 1.58113883008419*by[23]+1.224744871391589*by[17]+0.7071067811865475*by[13]; + by_yr[7] = 1.58113883008419*by[25]+1.224744871391589*by[19]+0.7071067811865475*by[15]; + by_yr[8] = 1.58113883008419*by[26]+1.224744871391589*by[24]+0.7071067811865475*by[21]; + bxby_yr[0] = 1.58113883008419*bxby[8]+1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; + bxby_yr[1] = 1.58113883008419*bxby[12]+1.224744871391589*bxby[4]+0.7071067811865475*bxby[1]; + bxby_yr[2] = 1.58113883008419*bxby[14]+1.224744871391589*bxby[6]+0.7071067811865475*bxby[3]; + bxby_yr[3] = 1.58113883008419*bxby[18]+1.224744871391589*bxby[10]+0.7071067811865475*bxby[5]; + bxby_yr[4] = 1.58113883008419*bxby[20]+1.224744871391589*bxby[11]+0.7071067811865475*bxby[7]; + bxby_yr[5] = 1.58113883008419*bxby[22]+1.224744871391589*bxby[16]+0.7071067811865475*bxby[9]; + bxby_yr[6] = 1.58113883008419*bxby[23]+1.224744871391589*bxby[17]+0.7071067811865475*bxby[13]; + bxby_yr[7] = 1.58113883008419*bxby[25]+1.224744871391589*bxby[19]+0.7071067811865475*bxby[15]; + bxby_yr[8] = 1.58113883008419*bxby[26]+1.224744871391589*bxby[24]+0.7071067811865475*bxby[21]; + byby_yr[0] = 1.58113883008419*byby[8]+1.224744871391589*byby[2]+0.7071067811865475*byby[0]; + byby_yr[1] = 1.58113883008419*byby[12]+1.224744871391589*byby[4]+0.7071067811865475*byby[1]; + byby_yr[2] = 1.58113883008419*byby[14]+1.224744871391589*byby[6]+0.7071067811865475*byby[3]; + byby_yr[3] = 1.58113883008419*byby[18]+1.224744871391589*byby[10]+0.7071067811865475*byby[5]; + byby_yr[4] = 1.58113883008419*byby[20]+1.224744871391589*byby[11]+0.7071067811865475*byby[7]; + byby_yr[5] = 1.58113883008419*byby[22]+1.224744871391589*byby[16]+0.7071067811865475*byby[9]; + byby_yr[6] = 1.58113883008419*byby[23]+1.224744871391589*byby[17]+0.7071067811865475*byby[13]; + byby_yr[7] = 1.58113883008419*byby[25]+1.224744871391589*byby[19]+0.7071067811865475*byby[15]; + byby_yr[8] = 1.58113883008419*byby[26]+1.224744871391589*byby[24]+0.7071067811865475*byby[21]; + bybz_yr[0] = 1.58113883008419*bybz[8]+1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; + bybz_yr[1] = 1.58113883008419*bybz[12]+1.224744871391589*bybz[4]+0.7071067811865475*bybz[1]; + bybz_yr[2] = 1.58113883008419*bybz[14]+1.224744871391589*bybz[6]+0.7071067811865475*bybz[3]; + bybz_yr[3] = 1.58113883008419*bybz[18]+1.224744871391589*bybz[10]+0.7071067811865475*bybz[5]; + bybz_yr[4] = 1.58113883008419*bybz[20]+1.224744871391589*bybz[11]+0.7071067811865475*bybz[7]; + bybz_yr[5] = 1.58113883008419*bybz[22]+1.224744871391589*bybz[16]+0.7071067811865475*bybz[9]; + bybz_yr[6] = 1.58113883008419*bybz[23]+1.224744871391589*bybz[17]+0.7071067811865475*bybz[13]; + bybz_yr[7] = 1.58113883008419*bybz[25]+1.224744871391589*bybz[19]+0.7071067811865475*bybz[15]; + bybz_yr[8] = 1.58113883008419*bybz[26]+1.224744871391589*bybz[24]+0.7071067811865475*bybz[21]; + + double *bz_zl = &bvar_surf[144]; + double *bz_zr = &bvar_surf[153]; + double *bxbz_zl = &bvar_surf[162]; + double *bxbz_zr = &bvar_surf[171]; + double *bybz_zl = &bvar_surf[180]; + double *bybz_zr = &bvar_surf[189]; + double *bzbz_zl = &bvar_surf[198]; + double *bzbz_zr = &bvar_surf[207]; + + bz_zl[0] = 1.58113883008419*bz[9]-1.224744871391589*bz[3]+0.7071067811865475*bz[0]; + bz_zl[1] = 1.58113883008419*bz[15]-1.224744871391589*bz[5]+0.7071067811865475*bz[1]; + bz_zl[2] = 1.58113883008419*bz[16]-1.224744871391589*bz[6]+0.7071067811865475*bz[2]; + bz_zl[3] = 1.58113883008419*bz[19]-1.224744871391589*bz[10]+0.7071067811865475*bz[4]; + bz_zl[4] = 1.58113883008419*bz[21]-1.224744871391589*bz[13]+0.7071067811865475*bz[7]; + bz_zl[5] = 1.58113883008419*bz[22]-1.224744871391589*bz[14]+0.7071067811865475*bz[8]; + bz_zl[6] = 1.58113883008419*bz[24]-1.224744871391589*bz[17]+0.7071067811865475*bz[11]; + bz_zl[7] = 1.58113883008419*bz[25]-1.224744871391589*bz[18]+0.7071067811865475*bz[12]; + bz_zl[8] = 1.58113883008419*bz[26]-1.224744871391589*bz[23]+0.7071067811865475*bz[20]; + bxbz_zl[0] = 1.58113883008419*bxbz[9]-1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[0]; + bxbz_zl[1] = 1.58113883008419*bxbz[15]-1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[1]; + bxbz_zl[2] = 1.58113883008419*bxbz[16]-1.224744871391589*bxbz[6]+0.7071067811865475*bxbz[2]; + bxbz_zl[3] = 1.58113883008419*bxbz[19]-1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[4]; + bxbz_zl[4] = 1.58113883008419*bxbz[21]-1.224744871391589*bxbz[13]+0.7071067811865475*bxbz[7]; + bxbz_zl[5] = 1.58113883008419*bxbz[22]-1.224744871391589*bxbz[14]+0.7071067811865475*bxbz[8]; + bxbz_zl[6] = 1.58113883008419*bxbz[24]-1.224744871391589*bxbz[17]+0.7071067811865475*bxbz[11]; + bxbz_zl[7] = 1.58113883008419*bxbz[25]-1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[12]; + bxbz_zl[8] = 1.58113883008419*bxbz[26]-1.224744871391589*bxbz[23]+0.7071067811865475*bxbz[20]; + bybz_zl[0] = 1.58113883008419*bybz[9]-1.224744871391589*bybz[3]+0.7071067811865475*bybz[0]; + bybz_zl[1] = 1.58113883008419*bybz[15]-1.224744871391589*bybz[5]+0.7071067811865475*bybz[1]; + bybz_zl[2] = 1.58113883008419*bybz[16]-1.224744871391589*bybz[6]+0.7071067811865475*bybz[2]; + bybz_zl[3] = 1.58113883008419*bybz[19]-1.224744871391589*bybz[10]+0.7071067811865475*bybz[4]; + bybz_zl[4] = 1.58113883008419*bybz[21]-1.224744871391589*bybz[13]+0.7071067811865475*bybz[7]; + bybz_zl[5] = 1.58113883008419*bybz[22]-1.224744871391589*bybz[14]+0.7071067811865475*bybz[8]; + bybz_zl[6] = 1.58113883008419*bybz[24]-1.224744871391589*bybz[17]+0.7071067811865475*bybz[11]; + bybz_zl[7] = 1.58113883008419*bybz[25]-1.224744871391589*bybz[18]+0.7071067811865475*bybz[12]; + bybz_zl[8] = 1.58113883008419*bybz[26]-1.224744871391589*bybz[23]+0.7071067811865475*bybz[20]; + bzbz_zl[0] = 1.58113883008419*bzbz[9]-1.224744871391589*bzbz[3]+0.7071067811865475*bzbz[0]; + bzbz_zl[1] = 1.58113883008419*bzbz[15]-1.224744871391589*bzbz[5]+0.7071067811865475*bzbz[1]; + bzbz_zl[2] = 1.58113883008419*bzbz[16]-1.224744871391589*bzbz[6]+0.7071067811865475*bzbz[2]; + bzbz_zl[3] = 1.58113883008419*bzbz[19]-1.224744871391589*bzbz[10]+0.7071067811865475*bzbz[4]; + bzbz_zl[4] = 1.58113883008419*bzbz[21]-1.224744871391589*bzbz[13]+0.7071067811865475*bzbz[7]; + bzbz_zl[5] = 1.58113883008419*bzbz[22]-1.224744871391589*bzbz[14]+0.7071067811865475*bzbz[8]; + bzbz_zl[6] = 1.58113883008419*bzbz[24]-1.224744871391589*bzbz[17]+0.7071067811865475*bzbz[11]; + bzbz_zl[7] = 1.58113883008419*bzbz[25]-1.224744871391589*bzbz[18]+0.7071067811865475*bzbz[12]; + bzbz_zl[8] = 1.58113883008419*bzbz[26]-1.224744871391589*bzbz[23]+0.7071067811865475*bzbz[20]; + + bz_zr[0] = 1.58113883008419*bz[9]+1.224744871391589*bz[3]+0.7071067811865475*bz[0]; + bz_zr[1] = 1.58113883008419*bz[15]+1.224744871391589*bz[5]+0.7071067811865475*bz[1]; + bz_zr[2] = 1.58113883008419*bz[16]+1.224744871391589*bz[6]+0.7071067811865475*bz[2]; + bz_zr[3] = 1.58113883008419*bz[19]+1.224744871391589*bz[10]+0.7071067811865475*bz[4]; + bz_zr[4] = 1.58113883008419*bz[21]+1.224744871391589*bz[13]+0.7071067811865475*bz[7]; + bz_zr[5] = 1.58113883008419*bz[22]+1.224744871391589*bz[14]+0.7071067811865475*bz[8]; + bz_zr[6] = 1.58113883008419*bz[24]+1.224744871391589*bz[17]+0.7071067811865475*bz[11]; + bz_zr[7] = 1.58113883008419*bz[25]+1.224744871391589*bz[18]+0.7071067811865475*bz[12]; + bz_zr[8] = 1.58113883008419*bz[26]+1.224744871391589*bz[23]+0.7071067811865475*bz[20]; + bxbz_zr[0] = 1.58113883008419*bxbz[9]+1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[0]; + bxbz_zr[1] = 1.58113883008419*bxbz[15]+1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[1]; + bxbz_zr[2] = 1.58113883008419*bxbz[16]+1.224744871391589*bxbz[6]+0.7071067811865475*bxbz[2]; + bxbz_zr[3] = 1.58113883008419*bxbz[19]+1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[4]; + bxbz_zr[4] = 1.58113883008419*bxbz[21]+1.224744871391589*bxbz[13]+0.7071067811865475*bxbz[7]; + bxbz_zr[5] = 1.58113883008419*bxbz[22]+1.224744871391589*bxbz[14]+0.7071067811865475*bxbz[8]; + bxbz_zr[6] = 1.58113883008419*bxbz[24]+1.224744871391589*bxbz[17]+0.7071067811865475*bxbz[11]; + bxbz_zr[7] = 1.58113883008419*bxbz[25]+1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[12]; + bxbz_zr[8] = 1.58113883008419*bxbz[26]+1.224744871391589*bxbz[23]+0.7071067811865475*bxbz[20]; + bybz_zr[0] = 1.58113883008419*bybz[9]+1.224744871391589*bybz[3]+0.7071067811865475*bybz[0]; + bybz_zr[1] = 1.58113883008419*bybz[15]+1.224744871391589*bybz[5]+0.7071067811865475*bybz[1]; + bybz_zr[2] = 1.58113883008419*bybz[16]+1.224744871391589*bybz[6]+0.7071067811865475*bybz[2]; + bybz_zr[3] = 1.58113883008419*bybz[19]+1.224744871391589*bybz[10]+0.7071067811865475*bybz[4]; + bybz_zr[4] = 1.58113883008419*bybz[21]+1.224744871391589*bybz[13]+0.7071067811865475*bybz[7]; + bybz_zr[5] = 1.58113883008419*bybz[22]+1.224744871391589*bybz[14]+0.7071067811865475*bybz[8]; + bybz_zr[6] = 1.58113883008419*bybz[24]+1.224744871391589*bybz[17]+0.7071067811865475*bybz[11]; + bybz_zr[7] = 1.58113883008419*bybz[25]+1.224744871391589*bybz[18]+0.7071067811865475*bybz[12]; + bybz_zr[8] = 1.58113883008419*bybz[26]+1.224744871391589*bybz[23]+0.7071067811865475*bybz[20]; + bzbz_zr[0] = 1.58113883008419*bzbz[9]+1.224744871391589*bzbz[3]+0.7071067811865475*bzbz[0]; + bzbz_zr[1] = 1.58113883008419*bzbz[15]+1.224744871391589*bzbz[5]+0.7071067811865475*bzbz[1]; + bzbz_zr[2] = 1.58113883008419*bzbz[16]+1.224744871391589*bzbz[6]+0.7071067811865475*bzbz[2]; + bzbz_zr[3] = 1.58113883008419*bzbz[19]+1.224744871391589*bzbz[10]+0.7071067811865475*bzbz[4]; + bzbz_zr[4] = 1.58113883008419*bzbz[21]+1.224744871391589*bzbz[13]+0.7071067811865475*bzbz[7]; + bzbz_zr[5] = 1.58113883008419*bzbz[22]+1.224744871391589*bzbz[14]+0.7071067811865475*bzbz[8]; + bzbz_zr[6] = 1.58113883008419*bzbz[24]+1.224744871391589*bzbz[17]+0.7071067811865475*bzbz[11]; + bzbz_zr[7] = 1.58113883008419*bzbz[25]+1.224744871391589*bzbz[18]+0.7071067811865475*bzbz[12]; + bzbz_zr[8] = 1.58113883008419*bzbz[26]+1.224744871391589*bzbz[23]+0.7071067811865475*bzbz[20]; + } diff --git a/kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c b/kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c deleted file mode 100644 index 7d49d52ac..000000000 --- a/kernels/maxwell/em_surf_set_bvar_1x_ser_p1.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -GKYL_CU_DH void em_surf_set_bvar_1x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf) -{ - // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). - // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. - - const double *bx = &bvar[0]; - const double *by = &bvar[2]; - const double *bz = &bvar[4]; - const double *bxbx = &bvar[6]; - const double *bxby = &bvar[8]; - const double *bxbz = &bvar[10]; - const double *byby = &bvar[12]; - const double *bybz = &bvar[14]; - const double *bzbz = &bvar[16]; - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[1]; - double *bxbx_xl = &bvar_surf[2]; - double *bxbx_xr = &bvar_surf[3]; - double *bxby_xl = &bvar_surf[4]; - double *bxby_xr = &bvar_surf[5]; - double *bxbz_xl = &bvar_surf[6]; - double *bxbz_xr = &bvar_surf[7]; - - bx_xl[0] = 0.7071067811865475*bx[0]-1.224744871391589*bx[1]; - bx_xr[0] = 1.224744871391589*bx[1]+0.7071067811865475*bx[0]; - bxbx_xl[0] = 0.7071067811865475*bxbx[0]-1.224744871391589*bxbx[1]; - bxbx_xr[0] = 1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; - bxby_xl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[1]; - bxby_xr[0] = 1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; - bxbz_xl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[1]; - bxbz_xr[0] = 1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - -} - diff --git a/kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c b/kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c deleted file mode 100644 index d9d37fb1c..000000000 --- a/kernels/maxwell/em_surf_set_bvar_1x_ser_p2.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -GKYL_CU_DH void em_surf_set_bvar_1x_ser_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf) -{ - // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). - // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. - - const double *bx = &bvar[0]; - const double *by = &bvar[3]; - const double *bz = &bvar[6]; - const double *bxbx = &bvar[9]; - const double *bxby = &bvar[12]; - const double *bxbz = &bvar[15]; - const double *byby = &bvar[18]; - const double *bybz = &bvar[21]; - const double *bzbz = &bvar[24]; - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[1]; - double *bxbx_xl = &bvar_surf[2]; - double *bxbx_xr = &bvar_surf[3]; - double *bxby_xl = &bvar_surf[4]; - double *bxby_xr = &bvar_surf[5]; - double *bxbz_xl = &bvar_surf[6]; - double *bxbz_xr = &bvar_surf[7]; - - bx_xl[0] = 1.58113883008419*bx[2]-1.224744871391589*bx[1]+0.7071067811865475*bx[0]; - bx_xr[0] = 1.58113883008419*bx[2]+1.224744871391589*bx[1]+0.7071067811865475*bx[0]; - bxbx_xl[0] = 1.58113883008419*bxbx[2]-1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; - bxbx_xr[0] = 1.58113883008419*bxbx[2]+1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; - bxby_xl[0] = 1.58113883008419*bxby[2]-1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; - bxby_xr[0] = 1.58113883008419*bxby[2]+1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; - bxbz_xl[0] = 1.58113883008419*bxbz[2]-1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - bxbz_xr[0] = 1.58113883008419*bxbz[2]+1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - -} - diff --git a/kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c b/kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c deleted file mode 100644 index 9dc747cee..000000000 --- a/kernels/maxwell/em_surf_set_bvar_2x_ser_p1.c +++ /dev/null @@ -1,72 +0,0 @@ -#include -GKYL_CU_DH void em_surf_set_bvar_2x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf) -{ - // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). - // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. - - const double *bx = &bvar[0]; - const double *by = &bvar[4]; - const double *bz = &bvar[8]; - const double *bxbx = &bvar[12]; - const double *bxby = &bvar[16]; - const double *bxbz = &bvar[20]; - const double *byby = &bvar[24]; - const double *bybz = &bvar[28]; - const double *bzbz = &bvar[32]; - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[2]; - double *bxbx_xl = &bvar_surf[4]; - double *bxbx_xr = &bvar_surf[6]; - double *bxby_xl = &bvar_surf[8]; - double *bxby_xr = &bvar_surf[10]; - double *bxbz_xl = &bvar_surf[12]; - double *bxbz_xr = &bvar_surf[14]; - - bx_xl[0] = 0.7071067811865475*bx[0]-1.224744871391589*bx[1]; - bx_xl[1] = 0.7071067811865475*bx[2]-1.224744871391589*bx[3]; - bxbx_xl[0] = 0.7071067811865475*bxbx[0]-1.224744871391589*bxbx[1]; - bxbx_xl[1] = 0.7071067811865475*bxbx[2]-1.224744871391589*bxbx[3]; - bxby_xl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[1]; - bxby_xl[1] = 0.7071067811865475*bxby[2]-1.224744871391589*bxby[3]; - bxbz_xl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[1]; - bxbz_xl[1] = 0.7071067811865475*bxbz[2]-1.224744871391589*bxbz[3]; - - bx_xr[0] = 1.224744871391589*bx[1]+0.7071067811865475*bx[0]; - bx_xr[1] = 1.224744871391589*bx[3]+0.7071067811865475*bx[2]; - bxbx_xr[0] = 1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; - bxbx_xr[1] = 1.224744871391589*bxbx[3]+0.7071067811865475*bxbx[2]; - bxby_xr[0] = 1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; - bxby_xr[1] = 1.224744871391589*bxby[3]+0.7071067811865475*bxby[2]; - bxbz_xr[0] = 1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - bxbz_xr[1] = 1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[2]; - - double *by_yl = &bvar_surf[16]; - double *by_yr = &bvar_surf[18]; - double *bxby_yl = &bvar_surf[20]; - double *bxby_yr = &bvar_surf[22]; - double *byby_yl = &bvar_surf[24]; - double *byby_yr = &bvar_surf[26]; - double *bybz_yl = &bvar_surf[28]; - double *bybz_yr = &bvar_surf[30]; - - by_yl[0] = 0.7071067811865475*by[0]-1.224744871391589*by[2]; - by_yl[1] = 0.7071067811865475*by[1]-1.224744871391589*by[3]; - bxby_yl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[2]; - bxby_yl[1] = 0.7071067811865475*bxby[1]-1.224744871391589*bxby[3]; - byby_yl[0] = 0.7071067811865475*byby[0]-1.224744871391589*byby[2]; - byby_yl[1] = 0.7071067811865475*byby[1]-1.224744871391589*byby[3]; - bybz_yl[0] = 0.7071067811865475*bybz[0]-1.224744871391589*bybz[2]; - bybz_yl[1] = 0.7071067811865475*bybz[1]-1.224744871391589*bybz[3]; - - by_yr[0] = 1.224744871391589*by[2]+0.7071067811865475*by[0]; - by_yr[1] = 1.224744871391589*by[3]+0.7071067811865475*by[1]; - bxby_yr[0] = 1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; - bxby_yr[1] = 1.224744871391589*bxby[3]+0.7071067811865475*bxby[1]; - byby_yr[0] = 1.224744871391589*byby[2]+0.7071067811865475*byby[0]; - byby_yr[1] = 1.224744871391589*byby[3]+0.7071067811865475*byby[1]; - bybz_yr[0] = 1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; - bybz_yr[1] = 1.224744871391589*bybz[3]+0.7071067811865475*bybz[1]; - -} - diff --git a/kernels/maxwell/em_surf_set_bvar_2x_tensor_p2.c b/kernels/maxwell/em_surf_set_bvar_2x_tensor_p2.c deleted file mode 100644 index fe4bb00a8..000000000 --- a/kernels/maxwell/em_surf_set_bvar_2x_tensor_p2.c +++ /dev/null @@ -1,88 +0,0 @@ -#include -GKYL_CU_DH void em_surf_set_bvar_2x_tensor_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf) -{ - // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). - // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. - - const double *bx = &bvar[0]; - const double *by = &bvar[9]; - const double *bz = &bvar[18]; - const double *bxbx = &bvar[27]; - const double *bxby = &bvar[36]; - const double *bxbz = &bvar[45]; - const double *byby = &bvar[54]; - const double *bybz = &bvar[63]; - const double *bzbz = &bvar[72]; - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[3]; - double *bxbx_xl = &bvar_surf[6]; - double *bxbx_xr = &bvar_surf[9]; - double *bxby_xl = &bvar_surf[12]; - double *bxby_xr = &bvar_surf[15]; - double *bxbz_xl = &bvar_surf[18]; - double *bxbz_xr = &bvar_surf[21]; - - bx_xl[0] = 1.58113883008419*bx[4]-1.224744871391589*bx[1]+0.7071067811865475*bx[0]; - bx_xl[1] = 1.58113883008419*bx[6]-1.224744871391589*bx[3]+0.7071067811865475*bx[2]; - bx_xl[2] = 1.58113883008419*bx[8]-1.224744871391589*bx[7]+0.7071067811865475*bx[5]; - bxbx_xl[0] = 1.58113883008419*bxbx[4]-1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; - bxbx_xl[1] = 1.58113883008419*bxbx[6]-1.224744871391589*bxbx[3]+0.7071067811865475*bxbx[2]; - bxbx_xl[2] = 1.58113883008419*bxbx[8]-1.224744871391589*bxbx[7]+0.7071067811865475*bxbx[5]; - bxby_xl[0] = 1.58113883008419*bxby[4]-1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; - bxby_xl[1] = 1.58113883008419*bxby[6]-1.224744871391589*bxby[3]+0.7071067811865475*bxby[2]; - bxby_xl[2] = 1.58113883008419*bxby[8]-1.224744871391589*bxby[7]+0.7071067811865475*bxby[5]; - bxbz_xl[0] = 1.58113883008419*bxbz[4]-1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - bxbz_xl[1] = 1.58113883008419*bxbz[6]-1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[2]; - bxbz_xl[2] = 1.58113883008419*bxbz[8]-1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[5]; - - bx_xr[0] = 1.58113883008419*bx[4]+1.224744871391589*bx[1]+0.7071067811865475*bx[0]; - bx_xr[1] = 1.58113883008419*bx[6]+1.224744871391589*bx[3]+0.7071067811865475*bx[2]; - bx_xr[2] = 1.58113883008419*bx[8]+1.224744871391589*bx[7]+0.7071067811865475*bx[5]; - bxbx_xr[0] = 1.58113883008419*bxbx[4]+1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; - bxbx_xr[1] = 1.58113883008419*bxbx[6]+1.224744871391589*bxbx[3]+0.7071067811865475*bxbx[2]; - bxbx_xr[2] = 1.58113883008419*bxbx[8]+1.224744871391589*bxbx[7]+0.7071067811865475*bxbx[5]; - bxby_xr[0] = 1.58113883008419*bxby[4]+1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; - bxby_xr[1] = 1.58113883008419*bxby[6]+1.224744871391589*bxby[3]+0.7071067811865475*bxby[2]; - bxby_xr[2] = 1.58113883008419*bxby[8]+1.224744871391589*bxby[7]+0.7071067811865475*bxby[5]; - bxbz_xr[0] = 1.58113883008419*bxbz[4]+1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - bxbz_xr[1] = 1.58113883008419*bxbz[6]+1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[2]; - bxbz_xr[2] = 1.58113883008419*bxbz[8]+1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[5]; - - double *by_yl = &bvar_surf[24]; - double *by_yr = &bvar_surf[27]; - double *bxby_yl = &bvar_surf[30]; - double *bxby_yr = &bvar_surf[33]; - double *byby_yl = &bvar_surf[36]; - double *byby_yr = &bvar_surf[39]; - double *bybz_yl = &bvar_surf[42]; - double *bybz_yr = &bvar_surf[45]; - - by_yl[0] = 1.58113883008419*by[5]-1.224744871391589*by[2]+0.7071067811865475*by[0]; - by_yl[1] = 1.58113883008419*by[7]-1.224744871391589*by[3]+0.7071067811865475*by[1]; - by_yl[2] = 1.58113883008419*by[8]-1.224744871391589*by[6]+0.7071067811865475*by[4]; - bxby_yl[0] = 1.58113883008419*bxby[5]-1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; - bxby_yl[1] = 1.58113883008419*bxby[7]-1.224744871391589*bxby[3]+0.7071067811865475*bxby[1]; - bxby_yl[2] = 1.58113883008419*bxby[8]-1.224744871391589*bxby[6]+0.7071067811865475*bxby[4]; - byby_yl[0] = 1.58113883008419*byby[5]-1.224744871391589*byby[2]+0.7071067811865475*byby[0]; - byby_yl[1] = 1.58113883008419*byby[7]-1.224744871391589*byby[3]+0.7071067811865475*byby[1]; - byby_yl[2] = 1.58113883008419*byby[8]-1.224744871391589*byby[6]+0.7071067811865475*byby[4]; - bybz_yl[0] = 1.58113883008419*bybz[5]-1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; - bybz_yl[1] = 1.58113883008419*bybz[7]-1.224744871391589*bybz[3]+0.7071067811865475*bybz[1]; - bybz_yl[2] = 1.58113883008419*bybz[8]-1.224744871391589*bybz[6]+0.7071067811865475*bybz[4]; - - by_yr[0] = 1.58113883008419*by[5]+1.224744871391589*by[2]+0.7071067811865475*by[0]; - by_yr[1] = 1.58113883008419*by[7]+1.224744871391589*by[3]+0.7071067811865475*by[1]; - by_yr[2] = 1.58113883008419*by[8]+1.224744871391589*by[6]+0.7071067811865475*by[4]; - bxby_yr[0] = 1.58113883008419*bxby[5]+1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; - bxby_yr[1] = 1.58113883008419*bxby[7]+1.224744871391589*bxby[3]+0.7071067811865475*bxby[1]; - bxby_yr[2] = 1.58113883008419*bxby[8]+1.224744871391589*bxby[6]+0.7071067811865475*bxby[4]; - byby_yr[0] = 1.58113883008419*byby[5]+1.224744871391589*byby[2]+0.7071067811865475*byby[0]; - byby_yr[1] = 1.58113883008419*byby[7]+1.224744871391589*byby[3]+0.7071067811865475*byby[1]; - byby_yr[2] = 1.58113883008419*byby[8]+1.224744871391589*byby[6]+0.7071067811865475*byby[4]; - bybz_yr[0] = 1.58113883008419*bybz[5]+1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; - bybz_yr[1] = 1.58113883008419*bybz[7]+1.224744871391589*bybz[3]+0.7071067811865475*bybz[1]; - bybz_yr[2] = 1.58113883008419*bybz[8]+1.224744871391589*bybz[6]+0.7071067811865475*bybz[4]; - -} - diff --git a/kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c b/kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c deleted file mode 100644 index 0e3767e59..000000000 --- a/kernels/maxwell/em_surf_set_bvar_3x_ser_p1.c +++ /dev/null @@ -1,147 +0,0 @@ -#include -GKYL_CU_DH void em_surf_set_bvar_3x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf) -{ - // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). - // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. - - const double *bx = &bvar[0]; - const double *by = &bvar[8]; - const double *bz = &bvar[16]; - const double *bxbx = &bvar[24]; - const double *bxby = &bvar[32]; - const double *bxbz = &bvar[40]; - const double *byby = &bvar[48]; - const double *bybz = &bvar[56]; - const double *bzbz = &bvar[64]; - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[4]; - double *bxbx_xl = &bvar_surf[8]; - double *bxbx_xr = &bvar_surf[12]; - double *bxby_xl = &bvar_surf[16]; - double *bxby_xr = &bvar_surf[20]; - double *bxbz_xl = &bvar_surf[24]; - double *bxbz_xr = &bvar_surf[28]; - - bx_xl[0] = 0.7071067811865475*bx[0]-1.224744871391589*bx[1]; - bx_xl[1] = 0.7071067811865475*bx[2]-1.224744871391589*bx[4]; - bx_xl[2] = 0.7071067811865475*bx[3]-1.224744871391589*bx[5]; - bx_xl[3] = 0.7071067811865475*bx[6]-1.224744871391589*bx[7]; - bxbx_xl[0] = 0.7071067811865475*bxbx[0]-1.224744871391589*bxbx[1]; - bxbx_xl[1] = 0.7071067811865475*bxbx[2]-1.224744871391589*bxbx[4]; - bxbx_xl[2] = 0.7071067811865475*bxbx[3]-1.224744871391589*bxbx[5]; - bxbx_xl[3] = 0.7071067811865475*bxbx[6]-1.224744871391589*bxbx[7]; - bxby_xl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[1]; - bxby_xl[1] = 0.7071067811865475*bxby[2]-1.224744871391589*bxby[4]; - bxby_xl[2] = 0.7071067811865475*bxby[3]-1.224744871391589*bxby[5]; - bxby_xl[3] = 0.7071067811865475*bxby[6]-1.224744871391589*bxby[7]; - bxbz_xl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[1]; - bxbz_xl[1] = 0.7071067811865475*bxbz[2]-1.224744871391589*bxbz[4]; - bxbz_xl[2] = 0.7071067811865475*bxbz[3]-1.224744871391589*bxbz[5]; - bxbz_xl[3] = 0.7071067811865475*bxbz[6]-1.224744871391589*bxbz[7]; - - bx_xr[0] = 1.224744871391589*bx[1]+0.7071067811865475*bx[0]; - bx_xr[1] = 1.224744871391589*bx[4]+0.7071067811865475*bx[2]; - bx_xr[2] = 1.224744871391589*bx[5]+0.7071067811865475*bx[3]; - bx_xr[3] = 1.224744871391589*bx[7]+0.7071067811865475*bx[6]; - bxbx_xr[0] = 1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; - bxbx_xr[1] = 1.224744871391589*bxbx[4]+0.7071067811865475*bxbx[2]; - bxbx_xr[2] = 1.224744871391589*bxbx[5]+0.7071067811865475*bxbx[3]; - bxbx_xr[3] = 1.224744871391589*bxbx[7]+0.7071067811865475*bxbx[6]; - bxby_xr[0] = 1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; - bxby_xr[1] = 1.224744871391589*bxby[4]+0.7071067811865475*bxby[2]; - bxby_xr[2] = 1.224744871391589*bxby[5]+0.7071067811865475*bxby[3]; - bxby_xr[3] = 1.224744871391589*bxby[7]+0.7071067811865475*bxby[6]; - bxbz_xr[0] = 1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - bxbz_xr[1] = 1.224744871391589*bxbz[4]+0.7071067811865475*bxbz[2]; - bxbz_xr[2] = 1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[3]; - bxbz_xr[3] = 1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[6]; - - double *by_yl = &bvar_surf[32]; - double *by_yr = &bvar_surf[36]; - double *bxby_yl = &bvar_surf[40]; - double *bxby_yr = &bvar_surf[44]; - double *byby_yl = &bvar_surf[48]; - double *byby_yr = &bvar_surf[52]; - double *bybz_yl = &bvar_surf[56]; - double *bybz_yr = &bvar_surf[60]; - - by_yl[0] = 0.7071067811865475*by[0]-1.224744871391589*by[2]; - by_yl[1] = 0.7071067811865475*by[1]-1.224744871391589*by[4]; - by_yl[2] = 0.7071067811865475*by[3]-1.224744871391589*by[6]; - by_yl[3] = 0.7071067811865475*by[5]-1.224744871391589*by[7]; - bxby_yl[0] = 0.7071067811865475*bxby[0]-1.224744871391589*bxby[2]; - bxby_yl[1] = 0.7071067811865475*bxby[1]-1.224744871391589*bxby[4]; - bxby_yl[2] = 0.7071067811865475*bxby[3]-1.224744871391589*bxby[6]; - bxby_yl[3] = 0.7071067811865475*bxby[5]-1.224744871391589*bxby[7]; - byby_yl[0] = 0.7071067811865475*byby[0]-1.224744871391589*byby[2]; - byby_yl[1] = 0.7071067811865475*byby[1]-1.224744871391589*byby[4]; - byby_yl[2] = 0.7071067811865475*byby[3]-1.224744871391589*byby[6]; - byby_yl[3] = 0.7071067811865475*byby[5]-1.224744871391589*byby[7]; - bybz_yl[0] = 0.7071067811865475*bybz[0]-1.224744871391589*bybz[2]; - bybz_yl[1] = 0.7071067811865475*bybz[1]-1.224744871391589*bybz[4]; - bybz_yl[2] = 0.7071067811865475*bybz[3]-1.224744871391589*bybz[6]; - bybz_yl[3] = 0.7071067811865475*bybz[5]-1.224744871391589*bybz[7]; - - by_yr[0] = 1.224744871391589*by[2]+0.7071067811865475*by[0]; - by_yr[1] = 1.224744871391589*by[4]+0.7071067811865475*by[1]; - by_yr[2] = 1.224744871391589*by[6]+0.7071067811865475*by[3]; - by_yr[3] = 1.224744871391589*by[7]+0.7071067811865475*by[5]; - bxby_yr[0] = 1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; - bxby_yr[1] = 1.224744871391589*bxby[4]+0.7071067811865475*bxby[1]; - bxby_yr[2] = 1.224744871391589*bxby[6]+0.7071067811865475*bxby[3]; - bxby_yr[3] = 1.224744871391589*bxby[7]+0.7071067811865475*bxby[5]; - byby_yr[0] = 1.224744871391589*byby[2]+0.7071067811865475*byby[0]; - byby_yr[1] = 1.224744871391589*byby[4]+0.7071067811865475*byby[1]; - byby_yr[2] = 1.224744871391589*byby[6]+0.7071067811865475*byby[3]; - byby_yr[3] = 1.224744871391589*byby[7]+0.7071067811865475*byby[5]; - bybz_yr[0] = 1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; - bybz_yr[1] = 1.224744871391589*bybz[4]+0.7071067811865475*bybz[1]; - bybz_yr[2] = 1.224744871391589*bybz[6]+0.7071067811865475*bybz[3]; - bybz_yr[3] = 1.224744871391589*bybz[7]+0.7071067811865475*bybz[5]; - - double *bz_zl = &bvar_surf[64]; - double *bz_zr = &bvar_surf[68]; - double *bxbz_zl = &bvar_surf[72]; - double *bxbz_zr = &bvar_surf[76]; - double *bybz_zl = &bvar_surf[80]; - double *bybz_zr = &bvar_surf[84]; - double *bzbz_zl = &bvar_surf[88]; - double *bzbz_zr = &bvar_surf[92]; - - bz_zl[0] = 0.7071067811865475*bz[0]-1.224744871391589*bz[3]; - bz_zl[1] = 0.7071067811865475*bz[1]-1.224744871391589*bz[5]; - bz_zl[2] = 0.7071067811865475*bz[2]-1.224744871391589*bz[6]; - bz_zl[3] = 0.7071067811865475*bz[4]-1.224744871391589*bz[7]; - bxbz_zl[0] = 0.7071067811865475*bxbz[0]-1.224744871391589*bxbz[3]; - bxbz_zl[1] = 0.7071067811865475*bxbz[1]-1.224744871391589*bxbz[5]; - bxbz_zl[2] = 0.7071067811865475*bxbz[2]-1.224744871391589*bxbz[6]; - bxbz_zl[3] = 0.7071067811865475*bxbz[4]-1.224744871391589*bxbz[7]; - bybz_zl[0] = 0.7071067811865475*bybz[0]-1.224744871391589*bybz[3]; - bybz_zl[1] = 0.7071067811865475*bybz[1]-1.224744871391589*bybz[5]; - bybz_zl[2] = 0.7071067811865475*bybz[2]-1.224744871391589*bybz[6]; - bybz_zl[3] = 0.7071067811865475*bybz[4]-1.224744871391589*bybz[7]; - bzbz_zl[0] = 0.7071067811865475*bzbz[0]-1.224744871391589*bzbz[3]; - bzbz_zl[1] = 0.7071067811865475*bzbz[1]-1.224744871391589*bzbz[5]; - bzbz_zl[2] = 0.7071067811865475*bzbz[2]-1.224744871391589*bzbz[6]; - bzbz_zl[3] = 0.7071067811865475*bzbz[4]-1.224744871391589*bzbz[7]; - - bz_zr[0] = 1.224744871391589*bz[3]+0.7071067811865475*bz[0]; - bz_zr[1] = 1.224744871391589*bz[5]+0.7071067811865475*bz[1]; - bz_zr[2] = 1.224744871391589*bz[6]+0.7071067811865475*bz[2]; - bz_zr[3] = 1.224744871391589*bz[7]+0.7071067811865475*bz[4]; - bxbz_zr[0] = 1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[0]; - bxbz_zr[1] = 1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[1]; - bxbz_zr[2] = 1.224744871391589*bxbz[6]+0.7071067811865475*bxbz[2]; - bxbz_zr[3] = 1.224744871391589*bxbz[7]+0.7071067811865475*bxbz[4]; - bybz_zr[0] = 1.224744871391589*bybz[3]+0.7071067811865475*bybz[0]; - bybz_zr[1] = 1.224744871391589*bybz[5]+0.7071067811865475*bybz[1]; - bybz_zr[2] = 1.224744871391589*bybz[6]+0.7071067811865475*bybz[2]; - bybz_zr[3] = 1.224744871391589*bybz[7]+0.7071067811865475*bybz[4]; - bzbz_zr[0] = 1.224744871391589*bzbz[3]+0.7071067811865475*bzbz[0]; - bzbz_zr[1] = 1.224744871391589*bzbz[5]+0.7071067811865475*bzbz[1]; - bzbz_zr[2] = 1.224744871391589*bzbz[6]+0.7071067811865475*bzbz[2]; - bzbz_zr[3] = 1.224744871391589*bzbz[7]+0.7071067811865475*bzbz[4]; - -} - diff --git a/kernels/maxwell/em_surf_set_bvar_3x_tensor_p2.c b/kernels/maxwell/em_surf_set_bvar_3x_tensor_p2.c deleted file mode 100644 index 4f271fc98..000000000 --- a/kernels/maxwell/em_surf_set_bvar_3x_tensor_p2.c +++ /dev/null @@ -1,267 +0,0 @@ -#include -GKYL_CU_DH void em_surf_set_bvar_3x_tensor_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf) -{ - // bvar: Input volume expansion of b_i = B_i/|B| (first 3 components), b_i b_j = B_i B_j/|B|^2 (last 6 components). - // bvar_surf: Output surface expansion of magnetic field unit vector and tensor in each direction. - - const double *bx = &bvar[0]; - const double *by = &bvar[27]; - const double *bz = &bvar[54]; - const double *bxbx = &bvar[81]; - const double *bxby = &bvar[108]; - const double *bxbz = &bvar[135]; - const double *byby = &bvar[162]; - const double *bybz = &bvar[189]; - const double *bzbz = &bvar[216]; - - double *bx_xl = &bvar_surf[0]; - double *bx_xr = &bvar_surf[9]; - double *bxbx_xl = &bvar_surf[18]; - double *bxbx_xr = &bvar_surf[27]; - double *bxby_xl = &bvar_surf[36]; - double *bxby_xr = &bvar_surf[45]; - double *bxbz_xl = &bvar_surf[54]; - double *bxbz_xr = &bvar_surf[63]; - - bx_xl[0] = 1.58113883008419*bx[7]-1.224744871391589*bx[1]+0.7071067811865475*bx[0]; - bx_xl[1] = 1.58113883008419*bx[11]-1.224744871391589*bx[4]+0.7071067811865475*bx[2]; - bx_xl[2] = 1.58113883008419*bx[13]-1.224744871391589*bx[5]+0.7071067811865475*bx[3]; - bx_xl[3] = 1.58113883008419*bx[17]-1.224744871391589*bx[10]+0.7071067811865475*bx[6]; - bx_xl[4] = 1.58113883008419*bx[20]-1.224744871391589*bx[12]+0.7071067811865475*bx[8]; - bx_xl[5] = 1.58113883008419*bx[21]-1.224744871391589*bx[15]+0.7071067811865475*bx[9]; - bx_xl[6] = 1.58113883008419*bx[23]-1.224744871391589*bx[18]+0.7071067811865475*bx[14]; - bx_xl[7] = 1.58113883008419*bx[24]-1.224744871391589*bx[19]+0.7071067811865475*bx[16]; - bx_xl[8] = 1.58113883008419*bx[26]-1.224744871391589*bx[25]+0.7071067811865475*bx[22]; - bxbx_xl[0] = 1.58113883008419*bxbx[7]-1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; - bxbx_xl[1] = 1.58113883008419*bxbx[11]-1.224744871391589*bxbx[4]+0.7071067811865475*bxbx[2]; - bxbx_xl[2] = 1.58113883008419*bxbx[13]-1.224744871391589*bxbx[5]+0.7071067811865475*bxbx[3]; - bxbx_xl[3] = 1.58113883008419*bxbx[17]-1.224744871391589*bxbx[10]+0.7071067811865475*bxbx[6]; - bxbx_xl[4] = 1.58113883008419*bxbx[20]-1.224744871391589*bxbx[12]+0.7071067811865475*bxbx[8]; - bxbx_xl[5] = 1.58113883008419*bxbx[21]-1.224744871391589*bxbx[15]+0.7071067811865475*bxbx[9]; - bxbx_xl[6] = 1.58113883008419*bxbx[23]-1.224744871391589*bxbx[18]+0.7071067811865475*bxbx[14]; - bxbx_xl[7] = 1.58113883008419*bxbx[24]-1.224744871391589*bxbx[19]+0.7071067811865475*bxbx[16]; - bxbx_xl[8] = 1.58113883008419*bxbx[26]-1.224744871391589*bxbx[25]+0.7071067811865475*bxbx[22]; - bxby_xl[0] = 1.58113883008419*bxby[7]-1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; - bxby_xl[1] = 1.58113883008419*bxby[11]-1.224744871391589*bxby[4]+0.7071067811865475*bxby[2]; - bxby_xl[2] = 1.58113883008419*bxby[13]-1.224744871391589*bxby[5]+0.7071067811865475*bxby[3]; - bxby_xl[3] = 1.58113883008419*bxby[17]-1.224744871391589*bxby[10]+0.7071067811865475*bxby[6]; - bxby_xl[4] = 1.58113883008419*bxby[20]-1.224744871391589*bxby[12]+0.7071067811865475*bxby[8]; - bxby_xl[5] = 1.58113883008419*bxby[21]-1.224744871391589*bxby[15]+0.7071067811865475*bxby[9]; - bxby_xl[6] = 1.58113883008419*bxby[23]-1.224744871391589*bxby[18]+0.7071067811865475*bxby[14]; - bxby_xl[7] = 1.58113883008419*bxby[24]-1.224744871391589*bxby[19]+0.7071067811865475*bxby[16]; - bxby_xl[8] = 1.58113883008419*bxby[26]-1.224744871391589*bxby[25]+0.7071067811865475*bxby[22]; - bxbz_xl[0] = 1.58113883008419*bxbz[7]-1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - bxbz_xl[1] = 1.58113883008419*bxbz[11]-1.224744871391589*bxbz[4]+0.7071067811865475*bxbz[2]; - bxbz_xl[2] = 1.58113883008419*bxbz[13]-1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[3]; - bxbz_xl[3] = 1.58113883008419*bxbz[17]-1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[6]; - bxbz_xl[4] = 1.58113883008419*bxbz[20]-1.224744871391589*bxbz[12]+0.7071067811865475*bxbz[8]; - bxbz_xl[5] = 1.58113883008419*bxbz[21]-1.224744871391589*bxbz[15]+0.7071067811865475*bxbz[9]; - bxbz_xl[6] = 1.58113883008419*bxbz[23]-1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[14]; - bxbz_xl[7] = 1.58113883008419*bxbz[24]-1.224744871391589*bxbz[19]+0.7071067811865475*bxbz[16]; - bxbz_xl[8] = 1.58113883008419*bxbz[26]-1.224744871391589*bxbz[25]+0.7071067811865475*bxbz[22]; - - bx_xr[0] = 1.58113883008419*bx[7]+1.224744871391589*bx[1]+0.7071067811865475*bx[0]; - bx_xr[1] = 1.58113883008419*bx[11]+1.224744871391589*bx[4]+0.7071067811865475*bx[2]; - bx_xr[2] = 1.58113883008419*bx[13]+1.224744871391589*bx[5]+0.7071067811865475*bx[3]; - bx_xr[3] = 1.58113883008419*bx[17]+1.224744871391589*bx[10]+0.7071067811865475*bx[6]; - bx_xr[4] = 1.58113883008419*bx[20]+1.224744871391589*bx[12]+0.7071067811865475*bx[8]; - bx_xr[5] = 1.58113883008419*bx[21]+1.224744871391589*bx[15]+0.7071067811865475*bx[9]; - bx_xr[6] = 1.58113883008419*bx[23]+1.224744871391589*bx[18]+0.7071067811865475*bx[14]; - bx_xr[7] = 1.58113883008419*bx[24]+1.224744871391589*bx[19]+0.7071067811865475*bx[16]; - bx_xr[8] = 1.58113883008419*bx[26]+1.224744871391589*bx[25]+0.7071067811865475*bx[22]; - bxbx_xr[0] = 1.58113883008419*bxbx[7]+1.224744871391589*bxbx[1]+0.7071067811865475*bxbx[0]; - bxbx_xr[1] = 1.58113883008419*bxbx[11]+1.224744871391589*bxbx[4]+0.7071067811865475*bxbx[2]; - bxbx_xr[2] = 1.58113883008419*bxbx[13]+1.224744871391589*bxbx[5]+0.7071067811865475*bxbx[3]; - bxbx_xr[3] = 1.58113883008419*bxbx[17]+1.224744871391589*bxbx[10]+0.7071067811865475*bxbx[6]; - bxbx_xr[4] = 1.58113883008419*bxbx[20]+1.224744871391589*bxbx[12]+0.7071067811865475*bxbx[8]; - bxbx_xr[5] = 1.58113883008419*bxbx[21]+1.224744871391589*bxbx[15]+0.7071067811865475*bxbx[9]; - bxbx_xr[6] = 1.58113883008419*bxbx[23]+1.224744871391589*bxbx[18]+0.7071067811865475*bxbx[14]; - bxbx_xr[7] = 1.58113883008419*bxbx[24]+1.224744871391589*bxbx[19]+0.7071067811865475*bxbx[16]; - bxbx_xr[8] = 1.58113883008419*bxbx[26]+1.224744871391589*bxbx[25]+0.7071067811865475*bxbx[22]; - bxby_xr[0] = 1.58113883008419*bxby[7]+1.224744871391589*bxby[1]+0.7071067811865475*bxby[0]; - bxby_xr[1] = 1.58113883008419*bxby[11]+1.224744871391589*bxby[4]+0.7071067811865475*bxby[2]; - bxby_xr[2] = 1.58113883008419*bxby[13]+1.224744871391589*bxby[5]+0.7071067811865475*bxby[3]; - bxby_xr[3] = 1.58113883008419*bxby[17]+1.224744871391589*bxby[10]+0.7071067811865475*bxby[6]; - bxby_xr[4] = 1.58113883008419*bxby[20]+1.224744871391589*bxby[12]+0.7071067811865475*bxby[8]; - bxby_xr[5] = 1.58113883008419*bxby[21]+1.224744871391589*bxby[15]+0.7071067811865475*bxby[9]; - bxby_xr[6] = 1.58113883008419*bxby[23]+1.224744871391589*bxby[18]+0.7071067811865475*bxby[14]; - bxby_xr[7] = 1.58113883008419*bxby[24]+1.224744871391589*bxby[19]+0.7071067811865475*bxby[16]; - bxby_xr[8] = 1.58113883008419*bxby[26]+1.224744871391589*bxby[25]+0.7071067811865475*bxby[22]; - bxbz_xr[0] = 1.58113883008419*bxbz[7]+1.224744871391589*bxbz[1]+0.7071067811865475*bxbz[0]; - bxbz_xr[1] = 1.58113883008419*bxbz[11]+1.224744871391589*bxbz[4]+0.7071067811865475*bxbz[2]; - bxbz_xr[2] = 1.58113883008419*bxbz[13]+1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[3]; - bxbz_xr[3] = 1.58113883008419*bxbz[17]+1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[6]; - bxbz_xr[4] = 1.58113883008419*bxbz[20]+1.224744871391589*bxbz[12]+0.7071067811865475*bxbz[8]; - bxbz_xr[5] = 1.58113883008419*bxbz[21]+1.224744871391589*bxbz[15]+0.7071067811865475*bxbz[9]; - bxbz_xr[6] = 1.58113883008419*bxbz[23]+1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[14]; - bxbz_xr[7] = 1.58113883008419*bxbz[24]+1.224744871391589*bxbz[19]+0.7071067811865475*bxbz[16]; - bxbz_xr[8] = 1.58113883008419*bxbz[26]+1.224744871391589*bxbz[25]+0.7071067811865475*bxbz[22]; - - double *by_yl = &bvar_surf[72]; - double *by_yr = &bvar_surf[81]; - double *bxby_yl = &bvar_surf[90]; - double *bxby_yr = &bvar_surf[99]; - double *byby_yl = &bvar_surf[108]; - double *byby_yr = &bvar_surf[117]; - double *bybz_yl = &bvar_surf[126]; - double *bybz_yr = &bvar_surf[135]; - - by_yl[0] = 1.58113883008419*by[8]-1.224744871391589*by[2]+0.7071067811865475*by[0]; - by_yl[1] = 1.58113883008419*by[12]-1.224744871391589*by[4]+0.7071067811865475*by[1]; - by_yl[2] = 1.58113883008419*by[14]-1.224744871391589*by[6]+0.7071067811865475*by[3]; - by_yl[3] = 1.58113883008419*by[18]-1.224744871391589*by[10]+0.7071067811865475*by[5]; - by_yl[4] = 1.58113883008419*by[20]-1.224744871391589*by[11]+0.7071067811865475*by[7]; - by_yl[5] = 1.58113883008419*by[22]-1.224744871391589*by[16]+0.7071067811865475*by[9]; - by_yl[6] = 1.58113883008419*by[23]-1.224744871391589*by[17]+0.7071067811865475*by[13]; - by_yl[7] = 1.58113883008419*by[25]-1.224744871391589*by[19]+0.7071067811865475*by[15]; - by_yl[8] = 1.58113883008419*by[26]-1.224744871391589*by[24]+0.7071067811865475*by[21]; - bxby_yl[0] = 1.58113883008419*bxby[8]-1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; - bxby_yl[1] = 1.58113883008419*bxby[12]-1.224744871391589*bxby[4]+0.7071067811865475*bxby[1]; - bxby_yl[2] = 1.58113883008419*bxby[14]-1.224744871391589*bxby[6]+0.7071067811865475*bxby[3]; - bxby_yl[3] = 1.58113883008419*bxby[18]-1.224744871391589*bxby[10]+0.7071067811865475*bxby[5]; - bxby_yl[4] = 1.58113883008419*bxby[20]-1.224744871391589*bxby[11]+0.7071067811865475*bxby[7]; - bxby_yl[5] = 1.58113883008419*bxby[22]-1.224744871391589*bxby[16]+0.7071067811865475*bxby[9]; - bxby_yl[6] = 1.58113883008419*bxby[23]-1.224744871391589*bxby[17]+0.7071067811865475*bxby[13]; - bxby_yl[7] = 1.58113883008419*bxby[25]-1.224744871391589*bxby[19]+0.7071067811865475*bxby[15]; - bxby_yl[8] = 1.58113883008419*bxby[26]-1.224744871391589*bxby[24]+0.7071067811865475*bxby[21]; - byby_yl[0] = 1.58113883008419*byby[8]-1.224744871391589*byby[2]+0.7071067811865475*byby[0]; - byby_yl[1] = 1.58113883008419*byby[12]-1.224744871391589*byby[4]+0.7071067811865475*byby[1]; - byby_yl[2] = 1.58113883008419*byby[14]-1.224744871391589*byby[6]+0.7071067811865475*byby[3]; - byby_yl[3] = 1.58113883008419*byby[18]-1.224744871391589*byby[10]+0.7071067811865475*byby[5]; - byby_yl[4] = 1.58113883008419*byby[20]-1.224744871391589*byby[11]+0.7071067811865475*byby[7]; - byby_yl[5] = 1.58113883008419*byby[22]-1.224744871391589*byby[16]+0.7071067811865475*byby[9]; - byby_yl[6] = 1.58113883008419*byby[23]-1.224744871391589*byby[17]+0.7071067811865475*byby[13]; - byby_yl[7] = 1.58113883008419*byby[25]-1.224744871391589*byby[19]+0.7071067811865475*byby[15]; - byby_yl[8] = 1.58113883008419*byby[26]-1.224744871391589*byby[24]+0.7071067811865475*byby[21]; - bybz_yl[0] = 1.58113883008419*bybz[8]-1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; - bybz_yl[1] = 1.58113883008419*bybz[12]-1.224744871391589*bybz[4]+0.7071067811865475*bybz[1]; - bybz_yl[2] = 1.58113883008419*bybz[14]-1.224744871391589*bybz[6]+0.7071067811865475*bybz[3]; - bybz_yl[3] = 1.58113883008419*bybz[18]-1.224744871391589*bybz[10]+0.7071067811865475*bybz[5]; - bybz_yl[4] = 1.58113883008419*bybz[20]-1.224744871391589*bybz[11]+0.7071067811865475*bybz[7]; - bybz_yl[5] = 1.58113883008419*bybz[22]-1.224744871391589*bybz[16]+0.7071067811865475*bybz[9]; - bybz_yl[6] = 1.58113883008419*bybz[23]-1.224744871391589*bybz[17]+0.7071067811865475*bybz[13]; - bybz_yl[7] = 1.58113883008419*bybz[25]-1.224744871391589*bybz[19]+0.7071067811865475*bybz[15]; - bybz_yl[8] = 1.58113883008419*bybz[26]-1.224744871391589*bybz[24]+0.7071067811865475*bybz[21]; - - by_yr[0] = 1.58113883008419*by[8]+1.224744871391589*by[2]+0.7071067811865475*by[0]; - by_yr[1] = 1.58113883008419*by[12]+1.224744871391589*by[4]+0.7071067811865475*by[1]; - by_yr[2] = 1.58113883008419*by[14]+1.224744871391589*by[6]+0.7071067811865475*by[3]; - by_yr[3] = 1.58113883008419*by[18]+1.224744871391589*by[10]+0.7071067811865475*by[5]; - by_yr[4] = 1.58113883008419*by[20]+1.224744871391589*by[11]+0.7071067811865475*by[7]; - by_yr[5] = 1.58113883008419*by[22]+1.224744871391589*by[16]+0.7071067811865475*by[9]; - by_yr[6] = 1.58113883008419*by[23]+1.224744871391589*by[17]+0.7071067811865475*by[13]; - by_yr[7] = 1.58113883008419*by[25]+1.224744871391589*by[19]+0.7071067811865475*by[15]; - by_yr[8] = 1.58113883008419*by[26]+1.224744871391589*by[24]+0.7071067811865475*by[21]; - bxby_yr[0] = 1.58113883008419*bxby[8]+1.224744871391589*bxby[2]+0.7071067811865475*bxby[0]; - bxby_yr[1] = 1.58113883008419*bxby[12]+1.224744871391589*bxby[4]+0.7071067811865475*bxby[1]; - bxby_yr[2] = 1.58113883008419*bxby[14]+1.224744871391589*bxby[6]+0.7071067811865475*bxby[3]; - bxby_yr[3] = 1.58113883008419*bxby[18]+1.224744871391589*bxby[10]+0.7071067811865475*bxby[5]; - bxby_yr[4] = 1.58113883008419*bxby[20]+1.224744871391589*bxby[11]+0.7071067811865475*bxby[7]; - bxby_yr[5] = 1.58113883008419*bxby[22]+1.224744871391589*bxby[16]+0.7071067811865475*bxby[9]; - bxby_yr[6] = 1.58113883008419*bxby[23]+1.224744871391589*bxby[17]+0.7071067811865475*bxby[13]; - bxby_yr[7] = 1.58113883008419*bxby[25]+1.224744871391589*bxby[19]+0.7071067811865475*bxby[15]; - bxby_yr[8] = 1.58113883008419*bxby[26]+1.224744871391589*bxby[24]+0.7071067811865475*bxby[21]; - byby_yr[0] = 1.58113883008419*byby[8]+1.224744871391589*byby[2]+0.7071067811865475*byby[0]; - byby_yr[1] = 1.58113883008419*byby[12]+1.224744871391589*byby[4]+0.7071067811865475*byby[1]; - byby_yr[2] = 1.58113883008419*byby[14]+1.224744871391589*byby[6]+0.7071067811865475*byby[3]; - byby_yr[3] = 1.58113883008419*byby[18]+1.224744871391589*byby[10]+0.7071067811865475*byby[5]; - byby_yr[4] = 1.58113883008419*byby[20]+1.224744871391589*byby[11]+0.7071067811865475*byby[7]; - byby_yr[5] = 1.58113883008419*byby[22]+1.224744871391589*byby[16]+0.7071067811865475*byby[9]; - byby_yr[6] = 1.58113883008419*byby[23]+1.224744871391589*byby[17]+0.7071067811865475*byby[13]; - byby_yr[7] = 1.58113883008419*byby[25]+1.224744871391589*byby[19]+0.7071067811865475*byby[15]; - byby_yr[8] = 1.58113883008419*byby[26]+1.224744871391589*byby[24]+0.7071067811865475*byby[21]; - bybz_yr[0] = 1.58113883008419*bybz[8]+1.224744871391589*bybz[2]+0.7071067811865475*bybz[0]; - bybz_yr[1] = 1.58113883008419*bybz[12]+1.224744871391589*bybz[4]+0.7071067811865475*bybz[1]; - bybz_yr[2] = 1.58113883008419*bybz[14]+1.224744871391589*bybz[6]+0.7071067811865475*bybz[3]; - bybz_yr[3] = 1.58113883008419*bybz[18]+1.224744871391589*bybz[10]+0.7071067811865475*bybz[5]; - bybz_yr[4] = 1.58113883008419*bybz[20]+1.224744871391589*bybz[11]+0.7071067811865475*bybz[7]; - bybz_yr[5] = 1.58113883008419*bybz[22]+1.224744871391589*bybz[16]+0.7071067811865475*bybz[9]; - bybz_yr[6] = 1.58113883008419*bybz[23]+1.224744871391589*bybz[17]+0.7071067811865475*bybz[13]; - bybz_yr[7] = 1.58113883008419*bybz[25]+1.224744871391589*bybz[19]+0.7071067811865475*bybz[15]; - bybz_yr[8] = 1.58113883008419*bybz[26]+1.224744871391589*bybz[24]+0.7071067811865475*bybz[21]; - - double *bz_zl = &bvar_surf[144]; - double *bz_zr = &bvar_surf[153]; - double *bxbz_zl = &bvar_surf[162]; - double *bxbz_zr = &bvar_surf[171]; - double *bybz_zl = &bvar_surf[180]; - double *bybz_zr = &bvar_surf[189]; - double *bzbz_zl = &bvar_surf[198]; - double *bzbz_zr = &bvar_surf[207]; - - bz_zl[0] = 1.58113883008419*bz[9]-1.224744871391589*bz[3]+0.7071067811865475*bz[0]; - bz_zl[1] = 1.58113883008419*bz[15]-1.224744871391589*bz[5]+0.7071067811865475*bz[1]; - bz_zl[2] = 1.58113883008419*bz[16]-1.224744871391589*bz[6]+0.7071067811865475*bz[2]; - bz_zl[3] = 1.58113883008419*bz[19]-1.224744871391589*bz[10]+0.7071067811865475*bz[4]; - bz_zl[4] = 1.58113883008419*bz[21]-1.224744871391589*bz[13]+0.7071067811865475*bz[7]; - bz_zl[5] = 1.58113883008419*bz[22]-1.224744871391589*bz[14]+0.7071067811865475*bz[8]; - bz_zl[6] = 1.58113883008419*bz[24]-1.224744871391589*bz[17]+0.7071067811865475*bz[11]; - bz_zl[7] = 1.58113883008419*bz[25]-1.224744871391589*bz[18]+0.7071067811865475*bz[12]; - bz_zl[8] = 1.58113883008419*bz[26]-1.224744871391589*bz[23]+0.7071067811865475*bz[20]; - bxbz_zl[0] = 1.58113883008419*bxbz[9]-1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[0]; - bxbz_zl[1] = 1.58113883008419*bxbz[15]-1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[1]; - bxbz_zl[2] = 1.58113883008419*bxbz[16]-1.224744871391589*bxbz[6]+0.7071067811865475*bxbz[2]; - bxbz_zl[3] = 1.58113883008419*bxbz[19]-1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[4]; - bxbz_zl[4] = 1.58113883008419*bxbz[21]-1.224744871391589*bxbz[13]+0.7071067811865475*bxbz[7]; - bxbz_zl[5] = 1.58113883008419*bxbz[22]-1.224744871391589*bxbz[14]+0.7071067811865475*bxbz[8]; - bxbz_zl[6] = 1.58113883008419*bxbz[24]-1.224744871391589*bxbz[17]+0.7071067811865475*bxbz[11]; - bxbz_zl[7] = 1.58113883008419*bxbz[25]-1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[12]; - bxbz_zl[8] = 1.58113883008419*bxbz[26]-1.224744871391589*bxbz[23]+0.7071067811865475*bxbz[20]; - bybz_zl[0] = 1.58113883008419*bybz[9]-1.224744871391589*bybz[3]+0.7071067811865475*bybz[0]; - bybz_zl[1] = 1.58113883008419*bybz[15]-1.224744871391589*bybz[5]+0.7071067811865475*bybz[1]; - bybz_zl[2] = 1.58113883008419*bybz[16]-1.224744871391589*bybz[6]+0.7071067811865475*bybz[2]; - bybz_zl[3] = 1.58113883008419*bybz[19]-1.224744871391589*bybz[10]+0.7071067811865475*bybz[4]; - bybz_zl[4] = 1.58113883008419*bybz[21]-1.224744871391589*bybz[13]+0.7071067811865475*bybz[7]; - bybz_zl[5] = 1.58113883008419*bybz[22]-1.224744871391589*bybz[14]+0.7071067811865475*bybz[8]; - bybz_zl[6] = 1.58113883008419*bybz[24]-1.224744871391589*bybz[17]+0.7071067811865475*bybz[11]; - bybz_zl[7] = 1.58113883008419*bybz[25]-1.224744871391589*bybz[18]+0.7071067811865475*bybz[12]; - bybz_zl[8] = 1.58113883008419*bybz[26]-1.224744871391589*bybz[23]+0.7071067811865475*bybz[20]; - bzbz_zl[0] = 1.58113883008419*bzbz[9]-1.224744871391589*bzbz[3]+0.7071067811865475*bzbz[0]; - bzbz_zl[1] = 1.58113883008419*bzbz[15]-1.224744871391589*bzbz[5]+0.7071067811865475*bzbz[1]; - bzbz_zl[2] = 1.58113883008419*bzbz[16]-1.224744871391589*bzbz[6]+0.7071067811865475*bzbz[2]; - bzbz_zl[3] = 1.58113883008419*bzbz[19]-1.224744871391589*bzbz[10]+0.7071067811865475*bzbz[4]; - bzbz_zl[4] = 1.58113883008419*bzbz[21]-1.224744871391589*bzbz[13]+0.7071067811865475*bzbz[7]; - bzbz_zl[5] = 1.58113883008419*bzbz[22]-1.224744871391589*bzbz[14]+0.7071067811865475*bzbz[8]; - bzbz_zl[6] = 1.58113883008419*bzbz[24]-1.224744871391589*bzbz[17]+0.7071067811865475*bzbz[11]; - bzbz_zl[7] = 1.58113883008419*bzbz[25]-1.224744871391589*bzbz[18]+0.7071067811865475*bzbz[12]; - bzbz_zl[8] = 1.58113883008419*bzbz[26]-1.224744871391589*bzbz[23]+0.7071067811865475*bzbz[20]; - - bz_zr[0] = 1.58113883008419*bz[9]+1.224744871391589*bz[3]+0.7071067811865475*bz[0]; - bz_zr[1] = 1.58113883008419*bz[15]+1.224744871391589*bz[5]+0.7071067811865475*bz[1]; - bz_zr[2] = 1.58113883008419*bz[16]+1.224744871391589*bz[6]+0.7071067811865475*bz[2]; - bz_zr[3] = 1.58113883008419*bz[19]+1.224744871391589*bz[10]+0.7071067811865475*bz[4]; - bz_zr[4] = 1.58113883008419*bz[21]+1.224744871391589*bz[13]+0.7071067811865475*bz[7]; - bz_zr[5] = 1.58113883008419*bz[22]+1.224744871391589*bz[14]+0.7071067811865475*bz[8]; - bz_zr[6] = 1.58113883008419*bz[24]+1.224744871391589*bz[17]+0.7071067811865475*bz[11]; - bz_zr[7] = 1.58113883008419*bz[25]+1.224744871391589*bz[18]+0.7071067811865475*bz[12]; - bz_zr[8] = 1.58113883008419*bz[26]+1.224744871391589*bz[23]+0.7071067811865475*bz[20]; - bxbz_zr[0] = 1.58113883008419*bxbz[9]+1.224744871391589*bxbz[3]+0.7071067811865475*bxbz[0]; - bxbz_zr[1] = 1.58113883008419*bxbz[15]+1.224744871391589*bxbz[5]+0.7071067811865475*bxbz[1]; - bxbz_zr[2] = 1.58113883008419*bxbz[16]+1.224744871391589*bxbz[6]+0.7071067811865475*bxbz[2]; - bxbz_zr[3] = 1.58113883008419*bxbz[19]+1.224744871391589*bxbz[10]+0.7071067811865475*bxbz[4]; - bxbz_zr[4] = 1.58113883008419*bxbz[21]+1.224744871391589*bxbz[13]+0.7071067811865475*bxbz[7]; - bxbz_zr[5] = 1.58113883008419*bxbz[22]+1.224744871391589*bxbz[14]+0.7071067811865475*bxbz[8]; - bxbz_zr[6] = 1.58113883008419*bxbz[24]+1.224744871391589*bxbz[17]+0.7071067811865475*bxbz[11]; - bxbz_zr[7] = 1.58113883008419*bxbz[25]+1.224744871391589*bxbz[18]+0.7071067811865475*bxbz[12]; - bxbz_zr[8] = 1.58113883008419*bxbz[26]+1.224744871391589*bxbz[23]+0.7071067811865475*bxbz[20]; - bybz_zr[0] = 1.58113883008419*bybz[9]+1.224744871391589*bybz[3]+0.7071067811865475*bybz[0]; - bybz_zr[1] = 1.58113883008419*bybz[15]+1.224744871391589*bybz[5]+0.7071067811865475*bybz[1]; - bybz_zr[2] = 1.58113883008419*bybz[16]+1.224744871391589*bybz[6]+0.7071067811865475*bybz[2]; - bybz_zr[3] = 1.58113883008419*bybz[19]+1.224744871391589*bybz[10]+0.7071067811865475*bybz[4]; - bybz_zr[4] = 1.58113883008419*bybz[21]+1.224744871391589*bybz[13]+0.7071067811865475*bybz[7]; - bybz_zr[5] = 1.58113883008419*bybz[22]+1.224744871391589*bybz[14]+0.7071067811865475*bybz[8]; - bybz_zr[6] = 1.58113883008419*bybz[24]+1.224744871391589*bybz[17]+0.7071067811865475*bybz[11]; - bybz_zr[7] = 1.58113883008419*bybz[25]+1.224744871391589*bybz[18]+0.7071067811865475*bybz[12]; - bybz_zr[8] = 1.58113883008419*bybz[26]+1.224744871391589*bybz[23]+0.7071067811865475*bybz[20]; - bzbz_zr[0] = 1.58113883008419*bzbz[9]+1.224744871391589*bzbz[3]+0.7071067811865475*bzbz[0]; - bzbz_zr[1] = 1.58113883008419*bzbz[15]+1.224744871391589*bzbz[5]+0.7071067811865475*bzbz[1]; - bzbz_zr[2] = 1.58113883008419*bzbz[16]+1.224744871391589*bzbz[6]+0.7071067811865475*bzbz[2]; - bzbz_zr[3] = 1.58113883008419*bzbz[19]+1.224744871391589*bzbz[10]+0.7071067811865475*bzbz[4]; - bzbz_zr[4] = 1.58113883008419*bzbz[21]+1.224744871391589*bzbz[13]+0.7071067811865475*bzbz[7]; - bzbz_zr[5] = 1.58113883008419*bzbz[22]+1.224744871391589*bzbz[14]+0.7071067811865475*bzbz[8]; - bzbz_zr[6] = 1.58113883008419*bzbz[24]+1.224744871391589*bzbz[17]+0.7071067811865475*bzbz[11]; - bzbz_zr[7] = 1.58113883008419*bzbz[25]+1.224744871391589*bzbz[18]+0.7071067811865475*bzbz[12]; - bzbz_zr[8] = 1.58113883008419*bzbz[26]+1.224744871391589*bzbz[23]+0.7071067811865475*bzbz[20]; - -} - diff --git a/kernels/maxwell/gkyl_maxwell_kernels.h b/kernels/maxwell/gkyl_maxwell_kernels.h index 62e5df90f..4b43ffefa 100644 --- a/kernels/maxwell/gkyl_maxwell_kernels.h +++ b/kernels/maxwell/gkyl_maxwell_kernels.h @@ -14,10 +14,11 @@ GKYL_CU_DH double maxwell_surfx_1x_ser_p2(const gkyl_maxwell_inp *meq, const dou GKYL_CU_DH void em_calc_BB_1x_ser_p1(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_num_ExB_1x_ser_p1(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_1x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); -GKYL_CU_DH void em_copy_bvar_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_copy_ExB_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); +GKYL_CU_DH void em_copy_bvar_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf); +GKYL_CU_DH void em_copy_ExB_1x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf); GKYL_CU_DH void em_div_b_x_1x_ser_p1(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); @@ -25,10 +26,11 @@ GKYL_CU_DH void em_div_b_x_1x_ser_p1(const double *dxv, GKYL_CU_DH void em_calc_BB_1x_ser_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_num_ExB_1x_ser_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_1x_ser_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); -GKYL_CU_DH void em_copy_bvar_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_copy_ExB_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); +GKYL_CU_DH void em_copy_bvar_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf); +GKYL_CU_DH void em_copy_ExB_1x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf); GKYL_CU_DH void em_div_b_x_1x_ser_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); @@ -44,10 +46,11 @@ GKYL_CU_DH double maxwell_surfy_2x_ser_p2(const gkyl_maxwell_inp *meq, const dou GKYL_CU_DH void em_calc_BB_2x_ser_p1(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_num_ExB_2x_ser_p1(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_2x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); -GKYL_CU_DH void em_copy_bvar_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_copy_ExB_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); +GKYL_CU_DH void em_copy_bvar_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf); +GKYL_CU_DH void em_copy_ExB_2x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf); GKYL_CU_DH void em_div_b_x_2x_ser_p1(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); @@ -58,10 +61,11 @@ GKYL_CU_DH void em_div_b_y_2x_ser_p1(const double *dxv, GKYL_CU_DH void em_calc_BB_2x_ser_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_num_ExB_2x_ser_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_2x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_2x_ser_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_2x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); -GKYL_CU_DH void em_copy_bvar_2x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_copy_ExB_2x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); +GKYL_CU_DH void em_copy_bvar_2x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf); +GKYL_CU_DH void em_copy_ExB_2x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf); GKYL_CU_DH void em_div_b_x_2x_ser_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); @@ -82,10 +86,11 @@ GKYL_CU_DH double maxwell_surfz_3x_ser_p2(const gkyl_maxwell_inp *meq, const dou GKYL_CU_DH void em_calc_BB_3x_ser_p1(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_num_ExB_3x_ser_p1(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_3x_ser_p1(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); -GKYL_CU_DH void em_copy_bvar_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_copy_ExB_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); +GKYL_CU_DH void em_copy_bvar_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf); +GKYL_CU_DH void em_copy_ExB_3x_ser_p1(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf); GKYL_CU_DH void em_div_b_x_3x_ser_p1(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); @@ -99,10 +104,11 @@ GKYL_CU_DH void em_div_b_z_3x_ser_p1(const double *dxv, GKYL_CU_DH void em_calc_BB_3x_ser_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_num_ExB_3x_ser_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_3x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_3x_ser_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_3x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); -GKYL_CU_DH void em_copy_bvar_3x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_copy_ExB_3x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); +GKYL_CU_DH void em_copy_bvar_3x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf); +GKYL_CU_DH void em_copy_ExB_3x_ser_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf); GKYL_CU_DH void em_div_b_x_3x_ser_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); @@ -120,10 +126,11 @@ GKYL_CU_DH double maxwell_surfy_2x_tensor_p2(const gkyl_maxwell_inp *meq, const GKYL_CU_DH void em_calc_BB_2x_tensor_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_num_ExB_2x_tensor_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_2x_tensor_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); -GKYL_CU_DH void em_copy_bvar_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_copy_ExB_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); +GKYL_CU_DH void em_copy_bvar_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf); +GKYL_CU_DH void em_copy_ExB_2x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf); GKYL_CU_DH void em_div_b_x_2x_tensor_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); @@ -139,10 +146,11 @@ GKYL_CU_DH double maxwell_surfz_3x_tensor_p2(const gkyl_maxwell_inp *meq, const GKYL_CU_DH void em_calc_BB_3x_tensor_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH void em_calc_num_ExB_3x_tensor_p2(const double *em, double* GKYL_RESTRICT out); GKYL_CU_DH int em_set_bvar_3x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *BB); -GKYL_CU_DH void em_surf_set_bvar_3x_tensor_p2(const double* bvar, double* GKYL_RESTRICT bvar_surf); GKYL_CU_DH int em_set_ExB_3x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *num_ExB); -GKYL_CU_DH void em_copy_bvar_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT bvar); -GKYL_CU_DH void em_copy_ExB_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT ExB); +GKYL_CU_DH void em_copy_bvar_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT bvar, double* GKYL_RESTRICT bvar_surf); +GKYL_CU_DH void em_copy_ExB_3x_tensor_p2(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT ExB, double* GKYL_RESTRICT ExB_surf); GKYL_CU_DH void em_div_b_x_3x_tensor_p2(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); diff --git a/kernels/pkpm/gkyl_euler_pkpm_kernels.h b/kernels/pkpm/gkyl_euler_pkpm_kernels.h index c99b7c3a6..38f647de1 100644 --- a/kernels/pkpm/gkyl_euler_pkpm_kernels.h +++ b/kernels/pkpm/gkyl_euler_pkpm_kernels.h @@ -7,11 +7,8 @@ EXTERN_C_BEG GKYL_CU_DH void pkpm_vars_pressure_1x_ser_p1(const double *bvar, const double *bvar_surf, const double *vlasov_pkpm_moms, double* GKYL_RESTRICT p_ij, double* GKYL_RESTRICT p_ij_surf); GKYL_CU_DH void pkpm_vars_p_force_1x_ser_p1(const double *prim_c, const double *div_b, double* GKYL_RESTRICT pkpm_accel); GKYL_CU_DH int pkpm_vars_set_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar); -GKYL_CU_DH void pkpm_vars_surf_set_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij_surf, const int *cell_avg_prim); -GKYL_CU_DH void pkpm_vars_copy_1x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim); -GKYL_CU_DH void pkpm_vars_surf_copy_1x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf); + const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij, const double *pkpm_div_ppar); +GKYL_CU_DH void pkpm_vars_copy_1x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf); GKYL_CU_DH void pkpm_vars_integrated_1x_ser_p1(const double *vlasov_pkpm_moms, const double *euler_pkpm, const double* prim, double* GKYL_RESTRICT pkpm_int_vars); GKYL_CU_DH void pkpm_vars_io_1x_ser_p1(const double *vlasov_pkpm_moms, const double *euler_pkpm, @@ -33,11 +30,8 @@ GKYL_CU_DH double euler_pkpm_surfx_1x_ser_p1(const double *w, const double *dxv, GKYL_CU_DH void pkpm_vars_pressure_1x_ser_p2(const double *bvar, const double *bvar_surf, const double *vlasov_pkpm_moms, double* GKYL_RESTRICT p_ij, double* GKYL_RESTRICT p_ij_surf); GKYL_CU_DH void pkpm_vars_p_force_1x_ser_p2(const double *prim_c, const double *div_b, double* GKYL_RESTRICT pkpm_accel); GKYL_CU_DH int pkpm_vars_set_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar); -GKYL_CU_DH void pkpm_vars_surf_set_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij_surf, const int *cell_avg_prim); -GKYL_CU_DH void pkpm_vars_copy_1x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim); -GKYL_CU_DH void pkpm_vars_surf_copy_1x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf); + const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij, const double *pkpm_div_ppar); +GKYL_CU_DH void pkpm_vars_copy_1x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf); GKYL_CU_DH void pkpm_vars_integrated_1x_ser_p2(const double *vlasov_pkpm_moms, const double *euler_pkpm, const double* prim, double* GKYL_RESTRICT pkpm_int_vars); GKYL_CU_DH void pkpm_vars_io_1x_ser_p2(const double *vlasov_pkpm_moms, const double *euler_pkpm, @@ -59,11 +53,8 @@ GKYL_CU_DH double euler_pkpm_surfx_1x_ser_p2(const double *w, const double *dxv, GKYL_CU_DH void pkpm_vars_pressure_2x_ser_p1(const double *bvar, const double *bvar_surf, const double *vlasov_pkpm_moms, double* GKYL_RESTRICT p_ij, double* GKYL_RESTRICT p_ij_surf); GKYL_CU_DH void pkpm_vars_p_force_2x_ser_p1(const double *prim_c, const double *div_b, double* GKYL_RESTRICT pkpm_accel); GKYL_CU_DH int pkpm_vars_set_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar); -GKYL_CU_DH void pkpm_vars_surf_set_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij_surf, const int *cell_avg_prim); -GKYL_CU_DH void pkpm_vars_copy_2x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim); -GKYL_CU_DH void pkpm_vars_surf_copy_2x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf); + const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij, const double *pkpm_div_ppar); +GKYL_CU_DH void pkpm_vars_copy_2x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf); GKYL_CU_DH void pkpm_vars_integrated_2x_ser_p1(const double *vlasov_pkpm_moms, const double *euler_pkpm, const double* prim, double* GKYL_RESTRICT pkpm_int_vars); GKYL_CU_DH void pkpm_vars_io_2x_ser_p1(const double *vlasov_pkpm_moms, const double *euler_pkpm, @@ -95,11 +86,8 @@ GKYL_CU_DH double euler_pkpm_surfy_2x_ser_p1(const double *w, const double *dxv, GKYL_CU_DH void pkpm_vars_pressure_2x_ser_p2(const double *bvar, const double *bvar_surf, const double *vlasov_pkpm_moms, double* GKYL_RESTRICT p_ij, double* GKYL_RESTRICT p_ij_surf); GKYL_CU_DH void pkpm_vars_p_force_2x_ser_p2(const double *prim_c, const double *div_b, double* GKYL_RESTRICT pkpm_accel); GKYL_CU_DH int pkpm_vars_set_2x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar); -GKYL_CU_DH void pkpm_vars_surf_set_2x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij_surf, const int *cell_avg_prim); -GKYL_CU_DH void pkpm_vars_copy_2x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim); -GKYL_CU_DH void pkpm_vars_surf_copy_2x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf); + const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij, const double *pkpm_div_ppar); +GKYL_CU_DH void pkpm_vars_copy_2x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf); GKYL_CU_DH void pkpm_vars_integrated_2x_ser_p2(const double *vlasov_pkpm_moms, const double *euler_pkpm, const double* prim, double* GKYL_RESTRICT pkpm_int_vars); GKYL_CU_DH void pkpm_vars_io_2x_ser_p2(const double *vlasov_pkpm_moms, const double *euler_pkpm, @@ -131,11 +119,8 @@ GKYL_CU_DH double euler_pkpm_surfy_2x_ser_p2(const double *w, const double *dxv, GKYL_CU_DH void pkpm_vars_pressure_3x_ser_p1(const double *bvar, const double *bvar_surf, const double *vlasov_pkpm_moms, double* GKYL_RESTRICT p_ij, double* GKYL_RESTRICT p_ij_surf); GKYL_CU_DH void pkpm_vars_p_force_3x_ser_p1(const double *prim_c, const double *div_b, double* GKYL_RESTRICT pkpm_accel); GKYL_CU_DH int pkpm_vars_set_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar); -GKYL_CU_DH void pkpm_vars_surf_set_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij_surf, const int *cell_avg_prim); -GKYL_CU_DH void pkpm_vars_copy_3x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim); -GKYL_CU_DH void pkpm_vars_surf_copy_3x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf); + const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij, const double *pkpm_div_ppar); +GKYL_CU_DH void pkpm_vars_copy_3x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf); GKYL_CU_DH void pkpm_vars_integrated_3x_ser_p1(const double *vlasov_pkpm_moms, const double *euler_pkpm, const double* prim, double* GKYL_RESTRICT pkpm_int_vars); GKYL_CU_DH void pkpm_vars_io_3x_ser_p1(const double *vlasov_pkpm_moms, const double *euler_pkpm, @@ -177,11 +162,8 @@ GKYL_CU_DH double euler_pkpm_surfz_3x_ser_p1(const double *w, const double *dxv, GKYL_CU_DH void pkpm_vars_pressure_3x_ser_p2(const double *bvar, const double *bvar_surf, const double *vlasov_pkpm_moms, double* GKYL_RESTRICT p_ij, double* GKYL_RESTRICT p_ij_surf); GKYL_CU_DH void pkpm_vars_p_force_3x_ser_p2(const double *prim_c, const double *div_b, double* GKYL_RESTRICT pkpm_accel); GKYL_CU_DH int pkpm_vars_set_3x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar); -GKYL_CU_DH void pkpm_vars_surf_set_3x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij_surf, const int *cell_avg_prim); -GKYL_CU_DH void pkpm_vars_copy_3x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim); -GKYL_CU_DH void pkpm_vars_surf_copy_3x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf); + const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij, const double *pkpm_div_ppar); +GKYL_CU_DH void pkpm_vars_copy_3x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf); GKYL_CU_DH void pkpm_vars_integrated_3x_ser_p2(const double *vlasov_pkpm_moms, const double *euler_pkpm, const double* prim, double* GKYL_RESTRICT pkpm_int_vars); GKYL_CU_DH void pkpm_vars_io_3x_ser_p2(const double *vlasov_pkpm_moms, const double *euler_pkpm, @@ -223,11 +205,8 @@ GKYL_CU_DH double euler_pkpm_surfz_3x_ser_p2(const double *w, const double *dxv, GKYL_CU_DH void pkpm_vars_pressure_2x_tensor_p2(const double *bvar, const double *bvar_surf, const double *vlasov_pkpm_moms, double* GKYL_RESTRICT p_ij, double* GKYL_RESTRICT p_ij_surf); GKYL_CU_DH void pkpm_vars_p_force_2x_tensor_p2(const double *prim_c, const double *div_b, double* GKYL_RESTRICT pkpm_accel); GKYL_CU_DH int pkpm_vars_set_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar); -GKYL_CU_DH void pkpm_vars_surf_set_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij_surf, const int *cell_avg_prim); -GKYL_CU_DH void pkpm_vars_copy_2x_tensor_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim); -GKYL_CU_DH void pkpm_vars_surf_copy_2x_tensor_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf); + const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *p_ij, const double *pkpm_div_ppar); +GKYL_CU_DH void pkpm_vars_copy_2x_tensor_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf); GKYL_CU_DH void pkpm_vars_integrated_2x_tensor_p2(const double *vlasov_pkpm_moms, const double *euler_pkpm, const double* prim, double* GKYL_RESTRICT pkpm_int_vars); GKYL_CU_DH void pkpm_vars_io_2x_tensor_p2(const double *vlasov_pkpm_moms, const double *euler_pkpm, diff --git a/kernels/pkpm/pkpm_vars_copy_1x_ser_p1.c b/kernels/pkpm/pkpm_vars_copy_1x_ser_p1.c index 147539206..0b6072ee7 100644 --- a/kernels/pkpm/pkpm_vars_copy_1x_ser_p1.c +++ b/kernels/pkpm/pkpm_vars_copy_1x_ser_p1.c @@ -1,10 +1,16 @@ #include #include -GKYL_CU_DH void pkpm_vars_copy_1x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim) +GKYL_CU_DH void pkpm_vars_copy_1x_ser_p1(int count, struct gkyl_nmat *x, + double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf) { - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim: [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // count: integer to indicate which matrix being fetched. + // x: Input solution vector. + // prim: Output volume expansion of primitive variables: + // [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp, 3*Txx/m, 3*Tyy/m, 3*Tzz/m]. + // prim_surf: Output surface expansion of primitive variables + // [ux_xl, ux_xr, uy_xl, uy_xr, uz_xl, uz_xr, Txx_xl, Txx_xr, + // ux_yl, ux_yr, uy_yl, uy_yr, uz_yl, uz_yr, Tyy_yl, Tyy_yr, + // ux_zl, ux_zr, uy_zl, uy_zr, uz_zl, uz_zr, Tzz_zl, Tzz_zr] struct gkyl_mat x_ux = gkyl_nmat_get(x, count); struct gkyl_mat x_uy = gkyl_nmat_get(x, count+1); @@ -12,12 +18,18 @@ GKYL_CU_DH void pkpm_vars_copy_1x_ser_p1(int count, struct gkyl_nmat *x, double* struct gkyl_mat x_pkpm_div_ppar = gkyl_nmat_get(x, count+3); struct gkyl_mat x_T_perp_over_m = gkyl_nmat_get(x, count+4); struct gkyl_mat x_T_perp_over_m_inv = gkyl_nmat_get(x, count+5); + struct gkyl_mat x_Txx = gkyl_nmat_get(x, count+6); + struct gkyl_mat x_Tyy = gkyl_nmat_get(x, count+7); + struct gkyl_mat x_Tzz = gkyl_nmat_get(x, count+8); double *ux = &prim[0]; double *uy = &prim[2]; double *uz = &prim[4]; double *p_force = &prim[6]; double *T_perp_over_m = &prim[8]; double *T_perp_over_m_inv = &prim[10]; + double *Txx = &prim[12]; + double *Tyy = &prim[14]; + double *Tzz = &prim[16]; ux[0] = gkyl_mat_get(&x_ux,0,0); uy[0] = gkyl_mat_get(&x_uy,0,0); @@ -25,11 +37,36 @@ GKYL_CU_DH void pkpm_vars_copy_1x_ser_p1(int count, struct gkyl_nmat *x, double* p_force[0] = gkyl_mat_get(&x_pkpm_div_ppar,0,0); T_perp_over_m[0] = gkyl_mat_get(&x_T_perp_over_m,0,0); T_perp_over_m_inv[0] = gkyl_mat_get(&x_T_perp_over_m_inv,0,0); + Txx[0] = 3.0*gkyl_mat_get(&x_Txx,0,0); + Tyy[0] = 3.0*gkyl_mat_get(&x_Tyy,0,0); + Tzz[0] = 3.0*gkyl_mat_get(&x_Tzz,0,0); ux[1] = gkyl_mat_get(&x_ux,1,0); uy[1] = gkyl_mat_get(&x_uy,1,0); uz[1] = gkyl_mat_get(&x_uz,1,0); p_force[1] = gkyl_mat_get(&x_pkpm_div_ppar,1,0); T_perp_over_m[1] = gkyl_mat_get(&x_T_perp_over_m,1,0); T_perp_over_m_inv[1] = gkyl_mat_get(&x_T_perp_over_m_inv,1,0); + Txx[1] = 3.0*gkyl_mat_get(&x_Txx,1,0); + Tyy[1] = 3.0*gkyl_mat_get(&x_Tyy,1,0); + Tzz[1] = 3.0*gkyl_mat_get(&x_Tzz,1,0); + + double *ux_xl = &prim_surf[0]; + double *ux_xr = &prim_surf[1]; + double *uy_xl = &prim_surf[2]; + double *uy_xr = &prim_surf[3]; + double *uz_xl = &prim_surf[4]; + double *uz_xr = &prim_surf[5]; + double *Txx_xl = &prim_surf[6]; + double *Txx_xr = &prim_surf[7]; + + ux_xl[0] = 0.7071067811865475*ux[0]-1.224744871391589*ux[1]; + ux_xr[0] = 1.224744871391589*ux[1]+0.7071067811865475*ux[0]; + uy_xl[0] = 0.7071067811865475*uy[0]-1.224744871391589*uy[1]; + uy_xr[0] = 1.224744871391589*uy[1]+0.7071067811865475*uy[0]; + uz_xl[0] = 0.7071067811865475*uz[0]-1.224744871391589*uz[1]; + uz_xr[0] = 1.224744871391589*uz[1]+0.7071067811865475*uz[0]; + Txx_xl[0] = 0.7071067811865475*Txx[0]-1.224744871391589*Txx[1]; + Txx_xr[0] = 1.224744871391589*Txx[1]+0.7071067811865475*Txx[0]; + } diff --git a/kernels/pkpm/pkpm_vars_copy_1x_ser_p2.c b/kernels/pkpm/pkpm_vars_copy_1x_ser_p2.c index b4d14c4a1..30811fa85 100644 --- a/kernels/pkpm/pkpm_vars_copy_1x_ser_p2.c +++ b/kernels/pkpm/pkpm_vars_copy_1x_ser_p2.c @@ -1,10 +1,16 @@ #include #include -GKYL_CU_DH void pkpm_vars_copy_1x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim) +GKYL_CU_DH void pkpm_vars_copy_1x_ser_p2(int count, struct gkyl_nmat *x, + double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf) { - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim: [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // count: integer to indicate which matrix being fetched. + // x: Input solution vector. + // prim: Output volume expansion of primitive variables: + // [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp, 3*Txx/m, 3*Tyy/m, 3*Tzz/m]. + // prim_surf: Output surface expansion of primitive variables + // [ux_xl, ux_xr, uy_xl, uy_xr, uz_xl, uz_xr, Txx_xl, Txx_xr, + // ux_yl, ux_yr, uy_yl, uy_yr, uz_yl, uz_yr, Tyy_yl, Tyy_yr, + // ux_zl, ux_zr, uy_zl, uy_zr, uz_zl, uz_zr, Tzz_zl, Tzz_zr] struct gkyl_mat x_ux = gkyl_nmat_get(x, count); struct gkyl_mat x_uy = gkyl_nmat_get(x, count+1); @@ -12,12 +18,18 @@ GKYL_CU_DH void pkpm_vars_copy_1x_ser_p2(int count, struct gkyl_nmat *x, double* struct gkyl_mat x_pkpm_div_ppar = gkyl_nmat_get(x, count+3); struct gkyl_mat x_T_perp_over_m = gkyl_nmat_get(x, count+4); struct gkyl_mat x_T_perp_over_m_inv = gkyl_nmat_get(x, count+5); + struct gkyl_mat x_Txx = gkyl_nmat_get(x, count+6); + struct gkyl_mat x_Tyy = gkyl_nmat_get(x, count+7); + struct gkyl_mat x_Tzz = gkyl_nmat_get(x, count+8); double *ux = &prim[0]; double *uy = &prim[3]; double *uz = &prim[6]; double *p_force = &prim[9]; double *T_perp_over_m = &prim[12]; double *T_perp_over_m_inv = &prim[15]; + double *Txx = &prim[18]; + double *Tyy = &prim[21]; + double *Tzz = &prim[24]; ux[0] = gkyl_mat_get(&x_ux,0,0); uy[0] = gkyl_mat_get(&x_uy,0,0); @@ -25,17 +37,45 @@ GKYL_CU_DH void pkpm_vars_copy_1x_ser_p2(int count, struct gkyl_nmat *x, double* p_force[0] = gkyl_mat_get(&x_pkpm_div_ppar,0,0); T_perp_over_m[0] = gkyl_mat_get(&x_T_perp_over_m,0,0); T_perp_over_m_inv[0] = gkyl_mat_get(&x_T_perp_over_m_inv,0,0); + Txx[0] = 3.0*gkyl_mat_get(&x_Txx,0,0); + Tyy[0] = 3.0*gkyl_mat_get(&x_Tyy,0,0); + Tzz[0] = 3.0*gkyl_mat_get(&x_Tzz,0,0); ux[1] = gkyl_mat_get(&x_ux,1,0); uy[1] = gkyl_mat_get(&x_uy,1,0); uz[1] = gkyl_mat_get(&x_uz,1,0); p_force[1] = gkyl_mat_get(&x_pkpm_div_ppar,1,0); T_perp_over_m[1] = gkyl_mat_get(&x_T_perp_over_m,1,0); T_perp_over_m_inv[1] = gkyl_mat_get(&x_T_perp_over_m_inv,1,0); + Txx[1] = 3.0*gkyl_mat_get(&x_Txx,1,0); + Tyy[1] = 3.0*gkyl_mat_get(&x_Tyy,1,0); + Tzz[1] = 3.0*gkyl_mat_get(&x_Tzz,1,0); ux[2] = gkyl_mat_get(&x_ux,2,0); uy[2] = gkyl_mat_get(&x_uy,2,0); uz[2] = gkyl_mat_get(&x_uz,2,0); p_force[2] = gkyl_mat_get(&x_pkpm_div_ppar,2,0); T_perp_over_m[2] = gkyl_mat_get(&x_T_perp_over_m,2,0); T_perp_over_m_inv[2] = gkyl_mat_get(&x_T_perp_over_m_inv,2,0); + Txx[2] = 3.0*gkyl_mat_get(&x_Txx,2,0); + Tyy[2] = 3.0*gkyl_mat_get(&x_Tyy,2,0); + Tzz[2] = 3.0*gkyl_mat_get(&x_Tzz,2,0); + + double *ux_xl = &prim_surf[0]; + double *ux_xr = &prim_surf[1]; + double *uy_xl = &prim_surf[2]; + double *uy_xr = &prim_surf[3]; + double *uz_xl = &prim_surf[4]; + double *uz_xr = &prim_surf[5]; + double *Txx_xl = &prim_surf[6]; + double *Txx_xr = &prim_surf[7]; + + ux_xl[0] = 1.58113883008419*ux[2]-1.224744871391589*ux[1]+0.7071067811865475*ux[0]; + ux_xr[0] = 1.58113883008419*ux[2]+1.224744871391589*ux[1]+0.7071067811865475*ux[0]; + uy_xl[0] = 1.58113883008419*uy[2]-1.224744871391589*uy[1]+0.7071067811865475*uy[0]; + uy_xr[0] = 1.58113883008419*uy[2]+1.224744871391589*uy[1]+0.7071067811865475*uy[0]; + uz_xl[0] = 1.58113883008419*uz[2]-1.224744871391589*uz[1]+0.7071067811865475*uz[0]; + uz_xr[0] = 1.58113883008419*uz[2]+1.224744871391589*uz[1]+0.7071067811865475*uz[0]; + Txx_xl[0] = 1.58113883008419*Txx[2]-1.224744871391589*Txx[1]+0.7071067811865475*Txx[0]; + Txx_xr[0] = 1.58113883008419*Txx[2]+1.224744871391589*Txx[1]+0.7071067811865475*Txx[0]; + } diff --git a/kernels/pkpm/pkpm_vars_copy_2x_ser_p1.c b/kernels/pkpm/pkpm_vars_copy_2x_ser_p1.c index f3168bc66..119417fcb 100644 --- a/kernels/pkpm/pkpm_vars_copy_2x_ser_p1.c +++ b/kernels/pkpm/pkpm_vars_copy_2x_ser_p1.c @@ -1,10 +1,16 @@ #include #include -GKYL_CU_DH void pkpm_vars_copy_2x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim) +GKYL_CU_DH void pkpm_vars_copy_2x_ser_p1(int count, struct gkyl_nmat *x, + double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf) { - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim: [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // count: integer to indicate which matrix being fetched. + // x: Input solution vector. + // prim: Output volume expansion of primitive variables: + // [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp, 3*Txx/m, 3*Tyy/m, 3*Tzz/m]. + // prim_surf: Output surface expansion of primitive variables + // [ux_xl, ux_xr, uy_xl, uy_xr, uz_xl, uz_xr, Txx_xl, Txx_xr, + // ux_yl, ux_yr, uy_yl, uy_yr, uz_yl, uz_yr, Tyy_yl, Tyy_yr, + // ux_zl, ux_zr, uy_zl, uy_zr, uz_zl, uz_zr, Tzz_zl, Tzz_zr] struct gkyl_mat x_ux = gkyl_nmat_get(x, count); struct gkyl_mat x_uy = gkyl_nmat_get(x, count+1); @@ -12,12 +18,18 @@ GKYL_CU_DH void pkpm_vars_copy_2x_ser_p1(int count, struct gkyl_nmat *x, double* struct gkyl_mat x_pkpm_div_ppar = gkyl_nmat_get(x, count+3); struct gkyl_mat x_T_perp_over_m = gkyl_nmat_get(x, count+4); struct gkyl_mat x_T_perp_over_m_inv = gkyl_nmat_get(x, count+5); + struct gkyl_mat x_Txx = gkyl_nmat_get(x, count+6); + struct gkyl_mat x_Tyy = gkyl_nmat_get(x, count+7); + struct gkyl_mat x_Tzz = gkyl_nmat_get(x, count+8); double *ux = &prim[0]; double *uy = &prim[4]; double *uz = &prim[8]; double *p_force = &prim[12]; double *T_perp_over_m = &prim[16]; double *T_perp_over_m_inv = &prim[20]; + double *Txx = &prim[24]; + double *Tyy = &prim[28]; + double *Tzz = &prim[32]; ux[0] = gkyl_mat_get(&x_ux,0,0); uy[0] = gkyl_mat_get(&x_uy,0,0); @@ -25,23 +37,90 @@ GKYL_CU_DH void pkpm_vars_copy_2x_ser_p1(int count, struct gkyl_nmat *x, double* p_force[0] = gkyl_mat_get(&x_pkpm_div_ppar,0,0); T_perp_over_m[0] = gkyl_mat_get(&x_T_perp_over_m,0,0); T_perp_over_m_inv[0] = gkyl_mat_get(&x_T_perp_over_m_inv,0,0); + Txx[0] = 3.0*gkyl_mat_get(&x_Txx,0,0); + Tyy[0] = 3.0*gkyl_mat_get(&x_Tyy,0,0); + Tzz[0] = 3.0*gkyl_mat_get(&x_Tzz,0,0); ux[1] = gkyl_mat_get(&x_ux,1,0); uy[1] = gkyl_mat_get(&x_uy,1,0); uz[1] = gkyl_mat_get(&x_uz,1,0); p_force[1] = gkyl_mat_get(&x_pkpm_div_ppar,1,0); T_perp_over_m[1] = gkyl_mat_get(&x_T_perp_over_m,1,0); T_perp_over_m_inv[1] = gkyl_mat_get(&x_T_perp_over_m_inv,1,0); + Txx[1] = 3.0*gkyl_mat_get(&x_Txx,1,0); + Tyy[1] = 3.0*gkyl_mat_get(&x_Tyy,1,0); + Tzz[1] = 3.0*gkyl_mat_get(&x_Tzz,1,0); ux[2] = gkyl_mat_get(&x_ux,2,0); uy[2] = gkyl_mat_get(&x_uy,2,0); uz[2] = gkyl_mat_get(&x_uz,2,0); p_force[2] = gkyl_mat_get(&x_pkpm_div_ppar,2,0); T_perp_over_m[2] = gkyl_mat_get(&x_T_perp_over_m,2,0); T_perp_over_m_inv[2] = gkyl_mat_get(&x_T_perp_over_m_inv,2,0); + Txx[2] = 3.0*gkyl_mat_get(&x_Txx,2,0); + Tyy[2] = 3.0*gkyl_mat_get(&x_Tyy,2,0); + Tzz[2] = 3.0*gkyl_mat_get(&x_Tzz,2,0); ux[3] = gkyl_mat_get(&x_ux,3,0); uy[3] = gkyl_mat_get(&x_uy,3,0); uz[3] = gkyl_mat_get(&x_uz,3,0); p_force[3] = gkyl_mat_get(&x_pkpm_div_ppar,3,0); T_perp_over_m[3] = gkyl_mat_get(&x_T_perp_over_m,3,0); T_perp_over_m_inv[3] = gkyl_mat_get(&x_T_perp_over_m_inv,3,0); + Txx[3] = 3.0*gkyl_mat_get(&x_Txx,3,0); + Tyy[3] = 3.0*gkyl_mat_get(&x_Tyy,3,0); + Tzz[3] = 3.0*gkyl_mat_get(&x_Tzz,3,0); + + double *ux_xl = &prim_surf[0]; + double *ux_xr = &prim_surf[2]; + double *uy_xl = &prim_surf[4]; + double *uy_xr = &prim_surf[6]; + double *uz_xl = &prim_surf[8]; + double *uz_xr = &prim_surf[10]; + double *Txx_xl = &prim_surf[12]; + double *Txx_xr = &prim_surf[14]; + + ux_xl[0] = 0.7071067811865475*ux[0]-1.224744871391589*ux[1]; + ux_xl[1] = 0.7071067811865475*ux[2]-1.224744871391589*ux[3]; + uy_xl[0] = 0.7071067811865475*uy[0]-1.224744871391589*uy[1]; + uy_xl[1] = 0.7071067811865475*uy[2]-1.224744871391589*uy[3]; + uz_xl[0] = 0.7071067811865475*uz[0]-1.224744871391589*uz[1]; + uz_xl[1] = 0.7071067811865475*uz[2]-1.224744871391589*uz[3]; + Txx_xl[0] = 0.7071067811865475*Txx[0]-1.224744871391589*Txx[1]; + Txx_xl[1] = 0.7071067811865475*Txx[2]-1.224744871391589*Txx[3]; + + ux_xr[0] = 1.224744871391589*ux[1]+0.7071067811865475*ux[0]; + ux_xr[1] = 1.224744871391589*ux[3]+0.7071067811865475*ux[2]; + uy_xr[0] = 1.224744871391589*uy[1]+0.7071067811865475*uy[0]; + uy_xr[1] = 1.224744871391589*uy[3]+0.7071067811865475*uy[2]; + uz_xr[0] = 1.224744871391589*uz[1]+0.7071067811865475*uz[0]; + uz_xr[1] = 1.224744871391589*uz[3]+0.7071067811865475*uz[2]; + Txx_xr[0] = 1.224744871391589*Txx[1]+0.7071067811865475*Txx[0]; + Txx_xr[1] = 1.224744871391589*Txx[3]+0.7071067811865475*Txx[2]; + + double *ux_yl = &prim_surf[16]; + double *ux_yr = &prim_surf[18]; + double *uy_yl = &prim_surf[20]; + double *uy_yr = &prim_surf[22]; + double *uz_yl = &prim_surf[24]; + double *uz_yr = &prim_surf[26]; + double *Tyy_yl = &prim_surf[28]; + double *Tyy_yr = &prim_surf[30]; + + ux_yl[0] = 0.7071067811865475*ux[0]-1.224744871391589*ux[2]; + ux_yl[1] = 0.7071067811865475*ux[1]-1.224744871391589*ux[3]; + uy_yl[0] = 0.7071067811865475*uy[0]-1.224744871391589*uy[2]; + uy_yl[1] = 0.7071067811865475*uy[1]-1.224744871391589*uy[3]; + uz_yl[0] = 0.7071067811865475*uz[0]-1.224744871391589*uz[2]; + uz_yl[1] = 0.7071067811865475*uz[1]-1.224744871391589*uz[3]; + Tyy_yl[0] = 0.7071067811865475*Tyy[0]-1.224744871391589*Tyy[2]; + Tyy_yl[1] = 0.7071067811865475*Tyy[1]-1.224744871391589*Tyy[3]; + + ux_yr[0] = 1.224744871391589*ux[2]+0.7071067811865475*ux[0]; + ux_yr[1] = 1.224744871391589*ux[3]+0.7071067811865475*ux[1]; + uy_yr[0] = 1.224744871391589*uy[2]+0.7071067811865475*uy[0]; + uy_yr[1] = 1.224744871391589*uy[3]+0.7071067811865475*uy[1]; + uz_yr[0] = 1.224744871391589*uz[2]+0.7071067811865475*uz[0]; + uz_yr[1] = 1.224744871391589*uz[3]+0.7071067811865475*uz[1]; + Tyy_yr[0] = 1.224744871391589*Tyy[2]+0.7071067811865475*Tyy[0]; + Tyy_yr[1] = 1.224744871391589*Tyy[3]+0.7071067811865475*Tyy[1]; + } diff --git a/kernels/pkpm/pkpm_vars_copy_2x_tensor_p2.c b/kernels/pkpm/pkpm_vars_copy_2x_tensor_p2.c index ac518abf4..be53a077c 100644 --- a/kernels/pkpm/pkpm_vars_copy_2x_tensor_p2.c +++ b/kernels/pkpm/pkpm_vars_copy_2x_tensor_p2.c @@ -1,10 +1,16 @@ #include #include -GKYL_CU_DH void pkpm_vars_copy_2x_tensor_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim) +GKYL_CU_DH void pkpm_vars_copy_2x_tensor_p2(int count, struct gkyl_nmat *x, + double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf) { - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim: [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // count: integer to indicate which matrix being fetched. + // x: Input solution vector. + // prim: Output volume expansion of primitive variables: + // [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp, 3*Txx/m, 3*Tyy/m, 3*Tzz/m]. + // prim_surf: Output surface expansion of primitive variables + // [ux_xl, ux_xr, uy_xl, uy_xr, uz_xl, uz_xr, Txx_xl, Txx_xr, + // ux_yl, ux_yr, uy_yl, uy_yr, uz_yl, uz_yr, Tyy_yl, Tyy_yr, + // ux_zl, ux_zr, uy_zl, uy_zr, uz_zl, uz_zr, Tzz_zl, Tzz_zr] struct gkyl_mat x_ux = gkyl_nmat_get(x, count); struct gkyl_mat x_uy = gkyl_nmat_get(x, count+1); @@ -12,12 +18,18 @@ GKYL_CU_DH void pkpm_vars_copy_2x_tensor_p2(int count, struct gkyl_nmat *x, doub struct gkyl_mat x_pkpm_div_ppar = gkyl_nmat_get(x, count+3); struct gkyl_mat x_T_perp_over_m = gkyl_nmat_get(x, count+4); struct gkyl_mat x_T_perp_over_m_inv = gkyl_nmat_get(x, count+5); + struct gkyl_mat x_Txx = gkyl_nmat_get(x, count+6); + struct gkyl_mat x_Tyy = gkyl_nmat_get(x, count+7); + struct gkyl_mat x_Tzz = gkyl_nmat_get(x, count+8); double *ux = &prim[0]; double *uy = &prim[9]; double *uz = &prim[18]; double *p_force = &prim[27]; double *T_perp_over_m = &prim[36]; double *T_perp_over_m_inv = &prim[45]; + double *Txx = &prim[54]; + double *Tyy = &prim[63]; + double *Tzz = &prim[72]; ux[0] = gkyl_mat_get(&x_ux,0,0); uy[0] = gkyl_mat_get(&x_uy,0,0); @@ -25,53 +37,151 @@ GKYL_CU_DH void pkpm_vars_copy_2x_tensor_p2(int count, struct gkyl_nmat *x, doub p_force[0] = gkyl_mat_get(&x_pkpm_div_ppar,0,0); T_perp_over_m[0] = gkyl_mat_get(&x_T_perp_over_m,0,0); T_perp_over_m_inv[0] = gkyl_mat_get(&x_T_perp_over_m_inv,0,0); + Txx[0] = 3.0*gkyl_mat_get(&x_Txx,0,0); + Tyy[0] = 3.0*gkyl_mat_get(&x_Tyy,0,0); + Tzz[0] = 3.0*gkyl_mat_get(&x_Tzz,0,0); ux[1] = gkyl_mat_get(&x_ux,1,0); uy[1] = gkyl_mat_get(&x_uy,1,0); uz[1] = gkyl_mat_get(&x_uz,1,0); p_force[1] = gkyl_mat_get(&x_pkpm_div_ppar,1,0); T_perp_over_m[1] = gkyl_mat_get(&x_T_perp_over_m,1,0); T_perp_over_m_inv[1] = gkyl_mat_get(&x_T_perp_over_m_inv,1,0); + Txx[1] = 3.0*gkyl_mat_get(&x_Txx,1,0); + Tyy[1] = 3.0*gkyl_mat_get(&x_Tyy,1,0); + Tzz[1] = 3.0*gkyl_mat_get(&x_Tzz,1,0); ux[2] = gkyl_mat_get(&x_ux,2,0); uy[2] = gkyl_mat_get(&x_uy,2,0); uz[2] = gkyl_mat_get(&x_uz,2,0); p_force[2] = gkyl_mat_get(&x_pkpm_div_ppar,2,0); T_perp_over_m[2] = gkyl_mat_get(&x_T_perp_over_m,2,0); T_perp_over_m_inv[2] = gkyl_mat_get(&x_T_perp_over_m_inv,2,0); + Txx[2] = 3.0*gkyl_mat_get(&x_Txx,2,0); + Tyy[2] = 3.0*gkyl_mat_get(&x_Tyy,2,0); + Tzz[2] = 3.0*gkyl_mat_get(&x_Tzz,2,0); ux[3] = gkyl_mat_get(&x_ux,3,0); uy[3] = gkyl_mat_get(&x_uy,3,0); uz[3] = gkyl_mat_get(&x_uz,3,0); p_force[3] = gkyl_mat_get(&x_pkpm_div_ppar,3,0); T_perp_over_m[3] = gkyl_mat_get(&x_T_perp_over_m,3,0); T_perp_over_m_inv[3] = gkyl_mat_get(&x_T_perp_over_m_inv,3,0); + Txx[3] = 3.0*gkyl_mat_get(&x_Txx,3,0); + Tyy[3] = 3.0*gkyl_mat_get(&x_Tyy,3,0); + Tzz[3] = 3.0*gkyl_mat_get(&x_Tzz,3,0); ux[4] = gkyl_mat_get(&x_ux,4,0); uy[4] = gkyl_mat_get(&x_uy,4,0); uz[4] = gkyl_mat_get(&x_uz,4,0); p_force[4] = gkyl_mat_get(&x_pkpm_div_ppar,4,0); T_perp_over_m[4] = gkyl_mat_get(&x_T_perp_over_m,4,0); T_perp_over_m_inv[4] = gkyl_mat_get(&x_T_perp_over_m_inv,4,0); + Txx[4] = 3.0*gkyl_mat_get(&x_Txx,4,0); + Tyy[4] = 3.0*gkyl_mat_get(&x_Tyy,4,0); + Tzz[4] = 3.0*gkyl_mat_get(&x_Tzz,4,0); ux[5] = gkyl_mat_get(&x_ux,5,0); uy[5] = gkyl_mat_get(&x_uy,5,0); uz[5] = gkyl_mat_get(&x_uz,5,0); p_force[5] = gkyl_mat_get(&x_pkpm_div_ppar,5,0); T_perp_over_m[5] = gkyl_mat_get(&x_T_perp_over_m,5,0); T_perp_over_m_inv[5] = gkyl_mat_get(&x_T_perp_over_m_inv,5,0); + Txx[5] = 3.0*gkyl_mat_get(&x_Txx,5,0); + Tyy[5] = 3.0*gkyl_mat_get(&x_Tyy,5,0); + Tzz[5] = 3.0*gkyl_mat_get(&x_Tzz,5,0); ux[6] = gkyl_mat_get(&x_ux,6,0); uy[6] = gkyl_mat_get(&x_uy,6,0); uz[6] = gkyl_mat_get(&x_uz,6,0); p_force[6] = gkyl_mat_get(&x_pkpm_div_ppar,6,0); T_perp_over_m[6] = gkyl_mat_get(&x_T_perp_over_m,6,0); T_perp_over_m_inv[6] = gkyl_mat_get(&x_T_perp_over_m_inv,6,0); + Txx[6] = 3.0*gkyl_mat_get(&x_Txx,6,0); + Tyy[6] = 3.0*gkyl_mat_get(&x_Tyy,6,0); + Tzz[6] = 3.0*gkyl_mat_get(&x_Tzz,6,0); ux[7] = gkyl_mat_get(&x_ux,7,0); uy[7] = gkyl_mat_get(&x_uy,7,0); uz[7] = gkyl_mat_get(&x_uz,7,0); p_force[7] = gkyl_mat_get(&x_pkpm_div_ppar,7,0); T_perp_over_m[7] = gkyl_mat_get(&x_T_perp_over_m,7,0); T_perp_over_m_inv[7] = gkyl_mat_get(&x_T_perp_over_m_inv,7,0); + Txx[7] = 3.0*gkyl_mat_get(&x_Txx,7,0); + Tyy[7] = 3.0*gkyl_mat_get(&x_Tyy,7,0); + Tzz[7] = 3.0*gkyl_mat_get(&x_Tzz,7,0); ux[8] = gkyl_mat_get(&x_ux,8,0); uy[8] = gkyl_mat_get(&x_uy,8,0); uz[8] = gkyl_mat_get(&x_uz,8,0); p_force[8] = gkyl_mat_get(&x_pkpm_div_ppar,8,0); T_perp_over_m[8] = gkyl_mat_get(&x_T_perp_over_m,8,0); T_perp_over_m_inv[8] = gkyl_mat_get(&x_T_perp_over_m_inv,8,0); + Txx[8] = 3.0*gkyl_mat_get(&x_Txx,8,0); + Tyy[8] = 3.0*gkyl_mat_get(&x_Tyy,8,0); + Tzz[8] = 3.0*gkyl_mat_get(&x_Tzz,8,0); + + double *ux_xl = &prim_surf[0]; + double *ux_xr = &prim_surf[3]; + double *uy_xl = &prim_surf[6]; + double *uy_xr = &prim_surf[9]; + double *uz_xl = &prim_surf[12]; + double *uz_xr = &prim_surf[15]; + double *Txx_xl = &prim_surf[18]; + double *Txx_xr = &prim_surf[21]; + + ux_xl[0] = 1.58113883008419*ux[4]-1.224744871391589*ux[1]+0.7071067811865475*ux[0]; + ux_xl[1] = 1.58113883008419*ux[6]-1.224744871391589*ux[3]+0.7071067811865475*ux[2]; + ux_xl[2] = 1.58113883008419*ux[8]-1.224744871391589*ux[7]+0.7071067811865475*ux[5]; + uy_xl[0] = 1.58113883008419*uy[4]-1.224744871391589*uy[1]+0.7071067811865475*uy[0]; + uy_xl[1] = 1.58113883008419*uy[6]-1.224744871391589*uy[3]+0.7071067811865475*uy[2]; + uy_xl[2] = 1.58113883008419*uy[8]-1.224744871391589*uy[7]+0.7071067811865475*uy[5]; + uz_xl[0] = 1.58113883008419*uz[4]-1.224744871391589*uz[1]+0.7071067811865475*uz[0]; + uz_xl[1] = 1.58113883008419*uz[6]-1.224744871391589*uz[3]+0.7071067811865475*uz[2]; + uz_xl[2] = 1.58113883008419*uz[8]-1.224744871391589*uz[7]+0.7071067811865475*uz[5]; + Txx_xl[0] = 1.58113883008419*Txx[4]-1.224744871391589*Txx[1]+0.7071067811865475*Txx[0]; + Txx_xl[1] = 1.58113883008419*Txx[6]-1.224744871391589*Txx[3]+0.7071067811865475*Txx[2]; + Txx_xl[2] = 1.58113883008419*Txx[8]-1.224744871391589*Txx[7]+0.7071067811865475*Txx[5]; + + ux_xr[0] = 1.58113883008419*ux[4]+1.224744871391589*ux[1]+0.7071067811865475*ux[0]; + ux_xr[1] = 1.58113883008419*ux[6]+1.224744871391589*ux[3]+0.7071067811865475*ux[2]; + ux_xr[2] = 1.58113883008419*ux[8]+1.224744871391589*ux[7]+0.7071067811865475*ux[5]; + uy_xr[0] = 1.58113883008419*uy[4]+1.224744871391589*uy[1]+0.7071067811865475*uy[0]; + uy_xr[1] = 1.58113883008419*uy[6]+1.224744871391589*uy[3]+0.7071067811865475*uy[2]; + uy_xr[2] = 1.58113883008419*uy[8]+1.224744871391589*uy[7]+0.7071067811865475*uy[5]; + uz_xr[0] = 1.58113883008419*uz[4]+1.224744871391589*uz[1]+0.7071067811865475*uz[0]; + uz_xr[1] = 1.58113883008419*uz[6]+1.224744871391589*uz[3]+0.7071067811865475*uz[2]; + uz_xr[2] = 1.58113883008419*uz[8]+1.224744871391589*uz[7]+0.7071067811865475*uz[5]; + Txx_xr[0] = 1.58113883008419*Txx[4]+1.224744871391589*Txx[1]+0.7071067811865475*Txx[0]; + Txx_xr[1] = 1.58113883008419*Txx[6]+1.224744871391589*Txx[3]+0.7071067811865475*Txx[2]; + Txx_xr[2] = 1.58113883008419*Txx[8]+1.224744871391589*Txx[7]+0.7071067811865475*Txx[5]; + + double *ux_yl = &prim_surf[24]; + double *ux_yr = &prim_surf[27]; + double *uy_yl = &prim_surf[30]; + double *uy_yr = &prim_surf[33]; + double *uz_yl = &prim_surf[36]; + double *uz_yr = &prim_surf[39]; + double *Tyy_yl = &prim_surf[42]; + double *Tyy_yr = &prim_surf[45]; + + ux_yl[0] = 1.58113883008419*ux[5]-1.224744871391589*ux[2]+0.7071067811865475*ux[0]; + ux_yl[1] = 1.58113883008419*ux[7]-1.224744871391589*ux[3]+0.7071067811865475*ux[1]; + ux_yl[2] = 1.58113883008419*ux[8]-1.224744871391589*ux[6]+0.7071067811865475*ux[4]; + uy_yl[0] = 1.58113883008419*uy[5]-1.224744871391589*uy[2]+0.7071067811865475*uy[0]; + uy_yl[1] = 1.58113883008419*uy[7]-1.224744871391589*uy[3]+0.7071067811865475*uy[1]; + uy_yl[2] = 1.58113883008419*uy[8]-1.224744871391589*uy[6]+0.7071067811865475*uy[4]; + uz_yl[0] = 1.58113883008419*uz[5]-1.224744871391589*uz[2]+0.7071067811865475*uz[0]; + uz_yl[1] = 1.58113883008419*uz[7]-1.224744871391589*uz[3]+0.7071067811865475*uz[1]; + uz_yl[2] = 1.58113883008419*uz[8]-1.224744871391589*uz[6]+0.7071067811865475*uz[4]; + Tyy_yl[0] = 1.58113883008419*Tyy[5]-1.224744871391589*Tyy[2]+0.7071067811865475*Tyy[0]; + Tyy_yl[1] = 1.58113883008419*Tyy[7]-1.224744871391589*Tyy[3]+0.7071067811865475*Tyy[1]; + Tyy_yl[2] = 1.58113883008419*Tyy[8]-1.224744871391589*Tyy[6]+0.7071067811865475*Tyy[4]; + + ux_yr[0] = 1.58113883008419*ux[5]+1.224744871391589*ux[2]+0.7071067811865475*ux[0]; + ux_yr[1] = 1.58113883008419*ux[7]+1.224744871391589*ux[3]+0.7071067811865475*ux[1]; + ux_yr[2] = 1.58113883008419*ux[8]+1.224744871391589*ux[6]+0.7071067811865475*ux[4]; + uy_yr[0] = 1.58113883008419*uy[5]+1.224744871391589*uy[2]+0.7071067811865475*uy[0]; + uy_yr[1] = 1.58113883008419*uy[7]+1.224744871391589*uy[3]+0.7071067811865475*uy[1]; + uy_yr[2] = 1.58113883008419*uy[8]+1.224744871391589*uy[6]+0.7071067811865475*uy[4]; + uz_yr[0] = 1.58113883008419*uz[5]+1.224744871391589*uz[2]+0.7071067811865475*uz[0]; + uz_yr[1] = 1.58113883008419*uz[7]+1.224744871391589*uz[3]+0.7071067811865475*uz[1]; + uz_yr[2] = 1.58113883008419*uz[8]+1.224744871391589*uz[6]+0.7071067811865475*uz[4]; + Tyy_yr[0] = 1.58113883008419*Tyy[5]+1.224744871391589*Tyy[2]+0.7071067811865475*Tyy[0]; + Tyy_yr[1] = 1.58113883008419*Tyy[7]+1.224744871391589*Tyy[3]+0.7071067811865475*Tyy[1]; + Tyy_yr[2] = 1.58113883008419*Tyy[8]+1.224744871391589*Tyy[6]+0.7071067811865475*Tyy[4]; + } diff --git a/kernels/pkpm/pkpm_vars_copy_3x_ser_p1.c b/kernels/pkpm/pkpm_vars_copy_3x_ser_p1.c index a7e891145..5079d5216 100644 --- a/kernels/pkpm/pkpm_vars_copy_3x_ser_p1.c +++ b/kernels/pkpm/pkpm_vars_copy_3x_ser_p1.c @@ -1,10 +1,16 @@ #include #include -GKYL_CU_DH void pkpm_vars_copy_3x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim) +GKYL_CU_DH void pkpm_vars_copy_3x_ser_p1(int count, struct gkyl_nmat *x, + double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf) { - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim: [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // count: integer to indicate which matrix being fetched. + // x: Input solution vector. + // prim: Output volume expansion of primitive variables: + // [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp, 3*Txx/m, 3*Tyy/m, 3*Tzz/m]. + // prim_surf: Output surface expansion of primitive variables + // [ux_xl, ux_xr, uy_xl, uy_xr, uz_xl, uz_xr, Txx_xl, Txx_xr, + // ux_yl, ux_yr, uy_yl, uy_yr, uz_yl, uz_yr, Tyy_yl, Tyy_yr, + // ux_zl, ux_zr, uy_zl, uy_zr, uz_zl, uz_zr, Tzz_zl, Tzz_zr] struct gkyl_mat x_ux = gkyl_nmat_get(x, count); struct gkyl_mat x_uy = gkyl_nmat_get(x, count+1); @@ -12,12 +18,18 @@ GKYL_CU_DH void pkpm_vars_copy_3x_ser_p1(int count, struct gkyl_nmat *x, double* struct gkyl_mat x_pkpm_div_ppar = gkyl_nmat_get(x, count+3); struct gkyl_mat x_T_perp_over_m = gkyl_nmat_get(x, count+4); struct gkyl_mat x_T_perp_over_m_inv = gkyl_nmat_get(x, count+5); + struct gkyl_mat x_Txx = gkyl_nmat_get(x, count+6); + struct gkyl_mat x_Tyy = gkyl_nmat_get(x, count+7); + struct gkyl_mat x_Tzz = gkyl_nmat_get(x, count+8); double *ux = &prim[0]; double *uy = &prim[8]; double *uz = &prim[16]; double *p_force = &prim[24]; double *T_perp_over_m = &prim[32]; double *T_perp_over_m_inv = &prim[40]; + double *Txx = &prim[48]; + double *Tyy = &prim[56]; + double *Tzz = &prim[64]; ux[0] = gkyl_mat_get(&x_ux,0,0); uy[0] = gkyl_mat_get(&x_uy,0,0); @@ -25,47 +37,201 @@ GKYL_CU_DH void pkpm_vars_copy_3x_ser_p1(int count, struct gkyl_nmat *x, double* p_force[0] = gkyl_mat_get(&x_pkpm_div_ppar,0,0); T_perp_over_m[0] = gkyl_mat_get(&x_T_perp_over_m,0,0); T_perp_over_m_inv[0] = gkyl_mat_get(&x_T_perp_over_m_inv,0,0); + Txx[0] = 3.0*gkyl_mat_get(&x_Txx,0,0); + Tyy[0] = 3.0*gkyl_mat_get(&x_Tyy,0,0); + Tzz[0] = 3.0*gkyl_mat_get(&x_Tzz,0,0); ux[1] = gkyl_mat_get(&x_ux,1,0); uy[1] = gkyl_mat_get(&x_uy,1,0); uz[1] = gkyl_mat_get(&x_uz,1,0); p_force[1] = gkyl_mat_get(&x_pkpm_div_ppar,1,0); T_perp_over_m[1] = gkyl_mat_get(&x_T_perp_over_m,1,0); T_perp_over_m_inv[1] = gkyl_mat_get(&x_T_perp_over_m_inv,1,0); + Txx[1] = 3.0*gkyl_mat_get(&x_Txx,1,0); + Tyy[1] = 3.0*gkyl_mat_get(&x_Tyy,1,0); + Tzz[1] = 3.0*gkyl_mat_get(&x_Tzz,1,0); ux[2] = gkyl_mat_get(&x_ux,2,0); uy[2] = gkyl_mat_get(&x_uy,2,0); uz[2] = gkyl_mat_get(&x_uz,2,0); p_force[2] = gkyl_mat_get(&x_pkpm_div_ppar,2,0); T_perp_over_m[2] = gkyl_mat_get(&x_T_perp_over_m,2,0); T_perp_over_m_inv[2] = gkyl_mat_get(&x_T_perp_over_m_inv,2,0); + Txx[2] = 3.0*gkyl_mat_get(&x_Txx,2,0); + Tyy[2] = 3.0*gkyl_mat_get(&x_Tyy,2,0); + Tzz[2] = 3.0*gkyl_mat_get(&x_Tzz,2,0); ux[3] = gkyl_mat_get(&x_ux,3,0); uy[3] = gkyl_mat_get(&x_uy,3,0); uz[3] = gkyl_mat_get(&x_uz,3,0); p_force[3] = gkyl_mat_get(&x_pkpm_div_ppar,3,0); T_perp_over_m[3] = gkyl_mat_get(&x_T_perp_over_m,3,0); T_perp_over_m_inv[3] = gkyl_mat_get(&x_T_perp_over_m_inv,3,0); + Txx[3] = 3.0*gkyl_mat_get(&x_Txx,3,0); + Tyy[3] = 3.0*gkyl_mat_get(&x_Tyy,3,0); + Tzz[3] = 3.0*gkyl_mat_get(&x_Tzz,3,0); ux[4] = gkyl_mat_get(&x_ux,4,0); uy[4] = gkyl_mat_get(&x_uy,4,0); uz[4] = gkyl_mat_get(&x_uz,4,0); p_force[4] = gkyl_mat_get(&x_pkpm_div_ppar,4,0); T_perp_over_m[4] = gkyl_mat_get(&x_T_perp_over_m,4,0); T_perp_over_m_inv[4] = gkyl_mat_get(&x_T_perp_over_m_inv,4,0); + Txx[4] = 3.0*gkyl_mat_get(&x_Txx,4,0); + Tyy[4] = 3.0*gkyl_mat_get(&x_Tyy,4,0); + Tzz[4] = 3.0*gkyl_mat_get(&x_Tzz,4,0); ux[5] = gkyl_mat_get(&x_ux,5,0); uy[5] = gkyl_mat_get(&x_uy,5,0); uz[5] = gkyl_mat_get(&x_uz,5,0); p_force[5] = gkyl_mat_get(&x_pkpm_div_ppar,5,0); T_perp_over_m[5] = gkyl_mat_get(&x_T_perp_over_m,5,0); T_perp_over_m_inv[5] = gkyl_mat_get(&x_T_perp_over_m_inv,5,0); + Txx[5] = 3.0*gkyl_mat_get(&x_Txx,5,0); + Tyy[5] = 3.0*gkyl_mat_get(&x_Tyy,5,0); + Tzz[5] = 3.0*gkyl_mat_get(&x_Tzz,5,0); ux[6] = gkyl_mat_get(&x_ux,6,0); uy[6] = gkyl_mat_get(&x_uy,6,0); uz[6] = gkyl_mat_get(&x_uz,6,0); p_force[6] = gkyl_mat_get(&x_pkpm_div_ppar,6,0); T_perp_over_m[6] = gkyl_mat_get(&x_T_perp_over_m,6,0); T_perp_over_m_inv[6] = gkyl_mat_get(&x_T_perp_over_m_inv,6,0); + Txx[6] = 3.0*gkyl_mat_get(&x_Txx,6,0); + Tyy[6] = 3.0*gkyl_mat_get(&x_Tyy,6,0); + Tzz[6] = 3.0*gkyl_mat_get(&x_Tzz,6,0); ux[7] = gkyl_mat_get(&x_ux,7,0); uy[7] = gkyl_mat_get(&x_uy,7,0); uz[7] = gkyl_mat_get(&x_uz,7,0); p_force[7] = gkyl_mat_get(&x_pkpm_div_ppar,7,0); T_perp_over_m[7] = gkyl_mat_get(&x_T_perp_over_m,7,0); T_perp_over_m_inv[7] = gkyl_mat_get(&x_T_perp_over_m_inv,7,0); + Txx[7] = 3.0*gkyl_mat_get(&x_Txx,7,0); + Tyy[7] = 3.0*gkyl_mat_get(&x_Tyy,7,0); + Tzz[7] = 3.0*gkyl_mat_get(&x_Tzz,7,0); + + double *ux_xl = &prim_surf[0]; + double *ux_xr = &prim_surf[4]; + double *uy_xl = &prim_surf[8]; + double *uy_xr = &prim_surf[12]; + double *uz_xl = &prim_surf[16]; + double *uz_xr = &prim_surf[20]; + double *Txx_xl = &prim_surf[24]; + double *Txx_xr = &prim_surf[28]; + + ux_xl[0] = 0.7071067811865475*ux[0]-1.224744871391589*ux[1]; + ux_xl[1] = 0.7071067811865475*ux[2]-1.224744871391589*ux[4]; + ux_xl[2] = 0.7071067811865475*ux[3]-1.224744871391589*ux[5]; + ux_xl[3] = 0.7071067811865475*ux[6]-1.224744871391589*ux[7]; + uy_xl[0] = 0.7071067811865475*uy[0]-1.224744871391589*uy[1]; + uy_xl[1] = 0.7071067811865475*uy[2]-1.224744871391589*uy[4]; + uy_xl[2] = 0.7071067811865475*uy[3]-1.224744871391589*uy[5]; + uy_xl[3] = 0.7071067811865475*uy[6]-1.224744871391589*uy[7]; + uz_xl[0] = 0.7071067811865475*uz[0]-1.224744871391589*uz[1]; + uz_xl[1] = 0.7071067811865475*uz[2]-1.224744871391589*uz[4]; + uz_xl[2] = 0.7071067811865475*uz[3]-1.224744871391589*uz[5]; + uz_xl[3] = 0.7071067811865475*uz[6]-1.224744871391589*uz[7]; + Txx_xl[0] = 0.7071067811865475*Txx[0]-1.224744871391589*Txx[1]; + Txx_xl[1] = 0.7071067811865475*Txx[2]-1.224744871391589*Txx[4]; + Txx_xl[2] = 0.7071067811865475*Txx[3]-1.224744871391589*Txx[5]; + Txx_xl[3] = 0.7071067811865475*Txx[6]-1.224744871391589*Txx[7]; + + ux_xr[0] = 1.224744871391589*ux[1]+0.7071067811865475*ux[0]; + ux_xr[1] = 1.224744871391589*ux[4]+0.7071067811865475*ux[2]; + ux_xr[2] = 1.224744871391589*ux[5]+0.7071067811865475*ux[3]; + ux_xr[3] = 1.224744871391589*ux[7]+0.7071067811865475*ux[6]; + uy_xr[0] = 1.224744871391589*uy[1]+0.7071067811865475*uy[0]; + uy_xr[1] = 1.224744871391589*uy[4]+0.7071067811865475*uy[2]; + uy_xr[2] = 1.224744871391589*uy[5]+0.7071067811865475*uy[3]; + uy_xr[3] = 1.224744871391589*uy[7]+0.7071067811865475*uy[6]; + uz_xr[0] = 1.224744871391589*uz[1]+0.7071067811865475*uz[0]; + uz_xr[1] = 1.224744871391589*uz[4]+0.7071067811865475*uz[2]; + uz_xr[2] = 1.224744871391589*uz[5]+0.7071067811865475*uz[3]; + uz_xr[3] = 1.224744871391589*uz[7]+0.7071067811865475*uz[6]; + Txx_xr[0] = 1.224744871391589*Txx[1]+0.7071067811865475*Txx[0]; + Txx_xr[1] = 1.224744871391589*Txx[4]+0.7071067811865475*Txx[2]; + Txx_xr[2] = 1.224744871391589*Txx[5]+0.7071067811865475*Txx[3]; + Txx_xr[3] = 1.224744871391589*Txx[7]+0.7071067811865475*Txx[6]; + + double *ux_yl = &prim_surf[32]; + double *ux_yr = &prim_surf[36]; + double *uy_yl = &prim_surf[40]; + double *uy_yr = &prim_surf[44]; + double *uz_yl = &prim_surf[48]; + double *uz_yr = &prim_surf[52]; + double *Tyy_yl = &prim_surf[56]; + double *Tyy_yr = &prim_surf[60]; + + ux_yl[0] = 0.7071067811865475*ux[0]-1.224744871391589*ux[2]; + ux_yl[1] = 0.7071067811865475*ux[1]-1.224744871391589*ux[4]; + ux_yl[2] = 0.7071067811865475*ux[3]-1.224744871391589*ux[6]; + ux_yl[3] = 0.7071067811865475*ux[5]-1.224744871391589*ux[7]; + uy_yl[0] = 0.7071067811865475*uy[0]-1.224744871391589*uy[2]; + uy_yl[1] = 0.7071067811865475*uy[1]-1.224744871391589*uy[4]; + uy_yl[2] = 0.7071067811865475*uy[3]-1.224744871391589*uy[6]; + uy_yl[3] = 0.7071067811865475*uy[5]-1.224744871391589*uy[7]; + uz_yl[0] = 0.7071067811865475*uz[0]-1.224744871391589*uz[2]; + uz_yl[1] = 0.7071067811865475*uz[1]-1.224744871391589*uz[4]; + uz_yl[2] = 0.7071067811865475*uz[3]-1.224744871391589*uz[6]; + uz_yl[3] = 0.7071067811865475*uz[5]-1.224744871391589*uz[7]; + Tyy_yl[0] = 0.7071067811865475*Tyy[0]-1.224744871391589*Tyy[2]; + Tyy_yl[1] = 0.7071067811865475*Tyy[1]-1.224744871391589*Tyy[4]; + Tyy_yl[2] = 0.7071067811865475*Tyy[3]-1.224744871391589*Tyy[6]; + Tyy_yl[3] = 0.7071067811865475*Tyy[5]-1.224744871391589*Tyy[7]; + + ux_yr[0] = 1.224744871391589*ux[2]+0.7071067811865475*ux[0]; + ux_yr[1] = 1.224744871391589*ux[4]+0.7071067811865475*ux[1]; + ux_yr[2] = 1.224744871391589*ux[6]+0.7071067811865475*ux[3]; + ux_yr[3] = 1.224744871391589*ux[7]+0.7071067811865475*ux[5]; + uy_yr[0] = 1.224744871391589*uy[2]+0.7071067811865475*uy[0]; + uy_yr[1] = 1.224744871391589*uy[4]+0.7071067811865475*uy[1]; + uy_yr[2] = 1.224744871391589*uy[6]+0.7071067811865475*uy[3]; + uy_yr[3] = 1.224744871391589*uy[7]+0.7071067811865475*uy[5]; + uz_yr[0] = 1.224744871391589*uz[2]+0.7071067811865475*uz[0]; + uz_yr[1] = 1.224744871391589*uz[4]+0.7071067811865475*uz[1]; + uz_yr[2] = 1.224744871391589*uz[6]+0.7071067811865475*uz[3]; + uz_yr[3] = 1.224744871391589*uz[7]+0.7071067811865475*uz[5]; + Tyy_yr[0] = 1.224744871391589*Tyy[2]+0.7071067811865475*Tyy[0]; + Tyy_yr[1] = 1.224744871391589*Tyy[4]+0.7071067811865475*Tyy[1]; + Tyy_yr[2] = 1.224744871391589*Tyy[6]+0.7071067811865475*Tyy[3]; + Tyy_yr[3] = 1.224744871391589*Tyy[7]+0.7071067811865475*Tyy[5]; + + double *ux_zl = &prim_surf[64]; + double *ux_zr = &prim_surf[68]; + double *uy_zl = &prim_surf[72]; + double *uy_zr = &prim_surf[76]; + double *uz_zl = &prim_surf[80]; + double *uz_zr = &prim_surf[84]; + double *Tzz_zl = &prim_surf[88]; + double *Tzz_zr = &prim_surf[92]; + + ux_zl[0] = 0.7071067811865475*ux[0]-1.224744871391589*ux[3]; + ux_zl[1] = 0.7071067811865475*ux[1]-1.224744871391589*ux[5]; + ux_zl[2] = 0.7071067811865475*ux[2]-1.224744871391589*ux[6]; + ux_zl[3] = 0.7071067811865475*ux[4]-1.224744871391589*ux[7]; + uy_zl[0] = 0.7071067811865475*uy[0]-1.224744871391589*uy[3]; + uy_zl[1] = 0.7071067811865475*uy[1]-1.224744871391589*uy[5]; + uy_zl[2] = 0.7071067811865475*uy[2]-1.224744871391589*uy[6]; + uy_zl[3] = 0.7071067811865475*uy[4]-1.224744871391589*uy[7]; + uz_zl[0] = 0.7071067811865475*uz[0]-1.224744871391589*uz[3]; + uz_zl[1] = 0.7071067811865475*uz[1]-1.224744871391589*uz[5]; + uz_zl[2] = 0.7071067811865475*uz[2]-1.224744871391589*uz[6]; + uz_zl[3] = 0.7071067811865475*uz[4]-1.224744871391589*uz[7]; + Tzz_zl[0] = 0.7071067811865475*Tzz[0]-1.224744871391589*Tzz[3]; + Tzz_zl[1] = 0.7071067811865475*Tzz[1]-1.224744871391589*Tzz[5]; + Tzz_zl[2] = 0.7071067811865475*Tzz[2]-1.224744871391589*Tzz[6]; + Tzz_zl[3] = 0.7071067811865475*Tzz[4]-1.224744871391589*Tzz[7]; + + ux_zr[0] = 1.224744871391589*ux[3]+0.7071067811865475*ux[0]; + ux_zr[1] = 1.224744871391589*ux[5]+0.7071067811865475*ux[1]; + ux_zr[2] = 1.224744871391589*ux[6]+0.7071067811865475*ux[2]; + ux_zr[3] = 1.224744871391589*ux[7]+0.7071067811865475*ux[4]; + uy_zr[0] = 1.224744871391589*uy[3]+0.7071067811865475*uy[0]; + uy_zr[1] = 1.224744871391589*uy[5]+0.7071067811865475*uy[1]; + uy_zr[2] = 1.224744871391589*uy[6]+0.7071067811865475*uy[2]; + uy_zr[3] = 1.224744871391589*uy[7]+0.7071067811865475*uy[4]; + uz_zr[0] = 1.224744871391589*uz[3]+0.7071067811865475*uz[0]; + uz_zr[1] = 1.224744871391589*uz[5]+0.7071067811865475*uz[1]; + uz_zr[2] = 1.224744871391589*uz[6]+0.7071067811865475*uz[2]; + uz_zr[3] = 1.224744871391589*uz[7]+0.7071067811865475*uz[4]; + Tzz_zr[0] = 1.224744871391589*Tzz[3]+0.7071067811865475*Tzz[0]; + Tzz_zr[1] = 1.224744871391589*Tzz[5]+0.7071067811865475*Tzz[1]; + Tzz_zr[2] = 1.224744871391589*Tzz[6]+0.7071067811865475*Tzz[2]; + Tzz_zr[3] = 1.224744871391589*Tzz[7]+0.7071067811865475*Tzz[4]; + } diff --git a/kernels/pkpm/pkpm_vars_pressure_1x_ser_p1.c b/kernels/pkpm/pkpm_vars_pressure_1x_ser_p1.c index 9ee35ab38..c719630c3 100644 --- a/kernels/pkpm/pkpm_vars_pressure_1x_ser_p1.c +++ b/kernels/pkpm/pkpm_vars_pressure_1x_ser_p1.c @@ -33,12 +33,6 @@ GKYL_CU_DH void pkpm_vars_pressure_1x_ser_p1(const double *bvar, const double *b double *Pyz = &p_ij[8]; double *Pzz = &p_ij[10]; - const double *bxbx_xl = &bvar_surf[2]; - const double *bxbx_xr = &bvar_surf[3]; - const double *bxby_xl = &bvar_surf[4]; - const double *bxby_xr = &bvar_surf[5]; - const double *bxbz_xl = &bvar_surf[6]; - const double *bxbz_xr = &bvar_surf[7]; double *Pxx_xl = &p_ij_surf[0]; double *Pxx_xr = &p_ij_surf[1]; double *Pxy_xl = &p_ij_surf[2]; @@ -81,15 +75,11 @@ GKYL_CU_DH void pkpm_vars_pressure_1x_ser_p1(const double *bvar, const double *b Pyz[1] = DP_bybz[1]; Pzz[1] = DP_bzbz[1] + p_perp[1]; - double p_par_xl = 0.7071067811865475*p_parallel[0]-1.224744871391589*p_parallel[1]; - double p_par_xr = 1.224744871391589*p_parallel[1]+0.7071067811865475*p_parallel[0]; - double p_perp_xl = 0.7071067811865475*p_perp[0]-1.224744871391589*p_perp[1]; - double p_perp_xr = 1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0]; - Pxx_xl[0] = (p_par_xl - p_perp_xl)*bxbx_xl[0] + p_perp_xl; - Pxx_xr[0] = (p_par_xr - p_perp_xr)*bxbx_xr[0] + p_perp_xr; - Pxy_xl[0] = (p_par_xl - p_perp_xl)*bxby_xl[0]; - Pxy_xr[0] = (p_par_xr - p_perp_xr)*bxby_xr[0]; - Pxz_xl[0] = (p_par_xl - p_perp_xl)*bxbz_xl[0]; - Pxz_xr[0] = (p_par_xr - p_perp_xr)*bxbz_xr[0]; + Pxx_xl[0] = 0.7071067811865475*Pxx[0]-1.224744871391589*Pxx[1]; + Pxx_xr[0] = 1.224744871391589*Pxx[1]+0.7071067811865475*Pxx[0]; + Pxy_xl[0] = 0.7071067811865475*Pxy[0]-1.224744871391589*Pxy[1]; + Pxy_xr[0] = 1.224744871391589*Pxy[1]+0.7071067811865475*Pxy[0]; + Pxz_xl[0] = 0.7071067811865475*Pxz[0]-1.224744871391589*Pxz[1]; + Pxz_xr[0] = 1.224744871391589*Pxz[1]+0.7071067811865475*Pxz[0]; } diff --git a/kernels/pkpm/pkpm_vars_pressure_1x_ser_p2.c b/kernels/pkpm/pkpm_vars_pressure_1x_ser_p2.c index 286229214..e5b968155 100644 --- a/kernels/pkpm/pkpm_vars_pressure_1x_ser_p2.c +++ b/kernels/pkpm/pkpm_vars_pressure_1x_ser_p2.c @@ -33,12 +33,6 @@ GKYL_CU_DH void pkpm_vars_pressure_1x_ser_p2(const double *bvar, const double *b double *Pyz = &p_ij[12]; double *Pzz = &p_ij[15]; - const double *bxbx_xl = &bvar_surf[2]; - const double *bxbx_xr = &bvar_surf[3]; - const double *bxby_xl = &bvar_surf[4]; - const double *bxby_xr = &bvar_surf[5]; - const double *bxbz_xl = &bvar_surf[6]; - const double *bxbz_xr = &bvar_surf[7]; double *Pxx_xl = &p_ij_surf[0]; double *Pxx_xr = &p_ij_surf[1]; double *Pxy_xl = &p_ij_surf[2]; @@ -88,15 +82,11 @@ GKYL_CU_DH void pkpm_vars_pressure_1x_ser_p2(const double *bvar, const double *b Pyz[2] = DP_bybz[2]; Pzz[2] = DP_bzbz[2] + p_perp[2]; - double p_par_xl = 1.58113883008419*p_parallel[2]-1.224744871391589*p_parallel[1]+0.7071067811865475*p_parallel[0]; - double p_par_xr = 1.58113883008419*p_parallel[2]+1.224744871391589*p_parallel[1]+0.7071067811865475*p_parallel[0]; - double p_perp_xl = 1.58113883008419*p_perp[2]-1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0]; - double p_perp_xr = 1.58113883008419*p_perp[2]+1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0]; - Pxx_xl[0] = (p_par_xl - p_perp_xl)*bxbx_xl[0] + p_perp_xl; - Pxx_xr[0] = (p_par_xr - p_perp_xr)*bxbx_xr[0] + p_perp_xr; - Pxy_xl[0] = (p_par_xl - p_perp_xl)*bxby_xl[0]; - Pxy_xr[0] = (p_par_xr - p_perp_xr)*bxby_xr[0]; - Pxz_xl[0] = (p_par_xl - p_perp_xl)*bxbz_xl[0]; - Pxz_xr[0] = (p_par_xr - p_perp_xr)*bxbz_xr[0]; + Pxx_xl[0] = 1.58113883008419*Pxx[2]-1.224744871391589*Pxx[1]+0.7071067811865475*Pxx[0]; + Pxx_xr[0] = 1.58113883008419*Pxx[2]+1.224744871391589*Pxx[1]+0.7071067811865475*Pxx[0]; + Pxy_xl[0] = 1.58113883008419*Pxy[2]-1.224744871391589*Pxy[1]+0.7071067811865475*Pxy[0]; + Pxy_xr[0] = 1.58113883008419*Pxy[2]+1.224744871391589*Pxy[1]+0.7071067811865475*Pxy[0]; + Pxz_xl[0] = 1.58113883008419*Pxz[2]-1.224744871391589*Pxz[1]+0.7071067811865475*Pxz[0]; + Pxz_xr[0] = 1.58113883008419*Pxz[2]+1.224744871391589*Pxz[1]+0.7071067811865475*Pxz[0]; } diff --git a/kernels/pkpm/pkpm_vars_pressure_2x_ser_p1.c b/kernels/pkpm/pkpm_vars_pressure_2x_ser_p1.c index f5be8aab2..8d1632f2e 100644 --- a/kernels/pkpm/pkpm_vars_pressure_2x_ser_p1.c +++ b/kernels/pkpm/pkpm_vars_pressure_2x_ser_p1.c @@ -33,12 +33,6 @@ GKYL_CU_DH void pkpm_vars_pressure_2x_ser_p1(const double *bvar, const double *b double *Pyz = &p_ij[16]; double *Pzz = &p_ij[20]; - const double *bxbx_xl = &bvar_surf[4]; - const double *bxbx_xr = &bvar_surf[6]; - const double *bxby_xl = &bvar_surf[8]; - const double *bxby_xr = &bvar_surf[10]; - const double *bxbz_xl = &bvar_surf[12]; - const double *bxbz_xr = &bvar_surf[14]; double *Pxx_xl = &p_ij_surf[0]; double *Pxx_xr = &p_ij_surf[2]; double *Pxy_xl = &p_ij_surf[4]; @@ -46,12 +40,6 @@ GKYL_CU_DH void pkpm_vars_pressure_2x_ser_p1(const double *bvar, const double *b double *Pxz_xl = &p_ij_surf[8]; double *Pxz_xr = &p_ij_surf[10]; - const double *byby_yl = &bvar_surf[20]; - const double *byby_yr = &bvar_surf[22]; - const double *bxby_yl = &bvar_surf[24]; - const double *bxby_yr = &bvar_surf[26]; - const double *bybz_yl = &bvar_surf[28]; - const double *bybz_yr = &bvar_surf[30]; double *Pxy_yl = &p_ij_surf[12]; double *Pxy_yr = &p_ij_surf[14]; double *Pyy_yl = &p_ij_surf[16]; @@ -108,105 +96,32 @@ GKYL_CU_DH void pkpm_vars_pressure_2x_ser_p1(const double *bvar, const double *b Pyz[3] = DP_bybz[3]; Pzz[3] = DP_bzbz[3] + p_perp[3]; - double p_par_xl[2] = {0.0}; - double p_par_xr[2] = {0.0}; - double p_par_yl[2] = {0.0}; - double p_par_yr[2] = {0.0}; - - double p_perp_xl[2] = {0.0}; - double p_perp_xr[2] = {0.0}; - double p_perp_yl[2] = {0.0}; - double p_perp_yr[2] = {0.0}; - - p_par_xl[0] = 0.7071067811865475*p_parallel[0]-1.224744871391589*p_parallel[1]; - p_par_xl[1] = 0.7071067811865475*p_parallel[2]-1.224744871391589*p_parallel[3]; - p_par_xr[0] = 1.224744871391589*p_parallel[1]+0.7071067811865475*p_parallel[0]; - p_par_xr[1] = 1.224744871391589*p_parallel[3]+0.7071067811865475*p_parallel[2]; - p_perp_xl[0] = 0.7071067811865475*p_perp[0]-1.224744871391589*p_perp[1]; - p_perp_xl[1] = 0.7071067811865475*p_perp[2]-1.224744871391589*p_perp[3]; - p_perp_xr[0] = 1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0]; - p_perp_xr[1] = 1.224744871391589*p_perp[3]+0.7071067811865475*p_perp[2]; - - p_par_yl[0] = 0.7071067811865475*p_parallel[0]-1.224744871391589*p_parallel[2]; - p_par_yl[1] = 0.7071067811865475*p_parallel[1]-1.224744871391589*p_parallel[3]; - p_par_yr[0] = 1.224744871391589*p_parallel[2]+0.7071067811865475*p_parallel[0]; - p_par_yr[1] = 1.224744871391589*p_parallel[3]+0.7071067811865475*p_parallel[1]; - p_perp_yl[0] = 0.7071067811865475*p_perp[0]-1.224744871391589*p_perp[2]; - p_perp_yl[1] = 0.7071067811865475*p_perp[1]-1.224744871391589*p_perp[3]; - p_perp_yr[0] = 1.224744871391589*p_perp[2]+0.7071067811865475*p_perp[0]; - p_perp_yr[1] = 1.224744871391589*p_perp[3]+0.7071067811865475*p_perp[1]; - - double DP_xl[2] = {0.0}; - double DP_xr[2] = {0.0}; - double DP_yl[2] = {0.0}; - double DP_yr[2] = {0.0}; - - DP_xl[0] = p_par_xl[0] - p_perp_xl[0]; - DP_xr[0] = p_par_xr[0] - p_perp_xr[0]; - DP_yl[0] = p_par_yl[0] - p_perp_yl[0]; - DP_yr[0] = p_par_yr[0] - p_perp_yr[0]; - DP_xl[1] = p_par_xl[1] - p_perp_xl[1]; - DP_xr[1] = p_par_xr[1] - p_perp_xr[1]; - DP_yl[1] = p_par_yl[1] - p_perp_yl[1]; - DP_yr[1] = p_par_yr[1] - p_perp_yr[1]; - // DP b_i b_j at lower x surface. - double DP_bxbx_xl[2] = {0.0}; - double DP_bxby_xl[2] = {0.0}; - double DP_bxbz_xl[2] = {0.0}; - binop_mul_1d_ser_p1(DP_xl, bxbx_xl, DP_bxbx_xl); - binop_mul_1d_ser_p1(DP_xl, bxby_xl, DP_bxby_xl); - binop_mul_1d_ser_p1(DP_xl, bxbz_xl, DP_bxbz_xl); - - // DP b_i b_j at upper x surface. - double DP_bxbx_xr[2] = {0.0}; - double DP_bxby_xr[2] = {0.0}; - double DP_bxbz_xr[2] = {0.0}; - binop_mul_1d_ser_p1(DP_xr, bxbx_xr, DP_bxbx_xr); - binop_mul_1d_ser_p1(DP_xr, bxby_xr, DP_bxby_xr); - binop_mul_1d_ser_p1(DP_xr, bxbz_xr, DP_bxbz_xr); - - // DP b_i b_j at lower y surface. - double DP_bxby_yl[2] = {0.0}; - double DP_byby_yl[2] = {0.0}; - double DP_bybz_yl[2] = {0.0}; - binop_mul_1d_ser_p1(DP_yl, bxby_yl, DP_bxby_yl); - binop_mul_1d_ser_p1(DP_yl, byby_yl, DP_byby_yl); - binop_mul_1d_ser_p1(DP_yl, bybz_yl, DP_bybz_yl); - - // DP b_i b_j at upper y surface. - double DP_bxby_yr[2] = {0.0}; - double DP_byby_yr[2] = {0.0}; - double DP_bybz_yr[2] = {0.0}; - binop_mul_1d_ser_p1(DP_yr, bxby_yr, DP_bxby_yr); - binop_mul_1d_ser_p1(DP_yr, byby_yr, DP_byby_yr); - binop_mul_1d_ser_p1(DP_yr, bybz_yr, DP_bybz_yr); - - Pxx_xl[0] = DP_bxbx_xl[0] + p_perp_xl[0]; - Pxx_xr[0] = DP_bxbx_xr[0] + p_perp_xr[0]; - Pxy_xl[0] = DP_bxby_xl[0]; - Pxy_xr[0] = DP_bxby_xr[0]; - Pxz_xl[0] = DP_bxbz_xl[0]; - Pxz_xr[0] = DP_bxbz_xr[0]; - - Pxy_yl[0] = DP_bxby_yl[0]; - Pxy_yr[0] = DP_bxby_yr[0]; - Pyy_yl[0] = DP_byby_yl[0] + p_perp_yl[0]; - Pyy_yr[0] = DP_byby_yr[0] + p_perp_yr[0]; - Pyz_yl[0] = DP_bybz_yl[0]; - Pyz_yr[0] = DP_bybz_yr[0]; - - Pxx_xl[1] = DP_bxbx_xl[1] + p_perp_xl[1]; - Pxx_xr[1] = DP_bxbx_xr[1] + p_perp_xr[1]; - Pxy_xl[1] = DP_bxby_xl[1]; - Pxy_xr[1] = DP_bxby_xr[1]; - Pxz_xl[1] = DP_bxbz_xl[1]; - Pxz_xr[1] = DP_bxbz_xr[1]; - - Pxy_yl[1] = DP_bxby_yl[1]; - Pxy_yr[1] = DP_bxby_yr[1]; - Pyy_yl[1] = DP_byby_yl[1] + p_perp_yl[1]; - Pyy_yr[1] = DP_byby_yr[1] + p_perp_yr[1]; - Pyz_yl[1] = DP_bybz_yl[1]; - Pyz_yr[1] = DP_bybz_yr[1]; + Pxx_xl[0] = 0.7071067811865475*Pxx[0]-1.224744871391589*Pxx[1]; + Pxx_xl[1] = 0.7071067811865475*Pxx[2]-1.224744871391589*Pxx[3]; + Pxy_xl[0] = 0.7071067811865475*Pxy[0]-1.224744871391589*Pxy[1]; + Pxy_xl[1] = 0.7071067811865475*Pxy[2]-1.224744871391589*Pxy[3]; + Pxz_xl[0] = 0.7071067811865475*Pxz[0]-1.224744871391589*Pxz[1]; + Pxz_xl[1] = 0.7071067811865475*Pxz[2]-1.224744871391589*Pxz[3]; + + Pxx_xr[0] = 1.224744871391589*Pxx[1]+0.7071067811865475*Pxx[0]; + Pxx_xr[1] = 1.224744871391589*Pxx[3]+0.7071067811865475*Pxx[2]; + Pxy_xr[0] = 1.224744871391589*Pxy[1]+0.7071067811865475*Pxy[0]; + Pxy_xr[1] = 1.224744871391589*Pxy[3]+0.7071067811865475*Pxy[2]; + Pxz_xr[0] = 1.224744871391589*Pxz[1]+0.7071067811865475*Pxz[0]; + Pxz_xr[1] = 1.224744871391589*Pxz[3]+0.7071067811865475*Pxz[2]; + + Pxy_yl[0] = 0.7071067811865475*Pxy[0]-1.224744871391589*Pxy[2]; + Pxy_yl[1] = 0.7071067811865475*Pxy[1]-1.224744871391589*Pxy[3]; + Pyy_yl[0] = 0.7071067811865475*Pyy[0]-1.224744871391589*Pyy[2]; + Pyy_yl[1] = 0.7071067811865475*Pyy[1]-1.224744871391589*Pyy[3]; + Pyz_yl[0] = 0.7071067811865475*Pyz[0]-1.224744871391589*Pyz[2]; + Pyz_yl[1] = 0.7071067811865475*Pyz[1]-1.224744871391589*Pyz[3]; + + Pxy_yr[0] = 1.224744871391589*Pxy[2]+0.7071067811865475*Pxy[0]; + Pxy_yr[1] = 1.224744871391589*Pxy[3]+0.7071067811865475*Pxy[1]; + Pyy_yr[0] = 1.224744871391589*Pyy[2]+0.7071067811865475*Pyy[0]; + Pyy_yr[1] = 1.224744871391589*Pyy[3]+0.7071067811865475*Pyy[1]; + Pyz_yr[0] = 1.224744871391589*Pyz[2]+0.7071067811865475*Pyz[0]; + Pyz_yr[1] = 1.224744871391589*Pyz[3]+0.7071067811865475*Pyz[1]; } diff --git a/kernels/pkpm/pkpm_vars_pressure_2x_tensor_p2.c b/kernels/pkpm/pkpm_vars_pressure_2x_tensor_p2.c index a88ba1a90..3fb750206 100644 --- a/kernels/pkpm/pkpm_vars_pressure_2x_tensor_p2.c +++ b/kernels/pkpm/pkpm_vars_pressure_2x_tensor_p2.c @@ -33,12 +33,6 @@ GKYL_CU_DH void pkpm_vars_pressure_2x_tensor_p2(const double *bvar, const double double *Pyz = &p_ij[36]; double *Pzz = &p_ij[45]; - const double *bxbx_xl = &bvar_surf[6]; - const double *bxbx_xr = &bvar_surf[9]; - const double *bxby_xl = &bvar_surf[12]; - const double *bxby_xr = &bvar_surf[15]; - const double *bxbz_xl = &bvar_surf[18]; - const double *bxbz_xr = &bvar_surf[21]; double *Pxx_xl = &p_ij_surf[0]; double *Pxx_xr = &p_ij_surf[3]; double *Pxy_xl = &p_ij_surf[6]; @@ -46,12 +40,6 @@ GKYL_CU_DH void pkpm_vars_pressure_2x_tensor_p2(const double *bvar, const double double *Pxz_xl = &p_ij_surf[12]; double *Pxz_xr = &p_ij_surf[15]; - const double *byby_yl = &bvar_surf[30]; - const double *byby_yr = &bvar_surf[33]; - const double *bxby_yl = &bvar_surf[36]; - const double *bxby_yr = &bvar_surf[39]; - const double *bybz_yl = &bvar_surf[42]; - const double *bybz_yr = &bvar_surf[45]; double *Pxy_yl = &p_ij_surf[18]; double *Pxy_yr = &p_ij_surf[21]; double *Pyy_yl = &p_ij_surf[24]; @@ -143,131 +131,44 @@ GKYL_CU_DH void pkpm_vars_pressure_2x_tensor_p2(const double *bvar, const double Pyz[8] = DP_bybz[8]; Pzz[8] = DP_bzbz[8] + p_perp[8]; - double p_par_xl[3] = {0.0}; - double p_par_xr[3] = {0.0}; - double p_par_yl[3] = {0.0}; - double p_par_yr[3] = {0.0}; - - double p_perp_xl[3] = {0.0}; - double p_perp_xr[3] = {0.0}; - double p_perp_yl[3] = {0.0}; - double p_perp_yr[3] = {0.0}; - - p_par_xl[0] = 1.58113883008419*p_parallel[4]-1.224744871391589*p_parallel[1]+0.7071067811865475*p_parallel[0]; - p_par_xl[1] = 1.58113883008419*p_parallel[6]-1.224744871391589*p_parallel[3]+0.7071067811865475*p_parallel[2]; - p_par_xl[2] = 1.58113883008419*p_parallel[8]-1.224744871391589*p_parallel[7]+0.7071067811865475*p_parallel[5]; - p_par_xr[0] = 1.58113883008419*p_parallel[4]+1.224744871391589*p_parallel[1]+0.7071067811865475*p_parallel[0]; - p_par_xr[1] = 1.58113883008419*p_parallel[6]+1.224744871391589*p_parallel[3]+0.7071067811865475*p_parallel[2]; - p_par_xr[2] = 1.58113883008419*p_parallel[8]+1.224744871391589*p_parallel[7]+0.7071067811865475*p_parallel[5]; - p_perp_xl[0] = 1.58113883008419*p_perp[4]-1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0]; - p_perp_xl[1] = 1.58113883008419*p_perp[6]-1.224744871391589*p_perp[3]+0.7071067811865475*p_perp[2]; - p_perp_xl[2] = 1.58113883008419*p_perp[8]-1.224744871391589*p_perp[7]+0.7071067811865475*p_perp[5]; - p_perp_xr[0] = 1.58113883008419*p_perp[4]+1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0]; - p_perp_xr[1] = 1.58113883008419*p_perp[6]+1.224744871391589*p_perp[3]+0.7071067811865475*p_perp[2]; - p_perp_xr[2] = 1.58113883008419*p_perp[8]+1.224744871391589*p_perp[7]+0.7071067811865475*p_perp[5]; - - p_par_yl[0] = 1.58113883008419*p_parallel[5]-1.224744871391589*p_parallel[2]+0.7071067811865475*p_parallel[0]; - p_par_yl[1] = 1.58113883008419*p_parallel[7]-1.224744871391589*p_parallel[3]+0.7071067811865475*p_parallel[1]; - p_par_yl[2] = 1.58113883008419*p_parallel[8]-1.224744871391589*p_parallel[6]+0.7071067811865475*p_parallel[4]; - p_par_yr[0] = 1.58113883008419*p_parallel[5]+1.224744871391589*p_parallel[2]+0.7071067811865475*p_parallel[0]; - p_par_yr[1] = 1.58113883008419*p_parallel[7]+1.224744871391589*p_parallel[3]+0.7071067811865475*p_parallel[1]; - p_par_yr[2] = 1.58113883008419*p_parallel[8]+1.224744871391589*p_parallel[6]+0.7071067811865475*p_parallel[4]; - p_perp_yl[0] = 1.58113883008419*p_perp[5]-1.224744871391589*p_perp[2]+0.7071067811865475*p_perp[0]; - p_perp_yl[1] = 1.58113883008419*p_perp[7]-1.224744871391589*p_perp[3]+0.7071067811865475*p_perp[1]; - p_perp_yl[2] = 1.58113883008419*p_perp[8]-1.224744871391589*p_perp[6]+0.7071067811865475*p_perp[4]; - p_perp_yr[0] = 1.58113883008419*p_perp[5]+1.224744871391589*p_perp[2]+0.7071067811865475*p_perp[0]; - p_perp_yr[1] = 1.58113883008419*p_perp[7]+1.224744871391589*p_perp[3]+0.7071067811865475*p_perp[1]; - p_perp_yr[2] = 1.58113883008419*p_perp[8]+1.224744871391589*p_perp[6]+0.7071067811865475*p_perp[4]; - - double DP_xl[3] = {0.0}; - double DP_xr[3] = {0.0}; - double DP_yl[3] = {0.0}; - double DP_yr[3] = {0.0}; - - DP_xl[0] = p_par_xl[0] - p_perp_xl[0]; - DP_xr[0] = p_par_xr[0] - p_perp_xr[0]; - DP_yl[0] = p_par_yl[0] - p_perp_yl[0]; - DP_yr[0] = p_par_yr[0] - p_perp_yr[0]; - DP_xl[1] = p_par_xl[1] - p_perp_xl[1]; - DP_xr[1] = p_par_xr[1] - p_perp_xr[1]; - DP_yl[1] = p_par_yl[1] - p_perp_yl[1]; - DP_yr[1] = p_par_yr[1] - p_perp_yr[1]; - DP_xl[2] = p_par_xl[2] - p_perp_xl[2]; - DP_xr[2] = p_par_xr[2] - p_perp_xr[2]; - DP_yl[2] = p_par_yl[2] - p_perp_yl[2]; - DP_yr[2] = p_par_yr[2] - p_perp_yr[2]; - // DP b_i b_j at lower x surface. - double DP_bxbx_xl[3] = {0.0}; - double DP_bxby_xl[3] = {0.0}; - double DP_bxbz_xl[3] = {0.0}; - binop_mul_1d_ser_p2(DP_xl, bxbx_xl, DP_bxbx_xl); - binop_mul_1d_ser_p2(DP_xl, bxby_xl, DP_bxby_xl); - binop_mul_1d_ser_p2(DP_xl, bxbz_xl, DP_bxbz_xl); - - // DP b_i b_j at upper x surface. - double DP_bxbx_xr[3] = {0.0}; - double DP_bxby_xr[3] = {0.0}; - double DP_bxbz_xr[3] = {0.0}; - binop_mul_1d_ser_p2(DP_xr, bxbx_xr, DP_bxbx_xr); - binop_mul_1d_ser_p2(DP_xr, bxby_xr, DP_bxby_xr); - binop_mul_1d_ser_p2(DP_xr, bxbz_xr, DP_bxbz_xr); - - // DP b_i b_j at lower y surface. - double DP_bxby_yl[3] = {0.0}; - double DP_byby_yl[3] = {0.0}; - double DP_bybz_yl[3] = {0.0}; - binop_mul_1d_ser_p2(DP_yl, bxby_yl, DP_bxby_yl); - binop_mul_1d_ser_p2(DP_yl, byby_yl, DP_byby_yl); - binop_mul_1d_ser_p2(DP_yl, bybz_yl, DP_bybz_yl); - - // DP b_i b_j at upper y surface. - double DP_bxby_yr[3] = {0.0}; - double DP_byby_yr[3] = {0.0}; - double DP_bybz_yr[3] = {0.0}; - binop_mul_1d_ser_p2(DP_yr, bxby_yr, DP_bxby_yr); - binop_mul_1d_ser_p2(DP_yr, byby_yr, DP_byby_yr); - binop_mul_1d_ser_p2(DP_yr, bybz_yr, DP_bybz_yr); - - Pxx_xl[0] = DP_bxbx_xl[0] + p_perp_xl[0]; - Pxx_xr[0] = DP_bxbx_xr[0] + p_perp_xr[0]; - Pxy_xl[0] = DP_bxby_xl[0]; - Pxy_xr[0] = DP_bxby_xr[0]; - Pxz_xl[0] = DP_bxbz_xl[0]; - Pxz_xr[0] = DP_bxbz_xr[0]; - - Pxy_yl[0] = DP_bxby_yl[0]; - Pxy_yr[0] = DP_bxby_yr[0]; - Pyy_yl[0] = DP_byby_yl[0] + p_perp_yl[0]; - Pyy_yr[0] = DP_byby_yr[0] + p_perp_yr[0]; - Pyz_yl[0] = DP_bybz_yl[0]; - Pyz_yr[0] = DP_bybz_yr[0]; - - Pxx_xl[1] = DP_bxbx_xl[1] + p_perp_xl[1]; - Pxx_xr[1] = DP_bxbx_xr[1] + p_perp_xr[1]; - Pxy_xl[1] = DP_bxby_xl[1]; - Pxy_xr[1] = DP_bxby_xr[1]; - Pxz_xl[1] = DP_bxbz_xl[1]; - Pxz_xr[1] = DP_bxbz_xr[1]; - - Pxy_yl[1] = DP_bxby_yl[1]; - Pxy_yr[1] = DP_bxby_yr[1]; - Pyy_yl[1] = DP_byby_yl[1] + p_perp_yl[1]; - Pyy_yr[1] = DP_byby_yr[1] + p_perp_yr[1]; - Pyz_yl[1] = DP_bybz_yl[1]; - Pyz_yr[1] = DP_bybz_yr[1]; - - Pxx_xl[2] = DP_bxbx_xl[2] + p_perp_xl[2]; - Pxx_xr[2] = DP_bxbx_xr[2] + p_perp_xr[2]; - Pxy_xl[2] = DP_bxby_xl[2]; - Pxy_xr[2] = DP_bxby_xr[2]; - Pxz_xl[2] = DP_bxbz_xl[2]; - Pxz_xr[2] = DP_bxbz_xr[2]; - - Pxy_yl[2] = DP_bxby_yl[2]; - Pxy_yr[2] = DP_bxby_yr[2]; - Pyy_yl[2] = DP_byby_yl[2] + p_perp_yl[2]; - Pyy_yr[2] = DP_byby_yr[2] + p_perp_yr[2]; - Pyz_yl[2] = DP_bybz_yl[2]; - Pyz_yr[2] = DP_bybz_yr[2]; + Pxx_xl[0] = 1.58113883008419*Pxx[4]-1.224744871391589*Pxx[1]+0.7071067811865475*Pxx[0]; + Pxx_xl[1] = 1.58113883008419*Pxx[6]-1.224744871391589*Pxx[3]+0.7071067811865475*Pxx[2]; + Pxx_xl[2] = 1.58113883008419*Pxx[8]-1.224744871391589*Pxx[7]+0.7071067811865475*Pxx[5]; + Pxy_xl[0] = 1.58113883008419*Pxy[4]-1.224744871391589*Pxy[1]+0.7071067811865475*Pxy[0]; + Pxy_xl[1] = 1.58113883008419*Pxy[6]-1.224744871391589*Pxy[3]+0.7071067811865475*Pxy[2]; + Pxy_xl[2] = 1.58113883008419*Pxy[8]-1.224744871391589*Pxy[7]+0.7071067811865475*Pxy[5]; + Pxz_xl[0] = 1.58113883008419*Pxz[4]-1.224744871391589*Pxz[1]+0.7071067811865475*Pxz[0]; + Pxz_xl[1] = 1.58113883008419*Pxz[6]-1.224744871391589*Pxz[3]+0.7071067811865475*Pxz[2]; + Pxz_xl[2] = 1.58113883008419*Pxz[8]-1.224744871391589*Pxz[7]+0.7071067811865475*Pxz[5]; + + Pxx_xr[0] = 1.58113883008419*Pxx[4]+1.224744871391589*Pxx[1]+0.7071067811865475*Pxx[0]; + Pxx_xr[1] = 1.58113883008419*Pxx[6]+1.224744871391589*Pxx[3]+0.7071067811865475*Pxx[2]; + Pxx_xr[2] = 1.58113883008419*Pxx[8]+1.224744871391589*Pxx[7]+0.7071067811865475*Pxx[5]; + Pxy_xr[0] = 1.58113883008419*Pxy[4]+1.224744871391589*Pxy[1]+0.7071067811865475*Pxy[0]; + Pxy_xr[1] = 1.58113883008419*Pxy[6]+1.224744871391589*Pxy[3]+0.7071067811865475*Pxy[2]; + Pxy_xr[2] = 1.58113883008419*Pxy[8]+1.224744871391589*Pxy[7]+0.7071067811865475*Pxy[5]; + Pxz_xr[0] = 1.58113883008419*Pxz[4]+1.224744871391589*Pxz[1]+0.7071067811865475*Pxz[0]; + Pxz_xr[1] = 1.58113883008419*Pxz[6]+1.224744871391589*Pxz[3]+0.7071067811865475*Pxz[2]; + Pxz_xr[2] = 1.58113883008419*Pxz[8]+1.224744871391589*Pxz[7]+0.7071067811865475*Pxz[5]; + + Pxy_yl[0] = 1.58113883008419*Pxy[5]-1.224744871391589*Pxy[2]+0.7071067811865475*Pxy[0]; + Pxy_yl[1] = 1.58113883008419*Pxy[7]-1.224744871391589*Pxy[3]+0.7071067811865475*Pxy[1]; + Pxy_yl[2] = 1.58113883008419*Pxy[8]-1.224744871391589*Pxy[6]+0.7071067811865475*Pxy[4]; + Pyy_yl[0] = 1.58113883008419*Pyy[5]-1.224744871391589*Pyy[2]+0.7071067811865475*Pyy[0]; + Pyy_yl[1] = 1.58113883008419*Pyy[7]-1.224744871391589*Pyy[3]+0.7071067811865475*Pyy[1]; + Pyy_yl[2] = 1.58113883008419*Pyy[8]-1.224744871391589*Pyy[6]+0.7071067811865475*Pyy[4]; + Pyz_yl[0] = 1.58113883008419*Pyz[5]-1.224744871391589*Pyz[2]+0.7071067811865475*Pyz[0]; + Pyz_yl[1] = 1.58113883008419*Pyz[7]-1.224744871391589*Pyz[3]+0.7071067811865475*Pyz[1]; + Pyz_yl[2] = 1.58113883008419*Pyz[8]-1.224744871391589*Pyz[6]+0.7071067811865475*Pyz[4]; + + Pxy_yr[0] = 1.58113883008419*Pxy[5]+1.224744871391589*Pxy[2]+0.7071067811865475*Pxy[0]; + Pxy_yr[1] = 1.58113883008419*Pxy[7]+1.224744871391589*Pxy[3]+0.7071067811865475*Pxy[1]; + Pxy_yr[2] = 1.58113883008419*Pxy[8]+1.224744871391589*Pxy[6]+0.7071067811865475*Pxy[4]; + Pyy_yr[0] = 1.58113883008419*Pyy[5]+1.224744871391589*Pyy[2]+0.7071067811865475*Pyy[0]; + Pyy_yr[1] = 1.58113883008419*Pyy[7]+1.224744871391589*Pyy[3]+0.7071067811865475*Pyy[1]; + Pyy_yr[2] = 1.58113883008419*Pyy[8]+1.224744871391589*Pyy[6]+0.7071067811865475*Pyy[4]; + Pyz_yr[0] = 1.58113883008419*Pyz[5]+1.224744871391589*Pyz[2]+0.7071067811865475*Pyz[0]; + Pyz_yr[1] = 1.58113883008419*Pyz[7]+1.224744871391589*Pyz[3]+0.7071067811865475*Pyz[1]; + Pyz_yr[2] = 1.58113883008419*Pyz[8]+1.224744871391589*Pyz[6]+0.7071067811865475*Pyz[4]; } diff --git a/kernels/pkpm/pkpm_vars_pressure_3x_ser_p1.c b/kernels/pkpm/pkpm_vars_pressure_3x_ser_p1.c index cbe9617ab..485815420 100644 --- a/kernels/pkpm/pkpm_vars_pressure_3x_ser_p1.c +++ b/kernels/pkpm/pkpm_vars_pressure_3x_ser_p1.c @@ -33,12 +33,6 @@ GKYL_CU_DH void pkpm_vars_pressure_3x_ser_p1(const double *bvar, const double *b double *Pyz = &p_ij[32]; double *Pzz = &p_ij[40]; - const double *bxbx_xl = &bvar_surf[8]; - const double *bxbx_xr = &bvar_surf[12]; - const double *bxby_xl = &bvar_surf[16]; - const double *bxby_xr = &bvar_surf[20]; - const double *bxbz_xl = &bvar_surf[24]; - const double *bxbz_xr = &bvar_surf[28]; double *Pxx_xl = &p_ij_surf[0]; double *Pxx_xr = &p_ij_surf[4]; double *Pxy_xl = &p_ij_surf[8]; @@ -46,12 +40,6 @@ GKYL_CU_DH void pkpm_vars_pressure_3x_ser_p1(const double *bvar, const double *b double *Pxz_xl = &p_ij_surf[16]; double *Pxz_xr = &p_ij_surf[20]; - const double *byby_yl = &bvar_surf[40]; - const double *byby_yr = &bvar_surf[44]; - const double *bxby_yl = &bvar_surf[48]; - const double *bxby_yr = &bvar_surf[52]; - const double *bybz_yl = &bvar_surf[56]; - const double *bybz_yr = &bvar_surf[60]; double *Pxy_yl = &p_ij_surf[24]; double *Pxy_yr = &p_ij_surf[28]; double *Pyy_yl = &p_ij_surf[32]; @@ -59,12 +47,6 @@ GKYL_CU_DH void pkpm_vars_pressure_3x_ser_p1(const double *bvar, const double *b double *Pyz_yl = &p_ij_surf[40]; double *Pyz_yr = &p_ij_surf[44]; - const double *bzbz_zl = &bvar_surf[72]; - const double *bzbz_zr = &bvar_surf[76]; - const double *bxbz_zl = &bvar_surf[80]; - const double *bxbz_zr = &bvar_surf[84]; - const double *bybz_zl = &bvar_surf[88]; - const double *bybz_zr = &bvar_surf[92]; double *Pxz_zl = &p_ij_surf[48]; double *Pxz_zr = &p_ij_surf[52]; double *Pyz_zl = &p_ij_surf[56]; @@ -149,232 +131,82 @@ GKYL_CU_DH void pkpm_vars_pressure_3x_ser_p1(const double *bvar, const double *b Pyz[7] = DP_bybz[7]; Pzz[7] = DP_bzbz[7] + p_perp[7]; - double p_par_xl[4] = {0.0}; - double p_par_xr[4] = {0.0}; - double p_par_yl[4] = {0.0}; - double p_par_yr[4] = {0.0}; - double p_par_zl[4] = {0.0}; - double p_par_zr[4] = {0.0}; - - double p_perp_xl[4] = {0.0}; - double p_perp_xr[4] = {0.0}; - double p_perp_yl[4] = {0.0}; - double p_perp_yr[4] = {0.0}; - double p_perp_zl[4] = {0.0}; - double p_perp_zr[4] = {0.0}; - - p_par_xl[0] = 0.7071067811865475*p_parallel[0]-1.224744871391589*p_parallel[1]; - p_par_xl[1] = 0.7071067811865475*p_parallel[2]-1.224744871391589*p_parallel[4]; - p_par_xl[2] = 0.7071067811865475*p_parallel[3]-1.224744871391589*p_parallel[5]; - p_par_xl[3] = 0.7071067811865475*p_parallel[6]-1.224744871391589*p_parallel[7]; - p_par_xr[0] = 1.224744871391589*p_parallel[1]+0.7071067811865475*p_parallel[0]; - p_par_xr[1] = 1.224744871391589*p_parallel[4]+0.7071067811865475*p_parallel[2]; - p_par_xr[2] = 1.224744871391589*p_parallel[5]+0.7071067811865475*p_parallel[3]; - p_par_xr[3] = 1.224744871391589*p_parallel[7]+0.7071067811865475*p_parallel[6]; - p_perp_xl[0] = 0.7071067811865475*p_perp[0]-1.224744871391589*p_perp[1]; - p_perp_xl[1] = 0.7071067811865475*p_perp[2]-1.224744871391589*p_perp[4]; - p_perp_xl[2] = 0.7071067811865475*p_perp[3]-1.224744871391589*p_perp[5]; - p_perp_xl[3] = 0.7071067811865475*p_perp[6]-1.224744871391589*p_perp[7]; - p_perp_xr[0] = 1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0]; - p_perp_xr[1] = 1.224744871391589*p_perp[4]+0.7071067811865475*p_perp[2]; - p_perp_xr[2] = 1.224744871391589*p_perp[5]+0.7071067811865475*p_perp[3]; - p_perp_xr[3] = 1.224744871391589*p_perp[7]+0.7071067811865475*p_perp[6]; - - p_par_yl[0] = 0.7071067811865475*p_parallel[0]-1.224744871391589*p_parallel[2]; - p_par_yl[1] = 0.7071067811865475*p_parallel[1]-1.224744871391589*p_parallel[4]; - p_par_yl[2] = 0.7071067811865475*p_parallel[3]-1.224744871391589*p_parallel[6]; - p_par_yl[3] = 0.7071067811865475*p_parallel[5]-1.224744871391589*p_parallel[7]; - p_par_yr[0] = 1.224744871391589*p_parallel[2]+0.7071067811865475*p_parallel[0]; - p_par_yr[1] = 1.224744871391589*p_parallel[4]+0.7071067811865475*p_parallel[1]; - p_par_yr[2] = 1.224744871391589*p_parallel[6]+0.7071067811865475*p_parallel[3]; - p_par_yr[3] = 1.224744871391589*p_parallel[7]+0.7071067811865475*p_parallel[5]; - p_perp_yl[0] = 0.7071067811865475*p_perp[0]-1.224744871391589*p_perp[2]; - p_perp_yl[1] = 0.7071067811865475*p_perp[1]-1.224744871391589*p_perp[4]; - p_perp_yl[2] = 0.7071067811865475*p_perp[3]-1.224744871391589*p_perp[6]; - p_perp_yl[3] = 0.7071067811865475*p_perp[5]-1.224744871391589*p_perp[7]; - p_perp_yr[0] = 1.224744871391589*p_perp[2]+0.7071067811865475*p_perp[0]; - p_perp_yr[1] = 1.224744871391589*p_perp[4]+0.7071067811865475*p_perp[1]; - p_perp_yr[2] = 1.224744871391589*p_perp[6]+0.7071067811865475*p_perp[3]; - p_perp_yr[3] = 1.224744871391589*p_perp[7]+0.7071067811865475*p_perp[5]; - - p_par_zl[0] = 0.7071067811865475*p_parallel[0]-1.224744871391589*p_parallel[3]; - p_par_zl[1] = 0.7071067811865475*p_parallel[1]-1.224744871391589*p_parallel[5]; - p_par_zl[2] = 0.7071067811865475*p_parallel[2]-1.224744871391589*p_parallel[6]; - p_par_zl[3] = 0.7071067811865475*p_parallel[4]-1.224744871391589*p_parallel[7]; - p_par_zr[0] = 1.224744871391589*p_parallel[3]+0.7071067811865475*p_parallel[0]; - p_par_zr[1] = 1.224744871391589*p_parallel[5]+0.7071067811865475*p_parallel[1]; - p_par_zr[2] = 1.224744871391589*p_parallel[6]+0.7071067811865475*p_parallel[2]; - p_par_zr[3] = 1.224744871391589*p_parallel[7]+0.7071067811865475*p_parallel[4]; - p_perp_zl[0] = 0.7071067811865475*p_perp[0]-1.224744871391589*p_perp[3]; - p_perp_zl[1] = 0.7071067811865475*p_perp[1]-1.224744871391589*p_perp[5]; - p_perp_zl[2] = 0.7071067811865475*p_perp[2]-1.224744871391589*p_perp[6]; - p_perp_zl[3] = 0.7071067811865475*p_perp[4]-1.224744871391589*p_perp[7]; - p_perp_zr[0] = 1.224744871391589*p_perp[3]+0.7071067811865475*p_perp[0]; - p_perp_zr[1] = 1.224744871391589*p_perp[5]+0.7071067811865475*p_perp[1]; - p_perp_zr[2] = 1.224744871391589*p_perp[6]+0.7071067811865475*p_perp[2]; - p_perp_zr[3] = 1.224744871391589*p_perp[7]+0.7071067811865475*p_perp[4]; - - double DP_xl[4] = {0.0}; - double DP_xr[4] = {0.0}; - double DP_yl[4] = {0.0}; - double DP_yr[4] = {0.0}; - double DP_zl[4] = {0.0}; - double DP_zr[4] = {0.0}; - - DP_xl[0] = p_par_xl[0] - p_perp_xl[0]; - DP_xr[0] = p_par_xr[0] - p_perp_xr[0]; - DP_yl[0] = p_par_yl[0] - p_perp_yl[0]; - DP_yr[0] = p_par_yr[0] - p_perp_yr[0]; - DP_zl[0] = p_par_zl[0] - p_perp_zl[0]; - DP_zr[0] = p_par_zr[0] - p_perp_zr[0]; - DP_xl[1] = p_par_xl[1] - p_perp_xl[1]; - DP_xr[1] = p_par_xr[1] - p_perp_xr[1]; - DP_yl[1] = p_par_yl[1] - p_perp_yl[1]; - DP_yr[1] = p_par_yr[1] - p_perp_yr[1]; - DP_zl[1] = p_par_zl[1] - p_perp_zl[1]; - DP_zr[1] = p_par_zr[1] - p_perp_zr[1]; - DP_xl[2] = p_par_xl[2] - p_perp_xl[2]; - DP_xr[2] = p_par_xr[2] - p_perp_xr[2]; - DP_yl[2] = p_par_yl[2] - p_perp_yl[2]; - DP_yr[2] = p_par_yr[2] - p_perp_yr[2]; - DP_zl[2] = p_par_zl[2] - p_perp_zl[2]; - DP_zr[2] = p_par_zr[2] - p_perp_zr[2]; - DP_xl[3] = p_par_xl[3] - p_perp_xl[3]; - DP_xr[3] = p_par_xr[3] - p_perp_xr[3]; - DP_yl[3] = p_par_yl[3] - p_perp_yl[3]; - DP_yr[3] = p_par_yr[3] - p_perp_yr[3]; - DP_zl[3] = p_par_zl[3] - p_perp_zl[3]; - DP_zr[3] = p_par_zr[3] - p_perp_zr[3]; - // DP b_i b_j at lower x surface. - double DP_bxbx_xl[4] = {0.0}; - double DP_bxby_xl[4] = {0.0}; - double DP_bxbz_xl[4] = {0.0}; - binop_mul_2d_ser_p1(DP_xl, bxbx_xl, DP_bxbx_xl); - binop_mul_2d_ser_p1(DP_xl, bxby_xl, DP_bxby_xl); - binop_mul_2d_ser_p1(DP_xl, bxbz_xl, DP_bxbz_xl); - - // DP b_i b_j at upper x surface. - double DP_bxbx_xr[4] = {0.0}; - double DP_bxby_xr[4] = {0.0}; - double DP_bxbz_xr[4] = {0.0}; - binop_mul_2d_ser_p1(DP_xr, bxbx_xr, DP_bxbx_xr); - binop_mul_2d_ser_p1(DP_xr, bxby_xr, DP_bxby_xr); - binop_mul_2d_ser_p1(DP_xr, bxbz_xr, DP_bxbz_xr); - - // DP b_i b_j at lower y surface. - double DP_bxby_yl[4] = {0.0}; - double DP_byby_yl[4] = {0.0}; - double DP_bybz_yl[4] = {0.0}; - binop_mul_2d_ser_p1(DP_yl, bxby_yl, DP_bxby_yl); - binop_mul_2d_ser_p1(DP_yl, byby_yl, DP_byby_yl); - binop_mul_2d_ser_p1(DP_yl, bybz_yl, DP_bybz_yl); - - // DP b_i b_j at upper y surface. - double DP_bxby_yr[4] = {0.0}; - double DP_byby_yr[4] = {0.0}; - double DP_bybz_yr[4] = {0.0}; - binop_mul_2d_ser_p1(DP_yr, bxby_yr, DP_bxby_yr); - binop_mul_2d_ser_p1(DP_yr, byby_yr, DP_byby_yr); - binop_mul_2d_ser_p1(DP_yr, bybz_yr, DP_bybz_yr); - - // DP b_i b_j at lower z surface. - double DP_bxbz_zl[4] = {0.0}; - double DP_bybz_zl[4] = {0.0}; - double DP_bzbz_zl[4] = {0.0}; - binop_mul_2d_ser_p1(DP_zl, bxbz_zl, DP_bxbz_zl); - binop_mul_2d_ser_p1(DP_zl, bybz_zl, DP_bybz_zl); - binop_mul_2d_ser_p1(DP_zl, bzbz_zl, DP_bzbz_zl); - - // DP b_i b_j at upper z surface. - double DP_bxbz_zr[4] = {0.0}; - double DP_bybz_zr[4] = {0.0}; - double DP_bzbz_zr[4] = {0.0}; - binop_mul_2d_ser_p1(DP_zr, bxbz_zr, DP_bxbz_zr); - binop_mul_2d_ser_p1(DP_zr, bybz_zr, DP_bybz_zr); - binop_mul_2d_ser_p1(DP_zr, bzbz_zr, DP_bzbz_zr); - - Pxx_xl[0] = DP_bxbx_xl[0] + p_perp_xl[0]; - Pxx_xr[0] = DP_bxbx_xr[0] + p_perp_xr[0]; - Pxy_xl[0] = DP_bxby_xl[0]; - Pxy_xr[0] = DP_bxby_xr[0]; - Pxz_xl[0] = DP_bxbz_xl[0]; - Pxz_xr[0] = DP_bxbz_xr[0]; - - Pxy_yl[0] = DP_bxby_yl[0]; - Pxy_yr[0] = DP_bxby_yr[0]; - Pyy_yl[0] = DP_byby_yl[0] + p_perp_yl[0]; - Pyy_yr[0] = DP_byby_yr[0] + p_perp_yr[0]; - Pyz_yl[0] = DP_bybz_yl[0]; - Pyz_yr[0] = DP_bybz_yr[0]; - - Pxz_zl[0] = DP_bxbz_zl[0]; - Pxz_zr[0] = DP_bxbz_zr[0]; - Pyz_zl[0] = DP_bybz_zl[0]; - Pyz_zr[0] = DP_bybz_zr[0]; - Pzz_zl[0] = DP_bzbz_zl[0] + p_perp_zl[0]; - Pzz_zr[0] = DP_bzbz_zr[0] + p_perp_zr[0]; - - Pxx_xl[1] = DP_bxbx_xl[1] + p_perp_xl[1]; - Pxx_xr[1] = DP_bxbx_xr[1] + p_perp_xr[1]; - Pxy_xl[1] = DP_bxby_xl[1]; - Pxy_xr[1] = DP_bxby_xr[1]; - Pxz_xl[1] = DP_bxbz_xl[1]; - Pxz_xr[1] = DP_bxbz_xr[1]; - - Pxy_yl[1] = DP_bxby_yl[1]; - Pxy_yr[1] = DP_bxby_yr[1]; - Pyy_yl[1] = DP_byby_yl[1] + p_perp_yl[1]; - Pyy_yr[1] = DP_byby_yr[1] + p_perp_yr[1]; - Pyz_yl[1] = DP_bybz_yl[1]; - Pyz_yr[1] = DP_bybz_yr[1]; - - Pxz_zl[1] = DP_bxbz_zl[1]; - Pxz_zr[1] = DP_bxbz_zr[1]; - Pyz_zl[1] = DP_bybz_zl[1]; - Pyz_zr[1] = DP_bybz_zr[1]; - Pzz_zl[1] = DP_bzbz_zl[1] + p_perp_zl[1]; - Pzz_zr[1] = DP_bzbz_zr[1] + p_perp_zr[1]; - - Pxx_xl[2] = DP_bxbx_xl[2] + p_perp_xl[2]; - Pxx_xr[2] = DP_bxbx_xr[2] + p_perp_xr[2]; - Pxy_xl[2] = DP_bxby_xl[2]; - Pxy_xr[2] = DP_bxby_xr[2]; - Pxz_xl[2] = DP_bxbz_xl[2]; - Pxz_xr[2] = DP_bxbz_xr[2]; - - Pxy_yl[2] = DP_bxby_yl[2]; - Pxy_yr[2] = DP_bxby_yr[2]; - Pyy_yl[2] = DP_byby_yl[2] + p_perp_yl[2]; - Pyy_yr[2] = DP_byby_yr[2] + p_perp_yr[2]; - Pyz_yl[2] = DP_bybz_yl[2]; - Pyz_yr[2] = DP_bybz_yr[2]; - - Pxz_zl[2] = DP_bxbz_zl[2]; - Pxz_zr[2] = DP_bxbz_zr[2]; - Pyz_zl[2] = DP_bybz_zl[2]; - Pyz_zr[2] = DP_bybz_zr[2]; - Pzz_zl[2] = DP_bzbz_zl[2] + p_perp_zl[2]; - Pzz_zr[2] = DP_bzbz_zr[2] + p_perp_zr[2]; - - Pxx_xl[3] = DP_bxbx_xl[3] + p_perp_xl[3]; - Pxx_xr[3] = DP_bxbx_xr[3] + p_perp_xr[3]; - Pxy_xl[3] = DP_bxby_xl[3]; - Pxy_xr[3] = DP_bxby_xr[3]; - Pxz_xl[3] = DP_bxbz_xl[3]; - Pxz_xr[3] = DP_bxbz_xr[3]; - - Pxy_yl[3] = DP_bxby_yl[3]; - Pxy_yr[3] = DP_bxby_yr[3]; - Pyy_yl[3] = DP_byby_yl[3] + p_perp_yl[3]; - Pyy_yr[3] = DP_byby_yr[3] + p_perp_yr[3]; - Pyz_yl[3] = DP_bybz_yl[3]; - Pyz_yr[3] = DP_bybz_yr[3]; - - Pxz_zl[3] = DP_bxbz_zl[3]; - Pxz_zr[3] = DP_bxbz_zr[3]; - Pyz_zl[3] = DP_bybz_zl[3]; - Pyz_zr[3] = DP_bybz_zr[3]; - Pzz_zl[3] = DP_bzbz_zl[3] + p_perp_zl[3]; - Pzz_zr[3] = DP_bzbz_zr[3] + p_perp_zr[3]; + Pxx_xl[0] = 0.7071067811865475*Pxx[0]-1.224744871391589*Pxx[1]; + Pxx_xl[1] = 0.7071067811865475*Pxx[2]-1.224744871391589*Pxx[4]; + Pxx_xl[2] = 0.7071067811865475*Pxx[3]-1.224744871391589*Pxx[5]; + Pxx_xl[3] = 0.7071067811865475*Pxx[6]-1.224744871391589*Pxx[7]; + Pxy_xl[0] = 0.7071067811865475*Pxy[0]-1.224744871391589*Pxy[1]; + Pxy_xl[1] = 0.7071067811865475*Pxy[2]-1.224744871391589*Pxy[4]; + Pxy_xl[2] = 0.7071067811865475*Pxy[3]-1.224744871391589*Pxy[5]; + Pxy_xl[3] = 0.7071067811865475*Pxy[6]-1.224744871391589*Pxy[7]; + Pxz_xl[0] = 0.7071067811865475*Pxz[0]-1.224744871391589*Pxz[1]; + Pxz_xl[1] = 0.7071067811865475*Pxz[2]-1.224744871391589*Pxz[4]; + Pxz_xl[2] = 0.7071067811865475*Pxz[3]-1.224744871391589*Pxz[5]; + Pxz_xl[3] = 0.7071067811865475*Pxz[6]-1.224744871391589*Pxz[7]; + + Pxx_xr[0] = 1.224744871391589*Pxx[1]+0.7071067811865475*Pxx[0]; + Pxx_xr[1] = 1.224744871391589*Pxx[4]+0.7071067811865475*Pxx[2]; + Pxx_xr[2] = 1.224744871391589*Pxx[5]+0.7071067811865475*Pxx[3]; + Pxx_xr[3] = 1.224744871391589*Pxx[7]+0.7071067811865475*Pxx[6]; + Pxy_xr[0] = 1.224744871391589*Pxy[1]+0.7071067811865475*Pxy[0]; + Pxy_xr[1] = 1.224744871391589*Pxy[4]+0.7071067811865475*Pxy[2]; + Pxy_xr[2] = 1.224744871391589*Pxy[5]+0.7071067811865475*Pxy[3]; + Pxy_xr[3] = 1.224744871391589*Pxy[7]+0.7071067811865475*Pxy[6]; + Pxz_xr[0] = 1.224744871391589*Pxz[1]+0.7071067811865475*Pxz[0]; + Pxz_xr[1] = 1.224744871391589*Pxz[4]+0.7071067811865475*Pxz[2]; + Pxz_xr[2] = 1.224744871391589*Pxz[5]+0.7071067811865475*Pxz[3]; + Pxz_xr[3] = 1.224744871391589*Pxz[7]+0.7071067811865475*Pxz[6]; + + Pxy_yl[0] = 0.7071067811865475*Pxy[0]-1.224744871391589*Pxy[2]; + Pxy_yl[1] = 0.7071067811865475*Pxy[1]-1.224744871391589*Pxy[4]; + Pxy_yl[2] = 0.7071067811865475*Pxy[3]-1.224744871391589*Pxy[6]; + Pxy_yl[3] = 0.7071067811865475*Pxy[5]-1.224744871391589*Pxy[7]; + Pyy_yl[0] = 0.7071067811865475*Pyy[0]-1.224744871391589*Pyy[2]; + Pyy_yl[1] = 0.7071067811865475*Pyy[1]-1.224744871391589*Pyy[4]; + Pyy_yl[2] = 0.7071067811865475*Pyy[3]-1.224744871391589*Pyy[6]; + Pyy_yl[3] = 0.7071067811865475*Pyy[5]-1.224744871391589*Pyy[7]; + Pyz_yl[0] = 0.7071067811865475*Pyz[0]-1.224744871391589*Pyz[2]; + Pyz_yl[1] = 0.7071067811865475*Pyz[1]-1.224744871391589*Pyz[4]; + Pyz_yl[2] = 0.7071067811865475*Pyz[3]-1.224744871391589*Pyz[6]; + Pyz_yl[3] = 0.7071067811865475*Pyz[5]-1.224744871391589*Pyz[7]; + + Pxy_yr[0] = 1.224744871391589*Pxy[2]+0.7071067811865475*Pxy[0]; + Pxy_yr[1] = 1.224744871391589*Pxy[4]+0.7071067811865475*Pxy[1]; + Pxy_yr[2] = 1.224744871391589*Pxy[6]+0.7071067811865475*Pxy[3]; + Pxy_yr[3] = 1.224744871391589*Pxy[7]+0.7071067811865475*Pxy[5]; + Pyy_yr[0] = 1.224744871391589*Pyy[2]+0.7071067811865475*Pyy[0]; + Pyy_yr[1] = 1.224744871391589*Pyy[4]+0.7071067811865475*Pyy[1]; + Pyy_yr[2] = 1.224744871391589*Pyy[6]+0.7071067811865475*Pyy[3]; + Pyy_yr[3] = 1.224744871391589*Pyy[7]+0.7071067811865475*Pyy[5]; + Pyz_yr[0] = 1.224744871391589*Pyz[2]+0.7071067811865475*Pyz[0]; + Pyz_yr[1] = 1.224744871391589*Pyz[4]+0.7071067811865475*Pyz[1]; + Pyz_yr[2] = 1.224744871391589*Pyz[6]+0.7071067811865475*Pyz[3]; + Pyz_yr[3] = 1.224744871391589*Pyz[7]+0.7071067811865475*Pyz[5]; + + Pxz_zl[0] = 0.7071067811865475*Pxz[0]-1.224744871391589*Pxz[3]; + Pxz_zl[1] = 0.7071067811865475*Pxz[1]-1.224744871391589*Pxz[5]; + Pxz_zl[2] = 0.7071067811865475*Pxz[2]-1.224744871391589*Pxz[6]; + Pxz_zl[3] = 0.7071067811865475*Pxz[4]-1.224744871391589*Pxz[7]; + Pyz_zl[0] = 0.7071067811865475*Pyz[0]-1.224744871391589*Pyz[3]; + Pyz_zl[1] = 0.7071067811865475*Pyz[1]-1.224744871391589*Pyz[5]; + Pyz_zl[2] = 0.7071067811865475*Pyz[2]-1.224744871391589*Pyz[6]; + Pyz_zl[3] = 0.7071067811865475*Pyz[4]-1.224744871391589*Pyz[7]; + Pzz_zl[0] = 0.7071067811865475*Pzz[0]-1.224744871391589*Pzz[3]; + Pzz_zl[1] = 0.7071067811865475*Pzz[1]-1.224744871391589*Pzz[5]; + Pzz_zl[2] = 0.7071067811865475*Pzz[2]-1.224744871391589*Pzz[6]; + Pzz_zl[3] = 0.7071067811865475*Pzz[4]-1.224744871391589*Pzz[7]; + + Pxz_zr[0] = 1.224744871391589*Pxz[3]+0.7071067811865475*Pxz[0]; + Pxz_zr[1] = 1.224744871391589*Pxz[5]+0.7071067811865475*Pxz[1]; + Pxz_zr[2] = 1.224744871391589*Pxz[6]+0.7071067811865475*Pxz[2]; + Pxz_zr[3] = 1.224744871391589*Pxz[7]+0.7071067811865475*Pxz[4]; + Pyz_zr[0] = 1.224744871391589*Pyz[3]+0.7071067811865475*Pyz[0]; + Pyz_zr[1] = 1.224744871391589*Pyz[5]+0.7071067811865475*Pyz[1]; + Pyz_zr[2] = 1.224744871391589*Pyz[6]+0.7071067811865475*Pyz[2]; + Pyz_zr[3] = 1.224744871391589*Pyz[7]+0.7071067811865475*Pyz[4]; + Pzz_zr[0] = 1.224744871391589*Pzz[3]+0.7071067811865475*Pzz[0]; + Pzz_zr[1] = 1.224744871391589*Pzz[5]+0.7071067811865475*Pzz[1]; + Pzz_zr[2] = 1.224744871391589*Pzz[6]+0.7071067811865475*Pzz[2]; + Pzz_zr[3] = 1.224744871391589*Pzz[7]+0.7071067811865475*Pzz[4]; } diff --git a/kernels/pkpm/pkpm_vars_set_1x_ser_p1.c b/kernels/pkpm/pkpm_vars_set_1x_ser_p1.c index d58cfbae3..ef6c3ae31 100644 --- a/kernels/pkpm/pkpm_vars_set_1x_ser_p1.c +++ b/kernels/pkpm/pkpm_vars_set_1x_ser_p1.c @@ -3,13 +3,15 @@ #include #include GKYL_CU_DH int pkpm_vars_set_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar) + const double *vlasov_pkpm_moms, const double *euler_pkpm, + const double *p_ij, const double *pkpm_div_ppar) { // count: integer to indicate which matrix being fetched. // A: preallocated LHS matrix. // rhs: preallocated RHS vector. // vlasov_pkpm_moms: [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. // euler_pkpm: [rho ux, rho uy, rho uz], Fluid input state vector. + // p_ij: p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. // pkpm_div_ppar: div(p_par b) computed from kinetic equation for consistency. // For poly_order = 1, we can analytically invert the matrix and just store the solution @@ -19,6 +21,9 @@ GKYL_CU_DH int pkpm_vars_set_1x_ser_p1(int count, struct gkyl_nmat *A, struct gk struct gkyl_mat rhs_pkpm_div_ppar = gkyl_nmat_get(rhs, count+3); struct gkyl_mat rhs_T_perp_over_m = gkyl_nmat_get(rhs, count+4); struct gkyl_mat rhs_T_perp_over_m_inv = gkyl_nmat_get(rhs, count+5); + struct gkyl_mat rhs_Txx = gkyl_nmat_get(rhs, count+6); + struct gkyl_mat rhs_Tyy = gkyl_nmat_get(rhs, count+7); + struct gkyl_mat rhs_Tzz = gkyl_nmat_get(rhs, count+8); // Clear rhs for each component of primitive variables being solved for gkyl_mat_clear(&rhs_ux, 0.0); gkyl_mat_clear(&rhs_uy, 0.0); @@ -26,28 +31,32 @@ GKYL_CU_DH int pkpm_vars_set_1x_ser_p1(int count, struct gkyl_nmat *A, struct gk gkyl_mat_clear(&rhs_pkpm_div_ppar, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m_inv, 0.0); + gkyl_mat_clear(&rhs_Txx, 0.0); + gkyl_mat_clear(&rhs_Tyy, 0.0); + gkyl_mat_clear(&rhs_Tzz, 0.0); const double *rhoux = &euler_pkpm[0]; const double *rhouy = &euler_pkpm[2]; const double *rhouz = &euler_pkpm[4]; const double *rho = &vlasov_pkpm_moms[0]; + const double *p_par = &vlasov_pkpm_moms[2]; const double *p_perp = &vlasov_pkpm_moms[4]; + const double *Pxx = &p_ij[0]; + const double *Pyy = &p_ij[6]; + const double *Pzz = &p_ij[10]; + int cell_avg = 0; // Check if rho, p_par, or p_perp < 0 at control points. + // *THIS IS ONLY A CHECK RIGHT NOW AND UNUSED* if (0.7071067811865475*rho[0]-1.224744871391589*rho[1] < 0.0) cell_avg = 1; + if (0.7071067811865475*p_par[0]-1.224744871391589*p_par[1] < 0.0) cell_avg = 1; if (0.7071067811865475*p_perp[0]-1.224744871391589*p_perp[1] < 0.0) cell_avg = 1; if (1.224744871391589*rho[1]+0.7071067811865475*rho[0] < 0.0) cell_avg = 1; + if (1.224744871391589*p_par[1]+0.7071067811865475*p_par[0] < 0.0) cell_avg = 1; if (1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0] < 0.0) cell_avg = 1; double rho_inv[2] = {0.0}; double p_perp_inv[2] = {0.0}; - if (cell_avg) { - // If rho or p_perp < 0 at control points, only use cell average. - rho_inv[0] = 2.0/rho[0]; - p_perp_inv[0] = 2.0/p_perp[0]; - } else { ser_1x_p1_inv(rho, rho_inv); ser_1x_p1_inv(p_perp, p_perp_inv); - } - // Calculate expansions of primitive variables, which can be calculated free of aliasing errors. double ux[2] = {0.0}; double uy[2] = {0.0}; @@ -55,6 +64,9 @@ GKYL_CU_DH int pkpm_vars_set_1x_ser_p1(int count, struct gkyl_nmat *A, struct gk double p_force[2] = {0.0}; double T_perp_over_m[2] = {0.0}; double T_perp_over_m_inv[2] = {0.0}; + double Txx[2] = {0.0}; + double Tyy[2] = {0.0}; + double Tzz[2] = {0.0}; binop_mul_1d_ser_p1(rho_inv, rhoux, ux); binop_mul_1d_ser_p1(rho_inv, rhouy, uy); @@ -62,34 +74,28 @@ GKYL_CU_DH int pkpm_vars_set_1x_ser_p1(int count, struct gkyl_nmat *A, struct gk binop_mul_1d_ser_p1(rho_inv, pkpm_div_ppar, p_force); binop_mul_1d_ser_p1(rho_inv, p_perp, T_perp_over_m); binop_mul_1d_ser_p1(p_perp_inv, rho, T_perp_over_m_inv); + binop_mul_1d_ser_p1(rho_inv, Pxx, Txx); + binop_mul_1d_ser_p1(rho_inv, Pyy, Tyy); + binop_mul_1d_ser_p1(rho_inv, Pzz, Tzz); - if (cell_avg) { - gkyl_mat_set(&rhs_ux,0,0,ux[0]); - gkyl_mat_set(&rhs_uy,0,0,uy[0]); - gkyl_mat_set(&rhs_uz,0,0,uz[0]); - gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,p_force[0]); - gkyl_mat_set(&rhs_T_perp_over_m,0,0,T_perp_over_m[0]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,T_perp_over_m_inv[0]); - gkyl_mat_set(&rhs_ux,1,0,0.0); - gkyl_mat_set(&rhs_uy,1,0,0.0); - gkyl_mat_set(&rhs_uz,1,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,0.0); - } else { gkyl_mat_set(&rhs_ux,0,0,ux[0]); gkyl_mat_set(&rhs_uy,0,0,uy[0]); gkyl_mat_set(&rhs_uz,0,0,uz[0]); gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,p_force[0]); gkyl_mat_set(&rhs_T_perp_over_m,0,0,T_perp_over_m[0]); gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,T_perp_over_m_inv[0]); + gkyl_mat_set(&rhs_Txx,0,0,Txx[0]); + gkyl_mat_set(&rhs_Tyy,0,0,Tyy[0]); + gkyl_mat_set(&rhs_Tzz,0,0,Tzz[0]); gkyl_mat_set(&rhs_ux,1,0,ux[1]); gkyl_mat_set(&rhs_uy,1,0,uy[1]); gkyl_mat_set(&rhs_uz,1,0,uz[1]); gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,p_force[1]); gkyl_mat_set(&rhs_T_perp_over_m,1,0,T_perp_over_m[1]); gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,T_perp_over_m_inv[1]); - } + gkyl_mat_set(&rhs_Txx,1,0,Txx[1]); + gkyl_mat_set(&rhs_Tyy,1,0,Tyy[1]); + gkyl_mat_set(&rhs_Tzz,1,0,Tzz[1]); return cell_avg; } diff --git a/kernels/pkpm/pkpm_vars_set_1x_ser_p2.c b/kernels/pkpm/pkpm_vars_set_1x_ser_p2.c index 5733dd297..aae53a83f 100644 --- a/kernels/pkpm/pkpm_vars_set_1x_ser_p2.c +++ b/kernels/pkpm/pkpm_vars_set_1x_ser_p2.c @@ -1,13 +1,15 @@ #include #include GKYL_CU_DH int pkpm_vars_set_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar) + const double *vlasov_pkpm_moms, const double *euler_pkpm, + const double *p_ij, const double *pkpm_div_ppar) { // count: integer to indicate which matrix being fetched. // A: preallocated LHS matrix. // rhs: preallocated RHS vector. // vlasov_pkpm_moms: [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. // euler_pkpm: [rho ux, rho uy, rho uz], Fluid input state vector. + // p_ij: p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. // pkpm_div_ppar: div(p_par b) computed from kinetic equation for consistency. struct gkyl_mat A_ux = gkyl_nmat_get(A, count); @@ -16,12 +18,18 @@ GKYL_CU_DH int pkpm_vars_set_1x_ser_p2(int count, struct gkyl_nmat *A, struct gk struct gkyl_mat A_pkpm_div_ppar = gkyl_nmat_get(A, count+3); struct gkyl_mat A_T_perp_over_m = gkyl_nmat_get(A, count+4); struct gkyl_mat A_T_perp_over_m_inv = gkyl_nmat_get(A, count+5); + struct gkyl_mat A_Txx = gkyl_nmat_get(A, count+6); + struct gkyl_mat A_Tyy = gkyl_nmat_get(A, count+7); + struct gkyl_mat A_Tzz = gkyl_nmat_get(A, count+8); struct gkyl_mat rhs_ux = gkyl_nmat_get(rhs, count); struct gkyl_mat rhs_uy = gkyl_nmat_get(rhs, count+1); struct gkyl_mat rhs_uz = gkyl_nmat_get(rhs, count+2); struct gkyl_mat rhs_pkpm_div_ppar = gkyl_nmat_get(rhs, count+3); struct gkyl_mat rhs_T_perp_over_m = gkyl_nmat_get(rhs, count+4); struct gkyl_mat rhs_T_perp_over_m_inv = gkyl_nmat_get(rhs, count+5); + struct gkyl_mat rhs_Txx = gkyl_nmat_get(rhs, count+6); + struct gkyl_mat rhs_Tyy = gkyl_nmat_get(rhs, count+7); + struct gkyl_mat rhs_Tzz = gkyl_nmat_get(rhs, count+8); // Clear matrix and rhs for each component of primitive variables being solved for gkyl_mat_clear(&A_ux, 0.0); gkyl_mat_clear(&rhs_ux, 0.0); gkyl_mat_clear(&A_uy, 0.0); gkyl_mat_clear(&rhs_uy, 0.0); @@ -29,164 +37,178 @@ GKYL_CU_DH int pkpm_vars_set_1x_ser_p2(int count, struct gkyl_nmat *A, struct gk gkyl_mat_clear(&A_pkpm_div_ppar, 0.0); gkyl_mat_clear(&rhs_pkpm_div_ppar, 0.0); gkyl_mat_clear(&A_T_perp_over_m, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m, 0.0); gkyl_mat_clear(&A_T_perp_over_m_inv, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m_inv, 0.0); + gkyl_mat_clear(&A_Txx, 0.0); gkyl_mat_clear(&rhs_Txx, 0.0); + gkyl_mat_clear(&A_Tyy, 0.0); gkyl_mat_clear(&rhs_Tyy, 0.0); + gkyl_mat_clear(&A_Tzz, 0.0); gkyl_mat_clear(&rhs_Tzz, 0.0); const double *rhoux = &euler_pkpm[0]; const double *rhouy = &euler_pkpm[3]; const double *rhouz = &euler_pkpm[6]; const double *rho = &vlasov_pkpm_moms[0]; + const double *p_par = &vlasov_pkpm_moms[3]; const double *p_perp = &vlasov_pkpm_moms[6]; + const double *Pxx = &p_ij[0]; + const double *Pyy = &p_ij[9]; + const double *Pzz = &p_ij[15]; + int cell_avg = 0; // Check if rho, p_par, or p_perp < 0 at control points. + // *THIS IS ONLY A CHECK RIGHT NOW AND UNUSED* if (1.58113883008419*rho[2]-1.224744871391589*rho[1]+0.7071067811865475*rho[0] < 0.0) cell_avg = 1; + if (1.58113883008419*p_par[2]-1.224744871391589*p_par[1]+0.7071067811865475*p_par[0] < 0.0) cell_avg = 1; if (1.58113883008419*p_perp[2]-1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0] < 0.0) cell_avg = 1; if (0.7071067811865475*rho[0]-0.7905694150420947*rho[2] < 0.0) cell_avg = 1; + if (0.7071067811865475*p_par[0]-0.7905694150420947*p_par[2] < 0.0) cell_avg = 1; if (0.7071067811865475*p_perp[0]-0.7905694150420947*p_perp[2] < 0.0) cell_avg = 1; if (1.58113883008419*rho[2]+1.224744871391589*rho[1]+0.7071067811865475*rho[0] < 0.0) cell_avg = 1; + if (1.58113883008419*p_par[2]+1.224744871391589*p_par[1]+0.7071067811865475*p_par[0] < 0.0) cell_avg = 1; if (1.58113883008419*p_perp[2]+1.224744871391589*p_perp[1]+0.7071067811865475*p_perp[0] < 0.0) cell_avg = 1; - double rho_temp[3] = {0.0}; - double p_perp_temp[3] = {0.0}; - if (cell_avg) { - rho_temp[0] = rho[0]; - p_perp_temp[0] = p_perp[0]; - } else { - rho_temp[0] = rho[0]; - p_perp_temp[0] = p_perp[0]; - rho_temp[1] = rho[1]; - p_perp_temp[1] = p_perp[1]; - rho_temp[2] = rho[2]; - p_perp_temp[2] = p_perp[2]; - } - - if (cell_avg) { - gkyl_mat_set(&rhs_ux,0,0,rhoux[0]); - gkyl_mat_set(&rhs_uy,0,0,rhouy[0]); - gkyl_mat_set(&rhs_uz,0,0,rhouz[0]); - gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,pkpm_div_ppar[0]); - gkyl_mat_set(&rhs_T_perp_over_m,0,0,p_perp[0]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,rho[0]); - gkyl_mat_set(&rhs_ux,1,0,0.0); - gkyl_mat_set(&rhs_uy,1,0,0.0); - gkyl_mat_set(&rhs_uz,1,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,0.0); - gkyl_mat_set(&rhs_ux,2,0,0.0); - gkyl_mat_set(&rhs_uy,2,0,0.0); - gkyl_mat_set(&rhs_uz,2,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,2,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,0.0); - } else { - gkyl_mat_set(&rhs_ux,0,0,rhoux[0]); - gkyl_mat_set(&rhs_uy,0,0,rhouy[0]); - gkyl_mat_set(&rhs_uz,0,0,rhouz[0]); - gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,pkpm_div_ppar[0]); - gkyl_mat_set(&rhs_T_perp_over_m,0,0,p_perp[0]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,rho[0]); - gkyl_mat_set(&rhs_ux,1,0,rhoux[1]); - gkyl_mat_set(&rhs_uy,1,0,rhouy[1]); - gkyl_mat_set(&rhs_uz,1,0,rhouz[1]); - gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,pkpm_div_ppar[1]); - gkyl_mat_set(&rhs_T_perp_over_m,1,0,p_perp[1]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,rho[1]); - gkyl_mat_set(&rhs_ux,2,0,rhoux[2]); - gkyl_mat_set(&rhs_uy,2,0,rhouy[2]); - gkyl_mat_set(&rhs_uz,2,0,rhouz[2]); - gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,pkpm_div_ppar[2]); - gkyl_mat_set(&rhs_T_perp_over_m,2,0,p_perp[2]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,rho[2]); - } + + gkyl_mat_set(&rhs_ux,0,0,rhoux[0]); + gkyl_mat_set(&rhs_uy,0,0,rhouy[0]); + gkyl_mat_set(&rhs_uz,0,0,rhouz[0]); + gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,pkpm_div_ppar[0]); + gkyl_mat_set(&rhs_T_perp_over_m,0,0,p_perp[0]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,rho[0]); + gkyl_mat_set(&rhs_Txx,0,0,Pxx[0]); + gkyl_mat_set(&rhs_Tyy,0,0,Pyy[0]); + gkyl_mat_set(&rhs_Tzz,0,0,Pzz[0]); + gkyl_mat_set(&rhs_ux,1,0,rhoux[1]); + gkyl_mat_set(&rhs_uy,1,0,rhouy[1]); + gkyl_mat_set(&rhs_uz,1,0,rhouz[1]); + gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,pkpm_div_ppar[1]); + gkyl_mat_set(&rhs_T_perp_over_m,1,0,p_perp[1]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,rho[1]); + gkyl_mat_set(&rhs_Txx,1,0,Pxx[1]); + gkyl_mat_set(&rhs_Tyy,1,0,Pyy[1]); + gkyl_mat_set(&rhs_Tzz,1,0,Pzz[1]); + gkyl_mat_set(&rhs_ux,2,0,rhoux[2]); + gkyl_mat_set(&rhs_uy,2,0,rhouy[2]); + gkyl_mat_set(&rhs_uz,2,0,rhouz[2]); + gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,pkpm_div_ppar[2]); + gkyl_mat_set(&rhs_T_perp_over_m,2,0,p_perp[2]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,rho[2]); + gkyl_mat_set(&rhs_Txx,2,0,Pxx[2]); + gkyl_mat_set(&rhs_Tyy,2,0,Pyy[2]); + gkyl_mat_set(&rhs_Tzz,2,0,Pzz[2]); double temp_rho = 0.0; double temp_p_perp = 0.0; - temp_rho = 0.7071067811865475*rho_temp[0]; + temp_rho = 0.7071067811865475*rho[0]; gkyl_mat_set(&A_ux,0,0,temp_rho); gkyl_mat_set(&A_uy,0,0,temp_rho); gkyl_mat_set(&A_uz,0,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,0,temp_rho); - - temp_p_perp = 0.7071067811865475*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,0,0,temp_rho); + gkyl_mat_set(&A_Tyy,0,0,temp_rho); + gkyl_mat_set(&A_Tzz,0,0,temp_rho); + + temp_p_perp = 0.7071067811865475*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,0,0,temp_p_perp); - - temp_rho = 0.7071067811865475*rho_temp[1]; + + temp_rho = 0.7071067811865475*rho[1]; gkyl_mat_set(&A_ux,0,1,temp_rho); gkyl_mat_set(&A_uy,0,1,temp_rho); gkyl_mat_set(&A_uz,0,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,1,temp_rho); - - temp_p_perp = 0.7071067811865475*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,0,1,temp_rho); + gkyl_mat_set(&A_Tyy,0,1,temp_rho); + gkyl_mat_set(&A_Tzz,0,1,temp_rho); + + temp_p_perp = 0.7071067811865475*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,0,1,temp_p_perp); - - temp_rho = 0.7071067811865475*rho_temp[2]; + + temp_rho = 0.7071067811865475*rho[2]; gkyl_mat_set(&A_ux,0,2,temp_rho); gkyl_mat_set(&A_uy,0,2,temp_rho); gkyl_mat_set(&A_uz,0,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,2,temp_rho); - - temp_p_perp = 0.7071067811865475*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,0,2,temp_rho); + gkyl_mat_set(&A_Tyy,0,2,temp_rho); + gkyl_mat_set(&A_Tzz,0,2,temp_rho); + + temp_p_perp = 0.7071067811865475*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,0,2,temp_p_perp); - - temp_rho = 0.7071067811865475*rho_temp[1]; + + temp_rho = 0.7071067811865475*rho[1]; gkyl_mat_set(&A_ux,1,0,temp_rho); gkyl_mat_set(&A_uy,1,0,temp_rho); gkyl_mat_set(&A_uz,1,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,0,temp_rho); - - temp_p_perp = 0.7071067811865475*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,1,0,temp_rho); + gkyl_mat_set(&A_Tyy,1,0,temp_rho); + gkyl_mat_set(&A_Tzz,1,0,temp_rho); + + temp_p_perp = 0.7071067811865475*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,1,0,temp_p_perp); - - temp_rho = 0.6324555320336759*rho_temp[2]+0.7071067811865475*rho_temp[0]; + + temp_rho = 0.6324555320336759*rho[2]+0.7071067811865475*rho[0]; gkyl_mat_set(&A_ux,1,1,temp_rho); gkyl_mat_set(&A_uy,1,1,temp_rho); gkyl_mat_set(&A_uz,1,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,1,temp_rho); - - temp_p_perp = 0.6324555320336759*p_perp_temp[2]+0.7071067811865475*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,1,1,temp_rho); + gkyl_mat_set(&A_Tyy,1,1,temp_rho); + gkyl_mat_set(&A_Tzz,1,1,temp_rho); + + temp_p_perp = 0.6324555320336759*p_perp[2]+0.7071067811865475*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,1,1,temp_p_perp); - - temp_rho = 0.6324555320336759*rho_temp[1]; + + temp_rho = 0.6324555320336759*rho[1]; gkyl_mat_set(&A_ux,1,2,temp_rho); gkyl_mat_set(&A_uy,1,2,temp_rho); gkyl_mat_set(&A_uz,1,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,2,temp_rho); - - temp_p_perp = 0.6324555320336759*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,1,2,temp_rho); + gkyl_mat_set(&A_Tyy,1,2,temp_rho); + gkyl_mat_set(&A_Tzz,1,2,temp_rho); + + temp_p_perp = 0.6324555320336759*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,1,2,temp_p_perp); - - temp_rho = 0.7071067811865475*rho_temp[2]; + + temp_rho = 0.7071067811865475*rho[2]; gkyl_mat_set(&A_ux,2,0,temp_rho); gkyl_mat_set(&A_uy,2,0,temp_rho); gkyl_mat_set(&A_uz,2,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,0,temp_rho); - - temp_p_perp = 0.7071067811865475*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,2,0,temp_rho); + gkyl_mat_set(&A_Tyy,2,0,temp_rho); + gkyl_mat_set(&A_Tzz,2,0,temp_rho); + + temp_p_perp = 0.7071067811865475*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,2,0,temp_p_perp); - - temp_rho = 0.6324555320336759*rho_temp[1]; + + temp_rho = 0.6324555320336759*rho[1]; gkyl_mat_set(&A_ux,2,1,temp_rho); gkyl_mat_set(&A_uy,2,1,temp_rho); gkyl_mat_set(&A_uz,2,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,1,temp_rho); - - temp_p_perp = 0.6324555320336759*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,2,1,temp_rho); + gkyl_mat_set(&A_Tyy,2,1,temp_rho); + gkyl_mat_set(&A_Tzz,2,1,temp_rho); + + temp_p_perp = 0.6324555320336759*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,2,1,temp_p_perp); - - temp_rho = 0.4517539514526256*rho_temp[2]+0.7071067811865475*rho_temp[0]; + + temp_rho = 0.4517539514526256*rho[2]+0.7071067811865475*rho[0]; gkyl_mat_set(&A_ux,2,2,temp_rho); gkyl_mat_set(&A_uy,2,2,temp_rho); gkyl_mat_set(&A_uz,2,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,2,temp_rho); - - temp_p_perp = 0.4517539514526256*p_perp_temp[2]+0.7071067811865475*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,2,2,temp_rho); + gkyl_mat_set(&A_Tyy,2,2,temp_rho); + gkyl_mat_set(&A_Tzz,2,2,temp_rho); + + temp_p_perp = 0.4517539514526256*p_perp[2]+0.7071067811865475*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,2,2,temp_p_perp); - + return cell_avg; } diff --git a/kernels/pkpm/pkpm_vars_set_2x_ser_p1.c b/kernels/pkpm/pkpm_vars_set_2x_ser_p1.c index 76c7de169..cac597d75 100644 --- a/kernels/pkpm/pkpm_vars_set_2x_ser_p1.c +++ b/kernels/pkpm/pkpm_vars_set_2x_ser_p1.c @@ -3,13 +3,15 @@ #include #include GKYL_CU_DH int pkpm_vars_set_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar) + const double *vlasov_pkpm_moms, const double *euler_pkpm, + const double *p_ij, const double *pkpm_div_ppar) { // count: integer to indicate which matrix being fetched. // A: preallocated LHS matrix. // rhs: preallocated RHS vector. // vlasov_pkpm_moms: [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. // euler_pkpm: [rho ux, rho uy, rho uz], Fluid input state vector. + // p_ij: p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. // pkpm_div_ppar: div(p_par b) computed from kinetic equation for consistency. // For poly_order = 1, we can analytically invert the matrix and just store the solution @@ -19,6 +21,9 @@ GKYL_CU_DH int pkpm_vars_set_2x_ser_p1(int count, struct gkyl_nmat *A, struct gk struct gkyl_mat rhs_pkpm_div_ppar = gkyl_nmat_get(rhs, count+3); struct gkyl_mat rhs_T_perp_over_m = gkyl_nmat_get(rhs, count+4); struct gkyl_mat rhs_T_perp_over_m_inv = gkyl_nmat_get(rhs, count+5); + struct gkyl_mat rhs_Txx = gkyl_nmat_get(rhs, count+6); + struct gkyl_mat rhs_Tyy = gkyl_nmat_get(rhs, count+7); + struct gkyl_mat rhs_Tzz = gkyl_nmat_get(rhs, count+8); // Clear rhs for each component of primitive variables being solved for gkyl_mat_clear(&rhs_ux, 0.0); gkyl_mat_clear(&rhs_uy, 0.0); @@ -26,32 +31,38 @@ GKYL_CU_DH int pkpm_vars_set_2x_ser_p1(int count, struct gkyl_nmat *A, struct gk gkyl_mat_clear(&rhs_pkpm_div_ppar, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m_inv, 0.0); + gkyl_mat_clear(&rhs_Txx, 0.0); + gkyl_mat_clear(&rhs_Tyy, 0.0); + gkyl_mat_clear(&rhs_Tzz, 0.0); const double *rhoux = &euler_pkpm[0]; const double *rhouy = &euler_pkpm[4]; const double *rhouz = &euler_pkpm[8]; const double *rho = &vlasov_pkpm_moms[0]; + const double *p_par = &vlasov_pkpm_moms[4]; const double *p_perp = &vlasov_pkpm_moms[8]; + const double *Pxx = &p_ij[0]; + const double *Pyy = &p_ij[12]; + const double *Pzz = &p_ij[20]; + int cell_avg = 0; // Check if rho, p_par, or p_perp < 0 at control points. + // *THIS IS ONLY A CHECK RIGHT NOW AND UNUSED* if (1.5*rho[3]-0.8660254037844386*rho[2]-0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if (1.5*p_par[3]-0.8660254037844386*p_par[2]-0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if (1.5*p_perp[3]-0.8660254037844386*p_perp[2]-0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; if ((-1.5*rho[3])-0.8660254037844386*rho[2]+0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if ((-1.5*p_par[3])-0.8660254037844386*p_par[2]+0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if ((-1.5*p_perp[3])-0.8660254037844386*p_perp[2]+0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; if ((-1.5*rho[3])+0.8660254037844386*rho[2]-0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if ((-1.5*p_par[3])+0.8660254037844386*p_par[2]-0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if ((-1.5*p_perp[3])+0.8660254037844386*p_perp[2]-0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; if (1.5*rho[3]+0.8660254037844386*rho[2]+0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if (1.5*p_par[3]+0.8660254037844386*p_par[2]+0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if (1.5*p_perp[3]+0.8660254037844386*p_perp[2]+0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; double rho_inv[4] = {0.0}; double p_perp_inv[4] = {0.0}; - if (cell_avg) { - // If rho or p_perp < 0 at control points, only use cell average. - rho_inv[0] = 4.0/rho[0]; - p_perp_inv[0] = 4.0/p_perp[0]; - } else { ser_2x_p1_inv(rho, rho_inv); ser_2x_p1_inv(p_perp, p_perp_inv); - } - // Calculate expansions of primitive variables, which can be calculated free of aliasing errors. double ux[4] = {0.0}; double uy[4] = {0.0}; @@ -59,6 +70,9 @@ GKYL_CU_DH int pkpm_vars_set_2x_ser_p1(int count, struct gkyl_nmat *A, struct gk double p_force[4] = {0.0}; double T_perp_over_m[4] = {0.0}; double T_perp_over_m_inv[4] = {0.0}; + double Txx[4] = {0.0}; + double Tyy[4] = {0.0}; + double Tzz[4] = {0.0}; binop_mul_2d_ser_p1(rho_inv, rhoux, ux); binop_mul_2d_ser_p1(rho_inv, rhouy, uy); @@ -66,58 +80,46 @@ GKYL_CU_DH int pkpm_vars_set_2x_ser_p1(int count, struct gkyl_nmat *A, struct gk binop_mul_2d_ser_p1(rho_inv, pkpm_div_ppar, p_force); binop_mul_2d_ser_p1(rho_inv, p_perp, T_perp_over_m); binop_mul_2d_ser_p1(p_perp_inv, rho, T_perp_over_m_inv); + binop_mul_2d_ser_p1(rho_inv, Pxx, Txx); + binop_mul_2d_ser_p1(rho_inv, Pyy, Tyy); + binop_mul_2d_ser_p1(rho_inv, Pzz, Tzz); - if (cell_avg) { - gkyl_mat_set(&rhs_ux,0,0,ux[0]); - gkyl_mat_set(&rhs_uy,0,0,uy[0]); - gkyl_mat_set(&rhs_uz,0,0,uz[0]); - gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,p_force[0]); - gkyl_mat_set(&rhs_T_perp_over_m,0,0,T_perp_over_m[0]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,T_perp_over_m_inv[0]); - gkyl_mat_set(&rhs_ux,1,0,0.0); - gkyl_mat_set(&rhs_uy,1,0,0.0); - gkyl_mat_set(&rhs_uz,1,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,0.0); - gkyl_mat_set(&rhs_ux,2,0,0.0); - gkyl_mat_set(&rhs_uy,2,0,0.0); - gkyl_mat_set(&rhs_uz,2,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,2,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,0.0); - gkyl_mat_set(&rhs_ux,3,0,0.0); - gkyl_mat_set(&rhs_uy,3,0,0.0); - gkyl_mat_set(&rhs_uz,3,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,3,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,3,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,3,0,0.0); - } else { gkyl_mat_set(&rhs_ux,0,0,ux[0]); gkyl_mat_set(&rhs_uy,0,0,uy[0]); gkyl_mat_set(&rhs_uz,0,0,uz[0]); gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,p_force[0]); gkyl_mat_set(&rhs_T_perp_over_m,0,0,T_perp_over_m[0]); gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,T_perp_over_m_inv[0]); + gkyl_mat_set(&rhs_Txx,0,0,Txx[0]); + gkyl_mat_set(&rhs_Tyy,0,0,Tyy[0]); + gkyl_mat_set(&rhs_Tzz,0,0,Tzz[0]); gkyl_mat_set(&rhs_ux,1,0,ux[1]); gkyl_mat_set(&rhs_uy,1,0,uy[1]); gkyl_mat_set(&rhs_uz,1,0,uz[1]); gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,p_force[1]); gkyl_mat_set(&rhs_T_perp_over_m,1,0,T_perp_over_m[1]); gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,T_perp_over_m_inv[1]); + gkyl_mat_set(&rhs_Txx,1,0,Txx[1]); + gkyl_mat_set(&rhs_Tyy,1,0,Tyy[1]); + gkyl_mat_set(&rhs_Tzz,1,0,Tzz[1]); gkyl_mat_set(&rhs_ux,2,0,ux[2]); gkyl_mat_set(&rhs_uy,2,0,uy[2]); gkyl_mat_set(&rhs_uz,2,0,uz[2]); gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,p_force[2]); gkyl_mat_set(&rhs_T_perp_over_m,2,0,T_perp_over_m[2]); gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,T_perp_over_m_inv[2]); + gkyl_mat_set(&rhs_Txx,2,0,Txx[2]); + gkyl_mat_set(&rhs_Tyy,2,0,Tyy[2]); + gkyl_mat_set(&rhs_Tzz,2,0,Tzz[2]); gkyl_mat_set(&rhs_ux,3,0,ux[3]); gkyl_mat_set(&rhs_uy,3,0,uy[3]); gkyl_mat_set(&rhs_uz,3,0,uz[3]); gkyl_mat_set(&rhs_pkpm_div_ppar,3,0,p_force[3]); gkyl_mat_set(&rhs_T_perp_over_m,3,0,T_perp_over_m[3]); gkyl_mat_set(&rhs_T_perp_over_m_inv,3,0,T_perp_over_m_inv[3]); - } + gkyl_mat_set(&rhs_Txx,3,0,Txx[3]); + gkyl_mat_set(&rhs_Tyy,3,0,Tyy[3]); + gkyl_mat_set(&rhs_Tzz,3,0,Tzz[3]); return cell_avg; } diff --git a/kernels/pkpm/pkpm_vars_set_2x_tensor_p2.c b/kernels/pkpm/pkpm_vars_set_2x_tensor_p2.c index 317eeaf71..5841266bf 100644 --- a/kernels/pkpm/pkpm_vars_set_2x_tensor_p2.c +++ b/kernels/pkpm/pkpm_vars_set_2x_tensor_p2.c @@ -1,13 +1,15 @@ #include #include GKYL_CU_DH int pkpm_vars_set_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar) + const double *vlasov_pkpm_moms, const double *euler_pkpm, + const double *p_ij, const double *pkpm_div_ppar) { // count: integer to indicate which matrix being fetched. // A: preallocated LHS matrix. // rhs: preallocated RHS vector. // vlasov_pkpm_moms: [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. // euler_pkpm: [rho ux, rho uy, rho uz], Fluid input state vector. + // p_ij: p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. // pkpm_div_ppar: div(p_par b) computed from kinetic equation for consistency. struct gkyl_mat A_ux = gkyl_nmat_get(A, count); @@ -16,12 +18,18 @@ GKYL_CU_DH int pkpm_vars_set_2x_tensor_p2(int count, struct gkyl_nmat *A, struct struct gkyl_mat A_pkpm_div_ppar = gkyl_nmat_get(A, count+3); struct gkyl_mat A_T_perp_over_m = gkyl_nmat_get(A, count+4); struct gkyl_mat A_T_perp_over_m_inv = gkyl_nmat_get(A, count+5); + struct gkyl_mat A_Txx = gkyl_nmat_get(A, count+6); + struct gkyl_mat A_Tyy = gkyl_nmat_get(A, count+7); + struct gkyl_mat A_Tzz = gkyl_nmat_get(A, count+8); struct gkyl_mat rhs_ux = gkyl_nmat_get(rhs, count); struct gkyl_mat rhs_uy = gkyl_nmat_get(rhs, count+1); struct gkyl_mat rhs_uz = gkyl_nmat_get(rhs, count+2); struct gkyl_mat rhs_pkpm_div_ppar = gkyl_nmat_get(rhs, count+3); struct gkyl_mat rhs_T_perp_over_m = gkyl_nmat_get(rhs, count+4); struct gkyl_mat rhs_T_perp_over_m_inv = gkyl_nmat_get(rhs, count+5); + struct gkyl_mat rhs_Txx = gkyl_nmat_get(rhs, count+6); + struct gkyl_mat rhs_Tyy = gkyl_nmat_get(rhs, count+7); + struct gkyl_mat rhs_Tzz = gkyl_nmat_get(rhs, count+8); // Clear matrix and rhs for each component of primitive variables being solved for gkyl_mat_clear(&A_ux, 0.0); gkyl_mat_clear(&rhs_ux, 0.0); gkyl_mat_clear(&A_uy, 0.0); gkyl_mat_clear(&rhs_uy, 0.0); @@ -29,980 +37,1186 @@ GKYL_CU_DH int pkpm_vars_set_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_mat_clear(&A_pkpm_div_ppar, 0.0); gkyl_mat_clear(&rhs_pkpm_div_ppar, 0.0); gkyl_mat_clear(&A_T_perp_over_m, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m, 0.0); gkyl_mat_clear(&A_T_perp_over_m_inv, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m_inv, 0.0); + gkyl_mat_clear(&A_Txx, 0.0); gkyl_mat_clear(&rhs_Txx, 0.0); + gkyl_mat_clear(&A_Tyy, 0.0); gkyl_mat_clear(&rhs_Tyy, 0.0); + gkyl_mat_clear(&A_Tzz, 0.0); gkyl_mat_clear(&rhs_Tzz, 0.0); const double *rhoux = &euler_pkpm[0]; const double *rhouy = &euler_pkpm[9]; const double *rhouz = &euler_pkpm[18]; const double *rho = &vlasov_pkpm_moms[0]; + const double *p_par = &vlasov_pkpm_moms[9]; const double *p_perp = &vlasov_pkpm_moms[18]; + const double *Pxx = &p_ij[0]; + const double *Pyy = &p_ij[27]; + const double *Pzz = &p_ij[45]; + int cell_avg = 0; // Check if rho, p_par, or p_perp < 0 at control points. + // *THIS IS ONLY A CHECK RIGHT NOW AND UNUSED* if (2.5*rho[8]-1.936491673103709*rho[7]-1.936491673103709*rho[6]+1.118033988749895*rho[5]+1.118033988749895*rho[4]+1.5*rho[3]-0.8660254037844386*rho[2]-0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if (2.5*p_par[8]-1.936491673103709*p_par[7]-1.936491673103709*p_par[6]+1.118033988749895*p_par[5]+1.118033988749895*p_par[4]+1.5*p_par[3]-0.8660254037844386*p_par[2]-0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if (2.5*p_perp[8]-1.936491673103709*p_perp[7]-1.936491673103709*p_perp[6]+1.118033988749895*p_perp[5]+1.118033988749895*p_perp[4]+1.5*p_perp[3]-0.8660254037844386*p_perp[2]-0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; if ((-1.25*rho[8])+0.9682458365518543*rho[6]+1.118033988749895*rho[5]-0.5590169943749475*rho[4]-0.8660254037844386*rho[2]+0.5*rho[0] < 0.0) cell_avg = 1; + if ((-1.25*p_par[8])+0.9682458365518543*p_par[6]+1.118033988749895*p_par[5]-0.5590169943749475*p_par[4]-0.8660254037844386*p_par[2]+0.5*p_par[0] < 0.0) cell_avg = 1; if ((-1.25*p_perp[8])+0.9682458365518543*p_perp[6]+1.118033988749895*p_perp[5]-0.5590169943749475*p_perp[4]-0.8660254037844386*p_perp[2]+0.5*p_perp[0] < 0.0) cell_avg = 1; if (2.5*rho[8]+1.936491673103709*rho[7]-1.936491673103709*rho[6]+1.118033988749895*rho[5]+1.118033988749895*rho[4]-1.5*rho[3]-0.8660254037844386*rho[2]+0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if (2.5*p_par[8]+1.936491673103709*p_par[7]-1.936491673103709*p_par[6]+1.118033988749895*p_par[5]+1.118033988749895*p_par[4]-1.5*p_par[3]-0.8660254037844386*p_par[2]+0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if (2.5*p_perp[8]+1.936491673103709*p_perp[7]-1.936491673103709*p_perp[6]+1.118033988749895*p_perp[5]+1.118033988749895*p_perp[4]-1.5*p_perp[3]-0.8660254037844386*p_perp[2]+0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; if ((-1.25*rho[8])+0.9682458365518543*rho[7]-0.5590169943749475*rho[5]+1.118033988749895*rho[4]-0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if ((-1.25*p_par[8])+0.9682458365518543*p_par[7]-0.5590169943749475*p_par[5]+1.118033988749895*p_par[4]-0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if ((-1.25*p_perp[8])+0.9682458365518543*p_perp[7]-0.5590169943749475*p_perp[5]+1.118033988749895*p_perp[4]-0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; if (0.625*rho[8]-0.5590169943749475*rho[5]-0.5590169943749475*rho[4]+0.5*rho[0] < 0.0) cell_avg = 1; + if (0.625*p_par[8]-0.5590169943749475*p_par[5]-0.5590169943749475*p_par[4]+0.5*p_par[0] < 0.0) cell_avg = 1; if (0.625*p_perp[8]-0.5590169943749475*p_perp[5]-0.5590169943749475*p_perp[4]+0.5*p_perp[0] < 0.0) cell_avg = 1; if ((-1.25*rho[8])-0.9682458365518543*rho[7]-0.5590169943749475*rho[5]+1.118033988749895*rho[4]+0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if ((-1.25*p_par[8])-0.9682458365518543*p_par[7]-0.5590169943749475*p_par[5]+1.118033988749895*p_par[4]+0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if ((-1.25*p_perp[8])-0.9682458365518543*p_perp[7]-0.5590169943749475*p_perp[5]+1.118033988749895*p_perp[4]+0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; if (2.5*rho[8]-1.936491673103709*rho[7]+1.936491673103709*rho[6]+1.118033988749895*rho[5]+1.118033988749895*rho[4]-1.5*rho[3]+0.8660254037844386*rho[2]-0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if (2.5*p_par[8]-1.936491673103709*p_par[7]+1.936491673103709*p_par[6]+1.118033988749895*p_par[5]+1.118033988749895*p_par[4]-1.5*p_par[3]+0.8660254037844386*p_par[2]-0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if (2.5*p_perp[8]-1.936491673103709*p_perp[7]+1.936491673103709*p_perp[6]+1.118033988749895*p_perp[5]+1.118033988749895*p_perp[4]-1.5*p_perp[3]+0.8660254037844386*p_perp[2]-0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; if ((-1.25*rho[8])-0.9682458365518543*rho[6]+1.118033988749895*rho[5]-0.5590169943749475*rho[4]+0.8660254037844386*rho[2]+0.5*rho[0] < 0.0) cell_avg = 1; + if ((-1.25*p_par[8])-0.9682458365518543*p_par[6]+1.118033988749895*p_par[5]-0.5590169943749475*p_par[4]+0.8660254037844386*p_par[2]+0.5*p_par[0] < 0.0) cell_avg = 1; if ((-1.25*p_perp[8])-0.9682458365518543*p_perp[6]+1.118033988749895*p_perp[5]-0.5590169943749475*p_perp[4]+0.8660254037844386*p_perp[2]+0.5*p_perp[0] < 0.0) cell_avg = 1; if (2.5*rho[8]+1.936491673103709*rho[7]+1.936491673103709*rho[6]+1.118033988749895*rho[5]+1.118033988749895*rho[4]+1.5*rho[3]+0.8660254037844386*rho[2]+0.8660254037844386*rho[1]+0.5*rho[0] < 0.0) cell_avg = 1; + if (2.5*p_par[8]+1.936491673103709*p_par[7]+1.936491673103709*p_par[6]+1.118033988749895*p_par[5]+1.118033988749895*p_par[4]+1.5*p_par[3]+0.8660254037844386*p_par[2]+0.8660254037844386*p_par[1]+0.5*p_par[0] < 0.0) cell_avg = 1; if (2.5*p_perp[8]+1.936491673103709*p_perp[7]+1.936491673103709*p_perp[6]+1.118033988749895*p_perp[5]+1.118033988749895*p_perp[4]+1.5*p_perp[3]+0.8660254037844386*p_perp[2]+0.8660254037844386*p_perp[1]+0.5*p_perp[0] < 0.0) cell_avg = 1; - double rho_temp[9] = {0.0}; - double p_perp_temp[9] = {0.0}; - if (cell_avg) { - rho_temp[0] = rho[0]; - p_perp_temp[0] = p_perp[0]; - } else { - rho_temp[0] = rho[0]; - p_perp_temp[0] = p_perp[0]; - rho_temp[1] = rho[1]; - p_perp_temp[1] = p_perp[1]; - rho_temp[2] = rho[2]; - p_perp_temp[2] = p_perp[2]; - rho_temp[3] = rho[3]; - p_perp_temp[3] = p_perp[3]; - rho_temp[4] = rho[4]; - p_perp_temp[4] = p_perp[4]; - rho_temp[5] = rho[5]; - p_perp_temp[5] = p_perp[5]; - rho_temp[6] = rho[6]; - p_perp_temp[6] = p_perp[6]; - rho_temp[7] = rho[7]; - p_perp_temp[7] = p_perp[7]; - rho_temp[8] = rho[8]; - p_perp_temp[8] = p_perp[8]; - } - - if (cell_avg) { - gkyl_mat_set(&rhs_ux,0,0,rhoux[0]); - gkyl_mat_set(&rhs_uy,0,0,rhouy[0]); - gkyl_mat_set(&rhs_uz,0,0,rhouz[0]); - gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,pkpm_div_ppar[0]); - gkyl_mat_set(&rhs_T_perp_over_m,0,0,p_perp[0]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,rho[0]); - gkyl_mat_set(&rhs_ux,1,0,0.0); - gkyl_mat_set(&rhs_uy,1,0,0.0); - gkyl_mat_set(&rhs_uz,1,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,0.0); - gkyl_mat_set(&rhs_ux,2,0,0.0); - gkyl_mat_set(&rhs_uy,2,0,0.0); - gkyl_mat_set(&rhs_uz,2,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,2,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,0.0); - gkyl_mat_set(&rhs_ux,3,0,0.0); - gkyl_mat_set(&rhs_uy,3,0,0.0); - gkyl_mat_set(&rhs_uz,3,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,3,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,3,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,3,0,0.0); - gkyl_mat_set(&rhs_ux,4,0,0.0); - gkyl_mat_set(&rhs_uy,4,0,0.0); - gkyl_mat_set(&rhs_uz,4,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,4,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,4,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,4,0,0.0); - gkyl_mat_set(&rhs_ux,5,0,0.0); - gkyl_mat_set(&rhs_uy,5,0,0.0); - gkyl_mat_set(&rhs_uz,5,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,5,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,5,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,5,0,0.0); - gkyl_mat_set(&rhs_ux,6,0,0.0); - gkyl_mat_set(&rhs_uy,6,0,0.0); - gkyl_mat_set(&rhs_uz,6,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,6,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,6,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,6,0,0.0); - gkyl_mat_set(&rhs_ux,7,0,0.0); - gkyl_mat_set(&rhs_uy,7,0,0.0); - gkyl_mat_set(&rhs_uz,7,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,7,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,7,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,7,0,0.0); - gkyl_mat_set(&rhs_ux,8,0,0.0); - gkyl_mat_set(&rhs_uy,8,0,0.0); - gkyl_mat_set(&rhs_uz,8,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,8,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,8,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,8,0,0.0); - } else { - gkyl_mat_set(&rhs_ux,0,0,rhoux[0]); - gkyl_mat_set(&rhs_uy,0,0,rhouy[0]); - gkyl_mat_set(&rhs_uz,0,0,rhouz[0]); - gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,pkpm_div_ppar[0]); - gkyl_mat_set(&rhs_T_perp_over_m,0,0,p_perp[0]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,rho[0]); - gkyl_mat_set(&rhs_ux,1,0,rhoux[1]); - gkyl_mat_set(&rhs_uy,1,0,rhouy[1]); - gkyl_mat_set(&rhs_uz,1,0,rhouz[1]); - gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,pkpm_div_ppar[1]); - gkyl_mat_set(&rhs_T_perp_over_m,1,0,p_perp[1]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,rho[1]); - gkyl_mat_set(&rhs_ux,2,0,rhoux[2]); - gkyl_mat_set(&rhs_uy,2,0,rhouy[2]); - gkyl_mat_set(&rhs_uz,2,0,rhouz[2]); - gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,pkpm_div_ppar[2]); - gkyl_mat_set(&rhs_T_perp_over_m,2,0,p_perp[2]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,rho[2]); - gkyl_mat_set(&rhs_ux,3,0,rhoux[3]); - gkyl_mat_set(&rhs_uy,3,0,rhouy[3]); - gkyl_mat_set(&rhs_uz,3,0,rhouz[3]); - gkyl_mat_set(&rhs_pkpm_div_ppar,3,0,pkpm_div_ppar[3]); - gkyl_mat_set(&rhs_T_perp_over_m,3,0,p_perp[3]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,3,0,rho[3]); - gkyl_mat_set(&rhs_ux,4,0,rhoux[4]); - gkyl_mat_set(&rhs_uy,4,0,rhouy[4]); - gkyl_mat_set(&rhs_uz,4,0,rhouz[4]); - gkyl_mat_set(&rhs_pkpm_div_ppar,4,0,pkpm_div_ppar[4]); - gkyl_mat_set(&rhs_T_perp_over_m,4,0,p_perp[4]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,4,0,rho[4]); - gkyl_mat_set(&rhs_ux,5,0,rhoux[5]); - gkyl_mat_set(&rhs_uy,5,0,rhouy[5]); - gkyl_mat_set(&rhs_uz,5,0,rhouz[5]); - gkyl_mat_set(&rhs_pkpm_div_ppar,5,0,pkpm_div_ppar[5]); - gkyl_mat_set(&rhs_T_perp_over_m,5,0,p_perp[5]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,5,0,rho[5]); - gkyl_mat_set(&rhs_ux,6,0,rhoux[6]); - gkyl_mat_set(&rhs_uy,6,0,rhouy[6]); - gkyl_mat_set(&rhs_uz,6,0,rhouz[6]); - gkyl_mat_set(&rhs_pkpm_div_ppar,6,0,pkpm_div_ppar[6]); - gkyl_mat_set(&rhs_T_perp_over_m,6,0,p_perp[6]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,6,0,rho[6]); - gkyl_mat_set(&rhs_ux,7,0,rhoux[7]); - gkyl_mat_set(&rhs_uy,7,0,rhouy[7]); - gkyl_mat_set(&rhs_uz,7,0,rhouz[7]); - gkyl_mat_set(&rhs_pkpm_div_ppar,7,0,pkpm_div_ppar[7]); - gkyl_mat_set(&rhs_T_perp_over_m,7,0,p_perp[7]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,7,0,rho[7]); - gkyl_mat_set(&rhs_ux,8,0,rhoux[8]); - gkyl_mat_set(&rhs_uy,8,0,rhouy[8]); - gkyl_mat_set(&rhs_uz,8,0,rhouz[8]); - gkyl_mat_set(&rhs_pkpm_div_ppar,8,0,pkpm_div_ppar[8]); - gkyl_mat_set(&rhs_T_perp_over_m,8,0,p_perp[8]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,8,0,rho[8]); - } + + gkyl_mat_set(&rhs_ux,0,0,rhoux[0]); + gkyl_mat_set(&rhs_uy,0,0,rhouy[0]); + gkyl_mat_set(&rhs_uz,0,0,rhouz[0]); + gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,pkpm_div_ppar[0]); + gkyl_mat_set(&rhs_T_perp_over_m,0,0,p_perp[0]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,rho[0]); + gkyl_mat_set(&rhs_Txx,0,0,Pxx[0]); + gkyl_mat_set(&rhs_Tyy,0,0,Pyy[0]); + gkyl_mat_set(&rhs_Tzz,0,0,Pzz[0]); + gkyl_mat_set(&rhs_ux,1,0,rhoux[1]); + gkyl_mat_set(&rhs_uy,1,0,rhouy[1]); + gkyl_mat_set(&rhs_uz,1,0,rhouz[1]); + gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,pkpm_div_ppar[1]); + gkyl_mat_set(&rhs_T_perp_over_m,1,0,p_perp[1]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,rho[1]); + gkyl_mat_set(&rhs_Txx,1,0,Pxx[1]); + gkyl_mat_set(&rhs_Tyy,1,0,Pyy[1]); + gkyl_mat_set(&rhs_Tzz,1,0,Pzz[1]); + gkyl_mat_set(&rhs_ux,2,0,rhoux[2]); + gkyl_mat_set(&rhs_uy,2,0,rhouy[2]); + gkyl_mat_set(&rhs_uz,2,0,rhouz[2]); + gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,pkpm_div_ppar[2]); + gkyl_mat_set(&rhs_T_perp_over_m,2,0,p_perp[2]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,rho[2]); + gkyl_mat_set(&rhs_Txx,2,0,Pxx[2]); + gkyl_mat_set(&rhs_Tyy,2,0,Pyy[2]); + gkyl_mat_set(&rhs_Tzz,2,0,Pzz[2]); + gkyl_mat_set(&rhs_ux,3,0,rhoux[3]); + gkyl_mat_set(&rhs_uy,3,0,rhouy[3]); + gkyl_mat_set(&rhs_uz,3,0,rhouz[3]); + gkyl_mat_set(&rhs_pkpm_div_ppar,3,0,pkpm_div_ppar[3]); + gkyl_mat_set(&rhs_T_perp_over_m,3,0,p_perp[3]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,3,0,rho[3]); + gkyl_mat_set(&rhs_Txx,3,0,Pxx[3]); + gkyl_mat_set(&rhs_Tyy,3,0,Pyy[3]); + gkyl_mat_set(&rhs_Tzz,3,0,Pzz[3]); + gkyl_mat_set(&rhs_ux,4,0,rhoux[4]); + gkyl_mat_set(&rhs_uy,4,0,rhouy[4]); + gkyl_mat_set(&rhs_uz,4,0,rhouz[4]); + gkyl_mat_set(&rhs_pkpm_div_ppar,4,0,pkpm_div_ppar[4]); + gkyl_mat_set(&rhs_T_perp_over_m,4,0,p_perp[4]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,4,0,rho[4]); + gkyl_mat_set(&rhs_Txx,4,0,Pxx[4]); + gkyl_mat_set(&rhs_Tyy,4,0,Pyy[4]); + gkyl_mat_set(&rhs_Tzz,4,0,Pzz[4]); + gkyl_mat_set(&rhs_ux,5,0,rhoux[5]); + gkyl_mat_set(&rhs_uy,5,0,rhouy[5]); + gkyl_mat_set(&rhs_uz,5,0,rhouz[5]); + gkyl_mat_set(&rhs_pkpm_div_ppar,5,0,pkpm_div_ppar[5]); + gkyl_mat_set(&rhs_T_perp_over_m,5,0,p_perp[5]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,5,0,rho[5]); + gkyl_mat_set(&rhs_Txx,5,0,Pxx[5]); + gkyl_mat_set(&rhs_Tyy,5,0,Pyy[5]); + gkyl_mat_set(&rhs_Tzz,5,0,Pzz[5]); + gkyl_mat_set(&rhs_ux,6,0,rhoux[6]); + gkyl_mat_set(&rhs_uy,6,0,rhouy[6]); + gkyl_mat_set(&rhs_uz,6,0,rhouz[6]); + gkyl_mat_set(&rhs_pkpm_div_ppar,6,0,pkpm_div_ppar[6]); + gkyl_mat_set(&rhs_T_perp_over_m,6,0,p_perp[6]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,6,0,rho[6]); + gkyl_mat_set(&rhs_Txx,6,0,Pxx[6]); + gkyl_mat_set(&rhs_Tyy,6,0,Pyy[6]); + gkyl_mat_set(&rhs_Tzz,6,0,Pzz[6]); + gkyl_mat_set(&rhs_ux,7,0,rhoux[7]); + gkyl_mat_set(&rhs_uy,7,0,rhouy[7]); + gkyl_mat_set(&rhs_uz,7,0,rhouz[7]); + gkyl_mat_set(&rhs_pkpm_div_ppar,7,0,pkpm_div_ppar[7]); + gkyl_mat_set(&rhs_T_perp_over_m,7,0,p_perp[7]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,7,0,rho[7]); + gkyl_mat_set(&rhs_Txx,7,0,Pxx[7]); + gkyl_mat_set(&rhs_Tyy,7,0,Pyy[7]); + gkyl_mat_set(&rhs_Tzz,7,0,Pzz[7]); + gkyl_mat_set(&rhs_ux,8,0,rhoux[8]); + gkyl_mat_set(&rhs_uy,8,0,rhouy[8]); + gkyl_mat_set(&rhs_uz,8,0,rhouz[8]); + gkyl_mat_set(&rhs_pkpm_div_ppar,8,0,pkpm_div_ppar[8]); + gkyl_mat_set(&rhs_T_perp_over_m,8,0,p_perp[8]); + gkyl_mat_set(&rhs_T_perp_over_m_inv,8,0,rho[8]); + gkyl_mat_set(&rhs_Txx,8,0,Pxx[8]); + gkyl_mat_set(&rhs_Tyy,8,0,Pyy[8]); + gkyl_mat_set(&rhs_Tzz,8,0,Pzz[8]); double temp_rho = 0.0; double temp_p_perp = 0.0; - temp_rho = 0.5*rho_temp[0]; + temp_rho = 0.5*rho[0]; gkyl_mat_set(&A_ux,0,0,temp_rho); gkyl_mat_set(&A_uy,0,0,temp_rho); gkyl_mat_set(&A_uz,0,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,0,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,0,0,temp_rho); + gkyl_mat_set(&A_Tyy,0,0,temp_rho); + gkyl_mat_set(&A_Tzz,0,0,temp_rho); + + temp_p_perp = 0.5*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,0,0,temp_p_perp); - - temp_rho = 0.5*rho_temp[1]; + + temp_rho = 0.5*rho[1]; gkyl_mat_set(&A_ux,0,1,temp_rho); gkyl_mat_set(&A_uy,0,1,temp_rho); gkyl_mat_set(&A_uz,0,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,1,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,0,1,temp_rho); + gkyl_mat_set(&A_Tyy,0,1,temp_rho); + gkyl_mat_set(&A_Tzz,0,1,temp_rho); + + temp_p_perp = 0.5*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,0,1,temp_p_perp); - - temp_rho = 0.5*rho_temp[2]; + + temp_rho = 0.5*rho[2]; gkyl_mat_set(&A_ux,0,2,temp_rho); gkyl_mat_set(&A_uy,0,2,temp_rho); gkyl_mat_set(&A_uz,0,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,2,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,0,2,temp_rho); + gkyl_mat_set(&A_Tyy,0,2,temp_rho); + gkyl_mat_set(&A_Tzz,0,2,temp_rho); + + temp_p_perp = 0.5*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,0,2,temp_p_perp); - - temp_rho = 0.5*rho_temp[3]; + + temp_rho = 0.5*rho[3]; gkyl_mat_set(&A_ux,0,3,temp_rho); gkyl_mat_set(&A_uy,0,3,temp_rho); gkyl_mat_set(&A_uz,0,3,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,3,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,3,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,0,3,temp_rho); + gkyl_mat_set(&A_Tyy,0,3,temp_rho); + gkyl_mat_set(&A_Tzz,0,3,temp_rho); + + temp_p_perp = 0.5*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,0,3,temp_p_perp); - - temp_rho = 0.5*rho_temp[4]; + + temp_rho = 0.5*rho[4]; gkyl_mat_set(&A_ux,0,4,temp_rho); gkyl_mat_set(&A_uy,0,4,temp_rho); gkyl_mat_set(&A_uz,0,4,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,4,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,4,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[4]; + gkyl_mat_set(&A_Txx,0,4,temp_rho); + gkyl_mat_set(&A_Tyy,0,4,temp_rho); + gkyl_mat_set(&A_Tzz,0,4,temp_rho); + + temp_p_perp = 0.5*p_perp[4]; gkyl_mat_set(&A_T_perp_over_m_inv,0,4,temp_p_perp); - - temp_rho = 0.5*rho_temp[5]; + + temp_rho = 0.5*rho[5]; gkyl_mat_set(&A_ux,0,5,temp_rho); gkyl_mat_set(&A_uy,0,5,temp_rho); gkyl_mat_set(&A_uz,0,5,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,5,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,5,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[5]; + gkyl_mat_set(&A_Txx,0,5,temp_rho); + gkyl_mat_set(&A_Tyy,0,5,temp_rho); + gkyl_mat_set(&A_Tzz,0,5,temp_rho); + + temp_p_perp = 0.5*p_perp[5]; gkyl_mat_set(&A_T_perp_over_m_inv,0,5,temp_p_perp); - - temp_rho = 0.5*rho_temp[6]; + + temp_rho = 0.5*rho[6]; gkyl_mat_set(&A_ux,0,6,temp_rho); gkyl_mat_set(&A_uy,0,6,temp_rho); gkyl_mat_set(&A_uz,0,6,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,6,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,6,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[6]; + gkyl_mat_set(&A_Txx,0,6,temp_rho); + gkyl_mat_set(&A_Tyy,0,6,temp_rho); + gkyl_mat_set(&A_Tzz,0,6,temp_rho); + + temp_p_perp = 0.5*p_perp[6]; gkyl_mat_set(&A_T_perp_over_m_inv,0,6,temp_p_perp); - - temp_rho = 0.5*rho_temp[7]; + + temp_rho = 0.5*rho[7]; gkyl_mat_set(&A_ux,0,7,temp_rho); gkyl_mat_set(&A_uy,0,7,temp_rho); gkyl_mat_set(&A_uz,0,7,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,7,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,7,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[7]; + gkyl_mat_set(&A_Txx,0,7,temp_rho); + gkyl_mat_set(&A_Tyy,0,7,temp_rho); + gkyl_mat_set(&A_Tzz,0,7,temp_rho); + + temp_p_perp = 0.5*p_perp[7]; gkyl_mat_set(&A_T_perp_over_m_inv,0,7,temp_p_perp); - - temp_rho = 0.5*rho_temp[8]; + + temp_rho = 0.5*rho[8]; gkyl_mat_set(&A_ux,0,8,temp_rho); gkyl_mat_set(&A_uy,0,8,temp_rho); gkyl_mat_set(&A_uz,0,8,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,0,8,temp_rho); gkyl_mat_set(&A_T_perp_over_m,0,8,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[8]; + gkyl_mat_set(&A_Txx,0,8,temp_rho); + gkyl_mat_set(&A_Tyy,0,8,temp_rho); + gkyl_mat_set(&A_Tzz,0,8,temp_rho); + + temp_p_perp = 0.5*p_perp[8]; gkyl_mat_set(&A_T_perp_over_m_inv,0,8,temp_p_perp); - - temp_rho = 0.5*rho_temp[1]; + + temp_rho = 0.5*rho[1]; gkyl_mat_set(&A_ux,1,0,temp_rho); gkyl_mat_set(&A_uy,1,0,temp_rho); gkyl_mat_set(&A_uz,1,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,0,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,1,0,temp_rho); + gkyl_mat_set(&A_Tyy,1,0,temp_rho); + gkyl_mat_set(&A_Tzz,1,0,temp_rho); + + temp_p_perp = 0.5*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,1,0,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[4]+0.5*rho_temp[0]; + + temp_rho = 0.4472135954999579*rho[4]+0.5*rho[0]; gkyl_mat_set(&A_ux,1,1,temp_rho); gkyl_mat_set(&A_uy,1,1,temp_rho); gkyl_mat_set(&A_uz,1,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,1,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[4]+0.5*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,1,1,temp_rho); + gkyl_mat_set(&A_Tyy,1,1,temp_rho); + gkyl_mat_set(&A_Tzz,1,1,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[4]+0.5*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,1,1,temp_p_perp); - - temp_rho = 0.5*rho_temp[3]; + + temp_rho = 0.5*rho[3]; gkyl_mat_set(&A_ux,1,2,temp_rho); gkyl_mat_set(&A_uy,1,2,temp_rho); gkyl_mat_set(&A_uz,1,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,2,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,1,2,temp_rho); + gkyl_mat_set(&A_Tyy,1,2,temp_rho); + gkyl_mat_set(&A_Tzz,1,2,temp_rho); + + temp_p_perp = 0.5*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,1,2,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[6]+0.5*rho_temp[2]; + + temp_rho = 0.447213595499958*rho[6]+0.5*rho[2]; gkyl_mat_set(&A_ux,1,3,temp_rho); gkyl_mat_set(&A_uy,1,3,temp_rho); gkyl_mat_set(&A_uz,1,3,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,3,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,3,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[6]+0.5*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,1,3,temp_rho); + gkyl_mat_set(&A_Tyy,1,3,temp_rho); + gkyl_mat_set(&A_Tzz,1,3,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[6]+0.5*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,1,3,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[1]; + + temp_rho = 0.4472135954999579*rho[1]; gkyl_mat_set(&A_ux,1,4,temp_rho); gkyl_mat_set(&A_uy,1,4,temp_rho); gkyl_mat_set(&A_uz,1,4,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,4,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,4,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,1,4,temp_rho); + gkyl_mat_set(&A_Tyy,1,4,temp_rho); + gkyl_mat_set(&A_Tzz,1,4,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,1,4,temp_p_perp); - - temp_rho = 0.5000000000000001*rho_temp[7]; + + temp_rho = 0.5000000000000001*rho[7]; gkyl_mat_set(&A_ux,1,5,temp_rho); gkyl_mat_set(&A_uy,1,5,temp_rho); gkyl_mat_set(&A_uz,1,5,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,5,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,5,temp_rho); - - temp_p_perp = 0.5000000000000001*p_perp_temp[7]; + gkyl_mat_set(&A_Txx,1,5,temp_rho); + gkyl_mat_set(&A_Tyy,1,5,temp_rho); + gkyl_mat_set(&A_Tzz,1,5,temp_rho); + + temp_p_perp = 0.5000000000000001*p_perp[7]; gkyl_mat_set(&A_T_perp_over_m_inv,1,5,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[3]; + + temp_rho = 0.447213595499958*rho[3]; gkyl_mat_set(&A_ux,1,6,temp_rho); gkyl_mat_set(&A_uy,1,6,temp_rho); gkyl_mat_set(&A_uz,1,6,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,6,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,6,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,1,6,temp_rho); + gkyl_mat_set(&A_Tyy,1,6,temp_rho); + gkyl_mat_set(&A_Tzz,1,6,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,1,6,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[8]+0.5000000000000001*rho_temp[5]; + + temp_rho = 0.447213595499958*rho[8]+0.5000000000000001*rho[5]; gkyl_mat_set(&A_ux,1,7,temp_rho); gkyl_mat_set(&A_uy,1,7,temp_rho); gkyl_mat_set(&A_uz,1,7,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,7,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,7,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[8]+0.5000000000000001*p_perp_temp[5]; + gkyl_mat_set(&A_Txx,1,7,temp_rho); + gkyl_mat_set(&A_Tyy,1,7,temp_rho); + gkyl_mat_set(&A_Tzz,1,7,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[8]+0.5000000000000001*p_perp[5]; gkyl_mat_set(&A_T_perp_over_m_inv,1,7,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[7]; + + temp_rho = 0.447213595499958*rho[7]; gkyl_mat_set(&A_ux,1,8,temp_rho); gkyl_mat_set(&A_uy,1,8,temp_rho); gkyl_mat_set(&A_uz,1,8,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,1,8,temp_rho); gkyl_mat_set(&A_T_perp_over_m,1,8,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[7]; + gkyl_mat_set(&A_Txx,1,8,temp_rho); + gkyl_mat_set(&A_Tyy,1,8,temp_rho); + gkyl_mat_set(&A_Tzz,1,8,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[7]; gkyl_mat_set(&A_T_perp_over_m_inv,1,8,temp_p_perp); - - temp_rho = 0.5*rho_temp[2]; + + temp_rho = 0.5*rho[2]; gkyl_mat_set(&A_ux,2,0,temp_rho); gkyl_mat_set(&A_uy,2,0,temp_rho); gkyl_mat_set(&A_uz,2,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,0,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,2,0,temp_rho); + gkyl_mat_set(&A_Tyy,2,0,temp_rho); + gkyl_mat_set(&A_Tzz,2,0,temp_rho); + + temp_p_perp = 0.5*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,2,0,temp_p_perp); - - temp_rho = 0.5*rho_temp[3]; + + temp_rho = 0.5*rho[3]; gkyl_mat_set(&A_ux,2,1,temp_rho); gkyl_mat_set(&A_uy,2,1,temp_rho); gkyl_mat_set(&A_uz,2,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,1,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,2,1,temp_rho); + gkyl_mat_set(&A_Tyy,2,1,temp_rho); + gkyl_mat_set(&A_Tzz,2,1,temp_rho); + + temp_p_perp = 0.5*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,2,1,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[5]+0.5*rho_temp[0]; + + temp_rho = 0.4472135954999579*rho[5]+0.5*rho[0]; gkyl_mat_set(&A_ux,2,2,temp_rho); gkyl_mat_set(&A_uy,2,2,temp_rho); gkyl_mat_set(&A_uz,2,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,2,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[5]+0.5*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,2,2,temp_rho); + gkyl_mat_set(&A_Tyy,2,2,temp_rho); + gkyl_mat_set(&A_Tzz,2,2,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[5]+0.5*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,2,2,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[7]+0.5*rho_temp[1]; + + temp_rho = 0.447213595499958*rho[7]+0.5*rho[1]; gkyl_mat_set(&A_ux,2,3,temp_rho); gkyl_mat_set(&A_uy,2,3,temp_rho); gkyl_mat_set(&A_uz,2,3,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,3,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,3,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[7]+0.5*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,2,3,temp_rho); + gkyl_mat_set(&A_Tyy,2,3,temp_rho); + gkyl_mat_set(&A_Tzz,2,3,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[7]+0.5*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,2,3,temp_p_perp); - - temp_rho = 0.5000000000000001*rho_temp[6]; + + temp_rho = 0.5000000000000001*rho[6]; gkyl_mat_set(&A_ux,2,4,temp_rho); gkyl_mat_set(&A_uy,2,4,temp_rho); gkyl_mat_set(&A_uz,2,4,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,4,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,4,temp_rho); - - temp_p_perp = 0.5000000000000001*p_perp_temp[6]; + gkyl_mat_set(&A_Txx,2,4,temp_rho); + gkyl_mat_set(&A_Tyy,2,4,temp_rho); + gkyl_mat_set(&A_Tzz,2,4,temp_rho); + + temp_p_perp = 0.5000000000000001*p_perp[6]; gkyl_mat_set(&A_T_perp_over_m_inv,2,4,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[2]; + + temp_rho = 0.4472135954999579*rho[2]; gkyl_mat_set(&A_ux,2,5,temp_rho); gkyl_mat_set(&A_uy,2,5,temp_rho); gkyl_mat_set(&A_uz,2,5,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,5,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,5,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,2,5,temp_rho); + gkyl_mat_set(&A_Tyy,2,5,temp_rho); + gkyl_mat_set(&A_Tzz,2,5,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,2,5,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[8]+0.5000000000000001*rho_temp[4]; + + temp_rho = 0.447213595499958*rho[8]+0.5000000000000001*rho[4]; gkyl_mat_set(&A_ux,2,6,temp_rho); gkyl_mat_set(&A_uy,2,6,temp_rho); gkyl_mat_set(&A_uz,2,6,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,6,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,6,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[8]+0.5000000000000001*p_perp_temp[4]; + gkyl_mat_set(&A_Txx,2,6,temp_rho); + gkyl_mat_set(&A_Tyy,2,6,temp_rho); + gkyl_mat_set(&A_Tzz,2,6,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[8]+0.5000000000000001*p_perp[4]; gkyl_mat_set(&A_T_perp_over_m_inv,2,6,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[3]; + + temp_rho = 0.447213595499958*rho[3]; gkyl_mat_set(&A_ux,2,7,temp_rho); gkyl_mat_set(&A_uy,2,7,temp_rho); gkyl_mat_set(&A_uz,2,7,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,7,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,7,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,2,7,temp_rho); + gkyl_mat_set(&A_Tyy,2,7,temp_rho); + gkyl_mat_set(&A_Tzz,2,7,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,2,7,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[6]; + + temp_rho = 0.447213595499958*rho[6]; gkyl_mat_set(&A_ux,2,8,temp_rho); gkyl_mat_set(&A_uy,2,8,temp_rho); gkyl_mat_set(&A_uz,2,8,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,2,8,temp_rho); gkyl_mat_set(&A_T_perp_over_m,2,8,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[6]; + gkyl_mat_set(&A_Txx,2,8,temp_rho); + gkyl_mat_set(&A_Tyy,2,8,temp_rho); + gkyl_mat_set(&A_Tzz,2,8,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[6]; gkyl_mat_set(&A_T_perp_over_m_inv,2,8,temp_p_perp); - - temp_rho = 0.5*rho_temp[3]; + + temp_rho = 0.5*rho[3]; gkyl_mat_set(&A_ux,3,0,temp_rho); gkyl_mat_set(&A_uy,3,0,temp_rho); gkyl_mat_set(&A_uz,3,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,3,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,3,0,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,3,0,temp_rho); + gkyl_mat_set(&A_Tyy,3,0,temp_rho); + gkyl_mat_set(&A_Tzz,3,0,temp_rho); + + temp_p_perp = 0.5*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,3,0,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[6]+0.5*rho_temp[2]; + + temp_rho = 0.447213595499958*rho[6]+0.5*rho[2]; gkyl_mat_set(&A_ux,3,1,temp_rho); gkyl_mat_set(&A_uy,3,1,temp_rho); gkyl_mat_set(&A_uz,3,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,3,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,3,1,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[6]+0.5*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,3,1,temp_rho); + gkyl_mat_set(&A_Tyy,3,1,temp_rho); + gkyl_mat_set(&A_Tzz,3,1,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[6]+0.5*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,3,1,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[7]+0.5*rho_temp[1]; + + temp_rho = 0.447213595499958*rho[7]+0.5*rho[1]; gkyl_mat_set(&A_ux,3,2,temp_rho); gkyl_mat_set(&A_uy,3,2,temp_rho); gkyl_mat_set(&A_uz,3,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,3,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,3,2,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[7]+0.5*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,3,2,temp_rho); + gkyl_mat_set(&A_Tyy,3,2,temp_rho); + gkyl_mat_set(&A_Tzz,3,2,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[7]+0.5*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,3,2,temp_p_perp); - - temp_rho = 0.4*rho_temp[8]+0.4472135954999579*rho_temp[5]+0.4472135954999579*rho_temp[4]+0.5*rho_temp[0]; + + temp_rho = 0.4*rho[8]+0.4472135954999579*rho[5]+0.4472135954999579*rho[4]+0.5*rho[0]; gkyl_mat_set(&A_ux,3,3,temp_rho); gkyl_mat_set(&A_uy,3,3,temp_rho); gkyl_mat_set(&A_uz,3,3,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,3,3,temp_rho); gkyl_mat_set(&A_T_perp_over_m,3,3,temp_rho); - - temp_p_perp = 0.4*p_perp_temp[8]+0.4472135954999579*p_perp_temp[5]+0.4472135954999579*p_perp_temp[4]+0.5*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,3,3,temp_rho); + gkyl_mat_set(&A_Tyy,3,3,temp_rho); + gkyl_mat_set(&A_Tzz,3,3,temp_rho); + + temp_p_perp = 0.4*p_perp[8]+0.4472135954999579*p_perp[5]+0.4472135954999579*p_perp[4]+0.5*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,3,3,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[3]; + + temp_rho = 0.4472135954999579*rho[3]; gkyl_mat_set(&A_ux,3,4,temp_rho); gkyl_mat_set(&A_uy,3,4,temp_rho); gkyl_mat_set(&A_uz,3,4,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,3,4,temp_rho); gkyl_mat_set(&A_T_perp_over_m,3,4,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,3,4,temp_rho); + gkyl_mat_set(&A_Tyy,3,4,temp_rho); + gkyl_mat_set(&A_Tzz,3,4,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,3,4,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[3]; + + temp_rho = 0.4472135954999579*rho[3]; gkyl_mat_set(&A_ux,3,5,temp_rho); gkyl_mat_set(&A_uy,3,5,temp_rho); gkyl_mat_set(&A_uz,3,5,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,3,5,temp_rho); gkyl_mat_set(&A_T_perp_over_m,3,5,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,3,5,temp_rho); + gkyl_mat_set(&A_Tyy,3,5,temp_rho); + gkyl_mat_set(&A_Tzz,3,5,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,3,5,temp_p_perp); - - temp_rho = 0.4*rho_temp[7]+0.447213595499958*rho_temp[1]; + + temp_rho = 0.4*rho[7]+0.447213595499958*rho[1]; gkyl_mat_set(&A_ux,3,6,temp_rho); gkyl_mat_set(&A_uy,3,6,temp_rho); gkyl_mat_set(&A_uz,3,6,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,3,6,temp_rho); gkyl_mat_set(&A_T_perp_over_m,3,6,temp_rho); - - temp_p_perp = 0.4*p_perp_temp[7]+0.447213595499958*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,3,6,temp_rho); + gkyl_mat_set(&A_Tyy,3,6,temp_rho); + gkyl_mat_set(&A_Tzz,3,6,temp_rho); + + temp_p_perp = 0.4*p_perp[7]+0.447213595499958*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,3,6,temp_p_perp); - - temp_rho = 0.4*rho_temp[6]+0.447213595499958*rho_temp[2]; + + temp_rho = 0.4*rho[6]+0.447213595499958*rho[2]; gkyl_mat_set(&A_ux,3,7,temp_rho); gkyl_mat_set(&A_uy,3,7,temp_rho); gkyl_mat_set(&A_uz,3,7,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,3,7,temp_rho); gkyl_mat_set(&A_T_perp_over_m,3,7,temp_rho); - - temp_p_perp = 0.4*p_perp_temp[6]+0.447213595499958*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,3,7,temp_rho); + gkyl_mat_set(&A_Tyy,3,7,temp_rho); + gkyl_mat_set(&A_Tzz,3,7,temp_rho); + + temp_p_perp = 0.4*p_perp[6]+0.447213595499958*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,3,7,temp_p_perp); - - temp_rho = 0.4*rho_temp[3]; + + temp_rho = 0.4*rho[3]; gkyl_mat_set(&A_ux,3,8,temp_rho); gkyl_mat_set(&A_uy,3,8,temp_rho); gkyl_mat_set(&A_uz,3,8,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,3,8,temp_rho); gkyl_mat_set(&A_T_perp_over_m,3,8,temp_rho); - - temp_p_perp = 0.4*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,3,8,temp_rho); + gkyl_mat_set(&A_Tyy,3,8,temp_rho); + gkyl_mat_set(&A_Tzz,3,8,temp_rho); + + temp_p_perp = 0.4*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,3,8,temp_p_perp); - - temp_rho = 0.5*rho_temp[4]; + + temp_rho = 0.5*rho[4]; gkyl_mat_set(&A_ux,4,0,temp_rho); gkyl_mat_set(&A_uy,4,0,temp_rho); gkyl_mat_set(&A_uz,4,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,4,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,4,0,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[4]; + gkyl_mat_set(&A_Txx,4,0,temp_rho); + gkyl_mat_set(&A_Tyy,4,0,temp_rho); + gkyl_mat_set(&A_Tzz,4,0,temp_rho); + + temp_p_perp = 0.5*p_perp[4]; gkyl_mat_set(&A_T_perp_over_m_inv,4,0,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[1]; + + temp_rho = 0.4472135954999579*rho[1]; gkyl_mat_set(&A_ux,4,1,temp_rho); gkyl_mat_set(&A_uy,4,1,temp_rho); gkyl_mat_set(&A_uz,4,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,4,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,4,1,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,4,1,temp_rho); + gkyl_mat_set(&A_Tyy,4,1,temp_rho); + gkyl_mat_set(&A_Tzz,4,1,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,4,1,temp_p_perp); - - temp_rho = 0.5000000000000001*rho_temp[6]; + + temp_rho = 0.5000000000000001*rho[6]; gkyl_mat_set(&A_ux,4,2,temp_rho); gkyl_mat_set(&A_uy,4,2,temp_rho); gkyl_mat_set(&A_uz,4,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,4,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,4,2,temp_rho); - - temp_p_perp = 0.5000000000000001*p_perp_temp[6]; + gkyl_mat_set(&A_Txx,4,2,temp_rho); + gkyl_mat_set(&A_Tyy,4,2,temp_rho); + gkyl_mat_set(&A_Tzz,4,2,temp_rho); + + temp_p_perp = 0.5000000000000001*p_perp[6]; gkyl_mat_set(&A_T_perp_over_m_inv,4,2,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[3]; + + temp_rho = 0.4472135954999579*rho[3]; gkyl_mat_set(&A_ux,4,3,temp_rho); gkyl_mat_set(&A_uy,4,3,temp_rho); gkyl_mat_set(&A_uz,4,3,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,4,3,temp_rho); gkyl_mat_set(&A_T_perp_over_m,4,3,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,4,3,temp_rho); + gkyl_mat_set(&A_Tyy,4,3,temp_rho); + gkyl_mat_set(&A_Tzz,4,3,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,4,3,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[4]+0.5*rho_temp[0]; + + temp_rho = 0.31943828249997*rho[4]+0.5*rho[0]; gkyl_mat_set(&A_ux,4,4,temp_rho); gkyl_mat_set(&A_uy,4,4,temp_rho); gkyl_mat_set(&A_uz,4,4,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,4,4,temp_rho); gkyl_mat_set(&A_T_perp_over_m,4,4,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[4]+0.5*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,4,4,temp_rho); + gkyl_mat_set(&A_Tyy,4,4,temp_rho); + gkyl_mat_set(&A_Tzz,4,4,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[4]+0.5*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,4,4,temp_p_perp); - - temp_rho = 0.5*rho_temp[8]; + + temp_rho = 0.5*rho[8]; gkyl_mat_set(&A_ux,4,5,temp_rho); gkyl_mat_set(&A_uy,4,5,temp_rho); gkyl_mat_set(&A_uz,4,5,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,4,5,temp_rho); gkyl_mat_set(&A_T_perp_over_m,4,5,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[8]; + gkyl_mat_set(&A_Txx,4,5,temp_rho); + gkyl_mat_set(&A_Tyy,4,5,temp_rho); + gkyl_mat_set(&A_Tzz,4,5,temp_rho); + + temp_p_perp = 0.5*p_perp[8]; gkyl_mat_set(&A_T_perp_over_m_inv,4,5,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[6]+0.5000000000000001*rho_temp[2]; + + temp_rho = 0.31943828249997*rho[6]+0.5000000000000001*rho[2]; gkyl_mat_set(&A_ux,4,6,temp_rho); gkyl_mat_set(&A_uy,4,6,temp_rho); gkyl_mat_set(&A_uz,4,6,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,4,6,temp_rho); gkyl_mat_set(&A_T_perp_over_m,4,6,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[6]+0.5000000000000001*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,4,6,temp_rho); + gkyl_mat_set(&A_Tyy,4,6,temp_rho); + gkyl_mat_set(&A_Tzz,4,6,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[6]+0.5000000000000001*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,4,6,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[7]; + + temp_rho = 0.4472135954999579*rho[7]; gkyl_mat_set(&A_ux,4,7,temp_rho); gkyl_mat_set(&A_uy,4,7,temp_rho); gkyl_mat_set(&A_uz,4,7,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,4,7,temp_rho); gkyl_mat_set(&A_T_perp_over_m,4,7,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[7]; + gkyl_mat_set(&A_Txx,4,7,temp_rho); + gkyl_mat_set(&A_Tyy,4,7,temp_rho); + gkyl_mat_set(&A_Tzz,4,7,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[7]; gkyl_mat_set(&A_T_perp_over_m_inv,4,7,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[8]+0.5*rho_temp[5]; + + temp_rho = 0.31943828249997*rho[8]+0.5*rho[5]; gkyl_mat_set(&A_ux,4,8,temp_rho); gkyl_mat_set(&A_uy,4,8,temp_rho); gkyl_mat_set(&A_uz,4,8,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,4,8,temp_rho); gkyl_mat_set(&A_T_perp_over_m,4,8,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[8]+0.5*p_perp_temp[5]; + gkyl_mat_set(&A_Txx,4,8,temp_rho); + gkyl_mat_set(&A_Tyy,4,8,temp_rho); + gkyl_mat_set(&A_Tzz,4,8,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[8]+0.5*p_perp[5]; gkyl_mat_set(&A_T_perp_over_m_inv,4,8,temp_p_perp); - - temp_rho = 0.5*rho_temp[5]; + + temp_rho = 0.5*rho[5]; gkyl_mat_set(&A_ux,5,0,temp_rho); gkyl_mat_set(&A_uy,5,0,temp_rho); gkyl_mat_set(&A_uz,5,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,5,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,5,0,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[5]; + gkyl_mat_set(&A_Txx,5,0,temp_rho); + gkyl_mat_set(&A_Tyy,5,0,temp_rho); + gkyl_mat_set(&A_Tzz,5,0,temp_rho); + + temp_p_perp = 0.5*p_perp[5]; gkyl_mat_set(&A_T_perp_over_m_inv,5,0,temp_p_perp); - - temp_rho = 0.5000000000000001*rho_temp[7]; + + temp_rho = 0.5000000000000001*rho[7]; gkyl_mat_set(&A_ux,5,1,temp_rho); gkyl_mat_set(&A_uy,5,1,temp_rho); gkyl_mat_set(&A_uz,5,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,5,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,5,1,temp_rho); - - temp_p_perp = 0.5000000000000001*p_perp_temp[7]; + gkyl_mat_set(&A_Txx,5,1,temp_rho); + gkyl_mat_set(&A_Tyy,5,1,temp_rho); + gkyl_mat_set(&A_Tzz,5,1,temp_rho); + + temp_p_perp = 0.5000000000000001*p_perp[7]; gkyl_mat_set(&A_T_perp_over_m_inv,5,1,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[2]; + + temp_rho = 0.4472135954999579*rho[2]; gkyl_mat_set(&A_ux,5,2,temp_rho); gkyl_mat_set(&A_uy,5,2,temp_rho); gkyl_mat_set(&A_uz,5,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,5,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,5,2,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,5,2,temp_rho); + gkyl_mat_set(&A_Tyy,5,2,temp_rho); + gkyl_mat_set(&A_Tzz,5,2,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,5,2,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[3]; + + temp_rho = 0.4472135954999579*rho[3]; gkyl_mat_set(&A_ux,5,3,temp_rho); gkyl_mat_set(&A_uy,5,3,temp_rho); gkyl_mat_set(&A_uz,5,3,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,5,3,temp_rho); gkyl_mat_set(&A_T_perp_over_m,5,3,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,5,3,temp_rho); + gkyl_mat_set(&A_Tyy,5,3,temp_rho); + gkyl_mat_set(&A_Tzz,5,3,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,5,3,temp_p_perp); - - temp_rho = 0.5*rho_temp[8]; + + temp_rho = 0.5*rho[8]; gkyl_mat_set(&A_ux,5,4,temp_rho); gkyl_mat_set(&A_uy,5,4,temp_rho); gkyl_mat_set(&A_uz,5,4,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,5,4,temp_rho); gkyl_mat_set(&A_T_perp_over_m,5,4,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[8]; + gkyl_mat_set(&A_Txx,5,4,temp_rho); + gkyl_mat_set(&A_Tyy,5,4,temp_rho); + gkyl_mat_set(&A_Tzz,5,4,temp_rho); + + temp_p_perp = 0.5*p_perp[8]; gkyl_mat_set(&A_T_perp_over_m_inv,5,4,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[5]+0.5*rho_temp[0]; + + temp_rho = 0.31943828249997*rho[5]+0.5*rho[0]; gkyl_mat_set(&A_ux,5,5,temp_rho); gkyl_mat_set(&A_uy,5,5,temp_rho); gkyl_mat_set(&A_uz,5,5,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,5,5,temp_rho); gkyl_mat_set(&A_T_perp_over_m,5,5,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[5]+0.5*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,5,5,temp_rho); + gkyl_mat_set(&A_Tyy,5,5,temp_rho); + gkyl_mat_set(&A_Tzz,5,5,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[5]+0.5*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,5,5,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[6]; + + temp_rho = 0.4472135954999579*rho[6]; gkyl_mat_set(&A_ux,5,6,temp_rho); gkyl_mat_set(&A_uy,5,6,temp_rho); gkyl_mat_set(&A_uz,5,6,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,5,6,temp_rho); gkyl_mat_set(&A_T_perp_over_m,5,6,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[6]; + gkyl_mat_set(&A_Txx,5,6,temp_rho); + gkyl_mat_set(&A_Tyy,5,6,temp_rho); + gkyl_mat_set(&A_Tzz,5,6,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[6]; gkyl_mat_set(&A_T_perp_over_m_inv,5,6,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[7]+0.5000000000000001*rho_temp[1]; + + temp_rho = 0.31943828249997*rho[7]+0.5000000000000001*rho[1]; gkyl_mat_set(&A_ux,5,7,temp_rho); gkyl_mat_set(&A_uy,5,7,temp_rho); gkyl_mat_set(&A_uz,5,7,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,5,7,temp_rho); gkyl_mat_set(&A_T_perp_over_m,5,7,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[7]+0.5000000000000001*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,5,7,temp_rho); + gkyl_mat_set(&A_Tyy,5,7,temp_rho); + gkyl_mat_set(&A_Tzz,5,7,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[7]+0.5000000000000001*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,5,7,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[8]+0.5*rho_temp[4]; + + temp_rho = 0.31943828249997*rho[8]+0.5*rho[4]; gkyl_mat_set(&A_ux,5,8,temp_rho); gkyl_mat_set(&A_uy,5,8,temp_rho); gkyl_mat_set(&A_uz,5,8,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,5,8,temp_rho); gkyl_mat_set(&A_T_perp_over_m,5,8,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[8]+0.5*p_perp_temp[4]; + gkyl_mat_set(&A_Txx,5,8,temp_rho); + gkyl_mat_set(&A_Tyy,5,8,temp_rho); + gkyl_mat_set(&A_Tzz,5,8,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[8]+0.5*p_perp[4]; gkyl_mat_set(&A_T_perp_over_m_inv,5,8,temp_p_perp); - - temp_rho = 0.5*rho_temp[6]; + + temp_rho = 0.5*rho[6]; gkyl_mat_set(&A_ux,6,0,temp_rho); gkyl_mat_set(&A_uy,6,0,temp_rho); gkyl_mat_set(&A_uz,6,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,6,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,6,0,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[6]; + gkyl_mat_set(&A_Txx,6,0,temp_rho); + gkyl_mat_set(&A_Tyy,6,0,temp_rho); + gkyl_mat_set(&A_Tzz,6,0,temp_rho); + + temp_p_perp = 0.5*p_perp[6]; gkyl_mat_set(&A_T_perp_over_m_inv,6,0,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[3]; + + temp_rho = 0.447213595499958*rho[3]; gkyl_mat_set(&A_ux,6,1,temp_rho); gkyl_mat_set(&A_uy,6,1,temp_rho); gkyl_mat_set(&A_uz,6,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,6,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,6,1,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,6,1,temp_rho); + gkyl_mat_set(&A_Tyy,6,1,temp_rho); + gkyl_mat_set(&A_Tzz,6,1,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,6,1,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[8]+0.5000000000000001*rho_temp[4]; + + temp_rho = 0.447213595499958*rho[8]+0.5000000000000001*rho[4]; gkyl_mat_set(&A_ux,6,2,temp_rho); gkyl_mat_set(&A_uy,6,2,temp_rho); gkyl_mat_set(&A_uz,6,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,6,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,6,2,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[8]+0.5000000000000001*p_perp_temp[4]; + gkyl_mat_set(&A_Txx,6,2,temp_rho); + gkyl_mat_set(&A_Tyy,6,2,temp_rho); + gkyl_mat_set(&A_Tzz,6,2,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[8]+0.5000000000000001*p_perp[4]; gkyl_mat_set(&A_T_perp_over_m_inv,6,2,temp_p_perp); - - temp_rho = 0.4*rho_temp[7]+0.447213595499958*rho_temp[1]; + + temp_rho = 0.4*rho[7]+0.447213595499958*rho[1]; gkyl_mat_set(&A_ux,6,3,temp_rho); gkyl_mat_set(&A_uy,6,3,temp_rho); gkyl_mat_set(&A_uz,6,3,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,6,3,temp_rho); gkyl_mat_set(&A_T_perp_over_m,6,3,temp_rho); - - temp_p_perp = 0.4*p_perp_temp[7]+0.447213595499958*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,6,3,temp_rho); + gkyl_mat_set(&A_Tyy,6,3,temp_rho); + gkyl_mat_set(&A_Tzz,6,3,temp_rho); + + temp_p_perp = 0.4*p_perp[7]+0.447213595499958*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,6,3,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[6]+0.5000000000000001*rho_temp[2]; + + temp_rho = 0.31943828249997*rho[6]+0.5000000000000001*rho[2]; gkyl_mat_set(&A_ux,6,4,temp_rho); gkyl_mat_set(&A_uy,6,4,temp_rho); gkyl_mat_set(&A_uz,6,4,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,6,4,temp_rho); gkyl_mat_set(&A_T_perp_over_m,6,4,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[6]+0.5000000000000001*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,6,4,temp_rho); + gkyl_mat_set(&A_Tyy,6,4,temp_rho); + gkyl_mat_set(&A_Tzz,6,4,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[6]+0.5000000000000001*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,6,4,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[6]; + + temp_rho = 0.4472135954999579*rho[6]; gkyl_mat_set(&A_ux,6,5,temp_rho); gkyl_mat_set(&A_uy,6,5,temp_rho); gkyl_mat_set(&A_uz,6,5,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,6,5,temp_rho); gkyl_mat_set(&A_T_perp_over_m,6,5,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[6]; + gkyl_mat_set(&A_Txx,6,5,temp_rho); + gkyl_mat_set(&A_Tyy,6,5,temp_rho); + gkyl_mat_set(&A_Tzz,6,5,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[6]; gkyl_mat_set(&A_T_perp_over_m_inv,6,5,temp_p_perp); - - temp_rho = 0.2857142857142857*rho_temp[8]+0.4472135954999579*rho_temp[5]+0.31943828249997*rho_temp[4]+0.5*rho_temp[0]; + + temp_rho = 0.2857142857142857*rho[8]+0.4472135954999579*rho[5]+0.31943828249997*rho[4]+0.5*rho[0]; gkyl_mat_set(&A_ux,6,6,temp_rho); gkyl_mat_set(&A_uy,6,6,temp_rho); gkyl_mat_set(&A_uz,6,6,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,6,6,temp_rho); gkyl_mat_set(&A_T_perp_over_m,6,6,temp_rho); - - temp_p_perp = 0.2857142857142857*p_perp_temp[8]+0.4472135954999579*p_perp_temp[5]+0.31943828249997*p_perp_temp[4]+0.5*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,6,6,temp_rho); + gkyl_mat_set(&A_Tyy,6,6,temp_rho); + gkyl_mat_set(&A_Tzz,6,6,temp_rho); + + temp_p_perp = 0.2857142857142857*p_perp[8]+0.4472135954999579*p_perp[5]+0.31943828249997*p_perp[4]+0.5*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,6,6,temp_p_perp); - - temp_rho = 0.4*rho_temp[3]; + + temp_rho = 0.4*rho[3]; gkyl_mat_set(&A_ux,6,7,temp_rho); gkyl_mat_set(&A_uy,6,7,temp_rho); gkyl_mat_set(&A_uz,6,7,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,6,7,temp_rho); gkyl_mat_set(&A_T_perp_over_m,6,7,temp_rho); - - temp_p_perp = 0.4*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,6,7,temp_rho); + gkyl_mat_set(&A_Tyy,6,7,temp_rho); + gkyl_mat_set(&A_Tzz,6,7,temp_rho); + + temp_p_perp = 0.4*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,6,7,temp_p_perp); - - temp_rho = 0.2857142857142857*rho_temp[6]+0.447213595499958*rho_temp[2]; + + temp_rho = 0.2857142857142857*rho[6]+0.447213595499958*rho[2]; gkyl_mat_set(&A_ux,6,8,temp_rho); gkyl_mat_set(&A_uy,6,8,temp_rho); gkyl_mat_set(&A_uz,6,8,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,6,8,temp_rho); gkyl_mat_set(&A_T_perp_over_m,6,8,temp_rho); - - temp_p_perp = 0.2857142857142857*p_perp_temp[6]+0.447213595499958*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,6,8,temp_rho); + gkyl_mat_set(&A_Tyy,6,8,temp_rho); + gkyl_mat_set(&A_Tzz,6,8,temp_rho); + + temp_p_perp = 0.2857142857142857*p_perp[6]+0.447213595499958*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,6,8,temp_p_perp); - - temp_rho = 0.5*rho_temp[7]; + + temp_rho = 0.5*rho[7]; gkyl_mat_set(&A_ux,7,0,temp_rho); gkyl_mat_set(&A_uy,7,0,temp_rho); gkyl_mat_set(&A_uz,7,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,7,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,7,0,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[7]; + gkyl_mat_set(&A_Txx,7,0,temp_rho); + gkyl_mat_set(&A_Tyy,7,0,temp_rho); + gkyl_mat_set(&A_Tzz,7,0,temp_rho); + + temp_p_perp = 0.5*p_perp[7]; gkyl_mat_set(&A_T_perp_over_m_inv,7,0,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[8]+0.5000000000000001*rho_temp[5]; + + temp_rho = 0.447213595499958*rho[8]+0.5000000000000001*rho[5]; gkyl_mat_set(&A_ux,7,1,temp_rho); gkyl_mat_set(&A_uy,7,1,temp_rho); gkyl_mat_set(&A_uz,7,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,7,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,7,1,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[8]+0.5000000000000001*p_perp_temp[5]; + gkyl_mat_set(&A_Txx,7,1,temp_rho); + gkyl_mat_set(&A_Tyy,7,1,temp_rho); + gkyl_mat_set(&A_Tzz,7,1,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[8]+0.5000000000000001*p_perp[5]; gkyl_mat_set(&A_T_perp_over_m_inv,7,1,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[3]; + + temp_rho = 0.447213595499958*rho[3]; gkyl_mat_set(&A_ux,7,2,temp_rho); gkyl_mat_set(&A_uy,7,2,temp_rho); gkyl_mat_set(&A_uz,7,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,7,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,7,2,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,7,2,temp_rho); + gkyl_mat_set(&A_Tyy,7,2,temp_rho); + gkyl_mat_set(&A_Tzz,7,2,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,7,2,temp_p_perp); - - temp_rho = 0.4*rho_temp[6]+0.447213595499958*rho_temp[2]; + + temp_rho = 0.4*rho[6]+0.447213595499958*rho[2]; gkyl_mat_set(&A_ux,7,3,temp_rho); gkyl_mat_set(&A_uy,7,3,temp_rho); gkyl_mat_set(&A_uz,7,3,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,7,3,temp_rho); gkyl_mat_set(&A_T_perp_over_m,7,3,temp_rho); - - temp_p_perp = 0.4*p_perp_temp[6]+0.447213595499958*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,7,3,temp_rho); + gkyl_mat_set(&A_Tyy,7,3,temp_rho); + gkyl_mat_set(&A_Tzz,7,3,temp_rho); + + temp_p_perp = 0.4*p_perp[6]+0.447213595499958*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,7,3,temp_p_perp); - - temp_rho = 0.4472135954999579*rho_temp[7]; + + temp_rho = 0.4472135954999579*rho[7]; gkyl_mat_set(&A_ux,7,4,temp_rho); gkyl_mat_set(&A_uy,7,4,temp_rho); gkyl_mat_set(&A_uz,7,4,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,7,4,temp_rho); gkyl_mat_set(&A_T_perp_over_m,7,4,temp_rho); - - temp_p_perp = 0.4472135954999579*p_perp_temp[7]; + gkyl_mat_set(&A_Txx,7,4,temp_rho); + gkyl_mat_set(&A_Tyy,7,4,temp_rho); + gkyl_mat_set(&A_Tzz,7,4,temp_rho); + + temp_p_perp = 0.4472135954999579*p_perp[7]; gkyl_mat_set(&A_T_perp_over_m_inv,7,4,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[7]+0.5000000000000001*rho_temp[1]; + + temp_rho = 0.31943828249997*rho[7]+0.5000000000000001*rho[1]; gkyl_mat_set(&A_ux,7,5,temp_rho); gkyl_mat_set(&A_uy,7,5,temp_rho); gkyl_mat_set(&A_uz,7,5,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,7,5,temp_rho); gkyl_mat_set(&A_T_perp_over_m,7,5,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[7]+0.5000000000000001*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,7,5,temp_rho); + gkyl_mat_set(&A_Tyy,7,5,temp_rho); + gkyl_mat_set(&A_Tzz,7,5,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[7]+0.5000000000000001*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,7,5,temp_p_perp); - - temp_rho = 0.4*rho_temp[3]; + + temp_rho = 0.4*rho[3]; gkyl_mat_set(&A_ux,7,6,temp_rho); gkyl_mat_set(&A_uy,7,6,temp_rho); gkyl_mat_set(&A_uz,7,6,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,7,6,temp_rho); gkyl_mat_set(&A_T_perp_over_m,7,6,temp_rho); - - temp_p_perp = 0.4*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,7,6,temp_rho); + gkyl_mat_set(&A_Tyy,7,6,temp_rho); + gkyl_mat_set(&A_Tzz,7,6,temp_rho); + + temp_p_perp = 0.4*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,7,6,temp_p_perp); - - temp_rho = 0.2857142857142857*rho_temp[8]+0.31943828249997*rho_temp[5]+0.4472135954999579*rho_temp[4]+0.5*rho_temp[0]; + + temp_rho = 0.2857142857142857*rho[8]+0.31943828249997*rho[5]+0.4472135954999579*rho[4]+0.5*rho[0]; gkyl_mat_set(&A_ux,7,7,temp_rho); gkyl_mat_set(&A_uy,7,7,temp_rho); gkyl_mat_set(&A_uz,7,7,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,7,7,temp_rho); gkyl_mat_set(&A_T_perp_over_m,7,7,temp_rho); - - temp_p_perp = 0.2857142857142857*p_perp_temp[8]+0.31943828249997*p_perp_temp[5]+0.4472135954999579*p_perp_temp[4]+0.5*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,7,7,temp_rho); + gkyl_mat_set(&A_Tyy,7,7,temp_rho); + gkyl_mat_set(&A_Tzz,7,7,temp_rho); + + temp_p_perp = 0.2857142857142857*p_perp[8]+0.31943828249997*p_perp[5]+0.4472135954999579*p_perp[4]+0.5*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,7,7,temp_p_perp); - - temp_rho = 0.2857142857142857*rho_temp[7]+0.447213595499958*rho_temp[1]; + + temp_rho = 0.2857142857142857*rho[7]+0.447213595499958*rho[1]; gkyl_mat_set(&A_ux,7,8,temp_rho); gkyl_mat_set(&A_uy,7,8,temp_rho); gkyl_mat_set(&A_uz,7,8,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,7,8,temp_rho); gkyl_mat_set(&A_T_perp_over_m,7,8,temp_rho); - - temp_p_perp = 0.2857142857142857*p_perp_temp[7]+0.447213595499958*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,7,8,temp_rho); + gkyl_mat_set(&A_Tyy,7,8,temp_rho); + gkyl_mat_set(&A_Tzz,7,8,temp_rho); + + temp_p_perp = 0.2857142857142857*p_perp[7]+0.447213595499958*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,7,8,temp_p_perp); - - temp_rho = 0.5*rho_temp[8]; + + temp_rho = 0.5*rho[8]; gkyl_mat_set(&A_ux,8,0,temp_rho); gkyl_mat_set(&A_uy,8,0,temp_rho); gkyl_mat_set(&A_uz,8,0,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,8,0,temp_rho); gkyl_mat_set(&A_T_perp_over_m,8,0,temp_rho); - - temp_p_perp = 0.5*p_perp_temp[8]; + gkyl_mat_set(&A_Txx,8,0,temp_rho); + gkyl_mat_set(&A_Tyy,8,0,temp_rho); + gkyl_mat_set(&A_Tzz,8,0,temp_rho); + + temp_p_perp = 0.5*p_perp[8]; gkyl_mat_set(&A_T_perp_over_m_inv,8,0,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[7]; + + temp_rho = 0.447213595499958*rho[7]; gkyl_mat_set(&A_ux,8,1,temp_rho); gkyl_mat_set(&A_uy,8,1,temp_rho); gkyl_mat_set(&A_uz,8,1,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,8,1,temp_rho); gkyl_mat_set(&A_T_perp_over_m,8,1,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[7]; + gkyl_mat_set(&A_Txx,8,1,temp_rho); + gkyl_mat_set(&A_Tyy,8,1,temp_rho); + gkyl_mat_set(&A_Tzz,8,1,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[7]; gkyl_mat_set(&A_T_perp_over_m_inv,8,1,temp_p_perp); - - temp_rho = 0.447213595499958*rho_temp[6]; + + temp_rho = 0.447213595499958*rho[6]; gkyl_mat_set(&A_ux,8,2,temp_rho); gkyl_mat_set(&A_uy,8,2,temp_rho); gkyl_mat_set(&A_uz,8,2,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,8,2,temp_rho); gkyl_mat_set(&A_T_perp_over_m,8,2,temp_rho); - - temp_p_perp = 0.447213595499958*p_perp_temp[6]; + gkyl_mat_set(&A_Txx,8,2,temp_rho); + gkyl_mat_set(&A_Tyy,8,2,temp_rho); + gkyl_mat_set(&A_Tzz,8,2,temp_rho); + + temp_p_perp = 0.447213595499958*p_perp[6]; gkyl_mat_set(&A_T_perp_over_m_inv,8,2,temp_p_perp); - - temp_rho = 0.4*rho_temp[3]; + + temp_rho = 0.4*rho[3]; gkyl_mat_set(&A_ux,8,3,temp_rho); gkyl_mat_set(&A_uy,8,3,temp_rho); gkyl_mat_set(&A_uz,8,3,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,8,3,temp_rho); gkyl_mat_set(&A_T_perp_over_m,8,3,temp_rho); - - temp_p_perp = 0.4*p_perp_temp[3]; + gkyl_mat_set(&A_Txx,8,3,temp_rho); + gkyl_mat_set(&A_Tyy,8,3,temp_rho); + gkyl_mat_set(&A_Tzz,8,3,temp_rho); + + temp_p_perp = 0.4*p_perp[3]; gkyl_mat_set(&A_T_perp_over_m_inv,8,3,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[8]+0.5*rho_temp[5]; + + temp_rho = 0.31943828249997*rho[8]+0.5*rho[5]; gkyl_mat_set(&A_ux,8,4,temp_rho); gkyl_mat_set(&A_uy,8,4,temp_rho); gkyl_mat_set(&A_uz,8,4,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,8,4,temp_rho); gkyl_mat_set(&A_T_perp_over_m,8,4,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[8]+0.5*p_perp_temp[5]; + gkyl_mat_set(&A_Txx,8,4,temp_rho); + gkyl_mat_set(&A_Tyy,8,4,temp_rho); + gkyl_mat_set(&A_Tzz,8,4,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[8]+0.5*p_perp[5]; gkyl_mat_set(&A_T_perp_over_m_inv,8,4,temp_p_perp); - - temp_rho = 0.31943828249997*rho_temp[8]+0.5*rho_temp[4]; + + temp_rho = 0.31943828249997*rho[8]+0.5*rho[4]; gkyl_mat_set(&A_ux,8,5,temp_rho); gkyl_mat_set(&A_uy,8,5,temp_rho); gkyl_mat_set(&A_uz,8,5,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,8,5,temp_rho); gkyl_mat_set(&A_T_perp_over_m,8,5,temp_rho); - - temp_p_perp = 0.31943828249997*p_perp_temp[8]+0.5*p_perp_temp[4]; + gkyl_mat_set(&A_Txx,8,5,temp_rho); + gkyl_mat_set(&A_Tyy,8,5,temp_rho); + gkyl_mat_set(&A_Tzz,8,5,temp_rho); + + temp_p_perp = 0.31943828249997*p_perp[8]+0.5*p_perp[4]; gkyl_mat_set(&A_T_perp_over_m_inv,8,5,temp_p_perp); - - temp_rho = 0.2857142857142857*rho_temp[6]+0.447213595499958*rho_temp[2]; + + temp_rho = 0.2857142857142857*rho[6]+0.447213595499958*rho[2]; gkyl_mat_set(&A_ux,8,6,temp_rho); gkyl_mat_set(&A_uy,8,6,temp_rho); gkyl_mat_set(&A_uz,8,6,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,8,6,temp_rho); gkyl_mat_set(&A_T_perp_over_m,8,6,temp_rho); - - temp_p_perp = 0.2857142857142857*p_perp_temp[6]+0.447213595499958*p_perp_temp[2]; + gkyl_mat_set(&A_Txx,8,6,temp_rho); + gkyl_mat_set(&A_Tyy,8,6,temp_rho); + gkyl_mat_set(&A_Tzz,8,6,temp_rho); + + temp_p_perp = 0.2857142857142857*p_perp[6]+0.447213595499958*p_perp[2]; gkyl_mat_set(&A_T_perp_over_m_inv,8,6,temp_p_perp); - - temp_rho = 0.2857142857142857*rho_temp[7]+0.447213595499958*rho_temp[1]; + + temp_rho = 0.2857142857142857*rho[7]+0.447213595499958*rho[1]; gkyl_mat_set(&A_ux,8,7,temp_rho); gkyl_mat_set(&A_uy,8,7,temp_rho); gkyl_mat_set(&A_uz,8,7,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,8,7,temp_rho); gkyl_mat_set(&A_T_perp_over_m,8,7,temp_rho); - - temp_p_perp = 0.2857142857142857*p_perp_temp[7]+0.447213595499958*p_perp_temp[1]; + gkyl_mat_set(&A_Txx,8,7,temp_rho); + gkyl_mat_set(&A_Tyy,8,7,temp_rho); + gkyl_mat_set(&A_Tzz,8,7,temp_rho); + + temp_p_perp = 0.2857142857142857*p_perp[7]+0.447213595499958*p_perp[1]; gkyl_mat_set(&A_T_perp_over_m_inv,8,7,temp_p_perp); - - temp_rho = 0.2040816326530612*rho_temp[8]+0.31943828249997*rho_temp[5]+0.31943828249997*rho_temp[4]+0.5*rho_temp[0]; + + temp_rho = 0.2040816326530612*rho[8]+0.31943828249997*rho[5]+0.31943828249997*rho[4]+0.5*rho[0]; gkyl_mat_set(&A_ux,8,8,temp_rho); gkyl_mat_set(&A_uy,8,8,temp_rho); gkyl_mat_set(&A_uz,8,8,temp_rho); gkyl_mat_set(&A_pkpm_div_ppar,8,8,temp_rho); gkyl_mat_set(&A_T_perp_over_m,8,8,temp_rho); - - temp_p_perp = 0.2040816326530612*p_perp_temp[8]+0.31943828249997*p_perp_temp[5]+0.31943828249997*p_perp_temp[4]+0.5*p_perp_temp[0]; + gkyl_mat_set(&A_Txx,8,8,temp_rho); + gkyl_mat_set(&A_Tyy,8,8,temp_rho); + gkyl_mat_set(&A_Tzz,8,8,temp_rho); + + temp_p_perp = 0.2040816326530612*p_perp[8]+0.31943828249997*p_perp[5]+0.31943828249997*p_perp[4]+0.5*p_perp[0]; gkyl_mat_set(&A_T_perp_over_m_inv,8,8,temp_p_perp); - + return cell_avg; } diff --git a/kernels/pkpm/pkpm_vars_set_3x_ser_p1.c b/kernels/pkpm/pkpm_vars_set_3x_ser_p1.c index 2f2550295..ccfe8c7b5 100644 --- a/kernels/pkpm/pkpm_vars_set_3x_ser_p1.c +++ b/kernels/pkpm/pkpm_vars_set_3x_ser_p1.c @@ -3,13 +3,15 @@ #include #include GKYL_CU_DH int pkpm_vars_set_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, const double *pkpm_div_ppar) + const double *vlasov_pkpm_moms, const double *euler_pkpm, + const double *p_ij, const double *pkpm_div_ppar) { // count: integer to indicate which matrix being fetched. // A: preallocated LHS matrix. // rhs: preallocated RHS vector. // vlasov_pkpm_moms: [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. // euler_pkpm: [rho ux, rho uy, rho uz], Fluid input state vector. + // p_ij: p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. // pkpm_div_ppar: div(p_par b) computed from kinetic equation for consistency. // For poly_order = 1, we can analytically invert the matrix and just store the solution @@ -19,6 +21,9 @@ GKYL_CU_DH int pkpm_vars_set_3x_ser_p1(int count, struct gkyl_nmat *A, struct gk struct gkyl_mat rhs_pkpm_div_ppar = gkyl_nmat_get(rhs, count+3); struct gkyl_mat rhs_T_perp_over_m = gkyl_nmat_get(rhs, count+4); struct gkyl_mat rhs_T_perp_over_m_inv = gkyl_nmat_get(rhs, count+5); + struct gkyl_mat rhs_Txx = gkyl_nmat_get(rhs, count+6); + struct gkyl_mat rhs_Tyy = gkyl_nmat_get(rhs, count+7); + struct gkyl_mat rhs_Tzz = gkyl_nmat_get(rhs, count+8); // Clear rhs for each component of primitive variables being solved for gkyl_mat_clear(&rhs_ux, 0.0); gkyl_mat_clear(&rhs_uy, 0.0); @@ -26,40 +31,50 @@ GKYL_CU_DH int pkpm_vars_set_3x_ser_p1(int count, struct gkyl_nmat *A, struct gk gkyl_mat_clear(&rhs_pkpm_div_ppar, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m, 0.0); gkyl_mat_clear(&rhs_T_perp_over_m_inv, 0.0); + gkyl_mat_clear(&rhs_Txx, 0.0); + gkyl_mat_clear(&rhs_Tyy, 0.0); + gkyl_mat_clear(&rhs_Tzz, 0.0); const double *rhoux = &euler_pkpm[0]; const double *rhouy = &euler_pkpm[8]; const double *rhouz = &euler_pkpm[16]; const double *rho = &vlasov_pkpm_moms[0]; + const double *p_par = &vlasov_pkpm_moms[8]; const double *p_perp = &vlasov_pkpm_moms[16]; + const double *Pxx = &p_ij[0]; + const double *Pyy = &p_ij[24]; + const double *Pzz = &p_ij[40]; + int cell_avg = 0; // Check if rho, p_par, or p_perp < 0 at control points. + // *THIS IS ONLY A CHECK RIGHT NOW AND UNUSED* if ((-1.837117307087383*rho[7])+1.060660171779821*rho[6]+1.060660171779821*rho[5]+1.060660171779821*rho[4]-0.6123724356957944*rho[3]-0.6123724356957944*rho[2]-0.6123724356957944*rho[1]+0.3535533905932737*rho[0] < 0.0) cell_avg = 1; + if ((-1.837117307087383*p_par[7])+1.060660171779821*p_par[6]+1.060660171779821*p_par[5]+1.060660171779821*p_par[4]-0.6123724356957944*p_par[3]-0.6123724356957944*p_par[2]-0.6123724356957944*p_par[1]+0.3535533905932737*p_par[0] < 0.0) cell_avg = 1; if ((-1.837117307087383*p_perp[7])+1.060660171779821*p_perp[6]+1.060660171779821*p_perp[5]+1.060660171779821*p_perp[4]-0.6123724356957944*p_perp[3]-0.6123724356957944*p_perp[2]-0.6123724356957944*p_perp[1]+0.3535533905932737*p_perp[0] < 0.0) cell_avg = 1; if (1.837117307087383*rho[7]+1.060660171779821*rho[6]-1.060660171779821*rho[5]-1.060660171779821*rho[4]-0.6123724356957944*rho[3]-0.6123724356957944*rho[2]+0.6123724356957944*rho[1]+0.3535533905932737*rho[0] < 0.0) cell_avg = 1; + if (1.837117307087383*p_par[7]+1.060660171779821*p_par[6]-1.060660171779821*p_par[5]-1.060660171779821*p_par[4]-0.6123724356957944*p_par[3]-0.6123724356957944*p_par[2]+0.6123724356957944*p_par[1]+0.3535533905932737*p_par[0] < 0.0) cell_avg = 1; if (1.837117307087383*p_perp[7]+1.060660171779821*p_perp[6]-1.060660171779821*p_perp[5]-1.060660171779821*p_perp[4]-0.6123724356957944*p_perp[3]-0.6123724356957944*p_perp[2]+0.6123724356957944*p_perp[1]+0.3535533905932737*p_perp[0] < 0.0) cell_avg = 1; if (1.837117307087383*rho[7]-1.060660171779821*rho[6]+1.060660171779821*rho[5]-1.060660171779821*rho[4]-0.6123724356957944*rho[3]+0.6123724356957944*rho[2]-0.6123724356957944*rho[1]+0.3535533905932737*rho[0] < 0.0) cell_avg = 1; + if (1.837117307087383*p_par[7]-1.060660171779821*p_par[6]+1.060660171779821*p_par[5]-1.060660171779821*p_par[4]-0.6123724356957944*p_par[3]+0.6123724356957944*p_par[2]-0.6123724356957944*p_par[1]+0.3535533905932737*p_par[0] < 0.0) cell_avg = 1; if (1.837117307087383*p_perp[7]-1.060660171779821*p_perp[6]+1.060660171779821*p_perp[5]-1.060660171779821*p_perp[4]-0.6123724356957944*p_perp[3]+0.6123724356957944*p_perp[2]-0.6123724356957944*p_perp[1]+0.3535533905932737*p_perp[0] < 0.0) cell_avg = 1; if ((-1.837117307087383*rho[7])-1.060660171779821*rho[6]-1.060660171779821*rho[5]+1.060660171779821*rho[4]-0.6123724356957944*rho[3]+0.6123724356957944*rho[2]+0.6123724356957944*rho[1]+0.3535533905932737*rho[0] < 0.0) cell_avg = 1; + if ((-1.837117307087383*p_par[7])-1.060660171779821*p_par[6]-1.060660171779821*p_par[5]+1.060660171779821*p_par[4]-0.6123724356957944*p_par[3]+0.6123724356957944*p_par[2]+0.6123724356957944*p_par[1]+0.3535533905932737*p_par[0] < 0.0) cell_avg = 1; if ((-1.837117307087383*p_perp[7])-1.060660171779821*p_perp[6]-1.060660171779821*p_perp[5]+1.060660171779821*p_perp[4]-0.6123724356957944*p_perp[3]+0.6123724356957944*p_perp[2]+0.6123724356957944*p_perp[1]+0.3535533905932737*p_perp[0] < 0.0) cell_avg = 1; if (1.837117307087383*rho[7]-1.060660171779821*rho[6]-1.060660171779821*rho[5]+1.060660171779821*rho[4]+0.6123724356957944*rho[3]-0.6123724356957944*rho[2]-0.6123724356957944*rho[1]+0.3535533905932737*rho[0] < 0.0) cell_avg = 1; + if (1.837117307087383*p_par[7]-1.060660171779821*p_par[6]-1.060660171779821*p_par[5]+1.060660171779821*p_par[4]+0.6123724356957944*p_par[3]-0.6123724356957944*p_par[2]-0.6123724356957944*p_par[1]+0.3535533905932737*p_par[0] < 0.0) cell_avg = 1; if (1.837117307087383*p_perp[7]-1.060660171779821*p_perp[6]-1.060660171779821*p_perp[5]+1.060660171779821*p_perp[4]+0.6123724356957944*p_perp[3]-0.6123724356957944*p_perp[2]-0.6123724356957944*p_perp[1]+0.3535533905932737*p_perp[0] < 0.0) cell_avg = 1; if ((-1.837117307087383*rho[7])-1.060660171779821*rho[6]+1.060660171779821*rho[5]-1.060660171779821*rho[4]+0.6123724356957944*rho[3]-0.6123724356957944*rho[2]+0.6123724356957944*rho[1]+0.3535533905932737*rho[0] < 0.0) cell_avg = 1; + if ((-1.837117307087383*p_par[7])-1.060660171779821*p_par[6]+1.060660171779821*p_par[5]-1.060660171779821*p_par[4]+0.6123724356957944*p_par[3]-0.6123724356957944*p_par[2]+0.6123724356957944*p_par[1]+0.3535533905932737*p_par[0] < 0.0) cell_avg = 1; if ((-1.837117307087383*p_perp[7])-1.060660171779821*p_perp[6]+1.060660171779821*p_perp[5]-1.060660171779821*p_perp[4]+0.6123724356957944*p_perp[3]-0.6123724356957944*p_perp[2]+0.6123724356957944*p_perp[1]+0.3535533905932737*p_perp[0] < 0.0) cell_avg = 1; if ((-1.837117307087383*rho[7])+1.060660171779821*rho[6]-1.060660171779821*rho[5]-1.060660171779821*rho[4]+0.6123724356957944*rho[3]+0.6123724356957944*rho[2]-0.6123724356957944*rho[1]+0.3535533905932737*rho[0] < 0.0) cell_avg = 1; + if ((-1.837117307087383*p_par[7])+1.060660171779821*p_par[6]-1.060660171779821*p_par[5]-1.060660171779821*p_par[4]+0.6123724356957944*p_par[3]+0.6123724356957944*p_par[2]-0.6123724356957944*p_par[1]+0.3535533905932737*p_par[0] < 0.0) cell_avg = 1; if ((-1.837117307087383*p_perp[7])+1.060660171779821*p_perp[6]-1.060660171779821*p_perp[5]-1.060660171779821*p_perp[4]+0.6123724356957944*p_perp[3]+0.6123724356957944*p_perp[2]-0.6123724356957944*p_perp[1]+0.3535533905932737*p_perp[0] < 0.0) cell_avg = 1; if (1.837117307087383*rho[7]+1.060660171779821*rho[6]+1.060660171779821*rho[5]+1.060660171779821*rho[4]+0.6123724356957944*rho[3]+0.6123724356957944*rho[2]+0.6123724356957944*rho[1]+0.3535533905932737*rho[0] < 0.0) cell_avg = 1; + if (1.837117307087383*p_par[7]+1.060660171779821*p_par[6]+1.060660171779821*p_par[5]+1.060660171779821*p_par[4]+0.6123724356957944*p_par[3]+0.6123724356957944*p_par[2]+0.6123724356957944*p_par[1]+0.3535533905932737*p_par[0] < 0.0) cell_avg = 1; if (1.837117307087383*p_perp[7]+1.060660171779821*p_perp[6]+1.060660171779821*p_perp[5]+1.060660171779821*p_perp[4]+0.6123724356957944*p_perp[3]+0.6123724356957944*p_perp[2]+0.6123724356957944*p_perp[1]+0.3535533905932737*p_perp[0] < 0.0) cell_avg = 1; double rho_inv[8] = {0.0}; double p_perp_inv[8] = {0.0}; - if (cell_avg) { - // If rho or p_perp < 0 at control points, only use cell average. - rho_inv[0] = 8.0/rho[0]; - p_perp_inv[0] = 8.0/p_perp[0]; - } else { ser_3x_p1_inv(rho, rho_inv); ser_3x_p1_inv(p_perp, p_perp_inv); - } - // Calculate expansions of primitive variables, which can be calculated free of aliasing errors. double ux[8] = {0.0}; double uy[8] = {0.0}; @@ -67,6 +82,9 @@ GKYL_CU_DH int pkpm_vars_set_3x_ser_p1(int count, struct gkyl_nmat *A, struct gk double p_force[8] = {0.0}; double T_perp_over_m[8] = {0.0}; double T_perp_over_m_inv[8] = {0.0}; + double Txx[8] = {0.0}; + double Tyy[8] = {0.0}; + double Tzz[8] = {0.0}; binop_mul_3d_ser_p1(rho_inv, rhoux, ux); binop_mul_3d_ser_p1(rho_inv, rhouy, uy); @@ -74,106 +92,82 @@ GKYL_CU_DH int pkpm_vars_set_3x_ser_p1(int count, struct gkyl_nmat *A, struct gk binop_mul_3d_ser_p1(rho_inv, pkpm_div_ppar, p_force); binop_mul_3d_ser_p1(rho_inv, p_perp, T_perp_over_m); binop_mul_3d_ser_p1(p_perp_inv, rho, T_perp_over_m_inv); + binop_mul_3d_ser_p1(rho_inv, Pxx, Txx); + binop_mul_3d_ser_p1(rho_inv, Pyy, Tyy); + binop_mul_3d_ser_p1(rho_inv, Pzz, Tzz); - if (cell_avg) { - gkyl_mat_set(&rhs_ux,0,0,ux[0]); - gkyl_mat_set(&rhs_uy,0,0,uy[0]); - gkyl_mat_set(&rhs_uz,0,0,uz[0]); - gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,p_force[0]); - gkyl_mat_set(&rhs_T_perp_over_m,0,0,T_perp_over_m[0]); - gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,T_perp_over_m_inv[0]); - gkyl_mat_set(&rhs_ux,1,0,0.0); - gkyl_mat_set(&rhs_uy,1,0,0.0); - gkyl_mat_set(&rhs_uz,1,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,1,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,0.0); - gkyl_mat_set(&rhs_ux,2,0,0.0); - gkyl_mat_set(&rhs_uy,2,0,0.0); - gkyl_mat_set(&rhs_uz,2,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,2,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,0.0); - gkyl_mat_set(&rhs_ux,3,0,0.0); - gkyl_mat_set(&rhs_uy,3,0,0.0); - gkyl_mat_set(&rhs_uz,3,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,3,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,3,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,3,0,0.0); - gkyl_mat_set(&rhs_ux,4,0,0.0); - gkyl_mat_set(&rhs_uy,4,0,0.0); - gkyl_mat_set(&rhs_uz,4,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,4,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,4,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,4,0,0.0); - gkyl_mat_set(&rhs_ux,5,0,0.0); - gkyl_mat_set(&rhs_uy,5,0,0.0); - gkyl_mat_set(&rhs_uz,5,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,5,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,5,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,5,0,0.0); - gkyl_mat_set(&rhs_ux,6,0,0.0); - gkyl_mat_set(&rhs_uy,6,0,0.0); - gkyl_mat_set(&rhs_uz,6,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,6,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,6,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,6,0,0.0); - gkyl_mat_set(&rhs_ux,7,0,0.0); - gkyl_mat_set(&rhs_uy,7,0,0.0); - gkyl_mat_set(&rhs_uz,7,0,0.0); - gkyl_mat_set(&rhs_pkpm_div_ppar,7,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m,7,0,0.0); - gkyl_mat_set(&rhs_T_perp_over_m_inv,7,0,0.0); - } else { gkyl_mat_set(&rhs_ux,0,0,ux[0]); gkyl_mat_set(&rhs_uy,0,0,uy[0]); gkyl_mat_set(&rhs_uz,0,0,uz[0]); gkyl_mat_set(&rhs_pkpm_div_ppar,0,0,p_force[0]); gkyl_mat_set(&rhs_T_perp_over_m,0,0,T_perp_over_m[0]); gkyl_mat_set(&rhs_T_perp_over_m_inv,0,0,T_perp_over_m_inv[0]); + gkyl_mat_set(&rhs_Txx,0,0,Txx[0]); + gkyl_mat_set(&rhs_Tyy,0,0,Tyy[0]); + gkyl_mat_set(&rhs_Tzz,0,0,Tzz[0]); gkyl_mat_set(&rhs_ux,1,0,ux[1]); gkyl_mat_set(&rhs_uy,1,0,uy[1]); gkyl_mat_set(&rhs_uz,1,0,uz[1]); gkyl_mat_set(&rhs_pkpm_div_ppar,1,0,p_force[1]); gkyl_mat_set(&rhs_T_perp_over_m,1,0,T_perp_over_m[1]); gkyl_mat_set(&rhs_T_perp_over_m_inv,1,0,T_perp_over_m_inv[1]); + gkyl_mat_set(&rhs_Txx,1,0,Txx[1]); + gkyl_mat_set(&rhs_Tyy,1,0,Tyy[1]); + gkyl_mat_set(&rhs_Tzz,1,0,Tzz[1]); gkyl_mat_set(&rhs_ux,2,0,ux[2]); gkyl_mat_set(&rhs_uy,2,0,uy[2]); gkyl_mat_set(&rhs_uz,2,0,uz[2]); gkyl_mat_set(&rhs_pkpm_div_ppar,2,0,p_force[2]); gkyl_mat_set(&rhs_T_perp_over_m,2,0,T_perp_over_m[2]); gkyl_mat_set(&rhs_T_perp_over_m_inv,2,0,T_perp_over_m_inv[2]); + gkyl_mat_set(&rhs_Txx,2,0,Txx[2]); + gkyl_mat_set(&rhs_Tyy,2,0,Tyy[2]); + gkyl_mat_set(&rhs_Tzz,2,0,Tzz[2]); gkyl_mat_set(&rhs_ux,3,0,ux[3]); gkyl_mat_set(&rhs_uy,3,0,uy[3]); gkyl_mat_set(&rhs_uz,3,0,uz[3]); gkyl_mat_set(&rhs_pkpm_div_ppar,3,0,p_force[3]); gkyl_mat_set(&rhs_T_perp_over_m,3,0,T_perp_over_m[3]); gkyl_mat_set(&rhs_T_perp_over_m_inv,3,0,T_perp_over_m_inv[3]); + gkyl_mat_set(&rhs_Txx,3,0,Txx[3]); + gkyl_mat_set(&rhs_Tyy,3,0,Tyy[3]); + gkyl_mat_set(&rhs_Tzz,3,0,Tzz[3]); gkyl_mat_set(&rhs_ux,4,0,ux[4]); gkyl_mat_set(&rhs_uy,4,0,uy[4]); gkyl_mat_set(&rhs_uz,4,0,uz[4]); gkyl_mat_set(&rhs_pkpm_div_ppar,4,0,p_force[4]); gkyl_mat_set(&rhs_T_perp_over_m,4,0,T_perp_over_m[4]); gkyl_mat_set(&rhs_T_perp_over_m_inv,4,0,T_perp_over_m_inv[4]); + gkyl_mat_set(&rhs_Txx,4,0,Txx[4]); + gkyl_mat_set(&rhs_Tyy,4,0,Tyy[4]); + gkyl_mat_set(&rhs_Tzz,4,0,Tzz[4]); gkyl_mat_set(&rhs_ux,5,0,ux[5]); gkyl_mat_set(&rhs_uy,5,0,uy[5]); gkyl_mat_set(&rhs_uz,5,0,uz[5]); gkyl_mat_set(&rhs_pkpm_div_ppar,5,0,p_force[5]); gkyl_mat_set(&rhs_T_perp_over_m,5,0,T_perp_over_m[5]); gkyl_mat_set(&rhs_T_perp_over_m_inv,5,0,T_perp_over_m_inv[5]); + gkyl_mat_set(&rhs_Txx,5,0,Txx[5]); + gkyl_mat_set(&rhs_Tyy,5,0,Tyy[5]); + gkyl_mat_set(&rhs_Tzz,5,0,Tzz[5]); gkyl_mat_set(&rhs_ux,6,0,ux[6]); gkyl_mat_set(&rhs_uy,6,0,uy[6]); gkyl_mat_set(&rhs_uz,6,0,uz[6]); gkyl_mat_set(&rhs_pkpm_div_ppar,6,0,p_force[6]); gkyl_mat_set(&rhs_T_perp_over_m,6,0,T_perp_over_m[6]); gkyl_mat_set(&rhs_T_perp_over_m_inv,6,0,T_perp_over_m_inv[6]); + gkyl_mat_set(&rhs_Txx,6,0,Txx[6]); + gkyl_mat_set(&rhs_Tyy,6,0,Tyy[6]); + gkyl_mat_set(&rhs_Tzz,6,0,Tzz[6]); gkyl_mat_set(&rhs_ux,7,0,ux[7]); gkyl_mat_set(&rhs_uy,7,0,uy[7]); gkyl_mat_set(&rhs_uz,7,0,uz[7]); gkyl_mat_set(&rhs_pkpm_div_ppar,7,0,p_force[7]); gkyl_mat_set(&rhs_T_perp_over_m,7,0,T_perp_over_m[7]); gkyl_mat_set(&rhs_T_perp_over_m_inv,7,0,T_perp_over_m_inv[7]); - } + gkyl_mat_set(&rhs_Txx,7,0,Txx[7]); + gkyl_mat_set(&rhs_Tyy,7,0,Tyy[7]); + gkyl_mat_set(&rhs_Tzz,7,0,Tzz[7]); return cell_avg; } diff --git a/kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p1.c b/kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p1.c deleted file mode 100644 index d20227aa9..000000000 --- a/kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p1.c +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include -GKYL_CU_DH void pkpm_vars_surf_copy_1x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf) -{ - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim_surf: Primitive variables at surfaces. - - struct gkyl_mat x_ux_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_ux_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_uy_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_uy_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_uz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_uz_xr = gkyl_nmat_get(x, count+5); - struct gkyl_mat x_Txx_xl = gkyl_nmat_get(x, count+6); - struct gkyl_mat x_Txx_xr = gkyl_nmat_get(x, count+7); - - double *ux_xl = &prim_surf[0]; - double *ux_xr = &prim_surf[1]; - double *uy_xl = &prim_surf[2]; - double *uy_xr = &prim_surf[3]; - double *uz_xl = &prim_surf[4]; - double *uz_xr = &prim_surf[5]; - double *Txx_xl = &prim_surf[6]; - double *Txx_xr = &prim_surf[7]; - - ux_xl[0] = gkyl_mat_get(&x_ux_xl,0,0); - ux_xr[0] = gkyl_mat_get(&x_ux_xr,0,0); - uy_xl[0] = gkyl_mat_get(&x_uy_xl,0,0); - uy_xr[0] = gkyl_mat_get(&x_uy_xr,0,0); - uz_xl[0] = gkyl_mat_get(&x_uz_xl,0,0); - uz_xr[0] = gkyl_mat_get(&x_uz_xr,0,0); - Txx_xl[0] = gkyl_mat_get(&x_Txx_xl,0,0); - Txx_xr[0] = gkyl_mat_get(&x_Txx_xr,0,0); - -} - diff --git a/kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p2.c b/kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p2.c deleted file mode 100644 index c863dfd5c..000000000 --- a/kernels/pkpm/pkpm_vars_surf_copy_1x_ser_p2.c +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include -GKYL_CU_DH void pkpm_vars_surf_copy_1x_ser_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf) -{ - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim_surf: Primitive variables at surfaces. - - struct gkyl_mat x_ux_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_ux_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_uy_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_uy_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_uz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_uz_xr = gkyl_nmat_get(x, count+5); - struct gkyl_mat x_Txx_xl = gkyl_nmat_get(x, count+6); - struct gkyl_mat x_Txx_xr = gkyl_nmat_get(x, count+7); - - double *ux_xl = &prim_surf[0]; - double *ux_xr = &prim_surf[1]; - double *uy_xl = &prim_surf[2]; - double *uy_xr = &prim_surf[3]; - double *uz_xl = &prim_surf[4]; - double *uz_xr = &prim_surf[5]; - double *Txx_xl = &prim_surf[6]; - double *Txx_xr = &prim_surf[7]; - - ux_xl[0] = gkyl_mat_get(&x_ux_xl,0,0); - ux_xr[0] = gkyl_mat_get(&x_ux_xr,0,0); - uy_xl[0] = gkyl_mat_get(&x_uy_xl,0,0); - uy_xr[0] = gkyl_mat_get(&x_uy_xr,0,0); - uz_xl[0] = gkyl_mat_get(&x_uz_xl,0,0); - uz_xr[0] = gkyl_mat_get(&x_uz_xr,0,0); - Txx_xl[0] = gkyl_mat_get(&x_Txx_xl,0,0); - Txx_xr[0] = gkyl_mat_get(&x_Txx_xr,0,0); - -} - diff --git a/kernels/pkpm/pkpm_vars_surf_copy_2x_ser_p1.c b/kernels/pkpm/pkpm_vars_surf_copy_2x_ser_p1.c deleted file mode 100644 index 3b6b8b8ea..000000000 --- a/kernels/pkpm/pkpm_vars_surf_copy_2x_ser_p1.c +++ /dev/null @@ -1,82 +0,0 @@ -#include -#include -GKYL_CU_DH void pkpm_vars_surf_copy_2x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf) -{ - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim_surf: Primitive variables at surfaces. - - struct gkyl_mat x_ux_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_ux_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_uy_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_uy_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_uz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_uz_xr = gkyl_nmat_get(x, count+5); - struct gkyl_mat x_Txx_xl = gkyl_nmat_get(x, count+6); - struct gkyl_mat x_Txx_xr = gkyl_nmat_get(x, count+7); - - double *ux_xl = &prim_surf[0]; - double *ux_xr = &prim_surf[2]; - double *uy_xl = &prim_surf[4]; - double *uy_xr = &prim_surf[6]; - double *uz_xl = &prim_surf[8]; - double *uz_xr = &prim_surf[10]; - double *Txx_xl = &prim_surf[12]; - double *Txx_xr = &prim_surf[14]; - - struct gkyl_mat x_ux_yl = gkyl_nmat_get(x, count+8); - struct gkyl_mat x_ux_yr = gkyl_nmat_get(x, count+9); - struct gkyl_mat x_uy_yl = gkyl_nmat_get(x, count+10); - struct gkyl_mat x_uy_yr = gkyl_nmat_get(x, count+11); - struct gkyl_mat x_uz_yl = gkyl_nmat_get(x, count+12); - struct gkyl_mat x_uz_yr = gkyl_nmat_get(x, count+13); - struct gkyl_mat x_Tyy_yl = gkyl_nmat_get(x, count+14); - struct gkyl_mat x_Tyy_yr = gkyl_nmat_get(x, count+15); - - double *ux_yl = &prim_surf[16]; - double *ux_yr = &prim_surf[18]; - double *uy_yl = &prim_surf[20]; - double *uy_yr = &prim_surf[22]; - double *uz_yl = &prim_surf[24]; - double *uz_yr = &prim_surf[26]; - double *Tyy_yl = &prim_surf[28]; - double *Tyy_yr = &prim_surf[30]; - - ux_xl[0] = gkyl_mat_get(&x_ux_xl,0,0); - ux_xr[0] = gkyl_mat_get(&x_ux_xr,0,0); - uy_xl[0] = gkyl_mat_get(&x_uy_xl,0,0); - uy_xr[0] = gkyl_mat_get(&x_uy_xr,0,0); - uz_xl[0] = gkyl_mat_get(&x_uz_xl,0,0); - uz_xr[0] = gkyl_mat_get(&x_uz_xr,0,0); - Txx_xl[0] = gkyl_mat_get(&x_Txx_xl,0,0); - Txx_xr[0] = gkyl_mat_get(&x_Txx_xr,0,0); - - ux_yl[0] = gkyl_mat_get(&x_ux_yl,0,0); - ux_yr[0] = gkyl_mat_get(&x_ux_yr,0,0); - uy_yl[0] = gkyl_mat_get(&x_uy_yl,0,0); - uy_yr[0] = gkyl_mat_get(&x_uy_yr,0,0); - uz_yl[0] = gkyl_mat_get(&x_uz_yl,0,0); - uz_yr[0] = gkyl_mat_get(&x_uz_yr,0,0); - Tyy_yl[0] = gkyl_mat_get(&x_Tyy_yl,0,0); - Tyy_yr[0] = gkyl_mat_get(&x_Tyy_yr,0,0); - - ux_xl[1] = gkyl_mat_get(&x_ux_xl,1,0); - ux_xr[1] = gkyl_mat_get(&x_ux_xr,1,0); - uy_xl[1] = gkyl_mat_get(&x_uy_xl,1,0); - uy_xr[1] = gkyl_mat_get(&x_uy_xr,1,0); - uz_xl[1] = gkyl_mat_get(&x_uz_xl,1,0); - uz_xr[1] = gkyl_mat_get(&x_uz_xr,1,0); - Txx_xl[1] = gkyl_mat_get(&x_Txx_xl,1,0); - Txx_xr[1] = gkyl_mat_get(&x_Txx_xr,1,0); - - ux_yl[1] = gkyl_mat_get(&x_ux_yl,1,0); - ux_yr[1] = gkyl_mat_get(&x_ux_yr,1,0); - uy_yl[1] = gkyl_mat_get(&x_uy_yl,1,0); - uy_yr[1] = gkyl_mat_get(&x_uy_yr,1,0); - uz_yl[1] = gkyl_mat_get(&x_uz_yl,1,0); - uz_yr[1] = gkyl_mat_get(&x_uz_yr,1,0); - Tyy_yl[1] = gkyl_mat_get(&x_Tyy_yl,1,0); - Tyy_yr[1] = gkyl_mat_get(&x_Tyy_yr,1,0); - -} - diff --git a/kernels/pkpm/pkpm_vars_surf_copy_2x_tensor_p2.c b/kernels/pkpm/pkpm_vars_surf_copy_2x_tensor_p2.c deleted file mode 100644 index 8d7bc2d52..000000000 --- a/kernels/pkpm/pkpm_vars_surf_copy_2x_tensor_p2.c +++ /dev/null @@ -1,100 +0,0 @@ -#include -#include -GKYL_CU_DH void pkpm_vars_surf_copy_2x_tensor_p2(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf) -{ - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim_surf: Primitive variables at surfaces. - - struct gkyl_mat x_ux_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_ux_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_uy_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_uy_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_uz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_uz_xr = gkyl_nmat_get(x, count+5); - struct gkyl_mat x_Txx_xl = gkyl_nmat_get(x, count+6); - struct gkyl_mat x_Txx_xr = gkyl_nmat_get(x, count+7); - - double *ux_xl = &prim_surf[0]; - double *ux_xr = &prim_surf[3]; - double *uy_xl = &prim_surf[6]; - double *uy_xr = &prim_surf[9]; - double *uz_xl = &prim_surf[12]; - double *uz_xr = &prim_surf[15]; - double *Txx_xl = &prim_surf[18]; - double *Txx_xr = &prim_surf[21]; - - struct gkyl_mat x_ux_yl = gkyl_nmat_get(x, count+8); - struct gkyl_mat x_ux_yr = gkyl_nmat_get(x, count+9); - struct gkyl_mat x_uy_yl = gkyl_nmat_get(x, count+10); - struct gkyl_mat x_uy_yr = gkyl_nmat_get(x, count+11); - struct gkyl_mat x_uz_yl = gkyl_nmat_get(x, count+12); - struct gkyl_mat x_uz_yr = gkyl_nmat_get(x, count+13); - struct gkyl_mat x_Tyy_yl = gkyl_nmat_get(x, count+14); - struct gkyl_mat x_Tyy_yr = gkyl_nmat_get(x, count+15); - - double *ux_yl = &prim_surf[24]; - double *ux_yr = &prim_surf[27]; - double *uy_yl = &prim_surf[30]; - double *uy_yr = &prim_surf[33]; - double *uz_yl = &prim_surf[36]; - double *uz_yr = &prim_surf[39]; - double *Tyy_yl = &prim_surf[42]; - double *Tyy_yr = &prim_surf[45]; - - ux_xl[0] = gkyl_mat_get(&x_ux_xl,0,0); - ux_xr[0] = gkyl_mat_get(&x_ux_xr,0,0); - uy_xl[0] = gkyl_mat_get(&x_uy_xl,0,0); - uy_xr[0] = gkyl_mat_get(&x_uy_xr,0,0); - uz_xl[0] = gkyl_mat_get(&x_uz_xl,0,0); - uz_xr[0] = gkyl_mat_get(&x_uz_xr,0,0); - Txx_xl[0] = gkyl_mat_get(&x_Txx_xl,0,0); - Txx_xr[0] = gkyl_mat_get(&x_Txx_xr,0,0); - - ux_yl[0] = gkyl_mat_get(&x_ux_yl,0,0); - ux_yr[0] = gkyl_mat_get(&x_ux_yr,0,0); - uy_yl[0] = gkyl_mat_get(&x_uy_yl,0,0); - uy_yr[0] = gkyl_mat_get(&x_uy_yr,0,0); - uz_yl[0] = gkyl_mat_get(&x_uz_yl,0,0); - uz_yr[0] = gkyl_mat_get(&x_uz_yr,0,0); - Tyy_yl[0] = gkyl_mat_get(&x_Tyy_yl,0,0); - Tyy_yr[0] = gkyl_mat_get(&x_Tyy_yr,0,0); - - ux_xl[1] = gkyl_mat_get(&x_ux_xl,1,0); - ux_xr[1] = gkyl_mat_get(&x_ux_xr,1,0); - uy_xl[1] = gkyl_mat_get(&x_uy_xl,1,0); - uy_xr[1] = gkyl_mat_get(&x_uy_xr,1,0); - uz_xl[1] = gkyl_mat_get(&x_uz_xl,1,0); - uz_xr[1] = gkyl_mat_get(&x_uz_xr,1,0); - Txx_xl[1] = gkyl_mat_get(&x_Txx_xl,1,0); - Txx_xr[1] = gkyl_mat_get(&x_Txx_xr,1,0); - - ux_yl[1] = gkyl_mat_get(&x_ux_yl,1,0); - ux_yr[1] = gkyl_mat_get(&x_ux_yr,1,0); - uy_yl[1] = gkyl_mat_get(&x_uy_yl,1,0); - uy_yr[1] = gkyl_mat_get(&x_uy_yr,1,0); - uz_yl[1] = gkyl_mat_get(&x_uz_yl,1,0); - uz_yr[1] = gkyl_mat_get(&x_uz_yr,1,0); - Tyy_yl[1] = gkyl_mat_get(&x_Tyy_yl,1,0); - Tyy_yr[1] = gkyl_mat_get(&x_Tyy_yr,1,0); - - ux_xl[2] = gkyl_mat_get(&x_ux_xl,2,0); - ux_xr[2] = gkyl_mat_get(&x_ux_xr,2,0); - uy_xl[2] = gkyl_mat_get(&x_uy_xl,2,0); - uy_xr[2] = gkyl_mat_get(&x_uy_xr,2,0); - uz_xl[2] = gkyl_mat_get(&x_uz_xl,2,0); - uz_xr[2] = gkyl_mat_get(&x_uz_xr,2,0); - Txx_xl[2] = gkyl_mat_get(&x_Txx_xl,2,0); - Txx_xr[2] = gkyl_mat_get(&x_Txx_xr,2,0); - - ux_yl[2] = gkyl_mat_get(&x_ux_yl,2,0); - ux_yr[2] = gkyl_mat_get(&x_ux_yr,2,0); - uy_yl[2] = gkyl_mat_get(&x_uy_yl,2,0); - uy_yr[2] = gkyl_mat_get(&x_uy_yr,2,0); - uz_yl[2] = gkyl_mat_get(&x_uz_yl,2,0); - uz_yr[2] = gkyl_mat_get(&x_uz_yr,2,0); - Tyy_yl[2] = gkyl_mat_get(&x_Tyy_yl,2,0); - Tyy_yr[2] = gkyl_mat_get(&x_Tyy_yr,2,0); - -} - diff --git a/kernels/pkpm/pkpm_vars_surf_copy_3x_ser_p1.c b/kernels/pkpm/pkpm_vars_surf_copy_3x_ser_p1.c deleted file mode 100644 index eb0609f17..000000000 --- a/kernels/pkpm/pkpm_vars_surf_copy_3x_ser_p1.c +++ /dev/null @@ -1,172 +0,0 @@ -#include -#include -GKYL_CU_DH void pkpm_vars_surf_copy_3x_ser_p1(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim_surf) -{ - // count: integer to indicate which matrix being fetched. - // x: Input solution vector. - // prim_surf: Primitive variables at surfaces. - - struct gkyl_mat x_ux_xl = gkyl_nmat_get(x, count); - struct gkyl_mat x_ux_xr = gkyl_nmat_get(x, count+1); - struct gkyl_mat x_uy_xl = gkyl_nmat_get(x, count+2); - struct gkyl_mat x_uy_xr = gkyl_nmat_get(x, count+3); - struct gkyl_mat x_uz_xl = gkyl_nmat_get(x, count+4); - struct gkyl_mat x_uz_xr = gkyl_nmat_get(x, count+5); - struct gkyl_mat x_Txx_xl = gkyl_nmat_get(x, count+6); - struct gkyl_mat x_Txx_xr = gkyl_nmat_get(x, count+7); - - double *ux_xl = &prim_surf[0]; - double *ux_xr = &prim_surf[4]; - double *uy_xl = &prim_surf[8]; - double *uy_xr = &prim_surf[12]; - double *uz_xl = &prim_surf[16]; - double *uz_xr = &prim_surf[20]; - double *Txx_xl = &prim_surf[24]; - double *Txx_xr = &prim_surf[28]; - - struct gkyl_mat x_ux_yl = gkyl_nmat_get(x, count+8); - struct gkyl_mat x_ux_yr = gkyl_nmat_get(x, count+9); - struct gkyl_mat x_uy_yl = gkyl_nmat_get(x, count+10); - struct gkyl_mat x_uy_yr = gkyl_nmat_get(x, count+11); - struct gkyl_mat x_uz_yl = gkyl_nmat_get(x, count+12); - struct gkyl_mat x_uz_yr = gkyl_nmat_get(x, count+13); - struct gkyl_mat x_Tyy_yl = gkyl_nmat_get(x, count+14); - struct gkyl_mat x_Tyy_yr = gkyl_nmat_get(x, count+15); - - double *ux_yl = &prim_surf[32]; - double *ux_yr = &prim_surf[36]; - double *uy_yl = &prim_surf[40]; - double *uy_yr = &prim_surf[44]; - double *uz_yl = &prim_surf[48]; - double *uz_yr = &prim_surf[52]; - double *Tyy_yl = &prim_surf[56]; - double *Tyy_yr = &prim_surf[60]; - - struct gkyl_mat x_ux_zl = gkyl_nmat_get(x, count+16); - struct gkyl_mat x_ux_zr = gkyl_nmat_get(x, count+17); - struct gkyl_mat x_uy_zl = gkyl_nmat_get(x, count+18); - struct gkyl_mat x_uy_zr = gkyl_nmat_get(x, count+19); - struct gkyl_mat x_uz_zl = gkyl_nmat_get(x, count+20); - struct gkyl_mat x_uz_zr = gkyl_nmat_get(x, count+21); - struct gkyl_mat x_Tzz_zl = gkyl_nmat_get(x, count+22); - struct gkyl_mat x_Tzz_zr = gkyl_nmat_get(x, count+23); - - double *ux_zl = &prim_surf[64]; - double *ux_zr = &prim_surf[68]; - double *uy_zl = &prim_surf[72]; - double *uy_zr = &prim_surf[76]; - double *uz_zl = &prim_surf[80]; - double *uz_zr = &prim_surf[84]; - double *Tzz_zl = &prim_surf[88]; - double *Tzz_zr = &prim_surf[92]; - - ux_xl[0] = gkyl_mat_get(&x_ux_xl,0,0); - ux_xr[0] = gkyl_mat_get(&x_ux_xr,0,0); - uy_xl[0] = gkyl_mat_get(&x_uy_xl,0,0); - uy_xr[0] = gkyl_mat_get(&x_uy_xr,0,0); - uz_xl[0] = gkyl_mat_get(&x_uz_xl,0,0); - uz_xr[0] = gkyl_mat_get(&x_uz_xr,0,0); - Txx_xl[0] = gkyl_mat_get(&x_Txx_xl,0,0); - Txx_xr[0] = gkyl_mat_get(&x_Txx_xr,0,0); - - ux_yl[0] = gkyl_mat_get(&x_ux_yl,0,0); - ux_yr[0] = gkyl_mat_get(&x_ux_yr,0,0); - uy_yl[0] = gkyl_mat_get(&x_uy_yl,0,0); - uy_yr[0] = gkyl_mat_get(&x_uy_yr,0,0); - uz_yl[0] = gkyl_mat_get(&x_uz_yl,0,0); - uz_yr[0] = gkyl_mat_get(&x_uz_yr,0,0); - Tyy_yl[0] = gkyl_mat_get(&x_Tyy_yl,0,0); - Tyy_yr[0] = gkyl_mat_get(&x_Tyy_yr,0,0); - - ux_zl[0] = gkyl_mat_get(&x_ux_zl,0,0); - ux_zr[0] = gkyl_mat_get(&x_ux_zr,0,0); - uy_zl[0] = gkyl_mat_get(&x_uy_zl,0,0); - uy_zr[0] = gkyl_mat_get(&x_uy_zr,0,0); - uz_zl[0] = gkyl_mat_get(&x_uz_zl,0,0); - uz_zr[0] = gkyl_mat_get(&x_uz_zr,0,0); - Tzz_zl[0] = gkyl_mat_get(&x_Tzz_zl,0,0); - Tzz_zr[0] = gkyl_mat_get(&x_Tzz_zr,0,0); - - ux_xl[1] = gkyl_mat_get(&x_ux_xl,1,0); - ux_xr[1] = gkyl_mat_get(&x_ux_xr,1,0); - uy_xl[1] = gkyl_mat_get(&x_uy_xl,1,0); - uy_xr[1] = gkyl_mat_get(&x_uy_xr,1,0); - uz_xl[1] = gkyl_mat_get(&x_uz_xl,1,0); - uz_xr[1] = gkyl_mat_get(&x_uz_xr,1,0); - Txx_xl[1] = gkyl_mat_get(&x_Txx_xl,1,0); - Txx_xr[1] = gkyl_mat_get(&x_Txx_xr,1,0); - - ux_yl[1] = gkyl_mat_get(&x_ux_yl,1,0); - ux_yr[1] = gkyl_mat_get(&x_ux_yr,1,0); - uy_yl[1] = gkyl_mat_get(&x_uy_yl,1,0); - uy_yr[1] = gkyl_mat_get(&x_uy_yr,1,0); - uz_yl[1] = gkyl_mat_get(&x_uz_yl,1,0); - uz_yr[1] = gkyl_mat_get(&x_uz_yr,1,0); - Tyy_yl[1] = gkyl_mat_get(&x_Tyy_yl,1,0); - Tyy_yr[1] = gkyl_mat_get(&x_Tyy_yr,1,0); - - ux_zl[1] = gkyl_mat_get(&x_ux_zl,1,0); - ux_zr[1] = gkyl_mat_get(&x_ux_zr,1,0); - uy_zl[1] = gkyl_mat_get(&x_uy_zl,1,0); - uy_zr[1] = gkyl_mat_get(&x_uy_zr,1,0); - uz_zl[1] = gkyl_mat_get(&x_uz_zl,1,0); - uz_zr[1] = gkyl_mat_get(&x_uz_zr,1,0); - Tzz_zl[1] = gkyl_mat_get(&x_Tzz_zl,1,0); - Tzz_zr[1] = gkyl_mat_get(&x_Tzz_zr,1,0); - - ux_xl[2] = gkyl_mat_get(&x_ux_xl,2,0); - ux_xr[2] = gkyl_mat_get(&x_ux_xr,2,0); - uy_xl[2] = gkyl_mat_get(&x_uy_xl,2,0); - uy_xr[2] = gkyl_mat_get(&x_uy_xr,2,0); - uz_xl[2] = gkyl_mat_get(&x_uz_xl,2,0); - uz_xr[2] = gkyl_mat_get(&x_uz_xr,2,0); - Txx_xl[2] = gkyl_mat_get(&x_Txx_xl,2,0); - Txx_xr[2] = gkyl_mat_get(&x_Txx_xr,2,0); - - ux_yl[2] = gkyl_mat_get(&x_ux_yl,2,0); - ux_yr[2] = gkyl_mat_get(&x_ux_yr,2,0); - uy_yl[2] = gkyl_mat_get(&x_uy_yl,2,0); - uy_yr[2] = gkyl_mat_get(&x_uy_yr,2,0); - uz_yl[2] = gkyl_mat_get(&x_uz_yl,2,0); - uz_yr[2] = gkyl_mat_get(&x_uz_yr,2,0); - Tyy_yl[2] = gkyl_mat_get(&x_Tyy_yl,2,0); - Tyy_yr[2] = gkyl_mat_get(&x_Tyy_yr,2,0); - - ux_zl[2] = gkyl_mat_get(&x_ux_zl,2,0); - ux_zr[2] = gkyl_mat_get(&x_ux_zr,2,0); - uy_zl[2] = gkyl_mat_get(&x_uy_zl,2,0); - uy_zr[2] = gkyl_mat_get(&x_uy_zr,2,0); - uz_zl[2] = gkyl_mat_get(&x_uz_zl,2,0); - uz_zr[2] = gkyl_mat_get(&x_uz_zr,2,0); - Tzz_zl[2] = gkyl_mat_get(&x_Tzz_zl,2,0); - Tzz_zr[2] = gkyl_mat_get(&x_Tzz_zr,2,0); - - ux_xl[3] = gkyl_mat_get(&x_ux_xl,3,0); - ux_xr[3] = gkyl_mat_get(&x_ux_xr,3,0); - uy_xl[3] = gkyl_mat_get(&x_uy_xl,3,0); - uy_xr[3] = gkyl_mat_get(&x_uy_xr,3,0); - uz_xl[3] = gkyl_mat_get(&x_uz_xl,3,0); - uz_xr[3] = gkyl_mat_get(&x_uz_xr,3,0); - Txx_xl[3] = gkyl_mat_get(&x_Txx_xl,3,0); - Txx_xr[3] = gkyl_mat_get(&x_Txx_xr,3,0); - - ux_yl[3] = gkyl_mat_get(&x_ux_yl,3,0); - ux_yr[3] = gkyl_mat_get(&x_ux_yr,3,0); - uy_yl[3] = gkyl_mat_get(&x_uy_yl,3,0); - uy_yr[3] = gkyl_mat_get(&x_uy_yr,3,0); - uz_yl[3] = gkyl_mat_get(&x_uz_yl,3,0); - uz_yr[3] = gkyl_mat_get(&x_uz_yr,3,0); - Tyy_yl[3] = gkyl_mat_get(&x_Tyy_yl,3,0); - Tyy_yr[3] = gkyl_mat_get(&x_Tyy_yr,3,0); - - ux_zl[3] = gkyl_mat_get(&x_ux_zl,3,0); - ux_zr[3] = gkyl_mat_get(&x_ux_zr,3,0); - uy_zl[3] = gkyl_mat_get(&x_uy_zl,3,0); - uy_zr[3] = gkyl_mat_get(&x_uy_zr,3,0); - uz_zl[3] = gkyl_mat_get(&x_uz_zl,3,0); - uz_zr[3] = gkyl_mat_get(&x_uz_zr,3,0); - Tzz_zl[3] = gkyl_mat_get(&x_Tzz_zl,3,0); - Tzz_zr[3] = gkyl_mat_get(&x_Tzz_zr,3,0); - -} - diff --git a/kernels/pkpm/pkpm_vars_surf_set_1x_ser_p1.c b/kernels/pkpm/pkpm_vars_surf_set_1x_ser_p1.c deleted file mode 100644 index 195b84fa0..000000000 --- a/kernels/pkpm/pkpm_vars_surf_set_1x_ser_p1.c +++ /dev/null @@ -1,90 +0,0 @@ -#include -#include -#include -GKYL_CU_DH void pkpm_vars_surf_set_1x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, - const double *p_ij_surf, const int *cell_avg_prim) -{ - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // vlasov_pkpm_moms: Input [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. - // euler_pkpm: Input [rho ux, rho uy, rho uz], Fluid state vector. - // p_ij_surf: Input surface expansion of p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. - // [Pxx_xl, Pxx_xr, Pxy_xl, Pxy_xr, Pxz_xl, Pxz_xr, - // Pxy_yl, Pxy_yr, Pyy_yl, Pyy_yr, Pyz_yl, Pyz_yr, - // Pxz_zl, Pxz_zr, Pyz_zl, Pyz_zr, Pzz_zl, Pzz_zr] - // cell_avg_prim: Boolean array to determine if we only use cell averages when computing surface expansions. - - // For poly_order = 1, we can analytically invert the matrix and just store the solution - struct gkyl_mat rhs_ux_l = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_ux_r = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_uy_l = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_uy_r = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_uz_l = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_uz_r = gkyl_nmat_get(rhs, count+5); - struct gkyl_mat rhs_Txx_l = gkyl_nmat_get(rhs, count+6); - struct gkyl_mat rhs_Txx_r = gkyl_nmat_get(rhs, count+7); - // Clear rhs for each component of primitive variables being solved for - gkyl_mat_clear(&rhs_ux_l, 0.0); - gkyl_mat_clear(&rhs_ux_r, 0.0); - gkyl_mat_clear(&rhs_uy_l, 0.0); - gkyl_mat_clear(&rhs_uy_r, 0.0); - gkyl_mat_clear(&rhs_uz_l, 0.0); - gkyl_mat_clear(&rhs_uz_r, 0.0); - gkyl_mat_clear(&rhs_Txx_l, 0.0); - gkyl_mat_clear(&rhs_Txx_r, 0.0); - const double *rhoux = &euler_pkpm[0]; - const double *rhouy = &euler_pkpm[2]; - const double *rhouz = &euler_pkpm[4]; - const double *rho = &vlasov_pkpm_moms[0]; - const double *Pxx_xl = &p_ij_surf[0]; - const double *Pxx_xr = &p_ij_surf[1]; - double ux_l = 0.0; - double ux_r = 0.0; - double uy_l = 0.0; - double uy_r = 0.0; - double uz_l = 0.0; - double uz_r = 0.0; - double Txx_l = 0.0; - double Txx_r = 0.0; - if (cell_avg_prim[0]) { - // If rho or p_perp < 0 at control points, only use cell average. - ux_l = rhoux[0]/rho[0]; - ux_r = rhoux[0]/rho[0]; - uy_l = rhouy[0]/rho[0]; - uy_r = rhouy[0]/rho[0]; - uz_l = rhouz[0]/rho[0]; - uz_r = rhouz[0]/rho[0]; - Txx_l = Pxx_xl[0]/rho[0]; - Txx_r = Pxx_xr[0]/rho[0]; - } else { - double rhoux_l = 0.7071067811865475*rhoux[0]-1.224744871391589*rhoux[1]; - double rhoux_r = 1.224744871391589*rhoux[1]+0.7071067811865475*rhoux[0]; - double rhouy_l = 0.7071067811865475*rhouy[0]-1.224744871391589*rhouy[1]; - double rhouy_r = 1.224744871391589*rhouy[1]+0.7071067811865475*rhouy[0]; - double rhouz_l = 0.7071067811865475*rhouz[0]-1.224744871391589*rhouz[1]; - double rhouz_r = 1.224744871391589*rhouz[1]+0.7071067811865475*rhouz[0]; - double rho_l = 0.7071067811865475*rho[0]-1.224744871391589*rho[1]; - double rho_r = 1.224744871391589*rho[1]+0.7071067811865475*rho[0]; - double Pxx_l = Pxx_xl[0]; - double Pxx_r = Pxx_xr[0]; - ux_l = rhoux_l/rho_l; - ux_r = rhoux_r/rho_r; - uy_l = rhouy_l/rho_l; - uy_r = rhouy_r/rho_r; - uz_l = rhouz_l/rho_l; - uz_r = rhouz_r/rho_r; - Txx_l = Pxx_xl[0]/rho_l; - Txx_r = Pxx_xr[0]/rho_r; - } - - gkyl_mat_set(&rhs_ux_l,0,0,ux_l); - gkyl_mat_set(&rhs_ux_r,0,0,ux_r); - gkyl_mat_set(&rhs_uy_l,0,0,uy_l); - gkyl_mat_set(&rhs_uy_r,0,0,uy_r); - gkyl_mat_set(&rhs_uz_l,0,0,uz_l); - gkyl_mat_set(&rhs_uz_r,0,0,uz_r); - gkyl_mat_set(&rhs_Txx_l,0,0,3.0*Txx_l); - gkyl_mat_set(&rhs_Txx_r,0,0,3.0*Txx_r); -} diff --git a/kernels/pkpm/pkpm_vars_surf_set_1x_ser_p2.c b/kernels/pkpm/pkpm_vars_surf_set_1x_ser_p2.c deleted file mode 100644 index 0d553d2fd..000000000 --- a/kernels/pkpm/pkpm_vars_surf_set_1x_ser_p2.c +++ /dev/null @@ -1,90 +0,0 @@ -#include -#include -#include -GKYL_CU_DH void pkpm_vars_surf_set_1x_ser_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, - const double *p_ij_surf, const int *cell_avg_prim) -{ - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // vlasov_pkpm_moms: Input [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. - // euler_pkpm: Input [rho ux, rho uy, rho uz], Fluid state vector. - // p_ij_surf: Input surface expansion of p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. - // [Pxx_xl, Pxx_xr, Pxy_xl, Pxy_xr, Pxz_xl, Pxz_xr, - // Pxy_yl, Pxy_yr, Pyy_yl, Pyy_yr, Pyz_yl, Pyz_yr, - // Pxz_zl, Pxz_zr, Pyz_zl, Pyz_zr, Pzz_zl, Pzz_zr] - // cell_avg_prim: Boolean array to determine if we only use cell averages when computing surface expansions. - - // For poly_order = 1, we can analytically invert the matrix and just store the solution - struct gkyl_mat rhs_ux_l = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_ux_r = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_uy_l = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_uy_r = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_uz_l = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_uz_r = gkyl_nmat_get(rhs, count+5); - struct gkyl_mat rhs_Txx_l = gkyl_nmat_get(rhs, count+6); - struct gkyl_mat rhs_Txx_r = gkyl_nmat_get(rhs, count+7); - // Clear rhs for each component of primitive variables being solved for - gkyl_mat_clear(&rhs_ux_l, 0.0); - gkyl_mat_clear(&rhs_ux_r, 0.0); - gkyl_mat_clear(&rhs_uy_l, 0.0); - gkyl_mat_clear(&rhs_uy_r, 0.0); - gkyl_mat_clear(&rhs_uz_l, 0.0); - gkyl_mat_clear(&rhs_uz_r, 0.0); - gkyl_mat_clear(&rhs_Txx_l, 0.0); - gkyl_mat_clear(&rhs_Txx_r, 0.0); - const double *rhoux = &euler_pkpm[0]; - const double *rhouy = &euler_pkpm[3]; - const double *rhouz = &euler_pkpm[6]; - const double *rho = &vlasov_pkpm_moms[0]; - const double *Pxx_xl = &p_ij_surf[0]; - const double *Pxx_xr = &p_ij_surf[1]; - double ux_l = 0.0; - double ux_r = 0.0; - double uy_l = 0.0; - double uy_r = 0.0; - double uz_l = 0.0; - double uz_r = 0.0; - double Txx_l = 0.0; - double Txx_r = 0.0; - if (cell_avg_prim[0]) { - // If rho or p_perp < 0 at control points, only use cell average. - ux_l = rhoux[0]/rho[0]; - ux_r = rhoux[0]/rho[0]; - uy_l = rhouy[0]/rho[0]; - uy_r = rhouy[0]/rho[0]; - uz_l = rhouz[0]/rho[0]; - uz_r = rhouz[0]/rho[0]; - Txx_l = Pxx_xl[0]/rho[0]; - Txx_r = Pxx_xr[0]/rho[0]; - } else { - double rhoux_l = 1.58113883008419*rhoux[2]-1.224744871391589*rhoux[1]+0.7071067811865475*rhoux[0]; - double rhoux_r = 1.58113883008419*rhoux[2]+1.224744871391589*rhoux[1]+0.7071067811865475*rhoux[0]; - double rhouy_l = 1.58113883008419*rhouy[2]-1.224744871391589*rhouy[1]+0.7071067811865475*rhouy[0]; - double rhouy_r = 1.58113883008419*rhouy[2]+1.224744871391589*rhouy[1]+0.7071067811865475*rhouy[0]; - double rhouz_l = 1.58113883008419*rhouz[2]-1.224744871391589*rhouz[1]+0.7071067811865475*rhouz[0]; - double rhouz_r = 1.58113883008419*rhouz[2]+1.224744871391589*rhouz[1]+0.7071067811865475*rhouz[0]; - double rho_l = 1.58113883008419*rho[2]-1.224744871391589*rho[1]+0.7071067811865475*rho[0]; - double rho_r = 1.58113883008419*rho[2]+1.224744871391589*rho[1]+0.7071067811865475*rho[0]; - double Pxx_l = Pxx_xl[0]; - double Pxx_r = Pxx_xr[0]; - ux_l = rhoux_l/rho_l; - ux_r = rhoux_r/rho_r; - uy_l = rhouy_l/rho_l; - uy_r = rhouy_r/rho_r; - uz_l = rhouz_l/rho_l; - uz_r = rhouz_r/rho_r; - Txx_l = Pxx_xl[0]/rho_l; - Txx_r = Pxx_xr[0]/rho_r; - } - - gkyl_mat_set(&rhs_ux_l,0,0,ux_l); - gkyl_mat_set(&rhs_ux_r,0,0,ux_r); - gkyl_mat_set(&rhs_uy_l,0,0,uy_l); - gkyl_mat_set(&rhs_uy_r,0,0,uy_r); - gkyl_mat_set(&rhs_uz_l,0,0,uz_l); - gkyl_mat_set(&rhs_uz_r,0,0,uz_r); - gkyl_mat_set(&rhs_Txx_l,0,0,3.0*Txx_l); - gkyl_mat_set(&rhs_Txx_r,0,0,3.0*Txx_r); -} diff --git a/kernels/pkpm/pkpm_vars_surf_set_2x_ser_p1.c b/kernels/pkpm/pkpm_vars_surf_set_2x_ser_p1.c deleted file mode 100644 index 772566deb..000000000 --- a/kernels/pkpm/pkpm_vars_surf_set_2x_ser_p1.c +++ /dev/null @@ -1,211 +0,0 @@ -#include -#include -#include -#include -GKYL_CU_DH void pkpm_vars_surf_set_2x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, - const double *p_ij_surf, const int *cell_avg_prim) -{ - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // vlasov_pkpm_moms: Input [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. - // euler_pkpm: Input [rho ux, rho uy, rho uz], Fluid input state vector. - // p_ij_surf: Input surface expansion of p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. - // [Pxx_xl, Pxx_xr, Pxy_xl, Pxy_xr, Pxz_xl, Pxz_xr, - // Pxy_yl, Pxy_yr, Pyy_yl, Pyy_yr, Pyz_yl, Pyz_yr, - // Pxz_zl, Pxz_zr, Pyz_zl, Pyz_zr, Pzz_zl, Pzz_zr] - // cell_avg_prim: Boolean array to determine if we only use cell averages when computing surface expansions. - - // For poly_order = 1, we can analytically invert the matrix and just store the solution - struct gkyl_mat rhs_ux_xl = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_ux_xr = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_uy_xl = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_uy_xr = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_uz_xl = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_uz_xr = gkyl_nmat_get(rhs, count+5); - struct gkyl_mat rhs_Txx_xl = gkyl_nmat_get(rhs, count+6); - struct gkyl_mat rhs_Txx_xr = gkyl_nmat_get(rhs, count+7); - struct gkyl_mat rhs_ux_yl = gkyl_nmat_get(rhs, count+8); - struct gkyl_mat rhs_ux_yr = gkyl_nmat_get(rhs, count+9); - struct gkyl_mat rhs_uy_yl = gkyl_nmat_get(rhs, count+10); - struct gkyl_mat rhs_uy_yr = gkyl_nmat_get(rhs, count+11); - struct gkyl_mat rhs_uz_yl = gkyl_nmat_get(rhs, count+12); - struct gkyl_mat rhs_uz_yr = gkyl_nmat_get(rhs, count+13); - struct gkyl_mat rhs_Tyy_yl = gkyl_nmat_get(rhs, count+14); - struct gkyl_mat rhs_Tyy_yr = gkyl_nmat_get(rhs, count+15); - // Clear rhs for each component of primitive variables being solved for - gkyl_mat_clear(&rhs_ux_xl, 0.0); - gkyl_mat_clear(&rhs_ux_xr, 0.0); - gkyl_mat_clear(&rhs_uy_xl, 0.0); - gkyl_mat_clear(&rhs_uy_xr, 0.0); - gkyl_mat_clear(&rhs_uz_xl, 0.0); - gkyl_mat_clear(&rhs_uz_xr, 0.0); - gkyl_mat_clear(&rhs_Txx_xl, 0.0); - gkyl_mat_clear(&rhs_Txx_xr, 0.0); - gkyl_mat_clear(&rhs_ux_yl, 0.0); - gkyl_mat_clear(&rhs_ux_yr, 0.0); - gkyl_mat_clear(&rhs_uy_yl, 0.0); - gkyl_mat_clear(&rhs_uy_yr, 0.0); - gkyl_mat_clear(&rhs_uz_yl, 0.0); - gkyl_mat_clear(&rhs_uz_yr, 0.0); - gkyl_mat_clear(&rhs_Tyy_yl, 0.0); - gkyl_mat_clear(&rhs_Tyy_yr, 0.0); - const double *rhoux = &euler_pkpm[0]; - const double *rhouy = &euler_pkpm[4]; - const double *rhouz = &euler_pkpm[8]; - const double *rho = &vlasov_pkpm_moms[0]; - const double *Pxx_xl = &p_ij_surf[0]; - const double *Pxx_xr = &p_ij_surf[2]; - const double *Pyy_yl = &p_ij_surf[16]; - const double *Pyy_yr = &p_ij_surf[18]; - double ux_xl[2] = {0.0}; - double ux_xr[2] = {0.0}; - double uy_xl[2] = {0.0}; - double uy_xr[2] = {0.0}; - double uz_xl[2] = {0.0}; - double uz_xr[2] = {0.0}; - double Txx_xl[2] = {0.0}; - double Txx_xr[2] = {0.0}; - double ux_yl[2] = {0.0}; - double ux_yr[2] = {0.0}; - double uy_yl[2] = {0.0}; - double uy_yr[2] = {0.0}; - double uz_yl[2] = {0.0}; - double uz_yr[2] = {0.0}; - double Tyy_yl[2] = {0.0}; - double Tyy_yr[2] = {0.0}; - if (cell_avg_prim[0]) { - // If rho or p_perp < 0 at control points, only use cell average. - ux_xl[0] = rhoux[0]/rho[0]; - ux_xr[0] = rhoux[0]/rho[0]; - uy_xl[0] = rhouy[0]/rho[0]; - uy_xr[0] = rhouy[0]/rho[0]; - uz_xl[0] = rhouz[0]/rho[0]; - uz_xr[0] = rhouz[0]/rho[0]; - Txx_xl[0] = Pxx_xl[0]/rho[0]; - Txx_xr[0] = Pxx_xr[0]/rho[0]; - ux_yl[0] = rhoux[0]/rho[0]; - ux_yr[0] = rhoux[0]/rho[0]; - uy_yl[0] = rhouy[0]/rho[0]; - uy_yr[0] = rhouy[0]/rho[0]; - uz_yl[0] = rhouz[0]/rho[0]; - uz_yr[0] = rhouz[0]/rho[0]; - Tyy_yl[0] = Pyy_yl[0]/rho[0]; - Tyy_yr[0] = Pyy_yr[0]/rho[0]; - } else { - double rhoux_xl[2] = {0.0}; - double rhoux_xr[2] = {0.0}; - double rhouy_xl[2] = {0.0}; - double rhouy_xr[2] = {0.0}; - double rhouz_xl[2] = {0.0}; - double rhouz_xr[2] = {0.0}; - double rho_xl[2] = {0.0}; - double rho_xr[2] = {0.0}; - double rho_inv_xl[2] = {0.0}; - double rho_inv_xr[2] = {0.0}; - - rhoux_xl[0] = 0.7071067811865475*rhoux[0]-1.224744871391589*rhoux[1]; - rhoux_xl[1] = 0.7071067811865475*rhoux[2]-1.224744871391589*rhoux[3]; - rhoux_xr[0] = 1.224744871391589*rhoux[1]+0.7071067811865475*rhoux[0]; - rhoux_xr[1] = 1.224744871391589*rhoux[3]+0.7071067811865475*rhoux[2]; - rhouy_xl[0] = 0.7071067811865475*rhouy[0]-1.224744871391589*rhouy[1]; - rhouy_xl[1] = 0.7071067811865475*rhouy[2]-1.224744871391589*rhouy[3]; - rhouy_xr[0] = 1.224744871391589*rhouy[1]+0.7071067811865475*rhouy[0]; - rhouy_xr[1] = 1.224744871391589*rhouy[3]+0.7071067811865475*rhouy[2]; - rhouz_xl[0] = 0.7071067811865475*rhouz[0]-1.224744871391589*rhouz[1]; - rhouz_xl[1] = 0.7071067811865475*rhouz[2]-1.224744871391589*rhouz[3]; - rhouz_xr[0] = 1.224744871391589*rhouz[1]+0.7071067811865475*rhouz[0]; - rhouz_xr[1] = 1.224744871391589*rhouz[3]+0.7071067811865475*rhouz[2]; - rho_xl[0] = 0.7071067811865475*rho[0]-1.224744871391589*rho[1]; - rho_xl[1] = 0.7071067811865475*rho[2]-1.224744871391589*rho[3]; - rho_xr[0] = 1.224744871391589*rho[1]+0.7071067811865475*rho[0]; - rho_xr[1] = 1.224744871391589*rho[3]+0.7071067811865475*rho[2]; - ser_1x_p1_inv(rho_xl, rho_inv_xl); - ser_1x_p1_inv(rho_xr, rho_inv_xr); - binop_mul_1d_ser_p1(rho_inv_xl, rhoux_xl, ux_xl); - binop_mul_1d_ser_p1(rho_inv_xr, rhoux_xr, ux_xr); - binop_mul_1d_ser_p1(rho_inv_xl, rhouy_xl, uy_xl); - binop_mul_1d_ser_p1(rho_inv_xr, rhouy_xr, uy_xr); - binop_mul_1d_ser_p1(rho_inv_xl, rhouz_xl, uz_xl); - binop_mul_1d_ser_p1(rho_inv_xr, rhouz_xr, uz_xr); - binop_mul_1d_ser_p1(rho_inv_xl, Pxx_xl, Txx_xl); - binop_mul_1d_ser_p1(rho_inv_xr, Pxx_xr, Txx_xr); - - double rhoux_yl[2] = {0.0}; - double rhoux_yr[2] = {0.0}; - double rhouy_yl[2] = {0.0}; - double rhouy_yr[2] = {0.0}; - double rhouz_yl[2] = {0.0}; - double rhouz_yr[2] = {0.0}; - double rho_yl[2] = {0.0}; - double rho_yr[2] = {0.0}; - double rho_inv_yl[2] = {0.0}; - double rho_inv_yr[2] = {0.0}; - - rhoux_yl[0] = 0.7071067811865475*rhoux[0]-1.224744871391589*rhoux[2]; - rhoux_yl[1] = 0.7071067811865475*rhoux[1]-1.224744871391589*rhoux[3]; - rhoux_yr[0] = 1.224744871391589*rhoux[2]+0.7071067811865475*rhoux[0]; - rhoux_yr[1] = 1.224744871391589*rhoux[3]+0.7071067811865475*rhoux[1]; - rhouy_yl[0] = 0.7071067811865475*rhouy[0]-1.224744871391589*rhouy[2]; - rhouy_yl[1] = 0.7071067811865475*rhouy[1]-1.224744871391589*rhouy[3]; - rhouy_yr[0] = 1.224744871391589*rhouy[2]+0.7071067811865475*rhouy[0]; - rhouy_yr[1] = 1.224744871391589*rhouy[3]+0.7071067811865475*rhouy[1]; - rhouz_yl[0] = 0.7071067811865475*rhouz[0]-1.224744871391589*rhouz[2]; - rhouz_yl[1] = 0.7071067811865475*rhouz[1]-1.224744871391589*rhouz[3]; - rhouz_yr[0] = 1.224744871391589*rhouz[2]+0.7071067811865475*rhouz[0]; - rhouz_yr[1] = 1.224744871391589*rhouz[3]+0.7071067811865475*rhouz[1]; - rho_yl[0] = 0.7071067811865475*rho[0]-1.224744871391589*rho[2]; - rho_yl[1] = 0.7071067811865475*rho[1]-1.224744871391589*rho[3]; - rho_yr[0] = 1.224744871391589*rho[2]+0.7071067811865475*rho[0]; - rho_yr[1] = 1.224744871391589*rho[3]+0.7071067811865475*rho[1]; - ser_1x_p1_inv(rho_yl, rho_inv_yl); - ser_1x_p1_inv(rho_yr, rho_inv_yr); - binop_mul_1d_ser_p1(rho_inv_yl, rhoux_yl, ux_yl); - binop_mul_1d_ser_p1(rho_inv_yr, rhoux_yr, ux_yr); - binop_mul_1d_ser_p1(rho_inv_yl, rhouy_yl, uy_yl); - binop_mul_1d_ser_p1(rho_inv_yr, rhouy_yr, uy_yr); - binop_mul_1d_ser_p1(rho_inv_yl, rhouz_yl, uz_yl); - binop_mul_1d_ser_p1(rho_inv_yr, rhouz_yr, uz_yr); - binop_mul_1d_ser_p1(rho_inv_yl, Pyy_yl, Tyy_yl); - binop_mul_1d_ser_p1(rho_inv_yr, Pyy_yr, Tyy_yr); - - } - - gkyl_mat_set(&rhs_ux_xl,0,0,ux_xl[0]); - gkyl_mat_set(&rhs_ux_xr,0,0,ux_xr[0]); - gkyl_mat_set(&rhs_uy_xl,0,0,uy_xl[0]); - gkyl_mat_set(&rhs_uy_xr,0,0,uy_xr[0]); - gkyl_mat_set(&rhs_uz_xl,0,0,uz_xl[0]); - gkyl_mat_set(&rhs_uz_xr,0,0,uz_xr[0]); - gkyl_mat_set(&rhs_Txx_xl,0,0,3.0*Txx_xl[0]); - gkyl_mat_set(&rhs_Txx_xr,0,0,3.0*Txx_xr[0]); - - gkyl_mat_set(&rhs_ux_yl,0,0,ux_yl[0]); - gkyl_mat_set(&rhs_ux_yr,0,0,ux_yr[0]); - gkyl_mat_set(&rhs_uy_yl,0,0,uy_yl[0]); - gkyl_mat_set(&rhs_uy_yr,0,0,uy_yr[0]); - gkyl_mat_set(&rhs_uz_yl,0,0,uz_yl[0]); - gkyl_mat_set(&rhs_uz_yr,0,0,uz_yr[0]); - gkyl_mat_set(&rhs_Tyy_yl,0,0,3.0*Tyy_yl[0]); - gkyl_mat_set(&rhs_Tyy_yr,0,0,3.0*Tyy_yr[0]); - - gkyl_mat_set(&rhs_ux_xl,1,0,ux_xl[1]); - gkyl_mat_set(&rhs_ux_xr,1,0,ux_xr[1]); - gkyl_mat_set(&rhs_uy_xl,1,0,uy_xl[1]); - gkyl_mat_set(&rhs_uy_xr,1,0,uy_xr[1]); - gkyl_mat_set(&rhs_uz_xl,1,0,uz_xl[1]); - gkyl_mat_set(&rhs_uz_xr,1,0,uz_xr[1]); - gkyl_mat_set(&rhs_Txx_xl,1,0,3.0*Txx_xl[1]); - gkyl_mat_set(&rhs_Txx_xr,1,0,3.0*Txx_xr[1]); - - gkyl_mat_set(&rhs_ux_yl,1,0,ux_yl[1]); - gkyl_mat_set(&rhs_ux_yr,1,0,ux_yr[1]); - gkyl_mat_set(&rhs_uy_yl,1,0,uy_yl[1]); - gkyl_mat_set(&rhs_uy_yr,1,0,uy_yr[1]); - gkyl_mat_set(&rhs_uz_yl,1,0,uz_yl[1]); - gkyl_mat_set(&rhs_uz_yr,1,0,uz_yr[1]); - gkyl_mat_set(&rhs_Tyy_yl,1,0,3.0*Tyy_yl[1]); - gkyl_mat_set(&rhs_Tyy_yr,1,0,3.0*Tyy_yr[1]); - -} diff --git a/kernels/pkpm/pkpm_vars_surf_set_2x_tensor_p2.c b/kernels/pkpm/pkpm_vars_surf_set_2x_tensor_p2.c deleted file mode 100644 index 9d4a15d2a..000000000 --- a/kernels/pkpm/pkpm_vars_surf_set_2x_tensor_p2.c +++ /dev/null @@ -1,489 +0,0 @@ -#include -#include -GKYL_CU_DH void pkpm_vars_surf_set_2x_tensor_p2(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, - const double *p_ij_surf, const int *cell_avg_prim) -{ - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // vlasov_pkpm_moms: [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. - // euler_pkpm: [rho ux, rho uy, rho uz], Fluid input state vector. - // p_ij_surf: Input surface expansion of p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. - // [Pxx_xl, Pxx_xr, Pxy_xl, Pxy_xr, Pxz_xl, Pxz_xr, - // Pxy_yl, Pxy_yr, Pyy_yl, Pyy_yr, Pyz_yl, Pyz_yr, - // Pxz_zl, Pxz_zr, Pyz_zl, Pyz_zr, Pzz_zl, Pzz_zr] - // cell_avg_prim: Boolean array to determine if we only use cell averages when computing surface expansions. - - struct gkyl_mat A_ux_xl = gkyl_nmat_get(A, count); - struct gkyl_mat A_ux_xr = gkyl_nmat_get(A, count+1); - struct gkyl_mat A_uy_xl = gkyl_nmat_get(A, count+2); - struct gkyl_mat A_uy_xr = gkyl_nmat_get(A, count+3); - struct gkyl_mat A_uz_xl = gkyl_nmat_get(A, count+4); - struct gkyl_mat A_uz_xr = gkyl_nmat_get(A, count+5); - struct gkyl_mat A_Txx_xl = gkyl_nmat_get(A, count+6); - struct gkyl_mat A_Txx_xr = gkyl_nmat_get(A, count+7); - struct gkyl_mat A_ux_yl = gkyl_nmat_get(A, count+8); - struct gkyl_mat A_ux_yr = gkyl_nmat_get(A, count+9); - struct gkyl_mat A_uy_yl = gkyl_nmat_get(A, count+10); - struct gkyl_mat A_uy_yr = gkyl_nmat_get(A, count+11); - struct gkyl_mat A_uz_yl = gkyl_nmat_get(A, count+12); - struct gkyl_mat A_uz_yr = gkyl_nmat_get(A, count+13); - struct gkyl_mat A_Tyy_yl = gkyl_nmat_get(A, count+14); - struct gkyl_mat A_Tyy_yr = gkyl_nmat_get(A, count+15); - struct gkyl_mat rhs_ux_xl = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_ux_xr = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_uy_xl = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_uy_xr = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_uz_xl = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_uz_xr = gkyl_nmat_get(rhs, count+5); - struct gkyl_mat rhs_Txx_xl = gkyl_nmat_get(rhs, count+6); - struct gkyl_mat rhs_Txx_xr = gkyl_nmat_get(rhs, count+7); - struct gkyl_mat rhs_ux_yl = gkyl_nmat_get(rhs, count+8); - struct gkyl_mat rhs_ux_yr = gkyl_nmat_get(rhs, count+9); - struct gkyl_mat rhs_uy_yl = gkyl_nmat_get(rhs, count+10); - struct gkyl_mat rhs_uy_yr = gkyl_nmat_get(rhs, count+11); - struct gkyl_mat rhs_uz_yl = gkyl_nmat_get(rhs, count+12); - struct gkyl_mat rhs_uz_yr = gkyl_nmat_get(rhs, count+13); - struct gkyl_mat rhs_Tyy_yl = gkyl_nmat_get(rhs, count+14); - struct gkyl_mat rhs_Tyy_yr = gkyl_nmat_get(rhs, count+15); - // Clear A and rhs for each component of primitive variables being solved for - gkyl_mat_clear(&A_ux_xl, 0.0); gkyl_mat_clear(&rhs_ux_xl, 0.0); - gkyl_mat_clear(&A_ux_xr, 0.0); gkyl_mat_clear(&rhs_ux_xr, 0.0); - gkyl_mat_clear(&A_uy_xl, 0.0); gkyl_mat_clear(&rhs_uy_xl, 0.0); - gkyl_mat_clear(&A_uy_xr, 0.0); gkyl_mat_clear(&rhs_uy_xr, 0.0); - gkyl_mat_clear(&A_uz_xl, 0.0); gkyl_mat_clear(&rhs_uz_xl, 0.0); - gkyl_mat_clear(&A_uz_xr, 0.0); gkyl_mat_clear(&rhs_uz_xr, 0.0); - gkyl_mat_clear(&A_Txx_xl, 0.0); gkyl_mat_clear(&rhs_Txx_xl, 0.0); - gkyl_mat_clear(&A_Txx_xr, 0.0); gkyl_mat_clear(&rhs_Txx_xr, 0.0); - gkyl_mat_clear(&A_ux_yl, 0.0); gkyl_mat_clear(&rhs_ux_yl, 0.0); - gkyl_mat_clear(&A_ux_yr, 0.0); gkyl_mat_clear(&rhs_ux_yr, 0.0); - gkyl_mat_clear(&A_uy_yl, 0.0); gkyl_mat_clear(&rhs_uy_yl, 0.0); - gkyl_mat_clear(&A_uy_yr, 0.0); gkyl_mat_clear(&rhs_uy_yr, 0.0); - gkyl_mat_clear(&A_uz_yl, 0.0); gkyl_mat_clear(&rhs_uz_yl, 0.0); - gkyl_mat_clear(&A_uz_yr, 0.0); gkyl_mat_clear(&rhs_uz_yr, 0.0); - gkyl_mat_clear(&A_Tyy_yl, 0.0); gkyl_mat_clear(&rhs_Tyy_yl, 0.0); - gkyl_mat_clear(&A_Tyy_yr, 0.0); gkyl_mat_clear(&rhs_Tyy_yr, 0.0); - const double *rhoux = &euler_pkpm[0]; - const double *rhouy = &euler_pkpm[9]; - const double *rhouz = &euler_pkpm[18]; - const double *rho = &vlasov_pkpm_moms[0]; - const double *Pxx_xl = &p_ij_surf[0]; - const double *Pxx_xr = &p_ij_surf[3]; - const double *Pyy_yl = &p_ij_surf[24]; - const double *Pyy_yr = &p_ij_surf[27]; - double rho_xl[3] = {0.0}; - double rho_xr[3] = {0.0}; - rho_xl[0] = 1.58113883008419*rho[4]-1.224744871391589*rho[1]+0.7071067811865475*rho[0]; - rho_xl[1] = 1.58113883008419*rho[6]-1.224744871391589*rho[3]+0.7071067811865475*rho[2]; - rho_xl[2] = 1.58113883008419*rho[8]-1.224744871391589*rho[7]+0.7071067811865475*rho[5]; - rho_xr[0] = 1.58113883008419*rho[4]+1.224744871391589*rho[1]+0.7071067811865475*rho[0]; - rho_xr[1] = 1.58113883008419*rho[6]+1.224744871391589*rho[3]+0.7071067811865475*rho[2]; - rho_xr[2] = 1.58113883008419*rho[8]+1.224744871391589*rho[7]+0.7071067811865475*rho[5]; - double rho_yl[3] = {0.0}; - double rho_yr[3] = {0.0}; - rho_yl[0] = 1.58113883008419*rho[5]-1.224744871391589*rho[2]+0.7071067811865475*rho[0]; - rho_yl[1] = 1.58113883008419*rho[7]-1.224744871391589*rho[3]+0.7071067811865475*rho[1]; - rho_yl[2] = 1.58113883008419*rho[8]-1.224744871391589*rho[6]+0.7071067811865475*rho[4]; - rho_yr[0] = 1.58113883008419*rho[5]+1.224744871391589*rho[2]+0.7071067811865475*rho[0]; - rho_yr[1] = 1.58113883008419*rho[7]+1.224744871391589*rho[3]+0.7071067811865475*rho[1]; - rho_yr[2] = 1.58113883008419*rho[8]+1.224744871391589*rho[6]+0.7071067811865475*rho[4]; - if (cell_avg_prim[0]) { - rho_xl[0] = rho[0]; - rho_xr[0] = rho[0]; - rho_yl[0] = rho[0]; - rho_yr[0] = rho[0]; - - gkyl_mat_set(&rhs_ux_xl,0,0,rhoux[0]); - gkyl_mat_set(&rhs_ux_xr,0,0,rhoux[0]); - gkyl_mat_set(&rhs_uy_xl,0,0,rhouy[0]); - gkyl_mat_set(&rhs_uy_xr,0,0,rhouy[0]); - gkyl_mat_set(&rhs_uz_xl,0,0,rhouz[0]); - gkyl_mat_set(&rhs_uz_xr,0,0,rhouz[0]); - gkyl_mat_set(&rhs_Txx_xl,0,0,3.0*Pxx_xl[0]); - gkyl_mat_set(&rhs_Txx_xr,0,0,3.0*Pxx_xr[0]); - - gkyl_mat_set(&rhs_ux_yl,0,0,rhoux[0]); - gkyl_mat_set(&rhs_ux_yr,0,0,rhoux[0]); - gkyl_mat_set(&rhs_uy_yl,0,0,rhouy[0]); - gkyl_mat_set(&rhs_uy_yr,0,0,rhouy[0]); - gkyl_mat_set(&rhs_uz_yl,0,0,rhouz[0]); - gkyl_mat_set(&rhs_uz_yr,0,0,rhouz[0]); - gkyl_mat_set(&rhs_Tyy_yl,0,0,3.0*Pyy_yl[0]); - gkyl_mat_set(&rhs_Tyy_yr,0,0,3.0*Pyy_yr[0]); - - rho_xl[1] = 0.0; - rho_xr[1] = 0.0; - rho_yl[1] = 0.0; - rho_yr[1] = 0.0; - - gkyl_mat_set(&rhs_ux_xl,1,0,0.0); - gkyl_mat_set(&rhs_ux_xr,1,0,0.0); - gkyl_mat_set(&rhs_uy_xl,1,0,0.0); - gkyl_mat_set(&rhs_uy_xr,1,0,0.0); - gkyl_mat_set(&rhs_uz_xl,1,0,0.0); - gkyl_mat_set(&rhs_uz_xr,1,0,0.0); - gkyl_mat_set(&rhs_Txx_xl,1,0,0.0); - gkyl_mat_set(&rhs_Txx_xr,1,0,0.0); - - gkyl_mat_set(&rhs_ux_yl,1,0,0.0); - gkyl_mat_set(&rhs_ux_yr,1,0,0.0); - gkyl_mat_set(&rhs_uy_yl,1,0,0.0); - gkyl_mat_set(&rhs_uy_yr,1,0,0.0); - gkyl_mat_set(&rhs_uz_yl,1,0,0.0); - gkyl_mat_set(&rhs_uz_yr,1,0,0.0); - gkyl_mat_set(&rhs_Tyy_yl,1,0,0.0); - gkyl_mat_set(&rhs_Tyy_yr,1,0,0.0); - - rho_xl[2] = 0.0; - rho_xr[2] = 0.0; - rho_yl[2] = 0.0; - rho_yr[2] = 0.0; - - gkyl_mat_set(&rhs_ux_xl,2,0,0.0); - gkyl_mat_set(&rhs_ux_xr,2,0,0.0); - gkyl_mat_set(&rhs_uy_xl,2,0,0.0); - gkyl_mat_set(&rhs_uy_xr,2,0,0.0); - gkyl_mat_set(&rhs_uz_xl,2,0,0.0); - gkyl_mat_set(&rhs_uz_xr,2,0,0.0); - gkyl_mat_set(&rhs_Txx_xl,2,0,0.0); - gkyl_mat_set(&rhs_Txx_xr,2,0,0.0); - - gkyl_mat_set(&rhs_ux_yl,2,0,0.0); - gkyl_mat_set(&rhs_ux_yr,2,0,0.0); - gkyl_mat_set(&rhs_uy_yl,2,0,0.0); - gkyl_mat_set(&rhs_uy_yr,2,0,0.0); - gkyl_mat_set(&rhs_uz_yl,2,0,0.0); - gkyl_mat_set(&rhs_uz_yr,2,0,0.0); - gkyl_mat_set(&rhs_Tyy_yl,2,0,0.0); - gkyl_mat_set(&rhs_Tyy_yr,2,0,0.0); - - } else { - double rhoux_xl[3] = {0.0}; - double rhoux_xr[3] = {0.0}; - double rhouy_xl[3] = {0.0}; - double rhouy_xr[3] = {0.0}; - double rhouz_xl[3] = {0.0}; - double rhouz_xr[3] = {0.0}; - - rhoux_xl[0] = 1.58113883008419*rhoux[4]-1.224744871391589*rhoux[1]+0.7071067811865475*rhoux[0]; - rhoux_xl[1] = 1.58113883008419*rhoux[6]-1.224744871391589*rhoux[3]+0.7071067811865475*rhoux[2]; - rhoux_xl[2] = 1.58113883008419*rhoux[8]-1.224744871391589*rhoux[7]+0.7071067811865475*rhoux[5]; - rhoux_xr[0] = 1.58113883008419*rhoux[4]+1.224744871391589*rhoux[1]+0.7071067811865475*rhoux[0]; - rhoux_xr[1] = 1.58113883008419*rhoux[6]+1.224744871391589*rhoux[3]+0.7071067811865475*rhoux[2]; - rhoux_xr[2] = 1.58113883008419*rhoux[8]+1.224744871391589*rhoux[7]+0.7071067811865475*rhoux[5]; - rhouy_xl[0] = 1.58113883008419*rhouy[4]-1.224744871391589*rhouy[1]+0.7071067811865475*rhouy[0]; - rhouy_xl[1] = 1.58113883008419*rhouy[6]-1.224744871391589*rhouy[3]+0.7071067811865475*rhouy[2]; - rhouy_xl[2] = 1.58113883008419*rhouy[8]-1.224744871391589*rhouy[7]+0.7071067811865475*rhouy[5]; - rhouy_xr[0] = 1.58113883008419*rhouy[4]+1.224744871391589*rhouy[1]+0.7071067811865475*rhouy[0]; - rhouy_xr[1] = 1.58113883008419*rhouy[6]+1.224744871391589*rhouy[3]+0.7071067811865475*rhouy[2]; - rhouy_xr[2] = 1.58113883008419*rhouy[8]+1.224744871391589*rhouy[7]+0.7071067811865475*rhouy[5]; - rhouz_xl[0] = 1.58113883008419*rhouz[4]-1.224744871391589*rhouz[1]+0.7071067811865475*rhouz[0]; - rhouz_xl[1] = 1.58113883008419*rhouz[6]-1.224744871391589*rhouz[3]+0.7071067811865475*rhouz[2]; - rhouz_xl[2] = 1.58113883008419*rhouz[8]-1.224744871391589*rhouz[7]+0.7071067811865475*rhouz[5]; - rhouz_xr[0] = 1.58113883008419*rhouz[4]+1.224744871391589*rhouz[1]+0.7071067811865475*rhouz[0]; - rhouz_xr[1] = 1.58113883008419*rhouz[6]+1.224744871391589*rhouz[3]+0.7071067811865475*rhouz[2]; - rhouz_xr[2] = 1.58113883008419*rhouz[8]+1.224744871391589*rhouz[7]+0.7071067811865475*rhouz[5]; - double rhoux_yl[3] = {0.0}; - double rhoux_yr[3] = {0.0}; - double rhouy_yl[3] = {0.0}; - double rhouy_yr[3] = {0.0}; - double rhouz_yl[3] = {0.0}; - double rhouz_yr[3] = {0.0}; - - rhoux_yl[0] = 1.58113883008419*rhoux[5]-1.224744871391589*rhoux[2]+0.7071067811865475*rhoux[0]; - rhoux_yl[1] = 1.58113883008419*rhoux[7]-1.224744871391589*rhoux[3]+0.7071067811865475*rhoux[1]; - rhoux_yl[2] = 1.58113883008419*rhoux[8]-1.224744871391589*rhoux[6]+0.7071067811865475*rhoux[4]; - rhoux_yr[0] = 1.58113883008419*rhoux[5]+1.224744871391589*rhoux[2]+0.7071067811865475*rhoux[0]; - rhoux_yr[1] = 1.58113883008419*rhoux[7]+1.224744871391589*rhoux[3]+0.7071067811865475*rhoux[1]; - rhoux_yr[2] = 1.58113883008419*rhoux[8]+1.224744871391589*rhoux[6]+0.7071067811865475*rhoux[4]; - rhouy_yl[0] = 1.58113883008419*rhouy[5]-1.224744871391589*rhouy[2]+0.7071067811865475*rhouy[0]; - rhouy_yl[1] = 1.58113883008419*rhouy[7]-1.224744871391589*rhouy[3]+0.7071067811865475*rhouy[1]; - rhouy_yl[2] = 1.58113883008419*rhouy[8]-1.224744871391589*rhouy[6]+0.7071067811865475*rhouy[4]; - rhouy_yr[0] = 1.58113883008419*rhouy[5]+1.224744871391589*rhouy[2]+0.7071067811865475*rhouy[0]; - rhouy_yr[1] = 1.58113883008419*rhouy[7]+1.224744871391589*rhouy[3]+0.7071067811865475*rhouy[1]; - rhouy_yr[2] = 1.58113883008419*rhouy[8]+1.224744871391589*rhouy[6]+0.7071067811865475*rhouy[4]; - rhouz_yl[0] = 1.58113883008419*rhouz[5]-1.224744871391589*rhouz[2]+0.7071067811865475*rhouz[0]; - rhouz_yl[1] = 1.58113883008419*rhouz[7]-1.224744871391589*rhouz[3]+0.7071067811865475*rhouz[1]; - rhouz_yl[2] = 1.58113883008419*rhouz[8]-1.224744871391589*rhouz[6]+0.7071067811865475*rhouz[4]; - rhouz_yr[0] = 1.58113883008419*rhouz[5]+1.224744871391589*rhouz[2]+0.7071067811865475*rhouz[0]; - rhouz_yr[1] = 1.58113883008419*rhouz[7]+1.224744871391589*rhouz[3]+0.7071067811865475*rhouz[1]; - rhouz_yr[2] = 1.58113883008419*rhouz[8]+1.224744871391589*rhouz[6]+0.7071067811865475*rhouz[4]; - - gkyl_mat_set(&rhs_ux_xl,0,0,rhoux_xl[0]); - gkyl_mat_set(&rhs_ux_xr,0,0,rhoux_xr[0]); - gkyl_mat_set(&rhs_uy_xl,0,0,rhouy_xl[0]); - gkyl_mat_set(&rhs_uy_xr,0,0,rhouy_xr[0]); - gkyl_mat_set(&rhs_uz_xl,0,0,rhouz_xl[0]); - gkyl_mat_set(&rhs_uz_xr,0,0,rhouz_xr[0]); - gkyl_mat_set(&rhs_Txx_xl,0,0,3.0*Pxx_xl[0]); - gkyl_mat_set(&rhs_Txx_xr,0,0,3.0*Pxx_xr[0]); - - gkyl_mat_set(&rhs_ux_yl,0,0,rhoux_yl[0]); - gkyl_mat_set(&rhs_ux_yr,0,0,rhoux_yr[0]); - gkyl_mat_set(&rhs_uy_yl,0,0,rhouy_yl[0]); - gkyl_mat_set(&rhs_uy_yr,0,0,rhouy_yr[0]); - gkyl_mat_set(&rhs_uz_yl,0,0,rhouz_yl[0]); - gkyl_mat_set(&rhs_uz_yr,0,0,rhouz_yr[0]); - gkyl_mat_set(&rhs_Tyy_yl,0,0,3.0*Pyy_yl[0]); - gkyl_mat_set(&rhs_Tyy_yr,0,0,3.0*Pyy_yr[0]); - - gkyl_mat_set(&rhs_ux_xl,1,0,rhoux_xl[1]); - gkyl_mat_set(&rhs_ux_xr,1,0,rhoux_xr[1]); - gkyl_mat_set(&rhs_uy_xl,1,0,rhouy_xl[1]); - gkyl_mat_set(&rhs_uy_xr,1,0,rhouy_xr[1]); - gkyl_mat_set(&rhs_uz_xl,1,0,rhouz_xl[1]); - gkyl_mat_set(&rhs_uz_xr,1,0,rhouz_xr[1]); - gkyl_mat_set(&rhs_Txx_xl,1,0,3.0*Pxx_xl[1]); - gkyl_mat_set(&rhs_Txx_xr,1,0,3.0*Pxx_xr[1]); - - gkyl_mat_set(&rhs_ux_yl,1,0,rhoux_yl[1]); - gkyl_mat_set(&rhs_ux_yr,1,0,rhoux_yr[1]); - gkyl_mat_set(&rhs_uy_yl,1,0,rhouy_yl[1]); - gkyl_mat_set(&rhs_uy_yr,1,0,rhouy_yr[1]); - gkyl_mat_set(&rhs_uz_yl,1,0,rhouz_yl[1]); - gkyl_mat_set(&rhs_uz_yr,1,0,rhouz_yr[1]); - gkyl_mat_set(&rhs_Tyy_yl,1,0,3.0*Pyy_yl[1]); - gkyl_mat_set(&rhs_Tyy_yr,1,0,3.0*Pyy_yr[1]); - - gkyl_mat_set(&rhs_ux_xl,2,0,rhoux_xl[2]); - gkyl_mat_set(&rhs_ux_xr,2,0,rhoux_xr[2]); - gkyl_mat_set(&rhs_uy_xl,2,0,rhouy_xl[2]); - gkyl_mat_set(&rhs_uy_xr,2,0,rhouy_xr[2]); - gkyl_mat_set(&rhs_uz_xl,2,0,rhouz_xl[2]); - gkyl_mat_set(&rhs_uz_xr,2,0,rhouz_xr[2]); - gkyl_mat_set(&rhs_Txx_xl,2,0,3.0*Pxx_xl[2]); - gkyl_mat_set(&rhs_Txx_xr,2,0,3.0*Pxx_xr[2]); - - gkyl_mat_set(&rhs_ux_yl,2,0,rhoux_yl[2]); - gkyl_mat_set(&rhs_ux_yr,2,0,rhoux_yr[2]); - gkyl_mat_set(&rhs_uy_yl,2,0,rhouy_yl[2]); - gkyl_mat_set(&rhs_uy_yr,2,0,rhouy_yr[2]); - gkyl_mat_set(&rhs_uz_yl,2,0,rhouz_yl[2]); - gkyl_mat_set(&rhs_uz_yr,2,0,rhouz_yr[2]); - gkyl_mat_set(&rhs_Tyy_yl,2,0,3.0*Pyy_yl[2]); - gkyl_mat_set(&rhs_Tyy_yr,2,0,3.0*Pyy_yr[2]); - - } - - double temp_rho_xl = 0.0; - double temp_rho_xr = 0.0; - double temp_rho_yl = 0.0; - double temp_rho_yr = 0.0; - temp_rho_xl = 0.7071067811865475*rho_xl[0]; - gkyl_mat_set(&A_ux_xl,0,0,temp_rho_xl); - gkyl_mat_set(&A_uy_xl,0,0,temp_rho_xl); - gkyl_mat_set(&A_uz_xl,0,0,temp_rho_xl); - gkyl_mat_set(&A_Txx_xl,0,0,temp_rho_xl); - - temp_rho_xr = 0.7071067811865475*rho_xr[0]; - gkyl_mat_set(&A_ux_xr,0,0,temp_rho_xr); - gkyl_mat_set(&A_uy_xr,0,0,temp_rho_xr); - gkyl_mat_set(&A_uz_xr,0,0,temp_rho_xr); - gkyl_mat_set(&A_Txx_xr,0,0,temp_rho_xr); - - temp_rho_yl = 0.7071067811865475*rho_yl[0]; - gkyl_mat_set(&A_ux_yl,0,0,temp_rho_yl); - gkyl_mat_set(&A_uy_yl,0,0,temp_rho_yl); - gkyl_mat_set(&A_uz_yl,0,0,temp_rho_yl); - gkyl_mat_set(&A_Tyy_yl,0,0,temp_rho_yl); - - temp_rho_yr = 0.7071067811865475*rho_yr[0]; - gkyl_mat_set(&A_ux_yr,0,0,temp_rho_yr); - gkyl_mat_set(&A_uy_yr,0,0,temp_rho_yr); - gkyl_mat_set(&A_uz_yr,0,0,temp_rho_yr); - gkyl_mat_set(&A_Tyy_yr,0,0,temp_rho_yr); - - temp_rho_xl = 0.7071067811865475*rho_xl[1]; - gkyl_mat_set(&A_ux_xl,0,1,temp_rho_xl); - gkyl_mat_set(&A_uy_xl,0,1,temp_rho_xl); - gkyl_mat_set(&A_uz_xl,0,1,temp_rho_xl); - gkyl_mat_set(&A_Txx_xl,0,1,temp_rho_xl); - - temp_rho_xr = 0.7071067811865475*rho_xr[1]; - gkyl_mat_set(&A_ux_xr,0,1,temp_rho_xr); - gkyl_mat_set(&A_uy_xr,0,1,temp_rho_xr); - gkyl_mat_set(&A_uz_xr,0,1,temp_rho_xr); - gkyl_mat_set(&A_Txx_xr,0,1,temp_rho_xr); - - temp_rho_yl = 0.7071067811865475*rho_yl[1]; - gkyl_mat_set(&A_ux_yl,0,1,temp_rho_yl); - gkyl_mat_set(&A_uy_yl,0,1,temp_rho_yl); - gkyl_mat_set(&A_uz_yl,0,1,temp_rho_yl); - gkyl_mat_set(&A_Tyy_yl,0,1,temp_rho_yl); - - temp_rho_yr = 0.7071067811865475*rho_yr[1]; - gkyl_mat_set(&A_ux_yr,0,1,temp_rho_yr); - gkyl_mat_set(&A_uy_yr,0,1,temp_rho_yr); - gkyl_mat_set(&A_uz_yr,0,1,temp_rho_yr); - gkyl_mat_set(&A_Tyy_yr,0,1,temp_rho_yr); - - temp_rho_xl = 0.7071067811865475*rho_xl[2]; - gkyl_mat_set(&A_ux_xl,0,2,temp_rho_xl); - gkyl_mat_set(&A_uy_xl,0,2,temp_rho_xl); - gkyl_mat_set(&A_uz_xl,0,2,temp_rho_xl); - gkyl_mat_set(&A_Txx_xl,0,2,temp_rho_xl); - - temp_rho_xr = 0.7071067811865475*rho_xr[2]; - gkyl_mat_set(&A_ux_xr,0,2,temp_rho_xr); - gkyl_mat_set(&A_uy_xr,0,2,temp_rho_xr); - gkyl_mat_set(&A_uz_xr,0,2,temp_rho_xr); - gkyl_mat_set(&A_Txx_xr,0,2,temp_rho_xr); - - temp_rho_yl = 0.7071067811865475*rho_yl[2]; - gkyl_mat_set(&A_ux_yl,0,2,temp_rho_yl); - gkyl_mat_set(&A_uy_yl,0,2,temp_rho_yl); - gkyl_mat_set(&A_uz_yl,0,2,temp_rho_yl); - gkyl_mat_set(&A_Tyy_yl,0,2,temp_rho_yl); - - temp_rho_yr = 0.7071067811865475*rho_yr[2]; - gkyl_mat_set(&A_ux_yr,0,2,temp_rho_yr); - gkyl_mat_set(&A_uy_yr,0,2,temp_rho_yr); - gkyl_mat_set(&A_uz_yr,0,2,temp_rho_yr); - gkyl_mat_set(&A_Tyy_yr,0,2,temp_rho_yr); - - temp_rho_xl = 0.7071067811865475*rho_xl[1]; - gkyl_mat_set(&A_ux_xl,1,0,temp_rho_xl); - gkyl_mat_set(&A_uy_xl,1,0,temp_rho_xl); - gkyl_mat_set(&A_uz_xl,1,0,temp_rho_xl); - gkyl_mat_set(&A_Txx_xl,1,0,temp_rho_xl); - - temp_rho_xr = 0.7071067811865475*rho_xr[1]; - gkyl_mat_set(&A_ux_xr,1,0,temp_rho_xr); - gkyl_mat_set(&A_uy_xr,1,0,temp_rho_xr); - gkyl_mat_set(&A_uz_xr,1,0,temp_rho_xr); - gkyl_mat_set(&A_Txx_xr,1,0,temp_rho_xr); - - temp_rho_yl = 0.7071067811865475*rho_yl[1]; - gkyl_mat_set(&A_ux_yl,1,0,temp_rho_yl); - gkyl_mat_set(&A_uy_yl,1,0,temp_rho_yl); - gkyl_mat_set(&A_uz_yl,1,0,temp_rho_yl); - gkyl_mat_set(&A_Tyy_yl,1,0,temp_rho_yl); - - temp_rho_yr = 0.7071067811865475*rho_yr[1]; - gkyl_mat_set(&A_ux_yr,1,0,temp_rho_yr); - gkyl_mat_set(&A_uy_yr,1,0,temp_rho_yr); - gkyl_mat_set(&A_uz_yr,1,0,temp_rho_yr); - gkyl_mat_set(&A_Tyy_yr,1,0,temp_rho_yr); - - temp_rho_xl = 0.6324555320336759*rho_xl[2]+0.7071067811865475*rho_xl[0]; - gkyl_mat_set(&A_ux_xl,1,1,temp_rho_xl); - gkyl_mat_set(&A_uy_xl,1,1,temp_rho_xl); - gkyl_mat_set(&A_uz_xl,1,1,temp_rho_xl); - gkyl_mat_set(&A_Txx_xl,1,1,temp_rho_xl); - - temp_rho_xr = 0.6324555320336759*rho_xr[2]+0.7071067811865475*rho_xr[0]; - gkyl_mat_set(&A_ux_xr,1,1,temp_rho_xr); - gkyl_mat_set(&A_uy_xr,1,1,temp_rho_xr); - gkyl_mat_set(&A_uz_xr,1,1,temp_rho_xr); - gkyl_mat_set(&A_Txx_xr,1,1,temp_rho_xr); - - temp_rho_yl = 0.6324555320336759*rho_yl[2]+0.7071067811865475*rho_yl[0]; - gkyl_mat_set(&A_ux_yl,1,1,temp_rho_yl); - gkyl_mat_set(&A_uy_yl,1,1,temp_rho_yl); - gkyl_mat_set(&A_uz_yl,1,1,temp_rho_yl); - gkyl_mat_set(&A_Tyy_yl,1,1,temp_rho_yl); - - temp_rho_yr = 0.6324555320336759*rho_yr[2]+0.7071067811865475*rho_yr[0]; - gkyl_mat_set(&A_ux_yr,1,1,temp_rho_yr); - gkyl_mat_set(&A_uy_yr,1,1,temp_rho_yr); - gkyl_mat_set(&A_uz_yr,1,1,temp_rho_yr); - gkyl_mat_set(&A_Tyy_yr,1,1,temp_rho_yr); - - temp_rho_xl = 0.6324555320336759*rho_xl[1]; - gkyl_mat_set(&A_ux_xl,1,2,temp_rho_xl); - gkyl_mat_set(&A_uy_xl,1,2,temp_rho_xl); - gkyl_mat_set(&A_uz_xl,1,2,temp_rho_xl); - gkyl_mat_set(&A_Txx_xl,1,2,temp_rho_xl); - - temp_rho_xr = 0.6324555320336759*rho_xr[1]; - gkyl_mat_set(&A_ux_xr,1,2,temp_rho_xr); - gkyl_mat_set(&A_uy_xr,1,2,temp_rho_xr); - gkyl_mat_set(&A_uz_xr,1,2,temp_rho_xr); - gkyl_mat_set(&A_Txx_xr,1,2,temp_rho_xr); - - temp_rho_yl = 0.6324555320336759*rho_yl[1]; - gkyl_mat_set(&A_ux_yl,1,2,temp_rho_yl); - gkyl_mat_set(&A_uy_yl,1,2,temp_rho_yl); - gkyl_mat_set(&A_uz_yl,1,2,temp_rho_yl); - gkyl_mat_set(&A_Tyy_yl,1,2,temp_rho_yl); - - temp_rho_yr = 0.6324555320336759*rho_yr[1]; - gkyl_mat_set(&A_ux_yr,1,2,temp_rho_yr); - gkyl_mat_set(&A_uy_yr,1,2,temp_rho_yr); - gkyl_mat_set(&A_uz_yr,1,2,temp_rho_yr); - gkyl_mat_set(&A_Tyy_yr,1,2,temp_rho_yr); - - temp_rho_xl = 0.7071067811865475*rho_xl[2]; - gkyl_mat_set(&A_ux_xl,2,0,temp_rho_xl); - gkyl_mat_set(&A_uy_xl,2,0,temp_rho_xl); - gkyl_mat_set(&A_uz_xl,2,0,temp_rho_xl); - gkyl_mat_set(&A_Txx_xl,2,0,temp_rho_xl); - - temp_rho_xr = 0.7071067811865475*rho_xr[2]; - gkyl_mat_set(&A_ux_xr,2,0,temp_rho_xr); - gkyl_mat_set(&A_uy_xr,2,0,temp_rho_xr); - gkyl_mat_set(&A_uz_xr,2,0,temp_rho_xr); - gkyl_mat_set(&A_Txx_xr,2,0,temp_rho_xr); - - temp_rho_yl = 0.7071067811865475*rho_yl[2]; - gkyl_mat_set(&A_ux_yl,2,0,temp_rho_yl); - gkyl_mat_set(&A_uy_yl,2,0,temp_rho_yl); - gkyl_mat_set(&A_uz_yl,2,0,temp_rho_yl); - gkyl_mat_set(&A_Tyy_yl,2,0,temp_rho_yl); - - temp_rho_yr = 0.7071067811865475*rho_yr[2]; - gkyl_mat_set(&A_ux_yr,2,0,temp_rho_yr); - gkyl_mat_set(&A_uy_yr,2,0,temp_rho_yr); - gkyl_mat_set(&A_uz_yr,2,0,temp_rho_yr); - gkyl_mat_set(&A_Tyy_yr,2,0,temp_rho_yr); - - temp_rho_xl = 0.6324555320336759*rho_xl[1]; - gkyl_mat_set(&A_ux_xl,2,1,temp_rho_xl); - gkyl_mat_set(&A_uy_xl,2,1,temp_rho_xl); - gkyl_mat_set(&A_uz_xl,2,1,temp_rho_xl); - gkyl_mat_set(&A_Txx_xl,2,1,temp_rho_xl); - - temp_rho_xr = 0.6324555320336759*rho_xr[1]; - gkyl_mat_set(&A_ux_xr,2,1,temp_rho_xr); - gkyl_mat_set(&A_uy_xr,2,1,temp_rho_xr); - gkyl_mat_set(&A_uz_xr,2,1,temp_rho_xr); - gkyl_mat_set(&A_Txx_xr,2,1,temp_rho_xr); - - temp_rho_yl = 0.6324555320336759*rho_yl[1]; - gkyl_mat_set(&A_ux_yl,2,1,temp_rho_yl); - gkyl_mat_set(&A_uy_yl,2,1,temp_rho_yl); - gkyl_mat_set(&A_uz_yl,2,1,temp_rho_yl); - gkyl_mat_set(&A_Tyy_yl,2,1,temp_rho_yl); - - temp_rho_yr = 0.6324555320336759*rho_yr[1]; - gkyl_mat_set(&A_ux_yr,2,1,temp_rho_yr); - gkyl_mat_set(&A_uy_yr,2,1,temp_rho_yr); - gkyl_mat_set(&A_uz_yr,2,1,temp_rho_yr); - gkyl_mat_set(&A_Tyy_yr,2,1,temp_rho_yr); - - temp_rho_xl = 0.4517539514526256*rho_xl[2]+0.7071067811865475*rho_xl[0]; - gkyl_mat_set(&A_ux_xl,2,2,temp_rho_xl); - gkyl_mat_set(&A_uy_xl,2,2,temp_rho_xl); - gkyl_mat_set(&A_uz_xl,2,2,temp_rho_xl); - gkyl_mat_set(&A_Txx_xl,2,2,temp_rho_xl); - - temp_rho_xr = 0.4517539514526256*rho_xr[2]+0.7071067811865475*rho_xr[0]; - gkyl_mat_set(&A_ux_xr,2,2,temp_rho_xr); - gkyl_mat_set(&A_uy_xr,2,2,temp_rho_xr); - gkyl_mat_set(&A_uz_xr,2,2,temp_rho_xr); - gkyl_mat_set(&A_Txx_xr,2,2,temp_rho_xr); - - temp_rho_yl = 0.4517539514526256*rho_yl[2]+0.7071067811865475*rho_yl[0]; - gkyl_mat_set(&A_ux_yl,2,2,temp_rho_yl); - gkyl_mat_set(&A_uy_yl,2,2,temp_rho_yl); - gkyl_mat_set(&A_uz_yl,2,2,temp_rho_yl); - gkyl_mat_set(&A_Tyy_yl,2,2,temp_rho_yl); - - temp_rho_yr = 0.4517539514526256*rho_yr[2]+0.7071067811865475*rho_yr[0]; - gkyl_mat_set(&A_ux_yr,2,2,temp_rho_yr); - gkyl_mat_set(&A_uy_yr,2,2,temp_rho_yr); - gkyl_mat_set(&A_uz_yr,2,2,temp_rho_yr); - gkyl_mat_set(&A_Tyy_yr,2,2,temp_rho_yr); - -} diff --git a/kernels/pkpm/pkpm_vars_surf_set_3x_ser_p1.c b/kernels/pkpm/pkpm_vars_surf_set_3x_ser_p1.c deleted file mode 100644 index a2156a705..000000000 --- a/kernels/pkpm/pkpm_vars_surf_set_3x_ser_p1.c +++ /dev/null @@ -1,403 +0,0 @@ -#include -#include -#include -#include -GKYL_CU_DH void pkpm_vars_surf_set_3x_ser_p1(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, - const double *p_ij_surf, const int *cell_avg_prim) -{ - // count: integer to indicate which matrix being fetched. - // A: preallocated LHS matrix. - // rhs: preallocated RHS vector. - // vlasov_pkpm_moms: Input [rho, p_parallel, p_perp], Moments computed from kinetic equation in pkpm model. - // euler_pkpm: Input [rho ux, rho uy, rho uz], Fluid input state vector. - // p_ij_surf: Input surface expansion of p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij. - // [Pxx_xl, Pxx_xr, Pxy_xl, Pxy_xr, Pxz_xl, Pxz_xr, - // Pxy_yl, Pxy_yr, Pyy_yl, Pyy_yr, Pyz_yl, Pyz_yr, - // Pxz_zl, Pxz_zr, Pyz_zl, Pyz_zr, Pzz_zl, Pzz_zr] - // cell_avg_prim: Boolean array to determine if we only use cell averages when computing surface expansions. - - // For poly_order = 1, we can analytically invert the matrix and just store the solution - struct gkyl_mat rhs_ux_xl = gkyl_nmat_get(rhs, count); - struct gkyl_mat rhs_ux_xr = gkyl_nmat_get(rhs, count+1); - struct gkyl_mat rhs_uy_xl = gkyl_nmat_get(rhs, count+2); - struct gkyl_mat rhs_uy_xr = gkyl_nmat_get(rhs, count+3); - struct gkyl_mat rhs_uz_xl = gkyl_nmat_get(rhs, count+4); - struct gkyl_mat rhs_uz_xr = gkyl_nmat_get(rhs, count+5); - struct gkyl_mat rhs_Txx_xl = gkyl_nmat_get(rhs, count+6); - struct gkyl_mat rhs_Txx_xr = gkyl_nmat_get(rhs, count+7); - struct gkyl_mat rhs_ux_yl = gkyl_nmat_get(rhs, count+8); - struct gkyl_mat rhs_ux_yr = gkyl_nmat_get(rhs, count+9); - struct gkyl_mat rhs_uy_yl = gkyl_nmat_get(rhs, count+10); - struct gkyl_mat rhs_uy_yr = gkyl_nmat_get(rhs, count+11); - struct gkyl_mat rhs_uz_yl = gkyl_nmat_get(rhs, count+12); - struct gkyl_mat rhs_uz_yr = gkyl_nmat_get(rhs, count+13); - struct gkyl_mat rhs_Tyy_yl = gkyl_nmat_get(rhs, count+14); - struct gkyl_mat rhs_Tyy_yr = gkyl_nmat_get(rhs, count+15); - struct gkyl_mat rhs_ux_zl = gkyl_nmat_get(rhs, count+16); - struct gkyl_mat rhs_ux_zr = gkyl_nmat_get(rhs, count+17); - struct gkyl_mat rhs_uy_zl = gkyl_nmat_get(rhs, count+18); - struct gkyl_mat rhs_uy_zr = gkyl_nmat_get(rhs, count+19); - struct gkyl_mat rhs_uz_zl = gkyl_nmat_get(rhs, count+20); - struct gkyl_mat rhs_uz_zr = gkyl_nmat_get(rhs, count+21); - struct gkyl_mat rhs_Tzz_zl = gkyl_nmat_get(rhs, count+22); - struct gkyl_mat rhs_Tzz_zr = gkyl_nmat_get(rhs, count+23); - // Clear rhs for each component of primitive variables being solved for - gkyl_mat_clear(&rhs_ux_xl, 0.0); - gkyl_mat_clear(&rhs_ux_xr, 0.0); - gkyl_mat_clear(&rhs_uy_xl, 0.0); - gkyl_mat_clear(&rhs_uy_xr, 0.0); - gkyl_mat_clear(&rhs_uz_xl, 0.0); - gkyl_mat_clear(&rhs_uz_xr, 0.0); - gkyl_mat_clear(&rhs_Txx_xl, 0.0); - gkyl_mat_clear(&rhs_Txx_xr, 0.0); - gkyl_mat_clear(&rhs_ux_yl, 0.0); - gkyl_mat_clear(&rhs_ux_yr, 0.0); - gkyl_mat_clear(&rhs_uy_yl, 0.0); - gkyl_mat_clear(&rhs_uy_yr, 0.0); - gkyl_mat_clear(&rhs_uz_yl, 0.0); - gkyl_mat_clear(&rhs_uz_yr, 0.0); - gkyl_mat_clear(&rhs_Tyy_yl, 0.0); - gkyl_mat_clear(&rhs_Tyy_yr, 0.0); - gkyl_mat_clear(&rhs_ux_zl, 0.0); - gkyl_mat_clear(&rhs_ux_zr, 0.0); - gkyl_mat_clear(&rhs_uy_zl, 0.0); - gkyl_mat_clear(&rhs_uy_zr, 0.0); - gkyl_mat_clear(&rhs_uz_zl, 0.0); - gkyl_mat_clear(&rhs_uz_zr, 0.0); - gkyl_mat_clear(&rhs_Tzz_zl, 0.0); - gkyl_mat_clear(&rhs_Tzz_zr, 0.0); - const double *rhoux = &euler_pkpm[0]; - const double *rhouy = &euler_pkpm[8]; - const double *rhouz = &euler_pkpm[16]; - const double *rho = &vlasov_pkpm_moms[0]; - const double *Pxx_xl = &p_ij_surf[0]; - const double *Pxx_xr = &p_ij_surf[4]; - const double *Pyy_yl = &p_ij_surf[32]; - const double *Pyy_yr = &p_ij_surf[36]; - const double *Pzz_zl = &p_ij_surf[64]; - const double *Pzz_zr = &p_ij_surf[68]; - double ux_xl[4] = {0.0}; - double ux_xr[4] = {0.0}; - double uy_xl[4] = {0.0}; - double uy_xr[4] = {0.0}; - double uz_xl[4] = {0.0}; - double uz_xr[4] = {0.0}; - double Txx_xl[4] = {0.0}; - double Txx_xr[4] = {0.0}; - double ux_yl[4] = {0.0}; - double ux_yr[4] = {0.0}; - double uy_yl[4] = {0.0}; - double uy_yr[4] = {0.0}; - double uz_yl[4] = {0.0}; - double uz_yr[4] = {0.0}; - double Tyy_yl[4] = {0.0}; - double Tyy_yr[4] = {0.0}; - double ux_zl[4] = {0.0}; - double ux_zr[4] = {0.0}; - double uy_zl[4] = {0.0}; - double uy_zr[4] = {0.0}; - double uz_zl[4] = {0.0}; - double uz_zr[4] = {0.0}; - double Tzz_zl[4] = {0.0}; - double Tzz_zr[4] = {0.0}; - if (cell_avg_prim[0]) { - // If rho or p_perp < 0 at control points, only use cell average. - ux_xl[0] = rhoux[0]/rho[0]; - ux_xr[0] = rhoux[0]/rho[0]; - uy_xl[0] = rhouy[0]/rho[0]; - uy_xr[0] = rhouy[0]/rho[0]; - uz_xl[0] = rhouz[0]/rho[0]; - uz_xr[0] = rhouz[0]/rho[0]; - Txx_xl[0] = Pxx_xl[0]/rho[0]; - Txx_xr[0] = Pxx_xr[0]/rho[0]; - ux_yl[0] = rhoux[0]/rho[0]; - ux_yr[0] = rhoux[0]/rho[0]; - uy_yl[0] = rhouy[0]/rho[0]; - uy_yr[0] = rhouy[0]/rho[0]; - uz_yl[0] = rhouz[0]/rho[0]; - uz_yr[0] = rhouz[0]/rho[0]; - Tyy_yl[0] = Pyy_yl[0]/rho[0]; - Tyy_yr[0] = Pyy_yr[0]/rho[0]; - ux_zl[0] = rhoux[0]/rho[0]; - ux_zr[0] = rhoux[0]/rho[0]; - uy_zl[0] = rhouy[0]/rho[0]; - uy_zr[0] = rhouy[0]/rho[0]; - uz_zl[0] = rhouz[0]/rho[0]; - uz_zr[0] = rhouz[0]/rho[0]; - Tzz_zl[0] = Pzz_zl[0]/rho[0]; - Tzz_zr[0] = Pzz_zr[0]/rho[0]; - } else { - double rhoux_xl[4] = {0.0}; - double rhoux_xr[4] = {0.0}; - double rhouy_xl[4] = {0.0}; - double rhouy_xr[4] = {0.0}; - double rhouz_xl[4] = {0.0}; - double rhouz_xr[4] = {0.0}; - double rho_xl[4] = {0.0}; - double rho_xr[4] = {0.0}; - double rho_inv_xl[4] = {0.0}; - double rho_inv_xr[4] = {0.0}; - - rhoux_xl[0] = 0.7071067811865475*rhoux[0]-1.224744871391589*rhoux[1]; - rhoux_xl[1] = 0.7071067811865475*rhoux[2]-1.224744871391589*rhoux[4]; - rhoux_xl[2] = 0.7071067811865475*rhoux[3]-1.224744871391589*rhoux[5]; - rhoux_xl[3] = 0.7071067811865475*rhoux[6]-1.224744871391589*rhoux[7]; - rhoux_xr[0] = 1.224744871391589*rhoux[1]+0.7071067811865475*rhoux[0]; - rhoux_xr[1] = 1.224744871391589*rhoux[4]+0.7071067811865475*rhoux[2]; - rhoux_xr[2] = 1.224744871391589*rhoux[5]+0.7071067811865475*rhoux[3]; - rhoux_xr[3] = 1.224744871391589*rhoux[7]+0.7071067811865475*rhoux[6]; - rhouy_xl[0] = 0.7071067811865475*rhouy[0]-1.224744871391589*rhouy[1]; - rhouy_xl[1] = 0.7071067811865475*rhouy[2]-1.224744871391589*rhouy[4]; - rhouy_xl[2] = 0.7071067811865475*rhouy[3]-1.224744871391589*rhouy[5]; - rhouy_xl[3] = 0.7071067811865475*rhouy[6]-1.224744871391589*rhouy[7]; - rhouy_xr[0] = 1.224744871391589*rhouy[1]+0.7071067811865475*rhouy[0]; - rhouy_xr[1] = 1.224744871391589*rhouy[4]+0.7071067811865475*rhouy[2]; - rhouy_xr[2] = 1.224744871391589*rhouy[5]+0.7071067811865475*rhouy[3]; - rhouy_xr[3] = 1.224744871391589*rhouy[7]+0.7071067811865475*rhouy[6]; - rhouz_xl[0] = 0.7071067811865475*rhouz[0]-1.224744871391589*rhouz[1]; - rhouz_xl[1] = 0.7071067811865475*rhouz[2]-1.224744871391589*rhouz[4]; - rhouz_xl[2] = 0.7071067811865475*rhouz[3]-1.224744871391589*rhouz[5]; - rhouz_xl[3] = 0.7071067811865475*rhouz[6]-1.224744871391589*rhouz[7]; - rhouz_xr[0] = 1.224744871391589*rhouz[1]+0.7071067811865475*rhouz[0]; - rhouz_xr[1] = 1.224744871391589*rhouz[4]+0.7071067811865475*rhouz[2]; - rhouz_xr[2] = 1.224744871391589*rhouz[5]+0.7071067811865475*rhouz[3]; - rhouz_xr[3] = 1.224744871391589*rhouz[7]+0.7071067811865475*rhouz[6]; - rho_xl[0] = 0.7071067811865475*rho[0]-1.224744871391589*rho[1]; - rho_xl[1] = 0.7071067811865475*rho[2]-1.224744871391589*rho[4]; - rho_xl[2] = 0.7071067811865475*rho[3]-1.224744871391589*rho[5]; - rho_xl[3] = 0.7071067811865475*rho[6]-1.224744871391589*rho[7]; - rho_xr[0] = 1.224744871391589*rho[1]+0.7071067811865475*rho[0]; - rho_xr[1] = 1.224744871391589*rho[4]+0.7071067811865475*rho[2]; - rho_xr[2] = 1.224744871391589*rho[5]+0.7071067811865475*rho[3]; - rho_xr[3] = 1.224744871391589*rho[7]+0.7071067811865475*rho[6]; - ser_2x_p1_inv(rho_xl, rho_inv_xl); - ser_2x_p1_inv(rho_xr, rho_inv_xr); - binop_mul_2d_ser_p1(rho_inv_xl, rhoux_xl, ux_xl); - binop_mul_2d_ser_p1(rho_inv_xr, rhoux_xr, ux_xr); - binop_mul_2d_ser_p1(rho_inv_xl, rhouy_xl, uy_xl); - binop_mul_2d_ser_p1(rho_inv_xr, rhouy_xr, uy_xr); - binop_mul_2d_ser_p1(rho_inv_xl, rhouz_xl, uz_xl); - binop_mul_2d_ser_p1(rho_inv_xr, rhouz_xr, uz_xr); - binop_mul_2d_ser_p1(rho_inv_xl, Pxx_xl, Txx_xl); - binop_mul_2d_ser_p1(rho_inv_xr, Pxx_xr, Txx_xr); - - double rhoux_yl[4] = {0.0}; - double rhoux_yr[4] = {0.0}; - double rhouy_yl[4] = {0.0}; - double rhouy_yr[4] = {0.0}; - double rhouz_yl[4] = {0.0}; - double rhouz_yr[4] = {0.0}; - double rho_yl[4] = {0.0}; - double rho_yr[4] = {0.0}; - double rho_inv_yl[4] = {0.0}; - double rho_inv_yr[4] = {0.0}; - - rhoux_yl[0] = 0.7071067811865475*rhoux[0]-1.224744871391589*rhoux[2]; - rhoux_yl[1] = 0.7071067811865475*rhoux[1]-1.224744871391589*rhoux[4]; - rhoux_yl[2] = 0.7071067811865475*rhoux[3]-1.224744871391589*rhoux[6]; - rhoux_yl[3] = 0.7071067811865475*rhoux[5]-1.224744871391589*rhoux[7]; - rhoux_yr[0] = 1.224744871391589*rhoux[2]+0.7071067811865475*rhoux[0]; - rhoux_yr[1] = 1.224744871391589*rhoux[4]+0.7071067811865475*rhoux[1]; - rhoux_yr[2] = 1.224744871391589*rhoux[6]+0.7071067811865475*rhoux[3]; - rhoux_yr[3] = 1.224744871391589*rhoux[7]+0.7071067811865475*rhoux[5]; - rhouy_yl[0] = 0.7071067811865475*rhouy[0]-1.224744871391589*rhouy[2]; - rhouy_yl[1] = 0.7071067811865475*rhouy[1]-1.224744871391589*rhouy[4]; - rhouy_yl[2] = 0.7071067811865475*rhouy[3]-1.224744871391589*rhouy[6]; - rhouy_yl[3] = 0.7071067811865475*rhouy[5]-1.224744871391589*rhouy[7]; - rhouy_yr[0] = 1.224744871391589*rhouy[2]+0.7071067811865475*rhouy[0]; - rhouy_yr[1] = 1.224744871391589*rhouy[4]+0.7071067811865475*rhouy[1]; - rhouy_yr[2] = 1.224744871391589*rhouy[6]+0.7071067811865475*rhouy[3]; - rhouy_yr[3] = 1.224744871391589*rhouy[7]+0.7071067811865475*rhouy[5]; - rhouz_yl[0] = 0.7071067811865475*rhouz[0]-1.224744871391589*rhouz[2]; - rhouz_yl[1] = 0.7071067811865475*rhouz[1]-1.224744871391589*rhouz[4]; - rhouz_yl[2] = 0.7071067811865475*rhouz[3]-1.224744871391589*rhouz[6]; - rhouz_yl[3] = 0.7071067811865475*rhouz[5]-1.224744871391589*rhouz[7]; - rhouz_yr[0] = 1.224744871391589*rhouz[2]+0.7071067811865475*rhouz[0]; - rhouz_yr[1] = 1.224744871391589*rhouz[4]+0.7071067811865475*rhouz[1]; - rhouz_yr[2] = 1.224744871391589*rhouz[6]+0.7071067811865475*rhouz[3]; - rhouz_yr[3] = 1.224744871391589*rhouz[7]+0.7071067811865475*rhouz[5]; - rho_yl[0] = 0.7071067811865475*rho[0]-1.224744871391589*rho[2]; - rho_yl[1] = 0.7071067811865475*rho[1]-1.224744871391589*rho[4]; - rho_yl[2] = 0.7071067811865475*rho[3]-1.224744871391589*rho[6]; - rho_yl[3] = 0.7071067811865475*rho[5]-1.224744871391589*rho[7]; - rho_yr[0] = 1.224744871391589*rho[2]+0.7071067811865475*rho[0]; - rho_yr[1] = 1.224744871391589*rho[4]+0.7071067811865475*rho[1]; - rho_yr[2] = 1.224744871391589*rho[6]+0.7071067811865475*rho[3]; - rho_yr[3] = 1.224744871391589*rho[7]+0.7071067811865475*rho[5]; - ser_2x_p1_inv(rho_yl, rho_inv_yl); - ser_2x_p1_inv(rho_yr, rho_inv_yr); - binop_mul_2d_ser_p1(rho_inv_yl, rhoux_yl, ux_yl); - binop_mul_2d_ser_p1(rho_inv_yr, rhoux_yr, ux_yr); - binop_mul_2d_ser_p1(rho_inv_yl, rhouy_yl, uy_yl); - binop_mul_2d_ser_p1(rho_inv_yr, rhouy_yr, uy_yr); - binop_mul_2d_ser_p1(rho_inv_yl, rhouz_yl, uz_yl); - binop_mul_2d_ser_p1(rho_inv_yr, rhouz_yr, uz_yr); - binop_mul_2d_ser_p1(rho_inv_yl, Pyy_yl, Tyy_yl); - binop_mul_2d_ser_p1(rho_inv_yr, Pyy_yr, Tyy_yr); - - double rhoux_zl[4] = {0.0}; - double rhoux_zr[4] = {0.0}; - double rhouy_zl[4] = {0.0}; - double rhouy_zr[4] = {0.0}; - double rhouz_zl[4] = {0.0}; - double rhouz_zr[4] = {0.0}; - double rho_zl[4] = {0.0}; - double rho_zr[4] = {0.0}; - double rho_inv_zl[4] = {0.0}; - double rho_inv_zr[4] = {0.0}; - - rhoux_zl[0] = 0.7071067811865475*rhoux[0]-1.224744871391589*rhoux[3]; - rhoux_zl[1] = 0.7071067811865475*rhoux[1]-1.224744871391589*rhoux[5]; - rhoux_zl[2] = 0.7071067811865475*rhoux[2]-1.224744871391589*rhoux[6]; - rhoux_zl[3] = 0.7071067811865475*rhoux[4]-1.224744871391589*rhoux[7]; - rhoux_zr[0] = 1.224744871391589*rhoux[3]+0.7071067811865475*rhoux[0]; - rhoux_zr[1] = 1.224744871391589*rhoux[5]+0.7071067811865475*rhoux[1]; - rhoux_zr[2] = 1.224744871391589*rhoux[6]+0.7071067811865475*rhoux[2]; - rhoux_zr[3] = 1.224744871391589*rhoux[7]+0.7071067811865475*rhoux[4]; - rhouy_zl[0] = 0.7071067811865475*rhouy[0]-1.224744871391589*rhouy[3]; - rhouy_zl[1] = 0.7071067811865475*rhouy[1]-1.224744871391589*rhouy[5]; - rhouy_zl[2] = 0.7071067811865475*rhouy[2]-1.224744871391589*rhouy[6]; - rhouy_zl[3] = 0.7071067811865475*rhouy[4]-1.224744871391589*rhouy[7]; - rhouy_zr[0] = 1.224744871391589*rhouy[3]+0.7071067811865475*rhouy[0]; - rhouy_zr[1] = 1.224744871391589*rhouy[5]+0.7071067811865475*rhouy[1]; - rhouy_zr[2] = 1.224744871391589*rhouy[6]+0.7071067811865475*rhouy[2]; - rhouy_zr[3] = 1.224744871391589*rhouy[7]+0.7071067811865475*rhouy[4]; - rhouz_zl[0] = 0.7071067811865475*rhouz[0]-1.224744871391589*rhouz[3]; - rhouz_zl[1] = 0.7071067811865475*rhouz[1]-1.224744871391589*rhouz[5]; - rhouz_zl[2] = 0.7071067811865475*rhouz[2]-1.224744871391589*rhouz[6]; - rhouz_zl[3] = 0.7071067811865475*rhouz[4]-1.224744871391589*rhouz[7]; - rhouz_zr[0] = 1.224744871391589*rhouz[3]+0.7071067811865475*rhouz[0]; - rhouz_zr[1] = 1.224744871391589*rhouz[5]+0.7071067811865475*rhouz[1]; - rhouz_zr[2] = 1.224744871391589*rhouz[6]+0.7071067811865475*rhouz[2]; - rhouz_zr[3] = 1.224744871391589*rhouz[7]+0.7071067811865475*rhouz[4]; - rho_zl[0] = 0.7071067811865475*rho[0]-1.224744871391589*rho[3]; - rho_zl[1] = 0.7071067811865475*rho[1]-1.224744871391589*rho[5]; - rho_zl[2] = 0.7071067811865475*rho[2]-1.224744871391589*rho[6]; - rho_zl[3] = 0.7071067811865475*rho[4]-1.224744871391589*rho[7]; - rho_zr[0] = 1.224744871391589*rho[3]+0.7071067811865475*rho[0]; - rho_zr[1] = 1.224744871391589*rho[5]+0.7071067811865475*rho[1]; - rho_zr[2] = 1.224744871391589*rho[6]+0.7071067811865475*rho[2]; - rho_zr[3] = 1.224744871391589*rho[7]+0.7071067811865475*rho[4]; - ser_2x_p1_inv(rho_zl, rho_inv_zl); - ser_2x_p1_inv(rho_zr, rho_inv_zr); - binop_mul_2d_ser_p1(rho_inv_zl, rhoux_zl, ux_zl); - binop_mul_2d_ser_p1(rho_inv_zr, rhoux_zr, ux_zr); - binop_mul_2d_ser_p1(rho_inv_zl, rhouy_zl, uy_zl); - binop_mul_2d_ser_p1(rho_inv_zr, rhouy_zr, uy_zr); - binop_mul_2d_ser_p1(rho_inv_zl, rhouz_zl, uz_zl); - binop_mul_2d_ser_p1(rho_inv_zr, rhouz_zr, uz_zr); - binop_mul_2d_ser_p1(rho_inv_zl, Pzz_zl, Tzz_zl); - binop_mul_2d_ser_p1(rho_inv_zr, Pzz_zr, Tzz_zr); - - } - - gkyl_mat_set(&rhs_ux_xl,0,0,ux_xl[0]); - gkyl_mat_set(&rhs_ux_xr,0,0,ux_xr[0]); - gkyl_mat_set(&rhs_uy_xl,0,0,uy_xl[0]); - gkyl_mat_set(&rhs_uy_xr,0,0,uy_xr[0]); - gkyl_mat_set(&rhs_uz_xl,0,0,uz_xl[0]); - gkyl_mat_set(&rhs_uz_xr,0,0,uz_xr[0]); - gkyl_mat_set(&rhs_Txx_xl,0,0,3.0*Txx_xl[0]); - gkyl_mat_set(&rhs_Txx_xr,0,0,3.0*Txx_xr[0]); - - gkyl_mat_set(&rhs_ux_yl,0,0,ux_yl[0]); - gkyl_mat_set(&rhs_ux_yr,0,0,ux_yr[0]); - gkyl_mat_set(&rhs_uy_yl,0,0,uy_yl[0]); - gkyl_mat_set(&rhs_uy_yr,0,0,uy_yr[0]); - gkyl_mat_set(&rhs_uz_yl,0,0,uz_yl[0]); - gkyl_mat_set(&rhs_uz_yr,0,0,uz_yr[0]); - gkyl_mat_set(&rhs_Tyy_yl,0,0,3.0*Tyy_yl[0]); - gkyl_mat_set(&rhs_Tyy_yr,0,0,3.0*Tyy_yr[0]); - - gkyl_mat_set(&rhs_ux_zl,0,0,ux_zl[0]); - gkyl_mat_set(&rhs_ux_zr,0,0,ux_zr[0]); - gkyl_mat_set(&rhs_uy_zl,0,0,uy_zl[0]); - gkyl_mat_set(&rhs_uy_zr,0,0,uy_zr[0]); - gkyl_mat_set(&rhs_uz_zl,0,0,uz_zl[0]); - gkyl_mat_set(&rhs_uz_zr,0,0,uz_zr[0]); - gkyl_mat_set(&rhs_Tzz_zl,0,0,3.0*Tzz_zl[0]); - gkyl_mat_set(&rhs_Tzz_zr,0,0,3.0*Tzz_zr[0]); - - gkyl_mat_set(&rhs_ux_xl,1,0,ux_xl[1]); - gkyl_mat_set(&rhs_ux_xr,1,0,ux_xr[1]); - gkyl_mat_set(&rhs_uy_xl,1,0,uy_xl[1]); - gkyl_mat_set(&rhs_uy_xr,1,0,uy_xr[1]); - gkyl_mat_set(&rhs_uz_xl,1,0,uz_xl[1]); - gkyl_mat_set(&rhs_uz_xr,1,0,uz_xr[1]); - gkyl_mat_set(&rhs_Txx_xl,1,0,3.0*Txx_xl[1]); - gkyl_mat_set(&rhs_Txx_xr,1,0,3.0*Txx_xr[1]); - - gkyl_mat_set(&rhs_ux_yl,1,0,ux_yl[1]); - gkyl_mat_set(&rhs_ux_yr,1,0,ux_yr[1]); - gkyl_mat_set(&rhs_uy_yl,1,0,uy_yl[1]); - gkyl_mat_set(&rhs_uy_yr,1,0,uy_yr[1]); - gkyl_mat_set(&rhs_uz_yl,1,0,uz_yl[1]); - gkyl_mat_set(&rhs_uz_yr,1,0,uz_yr[1]); - gkyl_mat_set(&rhs_Tyy_yl,1,0,3.0*Tyy_yl[1]); - gkyl_mat_set(&rhs_Tyy_yr,1,0,3.0*Tyy_yr[1]); - - gkyl_mat_set(&rhs_ux_zl,1,0,ux_zl[1]); - gkyl_mat_set(&rhs_ux_zr,1,0,ux_zr[1]); - gkyl_mat_set(&rhs_uy_zl,1,0,uy_zl[1]); - gkyl_mat_set(&rhs_uy_zr,1,0,uy_zr[1]); - gkyl_mat_set(&rhs_uz_zl,1,0,uz_zl[1]); - gkyl_mat_set(&rhs_uz_zr,1,0,uz_zr[1]); - gkyl_mat_set(&rhs_Tzz_zl,1,0,3.0*Tzz_zl[1]); - gkyl_mat_set(&rhs_Tzz_zr,1,0,3.0*Tzz_zr[1]); - - gkyl_mat_set(&rhs_ux_xl,2,0,ux_xl[2]); - gkyl_mat_set(&rhs_ux_xr,2,0,ux_xr[2]); - gkyl_mat_set(&rhs_uy_xl,2,0,uy_xl[2]); - gkyl_mat_set(&rhs_uy_xr,2,0,uy_xr[2]); - gkyl_mat_set(&rhs_uz_xl,2,0,uz_xl[2]); - gkyl_mat_set(&rhs_uz_xr,2,0,uz_xr[2]); - gkyl_mat_set(&rhs_Txx_xl,2,0,3.0*Txx_xl[2]); - gkyl_mat_set(&rhs_Txx_xr,2,0,3.0*Txx_xr[2]); - - gkyl_mat_set(&rhs_ux_yl,2,0,ux_yl[2]); - gkyl_mat_set(&rhs_ux_yr,2,0,ux_yr[2]); - gkyl_mat_set(&rhs_uy_yl,2,0,uy_yl[2]); - gkyl_mat_set(&rhs_uy_yr,2,0,uy_yr[2]); - gkyl_mat_set(&rhs_uz_yl,2,0,uz_yl[2]); - gkyl_mat_set(&rhs_uz_yr,2,0,uz_yr[2]); - gkyl_mat_set(&rhs_Tyy_yl,2,0,3.0*Tyy_yl[2]); - gkyl_mat_set(&rhs_Tyy_yr,2,0,3.0*Tyy_yr[2]); - - gkyl_mat_set(&rhs_ux_zl,2,0,ux_zl[2]); - gkyl_mat_set(&rhs_ux_zr,2,0,ux_zr[2]); - gkyl_mat_set(&rhs_uy_zl,2,0,uy_zl[2]); - gkyl_mat_set(&rhs_uy_zr,2,0,uy_zr[2]); - gkyl_mat_set(&rhs_uz_zl,2,0,uz_zl[2]); - gkyl_mat_set(&rhs_uz_zr,2,0,uz_zr[2]); - gkyl_mat_set(&rhs_Tzz_zl,2,0,3.0*Tzz_zl[2]); - gkyl_mat_set(&rhs_Tzz_zr,2,0,3.0*Tzz_zr[2]); - - gkyl_mat_set(&rhs_ux_xl,3,0,ux_xl[3]); - gkyl_mat_set(&rhs_ux_xr,3,0,ux_xr[3]); - gkyl_mat_set(&rhs_uy_xl,3,0,uy_xl[3]); - gkyl_mat_set(&rhs_uy_xr,3,0,uy_xr[3]); - gkyl_mat_set(&rhs_uz_xl,3,0,uz_xl[3]); - gkyl_mat_set(&rhs_uz_xr,3,0,uz_xr[3]); - gkyl_mat_set(&rhs_Txx_xl,3,0,3.0*Txx_xl[3]); - gkyl_mat_set(&rhs_Txx_xr,3,0,3.0*Txx_xr[3]); - - gkyl_mat_set(&rhs_ux_yl,3,0,ux_yl[3]); - gkyl_mat_set(&rhs_ux_yr,3,0,ux_yr[3]); - gkyl_mat_set(&rhs_uy_yl,3,0,uy_yl[3]); - gkyl_mat_set(&rhs_uy_yr,3,0,uy_yr[3]); - gkyl_mat_set(&rhs_uz_yl,3,0,uz_yl[3]); - gkyl_mat_set(&rhs_uz_yr,3,0,uz_yr[3]); - gkyl_mat_set(&rhs_Tyy_yl,3,0,3.0*Tyy_yl[3]); - gkyl_mat_set(&rhs_Tyy_yr,3,0,3.0*Tyy_yr[3]); - - gkyl_mat_set(&rhs_ux_zl,3,0,ux_zl[3]); - gkyl_mat_set(&rhs_ux_zr,3,0,ux_zr[3]); - gkyl_mat_set(&rhs_uy_zl,3,0,uy_zl[3]); - gkyl_mat_set(&rhs_uy_zr,3,0,uy_zr[3]); - gkyl_mat_set(&rhs_uz_zl,3,0,uz_zl[3]); - gkyl_mat_set(&rhs_uz_zr,3,0,uz_zr[3]); - gkyl_mat_set(&rhs_Tzz_zl,3,0,3.0*Tzz_zl[3]); - gkyl_mat_set(&rhs_Tzz_zr,3,0,3.0*Tzz_zr[3]); - -} diff --git a/unit/ctest_dg_em_vars.c b/unit/ctest_dg_em_vars.c index 31e0f33df..2a01dbdcd 100644 --- a/unit/ctest_dg_em_vars.c +++ b/unit/ctest_dg_em_vars.c @@ -529,7 +529,7 @@ test(int ndim, int Nx, int poly_order, double eps, bool use_tensor, bool check_a // Create EM, bvar, and ExB arrays. struct gkyl_array *cell_avg_magB2; - struct gkyl_array *field, *bvar, *ExB, *analytic_bvar, *analytic_ExB; + struct gkyl_array *field, *bvar, *ExB, *bvar_surf, *analytic_bvar, *analytic_ExB; cell_avg_magB2 = mk_int_arr(1, local_ext.volume); field = mkarr(8*basis.num_basis, local_ext.volume); bvar = mkarr(9*basis.num_basis, local_ext.volume); @@ -537,18 +537,23 @@ test(int ndim, int Nx, int poly_order, double eps, bool use_tensor, bool check_a analytic_bvar = mkarr(9*basis.num_basis, local_ext.volume); analytic_ExB = mkarr(3*basis.num_basis, local_ext.volume); + int Ncomp_surf = 2*ndim*4; + int Nbasis_surf = basis.num_basis/(basis.poly_order + 1); // *only valid for tensor bases for cdim > 1* + bvar_surf = mkarr(Ncomp_surf*Nbasis_surf, local_ext.volume); + // Project initial conditions and analytic solution gkyl_proj_on_basis_advance(proj_field, 0.0, &local_ext, field); gkyl_proj_on_basis_advance(proj_analytic_bvar, 0.0, &local_ext, analytic_bvar); gkyl_proj_on_basis_advance(proj_analytic_ExB, 0.0, &local_ext, analytic_ExB); struct gkyl_array *cell_avg_magB2_cu; - struct gkyl_array *field_cu, *bvar_cu, *ExB_cu; + struct gkyl_array *field_cu, *bvar_cu, *ExB_cu, *bvar_surf_cu; if (use_gpu) { // Create device copies cell_avg_magB2_cu = gkyl_array_cu_dev_new(GKYL_INT, 1, local_ext.volume); field_cu = gkyl_array_cu_dev_new(GKYL_DOUBLE, 8*basis.num_basis, local_ext.volume); bvar_cu = gkyl_array_cu_dev_new(GKYL_DOUBLE, 9*basis.num_basis, local_ext.volume); ExB_cu = gkyl_array_cu_dev_new(GKYL_DOUBLE, 3*basis.num_basis, local_ext.volume); + bvar_surf_cu = gkyl_array_cu_dev_new(GKYL_DOUBLE, Ncomp_surf*Nbasis_surf, local_ext.volume); } if (use_gpu) { @@ -572,15 +577,16 @@ test(int ndim, int Nx, int poly_order, double eps, bool use_tensor, bool check_a // 3. For bvar, project diagonal components of bb onto quadrature points, evaluate square root point wise, // and project back onto modal basis using basis_sqrt to obtain b_i (see gkyl_basis_*_sqrt.h in kernels/basis/) if (use_gpu) { - gkyl_dg_calc_em_vars_advance(calc_bvar, field_cu, cell_avg_magB2_cu, bvar_cu); - gkyl_dg_calc_em_vars_advance(calc_ExB, field_cu, cell_avg_magB2_cu, ExB_cu); + // Advance also computed surface variables, but not currently testing surface variables JJ: 09/02/23 + gkyl_dg_calc_em_vars_advance(calc_bvar, field_cu, cell_avg_magB2_cu, bvar_cu, bvar_surf_cu); + gkyl_dg_calc_em_vars_advance(calc_ExB, field_cu, cell_avg_magB2_cu, ExB_cu, bvar_surf_cu); // Copy host array to device. gkyl_array_copy(bvar, bvar_cu); gkyl_array_copy(ExB, ExB_cu); } else { - gkyl_dg_calc_em_vars_advance(calc_bvar, field, cell_avg_magB2, bvar); - gkyl_dg_calc_em_vars_advance(calc_ExB, field, cell_avg_magB2, ExB); + gkyl_dg_calc_em_vars_advance(calc_bvar, field, cell_avg_magB2, bvar, bvar_surf); + gkyl_dg_calc_em_vars_advance(calc_ExB, field, cell_avg_magB2, ExB, bvar_surf); } double em_tm = gkyl_time_diff_now_sec(tm); @@ -884,6 +890,7 @@ test(int ndim, int Nx, int poly_order, double eps, bool use_tensor, bool check_a gkyl_array_release(cell_avg_magB2); gkyl_array_release(bvar); gkyl_array_release(ExB); + gkyl_array_release(bvar_surf); gkyl_array_release(analytic_bvar); gkyl_array_release(analytic_ExB); @@ -903,6 +910,7 @@ test(int ndim, int Nx, int poly_order, double eps, bool use_tensor, bool check_a gkyl_array_release(field_cu); gkyl_array_release(cell_avg_magB2_cu); gkyl_array_release(bvar_cu); + gkyl_array_release(bvar_surf_cu); gkyl_array_release(ExB_cu); gkyl_array_release(alt_bibj_cu); diff --git a/zero/dg_calc_em_vars.c b/zero/dg_calc_em_vars.c index a9ea6534d..bcc291f7a 100644 --- a/zero/dg_calc_em_vars.c +++ b/zero/dg_calc_em_vars.c @@ -40,7 +40,6 @@ gkyl_dg_calc_em_vars_new(const struct gkyl_rect_grid *conf_grid, up->Ncomp = 6; up->em_calc_temp = choose_em_calc_BB_kern(b_type, cdim, poly_order); up->em_set = choose_em_set_bvar_kern(b_type, cdim, poly_order); - up->em_surf_set = choose_em_surf_set_bvar_kern(b_type, cdim, poly_order); up->em_copy = choose_em_copy_bvar_kern(b_type, cdim, poly_order); // Fetch the kernels in each direction for (int d=0; dtemp_var, 0.0); @@ -101,32 +101,14 @@ void gkyl_dg_calc_em_vars_advance(struct gkyl_dg_calc_em_vars *up, const double *em_d = gkyl_array_cfetch(em, loc); int *cell_avg_magB2_d = gkyl_array_fetch(cell_avg_magB2, loc); double *out_d = gkyl_array_fetch(out, loc); + double *out_surf_d = gkyl_array_fetch(out_surf, loc); - up->em_copy(count, up->xs, em_d, cell_avg_magB2_d, out_d); + up->em_copy(count, up->xs, em_d, cell_avg_magB2_d, out_d, out_surf_d); count += up->Ncomp; } } -void gkyl_dg_calc_em_vars_surf_advance(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* bvar, struct gkyl_array* bvar_surf) -{ -#ifdef GKYL_HAVE_CUDA - if (gkyl_array_is_cu_dev(bvar_surf)) { - return gkyl_dg_calc_em_vars_surf_advance_cu(up, bvar, bvar_surf); - } -#endif - struct gkyl_range_iter iter; - gkyl_range_iter_init(&iter, &up->mem_range); - while (gkyl_range_iter_next(&iter)) { - long loc = gkyl_range_idx(&up->mem_range, iter.idx); - - const double *bvar_d = gkyl_array_cfetch(bvar, loc); - double *bvar_surf_d = gkyl_array_fetch(bvar_surf, loc); - up->em_surf_set(bvar_d, bvar_surf_d); - } -} - void gkyl_dg_calc_em_vars_div_b(struct gkyl_dg_calc_em_vars *up, const struct gkyl_range *conf_range, const struct gkyl_array* bvar_surf, const struct gkyl_array* bvar, struct gkyl_array* max_b, struct gkyl_array* div_b) diff --git a/zero/dg_calc_em_vars_cu.cu b/zero/dg_calc_em_vars_cu.cu index cb50bded6..9c53df025 100644 --- a/zero/dg_calc_em_vars_cu.cu +++ b/zero/dg_calc_em_vars_cu.cu @@ -46,7 +46,8 @@ gkyl_dg_calc_em_vars_set_cu_kernel(struct gkyl_dg_calc_em_vars* up, __global__ static void gkyl_dg_calc_em_vars_copy_cu_kernel(struct gkyl_dg_calc_em_vars* up, struct gkyl_nmat *xs, struct gkyl_range conf_range, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2, struct gkyl_array* out) + const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2, + struct gkyl_array* out, struct gkyl_array* out_surf) { int idx[GKYL_MAX_DIM]; @@ -68,13 +69,15 @@ gkyl_dg_calc_em_vars_copy_cu_kernel(struct gkyl_dg_calc_em_vars* up, const double *em_d = (const double*) gkyl_array_cfetch(em, loc); int *cell_avg_magB2_d = (int*) gkyl_array_fetch(cell_avg_magB2, loc); double *out_d = (double*) gkyl_array_fetch(out, loc); + double *out_surf_d = (double*) gkyl_array_fetch(out_surf, loc); - up->em_copy(count, xs, em_d, cell_avg_magB2_d, out_d); + up->em_copy(count, xs, em_d, cell_avg_magB2_d, out_d, out_surf_d); } } void gkyl_dg_calc_em_vars_advance_cu(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2, struct gkyl_array* out) + const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2, + struct gkyl_array* out, struct gkyl_array* out_surf) { gkyl_array_clear(up->temp_var, 0.0); struct gkyl_range conf_range = up->mem_range; @@ -90,42 +93,8 @@ void gkyl_dg_calc_em_vars_advance_cu(struct gkyl_dg_calc_em_vars *up, gkyl_dg_calc_em_vars_copy_cu_kernel<<>>(up->on_dev, up->xs->on_dev, conf_range, - em->on_dev, cell_avg_magB2->on_dev, out->on_dev); -} - -__global__ static void -gkyl_dg_calc_em_vars_surf_set_cu_kernel(gkyl_dg_calc_em_vars* up, struct gkyl_range conf_range, - const struct gkyl_array* bvar, struct gkyl_array* bvar_surf) -{ - int idx[GKYL_MAX_DIM]; - - for (unsigned long linc1 = threadIdx.x + blockIdx.x*blockDim.x; - linc1 < conf_range.volume; - linc1 += gridDim.x*blockDim.x) - { - // inverse index from linc1 to idx - // must use gkyl_sub_range_inv_idx so that linc1=0 maps to idx={1,1,...} - // since update_range is a subrange - gkyl_sub_range_inv_idx(&conf_range, linc1, idx); - - // convert back to a linear index on the super-range (with ghost cells) - // linc will have jumps in it to jump over ghost cells - long loc = gkyl_range_idx(&conf_range, idx); - - const double *bvar_d = (const double*) gkyl_array_cfetch(bvar, loc); - double *bvar_surf_d = (double*) gkyl_array_fetch(bvar_surf, loc); - - up->em_surf_set(bvar_d, bvar_surf_d); - } -} - -void gkyl_dg_calc_em_vars_surf_advance_cu(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* bvar, struct gkyl_array* bvar_surf) -{ - struct gkyl_range conf_range = up->mem_range; - - gkyl_dg_calc_em_vars_surf_set_cu_kernel<<>>(up->on_dev, - conf_range, bvar->on_dev, bvar_surf->on_dev); + em->on_dev, cell_avg_magB2->on_dev, + out->on_dev, out_surf->on_dev); } __global__ void @@ -200,7 +169,6 @@ dg_calc_em_vars_set_cu_dev_ptrs(struct gkyl_dg_calc_em_vars *up, enum gkyl_basis else { up->em_calc_temp = choose_em_calc_BB_kern(b_type, cdim, poly_order); up->em_set = choose_em_set_bvar_kern(b_type, cdim, poly_order); - up->em_surf_set = choose_em_surf_set_bvar_kern(b_type, cdim, poly_order); up->em_copy = choose_em_copy_bvar_kern(b_type, cdim, poly_order); // Fetch the kernels in each direction for (int d=0; dnum_basis; int cdim = cbasis->ndim; int poly_order = cbasis->poly_order; - int nc_surf = cbasis->num_basis/(poly_order+1); // *only valid for tensor bases for cdim > 1* enum gkyl_basis_type b_type = cbasis->b_type; up->cdim = cdim; up->poly_order = poly_order; - up->Ncomp = 6; - up->Ncomp_surf = 2*cdim*3+2*cdim; + up->Ncomp = 9; + up->mem_range = *mem_range; up->pkpm_set = choose_pkpm_set_kern(b_type, cdim, poly_order); - up->pkpm_surf_set = choose_pkpm_surf_set_kern(b_type, cdim, poly_order); up->pkpm_copy = choose_pkpm_copy_kern(b_type, cdim, poly_order); - up->pkpm_surf_copy = choose_pkpm_surf_copy_kern(b_type, cdim, poly_order); up->pkpm_pressure = choose_pkpm_pressure_kern(b_type, cdim, poly_order); up->pkpm_p_force = choose_pkpm_p_force_kern(b_type, cdim, poly_order); up->pkpm_source = choose_pkpm_source_kern(b_type, cdim, poly_order); @@ -51,16 +48,6 @@ gkyl_dg_calc_pkpm_vars_new(const struct gkyl_rect_grid *conf_grid, up->xs = gkyl_nmat_new(up->Ncomp*mem_range->volume, nc, 1); up->mem = gkyl_nmat_linsolve_lu_new(up->As->num, up->As->nr); - // There are Ncomp_surf*range->volume linear systems to be solved - // Each linear system is nc_surf x nc_surf (only solved over the surface basis and only when poly_order and cdim > 1) - // 2*cdim*3+2*cdim components: ux, uy, uz (3 components) at the left and right of the cell (2 components) in each dimension (cdim components) - // Also solves for 3*Txx/m at the left and right x surfaces, 3*Tyy/m at the left and right y surfaces, and 3*Tzz/m at the left and right z surfaces - up->As_surf = gkyl_nmat_new(up->Ncomp_surf*mem_range->volume, nc_surf, nc_surf); - up->xs_surf = gkyl_nmat_new(up->Ncomp_surf*mem_range->volume, nc_surf, 1); - up->mem_surf = gkyl_nmat_linsolve_lu_new(up->As_surf->num, up->As_surf->nr); - - up->mem_range = *mem_range; - up->flags = 0; GKYL_CLEAR_CU_ALLOC(up->flags); up->on_dev = up; // self-reference on host @@ -70,15 +57,15 @@ gkyl_dg_calc_pkpm_vars_new(const struct gkyl_rect_grid *conf_grid, void gkyl_dg_calc_pkpm_vars_advance(struct gkyl_dg_calc_pkpm_vars *up, const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* pkpm_div_ppar, struct gkyl_array* cell_avg_prim, - struct gkyl_array* prim) + const struct gkyl_array* p_ij, const struct gkyl_array* pkpm_div_ppar, + struct gkyl_array* cell_avg_prim, struct gkyl_array* prim, struct gkyl_array* prim_surf) { #ifdef GKYL_HAVE_CUDA if (gkyl_array_is_cu_dev(prim)) { return gkyl_dg_calc_pkpm_vars_advance_cu(up, vlasov_pkpm_moms, euler_pkpm, - pkpm_div_ppar, - cell_avg_prim, prim); + p_ij, pkpm_div_ppar, + cell_avg_prim, prim, prim_surf); } #endif @@ -91,12 +78,13 @@ void gkyl_dg_calc_pkpm_vars_advance(struct gkyl_dg_calc_pkpm_vars *up, const double *vlasov_pkpm_moms_d = gkyl_array_cfetch(vlasov_pkpm_moms, loc); const double *euler_pkpm_d = gkyl_array_cfetch(euler_pkpm, loc); + const double *p_ij_d = gkyl_array_cfetch(p_ij, loc); const double *pkpm_div_ppar_d = gkyl_array_cfetch(pkpm_div_ppar, loc); int* cell_avg_prim_d = gkyl_array_fetch(cell_avg_prim, loc); cell_avg_prim_d[0] = up->pkpm_set(count, up->As, up->xs, - vlasov_pkpm_moms_d, euler_pkpm_d, pkpm_div_ppar_d); + vlasov_pkpm_moms_d, euler_pkpm_d, p_ij_d, pkpm_div_ppar_d); count += up->Ncomp; } @@ -112,60 +100,11 @@ void gkyl_dg_calc_pkpm_vars_advance(struct gkyl_dg_calc_pkpm_vars *up, long loc = gkyl_range_idx(&up->mem_range, iter.idx); double* prim_d = gkyl_array_fetch(prim, loc); - - up->pkpm_copy(count, up->xs, prim_d); - - count += up->Ncomp; - } -} - -void gkyl_dg_calc_pkpm_vars_surf_advance(struct gkyl_dg_calc_pkpm_vars *up, - const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* p_ij, const struct gkyl_array* cell_avg_prim, - struct gkyl_array* prim_surf) -{ -#ifdef GKYL_HAVE_CUDA - if (gkyl_array_is_cu_dev(prim_surf)) { - return gkyl_dg_calc_pkpm_vars_surf_advance_cu(up, - vlasov_pkpm_moms, euler_pkpm, - p_ij, cell_avg_prim, prim_surf); - } -#endif - - // First loop over mem_range for solving linear systems to compute surface primitive moments - struct gkyl_range_iter iter; - gkyl_range_iter_init(&iter, &up->mem_range); - long count = 0; - while (gkyl_range_iter_next(&iter)) { - long loc = gkyl_range_idx(&up->mem_range, iter.idx); - - const double *vlasov_pkpm_moms_d = gkyl_array_cfetch(vlasov_pkpm_moms, loc); - const double *euler_pkpm_d = gkyl_array_cfetch(euler_pkpm, loc); - const double *p_ij_d = gkyl_array_cfetch(p_ij, loc); - const int* cell_avg_prim_d = gkyl_array_cfetch(cell_avg_prim, loc); - - up->pkpm_surf_set(count, up->As_surf, up->xs_surf, - vlasov_pkpm_moms_d, euler_pkpm_d, p_ij_d, cell_avg_prim_d); - - count += up->Ncomp_surf; - } - - // Only need to solve the linear system if both poly_order and cdim > 1 - if (up->poly_order > 1 && up->cdim > 1) { - bool status = gkyl_nmat_linsolve_lu_pa(up->mem_surf, up->As_surf, up->xs_surf); - assert(status); - } - - gkyl_range_iter_init(&iter, &up->mem_range); - count = 0; - while (gkyl_range_iter_next(&iter)) { - long loc = gkyl_range_idx(&up->mem_range, iter.idx); - double* prim_surf_d = gkyl_array_fetch(prim_surf, loc); - up->pkpm_surf_copy(count, up->xs_surf, prim_surf_d); + up->pkpm_copy(count, up->xs, prim_d, prim_surf_d); - count += up->Ncomp_surf; + count += up->Ncomp; } } @@ -344,10 +283,6 @@ void gkyl_dg_calc_pkpm_vars_release(gkyl_dg_calc_pkpm_vars *up) gkyl_nmat_release(up->As); gkyl_nmat_release(up->xs); gkyl_nmat_linsolve_lu_release(up->mem); - - gkyl_nmat_release(up->As_surf); - gkyl_nmat_release(up->xs_surf); - gkyl_nmat_linsolve_lu_release(up->mem_surf); if (GKYL_IS_CU_ALLOC(up->flags)) gkyl_cu_free(up->on_dev); diff --git a/zero/dg_calc_pkpm_vars_cu.cu b/zero/dg_calc_pkpm_vars_cu.cu index db8088689..3ba1ce1cb 100644 --- a/zero/dg_calc_pkpm_vars_cu.cu +++ b/zero/dg_calc_pkpm_vars_cu.cu @@ -17,7 +17,8 @@ __global__ static void gkyl_dg_calc_pkpm_vars_set_cu_kernel(gkyl_dg_calc_pkpm_vars* up, struct gkyl_nmat *As, struct gkyl_nmat *xs, struct gkyl_range conf_range, const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* pkpm_div_ppar, struct gkyl_array* cell_avg_prim) + const struct gkyl_array* p_ij, const struct gkyl_array* pkpm_div_ppar, + struct gkyl_array* cell_avg_prim) { int idx[GKYL_MAX_DIM]; @@ -38,19 +39,20 @@ gkyl_dg_calc_pkpm_vars_set_cu_kernel(gkyl_dg_calc_pkpm_vars* up, const double *vlasov_pkpm_moms_d = (const double*) gkyl_array_cfetch(vlasov_pkpm_moms, loc); const double *euler_pkpm_d = (const double*) gkyl_array_cfetch(euler_pkpm, loc); + const double *p_ij_d = (const double*) gkyl_array_cfetch(p_ij, loc); const double *pkpm_div_ppar_d = (const double*) gkyl_array_cfetch(pkpm_div_ppar, loc); int* cell_avg_prim_d = (int*) gkyl_array_fetch(cell_avg_prim, loc); cell_avg_prim_d[0] = up->pkpm_set(count, As, xs, - vlasov_pkpm_moms_d, euler_pkpm_d, pkpm_div_ppar_d); + vlasov_pkpm_moms_d, euler_pkpm_d, p_ij_d, pkpm_div_ppar_d); } } __global__ static void gkyl_dg_calc_pkpm_vars_copy_cu_kernel(gkyl_dg_calc_pkpm_vars* up, struct gkyl_nmat *xs, struct gkyl_range conf_range, - struct gkyl_array* prim) + struct gkyl_array* prim, struct gkyl_array* prim_surf) { int idx[GKYL_MAX_DIM]; @@ -70,23 +72,25 @@ gkyl_dg_calc_pkpm_vars_copy_cu_kernel(gkyl_dg_calc_pkpm_vars* up, long count = linc1*up->Ncomp; double* prim_d = (double*) gkyl_array_fetch(prim, loc); + double* prim_surf_d = (double*) gkyl_array_fetch(prim_surf, loc); - up->pkpm_copy(count, xs, prim_d); + up->pkpm_copy(count, xs, prim_d, prim_surf_d); } } // Host-side wrapper for pkpm primitive variable calculation void gkyl_dg_calc_pkpm_vars_advance_cu(struct gkyl_dg_calc_pkpm_vars *up, const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* pkpm_div_ppar, struct gkyl_array* cell_avg_prim, - struct gkyl_array* prim) + const struct gkyl_array* p_ij, const struct gkyl_array* pkpm_div_ppar, + struct gkyl_array* cell_avg_prim, struct gkyl_array* prim, struct gkyl_array* prim_surf) { struct gkyl_range conf_range = up->mem_range; gkyl_dg_calc_pkpm_vars_set_cu_kernel<<>>(up->on_dev, up->As->on_dev, up->xs->on_dev, conf_range, vlasov_pkpm_moms->on_dev, euler_pkpm->on_dev, - pkpm_div_ppar->on_dev, cell_avg_prim->on_dev); + p_ij->on_dev, pkpm_div_ppar->on_dev, + cell_avg_prim->on_dev); if (up->poly_order > 1) { bool status = gkyl_nmat_linsolve_lu_pa(up->mem, up->As, up->xs); @@ -94,90 +98,7 @@ void gkyl_dg_calc_pkpm_vars_advance_cu(struct gkyl_dg_calc_pkpm_vars *up, } gkyl_dg_calc_pkpm_vars_copy_cu_kernel<<>>(up->on_dev, - up->xs->on_dev, conf_range, prim->on_dev); -} - -__global__ static void -gkyl_dg_calc_pkpm_vars_surf_set_cu_kernel(gkyl_dg_calc_pkpm_vars* up, - struct gkyl_nmat *As, struct gkyl_nmat *xs, struct gkyl_range conf_range, - const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* p_ij, const struct gkyl_array* cell_avg_prim) -{ - int idx[GKYL_MAX_DIM]; - - for (unsigned long linc1 = threadIdx.x + blockIdx.x*blockDim.x; - linc1 < conf_range.volume; - linc1 += gridDim.x*blockDim.x) - { - // inverse index from linc1 to idx - // must use gkyl_sub_range_inv_idx so that linc1=0 maps to idx={1,1,...} - // since update_range is a subrange - gkyl_sub_range_inv_idx(&conf_range, linc1, idx); - - // convert back to a linear index on the super-range (with ghost cells) - // linc will have jumps in it to jump over ghost cells - long loc = gkyl_range_idx(&conf_range, idx); - // fetch the correct count in the matrix (since we solve Ncomp_surf systems in each cell) - long count = linc1*up->Ncomp_surf; - - const double *vlasov_pkpm_moms_d = (const double*) gkyl_array_cfetch(vlasov_pkpm_moms, loc); - const double *euler_pkpm_d = (const double*) gkyl_array_cfetch(euler_pkpm, loc); - const double *p_ij_d = (const double*) gkyl_array_cfetch(p_ij, loc); - const int* cell_avg_prim_d = (const int*) gkyl_array_cfetch(cell_avg_prim, loc); - - up->pkpm_surf_set(count, As, xs, - vlasov_pkpm_moms_d, euler_pkpm_d, p_ij_d, cell_avg_prim_d); - } -} - -__global__ static void -gkyl_dg_calc_pkpm_vars_surf_copy_cu_kernel(gkyl_dg_calc_pkpm_vars* up, - struct gkyl_nmat *xs, struct gkyl_range conf_range, - struct gkyl_array* prim_surf) -{ - int idx[GKYL_MAX_DIM]; - - for (unsigned long linc1 = threadIdx.x + blockIdx.x*blockDim.x; - linc1 < conf_range.volume; - linc1 += gridDim.x*blockDim.x) - { - // inverse index from linc1 to idx - // must use gkyl_sub_range_inv_idx so that linc1=0 maps to idx={1,1,...} - // since update_range is a subrange - gkyl_sub_range_inv_idx(&conf_range, linc1, idx); - - // convert back to a linear index on the super-range (with ghost cells) - // linc will have jumps in it to jump over ghost cells - long loc = gkyl_range_idx(&conf_range, idx); - // fetch the correct count in the matrix (since we solve Ncomp_surf systems in each cell) - long count = linc1*up->Ncomp_surf; - - double* prim_surf_d = (double*) gkyl_array_fetch(prim_surf, loc); - - up->pkpm_surf_copy(count, xs, prim_surf_d); - } -} - -// Host-side wrapper for pkpm surface primitive variable calculation -void gkyl_dg_calc_pkpm_vars_surf_advance_cu(struct gkyl_dg_calc_pkpm_vars *up, - const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* p_ij, const struct gkyl_array* cell_avg_prim, - struct gkyl_array* prim_surf) -{ - struct gkyl_range conf_range = up->mem_range; - - gkyl_dg_calc_pkpm_vars_surf_set_cu_kernel<<>>(up->on_dev, - up->As_surf->on_dev, up->xs_surf->on_dev, conf_range, - vlasov_pkpm_moms->on_dev, euler_pkpm->on_dev, - p_ij->on_dev, cell_avg_prim->on_dev); - - if (up->poly_order > 1 && up->cdim > 1) { - bool status = gkyl_nmat_linsolve_lu_pa(up->mem_surf, up->As_surf, up->xs_surf); - assert(status); - } - - gkyl_dg_calc_pkpm_vars_surf_copy_cu_kernel<<>>(up->on_dev, - up->xs_surf->on_dev, conf_range, prim_surf->on_dev); + up->xs->on_dev, conf_range, prim->on_dev, prim_surf->on_dev); } __global__ void @@ -432,9 +353,7 @@ dg_calc_pkpm_vars_set_cu_dev_ptrs(struct gkyl_dg_calc_pkpm_vars *up, enum gkyl_b int cdim, int poly_order) { up->pkpm_set = choose_pkpm_set_kern(b_type, cdim, poly_order); - up->pkpm_surf_set = choose_pkpm_surf_set_kern(b_type, cdim, poly_order); up->pkpm_copy = choose_pkpm_copy_kern(b_type, cdim, poly_order); - up->pkpm_surf_copy = choose_pkpm_surf_copy_kern(b_type, cdim, poly_order); up->pkpm_pressure = choose_pkpm_pressure_kern(b_type, cdim, poly_order); up->pkpm_p_force = choose_pkpm_p_force_kern(b_type, cdim, poly_order); up->pkpm_source = choose_pkpm_source_kern(b_type, cdim, poly_order); @@ -455,13 +374,11 @@ gkyl_dg_calc_pkpm_vars_cu_dev_new(const struct gkyl_rect_grid *conf_grid, int nc = cbasis->num_basis; int cdim = cbasis->ndim; int poly_order = cbasis->poly_order; - int nc_surf = cbasis->num_basis/(poly_order+1); // *only valid for tensor bases for cdim > 1* enum gkyl_basis_type b_type = cbasis->b_type; up->cdim = cdim; up->poly_order = poly_order; + up->Ncomp = 9; up->mem_range = *mem_range; - up->Ncomp = 6; - up->Ncomp_surf = 2*cdim*3+2*cdim; // There are Ncomp*range->volume linear systems to be solved // 6 components: ux, uy, uz, div(p_par b)/rho, p_perp/rho, rho/p_perp @@ -469,14 +386,6 @@ gkyl_dg_calc_pkpm_vars_cu_dev_new(const struct gkyl_rect_grid *conf_grid, up->xs = gkyl_nmat_cu_dev_new(up->Ncomp*mem_range->volume, nc, 1); up->mem = gkyl_nmat_linsolve_lu_cu_dev_new(up->As->num, up->As->nr); - // There are Ncomp_surf*range->volume linear systems to be solved - // Each linear system is nc_surf x nc_surf (only solved over the surface basis and only when poly_order and cdim > 1) - // 2*cdim*3+2*cdim components: ux, uy, uz (3 components) at the left and right of the cell (2 components) in each dimension (cdim components) - // Also solves for 3*Txx/m at the left and right x surfaces, 3*Tyy/m at the left and right y surfaces, and 3*Tzz/m at the left and right y surfaces - up->As_surf = gkyl_nmat_cu_dev_new(up->Ncomp_surf*mem_range->volume, nc_surf, nc_surf); - up->xs_surf = gkyl_nmat_cu_dev_new(up->Ncomp_surf*mem_range->volume, nc_surf, 1); - up->mem_surf = gkyl_nmat_linsolve_lu_cu_dev_new(up->As_surf->num, up->As_surf->nr); - up->flags = 0; GKYL_SET_CU_ALLOC(up->flags); diff --git a/zero/gkyl_dg_calc_em_vars.h b/zero/gkyl_dg_calc_em_vars.h index 30aa7b3fd..0d92ef5b8 100644 --- a/zero/gkyl_dg_calc_em_vars.h +++ b/zero/gkyl_dg_calc_em_vars.h @@ -54,20 +54,12 @@ gkyl_dg_calc_em_vars_cu_dev_new(const struct gkyl_rect_grid *conf_grid, * @param em Input array which contain EM fields (Ex, Ey, Ez, Bx, By, Bz) * @param cell_avg_magB2 Array for storing boolean value of whether |B|^2 uses *only* cell averages * to minimize positivity violations (default: false) - * @param out Output array of either magnetic field unit vector and unit tensor or E x B velocity + * @param out Output array of volume expansion of either magnetic field unit vector and unit tensor or E x B velocity + * @param out_surf Output array of surface expansion of EM variable */ void gkyl_dg_calc_em_vars_advance(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2, struct gkyl_array* out); - -/** - * Compute surface expansion of bvar - * - * @param up Updater for computing em variables - * @param bvar Input array of volume expansion of bvar - * @param bvar_surf Output array of surface expansions of bvar - */ -void gkyl_dg_calc_em_vars_surf_advance(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* bvar, struct gkyl_array* bvar_surf); + const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2, + struct gkyl_array* out, struct gkyl_array* out_surf); /** * Compute div(b) and max(|b_i|) penalization @@ -95,10 +87,8 @@ void gkyl_dg_calc_em_vars_release(struct gkyl_dg_calc_em_vars *up); */ void gkyl_dg_calc_em_vars_advance_cu(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2, struct gkyl_array* out); - -void gkyl_dg_calc_em_vars_surf_advance_cu(struct gkyl_dg_calc_em_vars *up, - const struct gkyl_array* bvar, struct gkyl_array* bvar_surf); + const struct gkyl_array* em, struct gkyl_array* cell_avg_magB2, + struct gkyl_array* out, struct gkyl_array* out_surf); void gkyl_dg_calc_em_vars_div_b_cu(struct gkyl_dg_calc_em_vars *up, const struct gkyl_range *conf_range, const struct gkyl_array* bvar_surf, const struct gkyl_array* bvar, diff --git a/zero/gkyl_dg_calc_em_vars_priv.h b/zero/gkyl_dg_calc_em_vars_priv.h index 2fa53ab3c..8056fc528 100644 --- a/zero/gkyl_dg_calc_em_vars_priv.h +++ b/zero/gkyl_dg_calc_em_vars_priv.h @@ -12,8 +12,8 @@ typedef void (*em_calc_temp_t)(const double *em, double* GKYL_RESTRICT out); typedef int (*em_set_t)(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *temp); -typedef void (*em_surf_set_t)(const double *bvar, double* GKYL_RESTRICT bvar_surf); -typedef void (*em_copy_t)(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, double* GKYL_RESTRICT out); +typedef void (*em_copy_t)(int count, struct gkyl_nmat *x, const double *em, int* cell_avg_magB2, + double* GKYL_RESTRICT out, double* GKYL_RESTRICT out_surf); typedef void (*em_div_b_t)(const double *dxv, const double *bvar_surf_l, const double *bvar_surf_c, const double *bvar_surf_r, const double *bvar_c, double* GKYL_RESTRICT max_b, double* GKYL_RESTRICT div_b); @@ -23,7 +23,6 @@ typedef struct { em_calc_temp_t kernels[3]; } gkyl_dg_em_calc_BB_kern_list; typedef struct { em_calc_temp_t kernels[3]; } gkyl_dg_em_calc_num_ExB_kern_list; typedef struct { em_set_t kernels[3]; } gkyl_dg_em_set_bvar_kern_list; typedef struct { em_set_t kernels[3]; } gkyl_dg_em_set_ExB_kern_list; -typedef struct { em_surf_set_t kernels[3]; } gkyl_dg_em_surf_set_bvar_kern_list; typedef struct { em_copy_t kernels[3]; } gkyl_dg_em_copy_bvar_kern_list; typedef struct { em_copy_t kernels[3]; } gkyl_dg_em_copy_ExB_kern_list; typedef struct { em_div_b_t kernels[3]; } gkyl_dg_em_div_b_kern_list; @@ -41,8 +40,7 @@ struct gkyl_dg_calc_em_vars { em_calc_temp_t em_calc_temp; // kernel for intermediate variable computation em_set_t em_set; // kernel for setting matrices for linear solve - em_surf_set_t em_surf_set; // kernel for getting surface expansions of bvar - em_copy_t em_copy; // kernel for copying solution to output + em_copy_t em_copy; // kernel for copying solution to output, also computes needed surface expansions em_div_b_t em_div_b[3]; // kernel for computing div(b) and max(|b_i|) penalization uint32_t flags; @@ -97,22 +95,6 @@ static const gkyl_dg_em_set_bvar_kern_list ten_em_set_bvar_kernels[] = { { NULL, em_set_bvar_3x_ser_p1, em_set_bvar_3x_tensor_p2 }, // 2 }; -// Set matrices for computing surface b and bb, p=1 analytically solved (Serendipity basis) -GKYL_CU_D -static const gkyl_dg_em_surf_set_bvar_kern_list ser_em_surf_set_bvar_kernels[] = { - { NULL, em_surf_set_bvar_1x_ser_p1, em_surf_set_bvar_1x_ser_p2 }, // 0 - { NULL, em_surf_set_bvar_2x_ser_p1, NULL }, // 1 - { NULL, em_surf_set_bvar_3x_ser_p1, NULL }, // 2 -}; - -// Set matrices for computing surface b and bb, p=1 analytically solved (Tensor basis) -GKYL_CU_D -static const gkyl_dg_em_surf_set_bvar_kern_list ten_em_surf_set_bvar_kernels[] = { - { NULL, em_surf_set_bvar_1x_ser_p1, em_surf_set_bvar_1x_ser_p2 }, // 0 - { NULL, em_surf_set_bvar_2x_ser_p1, em_surf_set_bvar_2x_tensor_p2 }, // 1 - { NULL, em_surf_set_bvar_3x_ser_p1, em_surf_set_bvar_3x_tensor_p2 }, // 2 -}; - // Set matrices for computing ExB, p=1 analytically solved (Serendipity basis) GKYL_CU_D static const gkyl_dg_em_set_ExB_kern_list ser_em_set_ExB_kernels[] = { @@ -259,23 +241,6 @@ choose_em_set_bvar_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) } } -GKYL_CU_D -static em_surf_set_t -choose_em_surf_set_bvar_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) -{ - switch (b_type) { - case GKYL_BASIS_MODAL_SERENDIPITY: - return ser_em_surf_set_bvar_kernels[cdim-1].kernels[poly_order]; - break; - case GKYL_BASIS_MODAL_TENSOR: - return ten_em_surf_set_bvar_kernels[cdim-1].kernels[poly_order]; - break; - default: - assert(false); - break; - } -} - GKYL_CU_D static em_set_t choose_em_set_ExB_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) diff --git a/zero/gkyl_dg_calc_pkpm_vars.h b/zero/gkyl_dg_calc_pkpm_vars.h index c665a046c..4dc7063b6 100644 --- a/zero/gkyl_dg_calc_pkpm_vars.h +++ b/zero/gkyl_dg_calc_pkpm_vars.h @@ -12,7 +12,10 @@ typedef struct gkyl_dg_calc_pkpm_vars gkyl_dg_calc_pkpm_vars; * Create new updater to compute pkpm variables needed in * updates and used for diagnostics. Methods compute: * p_ij : (p_par - p_perp) b_i b_j + p_perp g_ij - * prim : [ux, uy, uz, 1/rho*div(p_par b), T_perp/m, m/T_perp] + * prim : [ux, uy, uz, 1/rho*div(p_par b), T_perp/m, m/T_perp, 3*Txx/m, 3*Tyy/m, 3*Tzz/m] + * prim_surf : [ux_xl, ux_xr, uy_xl, uy_xr, uz_xl, uz_xr, 3.0*Txx_xl/m, 3.0*Txx_xr/m, + * ux_yl, ux_yr, uy_yl, uy_yr, uz_yl, uz_yr, 3.0*Tyy_yl/m, 3.0*Tyy_yr/m, + * ux_zl, ux_zr, uy_zl, uy_zr, uz_zl, uz_zr, 3.0*Tzz_zl/m, 3.0*Tzz_zr/m] * pkpm_accel_vars : 0 : p_perp_div_b (p_perp/rho*div(b) = T_perp/m*div(b)) 1 : bb_grad_u (bb : grad(u)) 2 : p_force (total pressure forces in kinetic equation 1/rho div(p_parallel b_hat) - T_perp/m*div(b) @@ -50,34 +53,21 @@ gkyl_dg_calc_pkpm_vars_cu_dev_new(const struct gkyl_rect_grid *conf_grid, * @param conf_range Configuration space range * @param vlasov_pkpm_moms Input array of pkpm kinetic moments [rho, p_parallel, p_perp] * @param euler_pkpm Input array of pkpm fluid variables [rho ux, rho uy, rho uz] + * @param p_ij Input pressure tensor p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij * @param pkpm_div_ppar Input array of div(p_parallel b_hat) for computing pressure force - * @param cell_avg_prim Array for storing boolean value of whether rho, p_parallel, p_perp uses *only* cell averages - * to minimize positivity violations (default: false) - * @param prim Output array of primitive moments [ux, uy, uz, 1/rho*div(p_par b), T_perp/m, m/T_perp] + * @param cell_avg_prim Array for storing boolean value of whether rho, p_parallel, p_perp are negative at corners + * Note: Only used for diagnostic purposes (not for adjusting solution) + * @param prim Output array of volume expansion of primitive moments + * [ux, uy, uz, 1/rho*div(p_par b), T_perp/m, m/T_perp, 3*Txx/m, 3*Tyy/m, 3*Tzz/m] + * @param prim_surf Output array of surface expansion of primitive moments + * [ux_xl, ux_xr, uy_xl, uy_xr, uz_xl, uz_xr, 3.0*Txx_xl/m, 3.0*Txx_xr/m, + * ux_yl, ux_yr, uy_yl, uy_yr, uz_yl, uz_yr, 3.0*Tyy_yl/m, 3.0*Tyy_yr/m, + * ux_zl, ux_zr, uy_zl, uy_zr, uz_zl, uz_zr, 3.0*Tzz_zl/m, 3.0*Tzz_zr/m] */ void gkyl_dg_calc_pkpm_vars_advance(struct gkyl_dg_calc_pkpm_vars *up, const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* pkpm_div_ppar, struct gkyl_array* cell_avg_prim, - struct gkyl_array* prim); - -/** - * Compute pkpm surface primitive moments. - * 2*cdim*3+2*cdim components: ux, uy, uz (3 components) at the left and right of the cell (2 components) in each dimension (cdim components) - * Also solves for 3*Txx/m at the left and right x surfaces, 3*Tyy/m at the left and right y surfaces, and 3*Tzz/m at the left and right z surfaces - * - * @param up Updater for computing pkpm variables - * @param conf_range Configuration space range - * @param vlasov_pkpm_moms Input array of pkpm kinetic moments [rho, p_parallel, p_perp] - * @param euler_pkpm Input array of pkpm fluid variables [rho ux, rho uy, rho uz] - * @param p_ij Input pressure tensor p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij - * @param cell_avg_prim Array for storing boolean value of whether rho, p_parallel, p_perp uses *only* cell averages - * to minimize positivity violations (default: false) - * @param prim_surf Output array of surface primitive moments - */ -void gkyl_dg_calc_pkpm_vars_surf_advance(struct gkyl_dg_calc_pkpm_vars *up, - const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* p_ij, const struct gkyl_array* cell_avg_prim, - struct gkyl_array* prim_surf); + const struct gkyl_array* p_ij, const struct gkyl_array* pkpm_div_ppar, + struct gkyl_array* cell_avg_prim, struct gkyl_array* prim, struct gkyl_array* prim_surf); /** * Compute pkpm pressure p_ij = (p_par - p_perp) b_i b_j + p_perp g_ij in the volume and at needed surfaces @@ -187,13 +177,8 @@ void gkyl_dg_calc_pkpm_vars_release(struct gkyl_dg_calc_pkpm_vars *up); void gkyl_dg_calc_pkpm_vars_advance_cu(struct gkyl_dg_calc_pkpm_vars *up, const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* pkpm_div_ppar, - struct gkyl_array* cell_avg_prim, struct gkyl_array* prim); - -void gkyl_dg_calc_pkpm_vars_surf_advance_cu(struct gkyl_dg_calc_pkpm_vars *up, - const struct gkyl_array* vlasov_pkpm_moms, const struct gkyl_array* euler_pkpm, - const struct gkyl_array* p_ij_surf, const struct gkyl_array* cell_avg_prim, - struct gkyl_array* prim_surf); + const struct gkyl_array* p_ij, const struct gkyl_array* pkpm_div_ppar, + struct gkyl_array* cell_avg_prim, struct gkyl_array* prim, struct gkyl_array* prim_surf); void gkyl_dg_calc_pkpm_vars_pressure_cu(struct gkyl_dg_calc_pkpm_vars *up, const struct gkyl_range *conf_range, const struct gkyl_array* bvar, const struct gkyl_array* bvar_surf, const struct gkyl_array* vlasov_pkpm_moms, diff --git a/zero/gkyl_dg_calc_pkpm_vars_priv.h b/zero/gkyl_dg_calc_pkpm_vars_priv.h index 374022e4a..e1eb6a8a8 100644 --- a/zero/gkyl_dg_calc_pkpm_vars_priv.h +++ b/zero/gkyl_dg_calc_pkpm_vars_priv.h @@ -12,13 +12,9 @@ typedef int (*pkpm_set_t)(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, const double *vlasov_pkpm_moms, const double *euler_pkpm, - const double *pkpm_div_ppar); + const double *p_ij, const double *pkpm_div_ppar); -typedef void (*pkpm_surf_set_t)(int count, struct gkyl_nmat *A, struct gkyl_nmat *rhs, - const double *vlasov_pkpm_moms, const double *euler_pkpm, - const double *p_ij, const int *cell_avg_prim); - -typedef void (*pkpm_copy_t)(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim); +typedef void (*pkpm_copy_t)(int count, struct gkyl_nmat *x, double* GKYL_RESTRICT prim, double* GKYL_RESTRICT prim_surf); typedef void (*pkpm_pressure_t)(const double *bvar, const double *bvar_surf, const double *vlasov_pkpm_moms, double* GKYL_RESTRICT p_ij, double* GKYL_RESTRICT p_ij_surf); @@ -46,9 +42,7 @@ typedef void (*pkpm_io_t)(const double *vlasov_pkpm_moms, // for use in kernel tables typedef struct { pkpm_set_t kernels[3]; } gkyl_dg_pkpm_set_kern_list; -typedef struct { pkpm_surf_set_t kernels[3]; } gkyl_dg_pkpm_surf_set_kern_list; typedef struct { pkpm_copy_t kernels[3]; } gkyl_dg_pkpm_copy_kern_list; -typedef struct { pkpm_copy_t kernels[3]; } gkyl_dg_pkpm_surf_copy_kern_list; typedef struct { pkpm_pressure_t kernels[3]; } gkyl_dg_pkpm_pressure_kern_list; typedef struct { pkpm_p_force_t kernels[3]; } gkyl_dg_pkpm_p_force_kern_list; typedef struct { pkpm_accel_t kernels[3]; } gkyl_dg_pkpm_accel_kern_list; @@ -65,15 +59,10 @@ struct gkyl_dg_calc_pkpm_vars { struct gkyl_nmat *As, *xs; // matrices for LHS and RHS gkyl_nmat_mem *mem; // memory for use in batched linear solve int Ncomp; // number of components in the linear solve (6 variables being solved for) - struct gkyl_nmat *As_surf, *xs_surf; // matrices for LHS and RHS of surface variable solve - gkyl_nmat_mem *mem_surf; // memory for use in batched linear solve of surface variables - int Ncomp_surf; // number of components in the surface linear solve (2*cdim*3 + 2*cdim variables being solved for) pkpm_set_t pkpm_set; // kernel for setting matrices for linear solve - pkpm_surf_set_t pkpm_surf_set; // kernel for setting matrices for linear solve of surface variables - pkpm_copy_t pkpm_copy; // kernel for copying solution to output - pkpm_copy_t pkpm_surf_copy; // kernel for copying solution to output surface variables - pkpm_pressure_t pkpm_pressure; // kernel for computing pressure + pkpm_copy_t pkpm_copy; // kernel for copying solution to output; also computed needed surface expansions + pkpm_pressure_t pkpm_pressure; // kernel for computing pressure (Volume and surface expansion) pkpm_p_force_t pkpm_p_force; // kernel for computing pressure force p_force = 1/rho div(p_par b) - T_perp/m div(b) pkpm_accel_t pkpm_accel[3]; // kernel for computing pkpm acceleration and Lax variables pkpm_int_t pkpm_int; // kernel for computing integrated pkpm variables @@ -100,22 +89,6 @@ static const gkyl_dg_pkpm_set_kern_list ten_pkpm_set_kernels[] = { { NULL, pkpm_vars_set_3x_ser_p1, NULL }, // 2 }; -// Set matrices for computing surface pkpm primitive vars, e.g., surface expansion of ux,uy,uz (Serendipity kernels) -GKYL_CU_D -static const gkyl_dg_pkpm_surf_set_kern_list ser_pkpm_surf_set_kernels[] = { - { NULL, pkpm_vars_surf_set_1x_ser_p1, pkpm_vars_surf_set_1x_ser_p2 }, // 0 - { NULL, pkpm_vars_surf_set_2x_ser_p1, NULL }, // 1 - { NULL, pkpm_vars_surf_set_3x_ser_p1, NULL }, // 2 -}; - -// Set matrices for computing surface pkpm primitive vars, e.g., surface expansion of ux,uy,uz (Tensor kernels) -GKYL_CU_D -static const gkyl_dg_pkpm_surf_set_kern_list ten_pkpm_surf_set_kernels[] = { - { NULL, pkpm_vars_surf_set_1x_ser_p1, pkpm_vars_surf_set_1x_ser_p2 }, // 0 - { NULL, pkpm_vars_surf_set_2x_ser_p1, pkpm_vars_surf_set_2x_tensor_p2 }, // 1 - { NULL, pkpm_vars_surf_set_3x_ser_p1, NULL }, // 2 -}; - // Copy solution for pkpm primitive vars, e.g., ux,uy,uz (Serendipity kernels) GKYL_CU_D static const gkyl_dg_pkpm_copy_kern_list ser_pkpm_copy_kernels[] = { @@ -132,22 +105,6 @@ static const gkyl_dg_pkpm_copy_kern_list ten_pkpm_copy_kernels[] = { { NULL, pkpm_vars_copy_3x_ser_p1, NULL }, // 2 }; -// Copy solution for surface pkpm primitive vars, e.g., surface expansion of ux,uy,uz (Serendipity kernels) -GKYL_CU_D -static const gkyl_dg_pkpm_surf_copy_kern_list ser_pkpm_surf_copy_kernels[] = { - { NULL, pkpm_vars_surf_copy_1x_ser_p1, pkpm_vars_surf_copy_1x_ser_p2 }, // 0 - { NULL, pkpm_vars_surf_copy_2x_ser_p1, NULL }, // 1 - { NULL, pkpm_vars_surf_copy_3x_ser_p1, NULL }, // 2 -}; - -// Copy solution for surface pkpm primitive vars, e.g., surface expansion of ux,uy,uz (Tensor kernels) -GKYL_CU_D -static const gkyl_dg_pkpm_surf_copy_kern_list ten_pkpm_surf_copy_kernels[] = { - { NULL, pkpm_vars_surf_copy_1x_ser_p1, pkpm_vars_surf_copy_1x_ser_p2 }, // 0 - { NULL, pkpm_vars_surf_copy_2x_ser_p1, pkpm_vars_surf_copy_2x_tensor_p2 }, // 1 - { NULL, pkpm_vars_surf_copy_3x_ser_p1, NULL }, // 2 -}; - // PKPM Pressure (p_ij = (p_par - p_perp)b_i b_j + p_perp g_ij) (Serendipity kernels) GKYL_CU_D static const gkyl_dg_pkpm_pressure_kern_list ser_pkpm_pressure_kernels[] = { @@ -305,23 +262,6 @@ choose_pkpm_set_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) } } -GKYL_CU_D -static pkpm_surf_set_t -choose_pkpm_surf_set_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) -{ - switch (b_type) { - case GKYL_BASIS_MODAL_SERENDIPITY: - return ser_pkpm_surf_set_kernels[cdim-1].kernels[poly_order]; - break; - case GKYL_BASIS_MODAL_TENSOR: - return ten_pkpm_surf_set_kernels[cdim-1].kernels[poly_order]; - break; - default: - assert(false); - break; - } -} - GKYL_CU_D static pkpm_copy_t choose_pkpm_copy_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) @@ -339,23 +279,6 @@ choose_pkpm_copy_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) } } -GKYL_CU_D -static pkpm_copy_t -choose_pkpm_surf_copy_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) -{ - switch (b_type) { - case GKYL_BASIS_MODAL_SERENDIPITY: - return ser_pkpm_surf_copy_kernels[cdim-1].kernels[poly_order]; - break; - case GKYL_BASIS_MODAL_TENSOR: - return ten_pkpm_surf_copy_kernels[cdim-1].kernels[poly_order]; - break; - default: - assert(false); - break; - } -} - GKYL_CU_D static pkpm_pressure_t choose_pkpm_pressure_kern(enum gkyl_basis_type b_type, int cdim, int poly_order) From cb8a0cde0b254f53810ea478956ec6b8c1abdfb3 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Mon, 4 Sep 2023 10:57:45 -0400 Subject: [PATCH 06/19] Adding a test case based on TenBarge et al 2013 for potential use in the PKPM paper to demonstrate magnetic reconnection in the PKPM model. Will move these input files to an actual input file directory soon, but want to see how this input file does on Frontera with its different beta, v-space extents, box size, and current layer width --- regression/rt_pkpm_ff_recon_p1.c | 607 +++++++++++++++++++++++++++++++ 1 file changed, 607 insertions(+) create mode 100644 regression/rt_pkpm_ff_recon_p1.c diff --git a/regression/rt_pkpm_ff_recon_p1.c b/regression/rt_pkpm_ff_recon_p1.c new file mode 100644 index 000000000..e313ff5fa --- /dev/null +++ b/regression/rt_pkpm_ff_recon_p1.c @@ -0,0 +1,607 @@ +#include +#include +#include +#include + +#include +#include + +#include + +#ifdef GKYL_HAVE_MPI +#include +#include +#endif + +#include + +struct pkpm_gem_ctx { + double epsilon0; + double mu0; + double chargeElc; // electron charge + double massElc; // electron mass + double chargeIon; // ion charge + double massIon; // ion mass + double n0; + double vAe; + double B0; + double guide; + double w0; + double psi0; + double noise_amp; + double noise_index; + int k_init; + int k_final; + double T_e; + double T_i; + double vtElc; + double vtIon; + double nuElc; + double nuIon; + double Lx; + double Ly; + double tend; + double min_dt; + bool use_gpu; +}; + +static inline double +maxwellian(double n, double v, double temp, double mass) +{ + double v2 = v*v; + return n/sqrt(2.0*M_PI*temp/mass)*exp(-v2/(2.0*temp/mass)); +} + +static inline double +sech2(double x) +{ + return 1.0/(cosh(x)*cosh(x)); +} + +static inline void +noise_init(double noise_amp, double noise_index, int k_init, int k_final, double Lx, double Ly, double x, double y, double noise[3]) +{ + pcg64_random_t rng = gkyl_pcg64_init(0); + double kindex = (noise_index + 1.0) / 2.0; + double B_amp = 0.0; + double B_phase = 0.0; + for (int i = k_init; i < k_final; ++i) { + B_amp = gkyl_pcg64_rand_double(&rng); + B_phase = gkyl_pcg64_rand_double(&rng); + + noise[0] -= 2.0*(2.0*M_PI/Ly)*(Lx/(i*2.0*M_PI))*B_amp*sin(2.0*M_PI*y/Ly)*(cos(2.0*M_PI*y/Ly)+1)*cos(i*2.0*M_PI*x/Lx + 2.0*M_PI*B_phase)*pow(i,kindex); + noise[1] += B_amp*(cos(2.0*M_PI*y/Ly) + 1.0)*(cos(2.0*M_PI*y/Ly) + 1.0)*sin(i*2.0*M_PI*x/Lx + 2.0*M_PI*B_phase)*pow(i,kindex); + noise[2] += (2.0*M_PI*i/Lx)*B_amp*(cos(2.0*M_PI*y/Ly) + 1.0)*(cos(2.0*M_PI*y/Ly) + 1.0)*cos(i*2.0*M_PI*x/Lx + 2*M_PI*B_phase)*pow(i,kindex) + + 2.0*(2.0*M_PI/Ly)*(2.0*M_PI/Ly)*(Lx/(i*2.0*M_PI))*B_amp*(sin(2.0*M_PI*y/Ly)*sin(2.0*M_PI*y/Ly) - cos(2.0*M_PI*y/Ly)*(cos(2.0*M_PI*y/Ly)+1.0))*cos(i*2.0*M_PI*x/Lx + 2.*M_PI*B_phase)*pow(i,kindex); + } + double kdiff = floor(k_final) - floor(k_init) + 1.0; + noise[0] = noise_amp*noise[0]/sqrt(2.0*kdiff*kdiff/3.0); + noise[1] = noise_amp*noise[1]/sqrt(2.0*kdiff*kdiff/3.0); + noise[2] = noise_amp*noise[2]/sqrt(2.0*kdiff*kdiff/3.0); +} + +void +evalDistFuncElc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_gem_ctx *app = ctx; + + double x = xn[0], y = xn[1], vx = xn[2]; + + double me = app->massElc; + double mi = app->massIon; + double T_e = app->T_e; + double T_i = app->T_i; + double Lx = app->Lx; + double Ly = app->Ly; + double n0 = app->n0; + + double fv = maxwellian(n0, vx, T_e, me); + + fout[0] = fv; + fout[1] = T_e/me*fv; +} +void +evalDistFuncIon(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_gem_ctx *app = ctx; + + double x = xn[0], y = xn[1], vx = xn[2]; + + double me = app->massElc; + double mi = app->massIon; + double T_e = app->T_e; + double T_i = app->T_i; + double Lx = app->Lx; + double Ly = app->Ly; + double n0 = app->n0; + + double fv = maxwellian(n0, vx, T_i, mi); + + fout[0] = fv; + fout[1] = T_i/mi*fv; +} + +void +evalFluidElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_gem_ctx *app = ctx; + + double x = xn[0], y = xn[1]; + + double qe = app->chargeElc; + double qi = app->chargeIon; + double me = app->massElc; + double mi = app->massIon; + double Lx = app->Lx; + double Ly = app->Ly; + double B0 = app->B0; + double guide = app->guide; + double w0 = app->w0; + double psi0 = app->psi0; + double noise_amp = app->noise_amp; + double noise_index = app->noise_index; + int k_init = app->k_init; + int k_final = app->k_final; + + double pi_2 = 2.0*M_PI; + double pi_4 = 4.0*M_PI; + + double noise[3] = {0.0}; + noise_init(noise_amp, noise_index, k_init, k_final, Lx, Ly, x, y, noise); + + double Jx = -B0/w0*tanh(y/w0)*sech2(y/w0)/(sqrt(sech2(y/w0) + guide*guide)); + double Jy = 0.0; + double Jz = B0/w0*sech2(y/w0) - psi0*cos(pi_2*x/Lx)*cos(M_PI*y/Ly)*((pi_2/Lx)*(pi_2/Lx) + (M_PI/Ly)*(M_PI/Ly)) + noise[2]; + + fout[0] = me*Jx/qe; + fout[1] = 0.0; + fout[2] = me*Jz/qe; +} + +void +evalFluidIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_gem_ctx *app = ctx; + + double x = xn[0], y = xn[1]; + + fout[0] = 0.0; + fout[1] = 0.0; + fout[2] = 0.0; +} + +void +evalFieldFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_gem_ctx *app = ctx; + + double x = xn[0], y = xn[1]; + + double qe = app->chargeElc; + double qi = app->chargeIon; + double me = app->massElc; + double mi = app->massIon; + double Lx = app->Lx; + double Ly = app->Ly; + double B0 = app->B0; + double guide = app->guide; + double w0 = app->w0; + double psi0 = app->psi0; + double noise_amp = app->noise_amp; + double noise_index = app->noise_index; + int k_init = app->k_init; + int k_final = app->k_final; + + double pi_2 = 2.0*M_PI; + double pi_4 = 4.0*M_PI; + + double noise[3] = {0.0}; + noise_init(noise_amp, noise_index, k_init, k_final, Lx, Ly, x, y, noise); + + double b1x = -B0*tanh(y/w0); + double b1y = 0.0; + double b1z = B0*sqrt(guide*guide + sech2(y/w0)); + + double E_x = 0.0; + double E_y = 0.0; + double E_z = 0.0; + double B_x = b1x + psi0 * (M_PI / Ly) * cos(2 * M_PI * x / Lx) * sin(M_PI * y / Ly) + noise[0]; + double B_y = b1y - psi0 * (2 * M_PI / Lx) * sin(2 * M_PI * x / Lx) * cos(M_PI * y / Ly) + noise[1]; + double B_z = b1z; + + fout[0] = E_x; fout[1] = E_y, fout[2] = E_z; + fout[3] = B_x; fout[4] = B_y; fout[5] = B_z; + fout[6] = 0.0; fout[7] = 0.0; +} + +void +evalNuElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_gem_ctx *app = ctx; + fout[0] = app->nuElc; +} + +void +evalNuIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_gem_ctx *app = ctx; + fout[0] = app->nuIon; +} + +struct pkpm_gem_ctx +create_ctx(void) +{ + double epsilon0 = 1.0; // permittivity of free space + double mu0 = 1.0; // pemiability of free space + + double massElc = 1.0; // electron mass + double chargeElc = -1.0; // electron charge + double massIon = 25.0; // ion mass + double chargeIon = 1.0; // ion charge + + double n0 = 1.0; // initial number density + double vAe = 1.0/25.0; + double vAi = vAe/sqrt(massIon); + double beta = 1.0; + // B0 has 1/sqrt(1 + guide^2) factor because B is subdivided between + // guide field and in-plane field + double guide = 1.0; + double B0 = vAe*sqrt(mu0*n0*massElc)/sqrt(1.0 + guide*guide); + double tot_B = sqrt(1.0 + guide*guide)*B0; + + double T_e = beta*tot_B*tot_B/(2.0*mu0*n0); + double T_i = T_e; + double vtElc = sqrt(2.0*T_e/massElc); + double vtIon = sqrt(2.0*T_i/massIon); + + // ion cyclotron frequency and gyroradius + double omegaCi = chargeIon*tot_B/massIon; + double di = vAi/omegaCi; + double rhoi = vtIon/omegaCi; + + // Layer width and perturbation + double w0 = 2.0*rhoi; + double psi0 = 0.1*tot_B*di; + + // noise levels for perturbation + double noise_amp = 0.001*tot_B; + int k_init = 1; // first wave mode to perturb with noise, 1.0 correspond to box size + int k_final = 20; // last wave mode to perturb with noise + double noise_index = -1.0; // spectral index of the noise + + // collision frequencies + double nuElc = 0.01*omegaCi; + double nuIon = 0.01*omegaCi/sqrt(massIon); + + // domain size and simulation time + double Lx = 40.0*M_PI*rhoi; + double Ly = 20.0*M_PI*rhoi; + double tend = 50.0/omegaCi; + + struct pkpm_gem_ctx ctx = { + .epsilon0 = epsilon0, + .mu0 = mu0, + .chargeElc = chargeElc, + .massElc = massElc, + .chargeIon = chargeIon, + .massIon = massIon, + .T_e = T_e, + .T_i = T_i, + .n0 = n0, + .vAe = vAe, + .B0 = B0, + .guide = guide, + .w0 = w0, + .psi0 = psi0, + .noise_amp = noise_amp, + .noise_index = noise_index, + .k_init = k_init, + .k_final = k_final, + .vtElc = vtElc, + .vtIon = vtIon, + .nuElc = nuElc, + .nuIon = nuIon, + .Lx = Lx, + .Ly = Ly, + .tend = tend, + .min_dt = 1.0e-2, + }; + return ctx; +} + +void +write_data(struct gkyl_tm_trigger *iot, gkyl_vlasov_app *app, double tcurr) +{ + if (gkyl_tm_trigger_check_and_bump(iot, tcurr)) { + gkyl_vlasov_app_write(app, tcurr, iot->curr-1); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, iot->curr-1); + } +} + +int +main(int argc, char **argv) +{ + struct gkyl_app_args app_args = parse_app_args(argc, argv); + +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) + MPI_Init(&argc, &argv); +#endif + + int NX = APP_ARGS_CHOOSE(app_args.xcells[0], 128); + int NY = APP_ARGS_CHOOSE(app_args.xcells[1], 64); + int VX = APP_ARGS_CHOOSE(app_args.vcells[0], 48); + + if (app_args.trace_mem) { + gkyl_cu_dev_mem_debug_set(true); + gkyl_mem_debug_set(true); + } + + struct pkpm_gem_ctx ctx = create_ctx(); // context for init functions + + int nrank = 1; // number of processors in simulation +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) + MPI_Comm_size(MPI_COMM_WORLD, &nrank); +#endif + + // create global range + int cells[] = { NX, NY }; + struct gkyl_range globalr; + gkyl_create_global_range(2, cells, &globalr); + + // create decomposition + int cuts[] = { 1, 1 }; +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) { + cuts[0] = app_args.cuts[0]; + cuts[1] = app_args.cuts[1]; + } +#endif + + struct gkyl_rect_decomp *decomp = + gkyl_rect_decomp_new_from_cuts(2, cuts, &globalr); + + // construct communcator for use in app + struct gkyl_comm *comm; +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) { + comm = gkyl_mpi_comm_new( &(struct gkyl_mpi_comm_inp) { + .mpi_comm = MPI_COMM_WORLD, + .decomp = decomp + } + ); + } + else + comm = gkyl_null_comm_inew( &(struct gkyl_null_comm_inp) { + .decomp = decomp, + .use_gpu = app_args.use_gpu + } + ); +#else + comm = gkyl_null_comm_inew( &(struct gkyl_null_comm_inp) { + .decomp = decomp, + .use_gpu = app_args.use_gpu + } + ); +#endif + + int my_rank; + gkyl_comm_get_rank(comm, &my_rank); + int comm_sz; + gkyl_comm_get_size(comm, &comm_sz); + + int ncuts = cuts[0]*cuts[1]; + if (ncuts != comm_sz) { + if (my_rank == 0) + fprintf(stderr, "*** Number of ranks, %d, do not match total cuts, %d!\n", comm_sz, ncuts); + goto mpifinalize; + } + + // electron momentum + struct gkyl_vlasov_fluid_species fluid_elc = { + .name = "fluid_elc", + .num_eqn = 3, + .pkpm_species = "elc", + .ctx = &ctx, + .init = evalFluidElc, + .bcy = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_REFLECT }, + .diffusion = {.D = 1.0e-3, .order=4}, + }; + + // electrons + struct gkyl_vlasov_species elc = { + .name = "elc", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_elc", + .charge = ctx.chargeElc, .mass = ctx.massElc, + .lower = { -24.0 * ctx.vtElc}, + .upper = { 24.0 * ctx.vtElc}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncElc, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuElc, + }, + + .num_diag_moments = 0, + .bcy = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_REFLECT }, + }; + + // ion momentum + struct gkyl_vlasov_fluid_species fluid_ion = { + .name = "fluid_ion", + .num_eqn = 3, + .pkpm_species = "ion", + .ctx = &ctx, + .init = evalFluidIon, + .bcy = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_REFLECT }, + .diffusion = {.D = 1.0e-3, .order=4}, + }; + + // ions + struct gkyl_vlasov_species ion = { + .name = "ion", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_ion", + .charge = ctx.chargeIon, .mass = ctx.massIon, + .lower = { -12.0 * ctx.vtIon}, + .upper = { 12.0 * ctx.vtIon}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncIon, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuIon, + }, + + .num_diag_moments = 0, + .bcy = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_REFLECT }, + }; + + // field + struct gkyl_vlasov_field field = { + .epsilon0 = 1.0, .mu0 = 1.0, + .elcErrorSpeedFactor = 0.0, + .mgnErrorSpeedFactor = 0.0, + + .ctx = &ctx, + .init = evalFieldFunc, + .bcy = { GKYL_FIELD_PEC_WALL, GKYL_FIELD_PEC_WALL }, + }; + + // VM app + struct gkyl_vm vm = { + .name = "pkpm_ff_recon_p1", + + .cdim = 2, .vdim = 1, + .lower = { -ctx.Lx/2.0, -ctx.Ly/2.0 }, + .upper = { ctx.Lx/2.0, ctx.Ly/2.0 }, + .cells = { NX, NY }, + .poly_order = 1, + .basis_type = app_args.basis_type, + + .num_periodic_dir = 1, + .periodic_dirs = { 0 }, + + .num_species = 2, + .species = { elc, ion }, + .num_fluid_species = 2, + .fluid_species = { fluid_elc, fluid_ion }, + .field = field, + + .use_gpu = app_args.use_gpu, + + .has_low_inp = true, + .low_inp = { + .local_range = decomp->ranges[my_rank], + .comm = comm + } + }; + + // create app object + gkyl_vlasov_app *app = gkyl_vlasov_app_new(&vm); + + // start, end and initial time-step + double tcurr = 0.0, tend = ctx.tend; + double dt = tend-tcurr; + int nframe = 25; + // create trigger for IO + struct gkyl_tm_trigger io_trig = { .dt = tend/nframe }; + + // initialize simulation + gkyl_vlasov_app_apply_ic(app, tcurr); + write_data(&io_trig, app, tcurr); + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + + long step = 1, num_steps = app_args.num_steps; + while ((tcurr < tend) && (step <= num_steps)) { + gkyl_vlasov_app_cout(app, stdout, "Taking time-step at t = %g ...", tcurr); + struct gkyl_update_status status = gkyl_vlasov_update(app, dt); + gkyl_vlasov_app_cout(app, stdout, " dt = %g\n", status.dt_actual); + if (step % 100 == 0) { + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + } + if (!status.success) { + gkyl_vlasov_app_cout(app, stdout, "** Update method failed! Aborting simulation ....\n"); + break; + } + if (status.dt_actual < ctx.min_dt) { + gkyl_vlasov_app_cout(app, stdout, "** Time step crashing! Aborting simulation and writing out last output ....\n"); + gkyl_vlasov_app_write(app, tcurr, 1000); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 1000); + break; + } + tcurr += status.dt_actual; + dt = status.dt_suggested; + + write_data(&io_trig, app, tcurr); + + step += 1; + } + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + gkyl_vlasov_app_write_field_energy(app); + gkyl_vlasov_app_write_integrated_L2_f(app); + gkyl_vlasov_app_write_integrated_mom(app); + gkyl_vlasov_app_stat_write(app); + + // fetch simulation statistics + struct gkyl_vlasov_stat stat = gkyl_vlasov_app_stat(app); + + gkyl_vlasov_app_cout(app, stdout, "\n"); + gkyl_vlasov_app_cout(app, stdout, "Number of update calls %ld\n", stat.nup); + gkyl_vlasov_app_cout(app, stdout, "Number of forward-Euler calls %ld\n", stat.nfeuler); + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-2 failures %ld\n", stat.nstage_2_fail); + if (stat.nstage_2_fail > 0) { + gkyl_vlasov_app_cout(app, stdout, "Max rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[1]); + gkyl_vlasov_app_cout(app, stdout, "Min rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[0]); + } + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-3 failures %ld\n", stat.nstage_3_fail); + gkyl_vlasov_app_cout(app, stdout, "Species RHS calc took %g secs\n", stat.species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisions RHS calc took %g secs\n", stat.species_coll_tm); + gkyl_vlasov_app_cout(app, stdout, "Fluid Species RHS calc took %g secs\n", stat.fluid_species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Field RHS calc took %g secs\n", stat.field_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species PKPM Vars took %g secs\n", stat.species_pkpm_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisional moments took %g secs\n", stat.species_coll_mom_tm); + gkyl_vlasov_app_cout(app, stdout, "EM Variables (bvar) calculation took %g secs\n", stat.field_em_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Current evaluation and accumulate took %g secs\n", stat.current_tm); + + gkyl_vlasov_app_cout(app, stdout, "Species BCs took %g secs\n", stat.species_bc_tm); + gkyl_vlasov_app_cout(app, stdout, "Fluid Species BCs took %g secs\n", stat.fluid_species_bc_tm); + gkyl_vlasov_app_cout(app, stdout, "Field BCs took %g secs\n", stat.field_bc_tm); + + gkyl_vlasov_app_cout(app, stdout, "Updates took %g secs\n", stat.total_tm); + + gkyl_vlasov_app_cout(app, stdout, "Number of write calls %ld,\n", stat.nio); + gkyl_vlasov_app_cout(app, stdout, "IO time took %g secs \n", stat.io_tm); + + gkyl_rect_decomp_release(decomp); + gkyl_comm_release(comm); + + // simulation complete, free app + gkyl_vlasov_app_release(app); + + mpifinalize: + ; +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) + MPI_Finalize(); +#endif + + return 0; +} From f54d09febe685ff2ff4a542280352fb76181fb90 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Mon, 4 Sep 2023 13:14:20 -0400 Subject: [PATCH 07/19] Adding two genuine regression tests of an ES shock, but with a reflecting wall to halve the domain and test reflecting wall BCs in 1D. Importantly, as before with things like the PKPM sheath, the field into the wall must be an external field and the perfect electric conductor BCs must only be applied to the plasma EM fields. --- regression/rt_pkpm_esshock_reflect_p1.c | 309 ++++++++++++++++++++++++ regression/rt_pkpm_esshock_reflect_p2.c | 309 ++++++++++++++++++++++++ 2 files changed, 618 insertions(+) create mode 100644 regression/rt_pkpm_esshock_reflect_p1.c create mode 100644 regression/rt_pkpm_esshock_reflect_p2.c diff --git a/regression/rt_pkpm_esshock_reflect_p1.c b/regression/rt_pkpm_esshock_reflect_p1.c new file mode 100644 index 000000000..2060fd79c --- /dev/null +++ b/regression/rt_pkpm_esshock_reflect_p1.c @@ -0,0 +1,309 @@ +#include +#include +#include + +#include +#include +#include + +struct esshock_ctx { + double chargeElc; // electron charge + double massElc; // electron mass + double chargeIon; // ion charge + double massIon; // ion mass + double Te_Ti; // electron to ion temperature ratio + double vte; // electron thermal velocity + double vti; // ion thermal velocity + double cs; // sound speed + double uShock; // in-flow velocity + double Lx; // size of the box + double n0; // initial number density +}; + +static inline double sq(double x) { return x*x; } + +void +evalDistFuncElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0], v = xn[1]; + double vt = app->vte, n0 = app->n0; + fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); + fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); +} + +void +evalDistFuncIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0], v = xn[1]; + double vt = app->vti, n0 = app->n0; + fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); + fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); +} + +void +evalFluidElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0]; + double vt = app->vte, vdrift = app->uShock, n0 = app->n0; + double mass = app->massElc; + fout[0] = -n0*mass*vdrift; + fout[1] = 0.0; + fout[2] = 0.0; +} + +void +evalFluidIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0]; + double vt = app->vti, vdrift = app->uShock, n0 = app->n0; + double mass = app->massIon; + fout[0] = -n0*mass*vdrift; + fout[1] = 0.0; + fout[2] = 0.0; +} + +void +evalFieldFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0]; + double B_x = 1.0; + + fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; + fout[3] = 0.0; fout[4] = 0.0; fout[5] = 0.0; + fout[6] = 0.0; fout[7] = 0.0; +} + + +void +evalExtEmFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0]; + double B_x = 1.0; + + fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; + fout[3] = B_x; fout[4] = 0.0; fout[5] = 0.0; +} + +void +evalNuElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + fout[0] = 1.0e-4; +} + +void +evalNuIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + fout[0] = 1.0e-4/sqrt(app->massIon)*(app->Te_Ti*sqrt(app->Te_Ti)); +} + +struct esshock_ctx +create_ctx(void) +{ + struct esshock_ctx ctx = { + .chargeElc = -1.0, + .massElc = 1.0, + .chargeIon = 1.0, + .massIon = 1836.153, + .Te_Ti = 1.0, + .vte = 1.0, + .vti = ctx.vte/sqrt(ctx.Te_Ti*ctx.massIon), + .cs = ctx.vte/sqrt(ctx.massIon), + .uShock = 2.0*ctx.cs, + .Lx = 128.0, + .n0 = 1.0 + }; + return ctx; +} + +int +main(int argc, char **argv) +{ + struct gkyl_app_args app_args = parse_app_args(argc, argv); + + if (app_args.trace_mem) { + gkyl_cu_dev_mem_debug_set(true); + gkyl_mem_debug_set(true); + } + int NX = APP_ARGS_CHOOSE(app_args.xcells[0], 128); + int VX = APP_ARGS_CHOOSE(app_args.vcells[0], 32); + + struct esshock_ctx ctx = create_ctx(); // context for init functions + + // electron momentum + struct gkyl_vlasov_fluid_species fluid_elc = { + .name = "fluid_elc", + .num_eqn = 3, + .pkpm_species = "elc", + .ctx = &ctx, + .init = evalFluidElc, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + //.diffusion = {.D = 1.0e-5, .order=4}, + }; + + // electrons + struct gkyl_vlasov_species elc = { + .name = "elc", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_elc", + .charge = ctx.chargeElc, .mass = ctx.massElc, + .lower = { -6.0 * ctx.vte}, + .upper = { 6.0 * ctx.vte}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncElc, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuElc, + }, + + .num_diag_moments = 0, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + }; + + // ion momentum + struct gkyl_vlasov_fluid_species fluid_ion = { + .name = "fluid_ion", + .num_eqn = 3, + .pkpm_species = "ion", + .ctx = &ctx, + .init = evalFluidIon, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + //.diffusion = {.D = 1.0e-5, .order=4}, + }; + + // ions + struct gkyl_vlasov_species ion = { + .name = "ion", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_ion", + .charge = ctx.chargeIon, .mass = ctx.massIon, + .lower = { -16.0 * ctx.vti}, + .upper = { 16.0 * ctx.vti}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncIon, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuIon, + }, + + .num_diag_moments = 0, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + }; + + // field + struct gkyl_vlasov_field field = { + .epsilon0 = 1.0, .mu0 = 1.0, + .elcErrorSpeedFactor = 0.0, + .mgnErrorSpeedFactor = 0.0, + + .ctx = &ctx, + .init = evalFieldFunc, + // Plasma EM field BCs are PEC on left and copy on right, external field goes into wall + .bcx = { GKYL_FIELD_PEC_WALL, GKYL_FIELD_COPY }, + .ext_em = evalExtEmFunc, + .ext_em_ctx = &ctx, + }; + + // VM app + struct gkyl_vm vm = { + .name = "pkpm_esshock_reflect_p1", + + .cdim = 1, .vdim = 1, + .lower = { 0.0 }, + .upper = { ctx.Lx }, + .cells = { NX }, + .poly_order = 1, + .basis_type = app_args.basis_type, + .cfl_frac = 0.8, + + .num_periodic_dir = 0, + .periodic_dirs = { }, + + .num_species = 2, + .species = { elc, ion }, + .num_fluid_species = 2, + .fluid_species = { fluid_elc, fluid_ion }, + .field = field, + + .use_gpu = app_args.use_gpu, + }; + + // create app object + gkyl_vlasov_app *app = gkyl_vlasov_app_new(&vm); + + // start, end and initial time-step + double tcurr = 0.0, tend = 100.0; + double dt = tend-tcurr; + + // initialize simulation + gkyl_vlasov_app_apply_ic(app, tcurr); + + gkyl_vlasov_app_write(app, tcurr, 0); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 0); + + long step = 1, num_steps = app_args.num_steps; + while ((tcurr < tend) && (step <= num_steps)) { + printf("Taking time-step at t = %g ...", tcurr); + struct gkyl_update_status status = gkyl_vlasov_update(app, dt); + printf(" dt = %g\n", status.dt_actual); + + if (!status.success) { + printf("** Update method failed! Aborting simulation ....\n"); + break; + } + tcurr += status.dt_actual; + dt = status.dt_suggested; + step += 1; + } + + gkyl_vlasov_app_write(app, tcurr, 1); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 1); + gkyl_vlasov_app_stat_write(app); + + // fetch simulation statistics + struct gkyl_vlasov_stat stat = gkyl_vlasov_app_stat(app); + + gkyl_vlasov_app_cout(app, stdout, "\n"); + gkyl_vlasov_app_cout(app, stdout, "Number of update calls %ld\n", stat.nup); + gkyl_vlasov_app_cout(app, stdout, "Number of forward-Euler calls %ld\n", stat.nfeuler); + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-2 failures %ld\n", stat.nstage_2_fail); + if (stat.nstage_2_fail > 0) { + gkyl_vlasov_app_cout(app, stdout, "Max rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[1]); + gkyl_vlasov_app_cout(app, stdout, "Min rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[0]); + } + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-3 failures %ld\n", stat.nstage_3_fail); + gkyl_vlasov_app_cout(app, stdout, "Species RHS calc took %g secs\n", stat.species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisions RHS calc took %g secs\n", stat.species_coll_tm); + gkyl_vlasov_app_cout(app, stdout, "Fluid Species RHS calc took %g secs\n", stat.fluid_species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Field RHS calc took %g secs\n", stat.field_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species PKPM Vars took %g secs\n", stat.species_pkpm_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisional moments took %g secs\n", stat.species_coll_mom_tm); + gkyl_vlasov_app_cout(app, stdout, "EM Variables (bvar) calculation took %g secs\n", stat.field_em_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Current evaluation and accumulate took %g secs\n", stat.current_tm); + gkyl_vlasov_app_cout(app, stdout, "Updates took %g secs\n", stat.total_tm); + + gkyl_vlasov_app_cout(app, stdout, "Number of write calls %ld,\n", stat.nio); + gkyl_vlasov_app_cout(app, stdout, "IO time took %g secs \n", stat.io_tm); + + // simulation complete, free app + gkyl_vlasov_app_release(app); + + return 0; +} diff --git a/regression/rt_pkpm_esshock_reflect_p2.c b/regression/rt_pkpm_esshock_reflect_p2.c new file mode 100644 index 000000000..491a5f84e --- /dev/null +++ b/regression/rt_pkpm_esshock_reflect_p2.c @@ -0,0 +1,309 @@ +#include +#include +#include + +#include +#include +#include + +struct esshock_ctx { + double chargeElc; // electron charge + double massElc; // electron mass + double chargeIon; // ion charge + double massIon; // ion mass + double Te_Ti; // electron to ion temperature ratio + double vte; // electron thermal velocity + double vti; // ion thermal velocity + double cs; // sound speed + double uShock; // in-flow velocity + double Lx; // size of the box + double n0; // initial number density +}; + +static inline double sq(double x) { return x*x; } + +void +evalDistFuncElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0], v = xn[1]; + double vt = app->vte, n0 = app->n0; + fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); + fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); +} + +void +evalDistFuncIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0], v = xn[1]; + double vt = app->vti, n0 = app->n0; + fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); + fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); +} + +void +evalFluidElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0]; + double vt = app->vte, vdrift = app->uShock, n0 = app->n0; + double mass = app->massElc; + fout[0] = -n0*mass*vdrift; + fout[1] = 0.0; + fout[2] = 0.0; +} + +void +evalFluidIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0]; + double vt = app->vti, vdrift = app->uShock, n0 = app->n0; + double mass = app->massIon; + fout[0] = -n0*mass*vdrift; + fout[1] = 0.0; + fout[2] = 0.0; +} + +void +evalFieldFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0]; + double B_x = 1.0; + + fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; + fout[3] = 0.0; fout[4] = 0.0; fout[5] = 0.0; + fout[6] = 0.0; fout[7] = 0.0; +} + + +void +evalExtEmFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + double x = xn[0]; + double B_x = 1.0; + + fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; + fout[3] = B_x; fout[4] = 0.0; fout[5] = 0.0; +} + +void +evalNuElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + fout[0] = 1.0e-4; +} + +void +evalNuIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct esshock_ctx *app = ctx; + fout[0] = 1.0e-4/sqrt(app->massIon)*(app->Te_Ti*sqrt(app->Te_Ti)); +} + +struct esshock_ctx +create_ctx(void) +{ + struct esshock_ctx ctx = { + .chargeElc = -1.0, + .massElc = 1.0, + .chargeIon = 1.0, + .massIon = 1836.153, + .Te_Ti = 1.0, + .vte = 1.0, + .vti = ctx.vte/sqrt(ctx.Te_Ti*ctx.massIon), + .cs = ctx.vte/sqrt(ctx.massIon), + .uShock = 2.0*ctx.cs, + .Lx = 128.0, + .n0 = 1.0 + }; + return ctx; +} + +int +main(int argc, char **argv) +{ + struct gkyl_app_args app_args = parse_app_args(argc, argv); + + if (app_args.trace_mem) { + gkyl_cu_dev_mem_debug_set(true); + gkyl_mem_debug_set(true); + } + int NX = APP_ARGS_CHOOSE(app_args.xcells[0], 128); + int VX = APP_ARGS_CHOOSE(app_args.vcells[0], 32); + + struct esshock_ctx ctx = create_ctx(); // context for init functions + + // electron momentum + struct gkyl_vlasov_fluid_species fluid_elc = { + .name = "fluid_elc", + .num_eqn = 3, + .pkpm_species = "elc", + .ctx = &ctx, + .init = evalFluidElc, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + //.diffusion = {.D = 1.0e-5, .order=4}, + }; + + // electrons + struct gkyl_vlasov_species elc = { + .name = "elc", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_elc", + .charge = ctx.chargeElc, .mass = ctx.massElc, + .lower = { -6.0 * ctx.vte}, + .upper = { 6.0 * ctx.vte}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncElc, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuElc, + }, + + .num_diag_moments = 0, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + }; + + // ion momentum + struct gkyl_vlasov_fluid_species fluid_ion = { + .name = "fluid_ion", + .num_eqn = 3, + .pkpm_species = "ion", + .ctx = &ctx, + .init = evalFluidIon, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + //.diffusion = {.D = 1.0e-5, .order=4}, + }; + + // ions + struct gkyl_vlasov_species ion = { + .name = "ion", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_ion", + .charge = ctx.chargeIon, .mass = ctx.massIon, + .lower = { -16.0 * ctx.vti}, + .upper = { 16.0 * ctx.vti}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncIon, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuIon, + }, + + .num_diag_moments = 0, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + }; + + // field + struct gkyl_vlasov_field field = { + .epsilon0 = 1.0, .mu0 = 1.0, + .elcErrorSpeedFactor = 0.0, + .mgnErrorSpeedFactor = 0.0, + + .ctx = &ctx, + .init = evalFieldFunc, + // Plasma EM field BCs are PEC on left and copy on right, external field goes into wall + .bcx = { GKYL_FIELD_PEC_WALL, GKYL_FIELD_COPY }, + .ext_em = evalExtEmFunc, + .ext_em_ctx = &ctx, + }; + + // VM app + struct gkyl_vm vm = { + .name = "pkpm_esshock_reflect_p2", + + .cdim = 1, .vdim = 1, + .lower = { 0.0 }, + .upper = { ctx.Lx }, + .cells = { NX }, + .poly_order = 2, + .basis_type = app_args.basis_type, + .cfl_frac = 0.8, + + .num_periodic_dir = 0, + .periodic_dirs = { }, + + .num_species = 2, + .species = { elc, ion }, + .num_fluid_species = 2, + .fluid_species = { fluid_elc, fluid_ion }, + .field = field, + + .use_gpu = app_args.use_gpu, + }; + + // create app object + gkyl_vlasov_app *app = gkyl_vlasov_app_new(&vm); + + // start, end and initial time-step + double tcurr = 0.0, tend = 100.0; + double dt = tend-tcurr; + + // initialize simulation + gkyl_vlasov_app_apply_ic(app, tcurr); + + gkyl_vlasov_app_write(app, tcurr, 0); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 0); + + long step = 1, num_steps = app_args.num_steps; + while ((tcurr < tend) && (step <= num_steps)) { + printf("Taking time-step at t = %g ...", tcurr); + struct gkyl_update_status status = gkyl_vlasov_update(app, dt); + printf(" dt = %g\n", status.dt_actual); + + if (!status.success) { + printf("** Update method failed! Aborting simulation ....\n"); + break; + } + tcurr += status.dt_actual; + dt = status.dt_suggested; + step += 1; + } + + gkyl_vlasov_app_write(app, tcurr, 1); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 1); + gkyl_vlasov_app_stat_write(app); + + // fetch simulation statistics + struct gkyl_vlasov_stat stat = gkyl_vlasov_app_stat(app); + + gkyl_vlasov_app_cout(app, stdout, "\n"); + gkyl_vlasov_app_cout(app, stdout, "Number of update calls %ld\n", stat.nup); + gkyl_vlasov_app_cout(app, stdout, "Number of forward-Euler calls %ld\n", stat.nfeuler); + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-2 failures %ld\n", stat.nstage_2_fail); + if (stat.nstage_2_fail > 0) { + gkyl_vlasov_app_cout(app, stdout, "Max rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[1]); + gkyl_vlasov_app_cout(app, stdout, "Min rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[0]); + } + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-3 failures %ld\n", stat.nstage_3_fail); + gkyl_vlasov_app_cout(app, stdout, "Species RHS calc took %g secs\n", stat.species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisions RHS calc took %g secs\n", stat.species_coll_tm); + gkyl_vlasov_app_cout(app, stdout, "Fluid Species RHS calc took %g secs\n", stat.fluid_species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Field RHS calc took %g secs\n", stat.field_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species PKPM Vars took %g secs\n", stat.species_pkpm_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisional moments took %g secs\n", stat.species_coll_mom_tm); + gkyl_vlasov_app_cout(app, stdout, "EM Variables (bvar) calculation took %g secs\n", stat.field_em_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Current evaluation and accumulate took %g secs\n", stat.current_tm); + gkyl_vlasov_app_cout(app, stdout, "Updates took %g secs\n", stat.total_tm); + + gkyl_vlasov_app_cout(app, stdout, "Number of write calls %ld,\n", stat.nio); + gkyl_vlasov_app_cout(app, stdout, "IO time took %g secs \n", stat.io_tm); + + // simulation complete, free app + gkyl_vlasov_app_release(app); + + return 0; +} From 812caee3cb6044694109dcde7e29a148725a0d1a Mon Sep 17 00:00:00 2001 From: Junoravin Date: Mon, 4 Sep 2023 13:31:23 -0400 Subject: [PATCH 08/19] Adding integrated diagnostics and write methods to reflect shock regression for ease of deployment in production testing of robustness --- regression/rt_pkpm_esshock_reflect_p1.c | 32 ++++++++++++++++++++----- regression/rt_pkpm_esshock_reflect_p2.c | 32 ++++++++++++++++++++----- 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/regression/rt_pkpm_esshock_reflect_p1.c b/regression/rt_pkpm_esshock_reflect_p1.c index 2060fd79c..9d3bc3028 100644 --- a/regression/rt_pkpm_esshock_reflect_p1.c +++ b/regression/rt_pkpm_esshock_reflect_p1.c @@ -104,6 +104,15 @@ evalNuIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, fout[0] = 1.0e-4/sqrt(app->massIon)*(app->Te_Ti*sqrt(app->Te_Ti)); } +void +write_data(struct gkyl_tm_trigger *iot, gkyl_vlasov_app *app, double tcurr) +{ + if (gkyl_tm_trigger_check_and_bump(iot, tcurr)) { + gkyl_vlasov_app_write(app, tcurr, iot->curr-1); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, iot->curr-1); + } +} + struct esshock_ctx create_ctx(void) { @@ -116,7 +125,7 @@ create_ctx(void) .vte = 1.0, .vti = ctx.vte/sqrt(ctx.Te_Ti*ctx.massIon), .cs = ctx.vte/sqrt(ctx.massIon), - .uShock = 2.0*ctx.cs, + .uShock = 2.5*ctx.cs, .Lx = 128.0, .n0 = 1.0 }; @@ -251,12 +260,16 @@ main(int argc, char **argv) // start, end and initial time-step double tcurr = 0.0, tend = 100.0; double dt = tend-tcurr; + int nframe = 1; + // create trigger for IO + struct gkyl_tm_trigger io_trig = { .dt = tend/nframe }; // initialize simulation gkyl_vlasov_app_apply_ic(app, tcurr); - - gkyl_vlasov_app_write(app, tcurr, 0); - gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 0); + write_data(&io_trig, app, tcurr); + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); long step = 1, num_steps = app_args.num_steps; while ((tcurr < tend) && (step <= num_steps)) { @@ -264,17 +277,24 @@ main(int argc, char **argv) struct gkyl_update_status status = gkyl_vlasov_update(app, dt); printf(" dt = %g\n", status.dt_actual); + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + if (!status.success) { printf("** Update method failed! Aborting simulation ....\n"); break; } tcurr += status.dt_actual; dt = status.dt_suggested; + write_data(&io_trig, app, tcurr); + step += 1; } - gkyl_vlasov_app_write(app, tcurr, 1); - gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 1); + gkyl_vlasov_app_write_field_energy(app); + gkyl_vlasov_app_write_integrated_L2_f(app); + gkyl_vlasov_app_write_integrated_mom(app); gkyl_vlasov_app_stat_write(app); // fetch simulation statistics diff --git a/regression/rt_pkpm_esshock_reflect_p2.c b/regression/rt_pkpm_esshock_reflect_p2.c index 491a5f84e..88bd90d6a 100644 --- a/regression/rt_pkpm_esshock_reflect_p2.c +++ b/regression/rt_pkpm_esshock_reflect_p2.c @@ -104,6 +104,15 @@ evalNuIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, fout[0] = 1.0e-4/sqrt(app->massIon)*(app->Te_Ti*sqrt(app->Te_Ti)); } +void +write_data(struct gkyl_tm_trigger *iot, gkyl_vlasov_app *app, double tcurr) +{ + if (gkyl_tm_trigger_check_and_bump(iot, tcurr)) { + gkyl_vlasov_app_write(app, tcurr, iot->curr-1); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, iot->curr-1); + } +} + struct esshock_ctx create_ctx(void) { @@ -116,7 +125,7 @@ create_ctx(void) .vte = 1.0, .vti = ctx.vte/sqrt(ctx.Te_Ti*ctx.massIon), .cs = ctx.vte/sqrt(ctx.massIon), - .uShock = 2.0*ctx.cs, + .uShock = 2.5*ctx.cs, .Lx = 128.0, .n0 = 1.0 }; @@ -251,12 +260,16 @@ main(int argc, char **argv) // start, end and initial time-step double tcurr = 0.0, tend = 100.0; double dt = tend-tcurr; + int nframe = 1; + // create trigger for IO + struct gkyl_tm_trigger io_trig = { .dt = tend/nframe }; // initialize simulation gkyl_vlasov_app_apply_ic(app, tcurr); - - gkyl_vlasov_app_write(app, tcurr, 0); - gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 0); + write_data(&io_trig, app, tcurr); + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); long step = 1, num_steps = app_args.num_steps; while ((tcurr < tend) && (step <= num_steps)) { @@ -264,17 +277,24 @@ main(int argc, char **argv) struct gkyl_update_status status = gkyl_vlasov_update(app, dt); printf(" dt = %g\n", status.dt_actual); + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + if (!status.success) { printf("** Update method failed! Aborting simulation ....\n"); break; } tcurr += status.dt_actual; dt = status.dt_suggested; + write_data(&io_trig, app, tcurr); + step += 1; } - gkyl_vlasov_app_write(app, tcurr, 1); - gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 1); + gkyl_vlasov_app_write_field_energy(app); + gkyl_vlasov_app_write_integrated_L2_f(app); + gkyl_vlasov_app_write_integrated_mom(app); gkyl_vlasov_app_stat_write(app); // fetch simulation statistics From 435622cf6729902eae89f6373d8172edd59e50ba Mon Sep 17 00:00:00 2001 From: Junoravin Date: Mon, 4 Sep 2023 14:53:58 -0400 Subject: [PATCH 09/19] Adding an EM parallel shock for testing (ideally final simulation for PKPM paper) --- regression/rt_pkpm_em_par_shock_2d_p1.c | 529 ++++++++++++++++++++++++ 1 file changed, 529 insertions(+) create mode 100644 regression/rt_pkpm_em_par_shock_2d_p1.c diff --git a/regression/rt_pkpm_em_par_shock_2d_p1.c b/regression/rt_pkpm_em_par_shock_2d_p1.c new file mode 100644 index 000000000..485f0841e --- /dev/null +++ b/regression/rt_pkpm_em_par_shock_2d_p1.c @@ -0,0 +1,529 @@ +#include +#include +#include +#include + +#include +#include + +#include + +#ifdef GKYL_HAVE_MPI +#include +#include +#endif + +#include + +struct pkpm_em_par_shock_ctx { + double epsilon0; + double mu0; + double chargeElc; // electron charge + double massElc; // electron mass + double chargeIon; // ion charge + double massIon; // ion mass + double n0; + double B0; + double noise_amp; + double noise_index; + int k_init; + int k_final; + double T_e; + double T_i; + double vtElc; + double vtIon; + double nuElc; + double nuIon; + double Lx; + double Ly; + double tend; + double min_dt; + bool use_gpu; +}; + +static inline void +noise_init(double noise_amp, double noise_index, int k_init, int k_final, double Lx, double Ly, double x, double y, double noise[3]) +{ + pcg64_random_t rng = gkyl_pcg64_init(0); + double kindex = (noise_index + 1.0) / 2.0; + double B_amp = 0.0; + double B_phase = 0.0; + for (int i = k_init; i < k_final; ++i) { + B_amp = gkyl_pcg64_rand_double(&rng); + B_phase = gkyl_pcg64_rand_double(&rng); + + noise[0] -= 2.0*(2.0*M_PI/Ly)*(Lx/(i*2.0*M_PI))*B_amp*sin(2.0*M_PI*y/Ly)*(cos(2.0*M_PI*y/Ly)+1)*cos(i*2.0*M_PI*x/Lx + 2.0*M_PI*B_phase)*pow(i,kindex); + noise[1] += B_amp*(cos(2.0*M_PI*y/Ly) + 1.0)*(cos(2.0*M_PI*y/Ly) + 1.0)*sin(i*2.0*M_PI*x/Lx + 2.0*M_PI*B_phase)*pow(i,kindex); + noise[2] += (2.0*M_PI*i/Lx)*B_amp*(cos(2.0*M_PI*y/Ly) + 1.0)*(cos(2.0*M_PI*y/Ly) + 1.0)*cos(i*2.0*M_PI*x/Lx + 2*M_PI*B_phase)*pow(i,kindex) + + 2.0*(2.0*M_PI/Ly)*(2.0*M_PI/Ly)*(Lx/(i*2.0*M_PI))*B_amp*(sin(2.0*M_PI*y/Ly)*sin(2.0*M_PI*y/Ly) - cos(2.0*M_PI*y/Ly)*(cos(2.0*M_PI*y/Ly)+1.0))*cos(i*2.0*M_PI*x/Lx + 2.*M_PI*B_phase)*pow(i,kindex); + } + double kdiff = floor(k_final) - floor(k_init) + 1.0; + noise[0] = noise_amp*noise[0]/sqrt(2.0*kdiff*kdiff/3.0); + noise[1] = noise_amp*noise[1]/sqrt(2.0*kdiff*kdiff/3.0); + noise[2] = noise_amp*noise[2]/sqrt(2.0*kdiff*kdiff/3.0); +} + +static inline double sq(double x) { return x*x; } + +void +evalDistFuncElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0], v = xn[1]; + double vt = app->vte, n0 = app->n0; + fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); + fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); +} + +void +evalDistFuncIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0], v = xn[1]; + double vt = app->vti, n0 = app->n0; + fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); + fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); +} + +void +evalFluidElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0]; + double vt = app->vte, vdrift = app->uShock, n0 = app->n0; + double mass = app->massElc; + double charge = app->chargeElc; + double Lx = app->Lx; + double Ly = app->Ly; + double B0 = app->B0; + double noise_amp = app->noise_amp; + double noise_index = app->noise_index; + int k_init = app->k_init; + int k_final = app->k_final; + + double noise[3] = {0.0}; + noise_init(noise_amp, noise_index, k_init, k_final, Lx, Ly, x, y, noise); + + fout[0] = -n0*mass*vdrift; + fout[1] = 0.0; + fout[2] = mass*noise[2]/charge; // initial noise in Jz_elc to excite instabilities +} + +void +evalFluidIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0]; + double vt = app->vti, vdrift = app->uShock, n0 = app->n0; + double mass = app->massIon; + fout[0] = -n0*mass*vdrift; + fout[1] = 0.0; + fout[2] = 0.0; +} + +void +evalFieldFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0]; + + fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; + fout[3] = 0.0; fout[4] = 0.0; fout[5] = 0.0; + fout[6] = 0.0; fout[7] = 0.0; +} + + +void +evalExtEmFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0]; + double B_x = app->B0; + + fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; + fout[3] = B_x; fout[4] = 0.0; fout[5] = 0.0; +} + +void +evalNuElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_gem_ctx *app = ctx; + fout[0] = app->nuElc; +} + +void +evalNuIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_gem_ctx *app = ctx; + fout[0] = app->nuIon; +} + +void +write_data(struct gkyl_tm_trigger *iot, gkyl_vlasov_app *app, double tcurr) +{ + if (gkyl_tm_trigger_check_and_bump(iot, tcurr)) { + gkyl_vlasov_app_write(app, tcurr, iot->curr-1); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, iot->curr-1); + } +} + +struct pkpm_em_par_shock_ctx +create_ctx(void) +{ + double epsilon0 = 1.0; // permittivity of free space + double mu0 = 1.0; // pemiability of free space + + double massElc = 1.0; // electron mass + double chargeElc = -1.0; // electron charge + double massIon = 1836.153; // ion mass + double chargeIon = 1.0; // ion charge + + double n0 = 1.0; // initial number density + double vAe = 1.0/8.0; + double vAi = vAe/sqrt(massIon); + double beta = 1.0; + + double B0 = vAe*sqrt(mu0*n0*massElc) + double T_e = beta*B0*B0/(2.0*mu0*n0); + double T_i = T_e; + double vtElc = sqrt(2.0*T_e/massElc); + double vtIon = sqrt(2.0*T_i/massIon); + double uShock = 2.5*vAi; + + // ion cyclotron frequency and gyroradius + double omegaCi = chargeIon*B0/massIon; + double di = vAi/omegaCi; + double rhoi = vtIon/omegaCi; // rhoi ~ 484 lambdaD at real mass ratio and vtElc/c = 1/8 + + // noise levels for perturbation + double noise_amp = 0.001*B0; + int k_init = 1; // first wave mode to perturb with noise, 1.0 correspond to box size + int k_final = 32; // last wave mode to perturb with noise + double noise_index = -1.0; // spectral index of the noise + + // collision frequencies + double nuElc = 0.01*omegaCi; + double nuIon = 0.01*omegaCi/sqrt(massIon); + + // domain size and simulation time + double Lx = 8.0*M_PI*rhoi; + double Ly = 2.0*M_PI*rhoi; + double tend = 10.0/omegaCi; + + struct pkpm_em_par_shock_ctx ctx = { + .epsilon0 = epsilon0, + .mu0 = mu0, + .chargeElc = chargeElc, + .massElc = massElc, + .chargeIon = chargeIon, + .massIon = massIon, + .T_e = T_e, + .T_i = T_i, + .n0 = n0, + .B0 = B0, + .noise_amp = noise_amp, + .noise_index = noise_index, + .k_init = k_init, + .k_final = k_final, + .vtElc = vtElc, + .vtIon = vtIon, + .nuElc = nuElc, + .nuIon = nuIon, + .Lx = Lx, + .Ly = Ly, + .tend = tend, + .min_dt = 1.0e-2, + }; + return ctx; +} + +int +main(int argc, char **argv) +{ + struct gkyl_app_args app_args = parse_app_args(argc, argv); + +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) + MPI_Init(&argc, &argv); +#endif + + int NX = APP_ARGS_CHOOSE(app_args.xcells[0], 128); + int NY = APP_ARGS_CHOOSE(app_args.xcells[1], 32); + int VX = APP_ARGS_CHOOSE(app_args.vcells[0], 32); + + if (app_args.trace_mem) { + gkyl_cu_dev_mem_debug_set(true); + gkyl_mem_debug_set(true); + } + + struct pkpm_em_par_shock_ctx ctx = create_ctx(); // context for init functions + + int nrank = 1; // number of processors in simulation +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) + MPI_Comm_size(MPI_COMM_WORLD, &nrank); +#endif + + // create global range + int cells[] = { NX, NY }; + struct gkyl_range globalr; + gkyl_create_global_range(2, cells, &globalr); + + // create decomposition + int cuts[] = { 1, 1 }; +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) { + cuts[0] = app_args.cuts[0]; + cuts[1] = app_args.cuts[1]; + } +#endif + + struct gkyl_rect_decomp *decomp = + gkyl_rect_decomp_new_from_cuts(2, cuts, &globalr); + + // construct communcator for use in app + struct gkyl_comm *comm; +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) { + comm = gkyl_mpi_comm_new( &(struct gkyl_mpi_comm_inp) { + .mpi_comm = MPI_COMM_WORLD, + .decomp = decomp + } + ); + } + else + comm = gkyl_null_comm_inew( &(struct gkyl_null_comm_inp) { + .decomp = decomp, + .use_gpu = app_args.use_gpu + } + ); +#else + comm = gkyl_null_comm_inew( &(struct gkyl_null_comm_inp) { + .decomp = decomp, + .use_gpu = app_args.use_gpu + } + ); +#endif + + int my_rank; + gkyl_comm_get_rank(comm, &my_rank); + int comm_sz; + gkyl_comm_get_size(comm, &comm_sz); + + int ncuts = cuts[0]*cuts[1]; + if (ncuts != comm_sz) { + if (my_rank == 0) + fprintf(stderr, "*** Number of ranks, %d, do not match total cuts, %d!\n", comm_sz, ncuts); + goto mpifinalize; + } + + // electron momentum + struct gkyl_vlasov_fluid_species fluid_elc = { + .name = "fluid_elc", + .num_eqn = 3, + .pkpm_species = "elc", + .ctx = &ctx, + .init = evalFluidElc, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + .diffusion = {.D = 1.0e-5, .order=4}, + }; + + // electrons + struct gkyl_vlasov_species elc = { + .name = "elc", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_elc", + .charge = ctx.chargeElc, .mass = ctx.massElc, + .lower = { -6.0 * ctx.vte}, + .upper = { 6.0 * ctx.vte}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncElc, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuElc, + }, + + .num_diag_moments = 0, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + }; + + // ion momentum + struct gkyl_vlasov_fluid_species fluid_ion = { + .name = "fluid_ion", + .num_eqn = 3, + .pkpm_species = "ion", + .ctx = &ctx, + .init = evalFluidIon, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + .diffusion = {.D = 1.0e-5, .order=4}, + }; + + // ions + struct gkyl_vlasov_species ion = { + .name = "ion", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_ion", + .charge = ctx.chargeIon, .mass = ctx.massIon, + .lower = { -16.0 * ctx.vti}, + .upper = { 16.0 * ctx.vti}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncIon, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuIon, + }, + + .num_diag_moments = 0, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + }; + + // field + struct gkyl_vlasov_field field = { + .epsilon0 = 1.0, .mu0 = 1.0, + .elcErrorSpeedFactor = 0.0, + .mgnErrorSpeedFactor = 0.0, + + .ctx = &ctx, + .init = evalFieldFunc, + // Plasma EM field BCs are PEC on left and copy on right, external field goes into wall + .bcx = { GKYL_FIELD_PEC_WALL, GKYL_FIELD_COPY }, + .ext_em = evalExtEmFunc, + .ext_em_ctx = &ctx, + }; + + // VM app + struct gkyl_vm vm = { + .name = "pkpm_em_par_shock_2d_p1", + + .cdim = 2, .vdim = 1, + .lower = { 0.0, -ctx.Ly/2.0 }, + .upper = { ctx.Lx, ctx.Ly/2.0 }, + .cells = { NX, NY }, + .poly_order = 1, + .basis_type = app_args.basis_type, + + .num_periodic_dir = 1, + .periodic_dirs = { 1 }, + + .num_species = 2, + .species = { elc, ion }, + .num_fluid_species = 2, + .fluid_species = { fluid_elc, fluid_ion }, + .field = field, + + .use_gpu = app_args.use_gpu, + + .has_low_inp = true, + .low_inp = { + .local_range = decomp->ranges[my_rank], + .comm = comm + } + }; + + // create app object + gkyl_vlasov_app *app = gkyl_vlasov_app_new(&vm); + + // start, end and initial time-step + double tcurr = 0.0, tend = ctx.tend; + double dt = tend-tcurr; + int nframe = 1; + // create trigger for IO + struct gkyl_tm_trigger io_trig = { .dt = tend/nframe }; + + // initialize simulation + gkyl_vlasov_app_apply_ic(app, tcurr); + write_data(&io_trig, app, tcurr); + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + + long step = 1, num_steps = app_args.num_steps; + while ((tcurr < tend) && (step <= num_steps)) { + gkyl_vlasov_app_cout(app, stdout, "Taking time-step at t = %g ...", tcurr); + struct gkyl_update_status status = gkyl_vlasov_update(app, dt); + gkyl_vlasov_app_cout(app, stdout, " dt = %g\n", status.dt_actual); + if (step % 100 == 0) { + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + } + if (!status.success) { + gkyl_vlasov_app_cout(app, stdout, "** Update method failed! Aborting simulation ....\n"); + break; + } + if (status.dt_actual < ctx.min_dt) { + gkyl_vlasov_app_cout(app, stdout, "** Time step crashing! Aborting simulation and writing out last output ....\n"); + gkyl_vlasov_app_write(app, tcurr, 1000); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 1000); + break; + } + tcurr += status.dt_actual; + dt = status.dt_suggested; + + write_data(&io_trig, app, tcurr); + + step += 1; + } + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + gkyl_vlasov_app_write_field_energy(app); + gkyl_vlasov_app_write_integrated_L2_f(app); + gkyl_vlasov_app_write_integrated_mom(app); + gkyl_vlasov_app_stat_write(app); + + // fetch simulation statistics + struct gkyl_vlasov_stat stat = gkyl_vlasov_app_stat(app); + + gkyl_vlasov_app_cout(app, stdout, "\n"); + gkyl_vlasov_app_cout(app, stdout, "Number of update calls %ld\n", stat.nup); + gkyl_vlasov_app_cout(app, stdout, "Number of forward-Euler calls %ld\n", stat.nfeuler); + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-2 failures %ld\n", stat.nstage_2_fail); + if (stat.nstage_2_fail > 0) { + gkyl_vlasov_app_cout(app, stdout, "Max rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[1]); + gkyl_vlasov_app_cout(app, stdout, "Min rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[0]); + } + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-3 failures %ld\n", stat.nstage_3_fail); + gkyl_vlasov_app_cout(app, stdout, "Species RHS calc took %g secs\n", stat.species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisions RHS calc took %g secs\n", stat.species_coll_tm); + gkyl_vlasov_app_cout(app, stdout, "Fluid Species RHS calc took %g secs\n", stat.fluid_species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Field RHS calc took %g secs\n", stat.field_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species PKPM Vars took %g secs\n", stat.species_pkpm_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisional moments took %g secs\n", stat.species_coll_mom_tm); + gkyl_vlasov_app_cout(app, stdout, "EM Variables (bvar) calculation took %g secs\n", stat.field_em_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Current evaluation and accumulate took %g secs\n", stat.current_tm); + + gkyl_vlasov_app_cout(app, stdout, "Species BCs took %g secs\n", stat.species_bc_tm); + gkyl_vlasov_app_cout(app, stdout, "Fluid Species BCs took %g secs\n", stat.fluid_species_bc_tm); + gkyl_vlasov_app_cout(app, stdout, "Field BCs took %g secs\n", stat.field_bc_tm); + + gkyl_vlasov_app_cout(app, stdout, "Updates took %g secs\n", stat.total_tm); + + gkyl_vlasov_app_cout(app, stdout, "Number of write calls %ld,\n", stat.nio); + gkyl_vlasov_app_cout(app, stdout, "IO time took %g secs \n", stat.io_tm); + + gkyl_rect_decomp_release(decomp); + gkyl_comm_release(comm); + + // simulation complete, free app + gkyl_vlasov_app_release(app); + + mpifinalize: + ; +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) + MPI_Finalize(); +#endif + + return 0; +} From 11137605e92849ff614d75c4fe56e08bd6335824 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Mon, 4 Sep 2023 14:57:41 -0400 Subject: [PATCH 10/19] Typos in input file. Fixed now --- regression/rt_pkpm_em_par_shock_2d_p1.c | 32 +++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/regression/rt_pkpm_em_par_shock_2d_p1.c b/regression/rt_pkpm_em_par_shock_2d_p1.c index 485f0841e..a2f27567b 100644 --- a/regression/rt_pkpm_em_par_shock_2d_p1.c +++ b/regression/rt_pkpm_em_par_shock_2d_p1.c @@ -30,6 +30,7 @@ struct pkpm_em_par_shock_ctx { int k_final; double T_e; double T_i; + double uShock; double vtElc; double vtIon; double nuElc; @@ -70,7 +71,7 @@ evalDistFuncElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT { struct pkpm_em_par_shock_ctx *app = ctx; double x = xn[0], v = xn[1]; - double vt = app->vte, n0 = app->n0; + double vt = app->vtElc, n0 = app->n0; fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); } @@ -80,7 +81,7 @@ evalDistFuncIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT { struct pkpm_em_par_shock_ctx *app = ctx; double x = xn[0], v = xn[1]; - double vt = app->vti, n0 = app->n0; + double vt = app->vtIon, n0 = app->n0; fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); } @@ -89,8 +90,8 @@ void evalFluidElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { struct pkpm_em_par_shock_ctx *app = ctx; - double x = xn[0]; - double vt = app->vte, vdrift = app->uShock, n0 = app->n0; + double x = xn[0], y = xn[1]; + double vdrift = app->uShock, n0 = app->n0; double mass = app->massElc; double charge = app->chargeElc; double Lx = app->Lx; @@ -113,8 +114,8 @@ void evalFluidIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { struct pkpm_em_par_shock_ctx *app = ctx; - double x = xn[0]; - double vt = app->vti, vdrift = app->uShock, n0 = app->n0; + double x = xn[0], y = xn[1]; + double vdrift = app->uShock, n0 = app->n0; double mass = app->massIon; fout[0] = -n0*mass*vdrift; fout[1] = 0.0; @@ -125,7 +126,7 @@ void evalFieldFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { struct pkpm_em_par_shock_ctx *app = ctx; - double x = xn[0]; + double x = xn[0], y = xn[1]; fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; fout[3] = 0.0; fout[4] = 0.0; fout[5] = 0.0; @@ -137,7 +138,7 @@ void evalExtEmFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { struct pkpm_em_par_shock_ctx *app = ctx; - double x = xn[0]; + double x = xn[0], y = xn[1]; double B_x = app->B0; fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; @@ -147,14 +148,14 @@ evalExtEmFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fo void evalNuElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { - struct pkpm_gem_ctx *app = ctx; + struct pkpm_em_par_shock_ctx *app = ctx; fout[0] = app->nuElc; } void evalNuIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { - struct pkpm_gem_ctx *app = ctx; + struct pkpm_em_par_shock_ctx *app = ctx; fout[0] = app->nuIon; } @@ -183,7 +184,7 @@ create_ctx(void) double vAi = vAe/sqrt(massIon); double beta = 1.0; - double B0 = vAe*sqrt(mu0*n0*massElc) + double B0 = vAe*sqrt(mu0*n0*massElc); double T_e = beta*B0*B0/(2.0*mu0*n0); double T_i = T_e; double vtElc = sqrt(2.0*T_e/massElc); @@ -227,6 +228,7 @@ create_ctx(void) .k_final = k_final, .vtElc = vtElc, .vtIon = vtIon, + .uShock = uShock, .nuElc = nuElc, .nuIon = nuIon, .Lx = Lx, @@ -334,8 +336,8 @@ main(int argc, char **argv) .model_id = GKYL_MODEL_PKPM, .pkpm_fluid_species = "fluid_elc", .charge = ctx.chargeElc, .mass = ctx.massElc, - .lower = { -6.0 * ctx.vte}, - .upper = { 6.0 * ctx.vte}, + .lower = { -6.0 * ctx.vtElc}, + .upper = { 6.0 * ctx.vtElc}, .cells = { VX }, .ctx = &ctx, @@ -369,8 +371,8 @@ main(int argc, char **argv) .model_id = GKYL_MODEL_PKPM, .pkpm_fluid_species = "fluid_ion", .charge = ctx.chargeIon, .mass = ctx.massIon, - .lower = { -16.0 * ctx.vti}, - .upper = { 16.0 * ctx.vti}, + .lower = { -16.0 * ctx.vtIon}, + .upper = { 16.0 * ctx.vtIon}, .cells = { VX }, .ctx = &ctx, From 1c2e2b9d2646b3c55eca65a53f83273bcc4bb7b6 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Mon, 4 Sep 2023 15:05:37 -0400 Subject: [PATCH 11/19] Fixing more typos in EM parallel shock input --- regression/rt_pkpm_em_par_shock_2d_p1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regression/rt_pkpm_em_par_shock_2d_p1.c b/regression/rt_pkpm_em_par_shock_2d_p1.c index a2f27567b..69d66245a 100644 --- a/regression/rt_pkpm_em_par_shock_2d_p1.c +++ b/regression/rt_pkpm_em_par_shock_2d_p1.c @@ -70,7 +70,7 @@ void evalDistFuncElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { struct pkpm_em_par_shock_ctx *app = ctx; - double x = xn[0], v = xn[1]; + double x = xn[0], y = xn[1], v = xn[2]; double vt = app->vtElc, n0 = app->n0; fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); @@ -80,7 +80,7 @@ void evalDistFuncIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { struct pkpm_em_par_shock_ctx *app = ctx; - double x = xn[0], v = xn[1]; + double x = xn[0], y = xn[1], v = xn[2]; double vt = app->vtIon, n0 = app->n0; fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); From 1b635bfdff47175b88b33b50bdd84c774d171782 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Mon, 4 Sep 2023 15:06:47 -0400 Subject: [PATCH 12/19] Scratch that. Maxwellian had the wrong definition. Fixed now. --- regression/rt_pkpm_em_par_shock_2d_p1.c | 43 +++++++++++++++++++------ 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/regression/rt_pkpm_em_par_shock_2d_p1.c b/regression/rt_pkpm_em_par_shock_2d_p1.c index 69d66245a..04067e142 100644 --- a/regression/rt_pkpm_em_par_shock_2d_p1.c +++ b/regression/rt_pkpm_em_par_shock_2d_p1.c @@ -64,26 +64,51 @@ noise_init(double noise_amp, double noise_index, int k_init, int k_final, double noise[2] = noise_amp*noise[2]/sqrt(2.0*kdiff*kdiff/3.0); } -static inline double sq(double x) { return x*x; } +static inline double +maxwellian(double n, double v, double temp, double mass) +{ + double v2 = v*v; + return n/sqrt(2.0*M_PI*temp/mass)*exp(-v2/(2.0*temp/mass)); +} void evalDistFuncElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { struct pkpm_em_par_shock_ctx *app = ctx; - double x = xn[0], y = xn[1], v = xn[2]; - double vt = app->vtElc, n0 = app->n0; - fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); - fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); + double x = xn[0], y = xn[1], vx = xn[2]; + + double me = app->massElc; + double mi = app->massIon; + double T_e = app->T_e; + double T_i = app->T_i; + double Lx = app->Lx; + double Ly = app->Ly; + double n0 = app->n0; + + double fv = maxwellian(n0, vx, T_e, me); + + fout[0] = fv; + fout[1] = T_e/me*fv; } void evalDistFuncIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) { struct pkpm_em_par_shock_ctx *app = ctx; - double x = xn[0], y = xn[1], v = xn[2]; - double vt = app->vtIon, n0 = app->n0; - fout[0] = n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); - fout[1] = vt*vt*n0/sqrt(2.0*M_PI*sq(vt))*(exp(-sq(v)/(2*sq(vt)))); + double x = xn[0], y = xn[1], vx = xn[2]; + + double me = app->massElc; + double mi = app->massIon; + double T_e = app->T_e; + double T_i = app->T_i; + double Lx = app->Lx; + double Ly = app->Ly; + double n0 = app->n0; + + double fv = maxwellian(n0, vx, T_i, mi); + + fout[0] = fv; + fout[1] = T_i/mi*fv; } void From 17c6b027b66d097a1b95d0cb11cfe42ed0879dff Mon Sep 17 00:00:00 2001 From: Junoravin Date: Mon, 4 Sep 2023 15:21:35 -0400 Subject: [PATCH 13/19] Forgot to add the noise to Bx and By so that the noise satisfies curl(B) = J --- regression/rt_pkpm_em_par_shock_2d_p1.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/regression/rt_pkpm_em_par_shock_2d_p1.c b/regression/rt_pkpm_em_par_shock_2d_p1.c index 04067e142..31bad1c91 100644 --- a/regression/rt_pkpm_em_par_shock_2d_p1.c +++ b/regression/rt_pkpm_em_par_shock_2d_p1.c @@ -152,9 +152,19 @@ evalFieldFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fo { struct pkpm_em_par_shock_ctx *app = ctx; double x = xn[0], y = xn[1]; - + double Lx = app->Lx; + double Ly = app->Ly; + double B0 = app->B0; + double noise_amp = app->noise_amp; + double noise_index = app->noise_index; + int k_init = app->k_init; + int k_final = app->k_final; + + double noise[3] = {0.0}; + noise_init(noise_amp, noise_index, k_init, k_final, Lx, Ly, x, y, noise); + // corresponding noise to Bx and By fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; - fout[3] = 0.0; fout[4] = 0.0; fout[5] = 0.0; + fout[3] = noise[0]; fout[4] = noise[1]; fout[5] = 0.0; fout[6] = 0.0; fout[7] = 0.0; } From eb7307c5725c5c0e426d750924b481897200cd74 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Tue, 5 Sep 2023 09:56:55 -0400 Subject: [PATCH 14/19] Changing the noise function for the shock to be more like just a random collection of perturbed modes (instead of the noise function from the reconnection problem which is shaped to excite instabilities in the current layer). --- regression/rt_pkpm_em_par_shock_2d_p1.c | 37 ++++++++++--------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/regression/rt_pkpm_em_par_shock_2d_p1.c b/regression/rt_pkpm_em_par_shock_2d_p1.c index 31bad1c91..f4dea9acf 100644 --- a/regression/rt_pkpm_em_par_shock_2d_p1.c +++ b/regression/rt_pkpm_em_par_shock_2d_p1.c @@ -25,7 +25,6 @@ struct pkpm_em_par_shock_ctx { double n0; double B0; double noise_amp; - double noise_index; int k_init; int k_final; double T_e; @@ -43,25 +42,23 @@ struct pkpm_em_par_shock_ctx { }; static inline void -noise_init(double noise_amp, double noise_index, int k_init, int k_final, double Lx, double Ly, double x, double y, double noise[3]) +noise_init(double noise_amp, int k_init, int k_final, double Lx, double Ly, double x, double y, double noise[3]) { pcg64_random_t rng = gkyl_pcg64_init(0); - double kindex = (noise_index + 1.0) / 2.0; - double B_amp = 0.0; - double B_phase = 0.0; + double kx = 2.0*M_PI/Lx; + double ky = 2.0*M_PI/Ly; + double rand_amp, rand_phase_x, rand_phase_y; for (int i = k_init; i < k_final; ++i) { - B_amp = gkyl_pcg64_rand_double(&rng); - B_phase = gkyl_pcg64_rand_double(&rng); - - noise[0] -= 2.0*(2.0*M_PI/Ly)*(Lx/(i*2.0*M_PI))*B_amp*sin(2.0*M_PI*y/Ly)*(cos(2.0*M_PI*y/Ly)+1)*cos(i*2.0*M_PI*x/Lx + 2.0*M_PI*B_phase)*pow(i,kindex); - noise[1] += B_amp*(cos(2.0*M_PI*y/Ly) + 1.0)*(cos(2.0*M_PI*y/Ly) + 1.0)*sin(i*2.0*M_PI*x/Lx + 2.0*M_PI*B_phase)*pow(i,kindex); - noise[2] += (2.0*M_PI*i/Lx)*B_amp*(cos(2.0*M_PI*y/Ly) + 1.0)*(cos(2.0*M_PI*y/Ly) + 1.0)*cos(i*2.0*M_PI*x/Lx + 2*M_PI*B_phase)*pow(i,kindex) + - 2.0*(2.0*M_PI/Ly)*(2.0*M_PI/Ly)*(Lx/(i*2.0*M_PI))*B_amp*(sin(2.0*M_PI*y/Ly)*sin(2.0*M_PI*y/Ly) - cos(2.0*M_PI*y/Ly)*(cos(2.0*M_PI*y/Ly)+1.0))*cos(i*2.0*M_PI*x/Lx + 2.*M_PI*B_phase)*pow(i,kindex); + for (int j = k_init; j < k_final; ++j) { + rand_amp = gkyl_pcg64_rand_double(&rng); + rand_phase_x = gkyl_pcg64_rand_double(&rng); + rand_phase_y = gkyl_pcg64_rand_double(&rng); + noise[0] += noise_amp*rand_amp*j*ky*sin(i*kx*x + 2.0*M_PI*rand_phase_x)*cos(j*ky*y + 2.0*M_PI*rand_phase_y); + noise[1] -= noise_amp*rand_amp*i*kx*cos(i*kx*x + 2.0*M_PI*rand_phase_x)*sin(j*ky*y + 2.0*M_PI*rand_phase_y); + noise[2] += noise_amp*rand_amp*(i*i*kx*kx*sin(i*kx*x + 2.0*M_PI*rand_phase_x)*sin(j*ky*y + 2.0*M_PI*rand_phase_y) + + j*j*ky*ky*sin(i*kx*x + 2.0*M_PI*rand_phase_x)*sin(j*ky*y + 2.0*M_PI*rand_phase_y)); + } } - double kdiff = floor(k_final) - floor(k_init) + 1.0; - noise[0] = noise_amp*noise[0]/sqrt(2.0*kdiff*kdiff/3.0); - noise[1] = noise_amp*noise[1]/sqrt(2.0*kdiff*kdiff/3.0); - noise[2] = noise_amp*noise[2]/sqrt(2.0*kdiff*kdiff/3.0); } static inline double @@ -123,12 +120,11 @@ evalFluidElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fo double Ly = app->Ly; double B0 = app->B0; double noise_amp = app->noise_amp; - double noise_index = app->noise_index; int k_init = app->k_init; int k_final = app->k_final; double noise[3] = {0.0}; - noise_init(noise_amp, noise_index, k_init, k_final, Lx, Ly, x, y, noise); + noise_init(noise_amp, k_init, k_final, Lx, Ly, x, y, noise); fout[0] = -n0*mass*vdrift; fout[1] = 0.0; @@ -156,12 +152,11 @@ evalFieldFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fo double Ly = app->Ly; double B0 = app->B0; double noise_amp = app->noise_amp; - double noise_index = app->noise_index; int k_init = app->k_init; int k_final = app->k_final; double noise[3] = {0.0}; - noise_init(noise_amp, noise_index, k_init, k_final, Lx, Ly, x, y, noise); + noise_init(noise_amp, k_init, k_final, Lx, Ly, x, y, noise); // corresponding noise to Bx and By fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; fout[3] = noise[0]; fout[4] = noise[1]; fout[5] = 0.0; @@ -235,7 +230,6 @@ create_ctx(void) double noise_amp = 0.001*B0; int k_init = 1; // first wave mode to perturb with noise, 1.0 correspond to box size int k_final = 32; // last wave mode to perturb with noise - double noise_index = -1.0; // spectral index of the noise // collision frequencies double nuElc = 0.01*omegaCi; @@ -258,7 +252,6 @@ create_ctx(void) .n0 = n0, .B0 = B0, .noise_amp = noise_amp, - .noise_index = noise_index, .k_init = k_init, .k_final = k_final, .vtElc = vtElc, From 8b53ea5b054c2e80bee962b35c3e1e518939fdff Mon Sep 17 00:00:00 2001 From: Junoravin Date: Tue, 5 Sep 2023 10:43:54 -0400 Subject: [PATCH 15/19] Adding a 1D version of the parallel shock for testing. --- regression/rt_pkpm_em_par_shock_1d_p1.c | 547 ++++++++++++++++++++++++ regression/rt_pkpm_em_par_shock_2d_p1.c | 4 +- 2 files changed, 549 insertions(+), 2 deletions(-) create mode 100644 regression/rt_pkpm_em_par_shock_1d_p1.c diff --git a/regression/rt_pkpm_em_par_shock_1d_p1.c b/regression/rt_pkpm_em_par_shock_1d_p1.c new file mode 100644 index 000000000..c69f2bd62 --- /dev/null +++ b/regression/rt_pkpm_em_par_shock_1d_p1.c @@ -0,0 +1,547 @@ +#include +#include +#include +#include + +#include +#include + +#include + +#ifdef GKYL_HAVE_MPI +#include +#include +#endif + +#include + +struct pkpm_em_par_shock_ctx { + double epsilon0; + double mu0; + double chargeElc; // electron charge + double massElc; // electron mass + double chargeIon; // ion charge + double massIon; // ion mass + double n0; + double B0; + double noise_amp; + int k_init; + int k_final; + double T_e; + double T_i; + double uShock; + double vtElc; + double vtIon; + double nuElc; + double nuIon; + double Lx; + double Ly; + double tend; + double min_dt; + bool use_gpu; +}; + +static inline void +noise_init(double noise_amp, int k_init, int k_final, double Lx, double x, double noise[2]) +{ + pcg64_random_t rng = gkyl_pcg64_init(0); + double kx = 2.0*M_PI/Lx; + double rand_amp, rand_phase_x; + for (int i = k_init; i < k_final; ++i) { + for (int j = k_init; j < k_final; ++j) { + rand_amp = gkyl_pcg64_rand_double(&rng); + rand_phase_x = gkyl_pcg64_rand_double(&rng); + noise[0] -= noise_amp*rand_amp*i*kx*cos(i*kx*x + 2.0*M_PI*rand_phase_x); + noise[1] += noise_amp*rand_amp*(i*i*kx*kx*sin(i*kx*x + 2.0*M_PI*rand_phase_x)); + } + } +} + +static inline double +maxwellian(double n, double v, double temp, double mass) +{ + double v2 = v*v; + return n/sqrt(2.0*M_PI*temp/mass)*exp(-v2/(2.0*temp/mass)); +} + +void +evalDistFuncElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0], vx = xn[1]; + + double me = app->massElc; + double mi = app->massIon; + double T_e = app->T_e; + double T_i = app->T_i; + double Lx = app->Lx; + double n0 = app->n0; + + double fv = maxwellian(n0, vx, T_e, me); + + fout[0] = fv; + fout[1] = T_e/me*fv; +} + +void +evalDistFuncIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0], vx = xn[1]; + + double me = app->massElc; + double mi = app->massIon; + double T_e = app->T_e; + double T_i = app->T_i; + double Lx = app->Lx; + double n0 = app->n0; + + double fv = maxwellian(n0, vx, T_i, mi); + + fout[0] = fv; + fout[1] = T_i/mi*fv; +} + +void +evalFluidElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0]; + double vdrift = app->uShock, n0 = app->n0; + double mass = app->massElc; + double charge = app->chargeElc; + double Lx = app->Lx; + double B0 = app->B0; + double noise_amp = app->noise_amp; + int k_init = app->k_init; + int k_final = app->k_final; + + double noise[2] = {0.0}; + noise_init(noise_amp, k_init, k_final, Lx, x, noise); + + fout[0] = -n0*mass*vdrift; + fout[1] = 0.0; + fout[2] = mass*noise[1]/charge; // initial noise in Jz_elc to excite instabilities +} + +void +evalFluidIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0]; + double vdrift = app->uShock, n0 = app->n0; + double mass = app->massIon; + fout[0] = -n0*mass*vdrift; + fout[1] = 0.0; + fout[2] = 0.0; +} + +void +evalFieldFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0]; + double Lx = app->Lx; + double B0 = app->B0; + double noise_amp = app->noise_amp; + int k_init = app->k_init; + int k_final = app->k_final; + + double noise[2] = {0.0}; + noise_init(noise_amp, k_init, k_final, Lx, x, noise); + // corresponding noise to By + fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; + fout[3] = 0.0; fout[4] = noise[0]; fout[5] = 0.0; + fout[6] = 0.0; fout[7] = 0.0; +} + + +void +evalExtEmFunc(double t, const double* GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + double x = xn[0]; + double B_x = app->B0; + + fout[0] = 0.0; fout[1] = 0.0, fout[2] = 0.0; + fout[3] = B_x; fout[4] = 0.0; fout[5] = 0.0; +} + +void +evalNuElc(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + fout[0] = app->nuElc; +} + +void +evalNuIon(double t, const double * GKYL_RESTRICT xn, double* GKYL_RESTRICT fout, void *ctx) +{ + struct pkpm_em_par_shock_ctx *app = ctx; + fout[0] = app->nuIon; +} + +void +write_data(struct gkyl_tm_trigger *iot, gkyl_vlasov_app *app, double tcurr) +{ + if (gkyl_tm_trigger_check_and_bump(iot, tcurr)) { + gkyl_vlasov_app_write(app, tcurr, iot->curr-1); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, iot->curr-1); + } +} + +struct pkpm_em_par_shock_ctx +create_ctx(void) +{ + double epsilon0 = 1.0; // permittivity of free space + double mu0 = 1.0; // pemiability of free space + + double massElc = 1.0; // electron mass + double chargeElc = -1.0; // electron charge + double massIon = 1836.153; // ion mass + double chargeIon = 1.0; // ion charge + + double n0 = 1.0; // initial number density + double vAe = 1.0/5.0; + double vAi = vAe/sqrt(massIon); + double beta = 1.0; + + double B0 = vAe*sqrt(mu0*n0*massElc); + double T_e = beta*B0*B0/(2.0*mu0*n0); + double T_i = T_e; + double vtElc = sqrt(2.0*T_e/massElc); + double vtIon = sqrt(2.0*T_i/massIon); + double uShock = 2.0*vAi; + + // ion cyclotron frequency and gyroradius + double omegaCi = chargeIon*B0/massIon; + double di = vAi/omegaCi; + double rhoi = vtIon/omegaCi; // rhoi ~ 484 lambdaD at real mass ratio and vtElc/c = 1/8 + + // noise levels for perturbation + double noise_amp = 0.001*B0; + int k_init = 1; // first wave mode to perturb with noise, 1.0 correspond to box size + int k_final = 32; // last wave mode to perturb with noise + + // collision frequencies + double nuElc = 0.01*omegaCi; + double nuIon = 0.01*omegaCi/sqrt(massIon); + + // domain size and simulation time + double Lx = 2.0*M_PI*rhoi; + double tend = 10.0/omegaCi; + + struct pkpm_em_par_shock_ctx ctx = { + .epsilon0 = epsilon0, + .mu0 = mu0, + .chargeElc = chargeElc, + .massElc = massElc, + .chargeIon = chargeIon, + .massIon = massIon, + .T_e = T_e, + .T_i = T_i, + .n0 = n0, + .B0 = B0, + .noise_amp = noise_amp, + .k_init = k_init, + .k_final = k_final, + .vtElc = vtElc, + .vtIon = vtIon, + .uShock = uShock, + .nuElc = nuElc, + .nuIon = nuIon, + .Lx = Lx, + .tend = tend, + .min_dt = 1.0e-2, + }; + return ctx; +} + +int +main(int argc, char **argv) +{ + struct gkyl_app_args app_args = parse_app_args(argc, argv); + +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) + MPI_Init(&argc, &argv); +#endif + + int NX = APP_ARGS_CHOOSE(app_args.xcells[0], 128); + int VX = APP_ARGS_CHOOSE(app_args.vcells[0], 32); + + if (app_args.trace_mem) { + gkyl_cu_dev_mem_debug_set(true); + gkyl_mem_debug_set(true); + } + + struct pkpm_em_par_shock_ctx ctx = create_ctx(); // context for init functions + + int nrank = 1; // number of processors in simulation +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) + MPI_Comm_size(MPI_COMM_WORLD, &nrank); +#endif + + // create global range + int cells[] = { NX }; + struct gkyl_range globalr; + gkyl_create_global_range(1, cells, &globalr); + + // create decomposition + int cuts[] = { 1 }; +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) { + cuts[0] = app_args.cuts[0]; + } +#endif + + struct gkyl_rect_decomp *decomp = + gkyl_rect_decomp_new_from_cuts(1, cuts, &globalr); + + // construct communcator for use in app + struct gkyl_comm *comm; +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) { + comm = gkyl_mpi_comm_new( &(struct gkyl_mpi_comm_inp) { + .mpi_comm = MPI_COMM_WORLD, + .decomp = decomp + } + ); + } + else + comm = gkyl_null_comm_inew( &(struct gkyl_null_comm_inp) { + .decomp = decomp, + .use_gpu = app_args.use_gpu + } + ); +#else + comm = gkyl_null_comm_inew( &(struct gkyl_null_comm_inp) { + .decomp = decomp, + .use_gpu = app_args.use_gpu + } + ); +#endif + + int my_rank; + gkyl_comm_get_rank(comm, &my_rank); + int comm_sz; + gkyl_comm_get_size(comm, &comm_sz); + + int ncuts = cuts[0]; + if (ncuts != comm_sz) { + if (my_rank == 0) + fprintf(stderr, "*** Number of ranks, %d, do not match total cuts, %d!\n", comm_sz, ncuts); + goto mpifinalize; + } + + // electron momentum + struct gkyl_vlasov_fluid_species fluid_elc = { + .name = "fluid_elc", + .num_eqn = 3, + .pkpm_species = "elc", + .ctx = &ctx, + .init = evalFluidElc, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + .diffusion = {.D = 1.0e-5, .order=4}, + }; + + // electrons + struct gkyl_vlasov_species elc = { + .name = "elc", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_elc", + .charge = ctx.chargeElc, .mass = ctx.massElc, + .lower = { -4.0 * ctx.vtElc}, + .upper = { 4.0 * ctx.vtElc}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncElc, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuElc, + }, + + .num_diag_moments = 0, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + }; + + // ion momentum + struct gkyl_vlasov_fluid_species fluid_ion = { + .name = "fluid_ion", + .num_eqn = 3, + .pkpm_species = "ion", + .ctx = &ctx, + .init = evalFluidIon, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + .diffusion = {.D = 1.0e-5, .order=4}, + }; + + // ions + struct gkyl_vlasov_species ion = { + .name = "ion", + .model_id = GKYL_MODEL_PKPM, + .pkpm_fluid_species = "fluid_ion", + .charge = ctx.chargeIon, .mass = ctx.massIon, + .lower = { -16.0 * ctx.vtIon}, + .upper = { 16.0 * ctx.vtIon}, + .cells = { VX }, + + .ctx = &ctx, + .init = evalDistFuncIon, + + .collisions = { + .collision_id = GKYL_LBO_COLLISIONS, + + .ctx = &ctx, + .self_nu = evalNuIon, + }, + + .num_diag_moments = 0, + .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, + }; + + // field + struct gkyl_vlasov_field field = { + .epsilon0 = 1.0, .mu0 = 1.0, + .elcErrorSpeedFactor = 0.0, + .mgnErrorSpeedFactor = 0.0, + + .ctx = &ctx, + .init = evalFieldFunc, + // Plasma EM field BCs are PEC on left and copy on right, external field goes into wall + .bcx = { GKYL_FIELD_PEC_WALL, GKYL_FIELD_COPY }, + .ext_em = evalExtEmFunc, + .ext_em_ctx = &ctx, + }; + + // VM app + struct gkyl_vm vm = { + .name = "pkpm_em_par_shock_1d_p1", + + .cdim = 1, .vdim = 1, + .lower = { 0.0 }, + .upper = { ctx.Lx }, + .cells = { NX }, + .poly_order = 1, + .basis_type = app_args.basis_type, + + .num_periodic_dir = 0, + .periodic_dirs = { }, + + .num_species = 2, + .species = { elc, ion }, + .num_fluid_species = 2, + .fluid_species = { fluid_elc, fluid_ion }, + .field = field, + + .use_gpu = app_args.use_gpu, + + .has_low_inp = true, + .low_inp = { + .local_range = decomp->ranges[my_rank], + .comm = comm + } + }; + + // create app object + gkyl_vlasov_app *app = gkyl_vlasov_app_new(&vm); + + // start, end and initial time-step + double tcurr = 0.0, tend = ctx.tend; + double dt = tend-tcurr; + int nframe = 100; + // create trigger for IO + struct gkyl_tm_trigger io_trig = { .dt = tend/nframe }; + + // initialize simulation + gkyl_vlasov_app_apply_ic(app, tcurr); + write_data(&io_trig, app, tcurr); + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + + long step = 1, num_steps = app_args.num_steps; + while ((tcurr < tend) && (step <= num_steps)) { + gkyl_vlasov_app_cout(app, stdout, "Taking time-step at t = %g ...", tcurr); + struct gkyl_update_status status = gkyl_vlasov_update(app, dt); + gkyl_vlasov_app_cout(app, stdout, " dt = %g\n", status.dt_actual); + if (step % 100 == 0) { + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + } + if (!status.success) { + gkyl_vlasov_app_cout(app, stdout, "** Update method failed! Aborting simulation ....\n"); + break; + } + if (status.dt_actual < ctx.min_dt) { + gkyl_vlasov_app_cout(app, stdout, "** Time step crashing! Aborting simulation and writing out last output ....\n"); + gkyl_vlasov_app_write(app, tcurr, 1000); + gkyl_vlasov_app_calc_mom(app); gkyl_vlasov_app_write_mom(app, tcurr, 1000); + break; + } + tcurr += status.dt_actual; + dt = status.dt_suggested; + + write_data(&io_trig, app, tcurr); + + step += 1; + } + gkyl_vlasov_app_calc_field_energy(app, tcurr); + gkyl_vlasov_app_calc_integrated_L2_f(app, tcurr); + gkyl_vlasov_app_calc_integrated_mom(app, tcurr); + gkyl_vlasov_app_write_field_energy(app); + gkyl_vlasov_app_write_integrated_L2_f(app); + gkyl_vlasov_app_write_integrated_mom(app); + gkyl_vlasov_app_stat_write(app); + + // fetch simulation statistics + struct gkyl_vlasov_stat stat = gkyl_vlasov_app_stat(app); + + gkyl_vlasov_app_cout(app, stdout, "\n"); + gkyl_vlasov_app_cout(app, stdout, "Number of update calls %ld\n", stat.nup); + gkyl_vlasov_app_cout(app, stdout, "Number of forward-Euler calls %ld\n", stat.nfeuler); + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-2 failures %ld\n", stat.nstage_2_fail); + if (stat.nstage_2_fail > 0) { + gkyl_vlasov_app_cout(app, stdout, "Max rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[1]); + gkyl_vlasov_app_cout(app, stdout, "Min rel dt diff for RK stage-2 failures %g\n", stat.stage_2_dt_diff[0]); + } + gkyl_vlasov_app_cout(app, stdout, "Number of RK stage-3 failures %ld\n", stat.nstage_3_fail); + gkyl_vlasov_app_cout(app, stdout, "Species RHS calc took %g secs\n", stat.species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisions RHS calc took %g secs\n", stat.species_coll_tm); + gkyl_vlasov_app_cout(app, stdout, "Fluid Species RHS calc took %g secs\n", stat.fluid_species_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Field RHS calc took %g secs\n", stat.field_rhs_tm); + gkyl_vlasov_app_cout(app, stdout, "Species PKPM Vars took %g secs\n", stat.species_pkpm_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Species collisional moments took %g secs\n", stat.species_coll_mom_tm); + gkyl_vlasov_app_cout(app, stdout, "EM Variables (bvar) calculation took %g secs\n", stat.field_em_vars_tm); + gkyl_vlasov_app_cout(app, stdout, "Current evaluation and accumulate took %g secs\n", stat.current_tm); + + gkyl_vlasov_app_cout(app, stdout, "Species BCs took %g secs\n", stat.species_bc_tm); + gkyl_vlasov_app_cout(app, stdout, "Fluid Species BCs took %g secs\n", stat.fluid_species_bc_tm); + gkyl_vlasov_app_cout(app, stdout, "Field BCs took %g secs\n", stat.field_bc_tm); + + gkyl_vlasov_app_cout(app, stdout, "Updates took %g secs\n", stat.total_tm); + + gkyl_vlasov_app_cout(app, stdout, "Number of write calls %ld,\n", stat.nio); + gkyl_vlasov_app_cout(app, stdout, "IO time took %g secs \n", stat.io_tm); + + gkyl_rect_decomp_release(decomp); + gkyl_comm_release(comm); + + // simulation complete, free app + gkyl_vlasov_app_release(app); + + mpifinalize: + ; +#ifdef GKYL_HAVE_MPI + if (app_args.use_mpi) + MPI_Finalize(); +#endif + + return 0; +} diff --git a/regression/rt_pkpm_em_par_shock_2d_p1.c b/regression/rt_pkpm_em_par_shock_2d_p1.c index f4dea9acf..7204a8ea5 100644 --- a/regression/rt_pkpm_em_par_shock_2d_p1.c +++ b/regression/rt_pkpm_em_par_shock_2d_p1.c @@ -219,7 +219,7 @@ create_ctx(void) double T_i = T_e; double vtElc = sqrt(2.0*T_e/massElc); double vtIon = sqrt(2.0*T_i/massIon); - double uShock = 2.5*vAi; + double uShock = 2.0*vAi; // ion cyclotron frequency and gyroradius double omegaCi = chargeIon*B0/massIon; @@ -236,7 +236,7 @@ create_ctx(void) double nuIon = 0.01*omegaCi/sqrt(massIon); // domain size and simulation time - double Lx = 8.0*M_PI*rhoi; + double Lx = 2.0*M_PI*rhoi; double Ly = 2.0*M_PI*rhoi; double tend = 10.0/omegaCi; From e7c2e4f7af91b464bf591b4eb27bf16b0216629f Mon Sep 17 00:00:00 2001 From: Junoravin Date: Tue, 5 Sep 2023 14:21:39 -0400 Subject: [PATCH 16/19] Fixing noise function to not do a double loop and heavily reducing the initial noise amplitude to minimize transients. --- regression/rt_pkpm_em_par_shock_1d_p1.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/regression/rt_pkpm_em_par_shock_1d_p1.c b/regression/rt_pkpm_em_par_shock_1d_p1.c index c69f2bd62..7ab44490e 100644 --- a/regression/rt_pkpm_em_par_shock_1d_p1.c +++ b/regression/rt_pkpm_em_par_shock_1d_p1.c @@ -48,12 +48,10 @@ noise_init(double noise_amp, int k_init, int k_final, double Lx, double x, doub double kx = 2.0*M_PI/Lx; double rand_amp, rand_phase_x; for (int i = k_init; i < k_final; ++i) { - for (int j = k_init; j < k_final; ++j) { - rand_amp = gkyl_pcg64_rand_double(&rng); - rand_phase_x = gkyl_pcg64_rand_double(&rng); - noise[0] -= noise_amp*rand_amp*i*kx*cos(i*kx*x + 2.0*M_PI*rand_phase_x); - noise[1] += noise_amp*rand_amp*(i*i*kx*kx*sin(i*kx*x + 2.0*M_PI*rand_phase_x)); - } + rand_amp = gkyl_pcg64_rand_double(&rng); + rand_phase_x = gkyl_pcg64_rand_double(&rng); + noise[0] -= noise_amp*rand_amp*i*kx*cos(i*kx*x + 2.0*M_PI*rand_phase_x); + noise[1] += noise_amp*rand_amp*(i*i*kx*kx*sin(i*kx*x + 2.0*M_PI*rand_phase_x)); } } @@ -219,7 +217,7 @@ create_ctx(void) double rhoi = vtIon/omegaCi; // rhoi ~ 484 lambdaD at real mass ratio and vtElc/c = 1/8 // noise levels for perturbation - double noise_amp = 0.001*B0; + double noise_amp = 1.0e-12; int k_init = 1; // first wave mode to perturb with noise, 1.0 correspond to box size int k_final = 32; // last wave mode to perturb with noise @@ -228,7 +226,7 @@ create_ctx(void) double nuIon = 0.01*omegaCi/sqrt(massIon); // domain size and simulation time - double Lx = 2.0*M_PI*rhoi; + double Lx = 4.0*M_PI*rhoi; double tend = 10.0/omegaCi; struct pkpm_em_par_shock_ctx ctx = { @@ -343,7 +341,7 @@ main(int argc, char **argv) .ctx = &ctx, .init = evalFluidElc, .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, - .diffusion = {.D = 1.0e-5, .order=4}, + //.diffusion = {.D = 1.0e-5, .order=4}, }; // electrons @@ -378,7 +376,7 @@ main(int argc, char **argv) .ctx = &ctx, .init = evalFluidIon, .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, - .diffusion = {.D = 1.0e-5, .order=4}, + //.diffusion = {.D = 1.0e-5, .order=4}, }; // ions @@ -454,7 +452,7 @@ main(int argc, char **argv) // start, end and initial time-step double tcurr = 0.0, tend = ctx.tend; double dt = tend-tcurr; - int nframe = 100; + int nframe = 1000; // create trigger for IO struct gkyl_tm_trigger io_trig = { .dt = tend/nframe }; From 51c872961da9b7d70ae29b1628b9b680e7850115 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Fri, 8 Sep 2023 17:23:17 -0400 Subject: [PATCH 17/19] Adding another moment in the diagnostics for sanity. The integral(vpar F_0) should be 0 for all time though it may not be identically so for other numerical reasons (even though we have constructed the scheme to attempt to make this term small). EM parallel shock does show this term being small (1e-8 to 1e-10) so that's good! --- kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c | 26 ++-- kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c | 39 +++--- kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c | 39 +++--- kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c | 52 ++++---- kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c | 117 ++++++++++-------- kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c | 104 +++++++++------- regression/rt_pkpm_em_par_shock_1d_p1.c | 12 +- zero/mom_vlasov_pkpm.c | 2 +- zero/mom_vlasov_pkpm_cu.cu | 2 +- 9 files changed, 211 insertions(+), 182 deletions(-) diff --git a/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c b/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c index b4cecaa43..98347da3c 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c +++ b/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c @@ -26,16 +26,18 @@ GKYL_CU_DH void mom_vlasov_pkpm_diag_1x1v_ser_p1(const double *w, const double * const double *G_1 = &f[6]; out[0] += 1.414213562373095*F_0[0]*mass*volFact; out[1] += 1.414213562373095*F_0[1]*mass*volFact; - out[2] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[2]*dvpar*wvpar+0.105409255338946*F_0[4]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); - out[3] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[5]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); - out[4] += 1.414213562373095*G_1[0]*mass*volFact; - out[5] += 1.414213562373095*G_1[1]*mass*volFact; - out[6] += mass*volFact*(1.224744871391589*F_0[2]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[4]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[2]*dvpar_cu); - out[7] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[5]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); - out[8] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[2]*dvpar); - out[9] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[3]*dvpar); - out[10] += mass*volFact*(0.6324555320336759*F_0[4]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[2]*dvpar*wvpar_cu+0.2449489742783178*F_0[2]*dvpar_cu*wvpar+0.02258769757263127*F_0[4]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); - out[11] += mass*volFact*(0.632455532033676*F_0[5]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263128*F_0[5]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); - out[12] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[2]*dvpar*wvpar+0.105409255338946*G_1[4]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); - out[13] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[5]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); + out[2] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[2]*dvpar); + out[3] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[3]*dvpar); + out[4] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[2]*dvpar*wvpar+0.105409255338946*F_0[4]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); + out[5] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[5]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); + out[6] += 1.414213562373095*G_1[0]*mass*volFact; + out[7] += 1.414213562373095*G_1[1]*mass*volFact; + out[8] += mass*volFact*(1.224744871391589*F_0[2]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[4]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[2]*dvpar_cu); + out[9] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[5]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); + out[10] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[2]*dvpar); + out[11] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[3]*dvpar); + out[12] += mass*volFact*(0.6324555320336759*F_0[4]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[2]*dvpar*wvpar_cu+0.2449489742783178*F_0[2]*dvpar_cu*wvpar+0.02258769757263127*F_0[4]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); + out[13] += mass*volFact*(0.632455532033676*F_0[5]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263128*F_0[5]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); + out[14] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[2]*dvpar*wvpar+0.105409255338946*G_1[4]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); + out[15] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[5]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); } diff --git a/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c b/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c index ec19bacf0..4c6e5a5a6 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c +++ b/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c @@ -30,22 +30,25 @@ GKYL_CU_DH void mom_vlasov_pkpm_diag_1x1v_ser_p2(const double *w, const double * out[0] += 1.414213562373095*F_0[0]*mass*volFact; out[1] += 1.414213562373095*F_0[1]*mass*volFact; out[2] += 1.414213562373095*F_0[4]*mass*volFact; - out[3] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[2]*dvpar*wvpar+0.105409255338946*F_0[5]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); - out[4] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[7]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); - out[5] += mass*volFact*(1.414213562373095*F_0[4]*wvpar_sq+0.816496580927726*F_0[6]*dvpar*wvpar+0.1178511301977579*F_0[4]*dvpar_sq); - out[6] += 1.414213562373095*G_1[0]*mass*volFact; - out[7] += 1.414213562373095*G_1[1]*mass*volFact; - out[8] += 1.414213562373095*G_1[4]*mass*volFact; - out[9] += mass*volFact*(1.224744871391589*F_0[2]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[5]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[2]*dvpar_cu); - out[10] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[7]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); - out[11] += mass*volFact*(1.224744871391589*F_0[6]*dvpar*wvpar_sq+1.414213562373095*F_0[4]*wvpar_cu+0.3535533905932737*F_0[4]*dvpar_sq*wvpar+0.06123724356957942*F_0[6]*dvpar_cu); - out[12] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[2]*dvpar); - out[13] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[3]*dvpar); - out[14] += mass*volFact*(1.414213562373095*G_1[4]*wvpar+0.408248290463863*G_1[6]*dvpar); - out[15] += mass*volFact*(0.6324555320336759*F_0[5]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[2]*dvpar*wvpar_cu+0.2449489742783178*F_0[2]*dvpar_cu*wvpar+0.02258769757263127*F_0[5]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); - out[16] += mass*volFact*(0.632455532033676*F_0[7]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263128*F_0[7]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); - out[17] += mass*volFact*(0.7071067811865475*F_0[4]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[4]*wvpar_qu+1.632993161855453*F_0[6]*dvpar*wvpar_cu+0.2449489742783177*F_0[6]*dvpar_cu*wvpar+0.01767766952966368*F_0[4]*dvpar_qu); - out[18] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[2]*dvpar*wvpar+0.105409255338946*G_1[5]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); - out[19] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[7]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); - out[20] += mass*volFact*(1.414213562373095*G_1[4]*wvpar_sq+0.816496580927726*G_1[6]*dvpar*wvpar+0.1178511301977579*G_1[4]*dvpar_sq); + out[3] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[2]*dvpar); + out[4] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[3]*dvpar); + out[5] += mass*volFact*(1.414213562373095*F_0[4]*wvpar+0.408248290463863*F_0[6]*dvpar); + out[6] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[2]*dvpar*wvpar+0.105409255338946*F_0[5]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); + out[7] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[7]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); + out[8] += mass*volFact*(1.414213562373095*F_0[4]*wvpar_sq+0.816496580927726*F_0[6]*dvpar*wvpar+0.1178511301977579*F_0[4]*dvpar_sq); + out[9] += 1.414213562373095*G_1[0]*mass*volFact; + out[10] += 1.414213562373095*G_1[1]*mass*volFact; + out[11] += 1.414213562373095*G_1[4]*mass*volFact; + out[12] += mass*volFact*(1.224744871391589*F_0[2]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[5]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[2]*dvpar_cu); + out[13] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[7]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); + out[14] += mass*volFact*(1.224744871391589*F_0[6]*dvpar*wvpar_sq+1.414213562373095*F_0[4]*wvpar_cu+0.3535533905932737*F_0[4]*dvpar_sq*wvpar+0.06123724356957942*F_0[6]*dvpar_cu); + out[15] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[2]*dvpar); + out[16] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[3]*dvpar); + out[17] += mass*volFact*(1.414213562373095*G_1[4]*wvpar+0.408248290463863*G_1[6]*dvpar); + out[18] += mass*volFact*(0.6324555320336759*F_0[5]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[2]*dvpar*wvpar_cu+0.2449489742783178*F_0[2]*dvpar_cu*wvpar+0.02258769757263127*F_0[5]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); + out[19] += mass*volFact*(0.632455532033676*F_0[7]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263128*F_0[7]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); + out[20] += mass*volFact*(0.7071067811865475*F_0[4]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[4]*wvpar_qu+1.632993161855453*F_0[6]*dvpar*wvpar_cu+0.2449489742783177*F_0[6]*dvpar_cu*wvpar+0.01767766952966368*F_0[4]*dvpar_qu); + out[21] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[2]*dvpar*wvpar+0.105409255338946*G_1[5]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); + out[22] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[7]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); + out[23] += mass*volFact*(1.414213562373095*G_1[4]*wvpar_sq+0.816496580927726*G_1[6]*dvpar*wvpar+0.1178511301977579*G_1[4]*dvpar_sq); } diff --git a/kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c b/kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c index 48aa1248b..cb633c929 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c +++ b/kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c @@ -30,22 +30,25 @@ GKYL_CU_DH void mom_vlasov_pkpm_diag_1x1v_tensor_p2(const double *w, const doubl out[0] += 1.414213562373095*F_0[0]*mass*volFact; out[1] += 1.414213562373095*F_0[1]*mass*volFact; out[2] += 1.414213562373095*F_0[4]*mass*volFact; - out[3] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[2]*dvpar*wvpar+0.105409255338946*F_0[5]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); - out[4] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[7]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); - out[5] += mass*volFact*(1.414213562373095*F_0[4]*wvpar_sq+0.816496580927726*F_0[6]*dvpar*wvpar+0.105409255338946*F_0[8]*dvpar_sq+0.1178511301977579*F_0[4]*dvpar_sq); - out[6] += 1.414213562373095*G_1[0]*mass*volFact; - out[7] += 1.414213562373095*G_1[1]*mass*volFact; - out[8] += 1.414213562373095*G_1[4]*mass*volFact; - out[9] += mass*volFact*(1.224744871391589*F_0[2]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[5]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[2]*dvpar_cu); - out[10] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[7]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); - out[11] += mass*volFact*(1.224744871391589*F_0[6]*dvpar*wvpar_sq+1.414213562373095*F_0[4]*wvpar_cu+0.3162277660168379*F_0[8]*dvpar_sq*wvpar+0.3535533905932737*F_0[4]*dvpar_sq*wvpar+0.06123724356957942*F_0[6]*dvpar_cu); - out[12] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[2]*dvpar); - out[13] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[3]*dvpar); - out[14] += mass*volFact*(1.414213562373095*G_1[4]*wvpar+0.408248290463863*G_1[6]*dvpar); - out[15] += mass*volFact*(0.6324555320336759*F_0[5]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[2]*dvpar*wvpar_cu+0.2449489742783178*F_0[2]*dvpar_cu*wvpar+0.02258769757263127*F_0[5]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); - out[16] += mass*volFact*(0.632455532033676*F_0[7]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263128*F_0[7]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); - out[17] += mass*volFact*(0.6324555320336759*F_0[8]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[4]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[4]*wvpar_qu+1.632993161855453*F_0[6]*dvpar*wvpar_cu+0.2449489742783177*F_0[6]*dvpar_cu*wvpar+0.02258769757263127*F_0[8]*dvpar_qu+0.01767766952966368*F_0[4]*dvpar_qu); - out[18] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[2]*dvpar*wvpar+0.105409255338946*G_1[5]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); - out[19] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[7]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); - out[20] += mass*volFact*(1.414213562373095*G_1[4]*wvpar_sq+0.816496580927726*G_1[6]*dvpar*wvpar+0.105409255338946*G_1[8]*dvpar_sq+0.1178511301977579*G_1[4]*dvpar_sq); + out[3] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[2]*dvpar); + out[4] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[3]*dvpar); + out[5] += mass*volFact*(1.414213562373095*F_0[4]*wvpar+0.408248290463863*F_0[6]*dvpar); + out[6] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[2]*dvpar*wvpar+0.105409255338946*F_0[5]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); + out[7] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[7]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); + out[8] += mass*volFact*(1.414213562373095*F_0[4]*wvpar_sq+0.816496580927726*F_0[6]*dvpar*wvpar+0.105409255338946*F_0[8]*dvpar_sq+0.1178511301977579*F_0[4]*dvpar_sq); + out[9] += 1.414213562373095*G_1[0]*mass*volFact; + out[10] += 1.414213562373095*G_1[1]*mass*volFact; + out[11] += 1.414213562373095*G_1[4]*mass*volFact; + out[12] += mass*volFact*(1.224744871391589*F_0[2]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[5]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[2]*dvpar_cu); + out[13] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[7]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); + out[14] += mass*volFact*(1.224744871391589*F_0[6]*dvpar*wvpar_sq+1.414213562373095*F_0[4]*wvpar_cu+0.3162277660168379*F_0[8]*dvpar_sq*wvpar+0.3535533905932737*F_0[4]*dvpar_sq*wvpar+0.06123724356957942*F_0[6]*dvpar_cu); + out[15] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[2]*dvpar); + out[16] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[3]*dvpar); + out[17] += mass*volFact*(1.414213562373095*G_1[4]*wvpar+0.408248290463863*G_1[6]*dvpar); + out[18] += mass*volFact*(0.6324555320336759*F_0[5]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[2]*dvpar*wvpar_cu+0.2449489742783178*F_0[2]*dvpar_cu*wvpar+0.02258769757263127*F_0[5]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); + out[19] += mass*volFact*(0.632455532033676*F_0[7]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263128*F_0[7]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); + out[20] += mass*volFact*(0.6324555320336759*F_0[8]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[4]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[4]*wvpar_qu+1.632993161855453*F_0[6]*dvpar*wvpar_cu+0.2449489742783177*F_0[6]*dvpar_cu*wvpar+0.02258769757263127*F_0[8]*dvpar_qu+0.01767766952966368*F_0[4]*dvpar_qu); + out[21] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[2]*dvpar*wvpar+0.105409255338946*G_1[5]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); + out[22] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[7]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); + out[23] += mass*volFact*(1.414213562373095*G_1[4]*wvpar_sq+0.816496580927726*G_1[6]*dvpar*wvpar+0.105409255338946*G_1[8]*dvpar_sq+0.1178511301977579*G_1[4]*dvpar_sq); } diff --git a/kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c b/kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c index 1fcac7cdc..76dda887d 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c +++ b/kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c @@ -34,28 +34,32 @@ GKYL_CU_DH void mom_vlasov_pkpm_diag_2x1v_ser_p1(const double *w, const double * out[1] += 1.414213562373095*F_0[1]*mass*volFact; out[2] += 1.414213562373095*F_0[2]*mass*volFact; out[3] += 1.414213562373095*F_0[4]*mass*volFact; - out[4] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[8]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); - out[5] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[5]*dvpar*wvpar+0.105409255338946*F_0[9]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); - out[6] += mass*volFact*(1.414213562373095*F_0[2]*wvpar_sq+0.8164965809277261*F_0[6]*dvpar*wvpar+0.105409255338946*F_0[10]*dvpar_sq+0.1178511301977579*F_0[2]*dvpar_sq); - out[7] += mass*volFact*(1.414213562373095*F_0[4]*wvpar_sq+0.8164965809277261*F_0[7]*dvpar*wvpar+0.105409255338946*F_0[11]*dvpar_sq+0.1178511301977579*F_0[4]*dvpar_sq); - out[8] += 1.414213562373095*G_1[0]*mass*volFact; - out[9] += 1.414213562373095*G_1[1]*mass*volFact; - out[10] += 1.414213562373095*G_1[2]*mass*volFact; - out[11] += 1.414213562373095*G_1[4]*mass*volFact; - out[12] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[8]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); - out[13] += mass*volFact*(1.224744871391589*F_0[5]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[9]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[5]*dvpar_cu); - out[14] += mass*volFact*(1.224744871391589*F_0[6]*dvpar*wvpar_sq+1.414213562373095*F_0[2]*wvpar_cu+0.3162277660168379*F_0[10]*dvpar_sq*wvpar+0.3535533905932737*F_0[2]*dvpar_sq*wvpar+0.06123724356957942*F_0[6]*dvpar_cu); - out[15] += mass*volFact*(1.224744871391589*F_0[7]*dvpar*wvpar_sq+1.414213562373095*F_0[4]*wvpar_cu+0.3162277660168379*F_0[11]*dvpar_sq*wvpar+0.3535533905932737*F_0[4]*dvpar_sq*wvpar+0.06123724356957942*F_0[7]*dvpar_cu); - out[16] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[3]*dvpar); - out[17] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[5]*dvpar); - out[18] += mass*volFact*(1.414213562373095*G_1[2]*wvpar+0.408248290463863*G_1[6]*dvpar); - out[19] += mass*volFact*(1.414213562373095*G_1[4]*wvpar+0.408248290463863*G_1[7]*dvpar); - out[20] += mass*volFact*(0.6324555320336759*F_0[8]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263127*F_0[8]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); - out[21] += mass*volFact*(0.632455532033676*F_0[9]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[5]*dvpar*wvpar_cu+0.2449489742783178*F_0[5]*dvpar_cu*wvpar+0.02258769757263128*F_0[9]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); - out[22] += mass*volFact*(0.632455532033676*F_0[10]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[2]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[2]*wvpar_qu+1.632993161855453*F_0[6]*dvpar*wvpar_cu+0.2449489742783178*F_0[6]*dvpar_cu*wvpar+0.02258769757263128*F_0[10]*dvpar_qu+0.01767766952966368*F_0[2]*dvpar_qu); - out[23] += mass*volFact*(0.6324555320336759*F_0[11]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[4]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[4]*wvpar_qu+1.632993161855453*F_0[7]*dvpar*wvpar_cu+0.2449489742783178*F_0[7]*dvpar_cu*wvpar+0.02258769757263127*F_0[11]*dvpar_qu+0.01767766952966368*F_0[4]*dvpar_qu); - out[24] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[8]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); - out[25] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[5]*dvpar*wvpar+0.105409255338946*G_1[9]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); - out[26] += mass*volFact*(1.414213562373095*G_1[2]*wvpar_sq+0.8164965809277261*G_1[6]*dvpar*wvpar+0.105409255338946*G_1[10]*dvpar_sq+0.1178511301977579*G_1[2]*dvpar_sq); - out[27] += mass*volFact*(1.414213562373095*G_1[4]*wvpar_sq+0.8164965809277261*G_1[7]*dvpar*wvpar+0.105409255338946*G_1[11]*dvpar_sq+0.1178511301977579*G_1[4]*dvpar_sq); + out[4] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[3]*dvpar); + out[5] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[5]*dvpar); + out[6] += mass*volFact*(1.414213562373095*F_0[2]*wvpar+0.408248290463863*F_0[6]*dvpar); + out[7] += mass*volFact*(1.414213562373095*F_0[4]*wvpar+0.408248290463863*F_0[7]*dvpar); + out[8] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[8]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); + out[9] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[5]*dvpar*wvpar+0.105409255338946*F_0[9]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); + out[10] += mass*volFact*(1.414213562373095*F_0[2]*wvpar_sq+0.8164965809277261*F_0[6]*dvpar*wvpar+0.105409255338946*F_0[10]*dvpar_sq+0.1178511301977579*F_0[2]*dvpar_sq); + out[11] += mass*volFact*(1.414213562373095*F_0[4]*wvpar_sq+0.8164965809277261*F_0[7]*dvpar*wvpar+0.105409255338946*F_0[11]*dvpar_sq+0.1178511301977579*F_0[4]*dvpar_sq); + out[12] += 1.414213562373095*G_1[0]*mass*volFact; + out[13] += 1.414213562373095*G_1[1]*mass*volFact; + out[14] += 1.414213562373095*G_1[2]*mass*volFact; + out[15] += 1.414213562373095*G_1[4]*mass*volFact; + out[16] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[8]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); + out[17] += mass*volFact*(1.224744871391589*F_0[5]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[9]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[5]*dvpar_cu); + out[18] += mass*volFact*(1.224744871391589*F_0[6]*dvpar*wvpar_sq+1.414213562373095*F_0[2]*wvpar_cu+0.3162277660168379*F_0[10]*dvpar_sq*wvpar+0.3535533905932737*F_0[2]*dvpar_sq*wvpar+0.06123724356957942*F_0[6]*dvpar_cu); + out[19] += mass*volFact*(1.224744871391589*F_0[7]*dvpar*wvpar_sq+1.414213562373095*F_0[4]*wvpar_cu+0.3162277660168379*F_0[11]*dvpar_sq*wvpar+0.3535533905932737*F_0[4]*dvpar_sq*wvpar+0.06123724356957942*F_0[7]*dvpar_cu); + out[20] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[3]*dvpar); + out[21] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[5]*dvpar); + out[22] += mass*volFact*(1.414213562373095*G_1[2]*wvpar+0.408248290463863*G_1[6]*dvpar); + out[23] += mass*volFact*(1.414213562373095*G_1[4]*wvpar+0.408248290463863*G_1[7]*dvpar); + out[24] += mass*volFact*(0.6324555320336759*F_0[8]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263127*F_0[8]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); + out[25] += mass*volFact*(0.632455532033676*F_0[9]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[5]*dvpar*wvpar_cu+0.2449489742783178*F_0[5]*dvpar_cu*wvpar+0.02258769757263128*F_0[9]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); + out[26] += mass*volFact*(0.632455532033676*F_0[10]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[2]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[2]*wvpar_qu+1.632993161855453*F_0[6]*dvpar*wvpar_cu+0.2449489742783178*F_0[6]*dvpar_cu*wvpar+0.02258769757263128*F_0[10]*dvpar_qu+0.01767766952966368*F_0[2]*dvpar_qu); + out[27] += mass*volFact*(0.6324555320336759*F_0[11]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[4]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[4]*wvpar_qu+1.632993161855453*F_0[7]*dvpar*wvpar_cu+0.2449489742783178*F_0[7]*dvpar_cu*wvpar+0.02258769757263127*F_0[11]*dvpar_qu+0.01767766952966368*F_0[4]*dvpar_qu); + out[28] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[8]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); + out[29] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[5]*dvpar*wvpar+0.105409255338946*G_1[9]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); + out[30] += mass*volFact*(1.414213562373095*G_1[2]*wvpar_sq+0.8164965809277261*G_1[6]*dvpar*wvpar+0.105409255338946*G_1[10]*dvpar_sq+0.1178511301977579*G_1[2]*dvpar_sq); + out[31] += mass*volFact*(1.414213562373095*G_1[4]*wvpar_sq+0.8164965809277261*G_1[7]*dvpar*wvpar+0.105409255338946*G_1[11]*dvpar_sq+0.1178511301977579*G_1[4]*dvpar_sq); } diff --git a/kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c b/kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c index 48f4135c0..8b1290b71 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c +++ b/kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c @@ -54,58 +54,67 @@ GKYL_CU_DH void mom_vlasov_pkpm_diag_2x1v_tensor_p2(const double *w, const doubl out[6] += 1.414213562373095*F_0[11]*mass*volFact; out[7] += 1.414213562373095*F_0[12]*mass*volFact; out[8] += 1.414213562373095*F_0[20]*mass*volFact; - out[9] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[9]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); - out[10] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[5]*dvpar*wvpar+0.105409255338946*F_0[15]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); - out[11] += mass*volFact*(1.414213562373095*F_0[2]*wvpar_sq+0.8164965809277261*F_0[6]*dvpar*wvpar+0.105409255338946*F_0[16]*dvpar_sq+0.1178511301977579*F_0[2]*dvpar_sq); - out[12] += mass*volFact*(1.414213562373095*F_0[4]*wvpar_sq+0.8164965809277261*F_0[10]*dvpar*wvpar+0.105409255338946*F_0[19]*dvpar_sq+0.1178511301977579*F_0[4]*dvpar_sq); - out[13] += mass*volFact*(1.414213562373095*F_0[7]*wvpar_sq+0.816496580927726*F_0[13]*dvpar*wvpar+0.105409255338946*F_0[21]*dvpar_sq+0.1178511301977579*F_0[7]*dvpar_sq); - out[14] += mass*volFact*(1.414213562373095*F_0[8]*wvpar_sq+0.816496580927726*F_0[14]*dvpar*wvpar+0.105409255338946*F_0[22]*dvpar_sq+0.1178511301977579*F_0[8]*dvpar_sq); - out[15] += mass*volFact*(1.414213562373095*F_0[11]*wvpar_sq+0.816496580927726*F_0[17]*dvpar*wvpar+0.105409255338946*F_0[24]*dvpar_sq+0.1178511301977579*F_0[11]*dvpar_sq); - out[16] += mass*volFact*(1.414213562373095*F_0[12]*wvpar_sq+0.816496580927726*F_0[18]*dvpar*wvpar+0.105409255338946*F_0[25]*dvpar_sq+0.1178511301977579*F_0[12]*dvpar_sq); - out[17] += mass*volFact*(1.414213562373095*F_0[20]*wvpar_sq+0.8164965809277261*F_0[23]*dvpar*wvpar+0.105409255338946*F_0[26]*dvpar_sq+0.1178511301977579*F_0[20]*dvpar_sq); - out[18] += 1.414213562373095*G_1[0]*mass*volFact; - out[19] += 1.414213562373095*G_1[1]*mass*volFact; - out[20] += 1.414213562373095*G_1[2]*mass*volFact; - out[21] += 1.414213562373095*G_1[4]*mass*volFact; - out[22] += 1.414213562373095*G_1[7]*mass*volFact; - out[23] += 1.414213562373095*G_1[8]*mass*volFact; - out[24] += 1.414213562373095*G_1[11]*mass*volFact; - out[25] += 1.414213562373095*G_1[12]*mass*volFact; - out[26] += 1.414213562373095*G_1[20]*mass*volFact; - out[27] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[9]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); - out[28] += mass*volFact*(1.224744871391589*F_0[5]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[15]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[5]*dvpar_cu); - out[29] += mass*volFact*(1.224744871391589*F_0[6]*dvpar*wvpar_sq+1.414213562373095*F_0[2]*wvpar_cu+0.3162277660168379*F_0[16]*dvpar_sq*wvpar+0.3535533905932737*F_0[2]*dvpar_sq*wvpar+0.06123724356957942*F_0[6]*dvpar_cu); - out[30] += mass*volFact*(1.224744871391589*F_0[10]*dvpar*wvpar_sq+1.414213562373095*F_0[4]*wvpar_cu+0.3162277660168379*F_0[19]*dvpar_sq*wvpar+0.3535533905932737*F_0[4]*dvpar_sq*wvpar+0.06123724356957942*F_0[10]*dvpar_cu); - out[31] += mass*volFact*(1.224744871391589*F_0[13]*dvpar*wvpar_sq+1.414213562373095*F_0[7]*wvpar_cu+0.3162277660168379*F_0[21]*dvpar_sq*wvpar+0.3535533905932737*F_0[7]*dvpar_sq*wvpar+0.06123724356957942*F_0[13]*dvpar_cu); - out[32] += mass*volFact*(1.224744871391589*F_0[14]*dvpar*wvpar_sq+1.414213562373095*F_0[8]*wvpar_cu+0.3162277660168379*F_0[22]*dvpar_sq*wvpar+0.3535533905932737*F_0[8]*dvpar_sq*wvpar+0.06123724356957942*F_0[14]*dvpar_cu); - out[33] += mass*volFact*(1.224744871391589*F_0[17]*dvpar*wvpar_sq+1.414213562373095*F_0[11]*wvpar_cu+0.3162277660168379*F_0[24]*dvpar_sq*wvpar+0.3535533905932737*F_0[11]*dvpar_sq*wvpar+0.06123724356957942*F_0[17]*dvpar_cu); - out[34] += mass*volFact*(1.224744871391589*F_0[18]*dvpar*wvpar_sq+1.414213562373095*F_0[12]*wvpar_cu+0.3162277660168379*F_0[25]*dvpar_sq*wvpar+0.3535533905932737*F_0[12]*dvpar_sq*wvpar+0.06123724356957942*F_0[18]*dvpar_cu); - out[35] += mass*volFact*(1.224744871391589*F_0[23]*dvpar*wvpar_sq+1.414213562373095*F_0[20]*wvpar_cu+0.3162277660168379*F_0[26]*dvpar_sq*wvpar+0.3535533905932737*F_0[20]*dvpar_sq*wvpar+0.06123724356957942*F_0[23]*dvpar_cu); - out[36] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[3]*dvpar); - out[37] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[5]*dvpar); - out[38] += mass*volFact*(1.414213562373095*G_1[2]*wvpar+0.408248290463863*G_1[6]*dvpar); - out[39] += mass*volFact*(1.414213562373095*G_1[4]*wvpar+0.408248290463863*G_1[10]*dvpar); - out[40] += mass*volFact*(1.414213562373095*G_1[7]*wvpar+0.408248290463863*G_1[13]*dvpar); - out[41] += mass*volFact*(1.414213562373095*G_1[8]*wvpar+0.408248290463863*G_1[14]*dvpar); - out[42] += mass*volFact*(1.414213562373095*G_1[11]*wvpar+0.408248290463863*G_1[17]*dvpar); - out[43] += mass*volFact*(1.414213562373095*G_1[12]*wvpar+0.408248290463863*G_1[18]*dvpar); - out[44] += mass*volFact*(1.414213562373095*G_1[20]*wvpar+0.408248290463863*G_1[23]*dvpar); - out[45] += mass*volFact*(0.6324555320336759*F_0[9]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263127*F_0[9]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); - out[46] += mass*volFact*(0.632455532033676*F_0[15]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[5]*dvpar*wvpar_cu+0.2449489742783178*F_0[5]*dvpar_cu*wvpar+0.02258769757263128*F_0[15]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); - out[47] += mass*volFact*(0.632455532033676*F_0[16]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[2]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[2]*wvpar_qu+1.632993161855453*F_0[6]*dvpar*wvpar_cu+0.2449489742783178*F_0[6]*dvpar_cu*wvpar+0.02258769757263128*F_0[16]*dvpar_qu+0.01767766952966368*F_0[2]*dvpar_qu); - out[48] += mass*volFact*(0.6324555320336759*F_0[19]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[4]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[4]*wvpar_qu+1.632993161855453*F_0[10]*dvpar*wvpar_cu+0.2449489742783178*F_0[10]*dvpar_cu*wvpar+0.02258769757263127*F_0[19]*dvpar_qu+0.01767766952966368*F_0[4]*dvpar_qu); - out[49] += mass*volFact*(0.6324555320336759*F_0[21]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[7]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[7]*wvpar_qu+1.632993161855453*F_0[13]*dvpar*wvpar_cu+0.2449489742783177*F_0[13]*dvpar_cu*wvpar+0.02258769757263127*F_0[21]*dvpar_qu+0.01767766952966368*F_0[7]*dvpar_qu); - out[50] += mass*volFact*(0.6324555320336759*F_0[22]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[8]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[8]*wvpar_qu+1.632993161855453*F_0[14]*dvpar*wvpar_cu+0.2449489742783177*F_0[14]*dvpar_cu*wvpar+0.02258769757263127*F_0[22]*dvpar_qu+0.01767766952966368*F_0[8]*dvpar_qu); - out[51] += mass*volFact*(0.632455532033676*F_0[24]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[11]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[11]*wvpar_qu+1.632993161855453*F_0[17]*dvpar*wvpar_cu+0.2449489742783177*F_0[17]*dvpar_cu*wvpar+0.02258769757263128*F_0[24]*dvpar_qu+0.01767766952966368*F_0[11]*dvpar_qu); - out[52] += mass*volFact*(0.632455532033676*F_0[25]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[12]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[12]*wvpar_qu+1.632993161855453*F_0[18]*dvpar*wvpar_cu+0.2449489742783177*F_0[18]*dvpar_cu*wvpar+0.02258769757263128*F_0[25]*dvpar_qu+0.01767766952966368*F_0[12]*dvpar_qu); - out[53] += mass*volFact*(0.6324555320336759*F_0[26]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[20]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[20]*wvpar_qu+1.632993161855453*F_0[23]*dvpar*wvpar_cu+0.2449489742783178*F_0[23]*dvpar_cu*wvpar+0.02258769757263127*F_0[26]*dvpar_qu+0.01767766952966368*F_0[20]*dvpar_qu); - out[54] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[9]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); - out[55] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[5]*dvpar*wvpar+0.105409255338946*G_1[15]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); - out[56] += mass*volFact*(1.414213562373095*G_1[2]*wvpar_sq+0.8164965809277261*G_1[6]*dvpar*wvpar+0.105409255338946*G_1[16]*dvpar_sq+0.1178511301977579*G_1[2]*dvpar_sq); - out[57] += mass*volFact*(1.414213562373095*G_1[4]*wvpar_sq+0.8164965809277261*G_1[10]*dvpar*wvpar+0.105409255338946*G_1[19]*dvpar_sq+0.1178511301977579*G_1[4]*dvpar_sq); - out[58] += mass*volFact*(1.414213562373095*G_1[7]*wvpar_sq+0.816496580927726*G_1[13]*dvpar*wvpar+0.105409255338946*G_1[21]*dvpar_sq+0.1178511301977579*G_1[7]*dvpar_sq); - out[59] += mass*volFact*(1.414213562373095*G_1[8]*wvpar_sq+0.816496580927726*G_1[14]*dvpar*wvpar+0.105409255338946*G_1[22]*dvpar_sq+0.1178511301977579*G_1[8]*dvpar_sq); - out[60] += mass*volFact*(1.414213562373095*G_1[11]*wvpar_sq+0.816496580927726*G_1[17]*dvpar*wvpar+0.105409255338946*G_1[24]*dvpar_sq+0.1178511301977579*G_1[11]*dvpar_sq); - out[61] += mass*volFact*(1.414213562373095*G_1[12]*wvpar_sq+0.816496580927726*G_1[18]*dvpar*wvpar+0.105409255338946*G_1[25]*dvpar_sq+0.1178511301977579*G_1[12]*dvpar_sq); - out[62] += mass*volFact*(1.414213562373095*G_1[20]*wvpar_sq+0.8164965809277261*G_1[23]*dvpar*wvpar+0.105409255338946*G_1[26]*dvpar_sq+0.1178511301977579*G_1[20]*dvpar_sq); + out[9] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[3]*dvpar); + out[10] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[5]*dvpar); + out[11] += mass*volFact*(1.414213562373095*F_0[2]*wvpar+0.408248290463863*F_0[6]*dvpar); + out[12] += mass*volFact*(1.414213562373095*F_0[4]*wvpar+0.408248290463863*F_0[10]*dvpar); + out[13] += mass*volFact*(1.414213562373095*F_0[7]*wvpar+0.408248290463863*F_0[13]*dvpar); + out[14] += mass*volFact*(1.414213562373095*F_0[8]*wvpar+0.408248290463863*F_0[14]*dvpar); + out[15] += mass*volFact*(1.414213562373095*F_0[11]*wvpar+0.408248290463863*F_0[17]*dvpar); + out[16] += mass*volFact*(1.414213562373095*F_0[12]*wvpar+0.408248290463863*F_0[18]*dvpar); + out[17] += mass*volFact*(1.414213562373095*F_0[20]*wvpar+0.408248290463863*F_0[23]*dvpar); + out[18] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[9]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); + out[19] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[5]*dvpar*wvpar+0.105409255338946*F_0[15]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); + out[20] += mass*volFact*(1.414213562373095*F_0[2]*wvpar_sq+0.8164965809277261*F_0[6]*dvpar*wvpar+0.105409255338946*F_0[16]*dvpar_sq+0.1178511301977579*F_0[2]*dvpar_sq); + out[21] += mass*volFact*(1.414213562373095*F_0[4]*wvpar_sq+0.8164965809277261*F_0[10]*dvpar*wvpar+0.105409255338946*F_0[19]*dvpar_sq+0.1178511301977579*F_0[4]*dvpar_sq); + out[22] += mass*volFact*(1.414213562373095*F_0[7]*wvpar_sq+0.816496580927726*F_0[13]*dvpar*wvpar+0.105409255338946*F_0[21]*dvpar_sq+0.1178511301977579*F_0[7]*dvpar_sq); + out[23] += mass*volFact*(1.414213562373095*F_0[8]*wvpar_sq+0.816496580927726*F_0[14]*dvpar*wvpar+0.105409255338946*F_0[22]*dvpar_sq+0.1178511301977579*F_0[8]*dvpar_sq); + out[24] += mass*volFact*(1.414213562373095*F_0[11]*wvpar_sq+0.816496580927726*F_0[17]*dvpar*wvpar+0.105409255338946*F_0[24]*dvpar_sq+0.1178511301977579*F_0[11]*dvpar_sq); + out[25] += mass*volFact*(1.414213562373095*F_0[12]*wvpar_sq+0.816496580927726*F_0[18]*dvpar*wvpar+0.105409255338946*F_0[25]*dvpar_sq+0.1178511301977579*F_0[12]*dvpar_sq); + out[26] += mass*volFact*(1.414213562373095*F_0[20]*wvpar_sq+0.8164965809277261*F_0[23]*dvpar*wvpar+0.105409255338946*F_0[26]*dvpar_sq+0.1178511301977579*F_0[20]*dvpar_sq); + out[27] += 1.414213562373095*G_1[0]*mass*volFact; + out[28] += 1.414213562373095*G_1[1]*mass*volFact; + out[29] += 1.414213562373095*G_1[2]*mass*volFact; + out[30] += 1.414213562373095*G_1[4]*mass*volFact; + out[31] += 1.414213562373095*G_1[7]*mass*volFact; + out[32] += 1.414213562373095*G_1[8]*mass*volFact; + out[33] += 1.414213562373095*G_1[11]*mass*volFact; + out[34] += 1.414213562373095*G_1[12]*mass*volFact; + out[35] += 1.414213562373095*G_1[20]*mass*volFact; + out[36] += mass*volFact*(1.224744871391589*F_0[3]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[9]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[3]*dvpar_cu); + out[37] += mass*volFact*(1.224744871391589*F_0[5]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[15]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[5]*dvpar_cu); + out[38] += mass*volFact*(1.224744871391589*F_0[6]*dvpar*wvpar_sq+1.414213562373095*F_0[2]*wvpar_cu+0.3162277660168379*F_0[16]*dvpar_sq*wvpar+0.3535533905932737*F_0[2]*dvpar_sq*wvpar+0.06123724356957942*F_0[6]*dvpar_cu); + out[39] += mass*volFact*(1.224744871391589*F_0[10]*dvpar*wvpar_sq+1.414213562373095*F_0[4]*wvpar_cu+0.3162277660168379*F_0[19]*dvpar_sq*wvpar+0.3535533905932737*F_0[4]*dvpar_sq*wvpar+0.06123724356957942*F_0[10]*dvpar_cu); + out[40] += mass*volFact*(1.224744871391589*F_0[13]*dvpar*wvpar_sq+1.414213562373095*F_0[7]*wvpar_cu+0.3162277660168379*F_0[21]*dvpar_sq*wvpar+0.3535533905932737*F_0[7]*dvpar_sq*wvpar+0.06123724356957942*F_0[13]*dvpar_cu); + out[41] += mass*volFact*(1.224744871391589*F_0[14]*dvpar*wvpar_sq+1.414213562373095*F_0[8]*wvpar_cu+0.3162277660168379*F_0[22]*dvpar_sq*wvpar+0.3535533905932737*F_0[8]*dvpar_sq*wvpar+0.06123724356957942*F_0[14]*dvpar_cu); + out[42] += mass*volFact*(1.224744871391589*F_0[17]*dvpar*wvpar_sq+1.414213562373095*F_0[11]*wvpar_cu+0.3162277660168379*F_0[24]*dvpar_sq*wvpar+0.3535533905932737*F_0[11]*dvpar_sq*wvpar+0.06123724356957942*F_0[17]*dvpar_cu); + out[43] += mass*volFact*(1.224744871391589*F_0[18]*dvpar*wvpar_sq+1.414213562373095*F_0[12]*wvpar_cu+0.3162277660168379*F_0[25]*dvpar_sq*wvpar+0.3535533905932737*F_0[12]*dvpar_sq*wvpar+0.06123724356957942*F_0[18]*dvpar_cu); + out[44] += mass*volFact*(1.224744871391589*F_0[23]*dvpar*wvpar_sq+1.414213562373095*F_0[20]*wvpar_cu+0.3162277660168379*F_0[26]*dvpar_sq*wvpar+0.3535533905932737*F_0[20]*dvpar_sq*wvpar+0.06123724356957942*F_0[23]*dvpar_cu); + out[45] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[3]*dvpar); + out[46] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[5]*dvpar); + out[47] += mass*volFact*(1.414213562373095*G_1[2]*wvpar+0.408248290463863*G_1[6]*dvpar); + out[48] += mass*volFact*(1.414213562373095*G_1[4]*wvpar+0.408248290463863*G_1[10]*dvpar); + out[49] += mass*volFact*(1.414213562373095*G_1[7]*wvpar+0.408248290463863*G_1[13]*dvpar); + out[50] += mass*volFact*(1.414213562373095*G_1[8]*wvpar+0.408248290463863*G_1[14]*dvpar); + out[51] += mass*volFact*(1.414213562373095*G_1[11]*wvpar+0.408248290463863*G_1[17]*dvpar); + out[52] += mass*volFact*(1.414213562373095*G_1[12]*wvpar+0.408248290463863*G_1[18]*dvpar); + out[53] += mass*volFact*(1.414213562373095*G_1[20]*wvpar+0.408248290463863*G_1[23]*dvpar); + out[54] += mass*volFact*(0.6324555320336759*F_0[9]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[3]*dvpar*wvpar_cu+0.2449489742783178*F_0[3]*dvpar_cu*wvpar+0.02258769757263127*F_0[9]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); + out[55] += mass*volFact*(0.632455532033676*F_0[15]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[5]*dvpar*wvpar_cu+0.2449489742783178*F_0[5]*dvpar_cu*wvpar+0.02258769757263128*F_0[15]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); + out[56] += mass*volFact*(0.632455532033676*F_0[16]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[2]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[2]*wvpar_qu+1.632993161855453*F_0[6]*dvpar*wvpar_cu+0.2449489742783178*F_0[6]*dvpar_cu*wvpar+0.02258769757263128*F_0[16]*dvpar_qu+0.01767766952966368*F_0[2]*dvpar_qu); + out[57] += mass*volFact*(0.6324555320336759*F_0[19]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[4]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[4]*wvpar_qu+1.632993161855453*F_0[10]*dvpar*wvpar_cu+0.2449489742783178*F_0[10]*dvpar_cu*wvpar+0.02258769757263127*F_0[19]*dvpar_qu+0.01767766952966368*F_0[4]*dvpar_qu); + out[58] += mass*volFact*(0.6324555320336759*F_0[21]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[7]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[7]*wvpar_qu+1.632993161855453*F_0[13]*dvpar*wvpar_cu+0.2449489742783177*F_0[13]*dvpar_cu*wvpar+0.02258769757263127*F_0[21]*dvpar_qu+0.01767766952966368*F_0[7]*dvpar_qu); + out[59] += mass*volFact*(0.6324555320336759*F_0[22]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[8]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[8]*wvpar_qu+1.632993161855453*F_0[14]*dvpar*wvpar_cu+0.2449489742783177*F_0[14]*dvpar_cu*wvpar+0.02258769757263127*F_0[22]*dvpar_qu+0.01767766952966368*F_0[8]*dvpar_qu); + out[60] += mass*volFact*(0.632455532033676*F_0[24]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[11]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[11]*wvpar_qu+1.632993161855453*F_0[17]*dvpar*wvpar_cu+0.2449489742783177*F_0[17]*dvpar_cu*wvpar+0.02258769757263128*F_0[24]*dvpar_qu+0.01767766952966368*F_0[11]*dvpar_qu); + out[61] += mass*volFact*(0.632455532033676*F_0[25]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[12]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[12]*wvpar_qu+1.632993161855453*F_0[18]*dvpar*wvpar_cu+0.2449489742783177*F_0[18]*dvpar_cu*wvpar+0.02258769757263128*F_0[25]*dvpar_qu+0.01767766952966368*F_0[12]*dvpar_qu); + out[62] += mass*volFact*(0.6324555320336759*F_0[26]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[20]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[20]*wvpar_qu+1.632993161855453*F_0[23]*dvpar*wvpar_cu+0.2449489742783178*F_0[23]*dvpar_cu*wvpar+0.02258769757263127*F_0[26]*dvpar_qu+0.01767766952966368*F_0[20]*dvpar_qu); + out[63] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[3]*dvpar*wvpar+0.105409255338946*G_1[9]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); + out[64] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[5]*dvpar*wvpar+0.105409255338946*G_1[15]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); + out[65] += mass*volFact*(1.414213562373095*G_1[2]*wvpar_sq+0.8164965809277261*G_1[6]*dvpar*wvpar+0.105409255338946*G_1[16]*dvpar_sq+0.1178511301977579*G_1[2]*dvpar_sq); + out[66] += mass*volFact*(1.414213562373095*G_1[4]*wvpar_sq+0.8164965809277261*G_1[10]*dvpar*wvpar+0.105409255338946*G_1[19]*dvpar_sq+0.1178511301977579*G_1[4]*dvpar_sq); + out[67] += mass*volFact*(1.414213562373095*G_1[7]*wvpar_sq+0.816496580927726*G_1[13]*dvpar*wvpar+0.105409255338946*G_1[21]*dvpar_sq+0.1178511301977579*G_1[7]*dvpar_sq); + out[68] += mass*volFact*(1.414213562373095*G_1[8]*wvpar_sq+0.816496580927726*G_1[14]*dvpar*wvpar+0.105409255338946*G_1[22]*dvpar_sq+0.1178511301977579*G_1[8]*dvpar_sq); + out[69] += mass*volFact*(1.414213562373095*G_1[11]*wvpar_sq+0.816496580927726*G_1[17]*dvpar*wvpar+0.105409255338946*G_1[24]*dvpar_sq+0.1178511301977579*G_1[11]*dvpar_sq); + out[70] += mass*volFact*(1.414213562373095*G_1[12]*wvpar_sq+0.816496580927726*G_1[18]*dvpar*wvpar+0.105409255338946*G_1[25]*dvpar_sq+0.1178511301977579*G_1[12]*dvpar_sq); + out[71] += mass*volFact*(1.414213562373095*G_1[20]*wvpar_sq+0.8164965809277261*G_1[23]*dvpar*wvpar+0.105409255338946*G_1[26]*dvpar_sq+0.1178511301977579*G_1[20]*dvpar_sq); } diff --git a/kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c b/kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c index fc4be4c01..c33dcd069 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c +++ b/kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c @@ -50,52 +50,60 @@ GKYL_CU_DH void mom_vlasov_pkpm_diag_3x1v_ser_p1(const double *w, const double * out[5] += 1.414213562373095*F_0[6]*mass*volFact; out[6] += 1.414213562373095*F_0[7]*mass*volFact; out[7] += 1.414213562373095*F_0[11]*mass*volFact; - out[8] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[4]*dvpar*wvpar+0.105409255338946*F_0[16]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); - out[9] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[8]*dvpar*wvpar+0.105409255338946*F_0[17]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); - out[10] += mass*volFact*(1.414213562373095*F_0[2]*wvpar_sq+0.8164965809277261*F_0[9]*dvpar*wvpar+0.105409255338946*F_0[18]*dvpar_sq+0.1178511301977579*F_0[2]*dvpar_sq); - out[11] += mass*volFact*(1.414213562373095*F_0[3]*wvpar_sq+0.8164965809277261*F_0[10]*dvpar*wvpar+0.105409255338946*F_0[19]*dvpar_sq+0.1178511301977579*F_0[3]*dvpar_sq); - out[12] += mass*volFact*(1.414213562373095*F_0[5]*wvpar_sq+0.8164965809277261*F_0[12]*dvpar*wvpar+0.105409255338946*F_0[20]*dvpar_sq+0.1178511301977579*F_0[5]*dvpar_sq); - out[13] += mass*volFact*(1.414213562373095*F_0[6]*wvpar_sq+0.8164965809277261*F_0[13]*dvpar*wvpar+0.105409255338946*F_0[21]*dvpar_sq+0.1178511301977579*F_0[6]*dvpar_sq); - out[14] += mass*volFact*(1.414213562373095*F_0[7]*wvpar_sq+0.8164965809277261*F_0[14]*dvpar*wvpar+0.105409255338946*F_0[22]*dvpar_sq+0.1178511301977579*F_0[7]*dvpar_sq); - out[15] += mass*volFact*(1.414213562373095*F_0[11]*wvpar_sq+0.8164965809277261*F_0[15]*dvpar*wvpar+0.105409255338946*F_0[23]*dvpar_sq+0.1178511301977579*F_0[11]*dvpar_sq); - out[16] += 1.414213562373095*G_1[0]*mass*volFact; - out[17] += 1.414213562373095*G_1[1]*mass*volFact; - out[18] += 1.414213562373095*G_1[2]*mass*volFact; - out[19] += 1.414213562373095*G_1[3]*mass*volFact; - out[20] += 1.414213562373095*G_1[5]*mass*volFact; - out[21] += 1.414213562373095*G_1[6]*mass*volFact; - out[22] += 1.414213562373095*G_1[7]*mass*volFact; - out[23] += 1.414213562373095*G_1[11]*mass*volFact; - out[24] += mass*volFact*(1.224744871391589*F_0[4]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[16]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[4]*dvpar_cu); - out[25] += mass*volFact*(1.224744871391589*F_0[8]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[17]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[8]*dvpar_cu); - out[26] += mass*volFact*(1.224744871391589*F_0[9]*dvpar*wvpar_sq+1.414213562373095*F_0[2]*wvpar_cu+0.3162277660168379*F_0[18]*dvpar_sq*wvpar+0.3535533905932737*F_0[2]*dvpar_sq*wvpar+0.06123724356957942*F_0[9]*dvpar_cu); - out[27] += mass*volFact*(1.224744871391589*F_0[10]*dvpar*wvpar_sq+1.414213562373095*F_0[3]*wvpar_cu+0.3162277660168379*F_0[19]*dvpar_sq*wvpar+0.3535533905932737*F_0[3]*dvpar_sq*wvpar+0.06123724356957942*F_0[10]*dvpar_cu); - out[28] += mass*volFact*(1.224744871391589*F_0[12]*dvpar*wvpar_sq+1.414213562373095*F_0[5]*wvpar_cu+0.3162277660168379*F_0[20]*dvpar_sq*wvpar+0.3535533905932737*F_0[5]*dvpar_sq*wvpar+0.06123724356957942*F_0[12]*dvpar_cu); - out[29] += mass*volFact*(1.224744871391589*F_0[13]*dvpar*wvpar_sq+1.414213562373095*F_0[6]*wvpar_cu+0.3162277660168379*F_0[21]*dvpar_sq*wvpar+0.3535533905932737*F_0[6]*dvpar_sq*wvpar+0.06123724356957942*F_0[13]*dvpar_cu); - out[30] += mass*volFact*(1.224744871391589*F_0[14]*dvpar*wvpar_sq+1.414213562373095*F_0[7]*wvpar_cu+0.3162277660168379*F_0[22]*dvpar_sq*wvpar+0.3535533905932737*F_0[7]*dvpar_sq*wvpar+0.06123724356957942*F_0[14]*dvpar_cu); - out[31] += mass*volFact*(1.224744871391589*F_0[15]*dvpar*wvpar_sq+1.414213562373095*F_0[11]*wvpar_cu+0.3162277660168379*F_0[23]*dvpar_sq*wvpar+0.3535533905932737*F_0[11]*dvpar_sq*wvpar+0.06123724356957942*F_0[15]*dvpar_cu); - out[32] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[4]*dvpar); - out[33] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[8]*dvpar); - out[34] += mass*volFact*(1.414213562373095*G_1[2]*wvpar+0.408248290463863*G_1[9]*dvpar); - out[35] += mass*volFact*(1.414213562373095*G_1[3]*wvpar+0.408248290463863*G_1[10]*dvpar); - out[36] += mass*volFact*(1.414213562373095*G_1[5]*wvpar+0.408248290463863*G_1[12]*dvpar); - out[37] += mass*volFact*(1.414213562373095*G_1[6]*wvpar+0.408248290463863*G_1[13]*dvpar); - out[38] += mass*volFact*(1.414213562373095*G_1[7]*wvpar+0.408248290463863*G_1[14]*dvpar); - out[39] += mass*volFact*(1.414213562373095*G_1[11]*wvpar+0.408248290463863*G_1[15]*dvpar); - out[40] += mass*volFact*(0.6324555320336759*F_0[16]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[4]*dvpar*wvpar_cu+0.2449489742783178*F_0[4]*dvpar_cu*wvpar+0.02258769757263127*F_0[16]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); - out[41] += mass*volFact*(0.632455532033676*F_0[17]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[8]*dvpar*wvpar_cu+0.2449489742783178*F_0[8]*dvpar_cu*wvpar+0.02258769757263128*F_0[17]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); - out[42] += mass*volFact*(0.632455532033676*F_0[18]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[2]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[2]*wvpar_qu+1.632993161855453*F_0[9]*dvpar*wvpar_cu+0.2449489742783178*F_0[9]*dvpar_cu*wvpar+0.02258769757263128*F_0[18]*dvpar_qu+0.01767766952966368*F_0[2]*dvpar_qu); - out[43] += mass*volFact*(0.632455532033676*F_0[19]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[3]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[3]*wvpar_qu+1.632993161855453*F_0[10]*dvpar*wvpar_cu+0.2449489742783178*F_0[10]*dvpar_cu*wvpar+0.02258769757263128*F_0[19]*dvpar_qu+0.01767766952966368*F_0[3]*dvpar_qu); - out[44] += mass*volFact*(0.6324555320336759*F_0[20]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[5]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[5]*wvpar_qu+1.632993161855453*F_0[12]*dvpar*wvpar_cu+0.2449489742783178*F_0[12]*dvpar_cu*wvpar+0.02258769757263127*F_0[20]*dvpar_qu+0.01767766952966368*F_0[5]*dvpar_qu); - out[45] += mass*volFact*(0.6324555320336759*F_0[21]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[6]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[6]*wvpar_qu+1.632993161855453*F_0[13]*dvpar*wvpar_cu+0.2449489742783178*F_0[13]*dvpar_cu*wvpar+0.02258769757263127*F_0[21]*dvpar_qu+0.01767766952966368*F_0[6]*dvpar_qu); - out[46] += mass*volFact*(0.6324555320336759*F_0[22]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[7]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[7]*wvpar_qu+1.632993161855453*F_0[14]*dvpar*wvpar_cu+0.2449489742783178*F_0[14]*dvpar_cu*wvpar+0.02258769757263127*F_0[22]*dvpar_qu+0.01767766952966368*F_0[7]*dvpar_qu); - out[47] += mass*volFact*(0.632455532033676*F_0[23]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[11]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[11]*wvpar_qu+1.632993161855453*F_0[15]*dvpar*wvpar_cu+0.2449489742783178*F_0[15]*dvpar_cu*wvpar+0.02258769757263128*F_0[23]*dvpar_qu+0.01767766952966368*F_0[11]*dvpar_qu); - out[48] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[4]*dvpar*wvpar+0.105409255338946*G_1[16]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); - out[49] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[8]*dvpar*wvpar+0.105409255338946*G_1[17]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); - out[50] += mass*volFact*(1.414213562373095*G_1[2]*wvpar_sq+0.8164965809277261*G_1[9]*dvpar*wvpar+0.105409255338946*G_1[18]*dvpar_sq+0.1178511301977579*G_1[2]*dvpar_sq); - out[51] += mass*volFact*(1.414213562373095*G_1[3]*wvpar_sq+0.8164965809277261*G_1[10]*dvpar*wvpar+0.105409255338946*G_1[19]*dvpar_sq+0.1178511301977579*G_1[3]*dvpar_sq); - out[52] += mass*volFact*(1.414213562373095*G_1[5]*wvpar_sq+0.8164965809277261*G_1[12]*dvpar*wvpar+0.105409255338946*G_1[20]*dvpar_sq+0.1178511301977579*G_1[5]*dvpar_sq); - out[53] += mass*volFact*(1.414213562373095*G_1[6]*wvpar_sq+0.8164965809277261*G_1[13]*dvpar*wvpar+0.105409255338946*G_1[21]*dvpar_sq+0.1178511301977579*G_1[6]*dvpar_sq); - out[54] += mass*volFact*(1.414213562373095*G_1[7]*wvpar_sq+0.8164965809277261*G_1[14]*dvpar*wvpar+0.105409255338946*G_1[22]*dvpar_sq+0.1178511301977579*G_1[7]*dvpar_sq); - out[55] += mass*volFact*(1.414213562373095*G_1[11]*wvpar_sq+0.8164965809277261*G_1[15]*dvpar*wvpar+0.105409255338946*G_1[23]*dvpar_sq+0.1178511301977579*G_1[11]*dvpar_sq); + out[8] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[4]*dvpar); + out[9] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[8]*dvpar); + out[10] += mass*volFact*(1.414213562373095*F_0[2]*wvpar+0.408248290463863*F_0[9]*dvpar); + out[11] += mass*volFact*(1.414213562373095*F_0[3]*wvpar+0.408248290463863*F_0[10]*dvpar); + out[12] += mass*volFact*(1.414213562373095*F_0[5]*wvpar+0.408248290463863*F_0[12]*dvpar); + out[13] += mass*volFact*(1.414213562373095*F_0[6]*wvpar+0.408248290463863*F_0[13]*dvpar); + out[14] += mass*volFact*(1.414213562373095*F_0[7]*wvpar+0.408248290463863*F_0[14]*dvpar); + out[15] += mass*volFact*(1.414213562373095*F_0[11]*wvpar+0.408248290463863*F_0[15]*dvpar); + out[16] += mass*volFact*(1.414213562373095*F_0[0]*wvpar_sq+0.8164965809277261*F_0[4]*dvpar*wvpar+0.105409255338946*F_0[16]*dvpar_sq+0.1178511301977579*F_0[0]*dvpar_sq); + out[17] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[8]*dvpar*wvpar+0.105409255338946*F_0[17]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); + out[18] += mass*volFact*(1.414213562373095*F_0[2]*wvpar_sq+0.8164965809277261*F_0[9]*dvpar*wvpar+0.105409255338946*F_0[18]*dvpar_sq+0.1178511301977579*F_0[2]*dvpar_sq); + out[19] += mass*volFact*(1.414213562373095*F_0[3]*wvpar_sq+0.8164965809277261*F_0[10]*dvpar*wvpar+0.105409255338946*F_0[19]*dvpar_sq+0.1178511301977579*F_0[3]*dvpar_sq); + out[20] += mass*volFact*(1.414213562373095*F_0[5]*wvpar_sq+0.8164965809277261*F_0[12]*dvpar*wvpar+0.105409255338946*F_0[20]*dvpar_sq+0.1178511301977579*F_0[5]*dvpar_sq); + out[21] += mass*volFact*(1.414213562373095*F_0[6]*wvpar_sq+0.8164965809277261*F_0[13]*dvpar*wvpar+0.105409255338946*F_0[21]*dvpar_sq+0.1178511301977579*F_0[6]*dvpar_sq); + out[22] += mass*volFact*(1.414213562373095*F_0[7]*wvpar_sq+0.8164965809277261*F_0[14]*dvpar*wvpar+0.105409255338946*F_0[22]*dvpar_sq+0.1178511301977579*F_0[7]*dvpar_sq); + out[23] += mass*volFact*(1.414213562373095*F_0[11]*wvpar_sq+0.8164965809277261*F_0[15]*dvpar*wvpar+0.105409255338946*F_0[23]*dvpar_sq+0.1178511301977579*F_0[11]*dvpar_sq); + out[24] += 1.414213562373095*G_1[0]*mass*volFact; + out[25] += 1.414213562373095*G_1[1]*mass*volFact; + out[26] += 1.414213562373095*G_1[2]*mass*volFact; + out[27] += 1.414213562373095*G_1[3]*mass*volFact; + out[28] += 1.414213562373095*G_1[5]*mass*volFact; + out[29] += 1.414213562373095*G_1[6]*mass*volFact; + out[30] += 1.414213562373095*G_1[7]*mass*volFact; + out[31] += 1.414213562373095*G_1[11]*mass*volFact; + out[32] += mass*volFact*(1.224744871391589*F_0[4]*dvpar*wvpar_sq+1.414213562373095*F_0[0]*wvpar_cu+0.3162277660168379*F_0[16]*dvpar_sq*wvpar+0.3535533905932737*F_0[0]*dvpar_sq*wvpar+0.06123724356957942*F_0[4]*dvpar_cu); + out[33] += mass*volFact*(1.224744871391589*F_0[8]*dvpar*wvpar_sq+1.414213562373095*F_0[1]*wvpar_cu+0.3162277660168379*F_0[17]*dvpar_sq*wvpar+0.3535533905932737*F_0[1]*dvpar_sq*wvpar+0.06123724356957942*F_0[8]*dvpar_cu); + out[34] += mass*volFact*(1.224744871391589*F_0[9]*dvpar*wvpar_sq+1.414213562373095*F_0[2]*wvpar_cu+0.3162277660168379*F_0[18]*dvpar_sq*wvpar+0.3535533905932737*F_0[2]*dvpar_sq*wvpar+0.06123724356957942*F_0[9]*dvpar_cu); + out[35] += mass*volFact*(1.224744871391589*F_0[10]*dvpar*wvpar_sq+1.414213562373095*F_0[3]*wvpar_cu+0.3162277660168379*F_0[19]*dvpar_sq*wvpar+0.3535533905932737*F_0[3]*dvpar_sq*wvpar+0.06123724356957942*F_0[10]*dvpar_cu); + out[36] += mass*volFact*(1.224744871391589*F_0[12]*dvpar*wvpar_sq+1.414213562373095*F_0[5]*wvpar_cu+0.3162277660168379*F_0[20]*dvpar_sq*wvpar+0.3535533905932737*F_0[5]*dvpar_sq*wvpar+0.06123724356957942*F_0[12]*dvpar_cu); + out[37] += mass*volFact*(1.224744871391589*F_0[13]*dvpar*wvpar_sq+1.414213562373095*F_0[6]*wvpar_cu+0.3162277660168379*F_0[21]*dvpar_sq*wvpar+0.3535533905932737*F_0[6]*dvpar_sq*wvpar+0.06123724356957942*F_0[13]*dvpar_cu); + out[38] += mass*volFact*(1.224744871391589*F_0[14]*dvpar*wvpar_sq+1.414213562373095*F_0[7]*wvpar_cu+0.3162277660168379*F_0[22]*dvpar_sq*wvpar+0.3535533905932737*F_0[7]*dvpar_sq*wvpar+0.06123724356957942*F_0[14]*dvpar_cu); + out[39] += mass*volFact*(1.224744871391589*F_0[15]*dvpar*wvpar_sq+1.414213562373095*F_0[11]*wvpar_cu+0.3162277660168379*F_0[23]*dvpar_sq*wvpar+0.3535533905932737*F_0[11]*dvpar_sq*wvpar+0.06123724356957942*F_0[15]*dvpar_cu); + out[40] += mass*volFact*(1.414213562373095*G_1[0]*wvpar+0.408248290463863*G_1[4]*dvpar); + out[41] += mass*volFact*(1.414213562373095*G_1[1]*wvpar+0.408248290463863*G_1[8]*dvpar); + out[42] += mass*volFact*(1.414213562373095*G_1[2]*wvpar+0.408248290463863*G_1[9]*dvpar); + out[43] += mass*volFact*(1.414213562373095*G_1[3]*wvpar+0.408248290463863*G_1[10]*dvpar); + out[44] += mass*volFact*(1.414213562373095*G_1[5]*wvpar+0.408248290463863*G_1[12]*dvpar); + out[45] += mass*volFact*(1.414213562373095*G_1[6]*wvpar+0.408248290463863*G_1[13]*dvpar); + out[46] += mass*volFact*(1.414213562373095*G_1[7]*wvpar+0.408248290463863*G_1[14]*dvpar); + out[47] += mass*volFact*(1.414213562373095*G_1[11]*wvpar+0.408248290463863*G_1[15]*dvpar); + out[48] += mass*volFact*(0.6324555320336759*F_0[16]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[0]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[0]*wvpar_qu+1.632993161855453*F_0[4]*dvpar*wvpar_cu+0.2449489742783178*F_0[4]*dvpar_cu*wvpar+0.02258769757263127*F_0[16]*dvpar_qu+0.01767766952966368*F_0[0]*dvpar_qu); + out[49] += mass*volFact*(0.632455532033676*F_0[17]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[1]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[1]*wvpar_qu+1.632993161855453*F_0[8]*dvpar*wvpar_cu+0.2449489742783178*F_0[8]*dvpar_cu*wvpar+0.02258769757263128*F_0[17]*dvpar_qu+0.01767766952966368*F_0[1]*dvpar_qu); + out[50] += mass*volFact*(0.632455532033676*F_0[18]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[2]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[2]*wvpar_qu+1.632993161855453*F_0[9]*dvpar*wvpar_cu+0.2449489742783178*F_0[9]*dvpar_cu*wvpar+0.02258769757263128*F_0[18]*dvpar_qu+0.01767766952966368*F_0[2]*dvpar_qu); + out[51] += mass*volFact*(0.632455532033676*F_0[19]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[3]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[3]*wvpar_qu+1.632993161855453*F_0[10]*dvpar*wvpar_cu+0.2449489742783178*F_0[10]*dvpar_cu*wvpar+0.02258769757263128*F_0[19]*dvpar_qu+0.01767766952966368*F_0[3]*dvpar_qu); + out[52] += mass*volFact*(0.6324555320336759*F_0[20]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[5]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[5]*wvpar_qu+1.632993161855453*F_0[12]*dvpar*wvpar_cu+0.2449489742783178*F_0[12]*dvpar_cu*wvpar+0.02258769757263127*F_0[20]*dvpar_qu+0.01767766952966368*F_0[5]*dvpar_qu); + out[53] += mass*volFact*(0.6324555320336759*F_0[21]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[6]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[6]*wvpar_qu+1.632993161855453*F_0[13]*dvpar*wvpar_cu+0.2449489742783178*F_0[13]*dvpar_cu*wvpar+0.02258769757263127*F_0[21]*dvpar_qu+0.01767766952966368*F_0[6]*dvpar_qu); + out[54] += mass*volFact*(0.6324555320336759*F_0[22]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[7]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[7]*wvpar_qu+1.632993161855453*F_0[14]*dvpar*wvpar_cu+0.2449489742783178*F_0[14]*dvpar_cu*wvpar+0.02258769757263127*F_0[22]*dvpar_qu+0.01767766952966368*F_0[7]*dvpar_qu); + out[55] += mass*volFact*(0.632455532033676*F_0[23]*dvpar_sq*wvpar_sq+0.7071067811865475*F_0[11]*dvpar_sq*wvpar_sq+1.414213562373095*F_0[11]*wvpar_qu+1.632993161855453*F_0[15]*dvpar*wvpar_cu+0.2449489742783178*F_0[15]*dvpar_cu*wvpar+0.02258769757263128*F_0[23]*dvpar_qu+0.01767766952966368*F_0[11]*dvpar_qu); + out[56] += mass*volFact*(1.414213562373095*G_1[0]*wvpar_sq+0.8164965809277261*G_1[4]*dvpar*wvpar+0.105409255338946*G_1[16]*dvpar_sq+0.1178511301977579*G_1[0]*dvpar_sq); + out[57] += mass*volFact*(1.414213562373095*G_1[1]*wvpar_sq+0.8164965809277261*G_1[8]*dvpar*wvpar+0.105409255338946*G_1[17]*dvpar_sq+0.1178511301977579*G_1[1]*dvpar_sq); + out[58] += mass*volFact*(1.414213562373095*G_1[2]*wvpar_sq+0.8164965809277261*G_1[9]*dvpar*wvpar+0.105409255338946*G_1[18]*dvpar_sq+0.1178511301977579*G_1[2]*dvpar_sq); + out[59] += mass*volFact*(1.414213562373095*G_1[3]*wvpar_sq+0.8164965809277261*G_1[10]*dvpar*wvpar+0.105409255338946*G_1[19]*dvpar_sq+0.1178511301977579*G_1[3]*dvpar_sq); + out[60] += mass*volFact*(1.414213562373095*G_1[5]*wvpar_sq+0.8164965809277261*G_1[12]*dvpar*wvpar+0.105409255338946*G_1[20]*dvpar_sq+0.1178511301977579*G_1[5]*dvpar_sq); + out[61] += mass*volFact*(1.414213562373095*G_1[6]*wvpar_sq+0.8164965809277261*G_1[13]*dvpar*wvpar+0.105409255338946*G_1[21]*dvpar_sq+0.1178511301977579*G_1[6]*dvpar_sq); + out[62] += mass*volFact*(1.414213562373095*G_1[7]*wvpar_sq+0.8164965809277261*G_1[14]*dvpar*wvpar+0.105409255338946*G_1[22]*dvpar_sq+0.1178511301977579*G_1[7]*dvpar_sq); + out[63] += mass*volFact*(1.414213562373095*G_1[11]*wvpar_sq+0.8164965809277261*G_1[15]*dvpar*wvpar+0.105409255338946*G_1[23]*dvpar_sq+0.1178511301977579*G_1[11]*dvpar_sq); } diff --git a/regression/rt_pkpm_em_par_shock_1d_p1.c b/regression/rt_pkpm_em_par_shock_1d_p1.c index 7ab44490e..8be77998f 100644 --- a/regression/rt_pkpm_em_par_shock_1d_p1.c +++ b/regression/rt_pkpm_em_par_shock_1d_p1.c @@ -214,7 +214,7 @@ create_ctx(void) // ion cyclotron frequency and gyroradius double omegaCi = chargeIon*B0/massIon; double di = vAi/omegaCi; - double rhoi = vtIon/omegaCi; // rhoi ~ 484 lambdaD at real mass ratio and vtElc/c = 1/8 + double rhoi = vtIon/omegaCi; // noise levels for perturbation double noise_amp = 1.0e-12; @@ -226,8 +226,8 @@ create_ctx(void) double nuIon = 0.01*omegaCi/sqrt(massIon); // domain size and simulation time - double Lx = 4.0*M_PI*rhoi; - double tend = 10.0/omegaCi; + double Lx = 2.0*M_PI*rhoi; + double tend = 2.0/omegaCi; struct pkpm_em_par_shock_ctx ctx = { .epsilon0 = epsilon0, @@ -341,7 +341,7 @@ main(int argc, char **argv) .ctx = &ctx, .init = evalFluidElc, .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, - //.diffusion = {.D = 1.0e-5, .order=4}, + .diffusion = {.D = 1.0e-3, .order=4}, }; // electrons @@ -376,7 +376,7 @@ main(int argc, char **argv) .ctx = &ctx, .init = evalFluidIon, .bcx = { GKYL_SPECIES_REFLECT, GKYL_SPECIES_COPY }, - //.diffusion = {.D = 1.0e-5, .order=4}, + .diffusion = {.D = 1.0e-3, .order=4}, }; // ions @@ -452,7 +452,7 @@ main(int argc, char **argv) // start, end and initial time-step double tcurr = 0.0, tend = ctx.tend; double dt = tend-tcurr; - int nframe = 1000; + int nframe = 20; // create trigger for IO struct gkyl_tm_trigger io_trig = { .dt = tend/nframe }; diff --git a/zero/mom_vlasov_pkpm.c b/zero/mom_vlasov_pkpm.c index cb194f398..5f95dd43c 100644 --- a/zero/mom_vlasov_pkpm.c +++ b/zero/mom_vlasov_pkpm.c @@ -64,7 +64,7 @@ gkyl_mom_vlasov_pkpm_new(const struct gkyl_basis* cbasis, const struct gkyl_basi if (diag) { mom_vlasov_pkpm->momt.kernel = CK(mom_vlasov_pkpm_diag_kernels, cdim, poly_order); - mom_vlasov_pkpm->momt.num_mom = 7; // rho, p_par, p_perp, q_par, q_perp, r_parpar, r_parperp + mom_vlasov_pkpm->momt.num_mom = 8; // rho, M1, p_par, p_perp, q_par, q_perp, r_parpar, r_parperp } else { mom_vlasov_pkpm->momt.kernel = CK(mom_vlasov_pkpm_kernels, cdim, poly_order); diff --git a/zero/mom_vlasov_pkpm_cu.cu b/zero/mom_vlasov_pkpm_cu.cu index 3f3c0ffbc..b5b7190ee 100644 --- a/zero/mom_vlasov_pkpm_cu.cu +++ b/zero/mom_vlasov_pkpm_cu.cu @@ -69,7 +69,7 @@ gkyl_mom_vlasov_pkpm_cu_dev_new(const struct gkyl_basis* cbasis, const struct gk mom_vlasov_pkpm->momt.num_phase = pbasis->num_basis; if (diag) - mom_vlasov_pkpm->momt.num_mom = 7; // rho, p_par, p_perp, q_par, q_perp, r_parpar, r_parperp + mom_vlasov_pkpm->momt.num_mom = 8; // rho, M1, p_par, p_perp, q_par, q_perp, r_parpar, r_parperp else mom_vlasov_pkpm->momt.num_mom = 3; // rho, p_par, p_perp mom_vlasov_pkpm->mass = mass; From bf884763137c90c0f22a1850ad89dfdfe3df95d4 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Sat, 9 Sep 2023 19:39:16 -0400 Subject: [PATCH 18/19] Through further testing, I discovered something subtle. Originally, I believed the LBO in the PKPM model had a simpler structure than the typical Vlasov LBO owing to the fact that the PKPM model is in the local flow frame. Thus, one would think div((v - u) f) -> div(v'f) for the drag term. This statement is only true in the continuous limit though, and in fact the use of our conservative LBO algorithm (including the boundary corrections) was creating a spurious flow velocity in all simulations. In many cases, this spurious flow velocity was small (for example, the classical neutral sod shock was generating a 1.0e-7 flow velocity from the collision operator). But for other cases, such as shock-waves, the collision operator would excite a flow which would then crash the simulation (only discovered because I, on a whim, turned off collisions in one shock simulation and found it to be more robust). So, the PKPM LBO has been changed to a more familiar form, similar to what is employed in Vlasov, with a primitive moment solve for a delta u correction that then allows us to keep the M1 = integral(vpar F_0) close to machine precision. --- apps/vm_species.c | 4 +- apps/vm_species_lbo.c | 48 +- kernels/pkpm/gkyl_lbo_vlasov_pkpm_kernels.h | 72 +-- kernels/pkpm/gkyl_vlasov_pkpm_kernels.h | 16 +- ..._pkpm_diff_boundary_surfvpar_1x1v_ser_p1.c | 123 ++-- ..._pkpm_diff_boundary_surfvpar_1x1v_ser_p2.c | 127 ++--- ...pm_diff_boundary_surfvpar_1x1v_tensor_p2.c | 175 +++--- ..._pkpm_diff_boundary_surfvpar_2x1v_ser_p1.c | 223 ++++---- ...pm_diff_boundary_surfvpar_2x1v_tensor_p2.c | 483 ++++++++-------- ..._pkpm_diff_boundary_surfvpar_3x1v_ser_p1.c | 431 +++++++------- ...bo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1.c | 37 +- ...bo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2.c | 45 +- ...vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2.c | 49 +- ...bo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1.c | 61 +- ...vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2.c | 121 ++-- ...bo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1.c | 109 ++-- .../lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1.c | 18 +- .../lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2.c | 18 +- .../lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2.c | 18 +- .../lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1.c | 18 +- .../lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2.c | 18 +- .../lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1.c | 18 +- ..._pkpm_drag_boundary_surfvpar_1x1v_ser_p1.c | 84 ++- ..._pkpm_drag_boundary_surfvpar_1x1v_ser_p2.c | 110 +++- ...pm_drag_boundary_surfvpar_1x1v_tensor_p2.c | 110 +++- ..._pkpm_drag_boundary_surfvpar_2x1v_ser_p1.c | 138 +++-- ...pm_drag_boundary_surfvpar_2x1v_tensor_p2.c | 270 ++++++--- ..._pkpm_drag_boundary_surfvpar_3x1v_ser_p1.c | 244 ++++++-- ...bo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1.c | 104 ++-- ...bo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2.c | 134 +++-- ...vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2.c | 134 +++-- ...bo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1.c | 164 ++++-- ...vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2.c | 314 +++++++---- ...bo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1.c | 284 ++++++---- .../lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1.c | 25 +- .../lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2.c | 29 +- .../lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2.c | 29 +- .../lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1.c | 33 +- .../lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2.c | 53 +- .../lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1.c | 49 +- .../mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p1.c | 14 +- .../mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p2.c | 20 +- ...mom_bcorr_lbo_vlasov_pkpm_1x1v_tensor_p2.c | 20 +- .../mom_bcorr_lbo_vlasov_pkpm_2x1v_ser_p1.c | 26 +- ...mom_bcorr_lbo_vlasov_pkpm_2x1v_tensor_p2.c | 56 +- .../mom_bcorr_lbo_vlasov_pkpm_3x1v_ser_p1.c | 50 +- kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c | 2 + kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c | 3 + kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c | 3 + kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c | 4 + kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c | 9 + kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c | 8 + .../pkpm/pkpm_dist_mirror_force_1x1v_ser_p1.c | 40 +- .../pkpm/pkpm_dist_mirror_force_1x1v_ser_p2.c | 44 +- .../pkpm_dist_mirror_force_1x1v_tensor_p2.c | 46 +- .../pkpm/pkpm_dist_mirror_force_2x1v_ser_p1.c | 52 +- .../pkpm_dist_mirror_force_2x1v_tensor_p2.c | 82 +-- .../pkpm/pkpm_dist_mirror_force_3x1v_ser_p1.c | 76 +-- ...lasov_pkpm_self_prim_moments_1x1v_ser_p1.c | 55 +- ...lasov_pkpm_self_prim_moments_1x1v_ser_p2.c | 92 ++- ...ov_pkpm_self_prim_moments_1x1v_tensor_p2.c | 92 ++- ...lasov_pkpm_self_prim_moments_2x1v_ser_p1.c | 139 ++++- ...ov_pkpm_self_prim_moments_2x1v_tensor_p2.c | 524 ++++++++++++++---- ...lasov_pkpm_self_prim_moments_3x1v_ser_p1.c | 427 +++++++++++--- zero/dg_calc_pkpm_dist_vars.c | 8 +- zero/dg_calc_pkpm_dist_vars_cu.cu | 10 +- zero/dg_lbo_vlasov_pkpm_diff.c | 9 +- zero/dg_lbo_vlasov_pkpm_diff_cu.cu | 17 +- zero/dg_lbo_vlasov_pkpm_drag.c | 9 +- zero/dg_lbo_vlasov_pkpm_drag_cu.cu | 17 +- zero/dg_updater_lbo_vlasov.c | 8 +- zero/gkyl_dg_calc_pkpm_dist_vars.h | 6 +- zero/gkyl_dg_calc_pkpm_dist_vars_priv.h | 2 +- zero/gkyl_dg_lbo_vlasov_pkpm_diff.h | 4 +- zero/gkyl_dg_lbo_vlasov_pkpm_diff_priv.h | 85 +-- zero/gkyl_dg_lbo_vlasov_pkpm_drag.h | 8 +- zero/gkyl_dg_lbo_vlasov_pkpm_drag_priv.h | 85 +-- zero/mom_bcorr_lbo_vlasov_pkpm.c | 2 +- zero/mom_bcorr_lbo_vlasov_pkpm_cu.cu | 2 +- zero/mom_vlasov_pkpm.c | 2 +- zero/mom_vlasov_pkpm_cu.cu | 2 +- zero/prim_lbo_vlasov_pkpm.c | 4 +- zero/prim_lbo_vlasov_pkpm_cu.cu | 2 +- 83 files changed, 4271 insertions(+), 2435 deletions(-) diff --git a/apps/vm_species.c b/apps/vm_species.c index a2d99e9d8..6a18b0500 100644 --- a/apps/vm_species.c +++ b/apps/vm_species.c @@ -206,9 +206,9 @@ vm_species_init(struct gkyl_vm *vm, struct gkyl_vlasov_app *app, struct vm_speci s->pkpm_fluid_species = vm_find_fluid_species(app, s->info.pkpm_fluid_species); s->pkpm_fluid_index = vm_find_fluid_species_idx(app, s->info.pkpm_fluid_species); - // pkpm moments for update (rho, p_par, p_perp) + // pkpm moments for update (rho, p_par, p_perp, M1) vm_species_moment_init(app, s, &s->pkpm_moms, "PKPM"); - // pkpm moments for diagnostics (rho, p_par, p_perp, q_par, q_perp, r_parpar, r_parperp) + // pkpm moments for diagnostics (rho, M1, p_par, p_perp, q_par, q_perp, r_parpar, r_parperp) // For simplicity, is_integrated flag also used by PKPM to turn on diagnostics vm_species_moment_init(app, s, &s->pkpm_moms_diag, "Integrated"); diff --git a/apps/vm_species_lbo.c b/apps/vm_species_lbo.c index 1c13b96e6..bfc92d1f3 100644 --- a/apps/vm_species_lbo.c +++ b/apps/vm_species_lbo.c @@ -46,18 +46,19 @@ vm_species_lbo_init(struct gkyl_vlasov_app *app, struct vm_species *s, struct vm lbo->nu_init = mkarr(app->use_gpu, app->confBasis.num_basis, app->local_ext.volume); gkyl_array_copy(lbo->nu_init, lbo->self_nu); } + // Allocate needed arrays (boundary corrections, primitive moments, and nu*primitive moments) + lbo->boundary_corrections = mkarr(app->use_gpu, (vdim+1)*app->confBasis.num_basis, app->local_ext.volume); + + lbo->prim_moms = mkarr(app->use_gpu, (vdim+1)*app->confBasis.num_basis, app->local_ext.volume); + lbo->nu_prim_moms = mkarr(app->use_gpu, (vdim+1)*app->confBasis.num_basis, app->local_ext.volume); + lbo->m0 = mkarr(app->use_gpu, app->confBasis.num_basis, app->local_ext.volume); lbo->model_id = GKYL_MODEL_DEFAULT; if (s->model_id == GKYL_MODEL_PKPM) { lbo->model_id = GKYL_MODEL_PKPM; - // Only energy corrections for pkpm model - lbo->boundary_corrections = mkarr(app->use_gpu, app->confBasis.num_basis, app->local_ext.volume); - lbo->prim_moms = mkarr(app->use_gpu, app->confBasis.num_basis, app->local_ext.volume); - lbo->nu_prim_moms = mkarr(app->use_gpu, app->confBasis.num_basis, app->local_ext.volume); - // Allocate m0 for PKPM in case it's needed for rescaling collision frequency by local density - lbo->m0 = mkarr(app->use_gpu, app->confBasis.num_basis, app->local_ext.volume); - - // edge of velocity space corrections to *only* energy (in PKPM model) + + // edge of velocity space corrections to momentum and energy + // Note: PKPM model still has a momentum correction to insure M1 = 0 from collisions lbo->bcorr_calc = gkyl_mom_calc_bcorr_lbo_vlasov_pkpm_new(&s->grid, &app->confBasis, &app->basis, v_bounds, s->info.mass, app->use_gpu); // primitive moment calculators @@ -65,12 +66,6 @@ vm_species_lbo_init(struct gkyl_vlasov_app *app, struct vm_species *s, struct vm &app->confBasis, &app->basis, &app->local, app->use_gpu); } else { - lbo->boundary_corrections = mkarr(app->use_gpu, (vdim+1)*app->confBasis.num_basis, app->local_ext.volume); - - lbo->prim_moms = mkarr(app->use_gpu, (vdim+1)*app->confBasis.num_basis, app->local_ext.volume); - lbo->nu_prim_moms = mkarr(app->use_gpu, (vdim+1)*app->confBasis.num_basis, app->local_ext.volume); - lbo->m0 = mkarr(app->use_gpu, app->confBasis.num_basis, app->local_ext.volume); - // allocate moments needed for LBO update vm_species_moment_init(app, s, &lbo->moms, "FiveMoments"); @@ -153,8 +148,6 @@ vm_species_lbo_moms(gkyl_vlasov_app *app, const struct vm_species *species, } if (app->use_gpu) { - wst = gkyl_wall_clock(); - // construct boundary corrections gkyl_mom_calc_bcorr_advance_cu(lbo->bcorr_calc, &species->local, &app->local, fin, lbo->boundary_corrections); @@ -165,7 +158,6 @@ vm_species_lbo_moms(gkyl_vlasov_app *app, const struct vm_species *species, gkyl_prim_lbo_calc_advance_cu(lbo->coll_pcalc, &app->local, species->pkpm_moms.marr, lbo->boundary_corrections, lbo->prim_moms); - // PKPM model only has vth^2 if (lbo->normNu) { gkyl_array_clear(lbo->norm_nu, 0.0); gkyl_array_clear(lbo->self_nu, 0.0); @@ -174,23 +166,14 @@ vm_species_lbo_moms(gkyl_vlasov_app *app, const struct vm_species *species, gkyl_spitzer_coll_freq_advance_normnu(lbo->spitzer_calc, &app->local, lbo->prim_moms, lbo->m0, lbo->prim_moms, 1.0, lbo->norm_nu); gkyl_dg_mul_op(app->confBasis, 0, lbo->self_nu, 0, lbo->nu_init, 0, lbo->norm_nu); } - gkyl_dg_mul_op(app->confBasis, 0, lbo->nu_prim_moms, 0, lbo->prim_moms, 0, lbo->self_nu); } else { gkyl_prim_lbo_calc_advance_cu(lbo->coll_pcalc, &app->local, lbo->moms.marr, lbo->boundary_corrections, lbo->prim_moms); - - for (int d=0; dvdim; d++) - gkyl_dg_mul_op(app->confBasis, d, lbo->nu_prim_moms, d, lbo->prim_moms, 0, lbo->self_nu); - gkyl_dg_mul_op(app->confBasis, app->vdim, lbo->nu_prim_moms, app->vdim, lbo->prim_moms, 0, lbo->self_nu); } - - app->stat.species_coll_mom_tm += gkyl_time_diff_now_sec(wst); } else { - wst = gkyl_wall_clock(); - // construct boundary corrections gkyl_mom_calc_bcorr_advance(lbo->bcorr_calc, &species->local, &app->local, fin, lbo->boundary_corrections); @@ -201,7 +184,6 @@ vm_species_lbo_moms(gkyl_vlasov_app *app, const struct vm_species *species, gkyl_prim_lbo_calc_advance(lbo->coll_pcalc, &app->local, species->pkpm_moms.marr, lbo->boundary_corrections, lbo->prim_moms); - // PKPM model only has vth^2 if (lbo->normNu) { gkyl_array_clear(lbo->norm_nu, 0.0); gkyl_array_clear(lbo->self_nu, 0.0); @@ -210,20 +192,18 @@ vm_species_lbo_moms(gkyl_vlasov_app *app, const struct vm_species *species, gkyl_spitzer_coll_freq_advance_normnu(lbo->spitzer_calc, &app->local, lbo->prim_moms, lbo->m0, lbo->prim_moms, 1.0, lbo->norm_nu); gkyl_dg_mul_op(app->confBasis, 0, lbo->self_nu, 0, lbo->nu_init, 0, lbo->norm_nu); } - gkyl_dg_mul_op(app->confBasis, 0, lbo->nu_prim_moms, 0, lbo->prim_moms, 0, lbo->self_nu); } else { gkyl_prim_lbo_calc_advance(lbo->coll_pcalc, &app->local, lbo->moms.marr, lbo->boundary_corrections, lbo->prim_moms); - - for (int d=0; dvdim; d++) - gkyl_dg_mul_op(app->confBasis, d, lbo->nu_prim_moms, d, lbo->prim_moms, 0, lbo->self_nu); - gkyl_dg_mul_op(app->confBasis, app->vdim, lbo->nu_prim_moms, app->vdim, lbo->prim_moms, 0, lbo->self_nu); } - - app->stat.species_coll_mom_tm += gkyl_time_diff_now_sec(wst); } + for (int d=0; dvdim; d++) + gkyl_dg_mul_op(app->confBasis, d, lbo->nu_prim_moms, d, lbo->prim_moms, 0, lbo->self_nu); + gkyl_dg_mul_op(app->confBasis, app->vdim, lbo->nu_prim_moms, app->vdim, lbo->prim_moms, 0, lbo->self_nu); + + app->stat.species_coll_mom_tm += gkyl_time_diff_now_sec(wst); } // computes moments from cross-species collisions diff --git a/kernels/pkpm/gkyl_lbo_vlasov_pkpm_kernels.h b/kernels/pkpm/gkyl_lbo_vlasov_pkpm_kernels.h index 7b87b4947..57ccf8ae8 100644 --- a/kernels/pkpm/gkyl_lbo_vlasov_pkpm_kernels.h +++ b/kernels/pkpm/gkyl_lbo_vlasov_pkpm_kernels.h @@ -3,52 +3,52 @@ #include EXTERN_C_BEG -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nu, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nu, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuVtSq, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nu, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nu, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nu, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nu, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, int edge, const double *fEdge, const double *fSkin, double* GKYL_RESTRICT out); +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); EXTERN_C_END diff --git a/kernels/pkpm/gkyl_vlasov_pkpm_kernels.h b/kernels/pkpm/gkyl_vlasov_pkpm_kernels.h index c8413c834..22d51989b 100644 --- a/kernels/pkpm/gkyl_vlasov_pkpm_kernels.h +++ b/kernels/pkpm/gkyl_vlasov_pkpm_kernels.h @@ -9,7 +9,7 @@ GKYL_CU_DH double vlasov_pkpm_vol_1x1v_ser_p1(const double *w, const double *dxv const double *g_dist_source, const double *f, double* GKYL_RESTRICT out); GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_ser_p1(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1); @@ -37,7 +37,7 @@ GKYL_CU_DH double vlasov_pkpm_vol_1x1v_ser_p2(const double *w, const double *dxv const double *g_dist_source, const double *f, double* GKYL_RESTRICT out); GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_ser_p2(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1); @@ -65,7 +65,7 @@ GKYL_CU_DH double vlasov_pkpm_vol_2x1v_ser_p1(const double *w, const double *dxv const double *g_dist_source, const double *f, double* GKYL_RESTRICT out); GKYL_CU_DH void pkpm_dist_mirror_force_2x1v_ser_p1(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1); @@ -102,7 +102,7 @@ GKYL_CU_DH double vlasov_pkpm_vol_2x1v_ser_p2(const double *w, const double *dxv const double *g_dist_source, const double *f, double* GKYL_RESTRICT out); GKYL_CU_DH void pkpm_dist_mirror_force_2x1v_ser_p2(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1); @@ -139,7 +139,7 @@ GKYL_CU_DH double vlasov_pkpm_vol_3x1v_ser_p1(const double *w, const double *dxv const double *g_dist_source, const double *f, double* GKYL_RESTRICT out); GKYL_CU_DH void pkpm_dist_mirror_force_3x1v_ser_p1(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1); @@ -185,7 +185,7 @@ GKYL_CU_DH double vlasov_pkpm_vol_3x1v_ser_p2(const double *w, const double *dxv const double *g_dist_source, const double *f, double* GKYL_RESTRICT out); GKYL_CU_DH void pkpm_dist_mirror_force_3x1v_ser_p2(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1); @@ -231,7 +231,7 @@ GKYL_CU_DH double vlasov_pkpm_vol_1x1v_tensor_p2(const double *w, const double * const double *g_dist_source, const double *f, double* GKYL_RESTRICT out); GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_tensor_p2(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1); @@ -259,7 +259,7 @@ GKYL_CU_DH double vlasov_pkpm_vol_2x1v_tensor_p2(const double *w, const double * const double *g_dist_source, const double *f, double* GKYL_RESTRICT out); GKYL_CU_DH void pkpm_dist_mirror_force_2x1v_tensor_p2(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1); diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1.c index ca3a02912..ac4a69d2b 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nuVtSq[2]: Thermal speeds squared times collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input distribution functions [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell. + // out: Incremented distribution functions in skin cell. double rdvSq4 = 4.0/(dxv[1]*dxv[1]); + const double *nuVtSqSum = &nuPrimMomsSum[2]; + const double *F_0Skin = &fSkin[0]; const double *G_1Skin = &fSkin[6]; const double *F_0Edge = &fEdge[0]; @@ -16,10 +19,10 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1(const doubl double vol_incr_F_0[6] = {0.0}; double vol_incr_G_1[6] = {0.0}; - vol_incr_F_0[4] = 4.743416490252569*F_0Skin[1]*nuVtSq[1]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_F_0[5] = 4.743416490252569*F_0Skin[0]*nuVtSq[1]*rdvSq4+4.743416490252569*nuVtSq[0]*F_0Skin[1]*rdvSq4; - vol_incr_G_1[4] = 4.743416490252569*G_1Skin[1]*nuVtSq[1]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_G_1[5] = 4.743416490252569*G_1Skin[0]*nuVtSq[1]*rdvSq4+4.743416490252569*nuVtSq[0]*G_1Skin[1]*rdvSq4; + vol_incr_F_0[4] = 4.743416490252569*F_0Skin[1]*nuVtSqSum[1]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_F_0[5] = 4.743416490252569*F_0Skin[0]*nuVtSqSum[1]*rdvSq4+4.743416490252569*nuVtSqSum[0]*F_0Skin[1]*rdvSq4; + vol_incr_G_1[4] = 4.743416490252569*G_1Skin[1]*nuVtSqSum[1]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_G_1[5] = 4.743416490252569*G_1Skin[0]*nuVtSqSum[1]*rdvSq4+4.743416490252569*nuVtSqSum[0]*G_1Skin[1]*rdvSq4; double temp_F_0_diff[6] = {0.0}; double temp_F_0_edge[6] = {0.0}; @@ -55,31 +58,31 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1(const doubl temp_G_1_edge[4] = (-7.5*G_1Skin[4])+5.809475019311125*G_1Skin[2]-3.354101966249685*G_1Skin[0]; temp_G_1_edge[5] = (-7.5*G_1Skin[5])+5.809475019311126*G_1Skin[3]-3.354101966249684*G_1Skin[1]; - diff_F_0_incr[0] = 0.7071067811865475*nuVtSq[1]*temp_F_0_diff[1]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.7071067811865475*nuVtSq[0]*temp_F_0_diff[1]+0.7071067811865475*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.7071067811865475*nuVtSq[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[2]; - diff_F_0_incr[3] = 0.7071067811865475*nuVtSq[0]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[2]; - diff_F_0_incr[4] = 0.7071067811865475*nuVtSq[1]*temp_F_0_diff[5]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[4]; - diff_F_0_incr[5] = 0.7071067811865475*nuVtSq[0]*temp_F_0_diff[5]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[4]; - diff_G_1_incr[0] = 0.7071067811865475*nuVtSq[1]*temp_G_1_diff[1]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.7071067811865475*nuVtSq[0]*temp_G_1_diff[1]+0.7071067811865475*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.7071067811865475*nuVtSq[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[2]; - diff_G_1_incr[3] = 0.7071067811865475*nuVtSq[0]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[2]; - diff_G_1_incr[4] = 0.7071067811865475*nuVtSq[1]*temp_G_1_diff[5]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[4]; - diff_G_1_incr[5] = 0.7071067811865475*nuVtSq[0]*temp_G_1_diff[5]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[4]; - - edge_F_0_incr[0] = 0.7071067811865475*nuVtSq[1]*temp_F_0_edge[1]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.7071067811865475*nuVtSq[0]*temp_F_0_edge[1]+0.7071067811865475*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.7071067811865475*nuVtSq[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[2]; - edge_F_0_incr[3] = 0.7071067811865475*nuVtSq[0]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[2]; - edge_F_0_incr[4] = 0.7071067811865475*nuVtSq[1]*temp_F_0_edge[5]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[4]; - edge_F_0_incr[5] = 0.7071067811865475*nuVtSq[0]*temp_F_0_edge[5]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[4]; - edge_G_1_incr[0] = 0.7071067811865475*nuVtSq[1]*temp_G_1_edge[1]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.7071067811865475*nuVtSq[0]*temp_G_1_edge[1]+0.7071067811865475*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.7071067811865475*nuVtSq[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[2]; - edge_G_1_incr[3] = 0.7071067811865475*nuVtSq[0]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[2]; - edge_G_1_incr[4] = 0.7071067811865475*nuVtSq[1]*temp_G_1_edge[5]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[4]; - edge_G_1_incr[5] = 0.7071067811865475*nuVtSq[0]*temp_G_1_edge[5]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[4]; + diff_F_0_incr[0] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[1]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[1]+0.7071067811865475*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[2]; + diff_F_0_incr[3] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[2]; + diff_F_0_incr[4] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[5]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[4]; + diff_F_0_incr[5] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[5]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[4]; + diff_G_1_incr[0] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[1]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[1]+0.7071067811865475*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[2]; + diff_G_1_incr[3] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[2]; + diff_G_1_incr[4] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[5]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[4]; + diff_G_1_incr[5] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[5]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[4]; + + edge_F_0_incr[0] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[1]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[1]+0.7071067811865475*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[2]; + edge_F_0_incr[3] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[2]; + edge_F_0_incr[4] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[5]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[4]; + edge_F_0_incr[5] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[5]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[4]; + edge_G_1_incr[0] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[1]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[1]+0.7071067811865475*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[2]; + edge_G_1_incr[3] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[2]; + edge_G_1_incr[4] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[5]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[4]; + edge_G_1_incr[5] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[5]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[4]; } else { @@ -106,31 +109,31 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p1(const doubl temp_G_1_edge[4] = (-7.5*G_1Skin[4])-5.809475019311125*G_1Skin[2]-3.354101966249685*G_1Skin[0]; temp_G_1_edge[5] = (-7.5*G_1Skin[5])-5.809475019311126*G_1Skin[3]-3.354101966249684*G_1Skin[1]; - diff_F_0_incr[0] = 0.7071067811865475*nuVtSq[1]*temp_F_0_diff[1]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.7071067811865475*nuVtSq[0]*temp_F_0_diff[1]+0.7071067811865475*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.7071067811865475*nuVtSq[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[2]; - diff_F_0_incr[3] = 0.7071067811865475*nuVtSq[0]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[2]; - diff_F_0_incr[4] = 0.7071067811865475*nuVtSq[1]*temp_F_0_diff[5]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[4]; - diff_F_0_incr[5] = 0.7071067811865475*nuVtSq[0]*temp_F_0_diff[5]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[4]; - diff_G_1_incr[0] = 0.7071067811865475*nuVtSq[1]*temp_G_1_diff[1]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.7071067811865475*nuVtSq[0]*temp_G_1_diff[1]+0.7071067811865475*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.7071067811865475*nuVtSq[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[2]; - diff_G_1_incr[3] = 0.7071067811865475*nuVtSq[0]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[2]; - diff_G_1_incr[4] = 0.7071067811865475*nuVtSq[1]*temp_G_1_diff[5]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[4]; - diff_G_1_incr[5] = 0.7071067811865475*nuVtSq[0]*temp_G_1_diff[5]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[4]; - - edge_F_0_incr[0] = 0.7071067811865475*nuVtSq[1]*temp_F_0_edge[1]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.7071067811865475*nuVtSq[0]*temp_F_0_edge[1]+0.7071067811865475*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.7071067811865475*nuVtSq[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[2]; - edge_F_0_incr[3] = 0.7071067811865475*nuVtSq[0]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[2]; - edge_F_0_incr[4] = 0.7071067811865475*nuVtSq[1]*temp_F_0_edge[5]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[4]; - edge_F_0_incr[5] = 0.7071067811865475*nuVtSq[0]*temp_F_0_edge[5]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[4]; - edge_G_1_incr[0] = 0.7071067811865475*nuVtSq[1]*temp_G_1_edge[1]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.7071067811865475*nuVtSq[0]*temp_G_1_edge[1]+0.7071067811865475*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.7071067811865475*nuVtSq[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[2]; - edge_G_1_incr[3] = 0.7071067811865475*nuVtSq[0]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[2]; - edge_G_1_incr[4] = 0.7071067811865475*nuVtSq[1]*temp_G_1_edge[5]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[4]; - edge_G_1_incr[5] = 0.7071067811865475*nuVtSq[0]*temp_G_1_edge[5]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[4]; + diff_F_0_incr[0] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[1]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[1]+0.7071067811865475*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[2]; + diff_F_0_incr[3] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[2]; + diff_F_0_incr[4] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[5]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[4]; + diff_F_0_incr[5] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[5]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[4]; + diff_G_1_incr[0] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[1]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[1]+0.7071067811865475*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[2]; + diff_G_1_incr[3] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[2]; + diff_G_1_incr[4] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[5]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[4]; + diff_G_1_incr[5] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[5]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[4]; + + edge_F_0_incr[0] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[1]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[1]+0.7071067811865475*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[2]; + edge_F_0_incr[3] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[2]; + edge_F_0_incr[4] = 0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[5]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[4]; + edge_F_0_incr[5] = 0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[5]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[4]; + edge_G_1_incr[0] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[1]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[1]+0.7071067811865475*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[2]; + edge_G_1_incr[3] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[2]; + edge_G_1_incr[4] = 0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[5]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[4]; + edge_G_1_incr[5] = 0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[5]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[4]; } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2.c index c3430cd2d..320e5e7f7 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuVtSq, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nuVtSq[3]: Thermal speeds squared times collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input distribution functions [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell. + // out: Incremented distribution functions in skin cell. double rdvSq4 = 4.0/(dxv[1]*dxv[1]); + const double *nuVtSqSum = &nuPrimMomsSum[3]; + const double *F_0Skin = &fSkin[0]; const double *G_1Skin = &fSkin[8]; const double *F_0Edge = &fEdge[0]; @@ -16,10 +19,10 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2(const doubl double vol_incr_F_0[8] = {0.0}; double vol_incr_G_1[8] = {0.0}; - vol_incr_F_0[5] = 4.743416490252569*nuVtSq[2]*F_0Skin[4]*rdvSq4+4.743416490252569*F_0Skin[1]*nuVtSq[1]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_F_0[7] = 4.242640687119286*nuVtSq[1]*F_0Skin[4]*rdvSq4+4.242640687119286*F_0Skin[1]*nuVtSq[2]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSq[1]*rdvSq4+4.743416490252569*nuVtSq[0]*F_0Skin[1]*rdvSq4; - vol_incr_G_1[5] = 4.743416490252569*nuVtSq[2]*G_1Skin[4]*rdvSq4+4.743416490252569*G_1Skin[1]*nuVtSq[1]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_G_1[7] = 4.242640687119286*nuVtSq[1]*G_1Skin[4]*rdvSq4+4.242640687119286*G_1Skin[1]*nuVtSq[2]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSq[1]*rdvSq4+4.743416490252569*nuVtSq[0]*G_1Skin[1]*rdvSq4; + vol_incr_F_0[5] = 4.743416490252569*nuVtSqSum[2]*F_0Skin[4]*rdvSq4+4.743416490252569*F_0Skin[1]*nuVtSqSum[1]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_F_0[7] = 4.242640687119286*nuVtSqSum[1]*F_0Skin[4]*rdvSq4+4.242640687119286*F_0Skin[1]*nuVtSqSum[2]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSqSum[1]*rdvSq4+4.743416490252569*nuVtSqSum[0]*F_0Skin[1]*rdvSq4; + vol_incr_G_1[5] = 4.743416490252569*nuVtSqSum[2]*G_1Skin[4]*rdvSq4+4.743416490252569*G_1Skin[1]*nuVtSqSum[1]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_G_1[7] = 4.242640687119286*nuVtSqSum[1]*G_1Skin[4]*rdvSq4+4.242640687119286*G_1Skin[1]*nuVtSqSum[2]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSqSum[1]*rdvSq4+4.743416490252569*nuVtSqSum[0]*G_1Skin[1]*rdvSq4; double diff_F_0_incr[8] = {0.0}; double edge_F_0_incr[8] = {0.0}; @@ -29,64 +32,64 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_ser_p2(const doubl if (edge == -1) { - diff_F_0_incr[0] = (-0.4743416490252568*nuVtSq[1]*F_0Skin[7])+0.4743416490252568*nuVtSq[1]*F_0Edge[7]-0.842012099081717*nuVtSq[2]*F_0Skin[6]-0.842012099081717*nuVtSq[2]*F_0Edge[6]-0.4743416490252568*nuVtSq[0]*F_0Skin[5]+0.4743416490252568*nuVtSq[0]*F_0Edge[5]-0.6629126073623879*nuVtSq[2]*F_0Skin[4]+0.6629126073623879*nuVtSq[2]*F_0Edge[4]-0.8420120990817169*nuVtSq[1]*F_0Skin[3]-0.8420120990817169*nuVtSq[1]*F_0Edge[3]-0.8420120990817169*nuVtSq[0]*F_0Skin[2]-0.8420120990817169*nuVtSq[0]*F_0Edge[2]-0.6629126073623879*F_0Skin[1]*nuVtSq[1]+0.6629126073623879*F_0Edge[1]*nuVtSq[1]-0.6629126073623879*F_0Skin[0]*nuVtSq[0]+0.6629126073623879*F_0Edge[0]*nuVtSq[0]; - diff_F_0_incr[1] = (-0.4242640687119285*nuVtSq[2]*F_0Skin[7])-0.4743416490252568*nuVtSq[0]*F_0Skin[7]+0.4242640687119285*nuVtSq[2]*F_0Edge[7]+0.4743416490252568*nuVtSq[0]*F_0Edge[7]-0.7531185165696033*nuVtSq[1]*F_0Skin[6]-0.7531185165696033*nuVtSq[1]*F_0Edge[6]-0.4743416490252568*nuVtSq[1]*F_0Skin[5]+0.4743416490252568*nuVtSq[1]*F_0Edge[5]-0.592927061281571*nuVtSq[1]*F_0Skin[4]+0.592927061281571*nuVtSq[1]*F_0Edge[4]-0.753118516569603*nuVtSq[2]*F_0Skin[3]-0.8420120990817169*nuVtSq[0]*F_0Skin[3]-0.753118516569603*nuVtSq[2]*F_0Edge[3]-0.8420120990817169*nuVtSq[0]*F_0Edge[3]-0.592927061281571*F_0Skin[1]*nuVtSq[2]+0.592927061281571*F_0Edge[1]*nuVtSq[2]-0.8420120990817169*nuVtSq[1]*F_0Skin[2]-0.8420120990817169*nuVtSq[1]*F_0Edge[2]-0.6629126073623879*F_0Skin[0]*nuVtSq[1]+0.6629126073623879*F_0Edge[0]*nuVtSq[1]-0.6629126073623879*nuVtSq[0]*F_0Skin[1]+0.6629126073623879*nuVtSq[0]*F_0Edge[1]; - diff_F_0_incr[2] = (-1.121119609893386*nuVtSq[1]*F_0Skin[7])+0.522048062622111*nuVtSq[1]*F_0Edge[7]-1.889300930982805*nuVtSq[2]*F_0Skin[6]-1.027514541411701*nuVtSq[2]*F_0Edge[6]-1.121119609893386*nuVtSq[0]*F_0Skin[5]+0.522048062622111*nuVtSq[0]*F_0Edge[5]-1.454384534777511*nuVtSq[2]*F_0Skin[4]+0.8420120990817169*nuVtSq[2]*F_0Edge[4]-1.889300930982805*nuVtSq[1]*F_0Skin[3]-1.027514541411701*nuVtSq[1]*F_0Edge[3]-1.889300930982805*nuVtSq[0]*F_0Skin[2]-1.027514541411701*nuVtSq[0]*F_0Edge[2]-1.454384534777511*F_0Skin[1]*nuVtSq[1]+0.8420120990817169*F_0Edge[1]*nuVtSq[1]-1.454384534777511*F_0Skin[0]*nuVtSq[0]+0.8420120990817169*F_0Edge[0]*nuVtSq[0]; - diff_F_0_incr[3] = (-1.002759863451863*nuVtSq[2]*F_0Skin[7])-1.121119609893386*nuVtSq[0]*F_0Skin[7]+0.466933982218043*nuVtSq[2]*F_0Edge[7]+0.522048062622111*nuVtSq[0]*F_0Edge[7]-1.689842124652476*nuVtSq[1]*F_0Skin[6]-0.9190369449864345*nuVtSq[1]*F_0Edge[6]-1.121119609893386*nuVtSq[1]*F_0Skin[5]+0.522048062622111*nuVtSq[1]*F_0Edge[5]-1.300841074074769*nuVtSq[1]*F_0Skin[4]+0.753118516569603*nuVtSq[1]*F_0Edge[4]-1.689842124652476*nuVtSq[2]*F_0Skin[3]-1.889300930982805*nuVtSq[0]*F_0Skin[3]-0.9190369449864345*nuVtSq[2]*F_0Edge[3]-1.027514541411701*nuVtSq[0]*F_0Edge[3]-1.300841074074769*F_0Skin[1]*nuVtSq[2]+0.753118516569603*F_0Edge[1]*nuVtSq[2]-1.889300930982805*nuVtSq[1]*F_0Skin[2]-1.027514541411701*nuVtSq[1]*F_0Edge[2]-1.454384534777511*F_0Skin[0]*nuVtSq[1]+0.8420120990817169*F_0Edge[0]*nuVtSq[1]-1.454384534777511*nuVtSq[0]*F_0Skin[1]+0.8420120990817169*nuVtSq[0]*F_0Edge[1]; - diff_F_0_incr[4] = (-0.4242640687119285*nuVtSq[1]*F_0Skin[7])+0.4242640687119285*nuVtSq[1]*F_0Edge[7]-0.5379417975497165*nuVtSq[2]*F_0Skin[6]-0.842012099081717*nuVtSq[0]*F_0Skin[6]-0.5379417975497165*nuVtSq[2]*F_0Edge[6]-0.842012099081717*nuVtSq[0]*F_0Edge[6]-0.4743416490252568*nuVtSq[2]*F_0Skin[5]+0.4743416490252568*nuVtSq[2]*F_0Edge[5]-0.4235193294868364*nuVtSq[2]*F_0Skin[4]-0.6629126073623879*nuVtSq[0]*F_0Skin[4]+0.4235193294868364*nuVtSq[2]*F_0Edge[4]+0.6629126073623879*nuVtSq[0]*F_0Edge[4]-0.753118516569603*nuVtSq[1]*F_0Skin[3]-0.753118516569603*nuVtSq[1]*F_0Edge[3]-0.8420120990817169*F_0Skin[2]*nuVtSq[2]-0.8420120990817169*F_0Edge[2]*nuVtSq[2]-0.6629126073623879*F_0Skin[0]*nuVtSq[2]+0.6629126073623879*F_0Edge[0]*nuVtSq[2]-0.592927061281571*F_0Skin[1]*nuVtSq[1]+0.592927061281571*F_0Edge[1]*nuVtSq[1]; - diff_F_0_incr[5] = (-2.220757234663999*nuVtSq[1]*F_0Skin[7])-0.09943689110435815*nuVtSq[1]*F_0Edge[7]-3.551638458822559*nuVtSq[2]*F_0Skin[6]-0.2139541240254553*nuVtSq[2]*F_0Edge[6]-2.220757234663999*nuVtSq[0]*F_0Skin[5]-0.09943689110435816*nuVtSq[0]*F_0Edge[5]-2.668171775767069*nuVtSq[2]*F_0Skin[4]+0.2964635306407854*nuVtSq[2]*F_0Edge[4]-3.551638458822559*nuVtSq[1]*F_0Skin[3]-0.2139541240254554*nuVtSq[1]*F_0Edge[3]-3.551638458822559*nuVtSq[0]*F_0Skin[2]-0.2139541240254554*nuVtSq[0]*F_0Edge[2]-2.668171775767069*F_0Skin[1]*nuVtSq[1]+0.2964635306407854*F_0Edge[1]*nuVtSq[1]-2.668171775767069*F_0Skin[0]*nuVtSq[0]+0.2964635306407854*F_0Edge[0]*nuVtSq[0]; - diff_F_0_incr[6] = (-1.002759863451863*nuVtSq[1]*F_0Skin[7])+0.4669339822180429*nuVtSq[1]*F_0Edge[7]-1.207030089037483*nuVtSq[2]*F_0Skin[6]-1.889300930982805*nuVtSq[0]*F_0Skin[6]-0.6564549607045962*nuVtSq[2]*F_0Edge[6]-1.027514541411701*nuVtSq[0]*F_0Edge[6]-1.121119609893386*nuVtSq[2]*F_0Skin[5]+0.522048062622111*nuVtSq[2]*F_0Edge[5]-0.9291721957676923*nuVtSq[2]*F_0Skin[4]-1.454384534777511*nuVtSq[0]*F_0Skin[4]+0.5379417975497165*nuVtSq[2]*F_0Edge[4]+0.842012099081717*nuVtSq[0]*F_0Edge[4]-1.689842124652476*nuVtSq[1]*F_0Skin[3]-0.9190369449864345*nuVtSq[1]*F_0Edge[3]-1.889300930982805*F_0Skin[2]*nuVtSq[2]-1.027514541411701*F_0Edge[2]*nuVtSq[2]-1.454384534777511*F_0Skin[0]*nuVtSq[2]+0.842012099081717*F_0Edge[0]*nuVtSq[2]-1.300841074074769*F_0Skin[1]*nuVtSq[1]+0.7531185165696033*F_0Edge[1]*nuVtSq[1]; - diff_F_0_incr[7] = (-1.986305655293262*nuVtSq[2]*F_0Skin[7])-2.220757234663999*nuVtSq[0]*F_0Skin[7]-0.0889390591922356*nuVtSq[2]*F_0Edge[7]-0.09943689110435816*nuVtSq[0]*F_0Edge[7]-3.176682010171931*nuVtSq[1]*F_0Skin[6]-0.1913663861549356*nuVtSq[1]*F_0Edge[6]-2.220757234663999*nuVtSq[1]*F_0Skin[5]-0.09943689110435815*nuVtSq[1]*F_0Edge[5]-2.386485386504596*nuVtSq[1]*F_0Skin[4]+0.2651650429449552*nuVtSq[1]*F_0Edge[4]-3.176682010171931*nuVtSq[2]*F_0Skin[3]-3.551638458822559*nuVtSq[0]*F_0Skin[3]-0.1913663861549357*nuVtSq[2]*F_0Edge[3]-0.2139541240254553*nuVtSq[0]*F_0Edge[3]-2.386485386504596*F_0Skin[1]*nuVtSq[2]+0.2651650429449552*F_0Edge[1]*nuVtSq[2]-3.551638458822559*nuVtSq[1]*F_0Skin[2]-0.2139541240254553*nuVtSq[1]*F_0Edge[2]-2.668171775767068*F_0Skin[0]*nuVtSq[1]+0.2964635306407854*F_0Edge[0]*nuVtSq[1]-2.668171775767068*nuVtSq[0]*F_0Skin[1]+0.2964635306407854*nuVtSq[0]*F_0Edge[1]; - diff_G_1_incr[0] = (-0.4743416490252568*nuVtSq[1]*G_1Skin[7])+0.4743416490252568*nuVtSq[1]*G_1Edge[7]-0.842012099081717*nuVtSq[2]*G_1Skin[6]-0.842012099081717*nuVtSq[2]*G_1Edge[6]-0.4743416490252568*nuVtSq[0]*G_1Skin[5]+0.4743416490252568*nuVtSq[0]*G_1Edge[5]-0.6629126073623879*nuVtSq[2]*G_1Skin[4]+0.6629126073623879*nuVtSq[2]*G_1Edge[4]-0.8420120990817169*nuVtSq[1]*G_1Skin[3]-0.8420120990817169*nuVtSq[1]*G_1Edge[3]-0.8420120990817169*nuVtSq[0]*G_1Skin[2]-0.8420120990817169*nuVtSq[0]*G_1Edge[2]-0.6629126073623879*G_1Skin[1]*nuVtSq[1]+0.6629126073623879*G_1Edge[1]*nuVtSq[1]-0.6629126073623879*G_1Skin[0]*nuVtSq[0]+0.6629126073623879*G_1Edge[0]*nuVtSq[0]; - diff_G_1_incr[1] = (-0.4242640687119285*nuVtSq[2]*G_1Skin[7])-0.4743416490252568*nuVtSq[0]*G_1Skin[7]+0.4242640687119285*nuVtSq[2]*G_1Edge[7]+0.4743416490252568*nuVtSq[0]*G_1Edge[7]-0.7531185165696033*nuVtSq[1]*G_1Skin[6]-0.7531185165696033*nuVtSq[1]*G_1Edge[6]-0.4743416490252568*nuVtSq[1]*G_1Skin[5]+0.4743416490252568*nuVtSq[1]*G_1Edge[5]-0.592927061281571*nuVtSq[1]*G_1Skin[4]+0.592927061281571*nuVtSq[1]*G_1Edge[4]-0.753118516569603*nuVtSq[2]*G_1Skin[3]-0.8420120990817169*nuVtSq[0]*G_1Skin[3]-0.753118516569603*nuVtSq[2]*G_1Edge[3]-0.8420120990817169*nuVtSq[0]*G_1Edge[3]-0.592927061281571*G_1Skin[1]*nuVtSq[2]+0.592927061281571*G_1Edge[1]*nuVtSq[2]-0.8420120990817169*nuVtSq[1]*G_1Skin[2]-0.8420120990817169*nuVtSq[1]*G_1Edge[2]-0.6629126073623879*G_1Skin[0]*nuVtSq[1]+0.6629126073623879*G_1Edge[0]*nuVtSq[1]-0.6629126073623879*nuVtSq[0]*G_1Skin[1]+0.6629126073623879*nuVtSq[0]*G_1Edge[1]; - diff_G_1_incr[2] = (-1.121119609893386*nuVtSq[1]*G_1Skin[7])+0.522048062622111*nuVtSq[1]*G_1Edge[7]-1.889300930982805*nuVtSq[2]*G_1Skin[6]-1.027514541411701*nuVtSq[2]*G_1Edge[6]-1.121119609893386*nuVtSq[0]*G_1Skin[5]+0.522048062622111*nuVtSq[0]*G_1Edge[5]-1.454384534777511*nuVtSq[2]*G_1Skin[4]+0.8420120990817169*nuVtSq[2]*G_1Edge[4]-1.889300930982805*nuVtSq[1]*G_1Skin[3]-1.027514541411701*nuVtSq[1]*G_1Edge[3]-1.889300930982805*nuVtSq[0]*G_1Skin[2]-1.027514541411701*nuVtSq[0]*G_1Edge[2]-1.454384534777511*G_1Skin[1]*nuVtSq[1]+0.8420120990817169*G_1Edge[1]*nuVtSq[1]-1.454384534777511*G_1Skin[0]*nuVtSq[0]+0.8420120990817169*G_1Edge[0]*nuVtSq[0]; - diff_G_1_incr[3] = (-1.002759863451863*nuVtSq[2]*G_1Skin[7])-1.121119609893386*nuVtSq[0]*G_1Skin[7]+0.466933982218043*nuVtSq[2]*G_1Edge[7]+0.522048062622111*nuVtSq[0]*G_1Edge[7]-1.689842124652476*nuVtSq[1]*G_1Skin[6]-0.9190369449864345*nuVtSq[1]*G_1Edge[6]-1.121119609893386*nuVtSq[1]*G_1Skin[5]+0.522048062622111*nuVtSq[1]*G_1Edge[5]-1.300841074074769*nuVtSq[1]*G_1Skin[4]+0.753118516569603*nuVtSq[1]*G_1Edge[4]-1.689842124652476*nuVtSq[2]*G_1Skin[3]-1.889300930982805*nuVtSq[0]*G_1Skin[3]-0.9190369449864345*nuVtSq[2]*G_1Edge[3]-1.027514541411701*nuVtSq[0]*G_1Edge[3]-1.300841074074769*G_1Skin[1]*nuVtSq[2]+0.753118516569603*G_1Edge[1]*nuVtSq[2]-1.889300930982805*nuVtSq[1]*G_1Skin[2]-1.027514541411701*nuVtSq[1]*G_1Edge[2]-1.454384534777511*G_1Skin[0]*nuVtSq[1]+0.8420120990817169*G_1Edge[0]*nuVtSq[1]-1.454384534777511*nuVtSq[0]*G_1Skin[1]+0.8420120990817169*nuVtSq[0]*G_1Edge[1]; - diff_G_1_incr[4] = (-0.4242640687119285*nuVtSq[1]*G_1Skin[7])+0.4242640687119285*nuVtSq[1]*G_1Edge[7]-0.5379417975497165*nuVtSq[2]*G_1Skin[6]-0.842012099081717*nuVtSq[0]*G_1Skin[6]-0.5379417975497165*nuVtSq[2]*G_1Edge[6]-0.842012099081717*nuVtSq[0]*G_1Edge[6]-0.4743416490252568*nuVtSq[2]*G_1Skin[5]+0.4743416490252568*nuVtSq[2]*G_1Edge[5]-0.4235193294868364*nuVtSq[2]*G_1Skin[4]-0.6629126073623879*nuVtSq[0]*G_1Skin[4]+0.4235193294868364*nuVtSq[2]*G_1Edge[4]+0.6629126073623879*nuVtSq[0]*G_1Edge[4]-0.753118516569603*nuVtSq[1]*G_1Skin[3]-0.753118516569603*nuVtSq[1]*G_1Edge[3]-0.8420120990817169*G_1Skin[2]*nuVtSq[2]-0.8420120990817169*G_1Edge[2]*nuVtSq[2]-0.6629126073623879*G_1Skin[0]*nuVtSq[2]+0.6629126073623879*G_1Edge[0]*nuVtSq[2]-0.592927061281571*G_1Skin[1]*nuVtSq[1]+0.592927061281571*G_1Edge[1]*nuVtSq[1]; - diff_G_1_incr[5] = (-2.220757234663999*nuVtSq[1]*G_1Skin[7])-0.09943689110435815*nuVtSq[1]*G_1Edge[7]-3.551638458822559*nuVtSq[2]*G_1Skin[6]-0.2139541240254553*nuVtSq[2]*G_1Edge[6]-2.220757234663999*nuVtSq[0]*G_1Skin[5]-0.09943689110435816*nuVtSq[0]*G_1Edge[5]-2.668171775767069*nuVtSq[2]*G_1Skin[4]+0.2964635306407854*nuVtSq[2]*G_1Edge[4]-3.551638458822559*nuVtSq[1]*G_1Skin[3]-0.2139541240254554*nuVtSq[1]*G_1Edge[3]-3.551638458822559*nuVtSq[0]*G_1Skin[2]-0.2139541240254554*nuVtSq[0]*G_1Edge[2]-2.668171775767069*G_1Skin[1]*nuVtSq[1]+0.2964635306407854*G_1Edge[1]*nuVtSq[1]-2.668171775767069*G_1Skin[0]*nuVtSq[0]+0.2964635306407854*G_1Edge[0]*nuVtSq[0]; - diff_G_1_incr[6] = (-1.002759863451863*nuVtSq[1]*G_1Skin[7])+0.4669339822180429*nuVtSq[1]*G_1Edge[7]-1.207030089037483*nuVtSq[2]*G_1Skin[6]-1.889300930982805*nuVtSq[0]*G_1Skin[6]-0.6564549607045962*nuVtSq[2]*G_1Edge[6]-1.027514541411701*nuVtSq[0]*G_1Edge[6]-1.121119609893386*nuVtSq[2]*G_1Skin[5]+0.522048062622111*nuVtSq[2]*G_1Edge[5]-0.9291721957676923*nuVtSq[2]*G_1Skin[4]-1.454384534777511*nuVtSq[0]*G_1Skin[4]+0.5379417975497165*nuVtSq[2]*G_1Edge[4]+0.842012099081717*nuVtSq[0]*G_1Edge[4]-1.689842124652476*nuVtSq[1]*G_1Skin[3]-0.9190369449864345*nuVtSq[1]*G_1Edge[3]-1.889300930982805*G_1Skin[2]*nuVtSq[2]-1.027514541411701*G_1Edge[2]*nuVtSq[2]-1.454384534777511*G_1Skin[0]*nuVtSq[2]+0.842012099081717*G_1Edge[0]*nuVtSq[2]-1.300841074074769*G_1Skin[1]*nuVtSq[1]+0.7531185165696033*G_1Edge[1]*nuVtSq[1]; - diff_G_1_incr[7] = (-1.986305655293262*nuVtSq[2]*G_1Skin[7])-2.220757234663999*nuVtSq[0]*G_1Skin[7]-0.0889390591922356*nuVtSq[2]*G_1Edge[7]-0.09943689110435816*nuVtSq[0]*G_1Edge[7]-3.176682010171931*nuVtSq[1]*G_1Skin[6]-0.1913663861549356*nuVtSq[1]*G_1Edge[6]-2.220757234663999*nuVtSq[1]*G_1Skin[5]-0.09943689110435815*nuVtSq[1]*G_1Edge[5]-2.386485386504596*nuVtSq[1]*G_1Skin[4]+0.2651650429449552*nuVtSq[1]*G_1Edge[4]-3.176682010171931*nuVtSq[2]*G_1Skin[3]-3.551638458822559*nuVtSq[0]*G_1Skin[3]-0.1913663861549357*nuVtSq[2]*G_1Edge[3]-0.2139541240254553*nuVtSq[0]*G_1Edge[3]-2.386485386504596*G_1Skin[1]*nuVtSq[2]+0.2651650429449552*G_1Edge[1]*nuVtSq[2]-3.551638458822559*nuVtSq[1]*G_1Skin[2]-0.2139541240254553*nuVtSq[1]*G_1Edge[2]-2.668171775767068*G_1Skin[0]*nuVtSq[1]+0.2964635306407854*G_1Edge[0]*nuVtSq[1]-2.668171775767068*nuVtSq[0]*G_1Skin[1]+0.2964635306407854*nuVtSq[0]*G_1Edge[1]; + diff_F_0_incr[0] = (-0.4743416490252568*nuVtSqSum[1]*F_0Skin[7])+0.4743416490252568*nuVtSqSum[1]*F_0Edge[7]-0.842012099081717*nuVtSqSum[2]*F_0Skin[6]-0.842012099081717*nuVtSqSum[2]*F_0Edge[6]-0.4743416490252568*nuVtSqSum[0]*F_0Skin[5]+0.4743416490252568*nuVtSqSum[0]*F_0Edge[5]-0.6629126073623879*nuVtSqSum[2]*F_0Skin[4]+0.6629126073623879*nuVtSqSum[2]*F_0Edge[4]-0.8420120990817169*nuVtSqSum[1]*F_0Skin[3]-0.8420120990817169*nuVtSqSum[1]*F_0Edge[3]-0.8420120990817169*nuVtSqSum[0]*F_0Skin[2]-0.8420120990817169*nuVtSqSum[0]*F_0Edge[2]-0.6629126073623879*F_0Skin[1]*nuVtSqSum[1]+0.6629126073623879*F_0Edge[1]*nuVtSqSum[1]-0.6629126073623879*F_0Skin[0]*nuVtSqSum[0]+0.6629126073623879*F_0Edge[0]*nuVtSqSum[0]; + diff_F_0_incr[1] = (-0.4242640687119285*nuVtSqSum[2]*F_0Skin[7])-0.4743416490252568*nuVtSqSum[0]*F_0Skin[7]+0.4242640687119285*nuVtSqSum[2]*F_0Edge[7]+0.4743416490252568*nuVtSqSum[0]*F_0Edge[7]-0.7531185165696033*nuVtSqSum[1]*F_0Skin[6]-0.7531185165696033*nuVtSqSum[1]*F_0Edge[6]-0.4743416490252568*nuVtSqSum[1]*F_0Skin[5]+0.4743416490252568*nuVtSqSum[1]*F_0Edge[5]-0.592927061281571*nuVtSqSum[1]*F_0Skin[4]+0.592927061281571*nuVtSqSum[1]*F_0Edge[4]-0.753118516569603*nuVtSqSum[2]*F_0Skin[3]-0.8420120990817169*nuVtSqSum[0]*F_0Skin[3]-0.753118516569603*nuVtSqSum[2]*F_0Edge[3]-0.8420120990817169*nuVtSqSum[0]*F_0Edge[3]-0.592927061281571*F_0Skin[1]*nuVtSqSum[2]+0.592927061281571*F_0Edge[1]*nuVtSqSum[2]-0.8420120990817169*nuVtSqSum[1]*F_0Skin[2]-0.8420120990817169*nuVtSqSum[1]*F_0Edge[2]-0.6629126073623879*F_0Skin[0]*nuVtSqSum[1]+0.6629126073623879*F_0Edge[0]*nuVtSqSum[1]-0.6629126073623879*nuVtSqSum[0]*F_0Skin[1]+0.6629126073623879*nuVtSqSum[0]*F_0Edge[1]; + diff_F_0_incr[2] = (-1.121119609893386*nuVtSqSum[1]*F_0Skin[7])+0.522048062622111*nuVtSqSum[1]*F_0Edge[7]-1.889300930982805*nuVtSqSum[2]*F_0Skin[6]-1.027514541411701*nuVtSqSum[2]*F_0Edge[6]-1.121119609893386*nuVtSqSum[0]*F_0Skin[5]+0.522048062622111*nuVtSqSum[0]*F_0Edge[5]-1.454384534777511*nuVtSqSum[2]*F_0Skin[4]+0.8420120990817169*nuVtSqSum[2]*F_0Edge[4]-1.889300930982805*nuVtSqSum[1]*F_0Skin[3]-1.027514541411701*nuVtSqSum[1]*F_0Edge[3]-1.889300930982805*nuVtSqSum[0]*F_0Skin[2]-1.027514541411701*nuVtSqSum[0]*F_0Edge[2]-1.454384534777511*F_0Skin[1]*nuVtSqSum[1]+0.8420120990817169*F_0Edge[1]*nuVtSqSum[1]-1.454384534777511*F_0Skin[0]*nuVtSqSum[0]+0.8420120990817169*F_0Edge[0]*nuVtSqSum[0]; + diff_F_0_incr[3] = (-1.002759863451863*nuVtSqSum[2]*F_0Skin[7])-1.121119609893386*nuVtSqSum[0]*F_0Skin[7]+0.466933982218043*nuVtSqSum[2]*F_0Edge[7]+0.522048062622111*nuVtSqSum[0]*F_0Edge[7]-1.689842124652476*nuVtSqSum[1]*F_0Skin[6]-0.9190369449864345*nuVtSqSum[1]*F_0Edge[6]-1.121119609893386*nuVtSqSum[1]*F_0Skin[5]+0.522048062622111*nuVtSqSum[1]*F_0Edge[5]-1.300841074074769*nuVtSqSum[1]*F_0Skin[4]+0.753118516569603*nuVtSqSum[1]*F_0Edge[4]-1.689842124652476*nuVtSqSum[2]*F_0Skin[3]-1.889300930982805*nuVtSqSum[0]*F_0Skin[3]-0.9190369449864345*nuVtSqSum[2]*F_0Edge[3]-1.027514541411701*nuVtSqSum[0]*F_0Edge[3]-1.300841074074769*F_0Skin[1]*nuVtSqSum[2]+0.753118516569603*F_0Edge[1]*nuVtSqSum[2]-1.889300930982805*nuVtSqSum[1]*F_0Skin[2]-1.027514541411701*nuVtSqSum[1]*F_0Edge[2]-1.454384534777511*F_0Skin[0]*nuVtSqSum[1]+0.8420120990817169*F_0Edge[0]*nuVtSqSum[1]-1.454384534777511*nuVtSqSum[0]*F_0Skin[1]+0.8420120990817169*nuVtSqSum[0]*F_0Edge[1]; + diff_F_0_incr[4] = (-0.4242640687119285*nuVtSqSum[1]*F_0Skin[7])+0.4242640687119285*nuVtSqSum[1]*F_0Edge[7]-0.5379417975497165*nuVtSqSum[2]*F_0Skin[6]-0.842012099081717*nuVtSqSum[0]*F_0Skin[6]-0.5379417975497165*nuVtSqSum[2]*F_0Edge[6]-0.842012099081717*nuVtSqSum[0]*F_0Edge[6]-0.4743416490252568*nuVtSqSum[2]*F_0Skin[5]+0.4743416490252568*nuVtSqSum[2]*F_0Edge[5]-0.4235193294868364*nuVtSqSum[2]*F_0Skin[4]-0.6629126073623879*nuVtSqSum[0]*F_0Skin[4]+0.4235193294868364*nuVtSqSum[2]*F_0Edge[4]+0.6629126073623879*nuVtSqSum[0]*F_0Edge[4]-0.753118516569603*nuVtSqSum[1]*F_0Skin[3]-0.753118516569603*nuVtSqSum[1]*F_0Edge[3]-0.8420120990817169*F_0Skin[2]*nuVtSqSum[2]-0.8420120990817169*F_0Edge[2]*nuVtSqSum[2]-0.6629126073623879*F_0Skin[0]*nuVtSqSum[2]+0.6629126073623879*F_0Edge[0]*nuVtSqSum[2]-0.592927061281571*F_0Skin[1]*nuVtSqSum[1]+0.592927061281571*F_0Edge[1]*nuVtSqSum[1]; + diff_F_0_incr[5] = (-2.220757234663999*nuVtSqSum[1]*F_0Skin[7])-0.09943689110435815*nuVtSqSum[1]*F_0Edge[7]-3.551638458822559*nuVtSqSum[2]*F_0Skin[6]-0.2139541240254553*nuVtSqSum[2]*F_0Edge[6]-2.220757234663999*nuVtSqSum[0]*F_0Skin[5]-0.09943689110435816*nuVtSqSum[0]*F_0Edge[5]-2.668171775767069*nuVtSqSum[2]*F_0Skin[4]+0.2964635306407854*nuVtSqSum[2]*F_0Edge[4]-3.551638458822559*nuVtSqSum[1]*F_0Skin[3]-0.2139541240254554*nuVtSqSum[1]*F_0Edge[3]-3.551638458822559*nuVtSqSum[0]*F_0Skin[2]-0.2139541240254554*nuVtSqSum[0]*F_0Edge[2]-2.668171775767069*F_0Skin[1]*nuVtSqSum[1]+0.2964635306407854*F_0Edge[1]*nuVtSqSum[1]-2.668171775767069*F_0Skin[0]*nuVtSqSum[0]+0.2964635306407854*F_0Edge[0]*nuVtSqSum[0]; + diff_F_0_incr[6] = (-1.002759863451863*nuVtSqSum[1]*F_0Skin[7])+0.4669339822180429*nuVtSqSum[1]*F_0Edge[7]-1.207030089037483*nuVtSqSum[2]*F_0Skin[6]-1.889300930982805*nuVtSqSum[0]*F_0Skin[6]-0.6564549607045962*nuVtSqSum[2]*F_0Edge[6]-1.027514541411701*nuVtSqSum[0]*F_0Edge[6]-1.121119609893386*nuVtSqSum[2]*F_0Skin[5]+0.522048062622111*nuVtSqSum[2]*F_0Edge[5]-0.9291721957676923*nuVtSqSum[2]*F_0Skin[4]-1.454384534777511*nuVtSqSum[0]*F_0Skin[4]+0.5379417975497165*nuVtSqSum[2]*F_0Edge[4]+0.842012099081717*nuVtSqSum[0]*F_0Edge[4]-1.689842124652476*nuVtSqSum[1]*F_0Skin[3]-0.9190369449864345*nuVtSqSum[1]*F_0Edge[3]-1.889300930982805*F_0Skin[2]*nuVtSqSum[2]-1.027514541411701*F_0Edge[2]*nuVtSqSum[2]-1.454384534777511*F_0Skin[0]*nuVtSqSum[2]+0.842012099081717*F_0Edge[0]*nuVtSqSum[2]-1.300841074074769*F_0Skin[1]*nuVtSqSum[1]+0.7531185165696033*F_0Edge[1]*nuVtSqSum[1]; + diff_F_0_incr[7] = (-1.986305655293262*nuVtSqSum[2]*F_0Skin[7])-2.220757234663999*nuVtSqSum[0]*F_0Skin[7]-0.0889390591922356*nuVtSqSum[2]*F_0Edge[7]-0.09943689110435816*nuVtSqSum[0]*F_0Edge[7]-3.176682010171931*nuVtSqSum[1]*F_0Skin[6]-0.1913663861549356*nuVtSqSum[1]*F_0Edge[6]-2.220757234663999*nuVtSqSum[1]*F_0Skin[5]-0.09943689110435815*nuVtSqSum[1]*F_0Edge[5]-2.386485386504596*nuVtSqSum[1]*F_0Skin[4]+0.2651650429449552*nuVtSqSum[1]*F_0Edge[4]-3.176682010171931*nuVtSqSum[2]*F_0Skin[3]-3.551638458822559*nuVtSqSum[0]*F_0Skin[3]-0.1913663861549357*nuVtSqSum[2]*F_0Edge[3]-0.2139541240254553*nuVtSqSum[0]*F_0Edge[3]-2.386485386504596*F_0Skin[1]*nuVtSqSum[2]+0.2651650429449552*F_0Edge[1]*nuVtSqSum[2]-3.551638458822559*nuVtSqSum[1]*F_0Skin[2]-0.2139541240254553*nuVtSqSum[1]*F_0Edge[2]-2.668171775767068*F_0Skin[0]*nuVtSqSum[1]+0.2964635306407854*F_0Edge[0]*nuVtSqSum[1]-2.668171775767068*nuVtSqSum[0]*F_0Skin[1]+0.2964635306407854*nuVtSqSum[0]*F_0Edge[1]; + diff_G_1_incr[0] = (-0.4743416490252568*nuVtSqSum[1]*G_1Skin[7])+0.4743416490252568*nuVtSqSum[1]*G_1Edge[7]-0.842012099081717*nuVtSqSum[2]*G_1Skin[6]-0.842012099081717*nuVtSqSum[2]*G_1Edge[6]-0.4743416490252568*nuVtSqSum[0]*G_1Skin[5]+0.4743416490252568*nuVtSqSum[0]*G_1Edge[5]-0.6629126073623879*nuVtSqSum[2]*G_1Skin[4]+0.6629126073623879*nuVtSqSum[2]*G_1Edge[4]-0.8420120990817169*nuVtSqSum[1]*G_1Skin[3]-0.8420120990817169*nuVtSqSum[1]*G_1Edge[3]-0.8420120990817169*nuVtSqSum[0]*G_1Skin[2]-0.8420120990817169*nuVtSqSum[0]*G_1Edge[2]-0.6629126073623879*G_1Skin[1]*nuVtSqSum[1]+0.6629126073623879*G_1Edge[1]*nuVtSqSum[1]-0.6629126073623879*G_1Skin[0]*nuVtSqSum[0]+0.6629126073623879*G_1Edge[0]*nuVtSqSum[0]; + diff_G_1_incr[1] = (-0.4242640687119285*nuVtSqSum[2]*G_1Skin[7])-0.4743416490252568*nuVtSqSum[0]*G_1Skin[7]+0.4242640687119285*nuVtSqSum[2]*G_1Edge[7]+0.4743416490252568*nuVtSqSum[0]*G_1Edge[7]-0.7531185165696033*nuVtSqSum[1]*G_1Skin[6]-0.7531185165696033*nuVtSqSum[1]*G_1Edge[6]-0.4743416490252568*nuVtSqSum[1]*G_1Skin[5]+0.4743416490252568*nuVtSqSum[1]*G_1Edge[5]-0.592927061281571*nuVtSqSum[1]*G_1Skin[4]+0.592927061281571*nuVtSqSum[1]*G_1Edge[4]-0.753118516569603*nuVtSqSum[2]*G_1Skin[3]-0.8420120990817169*nuVtSqSum[0]*G_1Skin[3]-0.753118516569603*nuVtSqSum[2]*G_1Edge[3]-0.8420120990817169*nuVtSqSum[0]*G_1Edge[3]-0.592927061281571*G_1Skin[1]*nuVtSqSum[2]+0.592927061281571*G_1Edge[1]*nuVtSqSum[2]-0.8420120990817169*nuVtSqSum[1]*G_1Skin[2]-0.8420120990817169*nuVtSqSum[1]*G_1Edge[2]-0.6629126073623879*G_1Skin[0]*nuVtSqSum[1]+0.6629126073623879*G_1Edge[0]*nuVtSqSum[1]-0.6629126073623879*nuVtSqSum[0]*G_1Skin[1]+0.6629126073623879*nuVtSqSum[0]*G_1Edge[1]; + diff_G_1_incr[2] = (-1.121119609893386*nuVtSqSum[1]*G_1Skin[7])+0.522048062622111*nuVtSqSum[1]*G_1Edge[7]-1.889300930982805*nuVtSqSum[2]*G_1Skin[6]-1.027514541411701*nuVtSqSum[2]*G_1Edge[6]-1.121119609893386*nuVtSqSum[0]*G_1Skin[5]+0.522048062622111*nuVtSqSum[0]*G_1Edge[5]-1.454384534777511*nuVtSqSum[2]*G_1Skin[4]+0.8420120990817169*nuVtSqSum[2]*G_1Edge[4]-1.889300930982805*nuVtSqSum[1]*G_1Skin[3]-1.027514541411701*nuVtSqSum[1]*G_1Edge[3]-1.889300930982805*nuVtSqSum[0]*G_1Skin[2]-1.027514541411701*nuVtSqSum[0]*G_1Edge[2]-1.454384534777511*G_1Skin[1]*nuVtSqSum[1]+0.8420120990817169*G_1Edge[1]*nuVtSqSum[1]-1.454384534777511*G_1Skin[0]*nuVtSqSum[0]+0.8420120990817169*G_1Edge[0]*nuVtSqSum[0]; + diff_G_1_incr[3] = (-1.002759863451863*nuVtSqSum[2]*G_1Skin[7])-1.121119609893386*nuVtSqSum[0]*G_1Skin[7]+0.466933982218043*nuVtSqSum[2]*G_1Edge[7]+0.522048062622111*nuVtSqSum[0]*G_1Edge[7]-1.689842124652476*nuVtSqSum[1]*G_1Skin[6]-0.9190369449864345*nuVtSqSum[1]*G_1Edge[6]-1.121119609893386*nuVtSqSum[1]*G_1Skin[5]+0.522048062622111*nuVtSqSum[1]*G_1Edge[5]-1.300841074074769*nuVtSqSum[1]*G_1Skin[4]+0.753118516569603*nuVtSqSum[1]*G_1Edge[4]-1.689842124652476*nuVtSqSum[2]*G_1Skin[3]-1.889300930982805*nuVtSqSum[0]*G_1Skin[3]-0.9190369449864345*nuVtSqSum[2]*G_1Edge[3]-1.027514541411701*nuVtSqSum[0]*G_1Edge[3]-1.300841074074769*G_1Skin[1]*nuVtSqSum[2]+0.753118516569603*G_1Edge[1]*nuVtSqSum[2]-1.889300930982805*nuVtSqSum[1]*G_1Skin[2]-1.027514541411701*nuVtSqSum[1]*G_1Edge[2]-1.454384534777511*G_1Skin[0]*nuVtSqSum[1]+0.8420120990817169*G_1Edge[0]*nuVtSqSum[1]-1.454384534777511*nuVtSqSum[0]*G_1Skin[1]+0.8420120990817169*nuVtSqSum[0]*G_1Edge[1]; + diff_G_1_incr[4] = (-0.4242640687119285*nuVtSqSum[1]*G_1Skin[7])+0.4242640687119285*nuVtSqSum[1]*G_1Edge[7]-0.5379417975497165*nuVtSqSum[2]*G_1Skin[6]-0.842012099081717*nuVtSqSum[0]*G_1Skin[6]-0.5379417975497165*nuVtSqSum[2]*G_1Edge[6]-0.842012099081717*nuVtSqSum[0]*G_1Edge[6]-0.4743416490252568*nuVtSqSum[2]*G_1Skin[5]+0.4743416490252568*nuVtSqSum[2]*G_1Edge[5]-0.4235193294868364*nuVtSqSum[2]*G_1Skin[4]-0.6629126073623879*nuVtSqSum[0]*G_1Skin[4]+0.4235193294868364*nuVtSqSum[2]*G_1Edge[4]+0.6629126073623879*nuVtSqSum[0]*G_1Edge[4]-0.753118516569603*nuVtSqSum[1]*G_1Skin[3]-0.753118516569603*nuVtSqSum[1]*G_1Edge[3]-0.8420120990817169*G_1Skin[2]*nuVtSqSum[2]-0.8420120990817169*G_1Edge[2]*nuVtSqSum[2]-0.6629126073623879*G_1Skin[0]*nuVtSqSum[2]+0.6629126073623879*G_1Edge[0]*nuVtSqSum[2]-0.592927061281571*G_1Skin[1]*nuVtSqSum[1]+0.592927061281571*G_1Edge[1]*nuVtSqSum[1]; + diff_G_1_incr[5] = (-2.220757234663999*nuVtSqSum[1]*G_1Skin[7])-0.09943689110435815*nuVtSqSum[1]*G_1Edge[7]-3.551638458822559*nuVtSqSum[2]*G_1Skin[6]-0.2139541240254553*nuVtSqSum[2]*G_1Edge[6]-2.220757234663999*nuVtSqSum[0]*G_1Skin[5]-0.09943689110435816*nuVtSqSum[0]*G_1Edge[5]-2.668171775767069*nuVtSqSum[2]*G_1Skin[4]+0.2964635306407854*nuVtSqSum[2]*G_1Edge[4]-3.551638458822559*nuVtSqSum[1]*G_1Skin[3]-0.2139541240254554*nuVtSqSum[1]*G_1Edge[3]-3.551638458822559*nuVtSqSum[0]*G_1Skin[2]-0.2139541240254554*nuVtSqSum[0]*G_1Edge[2]-2.668171775767069*G_1Skin[1]*nuVtSqSum[1]+0.2964635306407854*G_1Edge[1]*nuVtSqSum[1]-2.668171775767069*G_1Skin[0]*nuVtSqSum[0]+0.2964635306407854*G_1Edge[0]*nuVtSqSum[0]; + diff_G_1_incr[6] = (-1.002759863451863*nuVtSqSum[1]*G_1Skin[7])+0.4669339822180429*nuVtSqSum[1]*G_1Edge[7]-1.207030089037483*nuVtSqSum[2]*G_1Skin[6]-1.889300930982805*nuVtSqSum[0]*G_1Skin[6]-0.6564549607045962*nuVtSqSum[2]*G_1Edge[6]-1.027514541411701*nuVtSqSum[0]*G_1Edge[6]-1.121119609893386*nuVtSqSum[2]*G_1Skin[5]+0.522048062622111*nuVtSqSum[2]*G_1Edge[5]-0.9291721957676923*nuVtSqSum[2]*G_1Skin[4]-1.454384534777511*nuVtSqSum[0]*G_1Skin[4]+0.5379417975497165*nuVtSqSum[2]*G_1Edge[4]+0.842012099081717*nuVtSqSum[0]*G_1Edge[4]-1.689842124652476*nuVtSqSum[1]*G_1Skin[3]-0.9190369449864345*nuVtSqSum[1]*G_1Edge[3]-1.889300930982805*G_1Skin[2]*nuVtSqSum[2]-1.027514541411701*G_1Edge[2]*nuVtSqSum[2]-1.454384534777511*G_1Skin[0]*nuVtSqSum[2]+0.842012099081717*G_1Edge[0]*nuVtSqSum[2]-1.300841074074769*G_1Skin[1]*nuVtSqSum[1]+0.7531185165696033*G_1Edge[1]*nuVtSqSum[1]; + diff_G_1_incr[7] = (-1.986305655293262*nuVtSqSum[2]*G_1Skin[7])-2.220757234663999*nuVtSqSum[0]*G_1Skin[7]-0.0889390591922356*nuVtSqSum[2]*G_1Edge[7]-0.09943689110435816*nuVtSqSum[0]*G_1Edge[7]-3.176682010171931*nuVtSqSum[1]*G_1Skin[6]-0.1913663861549356*nuVtSqSum[1]*G_1Edge[6]-2.220757234663999*nuVtSqSum[1]*G_1Skin[5]-0.09943689110435815*nuVtSqSum[1]*G_1Edge[5]-2.386485386504596*nuVtSqSum[1]*G_1Skin[4]+0.2651650429449552*nuVtSqSum[1]*G_1Edge[4]-3.176682010171931*nuVtSqSum[2]*G_1Skin[3]-3.551638458822559*nuVtSqSum[0]*G_1Skin[3]-0.1913663861549357*nuVtSqSum[2]*G_1Edge[3]-0.2139541240254553*nuVtSqSum[0]*G_1Edge[3]-2.386485386504596*G_1Skin[1]*nuVtSqSum[2]+0.2651650429449552*G_1Edge[1]*nuVtSqSum[2]-3.551638458822559*nuVtSqSum[1]*G_1Skin[2]-0.2139541240254553*nuVtSqSum[1]*G_1Edge[2]-2.668171775767068*G_1Skin[0]*nuVtSqSum[1]+0.2964635306407854*G_1Edge[0]*nuVtSqSum[1]-2.668171775767068*nuVtSqSum[0]*G_1Skin[1]+0.2964635306407854*nuVtSqSum[0]*G_1Edge[1]; - edge_F_0_incr[2] = 1.369306393762915*nuVtSq[1]*F_0Skin[7]-1.060660171779821*nuVtSq[2]*F_0Skin[6]+1.369306393762915*nuVtSq[0]*F_0Skin[5]+0.6123724356957944*nuVtSq[2]*F_0Skin[4]-1.060660171779821*nuVtSq[1]*F_0Skin[3]-1.060660171779821*nuVtSq[0]*F_0Skin[2]+0.6123724356957944*F_0Skin[1]*nuVtSq[1]+0.6123724356957944*F_0Skin[0]*nuVtSq[0]; - edge_F_0_incr[3] = 1.224744871391589*nuVtSq[2]*F_0Skin[7]+1.369306393762915*nuVtSq[0]*F_0Skin[7]-0.9486832980505138*nuVtSq[1]*F_0Skin[6]+1.369306393762915*nuVtSq[1]*F_0Skin[5]+0.5477225575051661*nuVtSq[1]*F_0Skin[4]-0.9486832980505137*nuVtSq[2]*F_0Skin[3]-1.060660171779821*nuVtSq[0]*F_0Skin[3]+0.5477225575051661*F_0Skin[1]*nuVtSq[2]-1.060660171779821*nuVtSq[1]*F_0Skin[2]+0.6123724356957944*F_0Skin[0]*nuVtSq[1]+0.6123724356957944*nuVtSq[0]*F_0Skin[1]; - edge_F_0_incr[5] = (-5.303300858899106*nuVtSq[1]*F_0Skin[7])+4.107919181288745*nuVtSq[2]*F_0Skin[6]-5.303300858899105*nuVtSq[0]*F_0Skin[5]-2.371708245126284*nuVtSq[2]*F_0Skin[4]+4.107919181288745*nuVtSq[1]*F_0Skin[3]+4.107919181288745*nuVtSq[0]*F_0Skin[2]-2.371708245126284*F_0Skin[1]*nuVtSq[1]-2.371708245126284*F_0Skin[0]*nuVtSq[0]; - edge_F_0_incr[6] = 1.224744871391589*nuVtSq[1]*F_0Skin[7]-0.6776309271789384*nuVtSq[2]*F_0Skin[6]-1.060660171779821*nuVtSq[0]*F_0Skin[6]+1.369306393762915*nuVtSq[2]*F_0Skin[5]+0.3912303982179757*nuVtSq[2]*F_0Skin[4]+0.6123724356957944*nuVtSq[0]*F_0Skin[4]-0.9486832980505138*nuVtSq[1]*F_0Skin[3]-1.060660171779821*F_0Skin[2]*nuVtSq[2]+0.6123724356957944*F_0Skin[0]*nuVtSq[2]+0.5477225575051661*F_0Skin[1]*nuVtSq[1]; - edge_F_0_incr[7] = (-4.743416490252569*nuVtSq[2]*F_0Skin[7])-5.303300858899105*nuVtSq[0]*F_0Skin[7]+3.674234614174766*nuVtSq[1]*F_0Skin[6]-5.303300858899106*nuVtSq[1]*F_0Skin[5]-2.121320343559642*nuVtSq[1]*F_0Skin[4]+3.674234614174767*nuVtSq[2]*F_0Skin[3]+4.107919181288746*nuVtSq[0]*F_0Skin[3]-2.121320343559642*F_0Skin[1]*nuVtSq[2]+4.107919181288746*nuVtSq[1]*F_0Skin[2]-2.371708245126284*F_0Skin[0]*nuVtSq[1]-2.371708245126284*nuVtSq[0]*F_0Skin[1]; - edge_G_1_incr[2] = 1.369306393762915*nuVtSq[1]*G_1Skin[7]-1.060660171779821*nuVtSq[2]*G_1Skin[6]+1.369306393762915*nuVtSq[0]*G_1Skin[5]+0.6123724356957944*nuVtSq[2]*G_1Skin[4]-1.060660171779821*nuVtSq[1]*G_1Skin[3]-1.060660171779821*nuVtSq[0]*G_1Skin[2]+0.6123724356957944*G_1Skin[1]*nuVtSq[1]+0.6123724356957944*G_1Skin[0]*nuVtSq[0]; - edge_G_1_incr[3] = 1.224744871391589*nuVtSq[2]*G_1Skin[7]+1.369306393762915*nuVtSq[0]*G_1Skin[7]-0.9486832980505138*nuVtSq[1]*G_1Skin[6]+1.369306393762915*nuVtSq[1]*G_1Skin[5]+0.5477225575051661*nuVtSq[1]*G_1Skin[4]-0.9486832980505137*nuVtSq[2]*G_1Skin[3]-1.060660171779821*nuVtSq[0]*G_1Skin[3]+0.5477225575051661*G_1Skin[1]*nuVtSq[2]-1.060660171779821*nuVtSq[1]*G_1Skin[2]+0.6123724356957944*G_1Skin[0]*nuVtSq[1]+0.6123724356957944*nuVtSq[0]*G_1Skin[1]; - edge_G_1_incr[5] = (-5.303300858899106*nuVtSq[1]*G_1Skin[7])+4.107919181288745*nuVtSq[2]*G_1Skin[6]-5.303300858899105*nuVtSq[0]*G_1Skin[5]-2.371708245126284*nuVtSq[2]*G_1Skin[4]+4.107919181288745*nuVtSq[1]*G_1Skin[3]+4.107919181288745*nuVtSq[0]*G_1Skin[2]-2.371708245126284*G_1Skin[1]*nuVtSq[1]-2.371708245126284*G_1Skin[0]*nuVtSq[0]; - edge_G_1_incr[6] = 1.224744871391589*nuVtSq[1]*G_1Skin[7]-0.6776309271789384*nuVtSq[2]*G_1Skin[6]-1.060660171779821*nuVtSq[0]*G_1Skin[6]+1.369306393762915*nuVtSq[2]*G_1Skin[5]+0.3912303982179757*nuVtSq[2]*G_1Skin[4]+0.6123724356957944*nuVtSq[0]*G_1Skin[4]-0.9486832980505138*nuVtSq[1]*G_1Skin[3]-1.060660171779821*G_1Skin[2]*nuVtSq[2]+0.6123724356957944*G_1Skin[0]*nuVtSq[2]+0.5477225575051661*G_1Skin[1]*nuVtSq[1]; - edge_G_1_incr[7] = (-4.743416490252569*nuVtSq[2]*G_1Skin[7])-5.303300858899105*nuVtSq[0]*G_1Skin[7]+3.674234614174766*nuVtSq[1]*G_1Skin[6]-5.303300858899106*nuVtSq[1]*G_1Skin[5]-2.121320343559642*nuVtSq[1]*G_1Skin[4]+3.674234614174767*nuVtSq[2]*G_1Skin[3]+4.107919181288746*nuVtSq[0]*G_1Skin[3]-2.121320343559642*G_1Skin[1]*nuVtSq[2]+4.107919181288746*nuVtSq[1]*G_1Skin[2]-2.371708245126284*G_1Skin[0]*nuVtSq[1]-2.371708245126284*nuVtSq[0]*G_1Skin[1]; + edge_F_0_incr[2] = 1.369306393762915*nuVtSqSum[1]*F_0Skin[7]-1.060660171779821*nuVtSqSum[2]*F_0Skin[6]+1.369306393762915*nuVtSqSum[0]*F_0Skin[5]+0.6123724356957944*nuVtSqSum[2]*F_0Skin[4]-1.060660171779821*nuVtSqSum[1]*F_0Skin[3]-1.060660171779821*nuVtSqSum[0]*F_0Skin[2]+0.6123724356957944*F_0Skin[1]*nuVtSqSum[1]+0.6123724356957944*F_0Skin[0]*nuVtSqSum[0]; + edge_F_0_incr[3] = 1.224744871391589*nuVtSqSum[2]*F_0Skin[7]+1.369306393762915*nuVtSqSum[0]*F_0Skin[7]-0.9486832980505138*nuVtSqSum[1]*F_0Skin[6]+1.369306393762915*nuVtSqSum[1]*F_0Skin[5]+0.5477225575051661*nuVtSqSum[1]*F_0Skin[4]-0.9486832980505137*nuVtSqSum[2]*F_0Skin[3]-1.060660171779821*nuVtSqSum[0]*F_0Skin[3]+0.5477225575051661*F_0Skin[1]*nuVtSqSum[2]-1.060660171779821*nuVtSqSum[1]*F_0Skin[2]+0.6123724356957944*F_0Skin[0]*nuVtSqSum[1]+0.6123724356957944*nuVtSqSum[0]*F_0Skin[1]; + edge_F_0_incr[5] = (-5.303300858899106*nuVtSqSum[1]*F_0Skin[7])+4.107919181288745*nuVtSqSum[2]*F_0Skin[6]-5.303300858899105*nuVtSqSum[0]*F_0Skin[5]-2.371708245126284*nuVtSqSum[2]*F_0Skin[4]+4.107919181288745*nuVtSqSum[1]*F_0Skin[3]+4.107919181288745*nuVtSqSum[0]*F_0Skin[2]-2.371708245126284*F_0Skin[1]*nuVtSqSum[1]-2.371708245126284*F_0Skin[0]*nuVtSqSum[0]; + edge_F_0_incr[6] = 1.224744871391589*nuVtSqSum[1]*F_0Skin[7]-0.6776309271789384*nuVtSqSum[2]*F_0Skin[6]-1.060660171779821*nuVtSqSum[0]*F_0Skin[6]+1.369306393762915*nuVtSqSum[2]*F_0Skin[5]+0.3912303982179757*nuVtSqSum[2]*F_0Skin[4]+0.6123724356957944*nuVtSqSum[0]*F_0Skin[4]-0.9486832980505138*nuVtSqSum[1]*F_0Skin[3]-1.060660171779821*F_0Skin[2]*nuVtSqSum[2]+0.6123724356957944*F_0Skin[0]*nuVtSqSum[2]+0.5477225575051661*F_0Skin[1]*nuVtSqSum[1]; + edge_F_0_incr[7] = (-4.743416490252569*nuVtSqSum[2]*F_0Skin[7])-5.303300858899105*nuVtSqSum[0]*F_0Skin[7]+3.674234614174766*nuVtSqSum[1]*F_0Skin[6]-5.303300858899106*nuVtSqSum[1]*F_0Skin[5]-2.121320343559642*nuVtSqSum[1]*F_0Skin[4]+3.674234614174767*nuVtSqSum[2]*F_0Skin[3]+4.107919181288746*nuVtSqSum[0]*F_0Skin[3]-2.121320343559642*F_0Skin[1]*nuVtSqSum[2]+4.107919181288746*nuVtSqSum[1]*F_0Skin[2]-2.371708245126284*F_0Skin[0]*nuVtSqSum[1]-2.371708245126284*nuVtSqSum[0]*F_0Skin[1]; + edge_G_1_incr[2] = 1.369306393762915*nuVtSqSum[1]*G_1Skin[7]-1.060660171779821*nuVtSqSum[2]*G_1Skin[6]+1.369306393762915*nuVtSqSum[0]*G_1Skin[5]+0.6123724356957944*nuVtSqSum[2]*G_1Skin[4]-1.060660171779821*nuVtSqSum[1]*G_1Skin[3]-1.060660171779821*nuVtSqSum[0]*G_1Skin[2]+0.6123724356957944*G_1Skin[1]*nuVtSqSum[1]+0.6123724356957944*G_1Skin[0]*nuVtSqSum[0]; + edge_G_1_incr[3] = 1.224744871391589*nuVtSqSum[2]*G_1Skin[7]+1.369306393762915*nuVtSqSum[0]*G_1Skin[7]-0.9486832980505138*nuVtSqSum[1]*G_1Skin[6]+1.369306393762915*nuVtSqSum[1]*G_1Skin[5]+0.5477225575051661*nuVtSqSum[1]*G_1Skin[4]-0.9486832980505137*nuVtSqSum[2]*G_1Skin[3]-1.060660171779821*nuVtSqSum[0]*G_1Skin[3]+0.5477225575051661*G_1Skin[1]*nuVtSqSum[2]-1.060660171779821*nuVtSqSum[1]*G_1Skin[2]+0.6123724356957944*G_1Skin[0]*nuVtSqSum[1]+0.6123724356957944*nuVtSqSum[0]*G_1Skin[1]; + edge_G_1_incr[5] = (-5.303300858899106*nuVtSqSum[1]*G_1Skin[7])+4.107919181288745*nuVtSqSum[2]*G_1Skin[6]-5.303300858899105*nuVtSqSum[0]*G_1Skin[5]-2.371708245126284*nuVtSqSum[2]*G_1Skin[4]+4.107919181288745*nuVtSqSum[1]*G_1Skin[3]+4.107919181288745*nuVtSqSum[0]*G_1Skin[2]-2.371708245126284*G_1Skin[1]*nuVtSqSum[1]-2.371708245126284*G_1Skin[0]*nuVtSqSum[0]; + edge_G_1_incr[6] = 1.224744871391589*nuVtSqSum[1]*G_1Skin[7]-0.6776309271789384*nuVtSqSum[2]*G_1Skin[6]-1.060660171779821*nuVtSqSum[0]*G_1Skin[6]+1.369306393762915*nuVtSqSum[2]*G_1Skin[5]+0.3912303982179757*nuVtSqSum[2]*G_1Skin[4]+0.6123724356957944*nuVtSqSum[0]*G_1Skin[4]-0.9486832980505138*nuVtSqSum[1]*G_1Skin[3]-1.060660171779821*G_1Skin[2]*nuVtSqSum[2]+0.6123724356957944*G_1Skin[0]*nuVtSqSum[2]+0.5477225575051661*G_1Skin[1]*nuVtSqSum[1]; + edge_G_1_incr[7] = (-4.743416490252569*nuVtSqSum[2]*G_1Skin[7])-5.303300858899105*nuVtSqSum[0]*G_1Skin[7]+3.674234614174766*nuVtSqSum[1]*G_1Skin[6]-5.303300858899106*nuVtSqSum[1]*G_1Skin[5]-2.121320343559642*nuVtSqSum[1]*G_1Skin[4]+3.674234614174767*nuVtSqSum[2]*G_1Skin[3]+4.107919181288746*nuVtSqSum[0]*G_1Skin[3]-2.121320343559642*G_1Skin[1]*nuVtSqSum[2]+4.107919181288746*nuVtSqSum[1]*G_1Skin[2]-2.371708245126284*G_1Skin[0]*nuVtSqSum[1]-2.371708245126284*nuVtSqSum[0]*G_1Skin[1]; } else { - diff_F_0_incr[0] = (-0.4743416490252568*nuVtSq[1]*F_0Skin[7])+0.4743416490252568*nuVtSq[1]*F_0Edge[7]+0.842012099081717*nuVtSq[2]*F_0Skin[6]+0.842012099081717*nuVtSq[2]*F_0Edge[6]-0.4743416490252568*nuVtSq[0]*F_0Skin[5]+0.4743416490252568*nuVtSq[0]*F_0Edge[5]-0.6629126073623879*nuVtSq[2]*F_0Skin[4]+0.6629126073623879*nuVtSq[2]*F_0Edge[4]+0.8420120990817169*nuVtSq[1]*F_0Skin[3]+0.8420120990817169*nuVtSq[1]*F_0Edge[3]+0.8420120990817169*nuVtSq[0]*F_0Skin[2]+0.8420120990817169*nuVtSq[0]*F_0Edge[2]-0.6629126073623879*F_0Skin[1]*nuVtSq[1]+0.6629126073623879*F_0Edge[1]*nuVtSq[1]-0.6629126073623879*F_0Skin[0]*nuVtSq[0]+0.6629126073623879*F_0Edge[0]*nuVtSq[0]; - diff_F_0_incr[1] = (-0.4242640687119285*nuVtSq[2]*F_0Skin[7])-0.4743416490252568*nuVtSq[0]*F_0Skin[7]+0.4242640687119285*nuVtSq[2]*F_0Edge[7]+0.4743416490252568*nuVtSq[0]*F_0Edge[7]+0.7531185165696033*nuVtSq[1]*F_0Skin[6]+0.7531185165696033*nuVtSq[1]*F_0Edge[6]-0.4743416490252568*nuVtSq[1]*F_0Skin[5]+0.4743416490252568*nuVtSq[1]*F_0Edge[5]-0.592927061281571*nuVtSq[1]*F_0Skin[4]+0.592927061281571*nuVtSq[1]*F_0Edge[4]+0.753118516569603*nuVtSq[2]*F_0Skin[3]+0.8420120990817169*nuVtSq[0]*F_0Skin[3]+0.753118516569603*nuVtSq[2]*F_0Edge[3]+0.8420120990817169*nuVtSq[0]*F_0Edge[3]-0.592927061281571*F_0Skin[1]*nuVtSq[2]+0.592927061281571*F_0Edge[1]*nuVtSq[2]+0.8420120990817169*nuVtSq[1]*F_0Skin[2]+0.8420120990817169*nuVtSq[1]*F_0Edge[2]-0.6629126073623879*F_0Skin[0]*nuVtSq[1]+0.6629126073623879*F_0Edge[0]*nuVtSq[1]-0.6629126073623879*nuVtSq[0]*F_0Skin[1]+0.6629126073623879*nuVtSq[0]*F_0Edge[1]; - diff_F_0_incr[2] = 1.121119609893386*nuVtSq[1]*F_0Skin[7]-0.522048062622111*nuVtSq[1]*F_0Edge[7]-1.889300930982805*nuVtSq[2]*F_0Skin[6]-1.027514541411701*nuVtSq[2]*F_0Edge[6]+1.121119609893386*nuVtSq[0]*F_0Skin[5]-0.522048062622111*nuVtSq[0]*F_0Edge[5]+1.454384534777511*nuVtSq[2]*F_0Skin[4]-0.8420120990817169*nuVtSq[2]*F_0Edge[4]-1.889300930982805*nuVtSq[1]*F_0Skin[3]-1.027514541411701*nuVtSq[1]*F_0Edge[3]-1.889300930982805*nuVtSq[0]*F_0Skin[2]-1.027514541411701*nuVtSq[0]*F_0Edge[2]+1.454384534777511*F_0Skin[1]*nuVtSq[1]-0.8420120990817169*F_0Edge[1]*nuVtSq[1]+1.454384534777511*F_0Skin[0]*nuVtSq[0]-0.8420120990817169*F_0Edge[0]*nuVtSq[0]; - diff_F_0_incr[3] = 1.002759863451863*nuVtSq[2]*F_0Skin[7]+1.121119609893386*nuVtSq[0]*F_0Skin[7]-0.466933982218043*nuVtSq[2]*F_0Edge[7]-0.522048062622111*nuVtSq[0]*F_0Edge[7]-1.689842124652476*nuVtSq[1]*F_0Skin[6]-0.9190369449864345*nuVtSq[1]*F_0Edge[6]+1.121119609893386*nuVtSq[1]*F_0Skin[5]-0.522048062622111*nuVtSq[1]*F_0Edge[5]+1.300841074074769*nuVtSq[1]*F_0Skin[4]-0.753118516569603*nuVtSq[1]*F_0Edge[4]-1.689842124652476*nuVtSq[2]*F_0Skin[3]-1.889300930982805*nuVtSq[0]*F_0Skin[3]-0.9190369449864345*nuVtSq[2]*F_0Edge[3]-1.027514541411701*nuVtSq[0]*F_0Edge[3]+1.300841074074769*F_0Skin[1]*nuVtSq[2]-0.753118516569603*F_0Edge[1]*nuVtSq[2]-1.889300930982805*nuVtSq[1]*F_0Skin[2]-1.027514541411701*nuVtSq[1]*F_0Edge[2]+1.454384534777511*F_0Skin[0]*nuVtSq[1]-0.8420120990817169*F_0Edge[0]*nuVtSq[1]+1.454384534777511*nuVtSq[0]*F_0Skin[1]-0.8420120990817169*nuVtSq[0]*F_0Edge[1]; - diff_F_0_incr[4] = (-0.4242640687119285*nuVtSq[1]*F_0Skin[7])+0.4242640687119285*nuVtSq[1]*F_0Edge[7]+0.5379417975497165*nuVtSq[2]*F_0Skin[6]+0.842012099081717*nuVtSq[0]*F_0Skin[6]+0.5379417975497165*nuVtSq[2]*F_0Edge[6]+0.842012099081717*nuVtSq[0]*F_0Edge[6]-0.4743416490252568*nuVtSq[2]*F_0Skin[5]+0.4743416490252568*nuVtSq[2]*F_0Edge[5]-0.4235193294868364*nuVtSq[2]*F_0Skin[4]-0.6629126073623879*nuVtSq[0]*F_0Skin[4]+0.4235193294868364*nuVtSq[2]*F_0Edge[4]+0.6629126073623879*nuVtSq[0]*F_0Edge[4]+0.753118516569603*nuVtSq[1]*F_0Skin[3]+0.753118516569603*nuVtSq[1]*F_0Edge[3]+0.8420120990817169*F_0Skin[2]*nuVtSq[2]+0.8420120990817169*F_0Edge[2]*nuVtSq[2]-0.6629126073623879*F_0Skin[0]*nuVtSq[2]+0.6629126073623879*F_0Edge[0]*nuVtSq[2]-0.592927061281571*F_0Skin[1]*nuVtSq[1]+0.592927061281571*F_0Edge[1]*nuVtSq[1]; - diff_F_0_incr[5] = (-2.220757234663999*nuVtSq[1]*F_0Skin[7])-0.09943689110435815*nuVtSq[1]*F_0Edge[7]+3.551638458822559*nuVtSq[2]*F_0Skin[6]+0.2139541240254553*nuVtSq[2]*F_0Edge[6]-2.220757234663999*nuVtSq[0]*F_0Skin[5]-0.09943689110435816*nuVtSq[0]*F_0Edge[5]-2.668171775767069*nuVtSq[2]*F_0Skin[4]+0.2964635306407854*nuVtSq[2]*F_0Edge[4]+3.551638458822559*nuVtSq[1]*F_0Skin[3]+0.2139541240254554*nuVtSq[1]*F_0Edge[3]+3.551638458822559*nuVtSq[0]*F_0Skin[2]+0.2139541240254554*nuVtSq[0]*F_0Edge[2]-2.668171775767069*F_0Skin[1]*nuVtSq[1]+0.2964635306407854*F_0Edge[1]*nuVtSq[1]-2.668171775767069*F_0Skin[0]*nuVtSq[0]+0.2964635306407854*F_0Edge[0]*nuVtSq[0]; - diff_F_0_incr[6] = 1.002759863451863*nuVtSq[1]*F_0Skin[7]-0.4669339822180429*nuVtSq[1]*F_0Edge[7]-1.207030089037483*nuVtSq[2]*F_0Skin[6]-1.889300930982805*nuVtSq[0]*F_0Skin[6]-0.6564549607045962*nuVtSq[2]*F_0Edge[6]-1.027514541411701*nuVtSq[0]*F_0Edge[6]+1.121119609893386*nuVtSq[2]*F_0Skin[5]-0.522048062622111*nuVtSq[2]*F_0Edge[5]+0.9291721957676923*nuVtSq[2]*F_0Skin[4]+1.454384534777511*nuVtSq[0]*F_0Skin[4]-0.5379417975497165*nuVtSq[2]*F_0Edge[4]-0.842012099081717*nuVtSq[0]*F_0Edge[4]-1.689842124652476*nuVtSq[1]*F_0Skin[3]-0.9190369449864345*nuVtSq[1]*F_0Edge[3]-1.889300930982805*F_0Skin[2]*nuVtSq[2]-1.027514541411701*F_0Edge[2]*nuVtSq[2]+1.454384534777511*F_0Skin[0]*nuVtSq[2]-0.842012099081717*F_0Edge[0]*nuVtSq[2]+1.300841074074769*F_0Skin[1]*nuVtSq[1]-0.7531185165696033*F_0Edge[1]*nuVtSq[1]; - diff_F_0_incr[7] = (-1.986305655293262*nuVtSq[2]*F_0Skin[7])-2.220757234663999*nuVtSq[0]*F_0Skin[7]-0.0889390591922356*nuVtSq[2]*F_0Edge[7]-0.09943689110435816*nuVtSq[0]*F_0Edge[7]+3.176682010171931*nuVtSq[1]*F_0Skin[6]+0.1913663861549356*nuVtSq[1]*F_0Edge[6]-2.220757234663999*nuVtSq[1]*F_0Skin[5]-0.09943689110435815*nuVtSq[1]*F_0Edge[5]-2.386485386504596*nuVtSq[1]*F_0Skin[4]+0.2651650429449552*nuVtSq[1]*F_0Edge[4]+3.176682010171931*nuVtSq[2]*F_0Skin[3]+3.551638458822559*nuVtSq[0]*F_0Skin[3]+0.1913663861549357*nuVtSq[2]*F_0Edge[3]+0.2139541240254553*nuVtSq[0]*F_0Edge[3]-2.386485386504596*F_0Skin[1]*nuVtSq[2]+0.2651650429449552*F_0Edge[1]*nuVtSq[2]+3.551638458822559*nuVtSq[1]*F_0Skin[2]+0.2139541240254553*nuVtSq[1]*F_0Edge[2]-2.668171775767068*F_0Skin[0]*nuVtSq[1]+0.2964635306407854*F_0Edge[0]*nuVtSq[1]-2.668171775767068*nuVtSq[0]*F_0Skin[1]+0.2964635306407854*nuVtSq[0]*F_0Edge[1]; - diff_G_1_incr[0] = (-0.4743416490252568*nuVtSq[1]*G_1Skin[7])+0.4743416490252568*nuVtSq[1]*G_1Edge[7]+0.842012099081717*nuVtSq[2]*G_1Skin[6]+0.842012099081717*nuVtSq[2]*G_1Edge[6]-0.4743416490252568*nuVtSq[0]*G_1Skin[5]+0.4743416490252568*nuVtSq[0]*G_1Edge[5]-0.6629126073623879*nuVtSq[2]*G_1Skin[4]+0.6629126073623879*nuVtSq[2]*G_1Edge[4]+0.8420120990817169*nuVtSq[1]*G_1Skin[3]+0.8420120990817169*nuVtSq[1]*G_1Edge[3]+0.8420120990817169*nuVtSq[0]*G_1Skin[2]+0.8420120990817169*nuVtSq[0]*G_1Edge[2]-0.6629126073623879*G_1Skin[1]*nuVtSq[1]+0.6629126073623879*G_1Edge[1]*nuVtSq[1]-0.6629126073623879*G_1Skin[0]*nuVtSq[0]+0.6629126073623879*G_1Edge[0]*nuVtSq[0]; - diff_G_1_incr[1] = (-0.4242640687119285*nuVtSq[2]*G_1Skin[7])-0.4743416490252568*nuVtSq[0]*G_1Skin[7]+0.4242640687119285*nuVtSq[2]*G_1Edge[7]+0.4743416490252568*nuVtSq[0]*G_1Edge[7]+0.7531185165696033*nuVtSq[1]*G_1Skin[6]+0.7531185165696033*nuVtSq[1]*G_1Edge[6]-0.4743416490252568*nuVtSq[1]*G_1Skin[5]+0.4743416490252568*nuVtSq[1]*G_1Edge[5]-0.592927061281571*nuVtSq[1]*G_1Skin[4]+0.592927061281571*nuVtSq[1]*G_1Edge[4]+0.753118516569603*nuVtSq[2]*G_1Skin[3]+0.8420120990817169*nuVtSq[0]*G_1Skin[3]+0.753118516569603*nuVtSq[2]*G_1Edge[3]+0.8420120990817169*nuVtSq[0]*G_1Edge[3]-0.592927061281571*G_1Skin[1]*nuVtSq[2]+0.592927061281571*G_1Edge[1]*nuVtSq[2]+0.8420120990817169*nuVtSq[1]*G_1Skin[2]+0.8420120990817169*nuVtSq[1]*G_1Edge[2]-0.6629126073623879*G_1Skin[0]*nuVtSq[1]+0.6629126073623879*G_1Edge[0]*nuVtSq[1]-0.6629126073623879*nuVtSq[0]*G_1Skin[1]+0.6629126073623879*nuVtSq[0]*G_1Edge[1]; - diff_G_1_incr[2] = 1.121119609893386*nuVtSq[1]*G_1Skin[7]-0.522048062622111*nuVtSq[1]*G_1Edge[7]-1.889300930982805*nuVtSq[2]*G_1Skin[6]-1.027514541411701*nuVtSq[2]*G_1Edge[6]+1.121119609893386*nuVtSq[0]*G_1Skin[5]-0.522048062622111*nuVtSq[0]*G_1Edge[5]+1.454384534777511*nuVtSq[2]*G_1Skin[4]-0.8420120990817169*nuVtSq[2]*G_1Edge[4]-1.889300930982805*nuVtSq[1]*G_1Skin[3]-1.027514541411701*nuVtSq[1]*G_1Edge[3]-1.889300930982805*nuVtSq[0]*G_1Skin[2]-1.027514541411701*nuVtSq[0]*G_1Edge[2]+1.454384534777511*G_1Skin[1]*nuVtSq[1]-0.8420120990817169*G_1Edge[1]*nuVtSq[1]+1.454384534777511*G_1Skin[0]*nuVtSq[0]-0.8420120990817169*G_1Edge[0]*nuVtSq[0]; - diff_G_1_incr[3] = 1.002759863451863*nuVtSq[2]*G_1Skin[7]+1.121119609893386*nuVtSq[0]*G_1Skin[7]-0.466933982218043*nuVtSq[2]*G_1Edge[7]-0.522048062622111*nuVtSq[0]*G_1Edge[7]-1.689842124652476*nuVtSq[1]*G_1Skin[6]-0.9190369449864345*nuVtSq[1]*G_1Edge[6]+1.121119609893386*nuVtSq[1]*G_1Skin[5]-0.522048062622111*nuVtSq[1]*G_1Edge[5]+1.300841074074769*nuVtSq[1]*G_1Skin[4]-0.753118516569603*nuVtSq[1]*G_1Edge[4]-1.689842124652476*nuVtSq[2]*G_1Skin[3]-1.889300930982805*nuVtSq[0]*G_1Skin[3]-0.9190369449864345*nuVtSq[2]*G_1Edge[3]-1.027514541411701*nuVtSq[0]*G_1Edge[3]+1.300841074074769*G_1Skin[1]*nuVtSq[2]-0.753118516569603*G_1Edge[1]*nuVtSq[2]-1.889300930982805*nuVtSq[1]*G_1Skin[2]-1.027514541411701*nuVtSq[1]*G_1Edge[2]+1.454384534777511*G_1Skin[0]*nuVtSq[1]-0.8420120990817169*G_1Edge[0]*nuVtSq[1]+1.454384534777511*nuVtSq[0]*G_1Skin[1]-0.8420120990817169*nuVtSq[0]*G_1Edge[1]; - diff_G_1_incr[4] = (-0.4242640687119285*nuVtSq[1]*G_1Skin[7])+0.4242640687119285*nuVtSq[1]*G_1Edge[7]+0.5379417975497165*nuVtSq[2]*G_1Skin[6]+0.842012099081717*nuVtSq[0]*G_1Skin[6]+0.5379417975497165*nuVtSq[2]*G_1Edge[6]+0.842012099081717*nuVtSq[0]*G_1Edge[6]-0.4743416490252568*nuVtSq[2]*G_1Skin[5]+0.4743416490252568*nuVtSq[2]*G_1Edge[5]-0.4235193294868364*nuVtSq[2]*G_1Skin[4]-0.6629126073623879*nuVtSq[0]*G_1Skin[4]+0.4235193294868364*nuVtSq[2]*G_1Edge[4]+0.6629126073623879*nuVtSq[0]*G_1Edge[4]+0.753118516569603*nuVtSq[1]*G_1Skin[3]+0.753118516569603*nuVtSq[1]*G_1Edge[3]+0.8420120990817169*G_1Skin[2]*nuVtSq[2]+0.8420120990817169*G_1Edge[2]*nuVtSq[2]-0.6629126073623879*G_1Skin[0]*nuVtSq[2]+0.6629126073623879*G_1Edge[0]*nuVtSq[2]-0.592927061281571*G_1Skin[1]*nuVtSq[1]+0.592927061281571*G_1Edge[1]*nuVtSq[1]; - diff_G_1_incr[5] = (-2.220757234663999*nuVtSq[1]*G_1Skin[7])-0.09943689110435815*nuVtSq[1]*G_1Edge[7]+3.551638458822559*nuVtSq[2]*G_1Skin[6]+0.2139541240254553*nuVtSq[2]*G_1Edge[6]-2.220757234663999*nuVtSq[0]*G_1Skin[5]-0.09943689110435816*nuVtSq[0]*G_1Edge[5]-2.668171775767069*nuVtSq[2]*G_1Skin[4]+0.2964635306407854*nuVtSq[2]*G_1Edge[4]+3.551638458822559*nuVtSq[1]*G_1Skin[3]+0.2139541240254554*nuVtSq[1]*G_1Edge[3]+3.551638458822559*nuVtSq[0]*G_1Skin[2]+0.2139541240254554*nuVtSq[0]*G_1Edge[2]-2.668171775767069*G_1Skin[1]*nuVtSq[1]+0.2964635306407854*G_1Edge[1]*nuVtSq[1]-2.668171775767069*G_1Skin[0]*nuVtSq[0]+0.2964635306407854*G_1Edge[0]*nuVtSq[0]; - diff_G_1_incr[6] = 1.002759863451863*nuVtSq[1]*G_1Skin[7]-0.4669339822180429*nuVtSq[1]*G_1Edge[7]-1.207030089037483*nuVtSq[2]*G_1Skin[6]-1.889300930982805*nuVtSq[0]*G_1Skin[6]-0.6564549607045962*nuVtSq[2]*G_1Edge[6]-1.027514541411701*nuVtSq[0]*G_1Edge[6]+1.121119609893386*nuVtSq[2]*G_1Skin[5]-0.522048062622111*nuVtSq[2]*G_1Edge[5]+0.9291721957676923*nuVtSq[2]*G_1Skin[4]+1.454384534777511*nuVtSq[0]*G_1Skin[4]-0.5379417975497165*nuVtSq[2]*G_1Edge[4]-0.842012099081717*nuVtSq[0]*G_1Edge[4]-1.689842124652476*nuVtSq[1]*G_1Skin[3]-0.9190369449864345*nuVtSq[1]*G_1Edge[3]-1.889300930982805*G_1Skin[2]*nuVtSq[2]-1.027514541411701*G_1Edge[2]*nuVtSq[2]+1.454384534777511*G_1Skin[0]*nuVtSq[2]-0.842012099081717*G_1Edge[0]*nuVtSq[2]+1.300841074074769*G_1Skin[1]*nuVtSq[1]-0.7531185165696033*G_1Edge[1]*nuVtSq[1]; - diff_G_1_incr[7] = (-1.986305655293262*nuVtSq[2]*G_1Skin[7])-2.220757234663999*nuVtSq[0]*G_1Skin[7]-0.0889390591922356*nuVtSq[2]*G_1Edge[7]-0.09943689110435816*nuVtSq[0]*G_1Edge[7]+3.176682010171931*nuVtSq[1]*G_1Skin[6]+0.1913663861549356*nuVtSq[1]*G_1Edge[6]-2.220757234663999*nuVtSq[1]*G_1Skin[5]-0.09943689110435815*nuVtSq[1]*G_1Edge[5]-2.386485386504596*nuVtSq[1]*G_1Skin[4]+0.2651650429449552*nuVtSq[1]*G_1Edge[4]+3.176682010171931*nuVtSq[2]*G_1Skin[3]+3.551638458822559*nuVtSq[0]*G_1Skin[3]+0.1913663861549357*nuVtSq[2]*G_1Edge[3]+0.2139541240254553*nuVtSq[0]*G_1Edge[3]-2.386485386504596*G_1Skin[1]*nuVtSq[2]+0.2651650429449552*G_1Edge[1]*nuVtSq[2]+3.551638458822559*nuVtSq[1]*G_1Skin[2]+0.2139541240254553*nuVtSq[1]*G_1Edge[2]-2.668171775767068*G_1Skin[0]*nuVtSq[1]+0.2964635306407854*G_1Edge[0]*nuVtSq[1]-2.668171775767068*nuVtSq[0]*G_1Skin[1]+0.2964635306407854*nuVtSq[0]*G_1Edge[1]; + diff_F_0_incr[0] = (-0.4743416490252568*nuVtSqSum[1]*F_0Skin[7])+0.4743416490252568*nuVtSqSum[1]*F_0Edge[7]+0.842012099081717*nuVtSqSum[2]*F_0Skin[6]+0.842012099081717*nuVtSqSum[2]*F_0Edge[6]-0.4743416490252568*nuVtSqSum[0]*F_0Skin[5]+0.4743416490252568*nuVtSqSum[0]*F_0Edge[5]-0.6629126073623879*nuVtSqSum[2]*F_0Skin[4]+0.6629126073623879*nuVtSqSum[2]*F_0Edge[4]+0.8420120990817169*nuVtSqSum[1]*F_0Skin[3]+0.8420120990817169*nuVtSqSum[1]*F_0Edge[3]+0.8420120990817169*nuVtSqSum[0]*F_0Skin[2]+0.8420120990817169*nuVtSqSum[0]*F_0Edge[2]-0.6629126073623879*F_0Skin[1]*nuVtSqSum[1]+0.6629126073623879*F_0Edge[1]*nuVtSqSum[1]-0.6629126073623879*F_0Skin[0]*nuVtSqSum[0]+0.6629126073623879*F_0Edge[0]*nuVtSqSum[0]; + diff_F_0_incr[1] = (-0.4242640687119285*nuVtSqSum[2]*F_0Skin[7])-0.4743416490252568*nuVtSqSum[0]*F_0Skin[7]+0.4242640687119285*nuVtSqSum[2]*F_0Edge[7]+0.4743416490252568*nuVtSqSum[0]*F_0Edge[7]+0.7531185165696033*nuVtSqSum[1]*F_0Skin[6]+0.7531185165696033*nuVtSqSum[1]*F_0Edge[6]-0.4743416490252568*nuVtSqSum[1]*F_0Skin[5]+0.4743416490252568*nuVtSqSum[1]*F_0Edge[5]-0.592927061281571*nuVtSqSum[1]*F_0Skin[4]+0.592927061281571*nuVtSqSum[1]*F_0Edge[4]+0.753118516569603*nuVtSqSum[2]*F_0Skin[3]+0.8420120990817169*nuVtSqSum[0]*F_0Skin[3]+0.753118516569603*nuVtSqSum[2]*F_0Edge[3]+0.8420120990817169*nuVtSqSum[0]*F_0Edge[3]-0.592927061281571*F_0Skin[1]*nuVtSqSum[2]+0.592927061281571*F_0Edge[1]*nuVtSqSum[2]+0.8420120990817169*nuVtSqSum[1]*F_0Skin[2]+0.8420120990817169*nuVtSqSum[1]*F_0Edge[2]-0.6629126073623879*F_0Skin[0]*nuVtSqSum[1]+0.6629126073623879*F_0Edge[0]*nuVtSqSum[1]-0.6629126073623879*nuVtSqSum[0]*F_0Skin[1]+0.6629126073623879*nuVtSqSum[0]*F_0Edge[1]; + diff_F_0_incr[2] = 1.121119609893386*nuVtSqSum[1]*F_0Skin[7]-0.522048062622111*nuVtSqSum[1]*F_0Edge[7]-1.889300930982805*nuVtSqSum[2]*F_0Skin[6]-1.027514541411701*nuVtSqSum[2]*F_0Edge[6]+1.121119609893386*nuVtSqSum[0]*F_0Skin[5]-0.522048062622111*nuVtSqSum[0]*F_0Edge[5]+1.454384534777511*nuVtSqSum[2]*F_0Skin[4]-0.8420120990817169*nuVtSqSum[2]*F_0Edge[4]-1.889300930982805*nuVtSqSum[1]*F_0Skin[3]-1.027514541411701*nuVtSqSum[1]*F_0Edge[3]-1.889300930982805*nuVtSqSum[0]*F_0Skin[2]-1.027514541411701*nuVtSqSum[0]*F_0Edge[2]+1.454384534777511*F_0Skin[1]*nuVtSqSum[1]-0.8420120990817169*F_0Edge[1]*nuVtSqSum[1]+1.454384534777511*F_0Skin[0]*nuVtSqSum[0]-0.8420120990817169*F_0Edge[0]*nuVtSqSum[0]; + diff_F_0_incr[3] = 1.002759863451863*nuVtSqSum[2]*F_0Skin[7]+1.121119609893386*nuVtSqSum[0]*F_0Skin[7]-0.466933982218043*nuVtSqSum[2]*F_0Edge[7]-0.522048062622111*nuVtSqSum[0]*F_0Edge[7]-1.689842124652476*nuVtSqSum[1]*F_0Skin[6]-0.9190369449864345*nuVtSqSum[1]*F_0Edge[6]+1.121119609893386*nuVtSqSum[1]*F_0Skin[5]-0.522048062622111*nuVtSqSum[1]*F_0Edge[5]+1.300841074074769*nuVtSqSum[1]*F_0Skin[4]-0.753118516569603*nuVtSqSum[1]*F_0Edge[4]-1.689842124652476*nuVtSqSum[2]*F_0Skin[3]-1.889300930982805*nuVtSqSum[0]*F_0Skin[3]-0.9190369449864345*nuVtSqSum[2]*F_0Edge[3]-1.027514541411701*nuVtSqSum[0]*F_0Edge[3]+1.300841074074769*F_0Skin[1]*nuVtSqSum[2]-0.753118516569603*F_0Edge[1]*nuVtSqSum[2]-1.889300930982805*nuVtSqSum[1]*F_0Skin[2]-1.027514541411701*nuVtSqSum[1]*F_0Edge[2]+1.454384534777511*F_0Skin[0]*nuVtSqSum[1]-0.8420120990817169*F_0Edge[0]*nuVtSqSum[1]+1.454384534777511*nuVtSqSum[0]*F_0Skin[1]-0.8420120990817169*nuVtSqSum[0]*F_0Edge[1]; + diff_F_0_incr[4] = (-0.4242640687119285*nuVtSqSum[1]*F_0Skin[7])+0.4242640687119285*nuVtSqSum[1]*F_0Edge[7]+0.5379417975497165*nuVtSqSum[2]*F_0Skin[6]+0.842012099081717*nuVtSqSum[0]*F_0Skin[6]+0.5379417975497165*nuVtSqSum[2]*F_0Edge[6]+0.842012099081717*nuVtSqSum[0]*F_0Edge[6]-0.4743416490252568*nuVtSqSum[2]*F_0Skin[5]+0.4743416490252568*nuVtSqSum[2]*F_0Edge[5]-0.4235193294868364*nuVtSqSum[2]*F_0Skin[4]-0.6629126073623879*nuVtSqSum[0]*F_0Skin[4]+0.4235193294868364*nuVtSqSum[2]*F_0Edge[4]+0.6629126073623879*nuVtSqSum[0]*F_0Edge[4]+0.753118516569603*nuVtSqSum[1]*F_0Skin[3]+0.753118516569603*nuVtSqSum[1]*F_0Edge[3]+0.8420120990817169*F_0Skin[2]*nuVtSqSum[2]+0.8420120990817169*F_0Edge[2]*nuVtSqSum[2]-0.6629126073623879*F_0Skin[0]*nuVtSqSum[2]+0.6629126073623879*F_0Edge[0]*nuVtSqSum[2]-0.592927061281571*F_0Skin[1]*nuVtSqSum[1]+0.592927061281571*F_0Edge[1]*nuVtSqSum[1]; + diff_F_0_incr[5] = (-2.220757234663999*nuVtSqSum[1]*F_0Skin[7])-0.09943689110435815*nuVtSqSum[1]*F_0Edge[7]+3.551638458822559*nuVtSqSum[2]*F_0Skin[6]+0.2139541240254553*nuVtSqSum[2]*F_0Edge[6]-2.220757234663999*nuVtSqSum[0]*F_0Skin[5]-0.09943689110435816*nuVtSqSum[0]*F_0Edge[5]-2.668171775767069*nuVtSqSum[2]*F_0Skin[4]+0.2964635306407854*nuVtSqSum[2]*F_0Edge[4]+3.551638458822559*nuVtSqSum[1]*F_0Skin[3]+0.2139541240254554*nuVtSqSum[1]*F_0Edge[3]+3.551638458822559*nuVtSqSum[0]*F_0Skin[2]+0.2139541240254554*nuVtSqSum[0]*F_0Edge[2]-2.668171775767069*F_0Skin[1]*nuVtSqSum[1]+0.2964635306407854*F_0Edge[1]*nuVtSqSum[1]-2.668171775767069*F_0Skin[0]*nuVtSqSum[0]+0.2964635306407854*F_0Edge[0]*nuVtSqSum[0]; + diff_F_0_incr[6] = 1.002759863451863*nuVtSqSum[1]*F_0Skin[7]-0.4669339822180429*nuVtSqSum[1]*F_0Edge[7]-1.207030089037483*nuVtSqSum[2]*F_0Skin[6]-1.889300930982805*nuVtSqSum[0]*F_0Skin[6]-0.6564549607045962*nuVtSqSum[2]*F_0Edge[6]-1.027514541411701*nuVtSqSum[0]*F_0Edge[6]+1.121119609893386*nuVtSqSum[2]*F_0Skin[5]-0.522048062622111*nuVtSqSum[2]*F_0Edge[5]+0.9291721957676923*nuVtSqSum[2]*F_0Skin[4]+1.454384534777511*nuVtSqSum[0]*F_0Skin[4]-0.5379417975497165*nuVtSqSum[2]*F_0Edge[4]-0.842012099081717*nuVtSqSum[0]*F_0Edge[4]-1.689842124652476*nuVtSqSum[1]*F_0Skin[3]-0.9190369449864345*nuVtSqSum[1]*F_0Edge[3]-1.889300930982805*F_0Skin[2]*nuVtSqSum[2]-1.027514541411701*F_0Edge[2]*nuVtSqSum[2]+1.454384534777511*F_0Skin[0]*nuVtSqSum[2]-0.842012099081717*F_0Edge[0]*nuVtSqSum[2]+1.300841074074769*F_0Skin[1]*nuVtSqSum[1]-0.7531185165696033*F_0Edge[1]*nuVtSqSum[1]; + diff_F_0_incr[7] = (-1.986305655293262*nuVtSqSum[2]*F_0Skin[7])-2.220757234663999*nuVtSqSum[0]*F_0Skin[7]-0.0889390591922356*nuVtSqSum[2]*F_0Edge[7]-0.09943689110435816*nuVtSqSum[0]*F_0Edge[7]+3.176682010171931*nuVtSqSum[1]*F_0Skin[6]+0.1913663861549356*nuVtSqSum[1]*F_0Edge[6]-2.220757234663999*nuVtSqSum[1]*F_0Skin[5]-0.09943689110435815*nuVtSqSum[1]*F_0Edge[5]-2.386485386504596*nuVtSqSum[1]*F_0Skin[4]+0.2651650429449552*nuVtSqSum[1]*F_0Edge[4]+3.176682010171931*nuVtSqSum[2]*F_0Skin[3]+3.551638458822559*nuVtSqSum[0]*F_0Skin[3]+0.1913663861549357*nuVtSqSum[2]*F_0Edge[3]+0.2139541240254553*nuVtSqSum[0]*F_0Edge[3]-2.386485386504596*F_0Skin[1]*nuVtSqSum[2]+0.2651650429449552*F_0Edge[1]*nuVtSqSum[2]+3.551638458822559*nuVtSqSum[1]*F_0Skin[2]+0.2139541240254553*nuVtSqSum[1]*F_0Edge[2]-2.668171775767068*F_0Skin[0]*nuVtSqSum[1]+0.2964635306407854*F_0Edge[0]*nuVtSqSum[1]-2.668171775767068*nuVtSqSum[0]*F_0Skin[1]+0.2964635306407854*nuVtSqSum[0]*F_0Edge[1]; + diff_G_1_incr[0] = (-0.4743416490252568*nuVtSqSum[1]*G_1Skin[7])+0.4743416490252568*nuVtSqSum[1]*G_1Edge[7]+0.842012099081717*nuVtSqSum[2]*G_1Skin[6]+0.842012099081717*nuVtSqSum[2]*G_1Edge[6]-0.4743416490252568*nuVtSqSum[0]*G_1Skin[5]+0.4743416490252568*nuVtSqSum[0]*G_1Edge[5]-0.6629126073623879*nuVtSqSum[2]*G_1Skin[4]+0.6629126073623879*nuVtSqSum[2]*G_1Edge[4]+0.8420120990817169*nuVtSqSum[1]*G_1Skin[3]+0.8420120990817169*nuVtSqSum[1]*G_1Edge[3]+0.8420120990817169*nuVtSqSum[0]*G_1Skin[2]+0.8420120990817169*nuVtSqSum[0]*G_1Edge[2]-0.6629126073623879*G_1Skin[1]*nuVtSqSum[1]+0.6629126073623879*G_1Edge[1]*nuVtSqSum[1]-0.6629126073623879*G_1Skin[0]*nuVtSqSum[0]+0.6629126073623879*G_1Edge[0]*nuVtSqSum[0]; + diff_G_1_incr[1] = (-0.4242640687119285*nuVtSqSum[2]*G_1Skin[7])-0.4743416490252568*nuVtSqSum[0]*G_1Skin[7]+0.4242640687119285*nuVtSqSum[2]*G_1Edge[7]+0.4743416490252568*nuVtSqSum[0]*G_1Edge[7]+0.7531185165696033*nuVtSqSum[1]*G_1Skin[6]+0.7531185165696033*nuVtSqSum[1]*G_1Edge[6]-0.4743416490252568*nuVtSqSum[1]*G_1Skin[5]+0.4743416490252568*nuVtSqSum[1]*G_1Edge[5]-0.592927061281571*nuVtSqSum[1]*G_1Skin[4]+0.592927061281571*nuVtSqSum[1]*G_1Edge[4]+0.753118516569603*nuVtSqSum[2]*G_1Skin[3]+0.8420120990817169*nuVtSqSum[0]*G_1Skin[3]+0.753118516569603*nuVtSqSum[2]*G_1Edge[3]+0.8420120990817169*nuVtSqSum[0]*G_1Edge[3]-0.592927061281571*G_1Skin[1]*nuVtSqSum[2]+0.592927061281571*G_1Edge[1]*nuVtSqSum[2]+0.8420120990817169*nuVtSqSum[1]*G_1Skin[2]+0.8420120990817169*nuVtSqSum[1]*G_1Edge[2]-0.6629126073623879*G_1Skin[0]*nuVtSqSum[1]+0.6629126073623879*G_1Edge[0]*nuVtSqSum[1]-0.6629126073623879*nuVtSqSum[0]*G_1Skin[1]+0.6629126073623879*nuVtSqSum[0]*G_1Edge[1]; + diff_G_1_incr[2] = 1.121119609893386*nuVtSqSum[1]*G_1Skin[7]-0.522048062622111*nuVtSqSum[1]*G_1Edge[7]-1.889300930982805*nuVtSqSum[2]*G_1Skin[6]-1.027514541411701*nuVtSqSum[2]*G_1Edge[6]+1.121119609893386*nuVtSqSum[0]*G_1Skin[5]-0.522048062622111*nuVtSqSum[0]*G_1Edge[5]+1.454384534777511*nuVtSqSum[2]*G_1Skin[4]-0.8420120990817169*nuVtSqSum[2]*G_1Edge[4]-1.889300930982805*nuVtSqSum[1]*G_1Skin[3]-1.027514541411701*nuVtSqSum[1]*G_1Edge[3]-1.889300930982805*nuVtSqSum[0]*G_1Skin[2]-1.027514541411701*nuVtSqSum[0]*G_1Edge[2]+1.454384534777511*G_1Skin[1]*nuVtSqSum[1]-0.8420120990817169*G_1Edge[1]*nuVtSqSum[1]+1.454384534777511*G_1Skin[0]*nuVtSqSum[0]-0.8420120990817169*G_1Edge[0]*nuVtSqSum[0]; + diff_G_1_incr[3] = 1.002759863451863*nuVtSqSum[2]*G_1Skin[7]+1.121119609893386*nuVtSqSum[0]*G_1Skin[7]-0.466933982218043*nuVtSqSum[2]*G_1Edge[7]-0.522048062622111*nuVtSqSum[0]*G_1Edge[7]-1.689842124652476*nuVtSqSum[1]*G_1Skin[6]-0.9190369449864345*nuVtSqSum[1]*G_1Edge[6]+1.121119609893386*nuVtSqSum[1]*G_1Skin[5]-0.522048062622111*nuVtSqSum[1]*G_1Edge[5]+1.300841074074769*nuVtSqSum[1]*G_1Skin[4]-0.753118516569603*nuVtSqSum[1]*G_1Edge[4]-1.689842124652476*nuVtSqSum[2]*G_1Skin[3]-1.889300930982805*nuVtSqSum[0]*G_1Skin[3]-0.9190369449864345*nuVtSqSum[2]*G_1Edge[3]-1.027514541411701*nuVtSqSum[0]*G_1Edge[3]+1.300841074074769*G_1Skin[1]*nuVtSqSum[2]-0.753118516569603*G_1Edge[1]*nuVtSqSum[2]-1.889300930982805*nuVtSqSum[1]*G_1Skin[2]-1.027514541411701*nuVtSqSum[1]*G_1Edge[2]+1.454384534777511*G_1Skin[0]*nuVtSqSum[1]-0.8420120990817169*G_1Edge[0]*nuVtSqSum[1]+1.454384534777511*nuVtSqSum[0]*G_1Skin[1]-0.8420120990817169*nuVtSqSum[0]*G_1Edge[1]; + diff_G_1_incr[4] = (-0.4242640687119285*nuVtSqSum[1]*G_1Skin[7])+0.4242640687119285*nuVtSqSum[1]*G_1Edge[7]+0.5379417975497165*nuVtSqSum[2]*G_1Skin[6]+0.842012099081717*nuVtSqSum[0]*G_1Skin[6]+0.5379417975497165*nuVtSqSum[2]*G_1Edge[6]+0.842012099081717*nuVtSqSum[0]*G_1Edge[6]-0.4743416490252568*nuVtSqSum[2]*G_1Skin[5]+0.4743416490252568*nuVtSqSum[2]*G_1Edge[5]-0.4235193294868364*nuVtSqSum[2]*G_1Skin[4]-0.6629126073623879*nuVtSqSum[0]*G_1Skin[4]+0.4235193294868364*nuVtSqSum[2]*G_1Edge[4]+0.6629126073623879*nuVtSqSum[0]*G_1Edge[4]+0.753118516569603*nuVtSqSum[1]*G_1Skin[3]+0.753118516569603*nuVtSqSum[1]*G_1Edge[3]+0.8420120990817169*G_1Skin[2]*nuVtSqSum[2]+0.8420120990817169*G_1Edge[2]*nuVtSqSum[2]-0.6629126073623879*G_1Skin[0]*nuVtSqSum[2]+0.6629126073623879*G_1Edge[0]*nuVtSqSum[2]-0.592927061281571*G_1Skin[1]*nuVtSqSum[1]+0.592927061281571*G_1Edge[1]*nuVtSqSum[1]; + diff_G_1_incr[5] = (-2.220757234663999*nuVtSqSum[1]*G_1Skin[7])-0.09943689110435815*nuVtSqSum[1]*G_1Edge[7]+3.551638458822559*nuVtSqSum[2]*G_1Skin[6]+0.2139541240254553*nuVtSqSum[2]*G_1Edge[6]-2.220757234663999*nuVtSqSum[0]*G_1Skin[5]-0.09943689110435816*nuVtSqSum[0]*G_1Edge[5]-2.668171775767069*nuVtSqSum[2]*G_1Skin[4]+0.2964635306407854*nuVtSqSum[2]*G_1Edge[4]+3.551638458822559*nuVtSqSum[1]*G_1Skin[3]+0.2139541240254554*nuVtSqSum[1]*G_1Edge[3]+3.551638458822559*nuVtSqSum[0]*G_1Skin[2]+0.2139541240254554*nuVtSqSum[0]*G_1Edge[2]-2.668171775767069*G_1Skin[1]*nuVtSqSum[1]+0.2964635306407854*G_1Edge[1]*nuVtSqSum[1]-2.668171775767069*G_1Skin[0]*nuVtSqSum[0]+0.2964635306407854*G_1Edge[0]*nuVtSqSum[0]; + diff_G_1_incr[6] = 1.002759863451863*nuVtSqSum[1]*G_1Skin[7]-0.4669339822180429*nuVtSqSum[1]*G_1Edge[7]-1.207030089037483*nuVtSqSum[2]*G_1Skin[6]-1.889300930982805*nuVtSqSum[0]*G_1Skin[6]-0.6564549607045962*nuVtSqSum[2]*G_1Edge[6]-1.027514541411701*nuVtSqSum[0]*G_1Edge[6]+1.121119609893386*nuVtSqSum[2]*G_1Skin[5]-0.522048062622111*nuVtSqSum[2]*G_1Edge[5]+0.9291721957676923*nuVtSqSum[2]*G_1Skin[4]+1.454384534777511*nuVtSqSum[0]*G_1Skin[4]-0.5379417975497165*nuVtSqSum[2]*G_1Edge[4]-0.842012099081717*nuVtSqSum[0]*G_1Edge[4]-1.689842124652476*nuVtSqSum[1]*G_1Skin[3]-0.9190369449864345*nuVtSqSum[1]*G_1Edge[3]-1.889300930982805*G_1Skin[2]*nuVtSqSum[2]-1.027514541411701*G_1Edge[2]*nuVtSqSum[2]+1.454384534777511*G_1Skin[0]*nuVtSqSum[2]-0.842012099081717*G_1Edge[0]*nuVtSqSum[2]+1.300841074074769*G_1Skin[1]*nuVtSqSum[1]-0.7531185165696033*G_1Edge[1]*nuVtSqSum[1]; + diff_G_1_incr[7] = (-1.986305655293262*nuVtSqSum[2]*G_1Skin[7])-2.220757234663999*nuVtSqSum[0]*G_1Skin[7]-0.0889390591922356*nuVtSqSum[2]*G_1Edge[7]-0.09943689110435816*nuVtSqSum[0]*G_1Edge[7]+3.176682010171931*nuVtSqSum[1]*G_1Skin[6]+0.1913663861549356*nuVtSqSum[1]*G_1Edge[6]-2.220757234663999*nuVtSqSum[1]*G_1Skin[5]-0.09943689110435815*nuVtSqSum[1]*G_1Edge[5]-2.386485386504596*nuVtSqSum[1]*G_1Skin[4]+0.2651650429449552*nuVtSqSum[1]*G_1Edge[4]+3.176682010171931*nuVtSqSum[2]*G_1Skin[3]+3.551638458822559*nuVtSqSum[0]*G_1Skin[3]+0.1913663861549357*nuVtSqSum[2]*G_1Edge[3]+0.2139541240254553*nuVtSqSum[0]*G_1Edge[3]-2.386485386504596*G_1Skin[1]*nuVtSqSum[2]+0.2651650429449552*G_1Edge[1]*nuVtSqSum[2]+3.551638458822559*nuVtSqSum[1]*G_1Skin[2]+0.2139541240254553*nuVtSqSum[1]*G_1Edge[2]-2.668171775767068*G_1Skin[0]*nuVtSqSum[1]+0.2964635306407854*G_1Edge[0]*nuVtSqSum[1]-2.668171775767068*nuVtSqSum[0]*G_1Skin[1]+0.2964635306407854*nuVtSqSum[0]*G_1Edge[1]; - edge_F_0_incr[2] = (-1.369306393762915*nuVtSq[1]*F_0Skin[7])-1.060660171779821*nuVtSq[2]*F_0Skin[6]-1.369306393762915*nuVtSq[0]*F_0Skin[5]-0.6123724356957944*nuVtSq[2]*F_0Skin[4]-1.060660171779821*nuVtSq[1]*F_0Skin[3]-1.060660171779821*nuVtSq[0]*F_0Skin[2]-0.6123724356957944*F_0Skin[1]*nuVtSq[1]-0.6123724356957944*F_0Skin[0]*nuVtSq[0]; - edge_F_0_incr[3] = (-1.224744871391589*nuVtSq[2]*F_0Skin[7])-1.369306393762915*nuVtSq[0]*F_0Skin[7]-0.9486832980505138*nuVtSq[1]*F_0Skin[6]-1.369306393762915*nuVtSq[1]*F_0Skin[5]-0.5477225575051661*nuVtSq[1]*F_0Skin[4]-0.9486832980505137*nuVtSq[2]*F_0Skin[3]-1.060660171779821*nuVtSq[0]*F_0Skin[3]-0.5477225575051661*F_0Skin[1]*nuVtSq[2]-1.060660171779821*nuVtSq[1]*F_0Skin[2]-0.6123724356957944*F_0Skin[0]*nuVtSq[1]-0.6123724356957944*nuVtSq[0]*F_0Skin[1]; - edge_F_0_incr[5] = (-5.303300858899106*nuVtSq[1]*F_0Skin[7])-4.107919181288745*nuVtSq[2]*F_0Skin[6]-5.303300858899105*nuVtSq[0]*F_0Skin[5]-2.371708245126284*nuVtSq[2]*F_0Skin[4]-4.107919181288745*nuVtSq[1]*F_0Skin[3]-4.107919181288745*nuVtSq[0]*F_0Skin[2]-2.371708245126284*F_0Skin[1]*nuVtSq[1]-2.371708245126284*F_0Skin[0]*nuVtSq[0]; - edge_F_0_incr[6] = (-1.224744871391589*nuVtSq[1]*F_0Skin[7])-0.6776309271789384*nuVtSq[2]*F_0Skin[6]-1.060660171779821*nuVtSq[0]*F_0Skin[6]-1.369306393762915*nuVtSq[2]*F_0Skin[5]-0.3912303982179757*nuVtSq[2]*F_0Skin[4]-0.6123724356957944*nuVtSq[0]*F_0Skin[4]-0.9486832980505138*nuVtSq[1]*F_0Skin[3]-1.060660171779821*F_0Skin[2]*nuVtSq[2]-0.6123724356957944*F_0Skin[0]*nuVtSq[2]-0.5477225575051661*F_0Skin[1]*nuVtSq[1]; - edge_F_0_incr[7] = (-4.743416490252569*nuVtSq[2]*F_0Skin[7])-5.303300858899105*nuVtSq[0]*F_0Skin[7]-3.674234614174766*nuVtSq[1]*F_0Skin[6]-5.303300858899106*nuVtSq[1]*F_0Skin[5]-2.121320343559642*nuVtSq[1]*F_0Skin[4]-3.674234614174767*nuVtSq[2]*F_0Skin[3]-4.107919181288746*nuVtSq[0]*F_0Skin[3]-2.121320343559642*F_0Skin[1]*nuVtSq[2]-4.107919181288746*nuVtSq[1]*F_0Skin[2]-2.371708245126284*F_0Skin[0]*nuVtSq[1]-2.371708245126284*nuVtSq[0]*F_0Skin[1]; - edge_G_1_incr[2] = (-1.369306393762915*nuVtSq[1]*G_1Skin[7])-1.060660171779821*nuVtSq[2]*G_1Skin[6]-1.369306393762915*nuVtSq[0]*G_1Skin[5]-0.6123724356957944*nuVtSq[2]*G_1Skin[4]-1.060660171779821*nuVtSq[1]*G_1Skin[3]-1.060660171779821*nuVtSq[0]*G_1Skin[2]-0.6123724356957944*G_1Skin[1]*nuVtSq[1]-0.6123724356957944*G_1Skin[0]*nuVtSq[0]; - edge_G_1_incr[3] = (-1.224744871391589*nuVtSq[2]*G_1Skin[7])-1.369306393762915*nuVtSq[0]*G_1Skin[7]-0.9486832980505138*nuVtSq[1]*G_1Skin[6]-1.369306393762915*nuVtSq[1]*G_1Skin[5]-0.5477225575051661*nuVtSq[1]*G_1Skin[4]-0.9486832980505137*nuVtSq[2]*G_1Skin[3]-1.060660171779821*nuVtSq[0]*G_1Skin[3]-0.5477225575051661*G_1Skin[1]*nuVtSq[2]-1.060660171779821*nuVtSq[1]*G_1Skin[2]-0.6123724356957944*G_1Skin[0]*nuVtSq[1]-0.6123724356957944*nuVtSq[0]*G_1Skin[1]; - edge_G_1_incr[5] = (-5.303300858899106*nuVtSq[1]*G_1Skin[7])-4.107919181288745*nuVtSq[2]*G_1Skin[6]-5.303300858899105*nuVtSq[0]*G_1Skin[5]-2.371708245126284*nuVtSq[2]*G_1Skin[4]-4.107919181288745*nuVtSq[1]*G_1Skin[3]-4.107919181288745*nuVtSq[0]*G_1Skin[2]-2.371708245126284*G_1Skin[1]*nuVtSq[1]-2.371708245126284*G_1Skin[0]*nuVtSq[0]; - edge_G_1_incr[6] = (-1.224744871391589*nuVtSq[1]*G_1Skin[7])-0.6776309271789384*nuVtSq[2]*G_1Skin[6]-1.060660171779821*nuVtSq[0]*G_1Skin[6]-1.369306393762915*nuVtSq[2]*G_1Skin[5]-0.3912303982179757*nuVtSq[2]*G_1Skin[4]-0.6123724356957944*nuVtSq[0]*G_1Skin[4]-0.9486832980505138*nuVtSq[1]*G_1Skin[3]-1.060660171779821*G_1Skin[2]*nuVtSq[2]-0.6123724356957944*G_1Skin[0]*nuVtSq[2]-0.5477225575051661*G_1Skin[1]*nuVtSq[1]; - edge_G_1_incr[7] = (-4.743416490252569*nuVtSq[2]*G_1Skin[7])-5.303300858899105*nuVtSq[0]*G_1Skin[7]-3.674234614174766*nuVtSq[1]*G_1Skin[6]-5.303300858899106*nuVtSq[1]*G_1Skin[5]-2.121320343559642*nuVtSq[1]*G_1Skin[4]-3.674234614174767*nuVtSq[2]*G_1Skin[3]-4.107919181288746*nuVtSq[0]*G_1Skin[3]-2.121320343559642*G_1Skin[1]*nuVtSq[2]-4.107919181288746*nuVtSq[1]*G_1Skin[2]-2.371708245126284*G_1Skin[0]*nuVtSq[1]-2.371708245126284*nuVtSq[0]*G_1Skin[1]; + edge_F_0_incr[2] = (-1.369306393762915*nuVtSqSum[1]*F_0Skin[7])-1.060660171779821*nuVtSqSum[2]*F_0Skin[6]-1.369306393762915*nuVtSqSum[0]*F_0Skin[5]-0.6123724356957944*nuVtSqSum[2]*F_0Skin[4]-1.060660171779821*nuVtSqSum[1]*F_0Skin[3]-1.060660171779821*nuVtSqSum[0]*F_0Skin[2]-0.6123724356957944*F_0Skin[1]*nuVtSqSum[1]-0.6123724356957944*F_0Skin[0]*nuVtSqSum[0]; + edge_F_0_incr[3] = (-1.224744871391589*nuVtSqSum[2]*F_0Skin[7])-1.369306393762915*nuVtSqSum[0]*F_0Skin[7]-0.9486832980505138*nuVtSqSum[1]*F_0Skin[6]-1.369306393762915*nuVtSqSum[1]*F_0Skin[5]-0.5477225575051661*nuVtSqSum[1]*F_0Skin[4]-0.9486832980505137*nuVtSqSum[2]*F_0Skin[3]-1.060660171779821*nuVtSqSum[0]*F_0Skin[3]-0.5477225575051661*F_0Skin[1]*nuVtSqSum[2]-1.060660171779821*nuVtSqSum[1]*F_0Skin[2]-0.6123724356957944*F_0Skin[0]*nuVtSqSum[1]-0.6123724356957944*nuVtSqSum[0]*F_0Skin[1]; + edge_F_0_incr[5] = (-5.303300858899106*nuVtSqSum[1]*F_0Skin[7])-4.107919181288745*nuVtSqSum[2]*F_0Skin[6]-5.303300858899105*nuVtSqSum[0]*F_0Skin[5]-2.371708245126284*nuVtSqSum[2]*F_0Skin[4]-4.107919181288745*nuVtSqSum[1]*F_0Skin[3]-4.107919181288745*nuVtSqSum[0]*F_0Skin[2]-2.371708245126284*F_0Skin[1]*nuVtSqSum[1]-2.371708245126284*F_0Skin[0]*nuVtSqSum[0]; + edge_F_0_incr[6] = (-1.224744871391589*nuVtSqSum[1]*F_0Skin[7])-0.6776309271789384*nuVtSqSum[2]*F_0Skin[6]-1.060660171779821*nuVtSqSum[0]*F_0Skin[6]-1.369306393762915*nuVtSqSum[2]*F_0Skin[5]-0.3912303982179757*nuVtSqSum[2]*F_0Skin[4]-0.6123724356957944*nuVtSqSum[0]*F_0Skin[4]-0.9486832980505138*nuVtSqSum[1]*F_0Skin[3]-1.060660171779821*F_0Skin[2]*nuVtSqSum[2]-0.6123724356957944*F_0Skin[0]*nuVtSqSum[2]-0.5477225575051661*F_0Skin[1]*nuVtSqSum[1]; + edge_F_0_incr[7] = (-4.743416490252569*nuVtSqSum[2]*F_0Skin[7])-5.303300858899105*nuVtSqSum[0]*F_0Skin[7]-3.674234614174766*nuVtSqSum[1]*F_0Skin[6]-5.303300858899106*nuVtSqSum[1]*F_0Skin[5]-2.121320343559642*nuVtSqSum[1]*F_0Skin[4]-3.674234614174767*nuVtSqSum[2]*F_0Skin[3]-4.107919181288746*nuVtSqSum[0]*F_0Skin[3]-2.121320343559642*F_0Skin[1]*nuVtSqSum[2]-4.107919181288746*nuVtSqSum[1]*F_0Skin[2]-2.371708245126284*F_0Skin[0]*nuVtSqSum[1]-2.371708245126284*nuVtSqSum[0]*F_0Skin[1]; + edge_G_1_incr[2] = (-1.369306393762915*nuVtSqSum[1]*G_1Skin[7])-1.060660171779821*nuVtSqSum[2]*G_1Skin[6]-1.369306393762915*nuVtSqSum[0]*G_1Skin[5]-0.6123724356957944*nuVtSqSum[2]*G_1Skin[4]-1.060660171779821*nuVtSqSum[1]*G_1Skin[3]-1.060660171779821*nuVtSqSum[0]*G_1Skin[2]-0.6123724356957944*G_1Skin[1]*nuVtSqSum[1]-0.6123724356957944*G_1Skin[0]*nuVtSqSum[0]; + edge_G_1_incr[3] = (-1.224744871391589*nuVtSqSum[2]*G_1Skin[7])-1.369306393762915*nuVtSqSum[0]*G_1Skin[7]-0.9486832980505138*nuVtSqSum[1]*G_1Skin[6]-1.369306393762915*nuVtSqSum[1]*G_1Skin[5]-0.5477225575051661*nuVtSqSum[1]*G_1Skin[4]-0.9486832980505137*nuVtSqSum[2]*G_1Skin[3]-1.060660171779821*nuVtSqSum[0]*G_1Skin[3]-0.5477225575051661*G_1Skin[1]*nuVtSqSum[2]-1.060660171779821*nuVtSqSum[1]*G_1Skin[2]-0.6123724356957944*G_1Skin[0]*nuVtSqSum[1]-0.6123724356957944*nuVtSqSum[0]*G_1Skin[1]; + edge_G_1_incr[5] = (-5.303300858899106*nuVtSqSum[1]*G_1Skin[7])-4.107919181288745*nuVtSqSum[2]*G_1Skin[6]-5.303300858899105*nuVtSqSum[0]*G_1Skin[5]-2.371708245126284*nuVtSqSum[2]*G_1Skin[4]-4.107919181288745*nuVtSqSum[1]*G_1Skin[3]-4.107919181288745*nuVtSqSum[0]*G_1Skin[2]-2.371708245126284*G_1Skin[1]*nuVtSqSum[1]-2.371708245126284*G_1Skin[0]*nuVtSqSum[0]; + edge_G_1_incr[6] = (-1.224744871391589*nuVtSqSum[1]*G_1Skin[7])-0.6776309271789384*nuVtSqSum[2]*G_1Skin[6]-1.060660171779821*nuVtSqSum[0]*G_1Skin[6]-1.369306393762915*nuVtSqSum[2]*G_1Skin[5]-0.3912303982179757*nuVtSqSum[2]*G_1Skin[4]-0.6123724356957944*nuVtSqSum[0]*G_1Skin[4]-0.9486832980505138*nuVtSqSum[1]*G_1Skin[3]-1.060660171779821*G_1Skin[2]*nuVtSqSum[2]-0.6123724356957944*G_1Skin[0]*nuVtSqSum[2]-0.5477225575051661*G_1Skin[1]*nuVtSqSum[1]; + edge_G_1_incr[7] = (-4.743416490252569*nuVtSqSum[2]*G_1Skin[7])-5.303300858899105*nuVtSqSum[0]*G_1Skin[7]-3.674234614174766*nuVtSqSum[1]*G_1Skin[6]-5.303300858899106*nuVtSqSum[1]*G_1Skin[5]-2.121320343559642*nuVtSqSum[1]*G_1Skin[4]-3.674234614174767*nuVtSqSum[2]*G_1Skin[3]-4.107919181288746*nuVtSqSum[0]*G_1Skin[3]-2.121320343559642*G_1Skin[1]*nuVtSqSum[2]-4.107919181288746*nuVtSqSum[1]*G_1Skin[2]-2.371708245126284*G_1Skin[0]*nuVtSqSum[1]-2.371708245126284*nuVtSqSum[0]*G_1Skin[1]; } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2.c index 6a9c1b0d0..6a77dccf6 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nuVtSq[3]: Thermal speeds squared times collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input distribution functions [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell. + // out: Incremented distribution functions in skin cell. double rdvSq4 = 4.0/(dxv[1]*dxv[1]); + const double *nuVtSqSum = &nuPrimMomsSum[3]; + const double *F_0Skin = &fSkin[0]; const double *G_1Skin = &fSkin[9]; const double *F_0Edge = &fEdge[0]; @@ -16,12 +19,12 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2(const do double vol_incr_F_0[9] = {0.0}; double vol_incr_G_1[9] = {0.0}; - vol_incr_F_0[5] = 4.743416490252569*nuVtSq[2]*F_0Skin[4]*rdvSq4+4.743416490252569*F_0Skin[1]*nuVtSq[1]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_F_0[7] = 4.242640687119286*nuVtSq[1]*F_0Skin[4]*rdvSq4+4.242640687119286*F_0Skin[1]*nuVtSq[2]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSq[1]*rdvSq4+4.743416490252569*nuVtSq[0]*F_0Skin[1]*rdvSq4; - vol_incr_F_0[8] = 3.030457633656632*nuVtSq[2]*F_0Skin[4]*rdvSq4+4.743416490252569*nuVtSq[0]*F_0Skin[4]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSq[2]*rdvSq4+4.242640687119286*F_0Skin[1]*nuVtSq[1]*rdvSq4; - vol_incr_G_1[5] = 4.743416490252569*nuVtSq[2]*G_1Skin[4]*rdvSq4+4.743416490252569*G_1Skin[1]*nuVtSq[1]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_G_1[7] = 4.242640687119286*nuVtSq[1]*G_1Skin[4]*rdvSq4+4.242640687119286*G_1Skin[1]*nuVtSq[2]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSq[1]*rdvSq4+4.743416490252569*nuVtSq[0]*G_1Skin[1]*rdvSq4; - vol_incr_G_1[8] = 3.030457633656632*nuVtSq[2]*G_1Skin[4]*rdvSq4+4.743416490252569*nuVtSq[0]*G_1Skin[4]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSq[2]*rdvSq4+4.242640687119286*G_1Skin[1]*nuVtSq[1]*rdvSq4; + vol_incr_F_0[5] = 4.743416490252569*nuVtSqSum[2]*F_0Skin[4]*rdvSq4+4.743416490252569*F_0Skin[1]*nuVtSqSum[1]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_F_0[7] = 4.242640687119286*nuVtSqSum[1]*F_0Skin[4]*rdvSq4+4.242640687119286*F_0Skin[1]*nuVtSqSum[2]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSqSum[1]*rdvSq4+4.743416490252569*nuVtSqSum[0]*F_0Skin[1]*rdvSq4; + vol_incr_F_0[8] = 3.030457633656632*nuVtSqSum[2]*F_0Skin[4]*rdvSq4+4.743416490252569*nuVtSqSum[0]*F_0Skin[4]*rdvSq4+4.743416490252569*F_0Skin[0]*nuVtSqSum[2]*rdvSq4+4.242640687119286*F_0Skin[1]*nuVtSqSum[1]*rdvSq4; + vol_incr_G_1[5] = 4.743416490252569*nuVtSqSum[2]*G_1Skin[4]*rdvSq4+4.743416490252569*G_1Skin[1]*nuVtSqSum[1]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_G_1[7] = 4.242640687119286*nuVtSqSum[1]*G_1Skin[4]*rdvSq4+4.242640687119286*G_1Skin[1]*nuVtSqSum[2]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSqSum[1]*rdvSq4+4.743416490252569*nuVtSqSum[0]*G_1Skin[1]*rdvSq4; + vol_incr_G_1[8] = 3.030457633656632*nuVtSqSum[2]*G_1Skin[4]*rdvSq4+4.743416490252569*nuVtSqSum[0]*G_1Skin[4]*rdvSq4+4.743416490252569*G_1Skin[0]*nuVtSqSum[2]*rdvSq4+4.242640687119286*G_1Skin[1]*nuVtSqSum[1]*rdvSq4; double temp_F_0_diff[9] = {0.0}; double temp_F_0_edge[9] = {0.0}; @@ -67,43 +70,43 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2(const do temp_G_1_edge[7] = (-7.5*G_1Skin[7])+5.809475019311126*G_1Skin[3]-3.354101966249684*G_1Skin[1]; temp_G_1_edge[8] = (-7.5*G_1Skin[8])+5.809475019311126*G_1Skin[6]-3.354101966249685*G_1Skin[4]; - diff_F_0_incr[0] = 0.7071067811865475*nuVtSq[2]*temp_F_0_diff[4]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[1]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.6324555320336759*nuVtSq[1]*temp_F_0_diff[4]+0.6324555320336759*temp_F_0_diff[1]*nuVtSq[2]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[1]+0.7071067811865475*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.7071067811865475*nuVtSq[2]*temp_F_0_diff[6]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[2]; - diff_F_0_incr[3] = 0.632455532033676*nuVtSq[1]*temp_F_0_diff[6]+0.6324555320336759*nuVtSq[2]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[2]; - diff_F_0_incr[4] = 0.4517539514526256*nuVtSq[2]*temp_F_0_diff[4]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[4]+0.7071067811865475*temp_F_0_diff[0]*nuVtSq[2]+0.6324555320336759*nuVtSq[1]*temp_F_0_diff[1]; - diff_F_0_incr[5] = 0.7071067811865475*nuVtSq[2]*temp_F_0_diff[8]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[7]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[5]; - diff_F_0_incr[6] = 0.4517539514526256*nuVtSq[2]*temp_F_0_diff[6]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[6]+0.632455532033676*nuVtSq[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[2]*temp_F_0_diff[2]; - diff_F_0_incr[7] = 0.632455532033676*nuVtSq[1]*temp_F_0_diff[8]+0.6324555320336759*nuVtSq[2]*temp_F_0_diff[7]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[7]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[5]; - diff_F_0_incr[8] = 0.4517539514526256*nuVtSq[2]*temp_F_0_diff[8]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[8]+0.632455532033676*nuVtSq[1]*temp_F_0_diff[7]+0.7071067811865475*nuVtSq[2]*temp_F_0_diff[5]; - diff_G_1_incr[0] = 0.7071067811865475*nuVtSq[2]*temp_G_1_diff[4]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[1]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.6324555320336759*nuVtSq[1]*temp_G_1_diff[4]+0.6324555320336759*temp_G_1_diff[1]*nuVtSq[2]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[1]+0.7071067811865475*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.7071067811865475*nuVtSq[2]*temp_G_1_diff[6]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[2]; - diff_G_1_incr[3] = 0.632455532033676*nuVtSq[1]*temp_G_1_diff[6]+0.6324555320336759*nuVtSq[2]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[2]; - diff_G_1_incr[4] = 0.4517539514526256*nuVtSq[2]*temp_G_1_diff[4]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[4]+0.7071067811865475*temp_G_1_diff[0]*nuVtSq[2]+0.6324555320336759*nuVtSq[1]*temp_G_1_diff[1]; - diff_G_1_incr[5] = 0.7071067811865475*nuVtSq[2]*temp_G_1_diff[8]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[7]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[5]; - diff_G_1_incr[6] = 0.4517539514526256*nuVtSq[2]*temp_G_1_diff[6]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[6]+0.632455532033676*nuVtSq[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[2]*temp_G_1_diff[2]; - diff_G_1_incr[7] = 0.632455532033676*nuVtSq[1]*temp_G_1_diff[8]+0.6324555320336759*nuVtSq[2]*temp_G_1_diff[7]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[7]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[5]; - diff_G_1_incr[8] = 0.4517539514526256*nuVtSq[2]*temp_G_1_diff[8]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[8]+0.632455532033676*nuVtSq[1]*temp_G_1_diff[7]+0.7071067811865475*nuVtSq[2]*temp_G_1_diff[5]; - - edge_F_0_incr[0] = 0.7071067811865475*nuVtSq[2]*temp_F_0_edge[4]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[1]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.6324555320336759*nuVtSq[1]*temp_F_0_edge[4]+0.6324555320336759*temp_F_0_edge[1]*nuVtSq[2]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[1]+0.7071067811865475*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.7071067811865475*nuVtSq[2]*temp_F_0_edge[6]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[2]; - edge_F_0_incr[3] = 0.632455532033676*nuVtSq[1]*temp_F_0_edge[6]+0.6324555320336759*nuVtSq[2]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[2]; - edge_F_0_incr[4] = 0.4517539514526256*nuVtSq[2]*temp_F_0_edge[4]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[4]+0.7071067811865475*temp_F_0_edge[0]*nuVtSq[2]+0.6324555320336759*nuVtSq[1]*temp_F_0_edge[1]; - edge_F_0_incr[5] = 0.7071067811865475*nuVtSq[2]*temp_F_0_edge[8]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[7]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[5]; - edge_F_0_incr[6] = 0.4517539514526256*nuVtSq[2]*temp_F_0_edge[6]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[6]+0.632455532033676*nuVtSq[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[2]*temp_F_0_edge[2]; - edge_F_0_incr[7] = 0.632455532033676*nuVtSq[1]*temp_F_0_edge[8]+0.6324555320336759*nuVtSq[2]*temp_F_0_edge[7]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[7]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[5]; - edge_F_0_incr[8] = 0.4517539514526256*nuVtSq[2]*temp_F_0_edge[8]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[8]+0.632455532033676*nuVtSq[1]*temp_F_0_edge[7]+0.7071067811865475*nuVtSq[2]*temp_F_0_edge[5]; - edge_G_1_incr[0] = 0.7071067811865475*nuVtSq[2]*temp_G_1_edge[4]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[1]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.6324555320336759*nuVtSq[1]*temp_G_1_edge[4]+0.6324555320336759*temp_G_1_edge[1]*nuVtSq[2]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[1]+0.7071067811865475*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.7071067811865475*nuVtSq[2]*temp_G_1_edge[6]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[2]; - edge_G_1_incr[3] = 0.632455532033676*nuVtSq[1]*temp_G_1_edge[6]+0.6324555320336759*nuVtSq[2]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[2]; - edge_G_1_incr[4] = 0.4517539514526256*nuVtSq[2]*temp_G_1_edge[4]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[4]+0.7071067811865475*temp_G_1_edge[0]*nuVtSq[2]+0.6324555320336759*nuVtSq[1]*temp_G_1_edge[1]; - edge_G_1_incr[5] = 0.7071067811865475*nuVtSq[2]*temp_G_1_edge[8]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[7]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[5]; - edge_G_1_incr[6] = 0.4517539514526256*nuVtSq[2]*temp_G_1_edge[6]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[6]+0.632455532033676*nuVtSq[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[2]*temp_G_1_edge[2]; - edge_G_1_incr[7] = 0.632455532033676*nuVtSq[1]*temp_G_1_edge[8]+0.6324555320336759*nuVtSq[2]*temp_G_1_edge[7]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[7]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[5]; - edge_G_1_incr[8] = 0.4517539514526256*nuVtSq[2]*temp_G_1_edge[8]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[8]+0.632455532033676*nuVtSq[1]*temp_G_1_edge[7]+0.7071067811865475*nuVtSq[2]*temp_G_1_edge[5]; + diff_F_0_incr[0] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[4]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[1]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.6324555320336759*nuVtSqSum[1]*temp_F_0_diff[4]+0.6324555320336759*temp_F_0_diff[1]*nuVtSqSum[2]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[1]+0.7071067811865475*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[6]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[2]; + diff_F_0_incr[3] = 0.632455532033676*nuVtSqSum[1]*temp_F_0_diff[6]+0.6324555320336759*nuVtSqSum[2]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[2]; + diff_F_0_incr[4] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_diff[4]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[4]+0.7071067811865475*temp_F_0_diff[0]*nuVtSqSum[2]+0.6324555320336759*nuVtSqSum[1]*temp_F_0_diff[1]; + diff_F_0_incr[5] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[8]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[7]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[5]; + diff_F_0_incr[6] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_diff[6]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[6]+0.632455532033676*nuVtSqSum[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[2]; + diff_F_0_incr[7] = 0.632455532033676*nuVtSqSum[1]*temp_F_0_diff[8]+0.6324555320336759*nuVtSqSum[2]*temp_F_0_diff[7]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[7]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[5]; + diff_F_0_incr[8] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_diff[8]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[8]+0.632455532033676*nuVtSqSum[1]*temp_F_0_diff[7]+0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[5]; + diff_G_1_incr[0] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[4]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[1]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.6324555320336759*nuVtSqSum[1]*temp_G_1_diff[4]+0.6324555320336759*temp_G_1_diff[1]*nuVtSqSum[2]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[1]+0.7071067811865475*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[6]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[2]; + diff_G_1_incr[3] = 0.632455532033676*nuVtSqSum[1]*temp_G_1_diff[6]+0.6324555320336759*nuVtSqSum[2]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[2]; + diff_G_1_incr[4] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_diff[4]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[4]+0.7071067811865475*temp_G_1_diff[0]*nuVtSqSum[2]+0.6324555320336759*nuVtSqSum[1]*temp_G_1_diff[1]; + diff_G_1_incr[5] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[8]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[7]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[5]; + diff_G_1_incr[6] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_diff[6]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[6]+0.632455532033676*nuVtSqSum[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[2]; + diff_G_1_incr[7] = 0.632455532033676*nuVtSqSum[1]*temp_G_1_diff[8]+0.6324555320336759*nuVtSqSum[2]*temp_G_1_diff[7]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[7]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[5]; + diff_G_1_incr[8] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_diff[8]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[8]+0.632455532033676*nuVtSqSum[1]*temp_G_1_diff[7]+0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[5]; + + edge_F_0_incr[0] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[4]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[1]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.6324555320336759*nuVtSqSum[1]*temp_F_0_edge[4]+0.6324555320336759*temp_F_0_edge[1]*nuVtSqSum[2]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[1]+0.7071067811865475*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[6]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[2]; + edge_F_0_incr[3] = 0.632455532033676*nuVtSqSum[1]*temp_F_0_edge[6]+0.6324555320336759*nuVtSqSum[2]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[2]; + edge_F_0_incr[4] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_edge[4]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[4]+0.7071067811865475*temp_F_0_edge[0]*nuVtSqSum[2]+0.6324555320336759*nuVtSqSum[1]*temp_F_0_edge[1]; + edge_F_0_incr[5] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[8]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[7]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[5]; + edge_F_0_incr[6] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_edge[6]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[6]+0.632455532033676*nuVtSqSum[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[2]; + edge_F_0_incr[7] = 0.632455532033676*nuVtSqSum[1]*temp_F_0_edge[8]+0.6324555320336759*nuVtSqSum[2]*temp_F_0_edge[7]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[7]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[5]; + edge_F_0_incr[8] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_edge[8]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[8]+0.632455532033676*nuVtSqSum[1]*temp_F_0_edge[7]+0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[5]; + edge_G_1_incr[0] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[4]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[1]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.6324555320336759*nuVtSqSum[1]*temp_G_1_edge[4]+0.6324555320336759*temp_G_1_edge[1]*nuVtSqSum[2]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[1]+0.7071067811865475*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[6]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[2]; + edge_G_1_incr[3] = 0.632455532033676*nuVtSqSum[1]*temp_G_1_edge[6]+0.6324555320336759*nuVtSqSum[2]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[2]; + edge_G_1_incr[4] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_edge[4]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[4]+0.7071067811865475*temp_G_1_edge[0]*nuVtSqSum[2]+0.6324555320336759*nuVtSqSum[1]*temp_G_1_edge[1]; + edge_G_1_incr[5] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[8]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[7]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[5]; + edge_G_1_incr[6] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_edge[6]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[6]+0.632455532033676*nuVtSqSum[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[2]; + edge_G_1_incr[7] = 0.632455532033676*nuVtSqSum[1]*temp_G_1_edge[8]+0.6324555320336759*nuVtSqSum[2]*temp_G_1_edge[7]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[7]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[5]; + edge_G_1_incr[8] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_edge[8]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[8]+0.632455532033676*nuVtSqSum[1]*temp_G_1_edge[7]+0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[5]; } else { @@ -140,43 +143,43 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_1x1v_tensor_p2(const do temp_G_1_edge[7] = (-7.5*G_1Skin[7])-5.809475019311126*G_1Skin[3]-3.354101966249684*G_1Skin[1]; temp_G_1_edge[8] = (-7.5*G_1Skin[8])-5.809475019311126*G_1Skin[6]-3.354101966249685*G_1Skin[4]; - diff_F_0_incr[0] = 0.7071067811865475*nuVtSq[2]*temp_F_0_diff[4]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[1]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.6324555320336759*nuVtSq[1]*temp_F_0_diff[4]+0.6324555320336759*temp_F_0_diff[1]*nuVtSq[2]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[1]+0.7071067811865475*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.7071067811865475*nuVtSq[2]*temp_F_0_diff[6]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[2]; - diff_F_0_incr[3] = 0.632455532033676*nuVtSq[1]*temp_F_0_diff[6]+0.6324555320336759*nuVtSq[2]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[2]; - diff_F_0_incr[4] = 0.4517539514526256*nuVtSq[2]*temp_F_0_diff[4]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[4]+0.7071067811865475*temp_F_0_diff[0]*nuVtSq[2]+0.6324555320336759*nuVtSq[1]*temp_F_0_diff[1]; - diff_F_0_incr[5] = 0.7071067811865475*nuVtSq[2]*temp_F_0_diff[8]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[7]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[5]; - diff_F_0_incr[6] = 0.4517539514526256*nuVtSq[2]*temp_F_0_diff[6]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[6]+0.632455532033676*nuVtSq[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSq[2]*temp_F_0_diff[2]; - diff_F_0_incr[7] = 0.632455532033676*nuVtSq[1]*temp_F_0_diff[8]+0.6324555320336759*nuVtSq[2]*temp_F_0_diff[7]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[7]+0.7071067811865475*nuVtSq[1]*temp_F_0_diff[5]; - diff_F_0_incr[8] = 0.4517539514526256*nuVtSq[2]*temp_F_0_diff[8]+0.7071067811865475*nuVtSq[0]*temp_F_0_diff[8]+0.632455532033676*nuVtSq[1]*temp_F_0_diff[7]+0.7071067811865475*nuVtSq[2]*temp_F_0_diff[5]; - diff_G_1_incr[0] = 0.7071067811865475*nuVtSq[2]*temp_G_1_diff[4]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[1]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.6324555320336759*nuVtSq[1]*temp_G_1_diff[4]+0.6324555320336759*temp_G_1_diff[1]*nuVtSq[2]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[1]+0.7071067811865475*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.7071067811865475*nuVtSq[2]*temp_G_1_diff[6]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[2]; - diff_G_1_incr[3] = 0.632455532033676*nuVtSq[1]*temp_G_1_diff[6]+0.6324555320336759*nuVtSq[2]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[2]; - diff_G_1_incr[4] = 0.4517539514526256*nuVtSq[2]*temp_G_1_diff[4]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[4]+0.7071067811865475*temp_G_1_diff[0]*nuVtSq[2]+0.6324555320336759*nuVtSq[1]*temp_G_1_diff[1]; - diff_G_1_incr[5] = 0.7071067811865475*nuVtSq[2]*temp_G_1_diff[8]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[7]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[5]; - diff_G_1_incr[6] = 0.4517539514526256*nuVtSq[2]*temp_G_1_diff[6]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[6]+0.632455532033676*nuVtSq[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSq[2]*temp_G_1_diff[2]; - diff_G_1_incr[7] = 0.632455532033676*nuVtSq[1]*temp_G_1_diff[8]+0.6324555320336759*nuVtSq[2]*temp_G_1_diff[7]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[7]+0.7071067811865475*nuVtSq[1]*temp_G_1_diff[5]; - diff_G_1_incr[8] = 0.4517539514526256*nuVtSq[2]*temp_G_1_diff[8]+0.7071067811865475*nuVtSq[0]*temp_G_1_diff[8]+0.632455532033676*nuVtSq[1]*temp_G_1_diff[7]+0.7071067811865475*nuVtSq[2]*temp_G_1_diff[5]; - - edge_F_0_incr[0] = 0.7071067811865475*nuVtSq[2]*temp_F_0_edge[4]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[1]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.6324555320336759*nuVtSq[1]*temp_F_0_edge[4]+0.6324555320336759*temp_F_0_edge[1]*nuVtSq[2]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[1]+0.7071067811865475*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.7071067811865475*nuVtSq[2]*temp_F_0_edge[6]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[2]; - edge_F_0_incr[3] = 0.632455532033676*nuVtSq[1]*temp_F_0_edge[6]+0.6324555320336759*nuVtSq[2]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[2]; - edge_F_0_incr[4] = 0.4517539514526256*nuVtSq[2]*temp_F_0_edge[4]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[4]+0.7071067811865475*temp_F_0_edge[0]*nuVtSq[2]+0.6324555320336759*nuVtSq[1]*temp_F_0_edge[1]; - edge_F_0_incr[5] = 0.7071067811865475*nuVtSq[2]*temp_F_0_edge[8]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[7]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[5]; - edge_F_0_incr[6] = 0.4517539514526256*nuVtSq[2]*temp_F_0_edge[6]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[6]+0.632455532033676*nuVtSq[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSq[2]*temp_F_0_edge[2]; - edge_F_0_incr[7] = 0.632455532033676*nuVtSq[1]*temp_F_0_edge[8]+0.6324555320336759*nuVtSq[2]*temp_F_0_edge[7]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[7]+0.7071067811865475*nuVtSq[1]*temp_F_0_edge[5]; - edge_F_0_incr[8] = 0.4517539514526256*nuVtSq[2]*temp_F_0_edge[8]+0.7071067811865475*nuVtSq[0]*temp_F_0_edge[8]+0.632455532033676*nuVtSq[1]*temp_F_0_edge[7]+0.7071067811865475*nuVtSq[2]*temp_F_0_edge[5]; - edge_G_1_incr[0] = 0.7071067811865475*nuVtSq[2]*temp_G_1_edge[4]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[1]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.6324555320336759*nuVtSq[1]*temp_G_1_edge[4]+0.6324555320336759*temp_G_1_edge[1]*nuVtSq[2]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[1]+0.7071067811865475*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.7071067811865475*nuVtSq[2]*temp_G_1_edge[6]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[2]; - edge_G_1_incr[3] = 0.632455532033676*nuVtSq[1]*temp_G_1_edge[6]+0.6324555320336759*nuVtSq[2]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[2]; - edge_G_1_incr[4] = 0.4517539514526256*nuVtSq[2]*temp_G_1_edge[4]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[4]+0.7071067811865475*temp_G_1_edge[0]*nuVtSq[2]+0.6324555320336759*nuVtSq[1]*temp_G_1_edge[1]; - edge_G_1_incr[5] = 0.7071067811865475*nuVtSq[2]*temp_G_1_edge[8]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[7]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[5]; - edge_G_1_incr[6] = 0.4517539514526256*nuVtSq[2]*temp_G_1_edge[6]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[6]+0.632455532033676*nuVtSq[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSq[2]*temp_G_1_edge[2]; - edge_G_1_incr[7] = 0.632455532033676*nuVtSq[1]*temp_G_1_edge[8]+0.6324555320336759*nuVtSq[2]*temp_G_1_edge[7]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[7]+0.7071067811865475*nuVtSq[1]*temp_G_1_edge[5]; - edge_G_1_incr[8] = 0.4517539514526256*nuVtSq[2]*temp_G_1_edge[8]+0.7071067811865475*nuVtSq[0]*temp_G_1_edge[8]+0.632455532033676*nuVtSq[1]*temp_G_1_edge[7]+0.7071067811865475*nuVtSq[2]*temp_G_1_edge[5]; + diff_F_0_incr[0] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[4]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[1]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.6324555320336759*nuVtSqSum[1]*temp_F_0_diff[4]+0.6324555320336759*temp_F_0_diff[1]*nuVtSqSum[2]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[1]+0.7071067811865475*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[6]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[2]; + diff_F_0_incr[3] = 0.632455532033676*nuVtSqSum[1]*temp_F_0_diff[6]+0.6324555320336759*nuVtSqSum[2]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[2]; + diff_F_0_incr[4] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_diff[4]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[4]+0.7071067811865475*temp_F_0_diff[0]*nuVtSqSum[2]+0.6324555320336759*nuVtSqSum[1]*temp_F_0_diff[1]; + diff_F_0_incr[5] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[8]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[7]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[5]; + diff_F_0_incr[6] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_diff[6]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[6]+0.632455532033676*nuVtSqSum[1]*temp_F_0_diff[3]+0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[2]; + diff_F_0_incr[7] = 0.632455532033676*nuVtSqSum[1]*temp_F_0_diff[8]+0.6324555320336759*nuVtSqSum[2]*temp_F_0_diff[7]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[7]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_diff[5]; + diff_F_0_incr[8] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_diff[8]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_diff[8]+0.632455532033676*nuVtSqSum[1]*temp_F_0_diff[7]+0.7071067811865475*nuVtSqSum[2]*temp_F_0_diff[5]; + diff_G_1_incr[0] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[4]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[1]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.6324555320336759*nuVtSqSum[1]*temp_G_1_diff[4]+0.6324555320336759*temp_G_1_diff[1]*nuVtSqSum[2]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[1]+0.7071067811865475*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[6]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[2]; + diff_G_1_incr[3] = 0.632455532033676*nuVtSqSum[1]*temp_G_1_diff[6]+0.6324555320336759*nuVtSqSum[2]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[2]; + diff_G_1_incr[4] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_diff[4]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[4]+0.7071067811865475*temp_G_1_diff[0]*nuVtSqSum[2]+0.6324555320336759*nuVtSqSum[1]*temp_G_1_diff[1]; + diff_G_1_incr[5] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[8]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[7]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[5]; + diff_G_1_incr[6] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_diff[6]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[6]+0.632455532033676*nuVtSqSum[1]*temp_G_1_diff[3]+0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[2]; + diff_G_1_incr[7] = 0.632455532033676*nuVtSqSum[1]*temp_G_1_diff[8]+0.6324555320336759*nuVtSqSum[2]*temp_G_1_diff[7]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[7]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_diff[5]; + diff_G_1_incr[8] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_diff[8]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_diff[8]+0.632455532033676*nuVtSqSum[1]*temp_G_1_diff[7]+0.7071067811865475*nuVtSqSum[2]*temp_G_1_diff[5]; + + edge_F_0_incr[0] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[4]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[1]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.6324555320336759*nuVtSqSum[1]*temp_F_0_edge[4]+0.6324555320336759*temp_F_0_edge[1]*nuVtSqSum[2]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[1]+0.7071067811865475*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[6]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[2]; + edge_F_0_incr[3] = 0.632455532033676*nuVtSqSum[1]*temp_F_0_edge[6]+0.6324555320336759*nuVtSqSum[2]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[2]; + edge_F_0_incr[4] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_edge[4]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[4]+0.7071067811865475*temp_F_0_edge[0]*nuVtSqSum[2]+0.6324555320336759*nuVtSqSum[1]*temp_F_0_edge[1]; + edge_F_0_incr[5] = 0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[8]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[7]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[5]; + edge_F_0_incr[6] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_edge[6]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[6]+0.632455532033676*nuVtSqSum[1]*temp_F_0_edge[3]+0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[2]; + edge_F_0_incr[7] = 0.632455532033676*nuVtSqSum[1]*temp_F_0_edge[8]+0.6324555320336759*nuVtSqSum[2]*temp_F_0_edge[7]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[7]+0.7071067811865475*nuVtSqSum[1]*temp_F_0_edge[5]; + edge_F_0_incr[8] = 0.4517539514526256*nuVtSqSum[2]*temp_F_0_edge[8]+0.7071067811865475*nuVtSqSum[0]*temp_F_0_edge[8]+0.632455532033676*nuVtSqSum[1]*temp_F_0_edge[7]+0.7071067811865475*nuVtSqSum[2]*temp_F_0_edge[5]; + edge_G_1_incr[0] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[4]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[1]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.6324555320336759*nuVtSqSum[1]*temp_G_1_edge[4]+0.6324555320336759*temp_G_1_edge[1]*nuVtSqSum[2]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[1]+0.7071067811865475*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[6]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[2]; + edge_G_1_incr[3] = 0.632455532033676*nuVtSqSum[1]*temp_G_1_edge[6]+0.6324555320336759*nuVtSqSum[2]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[2]; + edge_G_1_incr[4] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_edge[4]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[4]+0.7071067811865475*temp_G_1_edge[0]*nuVtSqSum[2]+0.6324555320336759*nuVtSqSum[1]*temp_G_1_edge[1]; + edge_G_1_incr[5] = 0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[8]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[7]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[5]; + edge_G_1_incr[6] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_edge[6]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[6]+0.632455532033676*nuVtSqSum[1]*temp_G_1_edge[3]+0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[2]; + edge_G_1_incr[7] = 0.632455532033676*nuVtSqSum[1]*temp_G_1_edge[8]+0.6324555320336759*nuVtSqSum[2]*temp_G_1_edge[7]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[7]+0.7071067811865475*nuVtSqSum[1]*temp_G_1_edge[5]; + edge_G_1_incr[8] = 0.4517539514526256*nuVtSqSum[2]*temp_G_1_edge[8]+0.7071067811865475*nuVtSqSum[0]*temp_G_1_edge[8]+0.632455532033676*nuVtSqSum[1]*temp_G_1_edge[7]+0.7071067811865475*nuVtSqSum[2]*temp_G_1_edge[5]; } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1.c index fa83dc972..b7698121d 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[3]: Cell-center coordinates. - // dxv[3]: Cell spacing. - // nuVtSq[4]: Thermal speeds squared times collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input distribution functions [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell. + // out: Incremented distribution functions in skin cell. double rdvSq4 = 4.0/(dxv[2]*dxv[2]); + const double *nuVtSqSum = &nuPrimMomsSum[4]; + const double *F_0Skin = &fSkin[0]; const double *G_1Skin = &fSkin[12]; const double *F_0Edge = &fEdge[0]; @@ -16,14 +19,14 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1(const doubl double vol_incr_F_0[12] = {0.0}; double vol_incr_G_1[12] = {0.0}; - vol_incr_F_0[8] = 3.354101966249685*nuVtSq[3]*F_0Skin[4]*rdvSq4+3.354101966249685*F_0Skin[2]*nuVtSq[2]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSq[1]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_F_0[9] = 3.354101966249684*nuVtSq[2]*F_0Skin[4]*rdvSq4+3.354101966249684*F_0Skin[2]*nuVtSq[3]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSq[1]*rdvSq4+3.354101966249684*nuVtSq[0]*F_0Skin[1]*rdvSq4; - vol_incr_F_0[10] = 3.354101966249684*nuVtSq[1]*F_0Skin[4]*rdvSq4+3.354101966249684*F_0Skin[1]*nuVtSq[3]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSq[2]*rdvSq4+3.354101966249684*nuVtSq[0]*F_0Skin[2]*rdvSq4; - vol_incr_F_0[11] = 3.354101966249685*nuVtSq[0]*F_0Skin[4]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSq[3]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSq[2]*rdvSq4+3.354101966249685*nuVtSq[1]*F_0Skin[2]*rdvSq4; - vol_incr_G_1[8] = 3.354101966249685*nuVtSq[3]*G_1Skin[4]*rdvSq4+3.354101966249685*G_1Skin[2]*nuVtSq[2]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSq[1]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_G_1[9] = 3.354101966249684*nuVtSq[2]*G_1Skin[4]*rdvSq4+3.354101966249684*G_1Skin[2]*nuVtSq[3]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSq[1]*rdvSq4+3.354101966249684*nuVtSq[0]*G_1Skin[1]*rdvSq4; - vol_incr_G_1[10] = 3.354101966249684*nuVtSq[1]*G_1Skin[4]*rdvSq4+3.354101966249684*G_1Skin[1]*nuVtSq[3]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSq[2]*rdvSq4+3.354101966249684*nuVtSq[0]*G_1Skin[2]*rdvSq4; - vol_incr_G_1[11] = 3.354101966249685*nuVtSq[0]*G_1Skin[4]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSq[3]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSq[2]*rdvSq4+3.354101966249685*nuVtSq[1]*G_1Skin[2]*rdvSq4; + vol_incr_F_0[8] = 3.354101966249685*nuVtSqSum[3]*F_0Skin[4]*rdvSq4+3.354101966249685*F_0Skin[2]*nuVtSqSum[2]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSqSum[1]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_F_0[9] = 3.354101966249684*nuVtSqSum[2]*F_0Skin[4]*rdvSq4+3.354101966249684*F_0Skin[2]*nuVtSqSum[3]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSqSum[1]*rdvSq4+3.354101966249684*nuVtSqSum[0]*F_0Skin[1]*rdvSq4; + vol_incr_F_0[10] = 3.354101966249684*nuVtSqSum[1]*F_0Skin[4]*rdvSq4+3.354101966249684*F_0Skin[1]*nuVtSqSum[3]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSqSum[2]*rdvSq4+3.354101966249684*nuVtSqSum[0]*F_0Skin[2]*rdvSq4; + vol_incr_F_0[11] = 3.354101966249685*nuVtSqSum[0]*F_0Skin[4]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSqSum[3]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSqSum[2]*rdvSq4+3.354101966249685*nuVtSqSum[1]*F_0Skin[2]*rdvSq4; + vol_incr_G_1[8] = 3.354101966249685*nuVtSqSum[3]*G_1Skin[4]*rdvSq4+3.354101966249685*G_1Skin[2]*nuVtSqSum[2]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSqSum[1]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_G_1[9] = 3.354101966249684*nuVtSqSum[2]*G_1Skin[4]*rdvSq4+3.354101966249684*G_1Skin[2]*nuVtSqSum[3]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSqSum[1]*rdvSq4+3.354101966249684*nuVtSqSum[0]*G_1Skin[1]*rdvSq4; + vol_incr_G_1[10] = 3.354101966249684*nuVtSqSum[1]*G_1Skin[4]*rdvSq4+3.354101966249684*G_1Skin[1]*nuVtSqSum[3]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSqSum[2]*rdvSq4+3.354101966249684*nuVtSqSum[0]*G_1Skin[2]*rdvSq4; + vol_incr_G_1[11] = 3.354101966249685*nuVtSqSum[0]*G_1Skin[4]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSqSum[3]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSqSum[2]*rdvSq4+3.354101966249685*nuVtSqSum[1]*G_1Skin[2]*rdvSq4; double temp_F_0_diff[12] = {0.0}; double temp_F_0_edge[12] = {0.0}; @@ -79,55 +82,55 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1(const doubl temp_G_1_edge[10] = (-7.5*G_1Skin[10])+5.809475019311126*G_1Skin[6]-3.354101966249684*G_1Skin[2]; temp_G_1_edge[11] = (-7.5*G_1Skin[11])+5.809475019311125*G_1Skin[7]-3.354101966249685*G_1Skin[4]; - diff_F_0_incr[0] = 0.5*nuVtSq[3]*temp_F_0_diff[4]+0.5*nuVtSq[2]*temp_F_0_diff[2]+0.5*nuVtSq[1]*temp_F_0_diff[1]+0.5*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.5*nuVtSq[2]*temp_F_0_diff[4]+0.5*temp_F_0_diff[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_diff[1]+0.5*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.5*nuVtSq[1]*temp_F_0_diff[4]+0.5*temp_F_0_diff[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_diff[2]+0.5*temp_F_0_diff[0]*nuVtSq[2]; - diff_F_0_incr[3] = 0.5*nuVtSq[3]*temp_F_0_diff[7]+0.5*nuVtSq[2]*temp_F_0_diff[6]+0.5*nuVtSq[1]*temp_F_0_diff[5]+0.5*nuVtSq[0]*temp_F_0_diff[3]; - diff_F_0_incr[4] = 0.5*nuVtSq[0]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_F_0_diff[2]+0.5*temp_F_0_diff[1]*nuVtSq[2]; - diff_F_0_incr[5] = 0.5*nuVtSq[2]*temp_F_0_diff[7]+0.5*nuVtSq[3]*temp_F_0_diff[6]+0.5*nuVtSq[0]*temp_F_0_diff[5]+0.5*nuVtSq[1]*temp_F_0_diff[3]; - diff_F_0_incr[6] = 0.5*nuVtSq[1]*temp_F_0_diff[7]+0.5*nuVtSq[0]*temp_F_0_diff[6]+0.5*nuVtSq[3]*temp_F_0_diff[5]+0.5*nuVtSq[2]*temp_F_0_diff[3]; - diff_F_0_incr[7] = 0.5*nuVtSq[0]*temp_F_0_diff[7]+0.5*nuVtSq[1]*temp_F_0_diff[6]+0.5*nuVtSq[2]*temp_F_0_diff[5]+0.5*nuVtSq[3]*temp_F_0_diff[3]; - diff_F_0_incr[8] = 0.5*nuVtSq[3]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[10]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[9]+0.5*nuVtSq[0]*temp_F_0_diff[8]; - diff_F_0_incr[9] = 0.5000000000000001*nuVtSq[2]*temp_F_0_diff[11]+0.5*nuVtSq[3]*temp_F_0_diff[10]+0.5*nuVtSq[0]*temp_F_0_diff[9]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[8]; - diff_F_0_incr[10] = 0.5000000000000001*nuVtSq[1]*temp_F_0_diff[11]+0.5*nuVtSq[0]*temp_F_0_diff[10]+0.5*nuVtSq[3]*temp_F_0_diff[9]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[8]; - diff_F_0_incr[11] = 0.5*nuVtSq[0]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[10]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[9]+0.5*nuVtSq[3]*temp_F_0_diff[8]; - diff_G_1_incr[0] = 0.5*nuVtSq[3]*temp_G_1_diff[4]+0.5*nuVtSq[2]*temp_G_1_diff[2]+0.5*nuVtSq[1]*temp_G_1_diff[1]+0.5*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.5*nuVtSq[2]*temp_G_1_diff[4]+0.5*temp_G_1_diff[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_diff[1]+0.5*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.5*nuVtSq[1]*temp_G_1_diff[4]+0.5*temp_G_1_diff[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_diff[2]+0.5*temp_G_1_diff[0]*nuVtSq[2]; - diff_G_1_incr[3] = 0.5*nuVtSq[3]*temp_G_1_diff[7]+0.5*nuVtSq[2]*temp_G_1_diff[6]+0.5*nuVtSq[1]*temp_G_1_diff[5]+0.5*nuVtSq[0]*temp_G_1_diff[3]; - diff_G_1_incr[4] = 0.5*nuVtSq[0]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_G_1_diff[2]+0.5*temp_G_1_diff[1]*nuVtSq[2]; - diff_G_1_incr[5] = 0.5*nuVtSq[2]*temp_G_1_diff[7]+0.5*nuVtSq[3]*temp_G_1_diff[6]+0.5*nuVtSq[0]*temp_G_1_diff[5]+0.5*nuVtSq[1]*temp_G_1_diff[3]; - diff_G_1_incr[6] = 0.5*nuVtSq[1]*temp_G_1_diff[7]+0.5*nuVtSq[0]*temp_G_1_diff[6]+0.5*nuVtSq[3]*temp_G_1_diff[5]+0.5*nuVtSq[2]*temp_G_1_diff[3]; - diff_G_1_incr[7] = 0.5*nuVtSq[0]*temp_G_1_diff[7]+0.5*nuVtSq[1]*temp_G_1_diff[6]+0.5*nuVtSq[2]*temp_G_1_diff[5]+0.5*nuVtSq[3]*temp_G_1_diff[3]; - diff_G_1_incr[8] = 0.5*nuVtSq[3]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[10]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[9]+0.5*nuVtSq[0]*temp_G_1_diff[8]; - diff_G_1_incr[9] = 0.5000000000000001*nuVtSq[2]*temp_G_1_diff[11]+0.5*nuVtSq[3]*temp_G_1_diff[10]+0.5*nuVtSq[0]*temp_G_1_diff[9]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[8]; - diff_G_1_incr[10] = 0.5000000000000001*nuVtSq[1]*temp_G_1_diff[11]+0.5*nuVtSq[0]*temp_G_1_diff[10]+0.5*nuVtSq[3]*temp_G_1_diff[9]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[8]; - diff_G_1_incr[11] = 0.5*nuVtSq[0]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[10]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[9]+0.5*nuVtSq[3]*temp_G_1_diff[8]; + diff_F_0_incr[0] = 0.5*nuVtSqSum[3]*temp_F_0_diff[4]+0.5*nuVtSqSum[2]*temp_F_0_diff[2]+0.5*nuVtSqSum[1]*temp_F_0_diff[1]+0.5*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.5*nuVtSqSum[2]*temp_F_0_diff[4]+0.5*temp_F_0_diff[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_diff[1]+0.5*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.5*nuVtSqSum[1]*temp_F_0_diff[4]+0.5*temp_F_0_diff[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_diff[2]+0.5*temp_F_0_diff[0]*nuVtSqSum[2]; + diff_F_0_incr[3] = 0.5*nuVtSqSum[3]*temp_F_0_diff[7]+0.5*nuVtSqSum[2]*temp_F_0_diff[6]+0.5*nuVtSqSum[1]*temp_F_0_diff[5]+0.5*nuVtSqSum[0]*temp_F_0_diff[3]; + diff_F_0_incr[4] = 0.5*nuVtSqSum[0]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_F_0_diff[2]+0.5*temp_F_0_diff[1]*nuVtSqSum[2]; + diff_F_0_incr[5] = 0.5*nuVtSqSum[2]*temp_F_0_diff[7]+0.5*nuVtSqSum[3]*temp_F_0_diff[6]+0.5*nuVtSqSum[0]*temp_F_0_diff[5]+0.5*nuVtSqSum[1]*temp_F_0_diff[3]; + diff_F_0_incr[6] = 0.5*nuVtSqSum[1]*temp_F_0_diff[7]+0.5*nuVtSqSum[0]*temp_F_0_diff[6]+0.5*nuVtSqSum[3]*temp_F_0_diff[5]+0.5*nuVtSqSum[2]*temp_F_0_diff[3]; + diff_F_0_incr[7] = 0.5*nuVtSqSum[0]*temp_F_0_diff[7]+0.5*nuVtSqSum[1]*temp_F_0_diff[6]+0.5*nuVtSqSum[2]*temp_F_0_diff[5]+0.5*nuVtSqSum[3]*temp_F_0_diff[3]; + diff_F_0_incr[8] = 0.5*nuVtSqSum[3]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[10]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[9]+0.5*nuVtSqSum[0]*temp_F_0_diff[8]; + diff_F_0_incr[9] = 0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[11]+0.5*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*nuVtSqSum[0]*temp_F_0_diff[9]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[8]; + diff_F_0_incr[10] = 0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[11]+0.5*nuVtSqSum[0]*temp_F_0_diff[10]+0.5*nuVtSqSum[3]*temp_F_0_diff[9]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[8]; + diff_F_0_incr[11] = 0.5*nuVtSqSum[0]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[10]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[9]+0.5*nuVtSqSum[3]*temp_F_0_diff[8]; + diff_G_1_incr[0] = 0.5*nuVtSqSum[3]*temp_G_1_diff[4]+0.5*nuVtSqSum[2]*temp_G_1_diff[2]+0.5*nuVtSqSum[1]*temp_G_1_diff[1]+0.5*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.5*nuVtSqSum[2]*temp_G_1_diff[4]+0.5*temp_G_1_diff[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_diff[1]+0.5*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.5*nuVtSqSum[1]*temp_G_1_diff[4]+0.5*temp_G_1_diff[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_diff[2]+0.5*temp_G_1_diff[0]*nuVtSqSum[2]; + diff_G_1_incr[3] = 0.5*nuVtSqSum[3]*temp_G_1_diff[7]+0.5*nuVtSqSum[2]*temp_G_1_diff[6]+0.5*nuVtSqSum[1]*temp_G_1_diff[5]+0.5*nuVtSqSum[0]*temp_G_1_diff[3]; + diff_G_1_incr[4] = 0.5*nuVtSqSum[0]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_G_1_diff[2]+0.5*temp_G_1_diff[1]*nuVtSqSum[2]; + diff_G_1_incr[5] = 0.5*nuVtSqSum[2]*temp_G_1_diff[7]+0.5*nuVtSqSum[3]*temp_G_1_diff[6]+0.5*nuVtSqSum[0]*temp_G_1_diff[5]+0.5*nuVtSqSum[1]*temp_G_1_diff[3]; + diff_G_1_incr[6] = 0.5*nuVtSqSum[1]*temp_G_1_diff[7]+0.5*nuVtSqSum[0]*temp_G_1_diff[6]+0.5*nuVtSqSum[3]*temp_G_1_diff[5]+0.5*nuVtSqSum[2]*temp_G_1_diff[3]; + diff_G_1_incr[7] = 0.5*nuVtSqSum[0]*temp_G_1_diff[7]+0.5*nuVtSqSum[1]*temp_G_1_diff[6]+0.5*nuVtSqSum[2]*temp_G_1_diff[5]+0.5*nuVtSqSum[3]*temp_G_1_diff[3]; + diff_G_1_incr[8] = 0.5*nuVtSqSum[3]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[10]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[9]+0.5*nuVtSqSum[0]*temp_G_1_diff[8]; + diff_G_1_incr[9] = 0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[11]+0.5*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*nuVtSqSum[0]*temp_G_1_diff[9]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[8]; + diff_G_1_incr[10] = 0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[11]+0.5*nuVtSqSum[0]*temp_G_1_diff[10]+0.5*nuVtSqSum[3]*temp_G_1_diff[9]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[8]; + diff_G_1_incr[11] = 0.5*nuVtSqSum[0]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[10]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[9]+0.5*nuVtSqSum[3]*temp_G_1_diff[8]; - edge_F_0_incr[0] = 0.5*nuVtSq[3]*temp_F_0_edge[4]+0.5*nuVtSq[2]*temp_F_0_edge[2]+0.5*nuVtSq[1]*temp_F_0_edge[1]+0.5*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.5*nuVtSq[2]*temp_F_0_edge[4]+0.5*temp_F_0_edge[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_edge[1]+0.5*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.5*nuVtSq[1]*temp_F_0_edge[4]+0.5*temp_F_0_edge[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_edge[2]+0.5*temp_F_0_edge[0]*nuVtSq[2]; - edge_F_0_incr[3] = 0.5*nuVtSq[3]*temp_F_0_edge[7]+0.5*nuVtSq[2]*temp_F_0_edge[6]+0.5*nuVtSq[1]*temp_F_0_edge[5]+0.5*nuVtSq[0]*temp_F_0_edge[3]; - edge_F_0_incr[4] = 0.5*nuVtSq[0]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_F_0_edge[2]+0.5*temp_F_0_edge[1]*nuVtSq[2]; - edge_F_0_incr[5] = 0.5*nuVtSq[2]*temp_F_0_edge[7]+0.5*nuVtSq[3]*temp_F_0_edge[6]+0.5*nuVtSq[0]*temp_F_0_edge[5]+0.5*nuVtSq[1]*temp_F_0_edge[3]; - edge_F_0_incr[6] = 0.5*nuVtSq[1]*temp_F_0_edge[7]+0.5*nuVtSq[0]*temp_F_0_edge[6]+0.5*nuVtSq[3]*temp_F_0_edge[5]+0.5*nuVtSq[2]*temp_F_0_edge[3]; - edge_F_0_incr[7] = 0.5*nuVtSq[0]*temp_F_0_edge[7]+0.5*nuVtSq[1]*temp_F_0_edge[6]+0.5*nuVtSq[2]*temp_F_0_edge[5]+0.5*nuVtSq[3]*temp_F_0_edge[3]; - edge_F_0_incr[8] = 0.5*nuVtSq[3]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[10]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[9]+0.5*nuVtSq[0]*temp_F_0_edge[8]; - edge_F_0_incr[9] = 0.5000000000000001*nuVtSq[2]*temp_F_0_edge[11]+0.5*nuVtSq[3]*temp_F_0_edge[10]+0.5*nuVtSq[0]*temp_F_0_edge[9]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[8]; - edge_F_0_incr[10] = 0.5000000000000001*nuVtSq[1]*temp_F_0_edge[11]+0.5*nuVtSq[0]*temp_F_0_edge[10]+0.5*nuVtSq[3]*temp_F_0_edge[9]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[8]; - edge_F_0_incr[11] = 0.5*nuVtSq[0]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[10]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[9]+0.5*nuVtSq[3]*temp_F_0_edge[8]; - edge_G_1_incr[0] = 0.5*nuVtSq[3]*temp_G_1_edge[4]+0.5*nuVtSq[2]*temp_G_1_edge[2]+0.5*nuVtSq[1]*temp_G_1_edge[1]+0.5*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.5*nuVtSq[2]*temp_G_1_edge[4]+0.5*temp_G_1_edge[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_edge[1]+0.5*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.5*nuVtSq[1]*temp_G_1_edge[4]+0.5*temp_G_1_edge[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_edge[2]+0.5*temp_G_1_edge[0]*nuVtSq[2]; - edge_G_1_incr[3] = 0.5*nuVtSq[3]*temp_G_1_edge[7]+0.5*nuVtSq[2]*temp_G_1_edge[6]+0.5*nuVtSq[1]*temp_G_1_edge[5]+0.5*nuVtSq[0]*temp_G_1_edge[3]; - edge_G_1_incr[4] = 0.5*nuVtSq[0]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_G_1_edge[2]+0.5*temp_G_1_edge[1]*nuVtSq[2]; - edge_G_1_incr[5] = 0.5*nuVtSq[2]*temp_G_1_edge[7]+0.5*nuVtSq[3]*temp_G_1_edge[6]+0.5*nuVtSq[0]*temp_G_1_edge[5]+0.5*nuVtSq[1]*temp_G_1_edge[3]; - edge_G_1_incr[6] = 0.5*nuVtSq[1]*temp_G_1_edge[7]+0.5*nuVtSq[0]*temp_G_1_edge[6]+0.5*nuVtSq[3]*temp_G_1_edge[5]+0.5*nuVtSq[2]*temp_G_1_edge[3]; - edge_G_1_incr[7] = 0.5*nuVtSq[0]*temp_G_1_edge[7]+0.5*nuVtSq[1]*temp_G_1_edge[6]+0.5*nuVtSq[2]*temp_G_1_edge[5]+0.5*nuVtSq[3]*temp_G_1_edge[3]; - edge_G_1_incr[8] = 0.5*nuVtSq[3]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[10]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[9]+0.5*nuVtSq[0]*temp_G_1_edge[8]; - edge_G_1_incr[9] = 0.5000000000000001*nuVtSq[2]*temp_G_1_edge[11]+0.5*nuVtSq[3]*temp_G_1_edge[10]+0.5*nuVtSq[0]*temp_G_1_edge[9]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[8]; - edge_G_1_incr[10] = 0.5000000000000001*nuVtSq[1]*temp_G_1_edge[11]+0.5*nuVtSq[0]*temp_G_1_edge[10]+0.5*nuVtSq[3]*temp_G_1_edge[9]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[8]; - edge_G_1_incr[11] = 0.5*nuVtSq[0]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[10]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[9]+0.5*nuVtSq[3]*temp_G_1_edge[8]; + edge_F_0_incr[0] = 0.5*nuVtSqSum[3]*temp_F_0_edge[4]+0.5*nuVtSqSum[2]*temp_F_0_edge[2]+0.5*nuVtSqSum[1]*temp_F_0_edge[1]+0.5*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.5*nuVtSqSum[2]*temp_F_0_edge[4]+0.5*temp_F_0_edge[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_edge[1]+0.5*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.5*nuVtSqSum[1]*temp_F_0_edge[4]+0.5*temp_F_0_edge[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_edge[2]+0.5*temp_F_0_edge[0]*nuVtSqSum[2]; + edge_F_0_incr[3] = 0.5*nuVtSqSum[3]*temp_F_0_edge[7]+0.5*nuVtSqSum[2]*temp_F_0_edge[6]+0.5*nuVtSqSum[1]*temp_F_0_edge[5]+0.5*nuVtSqSum[0]*temp_F_0_edge[3]; + edge_F_0_incr[4] = 0.5*nuVtSqSum[0]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_F_0_edge[2]+0.5*temp_F_0_edge[1]*nuVtSqSum[2]; + edge_F_0_incr[5] = 0.5*nuVtSqSum[2]*temp_F_0_edge[7]+0.5*nuVtSqSum[3]*temp_F_0_edge[6]+0.5*nuVtSqSum[0]*temp_F_0_edge[5]+0.5*nuVtSqSum[1]*temp_F_0_edge[3]; + edge_F_0_incr[6] = 0.5*nuVtSqSum[1]*temp_F_0_edge[7]+0.5*nuVtSqSum[0]*temp_F_0_edge[6]+0.5*nuVtSqSum[3]*temp_F_0_edge[5]+0.5*nuVtSqSum[2]*temp_F_0_edge[3]; + edge_F_0_incr[7] = 0.5*nuVtSqSum[0]*temp_F_0_edge[7]+0.5*nuVtSqSum[1]*temp_F_0_edge[6]+0.5*nuVtSqSum[2]*temp_F_0_edge[5]+0.5*nuVtSqSum[3]*temp_F_0_edge[3]; + edge_F_0_incr[8] = 0.5*nuVtSqSum[3]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[10]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[9]+0.5*nuVtSqSum[0]*temp_F_0_edge[8]; + edge_F_0_incr[9] = 0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[11]+0.5*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*nuVtSqSum[0]*temp_F_0_edge[9]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[8]; + edge_F_0_incr[10] = 0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[11]+0.5*nuVtSqSum[0]*temp_F_0_edge[10]+0.5*nuVtSqSum[3]*temp_F_0_edge[9]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[8]; + edge_F_0_incr[11] = 0.5*nuVtSqSum[0]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[10]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[9]+0.5*nuVtSqSum[3]*temp_F_0_edge[8]; + edge_G_1_incr[0] = 0.5*nuVtSqSum[3]*temp_G_1_edge[4]+0.5*nuVtSqSum[2]*temp_G_1_edge[2]+0.5*nuVtSqSum[1]*temp_G_1_edge[1]+0.5*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.5*nuVtSqSum[2]*temp_G_1_edge[4]+0.5*temp_G_1_edge[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_edge[1]+0.5*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.5*nuVtSqSum[1]*temp_G_1_edge[4]+0.5*temp_G_1_edge[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_edge[2]+0.5*temp_G_1_edge[0]*nuVtSqSum[2]; + edge_G_1_incr[3] = 0.5*nuVtSqSum[3]*temp_G_1_edge[7]+0.5*nuVtSqSum[2]*temp_G_1_edge[6]+0.5*nuVtSqSum[1]*temp_G_1_edge[5]+0.5*nuVtSqSum[0]*temp_G_1_edge[3]; + edge_G_1_incr[4] = 0.5*nuVtSqSum[0]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_G_1_edge[2]+0.5*temp_G_1_edge[1]*nuVtSqSum[2]; + edge_G_1_incr[5] = 0.5*nuVtSqSum[2]*temp_G_1_edge[7]+0.5*nuVtSqSum[3]*temp_G_1_edge[6]+0.5*nuVtSqSum[0]*temp_G_1_edge[5]+0.5*nuVtSqSum[1]*temp_G_1_edge[3]; + edge_G_1_incr[6] = 0.5*nuVtSqSum[1]*temp_G_1_edge[7]+0.5*nuVtSqSum[0]*temp_G_1_edge[6]+0.5*nuVtSqSum[3]*temp_G_1_edge[5]+0.5*nuVtSqSum[2]*temp_G_1_edge[3]; + edge_G_1_incr[7] = 0.5*nuVtSqSum[0]*temp_G_1_edge[7]+0.5*nuVtSqSum[1]*temp_G_1_edge[6]+0.5*nuVtSqSum[2]*temp_G_1_edge[5]+0.5*nuVtSqSum[3]*temp_G_1_edge[3]; + edge_G_1_incr[8] = 0.5*nuVtSqSum[3]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[10]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[9]+0.5*nuVtSqSum[0]*temp_G_1_edge[8]; + edge_G_1_incr[9] = 0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[11]+0.5*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*nuVtSqSum[0]*temp_G_1_edge[9]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[8]; + edge_G_1_incr[10] = 0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[11]+0.5*nuVtSqSum[0]*temp_G_1_edge[10]+0.5*nuVtSqSum[3]*temp_G_1_edge[9]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[8]; + edge_G_1_incr[11] = 0.5*nuVtSqSum[0]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[10]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[9]+0.5*nuVtSqSum[3]*temp_G_1_edge[8]; } else { @@ -174,55 +177,55 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_ser_p1(const doubl temp_G_1_edge[10] = (-7.5*G_1Skin[10])-5.809475019311126*G_1Skin[6]-3.354101966249684*G_1Skin[2]; temp_G_1_edge[11] = (-7.5*G_1Skin[11])-5.809475019311125*G_1Skin[7]-3.354101966249685*G_1Skin[4]; - diff_F_0_incr[0] = 0.5*nuVtSq[3]*temp_F_0_diff[4]+0.5*nuVtSq[2]*temp_F_0_diff[2]+0.5*nuVtSq[1]*temp_F_0_diff[1]+0.5*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.5*nuVtSq[2]*temp_F_0_diff[4]+0.5*temp_F_0_diff[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_diff[1]+0.5*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.5*nuVtSq[1]*temp_F_0_diff[4]+0.5*temp_F_0_diff[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_diff[2]+0.5*temp_F_0_diff[0]*nuVtSq[2]; - diff_F_0_incr[3] = 0.5*nuVtSq[3]*temp_F_0_diff[7]+0.5*nuVtSq[2]*temp_F_0_diff[6]+0.5*nuVtSq[1]*temp_F_0_diff[5]+0.5*nuVtSq[0]*temp_F_0_diff[3]; - diff_F_0_incr[4] = 0.5*nuVtSq[0]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_F_0_diff[2]+0.5*temp_F_0_diff[1]*nuVtSq[2]; - diff_F_0_incr[5] = 0.5*nuVtSq[2]*temp_F_0_diff[7]+0.5*nuVtSq[3]*temp_F_0_diff[6]+0.5*nuVtSq[0]*temp_F_0_diff[5]+0.5*nuVtSq[1]*temp_F_0_diff[3]; - diff_F_0_incr[6] = 0.5*nuVtSq[1]*temp_F_0_diff[7]+0.5*nuVtSq[0]*temp_F_0_diff[6]+0.5*nuVtSq[3]*temp_F_0_diff[5]+0.5*nuVtSq[2]*temp_F_0_diff[3]; - diff_F_0_incr[7] = 0.5*nuVtSq[0]*temp_F_0_diff[7]+0.5*nuVtSq[1]*temp_F_0_diff[6]+0.5*nuVtSq[2]*temp_F_0_diff[5]+0.5*nuVtSq[3]*temp_F_0_diff[3]; - diff_F_0_incr[8] = 0.5*nuVtSq[3]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[10]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[9]+0.5*nuVtSq[0]*temp_F_0_diff[8]; - diff_F_0_incr[9] = 0.5000000000000001*nuVtSq[2]*temp_F_0_diff[11]+0.5*nuVtSq[3]*temp_F_0_diff[10]+0.5*nuVtSq[0]*temp_F_0_diff[9]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[8]; - diff_F_0_incr[10] = 0.5000000000000001*nuVtSq[1]*temp_F_0_diff[11]+0.5*nuVtSq[0]*temp_F_0_diff[10]+0.5*nuVtSq[3]*temp_F_0_diff[9]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[8]; - diff_F_0_incr[11] = 0.5*nuVtSq[0]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[10]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[9]+0.5*nuVtSq[3]*temp_F_0_diff[8]; - diff_G_1_incr[0] = 0.5*nuVtSq[3]*temp_G_1_diff[4]+0.5*nuVtSq[2]*temp_G_1_diff[2]+0.5*nuVtSq[1]*temp_G_1_diff[1]+0.5*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.5*nuVtSq[2]*temp_G_1_diff[4]+0.5*temp_G_1_diff[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_diff[1]+0.5*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.5*nuVtSq[1]*temp_G_1_diff[4]+0.5*temp_G_1_diff[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_diff[2]+0.5*temp_G_1_diff[0]*nuVtSq[2]; - diff_G_1_incr[3] = 0.5*nuVtSq[3]*temp_G_1_diff[7]+0.5*nuVtSq[2]*temp_G_1_diff[6]+0.5*nuVtSq[1]*temp_G_1_diff[5]+0.5*nuVtSq[0]*temp_G_1_diff[3]; - diff_G_1_incr[4] = 0.5*nuVtSq[0]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_G_1_diff[2]+0.5*temp_G_1_diff[1]*nuVtSq[2]; - diff_G_1_incr[5] = 0.5*nuVtSq[2]*temp_G_1_diff[7]+0.5*nuVtSq[3]*temp_G_1_diff[6]+0.5*nuVtSq[0]*temp_G_1_diff[5]+0.5*nuVtSq[1]*temp_G_1_diff[3]; - diff_G_1_incr[6] = 0.5*nuVtSq[1]*temp_G_1_diff[7]+0.5*nuVtSq[0]*temp_G_1_diff[6]+0.5*nuVtSq[3]*temp_G_1_diff[5]+0.5*nuVtSq[2]*temp_G_1_diff[3]; - diff_G_1_incr[7] = 0.5*nuVtSq[0]*temp_G_1_diff[7]+0.5*nuVtSq[1]*temp_G_1_diff[6]+0.5*nuVtSq[2]*temp_G_1_diff[5]+0.5*nuVtSq[3]*temp_G_1_diff[3]; - diff_G_1_incr[8] = 0.5*nuVtSq[3]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[10]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[9]+0.5*nuVtSq[0]*temp_G_1_diff[8]; - diff_G_1_incr[9] = 0.5000000000000001*nuVtSq[2]*temp_G_1_diff[11]+0.5*nuVtSq[3]*temp_G_1_diff[10]+0.5*nuVtSq[0]*temp_G_1_diff[9]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[8]; - diff_G_1_incr[10] = 0.5000000000000001*nuVtSq[1]*temp_G_1_diff[11]+0.5*nuVtSq[0]*temp_G_1_diff[10]+0.5*nuVtSq[3]*temp_G_1_diff[9]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[8]; - diff_G_1_incr[11] = 0.5*nuVtSq[0]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[10]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[9]+0.5*nuVtSq[3]*temp_G_1_diff[8]; + diff_F_0_incr[0] = 0.5*nuVtSqSum[3]*temp_F_0_diff[4]+0.5*nuVtSqSum[2]*temp_F_0_diff[2]+0.5*nuVtSqSum[1]*temp_F_0_diff[1]+0.5*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.5*nuVtSqSum[2]*temp_F_0_diff[4]+0.5*temp_F_0_diff[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_diff[1]+0.5*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.5*nuVtSqSum[1]*temp_F_0_diff[4]+0.5*temp_F_0_diff[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_diff[2]+0.5*temp_F_0_diff[0]*nuVtSqSum[2]; + diff_F_0_incr[3] = 0.5*nuVtSqSum[3]*temp_F_0_diff[7]+0.5*nuVtSqSum[2]*temp_F_0_diff[6]+0.5*nuVtSqSum[1]*temp_F_0_diff[5]+0.5*nuVtSqSum[0]*temp_F_0_diff[3]; + diff_F_0_incr[4] = 0.5*nuVtSqSum[0]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_F_0_diff[2]+0.5*temp_F_0_diff[1]*nuVtSqSum[2]; + diff_F_0_incr[5] = 0.5*nuVtSqSum[2]*temp_F_0_diff[7]+0.5*nuVtSqSum[3]*temp_F_0_diff[6]+0.5*nuVtSqSum[0]*temp_F_0_diff[5]+0.5*nuVtSqSum[1]*temp_F_0_diff[3]; + diff_F_0_incr[6] = 0.5*nuVtSqSum[1]*temp_F_0_diff[7]+0.5*nuVtSqSum[0]*temp_F_0_diff[6]+0.5*nuVtSqSum[3]*temp_F_0_diff[5]+0.5*nuVtSqSum[2]*temp_F_0_diff[3]; + diff_F_0_incr[7] = 0.5*nuVtSqSum[0]*temp_F_0_diff[7]+0.5*nuVtSqSum[1]*temp_F_0_diff[6]+0.5*nuVtSqSum[2]*temp_F_0_diff[5]+0.5*nuVtSqSum[3]*temp_F_0_diff[3]; + diff_F_0_incr[8] = 0.5*nuVtSqSum[3]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[10]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[9]+0.5*nuVtSqSum[0]*temp_F_0_diff[8]; + diff_F_0_incr[9] = 0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[11]+0.5*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*nuVtSqSum[0]*temp_F_0_diff[9]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[8]; + diff_F_0_incr[10] = 0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[11]+0.5*nuVtSqSum[0]*temp_F_0_diff[10]+0.5*nuVtSqSum[3]*temp_F_0_diff[9]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[8]; + diff_F_0_incr[11] = 0.5*nuVtSqSum[0]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[10]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[9]+0.5*nuVtSqSum[3]*temp_F_0_diff[8]; + diff_G_1_incr[0] = 0.5*nuVtSqSum[3]*temp_G_1_diff[4]+0.5*nuVtSqSum[2]*temp_G_1_diff[2]+0.5*nuVtSqSum[1]*temp_G_1_diff[1]+0.5*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.5*nuVtSqSum[2]*temp_G_1_diff[4]+0.5*temp_G_1_diff[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_diff[1]+0.5*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.5*nuVtSqSum[1]*temp_G_1_diff[4]+0.5*temp_G_1_diff[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_diff[2]+0.5*temp_G_1_diff[0]*nuVtSqSum[2]; + diff_G_1_incr[3] = 0.5*nuVtSqSum[3]*temp_G_1_diff[7]+0.5*nuVtSqSum[2]*temp_G_1_diff[6]+0.5*nuVtSqSum[1]*temp_G_1_diff[5]+0.5*nuVtSqSum[0]*temp_G_1_diff[3]; + diff_G_1_incr[4] = 0.5*nuVtSqSum[0]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_G_1_diff[2]+0.5*temp_G_1_diff[1]*nuVtSqSum[2]; + diff_G_1_incr[5] = 0.5*nuVtSqSum[2]*temp_G_1_diff[7]+0.5*nuVtSqSum[3]*temp_G_1_diff[6]+0.5*nuVtSqSum[0]*temp_G_1_diff[5]+0.5*nuVtSqSum[1]*temp_G_1_diff[3]; + diff_G_1_incr[6] = 0.5*nuVtSqSum[1]*temp_G_1_diff[7]+0.5*nuVtSqSum[0]*temp_G_1_diff[6]+0.5*nuVtSqSum[3]*temp_G_1_diff[5]+0.5*nuVtSqSum[2]*temp_G_1_diff[3]; + diff_G_1_incr[7] = 0.5*nuVtSqSum[0]*temp_G_1_diff[7]+0.5*nuVtSqSum[1]*temp_G_1_diff[6]+0.5*nuVtSqSum[2]*temp_G_1_diff[5]+0.5*nuVtSqSum[3]*temp_G_1_diff[3]; + diff_G_1_incr[8] = 0.5*nuVtSqSum[3]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[10]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[9]+0.5*nuVtSqSum[0]*temp_G_1_diff[8]; + diff_G_1_incr[9] = 0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[11]+0.5*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*nuVtSqSum[0]*temp_G_1_diff[9]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[8]; + diff_G_1_incr[10] = 0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[11]+0.5*nuVtSqSum[0]*temp_G_1_diff[10]+0.5*nuVtSqSum[3]*temp_G_1_diff[9]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[8]; + diff_G_1_incr[11] = 0.5*nuVtSqSum[0]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[10]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[9]+0.5*nuVtSqSum[3]*temp_G_1_diff[8]; - edge_F_0_incr[0] = 0.5*nuVtSq[3]*temp_F_0_edge[4]+0.5*nuVtSq[2]*temp_F_0_edge[2]+0.5*nuVtSq[1]*temp_F_0_edge[1]+0.5*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.5*nuVtSq[2]*temp_F_0_edge[4]+0.5*temp_F_0_edge[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_edge[1]+0.5*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.5*nuVtSq[1]*temp_F_0_edge[4]+0.5*temp_F_0_edge[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_edge[2]+0.5*temp_F_0_edge[0]*nuVtSq[2]; - edge_F_0_incr[3] = 0.5*nuVtSq[3]*temp_F_0_edge[7]+0.5*nuVtSq[2]*temp_F_0_edge[6]+0.5*nuVtSq[1]*temp_F_0_edge[5]+0.5*nuVtSq[0]*temp_F_0_edge[3]; - edge_F_0_incr[4] = 0.5*nuVtSq[0]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_F_0_edge[2]+0.5*temp_F_0_edge[1]*nuVtSq[2]; - edge_F_0_incr[5] = 0.5*nuVtSq[2]*temp_F_0_edge[7]+0.5*nuVtSq[3]*temp_F_0_edge[6]+0.5*nuVtSq[0]*temp_F_0_edge[5]+0.5*nuVtSq[1]*temp_F_0_edge[3]; - edge_F_0_incr[6] = 0.5*nuVtSq[1]*temp_F_0_edge[7]+0.5*nuVtSq[0]*temp_F_0_edge[6]+0.5*nuVtSq[3]*temp_F_0_edge[5]+0.5*nuVtSq[2]*temp_F_0_edge[3]; - edge_F_0_incr[7] = 0.5*nuVtSq[0]*temp_F_0_edge[7]+0.5*nuVtSq[1]*temp_F_0_edge[6]+0.5*nuVtSq[2]*temp_F_0_edge[5]+0.5*nuVtSq[3]*temp_F_0_edge[3]; - edge_F_0_incr[8] = 0.5*nuVtSq[3]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[10]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[9]+0.5*nuVtSq[0]*temp_F_0_edge[8]; - edge_F_0_incr[9] = 0.5000000000000001*nuVtSq[2]*temp_F_0_edge[11]+0.5*nuVtSq[3]*temp_F_0_edge[10]+0.5*nuVtSq[0]*temp_F_0_edge[9]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[8]; - edge_F_0_incr[10] = 0.5000000000000001*nuVtSq[1]*temp_F_0_edge[11]+0.5*nuVtSq[0]*temp_F_0_edge[10]+0.5*nuVtSq[3]*temp_F_0_edge[9]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[8]; - edge_F_0_incr[11] = 0.5*nuVtSq[0]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[10]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[9]+0.5*nuVtSq[3]*temp_F_0_edge[8]; - edge_G_1_incr[0] = 0.5*nuVtSq[3]*temp_G_1_edge[4]+0.5*nuVtSq[2]*temp_G_1_edge[2]+0.5*nuVtSq[1]*temp_G_1_edge[1]+0.5*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.5*nuVtSq[2]*temp_G_1_edge[4]+0.5*temp_G_1_edge[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_edge[1]+0.5*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.5*nuVtSq[1]*temp_G_1_edge[4]+0.5*temp_G_1_edge[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_edge[2]+0.5*temp_G_1_edge[0]*nuVtSq[2]; - edge_G_1_incr[3] = 0.5*nuVtSq[3]*temp_G_1_edge[7]+0.5*nuVtSq[2]*temp_G_1_edge[6]+0.5*nuVtSq[1]*temp_G_1_edge[5]+0.5*nuVtSq[0]*temp_G_1_edge[3]; - edge_G_1_incr[4] = 0.5*nuVtSq[0]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_G_1_edge[2]+0.5*temp_G_1_edge[1]*nuVtSq[2]; - edge_G_1_incr[5] = 0.5*nuVtSq[2]*temp_G_1_edge[7]+0.5*nuVtSq[3]*temp_G_1_edge[6]+0.5*nuVtSq[0]*temp_G_1_edge[5]+0.5*nuVtSq[1]*temp_G_1_edge[3]; - edge_G_1_incr[6] = 0.5*nuVtSq[1]*temp_G_1_edge[7]+0.5*nuVtSq[0]*temp_G_1_edge[6]+0.5*nuVtSq[3]*temp_G_1_edge[5]+0.5*nuVtSq[2]*temp_G_1_edge[3]; - edge_G_1_incr[7] = 0.5*nuVtSq[0]*temp_G_1_edge[7]+0.5*nuVtSq[1]*temp_G_1_edge[6]+0.5*nuVtSq[2]*temp_G_1_edge[5]+0.5*nuVtSq[3]*temp_G_1_edge[3]; - edge_G_1_incr[8] = 0.5*nuVtSq[3]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[10]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[9]+0.5*nuVtSq[0]*temp_G_1_edge[8]; - edge_G_1_incr[9] = 0.5000000000000001*nuVtSq[2]*temp_G_1_edge[11]+0.5*nuVtSq[3]*temp_G_1_edge[10]+0.5*nuVtSq[0]*temp_G_1_edge[9]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[8]; - edge_G_1_incr[10] = 0.5000000000000001*nuVtSq[1]*temp_G_1_edge[11]+0.5*nuVtSq[0]*temp_G_1_edge[10]+0.5*nuVtSq[3]*temp_G_1_edge[9]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[8]; - edge_G_1_incr[11] = 0.5*nuVtSq[0]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[10]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[9]+0.5*nuVtSq[3]*temp_G_1_edge[8]; + edge_F_0_incr[0] = 0.5*nuVtSqSum[3]*temp_F_0_edge[4]+0.5*nuVtSqSum[2]*temp_F_0_edge[2]+0.5*nuVtSqSum[1]*temp_F_0_edge[1]+0.5*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.5*nuVtSqSum[2]*temp_F_0_edge[4]+0.5*temp_F_0_edge[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_edge[1]+0.5*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.5*nuVtSqSum[1]*temp_F_0_edge[4]+0.5*temp_F_0_edge[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_edge[2]+0.5*temp_F_0_edge[0]*nuVtSqSum[2]; + edge_F_0_incr[3] = 0.5*nuVtSqSum[3]*temp_F_0_edge[7]+0.5*nuVtSqSum[2]*temp_F_0_edge[6]+0.5*nuVtSqSum[1]*temp_F_0_edge[5]+0.5*nuVtSqSum[0]*temp_F_0_edge[3]; + edge_F_0_incr[4] = 0.5*nuVtSqSum[0]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_F_0_edge[2]+0.5*temp_F_0_edge[1]*nuVtSqSum[2]; + edge_F_0_incr[5] = 0.5*nuVtSqSum[2]*temp_F_0_edge[7]+0.5*nuVtSqSum[3]*temp_F_0_edge[6]+0.5*nuVtSqSum[0]*temp_F_0_edge[5]+0.5*nuVtSqSum[1]*temp_F_0_edge[3]; + edge_F_0_incr[6] = 0.5*nuVtSqSum[1]*temp_F_0_edge[7]+0.5*nuVtSqSum[0]*temp_F_0_edge[6]+0.5*nuVtSqSum[3]*temp_F_0_edge[5]+0.5*nuVtSqSum[2]*temp_F_0_edge[3]; + edge_F_0_incr[7] = 0.5*nuVtSqSum[0]*temp_F_0_edge[7]+0.5*nuVtSqSum[1]*temp_F_0_edge[6]+0.5*nuVtSqSum[2]*temp_F_0_edge[5]+0.5*nuVtSqSum[3]*temp_F_0_edge[3]; + edge_F_0_incr[8] = 0.5*nuVtSqSum[3]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[10]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[9]+0.5*nuVtSqSum[0]*temp_F_0_edge[8]; + edge_F_0_incr[9] = 0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[11]+0.5*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*nuVtSqSum[0]*temp_F_0_edge[9]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[8]; + edge_F_0_incr[10] = 0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[11]+0.5*nuVtSqSum[0]*temp_F_0_edge[10]+0.5*nuVtSqSum[3]*temp_F_0_edge[9]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[8]; + edge_F_0_incr[11] = 0.5*nuVtSqSum[0]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[10]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[9]+0.5*nuVtSqSum[3]*temp_F_0_edge[8]; + edge_G_1_incr[0] = 0.5*nuVtSqSum[3]*temp_G_1_edge[4]+0.5*nuVtSqSum[2]*temp_G_1_edge[2]+0.5*nuVtSqSum[1]*temp_G_1_edge[1]+0.5*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.5*nuVtSqSum[2]*temp_G_1_edge[4]+0.5*temp_G_1_edge[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_edge[1]+0.5*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.5*nuVtSqSum[1]*temp_G_1_edge[4]+0.5*temp_G_1_edge[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_edge[2]+0.5*temp_G_1_edge[0]*nuVtSqSum[2]; + edge_G_1_incr[3] = 0.5*nuVtSqSum[3]*temp_G_1_edge[7]+0.5*nuVtSqSum[2]*temp_G_1_edge[6]+0.5*nuVtSqSum[1]*temp_G_1_edge[5]+0.5*nuVtSqSum[0]*temp_G_1_edge[3]; + edge_G_1_incr[4] = 0.5*nuVtSqSum[0]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_G_1_edge[2]+0.5*temp_G_1_edge[1]*nuVtSqSum[2]; + edge_G_1_incr[5] = 0.5*nuVtSqSum[2]*temp_G_1_edge[7]+0.5*nuVtSqSum[3]*temp_G_1_edge[6]+0.5*nuVtSqSum[0]*temp_G_1_edge[5]+0.5*nuVtSqSum[1]*temp_G_1_edge[3]; + edge_G_1_incr[6] = 0.5*nuVtSqSum[1]*temp_G_1_edge[7]+0.5*nuVtSqSum[0]*temp_G_1_edge[6]+0.5*nuVtSqSum[3]*temp_G_1_edge[5]+0.5*nuVtSqSum[2]*temp_G_1_edge[3]; + edge_G_1_incr[7] = 0.5*nuVtSqSum[0]*temp_G_1_edge[7]+0.5*nuVtSqSum[1]*temp_G_1_edge[6]+0.5*nuVtSqSum[2]*temp_G_1_edge[5]+0.5*nuVtSqSum[3]*temp_G_1_edge[3]; + edge_G_1_incr[8] = 0.5*nuVtSqSum[3]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[10]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[9]+0.5*nuVtSqSum[0]*temp_G_1_edge[8]; + edge_G_1_incr[9] = 0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[11]+0.5*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*nuVtSqSum[0]*temp_G_1_edge[9]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[8]; + edge_G_1_incr[10] = 0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[11]+0.5*nuVtSqSum[0]*temp_G_1_edge[10]+0.5*nuVtSqSum[3]*temp_G_1_edge[9]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[8]; + edge_G_1_incr[11] = 0.5*nuVtSqSum[0]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[10]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[9]+0.5*nuVtSqSum[3]*temp_G_1_edge[8]; } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2.c index 125ffe7db..7cb1ddf62 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[3]: Cell-center coordinates. - // dxv[3]: Cell spacing. - // nuVtSq[9]: Thermal speeds squared times collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input distribution functions [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell. + // out: Incremented distribution functions in skin cell. double rdvSq4 = 4.0/(dxv[2]*dxv[2]); + const double *nuVtSqSum = &nuPrimMomsSum[9]; + const double *F_0Skin = &fSkin[0]; const double *G_1Skin = &fSkin[27]; const double *F_0Edge = &fEdge[0]; @@ -16,24 +19,24 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2(const do double vol_incr_F_0[27] = {0.0}; double vol_incr_G_1[27] = {0.0}; - vol_incr_F_0[9] = 3.354101966249685*nuVtSq[8]*F_0Skin[20]*rdvSq4+3.354101966249685*nuVtSq[7]*F_0Skin[12]*rdvSq4+3.354101966249685*nuVtSq[6]*F_0Skin[11]*rdvSq4+3.354101966249685*nuVtSq[5]*F_0Skin[8]*rdvSq4+3.354101966249685*nuVtSq[4]*F_0Skin[7]*rdvSq4+3.354101966249685*nuVtSq[3]*F_0Skin[4]*rdvSq4+3.354101966249685*F_0Skin[2]*nuVtSq[2]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSq[1]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_F_0[15] = 3.0*nuVtSq[7]*F_0Skin[20]*rdvSq4+3.0*nuVtSq[8]*F_0Skin[12]*rdvSq4+3.354101966249685*nuVtSq[5]*F_0Skin[12]*rdvSq4+3.0*nuVtSq[3]*F_0Skin[11]*rdvSq4+3.354101966249685*nuVtSq[7]*F_0Skin[8]*rdvSq4+3.0*nuVtSq[1]*F_0Skin[7]*rdvSq4+3.0*F_0Skin[4]*nuVtSq[6]*rdvSq4+3.0*F_0Skin[1]*nuVtSq[4]*rdvSq4+3.354101966249684*nuVtSq[2]*F_0Skin[4]*rdvSq4+3.354101966249684*F_0Skin[2]*nuVtSq[3]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSq[1]*rdvSq4+3.354101966249684*nuVtSq[0]*F_0Skin[1]*rdvSq4; - vol_incr_F_0[16] = 3.0*nuVtSq[6]*F_0Skin[20]*rdvSq4+3.0*nuVtSq[3]*F_0Skin[12]*rdvSq4+3.0*nuVtSq[8]*F_0Skin[11]*rdvSq4+3.354101966249685*nuVtSq[4]*F_0Skin[11]*rdvSq4+3.0*nuVtSq[2]*F_0Skin[8]*rdvSq4+3.0*F_0Skin[4]*nuVtSq[7]*rdvSq4+3.354101966249685*nuVtSq[6]*F_0Skin[7]*rdvSq4+3.0*F_0Skin[2]*nuVtSq[5]*rdvSq4+3.354101966249684*nuVtSq[1]*F_0Skin[4]*rdvSq4+3.354101966249684*F_0Skin[1]*nuVtSq[3]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSq[2]*rdvSq4+3.354101966249684*nuVtSq[0]*F_0Skin[2]*rdvSq4; - vol_incr_F_0[19] = 2.683281572999748*nuVtSq[3]*F_0Skin[20]*rdvSq4+2.683281572999748*nuVtSq[6]*F_0Skin[12]*rdvSq4+3.0*nuVtSq[2]*F_0Skin[12]*rdvSq4+2.683281572999748*nuVtSq[7]*F_0Skin[11]*rdvSq4+3.0*nuVtSq[1]*F_0Skin[11]*rdvSq4+2.683281572999748*F_0Skin[4]*nuVtSq[8]*rdvSq4+3.0*nuVtSq[3]*F_0Skin[8]*rdvSq4+3.0*F_0Skin[2]*nuVtSq[7]*rdvSq4+3.0*nuVtSq[3]*F_0Skin[7]*rdvSq4+3.0*F_0Skin[1]*nuVtSq[6]*rdvSq4+3.0*F_0Skin[4]*nuVtSq[5]*rdvSq4+3.0*F_0Skin[4]*nuVtSq[4]*rdvSq4+3.354101966249685*nuVtSq[0]*F_0Skin[4]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSq[3]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSq[2]*rdvSq4+3.354101966249685*nuVtSq[1]*F_0Skin[2]*rdvSq4; - vol_incr_F_0[21] = 2.142857142857143*nuVtSq[8]*F_0Skin[20]*rdvSq4+3.354101966249685*nuVtSq[5]*F_0Skin[20]*rdvSq4+3.0*nuVtSq[7]*F_0Skin[12]*rdvSq4+2.142857142857143*nuVtSq[6]*F_0Skin[11]*rdvSq4+3.354101966249684*nuVtSq[2]*F_0Skin[11]*rdvSq4+3.354101966249685*F_0Skin[8]*nuVtSq[8]*rdvSq4+2.142857142857143*nuVtSq[4]*F_0Skin[7]*rdvSq4+3.354101966249685*nuVtSq[0]*F_0Skin[7]*rdvSq4+3.354101966249684*F_0Skin[2]*nuVtSq[6]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSq[4]*rdvSq4+3.0*nuVtSq[3]*F_0Skin[4]*rdvSq4+3.0*F_0Skin[1]*nuVtSq[1]*rdvSq4; - vol_incr_F_0[22] = 2.142857142857143*nuVtSq[8]*F_0Skin[20]*rdvSq4+3.354101966249685*nuVtSq[4]*F_0Skin[20]*rdvSq4+2.142857142857143*nuVtSq[7]*F_0Skin[12]*rdvSq4+3.354101966249684*nuVtSq[1]*F_0Skin[12]*rdvSq4+3.0*nuVtSq[6]*F_0Skin[11]*rdvSq4+3.354101966249685*F_0Skin[7]*nuVtSq[8]*rdvSq4+2.142857142857143*nuVtSq[5]*F_0Skin[8]*rdvSq4+3.354101966249685*nuVtSq[0]*F_0Skin[8]*rdvSq4+3.354101966249684*F_0Skin[1]*nuVtSq[7]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSq[5]*rdvSq4+3.0*nuVtSq[3]*F_0Skin[4]*rdvSq4+3.0*F_0Skin[2]*nuVtSq[2]*rdvSq4; - vol_incr_F_0[24] = 1.91662969499982*nuVtSq[6]*F_0Skin[20]*rdvSq4+3.0*nuVtSq[2]*F_0Skin[20]*rdvSq4+2.683281572999748*nuVtSq[3]*F_0Skin[12]*rdvSq4+1.91662969499982*nuVtSq[8]*F_0Skin[11]*rdvSq4+3.0*nuVtSq[5]*F_0Skin[11]*rdvSq4+2.142857142857143*nuVtSq[4]*F_0Skin[11]*rdvSq4+3.354101966249684*nuVtSq[0]*F_0Skin[11]*rdvSq4+3.0*F_0Skin[2]*nuVtSq[8]*rdvSq4+3.0*nuVtSq[6]*F_0Skin[8]*rdvSq4+2.683281572999748*F_0Skin[4]*nuVtSq[7]*rdvSq4+2.142857142857143*nuVtSq[6]*F_0Skin[7]*rdvSq4+3.354101966249685*nuVtSq[2]*F_0Skin[7]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSq[6]*rdvSq4+3.354101966249685*F_0Skin[2]*nuVtSq[4]*rdvSq4+3.0*nuVtSq[1]*F_0Skin[4]*rdvSq4+3.0*F_0Skin[1]*nuVtSq[3]*rdvSq4; - vol_incr_F_0[25] = 1.91662969499982*nuVtSq[7]*F_0Skin[20]*rdvSq4+3.0*nuVtSq[1]*F_0Skin[20]*rdvSq4+1.91662969499982*nuVtSq[8]*F_0Skin[12]*rdvSq4+2.142857142857143*nuVtSq[5]*F_0Skin[12]*rdvSq4+3.0*nuVtSq[4]*F_0Skin[12]*rdvSq4+3.354101966249684*nuVtSq[0]*F_0Skin[12]*rdvSq4+2.683281572999748*nuVtSq[3]*F_0Skin[11]*rdvSq4+3.0*F_0Skin[1]*nuVtSq[8]*rdvSq4+2.142857142857143*nuVtSq[7]*F_0Skin[8]*rdvSq4+3.354101966249685*nuVtSq[1]*F_0Skin[8]*rdvSq4+3.0*F_0Skin[7]*nuVtSq[7]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSq[7]*rdvSq4+2.683281572999748*F_0Skin[4]*nuVtSq[6]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSq[5]*rdvSq4+3.0*nuVtSq[2]*F_0Skin[4]*rdvSq4+3.0*F_0Skin[2]*nuVtSq[3]*rdvSq4; - vol_incr_F_0[26] = 1.369021210714157*nuVtSq[8]*F_0Skin[20]*rdvSq4+2.142857142857143*nuVtSq[5]*F_0Skin[20]*rdvSq4+2.142857142857143*nuVtSq[4]*F_0Skin[20]*rdvSq4+3.354101966249685*nuVtSq[0]*F_0Skin[20]*rdvSq4+1.91662969499982*nuVtSq[7]*F_0Skin[12]*rdvSq4+3.0*nuVtSq[1]*F_0Skin[12]*rdvSq4+1.91662969499982*nuVtSq[6]*F_0Skin[11]*rdvSq4+3.0*nuVtSq[2]*F_0Skin[11]*rdvSq4+2.142857142857143*F_0Skin[8]*nuVtSq[8]*rdvSq4+2.142857142857143*F_0Skin[7]*nuVtSq[8]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSq[8]*rdvSq4+3.354101966249685*nuVtSq[4]*F_0Skin[8]*rdvSq4+3.0*F_0Skin[1]*nuVtSq[7]*rdvSq4+3.354101966249685*nuVtSq[5]*F_0Skin[7]*rdvSq4+3.0*F_0Skin[2]*nuVtSq[6]*rdvSq4+2.683281572999748*nuVtSq[3]*F_0Skin[4]*rdvSq4; - vol_incr_G_1[9] = 3.354101966249685*nuVtSq[8]*G_1Skin[20]*rdvSq4+3.354101966249685*nuVtSq[7]*G_1Skin[12]*rdvSq4+3.354101966249685*nuVtSq[6]*G_1Skin[11]*rdvSq4+3.354101966249685*nuVtSq[5]*G_1Skin[8]*rdvSq4+3.354101966249685*nuVtSq[4]*G_1Skin[7]*rdvSq4+3.354101966249685*nuVtSq[3]*G_1Skin[4]*rdvSq4+3.354101966249685*G_1Skin[2]*nuVtSq[2]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSq[1]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_G_1[15] = 3.0*nuVtSq[7]*G_1Skin[20]*rdvSq4+3.0*nuVtSq[8]*G_1Skin[12]*rdvSq4+3.354101966249685*nuVtSq[5]*G_1Skin[12]*rdvSq4+3.0*nuVtSq[3]*G_1Skin[11]*rdvSq4+3.354101966249685*nuVtSq[7]*G_1Skin[8]*rdvSq4+3.0*nuVtSq[1]*G_1Skin[7]*rdvSq4+3.0*G_1Skin[4]*nuVtSq[6]*rdvSq4+3.0*G_1Skin[1]*nuVtSq[4]*rdvSq4+3.354101966249684*nuVtSq[2]*G_1Skin[4]*rdvSq4+3.354101966249684*G_1Skin[2]*nuVtSq[3]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSq[1]*rdvSq4+3.354101966249684*nuVtSq[0]*G_1Skin[1]*rdvSq4; - vol_incr_G_1[16] = 3.0*nuVtSq[6]*G_1Skin[20]*rdvSq4+3.0*nuVtSq[3]*G_1Skin[12]*rdvSq4+3.0*nuVtSq[8]*G_1Skin[11]*rdvSq4+3.354101966249685*nuVtSq[4]*G_1Skin[11]*rdvSq4+3.0*nuVtSq[2]*G_1Skin[8]*rdvSq4+3.0*G_1Skin[4]*nuVtSq[7]*rdvSq4+3.354101966249685*nuVtSq[6]*G_1Skin[7]*rdvSq4+3.0*G_1Skin[2]*nuVtSq[5]*rdvSq4+3.354101966249684*nuVtSq[1]*G_1Skin[4]*rdvSq4+3.354101966249684*G_1Skin[1]*nuVtSq[3]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSq[2]*rdvSq4+3.354101966249684*nuVtSq[0]*G_1Skin[2]*rdvSq4; - vol_incr_G_1[19] = 2.683281572999748*nuVtSq[3]*G_1Skin[20]*rdvSq4+2.683281572999748*nuVtSq[6]*G_1Skin[12]*rdvSq4+3.0*nuVtSq[2]*G_1Skin[12]*rdvSq4+2.683281572999748*nuVtSq[7]*G_1Skin[11]*rdvSq4+3.0*nuVtSq[1]*G_1Skin[11]*rdvSq4+2.683281572999748*G_1Skin[4]*nuVtSq[8]*rdvSq4+3.0*nuVtSq[3]*G_1Skin[8]*rdvSq4+3.0*G_1Skin[2]*nuVtSq[7]*rdvSq4+3.0*nuVtSq[3]*G_1Skin[7]*rdvSq4+3.0*G_1Skin[1]*nuVtSq[6]*rdvSq4+3.0*G_1Skin[4]*nuVtSq[5]*rdvSq4+3.0*G_1Skin[4]*nuVtSq[4]*rdvSq4+3.354101966249685*nuVtSq[0]*G_1Skin[4]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSq[3]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSq[2]*rdvSq4+3.354101966249685*nuVtSq[1]*G_1Skin[2]*rdvSq4; - vol_incr_G_1[21] = 2.142857142857143*nuVtSq[8]*G_1Skin[20]*rdvSq4+3.354101966249685*nuVtSq[5]*G_1Skin[20]*rdvSq4+3.0*nuVtSq[7]*G_1Skin[12]*rdvSq4+2.142857142857143*nuVtSq[6]*G_1Skin[11]*rdvSq4+3.354101966249684*nuVtSq[2]*G_1Skin[11]*rdvSq4+3.354101966249685*G_1Skin[8]*nuVtSq[8]*rdvSq4+2.142857142857143*nuVtSq[4]*G_1Skin[7]*rdvSq4+3.354101966249685*nuVtSq[0]*G_1Skin[7]*rdvSq4+3.354101966249684*G_1Skin[2]*nuVtSq[6]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSq[4]*rdvSq4+3.0*nuVtSq[3]*G_1Skin[4]*rdvSq4+3.0*G_1Skin[1]*nuVtSq[1]*rdvSq4; - vol_incr_G_1[22] = 2.142857142857143*nuVtSq[8]*G_1Skin[20]*rdvSq4+3.354101966249685*nuVtSq[4]*G_1Skin[20]*rdvSq4+2.142857142857143*nuVtSq[7]*G_1Skin[12]*rdvSq4+3.354101966249684*nuVtSq[1]*G_1Skin[12]*rdvSq4+3.0*nuVtSq[6]*G_1Skin[11]*rdvSq4+3.354101966249685*G_1Skin[7]*nuVtSq[8]*rdvSq4+2.142857142857143*nuVtSq[5]*G_1Skin[8]*rdvSq4+3.354101966249685*nuVtSq[0]*G_1Skin[8]*rdvSq4+3.354101966249684*G_1Skin[1]*nuVtSq[7]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSq[5]*rdvSq4+3.0*nuVtSq[3]*G_1Skin[4]*rdvSq4+3.0*G_1Skin[2]*nuVtSq[2]*rdvSq4; - vol_incr_G_1[24] = 1.91662969499982*nuVtSq[6]*G_1Skin[20]*rdvSq4+3.0*nuVtSq[2]*G_1Skin[20]*rdvSq4+2.683281572999748*nuVtSq[3]*G_1Skin[12]*rdvSq4+1.91662969499982*nuVtSq[8]*G_1Skin[11]*rdvSq4+3.0*nuVtSq[5]*G_1Skin[11]*rdvSq4+2.142857142857143*nuVtSq[4]*G_1Skin[11]*rdvSq4+3.354101966249684*nuVtSq[0]*G_1Skin[11]*rdvSq4+3.0*G_1Skin[2]*nuVtSq[8]*rdvSq4+3.0*nuVtSq[6]*G_1Skin[8]*rdvSq4+2.683281572999748*G_1Skin[4]*nuVtSq[7]*rdvSq4+2.142857142857143*nuVtSq[6]*G_1Skin[7]*rdvSq4+3.354101966249685*nuVtSq[2]*G_1Skin[7]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSq[6]*rdvSq4+3.354101966249685*G_1Skin[2]*nuVtSq[4]*rdvSq4+3.0*nuVtSq[1]*G_1Skin[4]*rdvSq4+3.0*G_1Skin[1]*nuVtSq[3]*rdvSq4; - vol_incr_G_1[25] = 1.91662969499982*nuVtSq[7]*G_1Skin[20]*rdvSq4+3.0*nuVtSq[1]*G_1Skin[20]*rdvSq4+1.91662969499982*nuVtSq[8]*G_1Skin[12]*rdvSq4+2.142857142857143*nuVtSq[5]*G_1Skin[12]*rdvSq4+3.0*nuVtSq[4]*G_1Skin[12]*rdvSq4+3.354101966249684*nuVtSq[0]*G_1Skin[12]*rdvSq4+2.683281572999748*nuVtSq[3]*G_1Skin[11]*rdvSq4+3.0*G_1Skin[1]*nuVtSq[8]*rdvSq4+2.142857142857143*nuVtSq[7]*G_1Skin[8]*rdvSq4+3.354101966249685*nuVtSq[1]*G_1Skin[8]*rdvSq4+3.0*G_1Skin[7]*nuVtSq[7]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSq[7]*rdvSq4+2.683281572999748*G_1Skin[4]*nuVtSq[6]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSq[5]*rdvSq4+3.0*nuVtSq[2]*G_1Skin[4]*rdvSq4+3.0*G_1Skin[2]*nuVtSq[3]*rdvSq4; - vol_incr_G_1[26] = 1.369021210714157*nuVtSq[8]*G_1Skin[20]*rdvSq4+2.142857142857143*nuVtSq[5]*G_1Skin[20]*rdvSq4+2.142857142857143*nuVtSq[4]*G_1Skin[20]*rdvSq4+3.354101966249685*nuVtSq[0]*G_1Skin[20]*rdvSq4+1.91662969499982*nuVtSq[7]*G_1Skin[12]*rdvSq4+3.0*nuVtSq[1]*G_1Skin[12]*rdvSq4+1.91662969499982*nuVtSq[6]*G_1Skin[11]*rdvSq4+3.0*nuVtSq[2]*G_1Skin[11]*rdvSq4+2.142857142857143*G_1Skin[8]*nuVtSq[8]*rdvSq4+2.142857142857143*G_1Skin[7]*nuVtSq[8]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSq[8]*rdvSq4+3.354101966249685*nuVtSq[4]*G_1Skin[8]*rdvSq4+3.0*G_1Skin[1]*nuVtSq[7]*rdvSq4+3.354101966249685*nuVtSq[5]*G_1Skin[7]*rdvSq4+3.0*G_1Skin[2]*nuVtSq[6]*rdvSq4+2.683281572999748*nuVtSq[3]*G_1Skin[4]*rdvSq4; + vol_incr_F_0[9] = 3.354101966249685*nuVtSqSum[8]*F_0Skin[20]*rdvSq4+3.354101966249685*nuVtSqSum[7]*F_0Skin[12]*rdvSq4+3.354101966249685*nuVtSqSum[6]*F_0Skin[11]*rdvSq4+3.354101966249685*nuVtSqSum[5]*F_0Skin[8]*rdvSq4+3.354101966249685*nuVtSqSum[4]*F_0Skin[7]*rdvSq4+3.354101966249685*nuVtSqSum[3]*F_0Skin[4]*rdvSq4+3.354101966249685*F_0Skin[2]*nuVtSqSum[2]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSqSum[1]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_F_0[15] = 3.0*nuVtSqSum[7]*F_0Skin[20]*rdvSq4+3.0*nuVtSqSum[8]*F_0Skin[12]*rdvSq4+3.354101966249685*nuVtSqSum[5]*F_0Skin[12]*rdvSq4+3.0*nuVtSqSum[3]*F_0Skin[11]*rdvSq4+3.354101966249685*nuVtSqSum[7]*F_0Skin[8]*rdvSq4+3.0*nuVtSqSum[1]*F_0Skin[7]*rdvSq4+3.0*F_0Skin[4]*nuVtSqSum[6]*rdvSq4+3.0*F_0Skin[1]*nuVtSqSum[4]*rdvSq4+3.354101966249684*nuVtSqSum[2]*F_0Skin[4]*rdvSq4+3.354101966249684*F_0Skin[2]*nuVtSqSum[3]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSqSum[1]*rdvSq4+3.354101966249684*nuVtSqSum[0]*F_0Skin[1]*rdvSq4; + vol_incr_F_0[16] = 3.0*nuVtSqSum[6]*F_0Skin[20]*rdvSq4+3.0*nuVtSqSum[3]*F_0Skin[12]*rdvSq4+3.0*nuVtSqSum[8]*F_0Skin[11]*rdvSq4+3.354101966249685*nuVtSqSum[4]*F_0Skin[11]*rdvSq4+3.0*nuVtSqSum[2]*F_0Skin[8]*rdvSq4+3.0*F_0Skin[4]*nuVtSqSum[7]*rdvSq4+3.354101966249685*nuVtSqSum[6]*F_0Skin[7]*rdvSq4+3.0*F_0Skin[2]*nuVtSqSum[5]*rdvSq4+3.354101966249684*nuVtSqSum[1]*F_0Skin[4]*rdvSq4+3.354101966249684*F_0Skin[1]*nuVtSqSum[3]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSqSum[2]*rdvSq4+3.354101966249684*nuVtSqSum[0]*F_0Skin[2]*rdvSq4; + vol_incr_F_0[19] = 2.683281572999748*nuVtSqSum[3]*F_0Skin[20]*rdvSq4+2.683281572999748*nuVtSqSum[6]*F_0Skin[12]*rdvSq4+3.0*nuVtSqSum[2]*F_0Skin[12]*rdvSq4+2.683281572999748*nuVtSqSum[7]*F_0Skin[11]*rdvSq4+3.0*nuVtSqSum[1]*F_0Skin[11]*rdvSq4+2.683281572999748*F_0Skin[4]*nuVtSqSum[8]*rdvSq4+3.0*nuVtSqSum[3]*F_0Skin[8]*rdvSq4+3.0*F_0Skin[2]*nuVtSqSum[7]*rdvSq4+3.0*nuVtSqSum[3]*F_0Skin[7]*rdvSq4+3.0*F_0Skin[1]*nuVtSqSum[6]*rdvSq4+3.0*F_0Skin[4]*nuVtSqSum[5]*rdvSq4+3.0*F_0Skin[4]*nuVtSqSum[4]*rdvSq4+3.354101966249685*nuVtSqSum[0]*F_0Skin[4]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSqSum[3]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSqSum[2]*rdvSq4+3.354101966249685*nuVtSqSum[1]*F_0Skin[2]*rdvSq4; + vol_incr_F_0[21] = 2.142857142857143*nuVtSqSum[8]*F_0Skin[20]*rdvSq4+3.354101966249685*nuVtSqSum[5]*F_0Skin[20]*rdvSq4+3.0*nuVtSqSum[7]*F_0Skin[12]*rdvSq4+2.142857142857143*nuVtSqSum[6]*F_0Skin[11]*rdvSq4+3.354101966249684*nuVtSqSum[2]*F_0Skin[11]*rdvSq4+3.354101966249685*F_0Skin[8]*nuVtSqSum[8]*rdvSq4+2.142857142857143*nuVtSqSum[4]*F_0Skin[7]*rdvSq4+3.354101966249685*nuVtSqSum[0]*F_0Skin[7]*rdvSq4+3.354101966249684*F_0Skin[2]*nuVtSqSum[6]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSqSum[4]*rdvSq4+3.0*nuVtSqSum[3]*F_0Skin[4]*rdvSq4+3.0*F_0Skin[1]*nuVtSqSum[1]*rdvSq4; + vol_incr_F_0[22] = 2.142857142857143*nuVtSqSum[8]*F_0Skin[20]*rdvSq4+3.354101966249685*nuVtSqSum[4]*F_0Skin[20]*rdvSq4+2.142857142857143*nuVtSqSum[7]*F_0Skin[12]*rdvSq4+3.354101966249684*nuVtSqSum[1]*F_0Skin[12]*rdvSq4+3.0*nuVtSqSum[6]*F_0Skin[11]*rdvSq4+3.354101966249685*F_0Skin[7]*nuVtSqSum[8]*rdvSq4+2.142857142857143*nuVtSqSum[5]*F_0Skin[8]*rdvSq4+3.354101966249685*nuVtSqSum[0]*F_0Skin[8]*rdvSq4+3.354101966249684*F_0Skin[1]*nuVtSqSum[7]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSqSum[5]*rdvSq4+3.0*nuVtSqSum[3]*F_0Skin[4]*rdvSq4+3.0*F_0Skin[2]*nuVtSqSum[2]*rdvSq4; + vol_incr_F_0[24] = 1.91662969499982*nuVtSqSum[6]*F_0Skin[20]*rdvSq4+3.0*nuVtSqSum[2]*F_0Skin[20]*rdvSq4+2.683281572999748*nuVtSqSum[3]*F_0Skin[12]*rdvSq4+1.91662969499982*nuVtSqSum[8]*F_0Skin[11]*rdvSq4+3.0*nuVtSqSum[5]*F_0Skin[11]*rdvSq4+2.142857142857143*nuVtSqSum[4]*F_0Skin[11]*rdvSq4+3.354101966249684*nuVtSqSum[0]*F_0Skin[11]*rdvSq4+3.0*F_0Skin[2]*nuVtSqSum[8]*rdvSq4+3.0*nuVtSqSum[6]*F_0Skin[8]*rdvSq4+2.683281572999748*F_0Skin[4]*nuVtSqSum[7]*rdvSq4+2.142857142857143*nuVtSqSum[6]*F_0Skin[7]*rdvSq4+3.354101966249685*nuVtSqSum[2]*F_0Skin[7]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSqSum[6]*rdvSq4+3.354101966249685*F_0Skin[2]*nuVtSqSum[4]*rdvSq4+3.0*nuVtSqSum[1]*F_0Skin[4]*rdvSq4+3.0*F_0Skin[1]*nuVtSqSum[3]*rdvSq4; + vol_incr_F_0[25] = 1.91662969499982*nuVtSqSum[7]*F_0Skin[20]*rdvSq4+3.0*nuVtSqSum[1]*F_0Skin[20]*rdvSq4+1.91662969499982*nuVtSqSum[8]*F_0Skin[12]*rdvSq4+2.142857142857143*nuVtSqSum[5]*F_0Skin[12]*rdvSq4+3.0*nuVtSqSum[4]*F_0Skin[12]*rdvSq4+3.354101966249684*nuVtSqSum[0]*F_0Skin[12]*rdvSq4+2.683281572999748*nuVtSqSum[3]*F_0Skin[11]*rdvSq4+3.0*F_0Skin[1]*nuVtSqSum[8]*rdvSq4+2.142857142857143*nuVtSqSum[7]*F_0Skin[8]*rdvSq4+3.354101966249685*nuVtSqSum[1]*F_0Skin[8]*rdvSq4+3.0*F_0Skin[7]*nuVtSqSum[7]*rdvSq4+3.354101966249684*F_0Skin[0]*nuVtSqSum[7]*rdvSq4+2.683281572999748*F_0Skin[4]*nuVtSqSum[6]*rdvSq4+3.354101966249685*F_0Skin[1]*nuVtSqSum[5]*rdvSq4+3.0*nuVtSqSum[2]*F_0Skin[4]*rdvSq4+3.0*F_0Skin[2]*nuVtSqSum[3]*rdvSq4; + vol_incr_F_0[26] = 1.369021210714157*nuVtSqSum[8]*F_0Skin[20]*rdvSq4+2.142857142857143*nuVtSqSum[5]*F_0Skin[20]*rdvSq4+2.142857142857143*nuVtSqSum[4]*F_0Skin[20]*rdvSq4+3.354101966249685*nuVtSqSum[0]*F_0Skin[20]*rdvSq4+1.91662969499982*nuVtSqSum[7]*F_0Skin[12]*rdvSq4+3.0*nuVtSqSum[1]*F_0Skin[12]*rdvSq4+1.91662969499982*nuVtSqSum[6]*F_0Skin[11]*rdvSq4+3.0*nuVtSqSum[2]*F_0Skin[11]*rdvSq4+2.142857142857143*F_0Skin[8]*nuVtSqSum[8]*rdvSq4+2.142857142857143*F_0Skin[7]*nuVtSqSum[8]*rdvSq4+3.354101966249685*F_0Skin[0]*nuVtSqSum[8]*rdvSq4+3.354101966249685*nuVtSqSum[4]*F_0Skin[8]*rdvSq4+3.0*F_0Skin[1]*nuVtSqSum[7]*rdvSq4+3.354101966249685*nuVtSqSum[5]*F_0Skin[7]*rdvSq4+3.0*F_0Skin[2]*nuVtSqSum[6]*rdvSq4+2.683281572999748*nuVtSqSum[3]*F_0Skin[4]*rdvSq4; + vol_incr_G_1[9] = 3.354101966249685*nuVtSqSum[8]*G_1Skin[20]*rdvSq4+3.354101966249685*nuVtSqSum[7]*G_1Skin[12]*rdvSq4+3.354101966249685*nuVtSqSum[6]*G_1Skin[11]*rdvSq4+3.354101966249685*nuVtSqSum[5]*G_1Skin[8]*rdvSq4+3.354101966249685*nuVtSqSum[4]*G_1Skin[7]*rdvSq4+3.354101966249685*nuVtSqSum[3]*G_1Skin[4]*rdvSq4+3.354101966249685*G_1Skin[2]*nuVtSqSum[2]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSqSum[1]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_G_1[15] = 3.0*nuVtSqSum[7]*G_1Skin[20]*rdvSq4+3.0*nuVtSqSum[8]*G_1Skin[12]*rdvSq4+3.354101966249685*nuVtSqSum[5]*G_1Skin[12]*rdvSq4+3.0*nuVtSqSum[3]*G_1Skin[11]*rdvSq4+3.354101966249685*nuVtSqSum[7]*G_1Skin[8]*rdvSq4+3.0*nuVtSqSum[1]*G_1Skin[7]*rdvSq4+3.0*G_1Skin[4]*nuVtSqSum[6]*rdvSq4+3.0*G_1Skin[1]*nuVtSqSum[4]*rdvSq4+3.354101966249684*nuVtSqSum[2]*G_1Skin[4]*rdvSq4+3.354101966249684*G_1Skin[2]*nuVtSqSum[3]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSqSum[1]*rdvSq4+3.354101966249684*nuVtSqSum[0]*G_1Skin[1]*rdvSq4; + vol_incr_G_1[16] = 3.0*nuVtSqSum[6]*G_1Skin[20]*rdvSq4+3.0*nuVtSqSum[3]*G_1Skin[12]*rdvSq4+3.0*nuVtSqSum[8]*G_1Skin[11]*rdvSq4+3.354101966249685*nuVtSqSum[4]*G_1Skin[11]*rdvSq4+3.0*nuVtSqSum[2]*G_1Skin[8]*rdvSq4+3.0*G_1Skin[4]*nuVtSqSum[7]*rdvSq4+3.354101966249685*nuVtSqSum[6]*G_1Skin[7]*rdvSq4+3.0*G_1Skin[2]*nuVtSqSum[5]*rdvSq4+3.354101966249684*nuVtSqSum[1]*G_1Skin[4]*rdvSq4+3.354101966249684*G_1Skin[1]*nuVtSqSum[3]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSqSum[2]*rdvSq4+3.354101966249684*nuVtSqSum[0]*G_1Skin[2]*rdvSq4; + vol_incr_G_1[19] = 2.683281572999748*nuVtSqSum[3]*G_1Skin[20]*rdvSq4+2.683281572999748*nuVtSqSum[6]*G_1Skin[12]*rdvSq4+3.0*nuVtSqSum[2]*G_1Skin[12]*rdvSq4+2.683281572999748*nuVtSqSum[7]*G_1Skin[11]*rdvSq4+3.0*nuVtSqSum[1]*G_1Skin[11]*rdvSq4+2.683281572999748*G_1Skin[4]*nuVtSqSum[8]*rdvSq4+3.0*nuVtSqSum[3]*G_1Skin[8]*rdvSq4+3.0*G_1Skin[2]*nuVtSqSum[7]*rdvSq4+3.0*nuVtSqSum[3]*G_1Skin[7]*rdvSq4+3.0*G_1Skin[1]*nuVtSqSum[6]*rdvSq4+3.0*G_1Skin[4]*nuVtSqSum[5]*rdvSq4+3.0*G_1Skin[4]*nuVtSqSum[4]*rdvSq4+3.354101966249685*nuVtSqSum[0]*G_1Skin[4]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSqSum[3]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSqSum[2]*rdvSq4+3.354101966249685*nuVtSqSum[1]*G_1Skin[2]*rdvSq4; + vol_incr_G_1[21] = 2.142857142857143*nuVtSqSum[8]*G_1Skin[20]*rdvSq4+3.354101966249685*nuVtSqSum[5]*G_1Skin[20]*rdvSq4+3.0*nuVtSqSum[7]*G_1Skin[12]*rdvSq4+2.142857142857143*nuVtSqSum[6]*G_1Skin[11]*rdvSq4+3.354101966249684*nuVtSqSum[2]*G_1Skin[11]*rdvSq4+3.354101966249685*G_1Skin[8]*nuVtSqSum[8]*rdvSq4+2.142857142857143*nuVtSqSum[4]*G_1Skin[7]*rdvSq4+3.354101966249685*nuVtSqSum[0]*G_1Skin[7]*rdvSq4+3.354101966249684*G_1Skin[2]*nuVtSqSum[6]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSqSum[4]*rdvSq4+3.0*nuVtSqSum[3]*G_1Skin[4]*rdvSq4+3.0*G_1Skin[1]*nuVtSqSum[1]*rdvSq4; + vol_incr_G_1[22] = 2.142857142857143*nuVtSqSum[8]*G_1Skin[20]*rdvSq4+3.354101966249685*nuVtSqSum[4]*G_1Skin[20]*rdvSq4+2.142857142857143*nuVtSqSum[7]*G_1Skin[12]*rdvSq4+3.354101966249684*nuVtSqSum[1]*G_1Skin[12]*rdvSq4+3.0*nuVtSqSum[6]*G_1Skin[11]*rdvSq4+3.354101966249685*G_1Skin[7]*nuVtSqSum[8]*rdvSq4+2.142857142857143*nuVtSqSum[5]*G_1Skin[8]*rdvSq4+3.354101966249685*nuVtSqSum[0]*G_1Skin[8]*rdvSq4+3.354101966249684*G_1Skin[1]*nuVtSqSum[7]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSqSum[5]*rdvSq4+3.0*nuVtSqSum[3]*G_1Skin[4]*rdvSq4+3.0*G_1Skin[2]*nuVtSqSum[2]*rdvSq4; + vol_incr_G_1[24] = 1.91662969499982*nuVtSqSum[6]*G_1Skin[20]*rdvSq4+3.0*nuVtSqSum[2]*G_1Skin[20]*rdvSq4+2.683281572999748*nuVtSqSum[3]*G_1Skin[12]*rdvSq4+1.91662969499982*nuVtSqSum[8]*G_1Skin[11]*rdvSq4+3.0*nuVtSqSum[5]*G_1Skin[11]*rdvSq4+2.142857142857143*nuVtSqSum[4]*G_1Skin[11]*rdvSq4+3.354101966249684*nuVtSqSum[0]*G_1Skin[11]*rdvSq4+3.0*G_1Skin[2]*nuVtSqSum[8]*rdvSq4+3.0*nuVtSqSum[6]*G_1Skin[8]*rdvSq4+2.683281572999748*G_1Skin[4]*nuVtSqSum[7]*rdvSq4+2.142857142857143*nuVtSqSum[6]*G_1Skin[7]*rdvSq4+3.354101966249685*nuVtSqSum[2]*G_1Skin[7]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSqSum[6]*rdvSq4+3.354101966249685*G_1Skin[2]*nuVtSqSum[4]*rdvSq4+3.0*nuVtSqSum[1]*G_1Skin[4]*rdvSq4+3.0*G_1Skin[1]*nuVtSqSum[3]*rdvSq4; + vol_incr_G_1[25] = 1.91662969499982*nuVtSqSum[7]*G_1Skin[20]*rdvSq4+3.0*nuVtSqSum[1]*G_1Skin[20]*rdvSq4+1.91662969499982*nuVtSqSum[8]*G_1Skin[12]*rdvSq4+2.142857142857143*nuVtSqSum[5]*G_1Skin[12]*rdvSq4+3.0*nuVtSqSum[4]*G_1Skin[12]*rdvSq4+3.354101966249684*nuVtSqSum[0]*G_1Skin[12]*rdvSq4+2.683281572999748*nuVtSqSum[3]*G_1Skin[11]*rdvSq4+3.0*G_1Skin[1]*nuVtSqSum[8]*rdvSq4+2.142857142857143*nuVtSqSum[7]*G_1Skin[8]*rdvSq4+3.354101966249685*nuVtSqSum[1]*G_1Skin[8]*rdvSq4+3.0*G_1Skin[7]*nuVtSqSum[7]*rdvSq4+3.354101966249684*G_1Skin[0]*nuVtSqSum[7]*rdvSq4+2.683281572999748*G_1Skin[4]*nuVtSqSum[6]*rdvSq4+3.354101966249685*G_1Skin[1]*nuVtSqSum[5]*rdvSq4+3.0*nuVtSqSum[2]*G_1Skin[4]*rdvSq4+3.0*G_1Skin[2]*nuVtSqSum[3]*rdvSq4; + vol_incr_G_1[26] = 1.369021210714157*nuVtSqSum[8]*G_1Skin[20]*rdvSq4+2.142857142857143*nuVtSqSum[5]*G_1Skin[20]*rdvSq4+2.142857142857143*nuVtSqSum[4]*G_1Skin[20]*rdvSq4+3.354101966249685*nuVtSqSum[0]*G_1Skin[20]*rdvSq4+1.91662969499982*nuVtSqSum[7]*G_1Skin[12]*rdvSq4+3.0*nuVtSqSum[1]*G_1Skin[12]*rdvSq4+1.91662969499982*nuVtSqSum[6]*G_1Skin[11]*rdvSq4+3.0*nuVtSqSum[2]*G_1Skin[11]*rdvSq4+2.142857142857143*G_1Skin[8]*nuVtSqSum[8]*rdvSq4+2.142857142857143*G_1Skin[7]*nuVtSqSum[8]*rdvSq4+3.354101966249685*G_1Skin[0]*nuVtSqSum[8]*rdvSq4+3.354101966249685*nuVtSqSum[4]*G_1Skin[8]*rdvSq4+3.0*G_1Skin[1]*nuVtSqSum[7]*rdvSq4+3.354101966249685*nuVtSqSum[5]*G_1Skin[7]*rdvSq4+3.0*G_1Skin[2]*nuVtSqSum[6]*rdvSq4+2.683281572999748*nuVtSqSum[3]*G_1Skin[4]*rdvSq4; double temp_F_0_diff[27] = {0.0}; double temp_F_0_edge[27] = {0.0}; @@ -139,115 +142,115 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2(const do temp_G_1_edge[25] = (-7.5*G_1Skin[25])+5.809475019311125*G_1Skin[18]-3.354101966249684*G_1Skin[12]; temp_G_1_edge[26] = (-7.5*G_1Skin[26])+5.809475019311125*G_1Skin[23]-3.354101966249685*G_1Skin[20]; - diff_F_0_incr[0] = 0.5*nuVtSq[8]*temp_F_0_diff[20]+0.5*nuVtSq[7]*temp_F_0_diff[12]+0.5*nuVtSq[6]*temp_F_0_diff[11]+0.5*nuVtSq[5]*temp_F_0_diff[8]+0.5*nuVtSq[4]*temp_F_0_diff[7]+0.5*nuVtSq[3]*temp_F_0_diff[4]+0.5*nuVtSq[2]*temp_F_0_diff[2]+0.5*nuVtSq[1]*temp_F_0_diff[1]+0.5*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.447213595499958*nuVtSq[7]*temp_F_0_diff[20]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[12]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[12]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[7]*temp_F_0_diff[8]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[4]*nuVtSq[6]+0.5*nuVtSq[2]*temp_F_0_diff[4]+0.4472135954999579*temp_F_0_diff[1]*nuVtSq[4]+0.5*temp_F_0_diff[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_diff[1]+0.5*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.447213595499958*nuVtSq[6]*temp_F_0_diff[20]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[12]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[11]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[8]+0.5000000000000001*nuVtSq[6]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[4]*nuVtSq[7]+0.4472135954999579*temp_F_0_diff[2]*nuVtSq[5]+0.5*nuVtSq[1]*temp_F_0_diff[4]+0.5*temp_F_0_diff[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_diff[2]+0.5*temp_F_0_diff[0]*nuVtSq[2]; - diff_F_0_incr[3] = 0.5*nuVtSq[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSq[7]*temp_F_0_diff[18]+0.5000000000000001*nuVtSq[6]*temp_F_0_diff[17]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[14]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[13]+0.5*nuVtSq[3]*temp_F_0_diff[10]+0.5*nuVtSq[2]*temp_F_0_diff[6]+0.5*nuVtSq[1]*temp_F_0_diff[5]+0.5*nuVtSq[0]*temp_F_0_diff[3]; - diff_F_0_incr[4] = 0.4*nuVtSq[3]*temp_F_0_diff[20]+0.4*nuVtSq[6]*temp_F_0_diff[12]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[12]+0.4*nuVtSq[7]*temp_F_0_diff[11]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[11]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[8]+0.4*temp_F_0_diff[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[2]*nuVtSq[7]+0.447213595499958*temp_F_0_diff[1]*nuVtSq[6]+0.4472135954999579*temp_F_0_diff[4]*nuVtSq[5]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[4]+0.5*nuVtSq[0]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_F_0_diff[2]+0.5*temp_F_0_diff[1]*nuVtSq[2]; - diff_F_0_incr[5] = 0.447213595499958*nuVtSq[7]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[8]*temp_F_0_diff[18]+0.5*nuVtSq[5]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[17]+0.5*nuVtSq[7]*temp_F_0_diff[14]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[13]+0.447213595499958*nuVtSq[6]*temp_F_0_diff[10]+0.5*nuVtSq[2]*temp_F_0_diff[10]+0.5*nuVtSq[3]*temp_F_0_diff[6]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[5]+0.5*nuVtSq[0]*temp_F_0_diff[5]+0.5*nuVtSq[1]*temp_F_0_diff[3]; - diff_F_0_incr[6] = 0.447213595499958*nuVtSq[6]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[8]*temp_F_0_diff[17]+0.5*nuVtSq[4]*temp_F_0_diff[17]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[14]+0.5*nuVtSq[6]*temp_F_0_diff[13]+0.447213595499958*nuVtSq[7]*temp_F_0_diff[10]+0.5*nuVtSq[1]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[6]+0.5*nuVtSq[0]*temp_F_0_diff[6]+0.5*nuVtSq[3]*temp_F_0_diff[5]+0.5*nuVtSq[2]*temp_F_0_diff[3]; - diff_F_0_incr[7] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[20]+0.5*nuVtSq[5]*temp_F_0_diff[20]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[12]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[11]+0.5*nuVtSq[8]*temp_F_0_diff[8]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[7]+0.5*nuVtSq[0]*temp_F_0_diff[7]+0.5000000000000001*temp_F_0_diff[2]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[1]; - diff_F_0_incr[8] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[20]+0.5*nuVtSq[4]*temp_F_0_diff[20]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[12]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[12]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[11]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[8]+0.5*nuVtSq[0]*temp_F_0_diff[8]+0.5*temp_F_0_diff[7]*nuVtSq[8]+0.5000000000000001*temp_F_0_diff[1]*nuVtSq[7]+0.5*temp_F_0_diff[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[4]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[2]; - diff_F_0_incr[9] = 0.5*nuVtSq[8]*temp_F_0_diff[26]+0.5000000000000001*nuVtSq[7]*temp_F_0_diff[25]+0.5000000000000001*nuVtSq[6]*temp_F_0_diff[24]+0.5*nuVtSq[5]*temp_F_0_diff[22]+0.5*nuVtSq[4]*temp_F_0_diff[21]+0.5*nuVtSq[3]*temp_F_0_diff[19]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[16]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[15]+0.5*nuVtSq[0]*temp_F_0_diff[9]; - diff_F_0_incr[10] = 0.4*nuVtSq[3]*temp_F_0_diff[23]+0.4*nuVtSq[6]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[18]+0.4*nuVtSq[7]*temp_F_0_diff[17]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[17]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[14]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[13]+0.4*nuVtSq[8]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[10]+0.5*nuVtSq[0]*temp_F_0_diff[10]+0.447213595499958*temp_F_0_diff[6]*nuVtSq[7]+0.5*nuVtSq[1]*temp_F_0_diff[6]+0.447213595499958*temp_F_0_diff[5]*nuVtSq[6]+0.5*nuVtSq[2]*temp_F_0_diff[5]+0.5*nuVtSq[3]*temp_F_0_diff[3]; - diff_F_0_incr[11] = 0.2857142857142857*nuVtSq[6]*temp_F_0_diff[20]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[20]+0.4*nuVtSq[3]*temp_F_0_diff[12]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[11]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[11]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[11]+0.5*nuVtSq[0]*temp_F_0_diff[11]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[8]+0.447213595499958*temp_F_0_diff[2]*nuVtSq[8]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[7]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[7]+0.4*temp_F_0_diff[4]*nuVtSq[7]+0.5*temp_F_0_diff[0]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[4]+0.5000000000000001*temp_F_0_diff[2]*nuVtSq[4]+0.447213595499958*temp_F_0_diff[1]*nuVtSq[3]; - diff_F_0_incr[12] = 0.2857142857142857*nuVtSq[7]*temp_F_0_diff[20]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[20]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[12]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[12]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[12]+0.5*nuVtSq[0]*temp_F_0_diff[12]+0.4*nuVtSq[3]*temp_F_0_diff[11]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[8]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[8]+0.447213595499958*temp_F_0_diff[1]*nuVtSq[8]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[7]+0.5*temp_F_0_diff[0]*nuVtSq[7]+0.4*temp_F_0_diff[4]*nuVtSq[6]+0.5000000000000001*temp_F_0_diff[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[4]+0.447213595499958*temp_F_0_diff[2]*nuVtSq[3]; - diff_F_0_incr[13] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[18]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[17]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[17]+0.5*nuVtSq[8]*temp_F_0_diff[14]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[13]+0.5*nuVtSq[0]*temp_F_0_diff[13]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[10]+0.5*nuVtSq[6]*temp_F_0_diff[6]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[5]+0.5000000000000001*temp_F_0_diff[3]*nuVtSq[4]; - diff_F_0_incr[14] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[23]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[18]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[17]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[14]+0.5*nuVtSq[0]*temp_F_0_diff[14]+0.5*nuVtSq[8]*temp_F_0_diff[13]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[10]+0.5*temp_F_0_diff[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[6]+0.5000000000000001*temp_F_0_diff[3]*nuVtSq[5]; - diff_F_0_incr[15] = 0.4472135954999579*nuVtSq[7]*temp_F_0_diff[26]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[25]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[25]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[24]+0.5*nuVtSq[7]*temp_F_0_diff[22]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[21]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[19]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[19]+0.5*nuVtSq[3]*temp_F_0_diff[16]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[15]+0.5*nuVtSq[0]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[9]; - diff_F_0_incr[16] = 0.4472135954999579*nuVtSq[6]*temp_F_0_diff[26]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[25]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[24]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[24]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[22]+0.5*nuVtSq[6]*temp_F_0_diff[21]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[19]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[16]+0.5*nuVtSq[0]*temp_F_0_diff[16]+0.5*nuVtSq[3]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[9]; - diff_F_0_incr[17] = 0.2857142857142858*nuVtSq[6]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[23]+0.4*nuVtSq[3]*temp_F_0_diff[18]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[17]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[17]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[17]+0.5*nuVtSq[0]*temp_F_0_diff[17]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[14]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[13]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[13]+0.4*nuVtSq[7]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[10]+0.4472135954999579*temp_F_0_diff[6]*nuVtSq[8]+0.5*nuVtSq[4]*temp_F_0_diff[6]+0.5000000000000001*temp_F_0_diff[3]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[5]; - diff_F_0_incr[18] = 0.2857142857142858*nuVtSq[7]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[23]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[18]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[18]+0.5*nuVtSq[0]*temp_F_0_diff[18]+0.4*nuVtSq[3]*temp_F_0_diff[17]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[14]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[14]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[13]+0.4*nuVtSq[6]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[10]+0.4472135954999579*temp_F_0_diff[5]*nuVtSq[8]+0.5000000000000001*temp_F_0_diff[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[6]+0.5*nuVtSq[5]*temp_F_0_diff[5]; - diff_F_0_incr[19] = 0.4*nuVtSq[3]*temp_F_0_diff[26]+0.4*nuVtSq[6]*temp_F_0_diff[25]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[25]+0.4*nuVtSq[7]*temp_F_0_diff[24]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[24]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[22]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[21]+0.4*nuVtSq[8]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[19]+0.5*nuVtSq[0]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[16]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[16]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[15]+0.5*nuVtSq[3]*temp_F_0_diff[9]; - diff_F_0_incr[20] = 0.2040816326530612*nuVtSq[8]*temp_F_0_diff[20]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[20]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[20]+0.5*nuVtSq[0]*temp_F_0_diff[20]+0.2857142857142857*nuVtSq[7]*temp_F_0_diff[12]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[12]+0.2857142857142857*nuVtSq[6]*temp_F_0_diff[11]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[11]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[8]+0.5*nuVtSq[4]*temp_F_0_diff[8]+0.31943828249997*temp_F_0_diff[7]*nuVtSq[8]+0.5*temp_F_0_diff[0]*nuVtSq[8]+0.5*nuVtSq[5]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[1]*nuVtSq[7]+0.447213595499958*temp_F_0_diff[2]*nuVtSq[6]+0.4*nuVtSq[3]*temp_F_0_diff[4]; - diff_F_0_incr[21] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[26]+0.5*nuVtSq[5]*temp_F_0_diff[26]+0.447213595499958*nuVtSq[7]*temp_F_0_diff[25]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[24]+0.5*nuVtSq[2]*temp_F_0_diff[24]+0.5*nuVtSq[8]*temp_F_0_diff[22]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[21]+0.5*nuVtSq[0]*temp_F_0_diff[21]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[19]+0.5*nuVtSq[6]*temp_F_0_diff[16]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[15]+0.5*nuVtSq[4]*temp_F_0_diff[9]; - diff_F_0_incr[22] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[26]+0.5*nuVtSq[4]*temp_F_0_diff[26]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[25]+0.5*nuVtSq[1]*temp_F_0_diff[25]+0.447213595499958*nuVtSq[6]*temp_F_0_diff[24]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[22]+0.5*nuVtSq[0]*temp_F_0_diff[22]+0.5*nuVtSq[8]*temp_F_0_diff[21]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[19]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[16]+0.5*nuVtSq[7]*temp_F_0_diff[15]+0.5*nuVtSq[5]*temp_F_0_diff[9]; - diff_F_0_incr[23] = 0.2040816326530612*nuVtSq[8]*temp_F_0_diff[23]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[23]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[23]+0.5*nuVtSq[0]*temp_F_0_diff[23]+0.2857142857142858*nuVtSq[7]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[18]+0.2857142857142858*nuVtSq[6]*temp_F_0_diff[17]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[17]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[14]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[14]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[13]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[13]+0.4*nuVtSq[3]*temp_F_0_diff[10]+0.5*temp_F_0_diff[3]*nuVtSq[8]+0.447213595499958*temp_F_0_diff[5]*nuVtSq[7]+0.447213595499958*nuVtSq[6]*temp_F_0_diff[6]; - diff_F_0_incr[24] = 0.2857142857142858*nuVtSq[6]*temp_F_0_diff[26]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[26]+0.4*nuVtSq[3]*temp_F_0_diff[25]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[24]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[24]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[24]+0.5*nuVtSq[0]*temp_F_0_diff[24]+0.447213595499958*nuVtSq[6]*temp_F_0_diff[22]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[21]+0.5*nuVtSq[2]*temp_F_0_diff[21]+0.4*nuVtSq[7]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[19]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[16]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[16]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[6]*temp_F_0_diff[9]; - diff_F_0_incr[25] = 0.2857142857142858*nuVtSq[7]*temp_F_0_diff[26]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[26]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[25]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[25]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[25]+0.5*nuVtSq[0]*temp_F_0_diff[25]+0.4*nuVtSq[3]*temp_F_0_diff[24]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[22]+0.5*nuVtSq[1]*temp_F_0_diff[22]+0.447213595499958*nuVtSq[7]*temp_F_0_diff[21]+0.4*nuVtSq[6]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[19]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[16]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[7]*temp_F_0_diff[9]; - diff_F_0_incr[26] = 0.2040816326530612*nuVtSq[8]*temp_F_0_diff[26]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[26]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[26]+0.5*nuVtSq[0]*temp_F_0_diff[26]+0.2857142857142858*nuVtSq[7]*temp_F_0_diff[25]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[25]+0.2857142857142858*nuVtSq[6]*temp_F_0_diff[24]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[24]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[22]+0.5*nuVtSq[4]*temp_F_0_diff[22]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[21]+0.5*nuVtSq[5]*temp_F_0_diff[21]+0.4*nuVtSq[3]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[16]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[15]+0.5*nuVtSq[8]*temp_F_0_diff[9]; - diff_G_1_incr[0] = 0.5*nuVtSq[8]*temp_G_1_diff[20]+0.5*nuVtSq[7]*temp_G_1_diff[12]+0.5*nuVtSq[6]*temp_G_1_diff[11]+0.5*nuVtSq[5]*temp_G_1_diff[8]+0.5*nuVtSq[4]*temp_G_1_diff[7]+0.5*nuVtSq[3]*temp_G_1_diff[4]+0.5*nuVtSq[2]*temp_G_1_diff[2]+0.5*nuVtSq[1]*temp_G_1_diff[1]+0.5*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.447213595499958*nuVtSq[7]*temp_G_1_diff[20]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[12]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[12]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[7]*temp_G_1_diff[8]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[4]*nuVtSq[6]+0.5*nuVtSq[2]*temp_G_1_diff[4]+0.4472135954999579*temp_G_1_diff[1]*nuVtSq[4]+0.5*temp_G_1_diff[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_diff[1]+0.5*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.447213595499958*nuVtSq[6]*temp_G_1_diff[20]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[12]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[11]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[8]+0.5000000000000001*nuVtSq[6]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[4]*nuVtSq[7]+0.4472135954999579*temp_G_1_diff[2]*nuVtSq[5]+0.5*nuVtSq[1]*temp_G_1_diff[4]+0.5*temp_G_1_diff[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_diff[2]+0.5*temp_G_1_diff[0]*nuVtSq[2]; - diff_G_1_incr[3] = 0.5*nuVtSq[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSq[7]*temp_G_1_diff[18]+0.5000000000000001*nuVtSq[6]*temp_G_1_diff[17]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[14]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[13]+0.5*nuVtSq[3]*temp_G_1_diff[10]+0.5*nuVtSq[2]*temp_G_1_diff[6]+0.5*nuVtSq[1]*temp_G_1_diff[5]+0.5*nuVtSq[0]*temp_G_1_diff[3]; - diff_G_1_incr[4] = 0.4*nuVtSq[3]*temp_G_1_diff[20]+0.4*nuVtSq[6]*temp_G_1_diff[12]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[12]+0.4*nuVtSq[7]*temp_G_1_diff[11]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[11]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[8]+0.4*temp_G_1_diff[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[2]*nuVtSq[7]+0.447213595499958*temp_G_1_diff[1]*nuVtSq[6]+0.4472135954999579*temp_G_1_diff[4]*nuVtSq[5]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[4]+0.5*nuVtSq[0]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_G_1_diff[2]+0.5*temp_G_1_diff[1]*nuVtSq[2]; - diff_G_1_incr[5] = 0.447213595499958*nuVtSq[7]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[8]*temp_G_1_diff[18]+0.5*nuVtSq[5]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[17]+0.5*nuVtSq[7]*temp_G_1_diff[14]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[13]+0.447213595499958*nuVtSq[6]*temp_G_1_diff[10]+0.5*nuVtSq[2]*temp_G_1_diff[10]+0.5*nuVtSq[3]*temp_G_1_diff[6]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[5]+0.5*nuVtSq[0]*temp_G_1_diff[5]+0.5*nuVtSq[1]*temp_G_1_diff[3]; - diff_G_1_incr[6] = 0.447213595499958*nuVtSq[6]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[8]*temp_G_1_diff[17]+0.5*nuVtSq[4]*temp_G_1_diff[17]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[14]+0.5*nuVtSq[6]*temp_G_1_diff[13]+0.447213595499958*nuVtSq[7]*temp_G_1_diff[10]+0.5*nuVtSq[1]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[6]+0.5*nuVtSq[0]*temp_G_1_diff[6]+0.5*nuVtSq[3]*temp_G_1_diff[5]+0.5*nuVtSq[2]*temp_G_1_diff[3]; - diff_G_1_incr[7] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[20]+0.5*nuVtSq[5]*temp_G_1_diff[20]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[12]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[11]+0.5*nuVtSq[8]*temp_G_1_diff[8]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[7]+0.5*nuVtSq[0]*temp_G_1_diff[7]+0.5000000000000001*temp_G_1_diff[2]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[1]; - diff_G_1_incr[8] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[20]+0.5*nuVtSq[4]*temp_G_1_diff[20]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[12]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[12]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[11]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[8]+0.5*nuVtSq[0]*temp_G_1_diff[8]+0.5*temp_G_1_diff[7]*nuVtSq[8]+0.5000000000000001*temp_G_1_diff[1]*nuVtSq[7]+0.5*temp_G_1_diff[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[4]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[2]; - diff_G_1_incr[9] = 0.5*nuVtSq[8]*temp_G_1_diff[26]+0.5000000000000001*nuVtSq[7]*temp_G_1_diff[25]+0.5000000000000001*nuVtSq[6]*temp_G_1_diff[24]+0.5*nuVtSq[5]*temp_G_1_diff[22]+0.5*nuVtSq[4]*temp_G_1_diff[21]+0.5*nuVtSq[3]*temp_G_1_diff[19]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[16]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[15]+0.5*nuVtSq[0]*temp_G_1_diff[9]; - diff_G_1_incr[10] = 0.4*nuVtSq[3]*temp_G_1_diff[23]+0.4*nuVtSq[6]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[18]+0.4*nuVtSq[7]*temp_G_1_diff[17]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[17]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[14]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[13]+0.4*nuVtSq[8]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[10]+0.5*nuVtSq[0]*temp_G_1_diff[10]+0.447213595499958*temp_G_1_diff[6]*nuVtSq[7]+0.5*nuVtSq[1]*temp_G_1_diff[6]+0.447213595499958*temp_G_1_diff[5]*nuVtSq[6]+0.5*nuVtSq[2]*temp_G_1_diff[5]+0.5*nuVtSq[3]*temp_G_1_diff[3]; - diff_G_1_incr[11] = 0.2857142857142857*nuVtSq[6]*temp_G_1_diff[20]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[20]+0.4*nuVtSq[3]*temp_G_1_diff[12]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[11]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[11]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[11]+0.5*nuVtSq[0]*temp_G_1_diff[11]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[8]+0.447213595499958*temp_G_1_diff[2]*nuVtSq[8]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[7]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[7]+0.4*temp_G_1_diff[4]*nuVtSq[7]+0.5*temp_G_1_diff[0]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[4]+0.5000000000000001*temp_G_1_diff[2]*nuVtSq[4]+0.447213595499958*temp_G_1_diff[1]*nuVtSq[3]; - diff_G_1_incr[12] = 0.2857142857142857*nuVtSq[7]*temp_G_1_diff[20]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[20]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[12]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[12]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[12]+0.5*nuVtSq[0]*temp_G_1_diff[12]+0.4*nuVtSq[3]*temp_G_1_diff[11]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[8]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[8]+0.447213595499958*temp_G_1_diff[1]*nuVtSq[8]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[7]+0.5*temp_G_1_diff[0]*nuVtSq[7]+0.4*temp_G_1_diff[4]*nuVtSq[6]+0.5000000000000001*temp_G_1_diff[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[4]+0.447213595499958*temp_G_1_diff[2]*nuVtSq[3]; - diff_G_1_incr[13] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[18]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[17]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[17]+0.5*nuVtSq[8]*temp_G_1_diff[14]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[13]+0.5*nuVtSq[0]*temp_G_1_diff[13]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[10]+0.5*nuVtSq[6]*temp_G_1_diff[6]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[5]+0.5000000000000001*temp_G_1_diff[3]*nuVtSq[4]; - diff_G_1_incr[14] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[23]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[18]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[17]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[14]+0.5*nuVtSq[0]*temp_G_1_diff[14]+0.5*nuVtSq[8]*temp_G_1_diff[13]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[10]+0.5*temp_G_1_diff[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[6]+0.5000000000000001*temp_G_1_diff[3]*nuVtSq[5]; - diff_G_1_incr[15] = 0.4472135954999579*nuVtSq[7]*temp_G_1_diff[26]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[25]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[25]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[24]+0.5*nuVtSq[7]*temp_G_1_diff[22]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[21]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[19]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[19]+0.5*nuVtSq[3]*temp_G_1_diff[16]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[15]+0.5*nuVtSq[0]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[9]; - diff_G_1_incr[16] = 0.4472135954999579*nuVtSq[6]*temp_G_1_diff[26]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[25]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[24]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[24]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[22]+0.5*nuVtSq[6]*temp_G_1_diff[21]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[19]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[16]+0.5*nuVtSq[0]*temp_G_1_diff[16]+0.5*nuVtSq[3]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[9]; - diff_G_1_incr[17] = 0.2857142857142858*nuVtSq[6]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[23]+0.4*nuVtSq[3]*temp_G_1_diff[18]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[17]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[17]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[17]+0.5*nuVtSq[0]*temp_G_1_diff[17]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[14]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[13]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[13]+0.4*nuVtSq[7]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[10]+0.4472135954999579*temp_G_1_diff[6]*nuVtSq[8]+0.5*nuVtSq[4]*temp_G_1_diff[6]+0.5000000000000001*temp_G_1_diff[3]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[5]; - diff_G_1_incr[18] = 0.2857142857142858*nuVtSq[7]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[23]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[18]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[18]+0.5*nuVtSq[0]*temp_G_1_diff[18]+0.4*nuVtSq[3]*temp_G_1_diff[17]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[14]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[14]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[13]+0.4*nuVtSq[6]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[10]+0.4472135954999579*temp_G_1_diff[5]*nuVtSq[8]+0.5000000000000001*temp_G_1_diff[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[6]+0.5*nuVtSq[5]*temp_G_1_diff[5]; - diff_G_1_incr[19] = 0.4*nuVtSq[3]*temp_G_1_diff[26]+0.4*nuVtSq[6]*temp_G_1_diff[25]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[25]+0.4*nuVtSq[7]*temp_G_1_diff[24]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[24]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[22]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[21]+0.4*nuVtSq[8]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[19]+0.5*nuVtSq[0]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[16]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[16]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[15]+0.5*nuVtSq[3]*temp_G_1_diff[9]; - diff_G_1_incr[20] = 0.2040816326530612*nuVtSq[8]*temp_G_1_diff[20]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[20]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[20]+0.5*nuVtSq[0]*temp_G_1_diff[20]+0.2857142857142857*nuVtSq[7]*temp_G_1_diff[12]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[12]+0.2857142857142857*nuVtSq[6]*temp_G_1_diff[11]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[11]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[8]+0.5*nuVtSq[4]*temp_G_1_diff[8]+0.31943828249997*temp_G_1_diff[7]*nuVtSq[8]+0.5*temp_G_1_diff[0]*nuVtSq[8]+0.5*nuVtSq[5]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[1]*nuVtSq[7]+0.447213595499958*temp_G_1_diff[2]*nuVtSq[6]+0.4*nuVtSq[3]*temp_G_1_diff[4]; - diff_G_1_incr[21] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[26]+0.5*nuVtSq[5]*temp_G_1_diff[26]+0.447213595499958*nuVtSq[7]*temp_G_1_diff[25]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[24]+0.5*nuVtSq[2]*temp_G_1_diff[24]+0.5*nuVtSq[8]*temp_G_1_diff[22]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[21]+0.5*nuVtSq[0]*temp_G_1_diff[21]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[19]+0.5*nuVtSq[6]*temp_G_1_diff[16]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[15]+0.5*nuVtSq[4]*temp_G_1_diff[9]; - diff_G_1_incr[22] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[26]+0.5*nuVtSq[4]*temp_G_1_diff[26]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[25]+0.5*nuVtSq[1]*temp_G_1_diff[25]+0.447213595499958*nuVtSq[6]*temp_G_1_diff[24]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[22]+0.5*nuVtSq[0]*temp_G_1_diff[22]+0.5*nuVtSq[8]*temp_G_1_diff[21]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[19]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[16]+0.5*nuVtSq[7]*temp_G_1_diff[15]+0.5*nuVtSq[5]*temp_G_1_diff[9]; - diff_G_1_incr[23] = 0.2040816326530612*nuVtSq[8]*temp_G_1_diff[23]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[23]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[23]+0.5*nuVtSq[0]*temp_G_1_diff[23]+0.2857142857142858*nuVtSq[7]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[18]+0.2857142857142858*nuVtSq[6]*temp_G_1_diff[17]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[17]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[14]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[14]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[13]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[13]+0.4*nuVtSq[3]*temp_G_1_diff[10]+0.5*temp_G_1_diff[3]*nuVtSq[8]+0.447213595499958*temp_G_1_diff[5]*nuVtSq[7]+0.447213595499958*nuVtSq[6]*temp_G_1_diff[6]; - diff_G_1_incr[24] = 0.2857142857142858*nuVtSq[6]*temp_G_1_diff[26]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[26]+0.4*nuVtSq[3]*temp_G_1_diff[25]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[24]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[24]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[24]+0.5*nuVtSq[0]*temp_G_1_diff[24]+0.447213595499958*nuVtSq[6]*temp_G_1_diff[22]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[21]+0.5*nuVtSq[2]*temp_G_1_diff[21]+0.4*nuVtSq[7]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[19]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[16]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[16]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[6]*temp_G_1_diff[9]; - diff_G_1_incr[25] = 0.2857142857142858*nuVtSq[7]*temp_G_1_diff[26]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[26]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[25]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[25]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[25]+0.5*nuVtSq[0]*temp_G_1_diff[25]+0.4*nuVtSq[3]*temp_G_1_diff[24]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[22]+0.5*nuVtSq[1]*temp_G_1_diff[22]+0.447213595499958*nuVtSq[7]*temp_G_1_diff[21]+0.4*nuVtSq[6]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[19]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[16]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[7]*temp_G_1_diff[9]; - diff_G_1_incr[26] = 0.2040816326530612*nuVtSq[8]*temp_G_1_diff[26]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[26]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[26]+0.5*nuVtSq[0]*temp_G_1_diff[26]+0.2857142857142858*nuVtSq[7]*temp_G_1_diff[25]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[25]+0.2857142857142858*nuVtSq[6]*temp_G_1_diff[24]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[24]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[22]+0.5*nuVtSq[4]*temp_G_1_diff[22]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[21]+0.5*nuVtSq[5]*temp_G_1_diff[21]+0.4*nuVtSq[3]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[16]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[15]+0.5*nuVtSq[8]*temp_G_1_diff[9]; + diff_F_0_incr[0] = 0.5*nuVtSqSum[8]*temp_F_0_diff[20]+0.5*nuVtSqSum[7]*temp_F_0_diff[12]+0.5*nuVtSqSum[6]*temp_F_0_diff[11]+0.5*nuVtSqSum[5]*temp_F_0_diff[8]+0.5*nuVtSqSum[4]*temp_F_0_diff[7]+0.5*nuVtSqSum[3]*temp_F_0_diff[4]+0.5*nuVtSqSum[2]*temp_F_0_diff[2]+0.5*nuVtSqSum[1]*temp_F_0_diff[1]+0.5*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[20]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[12]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[12]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_diff[8]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[4]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_F_0_diff[4]+0.4472135954999579*temp_F_0_diff[1]*nuVtSqSum[4]+0.5*temp_F_0_diff[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_diff[1]+0.5*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[20]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[12]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[11]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[8]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[4]*nuVtSqSum[7]+0.4472135954999579*temp_F_0_diff[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*temp_F_0_diff[4]+0.5*temp_F_0_diff[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_diff[2]+0.5*temp_F_0_diff[0]*nuVtSqSum[2]; + diff_F_0_incr[3] = 0.5*nuVtSqSum[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_diff[18]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_diff[17]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[14]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[13]+0.5*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*nuVtSqSum[2]*temp_F_0_diff[6]+0.5*nuVtSqSum[1]*temp_F_0_diff[5]+0.5*nuVtSqSum[0]*temp_F_0_diff[3]; + diff_F_0_incr[4] = 0.4*nuVtSqSum[3]*temp_F_0_diff[20]+0.4*nuVtSqSum[6]*temp_F_0_diff[12]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[12]+0.4*nuVtSqSum[7]*temp_F_0_diff[11]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[11]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[8]+0.4*temp_F_0_diff[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[2]*nuVtSqSum[7]+0.447213595499958*temp_F_0_diff[1]*nuVtSqSum[6]+0.4472135954999579*temp_F_0_diff[4]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[4]+0.5*nuVtSqSum[0]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_F_0_diff[2]+0.5*temp_F_0_diff[1]*nuVtSqSum[2]; + diff_F_0_incr[5] = 0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[8]*temp_F_0_diff[18]+0.5*nuVtSqSum[5]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[17]+0.5*nuVtSqSum[7]*temp_F_0_diff[14]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[13]+0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[10]+0.5*nuVtSqSum[2]*temp_F_0_diff[10]+0.5*nuVtSqSum[3]*temp_F_0_diff[6]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[5]+0.5*nuVtSqSum[0]*temp_F_0_diff[5]+0.5*nuVtSqSum[1]*temp_F_0_diff[3]; + diff_F_0_incr[6] = 0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[8]*temp_F_0_diff[17]+0.5*nuVtSqSum[4]*temp_F_0_diff[17]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[14]+0.5*nuVtSqSum[6]*temp_F_0_diff[13]+0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[10]+0.5*nuVtSqSum[1]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[6]+0.5*nuVtSqSum[0]*temp_F_0_diff[6]+0.5*nuVtSqSum[3]*temp_F_0_diff[5]+0.5*nuVtSqSum[2]*temp_F_0_diff[3]; + diff_F_0_incr[7] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[20]+0.5*nuVtSqSum[5]*temp_F_0_diff[20]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[12]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[11]+0.5*nuVtSqSum[8]*temp_F_0_diff[8]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[7]+0.5*nuVtSqSum[0]*temp_F_0_diff[7]+0.5000000000000001*temp_F_0_diff[2]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[1]; + diff_F_0_incr[8] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[20]+0.5*nuVtSqSum[4]*temp_F_0_diff[20]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[12]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[12]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[11]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[8]+0.5*nuVtSqSum[0]*temp_F_0_diff[8]+0.5*temp_F_0_diff[7]*nuVtSqSum[8]+0.5000000000000001*temp_F_0_diff[1]*nuVtSqSum[7]+0.5*temp_F_0_diff[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[4]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[2]; + diff_F_0_incr[9] = 0.5*nuVtSqSum[8]*temp_F_0_diff[26]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_diff[25]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_diff[24]+0.5*nuVtSqSum[5]*temp_F_0_diff[22]+0.5*nuVtSqSum[4]*temp_F_0_diff[21]+0.5*nuVtSqSum[3]*temp_F_0_diff[19]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[16]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[15]+0.5*nuVtSqSum[0]*temp_F_0_diff[9]; + diff_F_0_incr[10] = 0.4*nuVtSqSum[3]*temp_F_0_diff[23]+0.4*nuVtSqSum[6]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[18]+0.4*nuVtSqSum[7]*temp_F_0_diff[17]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[17]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[14]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[13]+0.4*nuVtSqSum[8]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[10]+0.5*nuVtSqSum[0]*temp_F_0_diff[10]+0.447213595499958*temp_F_0_diff[6]*nuVtSqSum[7]+0.5*nuVtSqSum[1]*temp_F_0_diff[6]+0.447213595499958*temp_F_0_diff[5]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_F_0_diff[5]+0.5*nuVtSqSum[3]*temp_F_0_diff[3]; + diff_F_0_incr[11] = 0.2857142857142857*nuVtSqSum[6]*temp_F_0_diff[20]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[20]+0.4*nuVtSqSum[3]*temp_F_0_diff[12]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[11]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[11]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[11]+0.5*nuVtSqSum[0]*temp_F_0_diff[11]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[8]+0.447213595499958*temp_F_0_diff[2]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[7]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[7]+0.4*temp_F_0_diff[4]*nuVtSqSum[7]+0.5*temp_F_0_diff[0]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[4]+0.5000000000000001*temp_F_0_diff[2]*nuVtSqSum[4]+0.447213595499958*temp_F_0_diff[1]*nuVtSqSum[3]; + diff_F_0_incr[12] = 0.2857142857142857*nuVtSqSum[7]*temp_F_0_diff[20]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[20]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[12]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[12]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[12]+0.5*nuVtSqSum[0]*temp_F_0_diff[12]+0.4*nuVtSqSum[3]*temp_F_0_diff[11]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[8]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[8]+0.447213595499958*temp_F_0_diff[1]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[7]+0.5*temp_F_0_diff[0]*nuVtSqSum[7]+0.4*temp_F_0_diff[4]*nuVtSqSum[6]+0.5000000000000001*temp_F_0_diff[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[4]+0.447213595499958*temp_F_0_diff[2]*nuVtSqSum[3]; + diff_F_0_incr[13] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[18]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[17]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[17]+0.5*nuVtSqSum[8]*temp_F_0_diff[14]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[13]+0.5*nuVtSqSum[0]*temp_F_0_diff[13]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*nuVtSqSum[6]*temp_F_0_diff[6]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[5]+0.5000000000000001*temp_F_0_diff[3]*nuVtSqSum[4]; + diff_F_0_incr[14] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[23]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[18]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[17]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[14]+0.5*nuVtSqSum[0]*temp_F_0_diff[14]+0.5*nuVtSqSum[8]*temp_F_0_diff[13]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*temp_F_0_diff[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[6]+0.5000000000000001*temp_F_0_diff[3]*nuVtSqSum[5]; + diff_F_0_incr[15] = 0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[26]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[25]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[25]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[24]+0.5*nuVtSqSum[7]*temp_F_0_diff[22]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[21]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[19]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[19]+0.5*nuVtSqSum[3]*temp_F_0_diff[16]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[15]+0.5*nuVtSqSum[0]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[9]; + diff_F_0_incr[16] = 0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[26]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[25]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[24]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[24]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[22]+0.5*nuVtSqSum[6]*temp_F_0_diff[21]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[19]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[16]+0.5*nuVtSqSum[0]*temp_F_0_diff[16]+0.5*nuVtSqSum[3]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[9]; + diff_F_0_incr[17] = 0.2857142857142858*nuVtSqSum[6]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[23]+0.4*nuVtSqSum[3]*temp_F_0_diff[18]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[17]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[17]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[17]+0.5*nuVtSqSum[0]*temp_F_0_diff[17]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[14]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[13]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[13]+0.4*nuVtSqSum[7]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[10]+0.4472135954999579*temp_F_0_diff[6]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*temp_F_0_diff[6]+0.5000000000000001*temp_F_0_diff[3]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[5]; + diff_F_0_incr[18] = 0.2857142857142858*nuVtSqSum[7]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[23]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[18]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[18]+0.5*nuVtSqSum[0]*temp_F_0_diff[18]+0.4*nuVtSqSum[3]*temp_F_0_diff[17]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[14]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[14]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[13]+0.4*nuVtSqSum[6]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[10]+0.4472135954999579*temp_F_0_diff[5]*nuVtSqSum[8]+0.5000000000000001*temp_F_0_diff[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[6]+0.5*nuVtSqSum[5]*temp_F_0_diff[5]; + diff_F_0_incr[19] = 0.4*nuVtSqSum[3]*temp_F_0_diff[26]+0.4*nuVtSqSum[6]*temp_F_0_diff[25]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[25]+0.4*nuVtSqSum[7]*temp_F_0_diff[24]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[24]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[22]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[21]+0.4*nuVtSqSum[8]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[19]+0.5*nuVtSqSum[0]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[16]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[16]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[15]+0.5*nuVtSqSum[3]*temp_F_0_diff[9]; + diff_F_0_incr[20] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_diff[20]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[20]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[20]+0.5*nuVtSqSum[0]*temp_F_0_diff[20]+0.2857142857142857*nuVtSqSum[7]*temp_F_0_diff[12]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[12]+0.2857142857142857*nuVtSqSum[6]*temp_F_0_diff[11]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[11]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[8]+0.5*nuVtSqSum[4]*temp_F_0_diff[8]+0.31943828249997*temp_F_0_diff[7]*nuVtSqSum[8]+0.5*temp_F_0_diff[0]*nuVtSqSum[8]+0.5*nuVtSqSum[5]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[1]*nuVtSqSum[7]+0.447213595499958*temp_F_0_diff[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*temp_F_0_diff[4]; + diff_F_0_incr[21] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[26]+0.5*nuVtSqSum[5]*temp_F_0_diff[26]+0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[25]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[24]+0.5*nuVtSqSum[2]*temp_F_0_diff[24]+0.5*nuVtSqSum[8]*temp_F_0_diff[22]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[21]+0.5*nuVtSqSum[0]*temp_F_0_diff[21]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[19]+0.5*nuVtSqSum[6]*temp_F_0_diff[16]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[15]+0.5*nuVtSqSum[4]*temp_F_0_diff[9]; + diff_F_0_incr[22] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[26]+0.5*nuVtSqSum[4]*temp_F_0_diff[26]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[25]+0.5*nuVtSqSum[1]*temp_F_0_diff[25]+0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[24]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[22]+0.5*nuVtSqSum[0]*temp_F_0_diff[22]+0.5*nuVtSqSum[8]*temp_F_0_diff[21]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[19]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[16]+0.5*nuVtSqSum[7]*temp_F_0_diff[15]+0.5*nuVtSqSum[5]*temp_F_0_diff[9]; + diff_F_0_incr[23] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_diff[23]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[23]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[23]+0.5*nuVtSqSum[0]*temp_F_0_diff[23]+0.2857142857142858*nuVtSqSum[7]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[18]+0.2857142857142858*nuVtSqSum[6]*temp_F_0_diff[17]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[17]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[14]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[14]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[13]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[13]+0.4*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*temp_F_0_diff[3]*nuVtSqSum[8]+0.447213595499958*temp_F_0_diff[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[6]; + diff_F_0_incr[24] = 0.2857142857142858*nuVtSqSum[6]*temp_F_0_diff[26]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[26]+0.4*nuVtSqSum[3]*temp_F_0_diff[25]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[24]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[24]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[24]+0.5*nuVtSqSum[0]*temp_F_0_diff[24]+0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[22]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[21]+0.5*nuVtSqSum[2]*temp_F_0_diff[21]+0.4*nuVtSqSum[7]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[19]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[16]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[16]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_diff[9]; + diff_F_0_incr[25] = 0.2857142857142858*nuVtSqSum[7]*temp_F_0_diff[26]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[26]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[25]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[25]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[25]+0.5*nuVtSqSum[0]*temp_F_0_diff[25]+0.4*nuVtSqSum[3]*temp_F_0_diff[24]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[22]+0.5*nuVtSqSum[1]*temp_F_0_diff[22]+0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[21]+0.4*nuVtSqSum[6]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[19]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[16]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_diff[9]; + diff_F_0_incr[26] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_diff[26]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[26]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[26]+0.5*nuVtSqSum[0]*temp_F_0_diff[26]+0.2857142857142858*nuVtSqSum[7]*temp_F_0_diff[25]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[25]+0.2857142857142858*nuVtSqSum[6]*temp_F_0_diff[24]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[24]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[22]+0.5*nuVtSqSum[4]*temp_F_0_diff[22]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[21]+0.5*nuVtSqSum[5]*temp_F_0_diff[21]+0.4*nuVtSqSum[3]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[16]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[15]+0.5*nuVtSqSum[8]*temp_F_0_diff[9]; + diff_G_1_incr[0] = 0.5*nuVtSqSum[8]*temp_G_1_diff[20]+0.5*nuVtSqSum[7]*temp_G_1_diff[12]+0.5*nuVtSqSum[6]*temp_G_1_diff[11]+0.5*nuVtSqSum[5]*temp_G_1_diff[8]+0.5*nuVtSqSum[4]*temp_G_1_diff[7]+0.5*nuVtSqSum[3]*temp_G_1_diff[4]+0.5*nuVtSqSum[2]*temp_G_1_diff[2]+0.5*nuVtSqSum[1]*temp_G_1_diff[1]+0.5*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[20]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[12]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[12]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_diff[8]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[4]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_G_1_diff[4]+0.4472135954999579*temp_G_1_diff[1]*nuVtSqSum[4]+0.5*temp_G_1_diff[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_diff[1]+0.5*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[20]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[12]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[11]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[8]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[4]*nuVtSqSum[7]+0.4472135954999579*temp_G_1_diff[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*temp_G_1_diff[4]+0.5*temp_G_1_diff[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_diff[2]+0.5*temp_G_1_diff[0]*nuVtSqSum[2]; + diff_G_1_incr[3] = 0.5*nuVtSqSum[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_diff[18]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_diff[17]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[14]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[13]+0.5*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*nuVtSqSum[2]*temp_G_1_diff[6]+0.5*nuVtSqSum[1]*temp_G_1_diff[5]+0.5*nuVtSqSum[0]*temp_G_1_diff[3]; + diff_G_1_incr[4] = 0.4*nuVtSqSum[3]*temp_G_1_diff[20]+0.4*nuVtSqSum[6]*temp_G_1_diff[12]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[12]+0.4*nuVtSqSum[7]*temp_G_1_diff[11]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[11]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[8]+0.4*temp_G_1_diff[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[2]*nuVtSqSum[7]+0.447213595499958*temp_G_1_diff[1]*nuVtSqSum[6]+0.4472135954999579*temp_G_1_diff[4]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[4]+0.5*nuVtSqSum[0]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_G_1_diff[2]+0.5*temp_G_1_diff[1]*nuVtSqSum[2]; + diff_G_1_incr[5] = 0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[8]*temp_G_1_diff[18]+0.5*nuVtSqSum[5]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[17]+0.5*nuVtSqSum[7]*temp_G_1_diff[14]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[13]+0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[10]+0.5*nuVtSqSum[2]*temp_G_1_diff[10]+0.5*nuVtSqSum[3]*temp_G_1_diff[6]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[5]+0.5*nuVtSqSum[0]*temp_G_1_diff[5]+0.5*nuVtSqSum[1]*temp_G_1_diff[3]; + diff_G_1_incr[6] = 0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[8]*temp_G_1_diff[17]+0.5*nuVtSqSum[4]*temp_G_1_diff[17]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[14]+0.5*nuVtSqSum[6]*temp_G_1_diff[13]+0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[10]+0.5*nuVtSqSum[1]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[6]+0.5*nuVtSqSum[0]*temp_G_1_diff[6]+0.5*nuVtSqSum[3]*temp_G_1_diff[5]+0.5*nuVtSqSum[2]*temp_G_1_diff[3]; + diff_G_1_incr[7] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[20]+0.5*nuVtSqSum[5]*temp_G_1_diff[20]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[12]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[11]+0.5*nuVtSqSum[8]*temp_G_1_diff[8]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[7]+0.5*nuVtSqSum[0]*temp_G_1_diff[7]+0.5000000000000001*temp_G_1_diff[2]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[1]; + diff_G_1_incr[8] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[20]+0.5*nuVtSqSum[4]*temp_G_1_diff[20]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[12]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[12]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[11]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[8]+0.5*nuVtSqSum[0]*temp_G_1_diff[8]+0.5*temp_G_1_diff[7]*nuVtSqSum[8]+0.5000000000000001*temp_G_1_diff[1]*nuVtSqSum[7]+0.5*temp_G_1_diff[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[4]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[2]; + diff_G_1_incr[9] = 0.5*nuVtSqSum[8]*temp_G_1_diff[26]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_diff[25]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_diff[24]+0.5*nuVtSqSum[5]*temp_G_1_diff[22]+0.5*nuVtSqSum[4]*temp_G_1_diff[21]+0.5*nuVtSqSum[3]*temp_G_1_diff[19]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[16]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[15]+0.5*nuVtSqSum[0]*temp_G_1_diff[9]; + diff_G_1_incr[10] = 0.4*nuVtSqSum[3]*temp_G_1_diff[23]+0.4*nuVtSqSum[6]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[18]+0.4*nuVtSqSum[7]*temp_G_1_diff[17]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[17]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[14]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[13]+0.4*nuVtSqSum[8]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[10]+0.5*nuVtSqSum[0]*temp_G_1_diff[10]+0.447213595499958*temp_G_1_diff[6]*nuVtSqSum[7]+0.5*nuVtSqSum[1]*temp_G_1_diff[6]+0.447213595499958*temp_G_1_diff[5]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_G_1_diff[5]+0.5*nuVtSqSum[3]*temp_G_1_diff[3]; + diff_G_1_incr[11] = 0.2857142857142857*nuVtSqSum[6]*temp_G_1_diff[20]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[20]+0.4*nuVtSqSum[3]*temp_G_1_diff[12]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[11]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[11]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[11]+0.5*nuVtSqSum[0]*temp_G_1_diff[11]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[8]+0.447213595499958*temp_G_1_diff[2]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[7]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[7]+0.4*temp_G_1_diff[4]*nuVtSqSum[7]+0.5*temp_G_1_diff[0]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[4]+0.5000000000000001*temp_G_1_diff[2]*nuVtSqSum[4]+0.447213595499958*temp_G_1_diff[1]*nuVtSqSum[3]; + diff_G_1_incr[12] = 0.2857142857142857*nuVtSqSum[7]*temp_G_1_diff[20]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[20]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[12]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[12]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[12]+0.5*nuVtSqSum[0]*temp_G_1_diff[12]+0.4*nuVtSqSum[3]*temp_G_1_diff[11]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[8]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[8]+0.447213595499958*temp_G_1_diff[1]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[7]+0.5*temp_G_1_diff[0]*nuVtSqSum[7]+0.4*temp_G_1_diff[4]*nuVtSqSum[6]+0.5000000000000001*temp_G_1_diff[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[4]+0.447213595499958*temp_G_1_diff[2]*nuVtSqSum[3]; + diff_G_1_incr[13] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[18]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[17]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[17]+0.5*nuVtSqSum[8]*temp_G_1_diff[14]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[13]+0.5*nuVtSqSum[0]*temp_G_1_diff[13]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*nuVtSqSum[6]*temp_G_1_diff[6]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[5]+0.5000000000000001*temp_G_1_diff[3]*nuVtSqSum[4]; + diff_G_1_incr[14] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[23]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[18]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[17]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[14]+0.5*nuVtSqSum[0]*temp_G_1_diff[14]+0.5*nuVtSqSum[8]*temp_G_1_diff[13]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*temp_G_1_diff[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[6]+0.5000000000000001*temp_G_1_diff[3]*nuVtSqSum[5]; + diff_G_1_incr[15] = 0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[26]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[25]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[25]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[24]+0.5*nuVtSqSum[7]*temp_G_1_diff[22]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[21]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[19]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[19]+0.5*nuVtSqSum[3]*temp_G_1_diff[16]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[15]+0.5*nuVtSqSum[0]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[9]; + diff_G_1_incr[16] = 0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[26]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[25]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[24]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[24]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[22]+0.5*nuVtSqSum[6]*temp_G_1_diff[21]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[19]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[16]+0.5*nuVtSqSum[0]*temp_G_1_diff[16]+0.5*nuVtSqSum[3]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[9]; + diff_G_1_incr[17] = 0.2857142857142858*nuVtSqSum[6]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[23]+0.4*nuVtSqSum[3]*temp_G_1_diff[18]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[17]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[17]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[17]+0.5*nuVtSqSum[0]*temp_G_1_diff[17]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[14]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[13]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[13]+0.4*nuVtSqSum[7]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[10]+0.4472135954999579*temp_G_1_diff[6]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*temp_G_1_diff[6]+0.5000000000000001*temp_G_1_diff[3]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[5]; + diff_G_1_incr[18] = 0.2857142857142858*nuVtSqSum[7]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[23]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[18]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[18]+0.5*nuVtSqSum[0]*temp_G_1_diff[18]+0.4*nuVtSqSum[3]*temp_G_1_diff[17]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[14]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[14]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[13]+0.4*nuVtSqSum[6]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[10]+0.4472135954999579*temp_G_1_diff[5]*nuVtSqSum[8]+0.5000000000000001*temp_G_1_diff[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[6]+0.5*nuVtSqSum[5]*temp_G_1_diff[5]; + diff_G_1_incr[19] = 0.4*nuVtSqSum[3]*temp_G_1_diff[26]+0.4*nuVtSqSum[6]*temp_G_1_diff[25]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[25]+0.4*nuVtSqSum[7]*temp_G_1_diff[24]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[24]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[22]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[21]+0.4*nuVtSqSum[8]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[19]+0.5*nuVtSqSum[0]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[16]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[16]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[15]+0.5*nuVtSqSum[3]*temp_G_1_diff[9]; + diff_G_1_incr[20] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_diff[20]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[20]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[20]+0.5*nuVtSqSum[0]*temp_G_1_diff[20]+0.2857142857142857*nuVtSqSum[7]*temp_G_1_diff[12]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[12]+0.2857142857142857*nuVtSqSum[6]*temp_G_1_diff[11]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[11]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[8]+0.5*nuVtSqSum[4]*temp_G_1_diff[8]+0.31943828249997*temp_G_1_diff[7]*nuVtSqSum[8]+0.5*temp_G_1_diff[0]*nuVtSqSum[8]+0.5*nuVtSqSum[5]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[1]*nuVtSqSum[7]+0.447213595499958*temp_G_1_diff[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*temp_G_1_diff[4]; + diff_G_1_incr[21] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[26]+0.5*nuVtSqSum[5]*temp_G_1_diff[26]+0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[25]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[24]+0.5*nuVtSqSum[2]*temp_G_1_diff[24]+0.5*nuVtSqSum[8]*temp_G_1_diff[22]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[21]+0.5*nuVtSqSum[0]*temp_G_1_diff[21]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[19]+0.5*nuVtSqSum[6]*temp_G_1_diff[16]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[15]+0.5*nuVtSqSum[4]*temp_G_1_diff[9]; + diff_G_1_incr[22] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[26]+0.5*nuVtSqSum[4]*temp_G_1_diff[26]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[25]+0.5*nuVtSqSum[1]*temp_G_1_diff[25]+0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[24]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[22]+0.5*nuVtSqSum[0]*temp_G_1_diff[22]+0.5*nuVtSqSum[8]*temp_G_1_diff[21]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[19]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[16]+0.5*nuVtSqSum[7]*temp_G_1_diff[15]+0.5*nuVtSqSum[5]*temp_G_1_diff[9]; + diff_G_1_incr[23] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_diff[23]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[23]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[23]+0.5*nuVtSqSum[0]*temp_G_1_diff[23]+0.2857142857142858*nuVtSqSum[7]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[18]+0.2857142857142858*nuVtSqSum[6]*temp_G_1_diff[17]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[17]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[14]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[14]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[13]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[13]+0.4*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*temp_G_1_diff[3]*nuVtSqSum[8]+0.447213595499958*temp_G_1_diff[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[6]; + diff_G_1_incr[24] = 0.2857142857142858*nuVtSqSum[6]*temp_G_1_diff[26]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[26]+0.4*nuVtSqSum[3]*temp_G_1_diff[25]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[24]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[24]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[24]+0.5*nuVtSqSum[0]*temp_G_1_diff[24]+0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[22]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[21]+0.5*nuVtSqSum[2]*temp_G_1_diff[21]+0.4*nuVtSqSum[7]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[19]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[16]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[16]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_diff[9]; + diff_G_1_incr[25] = 0.2857142857142858*nuVtSqSum[7]*temp_G_1_diff[26]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[26]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[25]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[25]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[25]+0.5*nuVtSqSum[0]*temp_G_1_diff[25]+0.4*nuVtSqSum[3]*temp_G_1_diff[24]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[22]+0.5*nuVtSqSum[1]*temp_G_1_diff[22]+0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[21]+0.4*nuVtSqSum[6]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[19]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[16]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_diff[9]; + diff_G_1_incr[26] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_diff[26]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[26]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[26]+0.5*nuVtSqSum[0]*temp_G_1_diff[26]+0.2857142857142858*nuVtSqSum[7]*temp_G_1_diff[25]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[25]+0.2857142857142858*nuVtSqSum[6]*temp_G_1_diff[24]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[24]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[22]+0.5*nuVtSqSum[4]*temp_G_1_diff[22]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[21]+0.5*nuVtSqSum[5]*temp_G_1_diff[21]+0.4*nuVtSqSum[3]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[16]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[15]+0.5*nuVtSqSum[8]*temp_G_1_diff[9]; - edge_F_0_incr[0] = 0.5*nuVtSq[8]*temp_F_0_edge[20]+0.5*nuVtSq[7]*temp_F_0_edge[12]+0.5*nuVtSq[6]*temp_F_0_edge[11]+0.5*nuVtSq[5]*temp_F_0_edge[8]+0.5*nuVtSq[4]*temp_F_0_edge[7]+0.5*nuVtSq[3]*temp_F_0_edge[4]+0.5*nuVtSq[2]*temp_F_0_edge[2]+0.5*nuVtSq[1]*temp_F_0_edge[1]+0.5*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.447213595499958*nuVtSq[7]*temp_F_0_edge[20]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[12]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[12]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[7]*temp_F_0_edge[8]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[4]*nuVtSq[6]+0.5*nuVtSq[2]*temp_F_0_edge[4]+0.4472135954999579*temp_F_0_edge[1]*nuVtSq[4]+0.5*temp_F_0_edge[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_edge[1]+0.5*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.447213595499958*nuVtSq[6]*temp_F_0_edge[20]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[12]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[11]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[8]+0.5000000000000001*nuVtSq[6]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[4]*nuVtSq[7]+0.4472135954999579*temp_F_0_edge[2]*nuVtSq[5]+0.5*nuVtSq[1]*temp_F_0_edge[4]+0.5*temp_F_0_edge[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_edge[2]+0.5*temp_F_0_edge[0]*nuVtSq[2]; - edge_F_0_incr[3] = 0.5*nuVtSq[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSq[7]*temp_F_0_edge[18]+0.5000000000000001*nuVtSq[6]*temp_F_0_edge[17]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[14]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[13]+0.5*nuVtSq[3]*temp_F_0_edge[10]+0.5*nuVtSq[2]*temp_F_0_edge[6]+0.5*nuVtSq[1]*temp_F_0_edge[5]+0.5*nuVtSq[0]*temp_F_0_edge[3]; - edge_F_0_incr[4] = 0.4*nuVtSq[3]*temp_F_0_edge[20]+0.4*nuVtSq[6]*temp_F_0_edge[12]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[12]+0.4*nuVtSq[7]*temp_F_0_edge[11]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[11]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[8]+0.4*temp_F_0_edge[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[2]*nuVtSq[7]+0.447213595499958*temp_F_0_edge[1]*nuVtSq[6]+0.4472135954999579*temp_F_0_edge[4]*nuVtSq[5]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[4]+0.5*nuVtSq[0]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_F_0_edge[2]+0.5*temp_F_0_edge[1]*nuVtSq[2]; - edge_F_0_incr[5] = 0.447213595499958*nuVtSq[7]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[8]*temp_F_0_edge[18]+0.5*nuVtSq[5]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[17]+0.5*nuVtSq[7]*temp_F_0_edge[14]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[13]+0.447213595499958*nuVtSq[6]*temp_F_0_edge[10]+0.5*nuVtSq[2]*temp_F_0_edge[10]+0.5*nuVtSq[3]*temp_F_0_edge[6]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[5]+0.5*nuVtSq[0]*temp_F_0_edge[5]+0.5*nuVtSq[1]*temp_F_0_edge[3]; - edge_F_0_incr[6] = 0.447213595499958*nuVtSq[6]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[8]*temp_F_0_edge[17]+0.5*nuVtSq[4]*temp_F_0_edge[17]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[14]+0.5*nuVtSq[6]*temp_F_0_edge[13]+0.447213595499958*nuVtSq[7]*temp_F_0_edge[10]+0.5*nuVtSq[1]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[6]+0.5*nuVtSq[0]*temp_F_0_edge[6]+0.5*nuVtSq[3]*temp_F_0_edge[5]+0.5*nuVtSq[2]*temp_F_0_edge[3]; - edge_F_0_incr[7] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[20]+0.5*nuVtSq[5]*temp_F_0_edge[20]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[12]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[11]+0.5*nuVtSq[8]*temp_F_0_edge[8]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[7]+0.5*nuVtSq[0]*temp_F_0_edge[7]+0.5000000000000001*temp_F_0_edge[2]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[1]; - edge_F_0_incr[8] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[20]+0.5*nuVtSq[4]*temp_F_0_edge[20]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[12]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[12]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[11]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[8]+0.5*nuVtSq[0]*temp_F_0_edge[8]+0.5*temp_F_0_edge[7]*nuVtSq[8]+0.5000000000000001*temp_F_0_edge[1]*nuVtSq[7]+0.5*temp_F_0_edge[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[4]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[2]; - edge_F_0_incr[9] = 0.5*nuVtSq[8]*temp_F_0_edge[26]+0.5000000000000001*nuVtSq[7]*temp_F_0_edge[25]+0.5000000000000001*nuVtSq[6]*temp_F_0_edge[24]+0.5*nuVtSq[5]*temp_F_0_edge[22]+0.5*nuVtSq[4]*temp_F_0_edge[21]+0.5*nuVtSq[3]*temp_F_0_edge[19]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[16]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[15]+0.5*nuVtSq[0]*temp_F_0_edge[9]; - edge_F_0_incr[10] = 0.4*nuVtSq[3]*temp_F_0_edge[23]+0.4*nuVtSq[6]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[18]+0.4*nuVtSq[7]*temp_F_0_edge[17]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[17]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[14]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[13]+0.4*nuVtSq[8]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[10]+0.5*nuVtSq[0]*temp_F_0_edge[10]+0.447213595499958*temp_F_0_edge[6]*nuVtSq[7]+0.5*nuVtSq[1]*temp_F_0_edge[6]+0.447213595499958*temp_F_0_edge[5]*nuVtSq[6]+0.5*nuVtSq[2]*temp_F_0_edge[5]+0.5*nuVtSq[3]*temp_F_0_edge[3]; - edge_F_0_incr[11] = 0.2857142857142857*nuVtSq[6]*temp_F_0_edge[20]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[20]+0.4*nuVtSq[3]*temp_F_0_edge[12]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[11]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[11]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[11]+0.5*nuVtSq[0]*temp_F_0_edge[11]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[8]+0.447213595499958*temp_F_0_edge[2]*nuVtSq[8]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[7]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[7]+0.4*temp_F_0_edge[4]*nuVtSq[7]+0.5*temp_F_0_edge[0]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[4]+0.5000000000000001*temp_F_0_edge[2]*nuVtSq[4]+0.447213595499958*temp_F_0_edge[1]*nuVtSq[3]; - edge_F_0_incr[12] = 0.2857142857142857*nuVtSq[7]*temp_F_0_edge[20]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[20]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[12]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[12]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[12]+0.5*nuVtSq[0]*temp_F_0_edge[12]+0.4*nuVtSq[3]*temp_F_0_edge[11]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[8]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[8]+0.447213595499958*temp_F_0_edge[1]*nuVtSq[8]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[7]+0.5*temp_F_0_edge[0]*nuVtSq[7]+0.4*temp_F_0_edge[4]*nuVtSq[6]+0.5000000000000001*temp_F_0_edge[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[4]+0.447213595499958*temp_F_0_edge[2]*nuVtSq[3]; - edge_F_0_incr[13] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[18]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[17]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[17]+0.5*nuVtSq[8]*temp_F_0_edge[14]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[13]+0.5*nuVtSq[0]*temp_F_0_edge[13]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[10]+0.5*nuVtSq[6]*temp_F_0_edge[6]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[5]+0.5000000000000001*temp_F_0_edge[3]*nuVtSq[4]; - edge_F_0_incr[14] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[23]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[18]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[17]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[14]+0.5*nuVtSq[0]*temp_F_0_edge[14]+0.5*nuVtSq[8]*temp_F_0_edge[13]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[10]+0.5*temp_F_0_edge[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[6]+0.5000000000000001*temp_F_0_edge[3]*nuVtSq[5]; - edge_F_0_incr[15] = 0.4472135954999579*nuVtSq[7]*temp_F_0_edge[26]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[25]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[25]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[24]+0.5*nuVtSq[7]*temp_F_0_edge[22]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[21]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[19]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[19]+0.5*nuVtSq[3]*temp_F_0_edge[16]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[15]+0.5*nuVtSq[0]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[9]; - edge_F_0_incr[16] = 0.4472135954999579*nuVtSq[6]*temp_F_0_edge[26]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[25]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[24]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[24]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[22]+0.5*nuVtSq[6]*temp_F_0_edge[21]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[19]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[16]+0.5*nuVtSq[0]*temp_F_0_edge[16]+0.5*nuVtSq[3]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[9]; - edge_F_0_incr[17] = 0.2857142857142858*nuVtSq[6]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[23]+0.4*nuVtSq[3]*temp_F_0_edge[18]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[17]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[17]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[17]+0.5*nuVtSq[0]*temp_F_0_edge[17]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[14]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[13]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[13]+0.4*nuVtSq[7]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[10]+0.4472135954999579*temp_F_0_edge[6]*nuVtSq[8]+0.5*nuVtSq[4]*temp_F_0_edge[6]+0.5000000000000001*temp_F_0_edge[3]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[5]; - edge_F_0_incr[18] = 0.2857142857142858*nuVtSq[7]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[23]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[18]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[18]+0.5*nuVtSq[0]*temp_F_0_edge[18]+0.4*nuVtSq[3]*temp_F_0_edge[17]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[14]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[14]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[13]+0.4*nuVtSq[6]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[10]+0.4472135954999579*temp_F_0_edge[5]*nuVtSq[8]+0.5000000000000001*temp_F_0_edge[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[6]+0.5*nuVtSq[5]*temp_F_0_edge[5]; - edge_F_0_incr[19] = 0.4*nuVtSq[3]*temp_F_0_edge[26]+0.4*nuVtSq[6]*temp_F_0_edge[25]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[25]+0.4*nuVtSq[7]*temp_F_0_edge[24]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[24]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[22]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[21]+0.4*nuVtSq[8]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[19]+0.5*nuVtSq[0]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[16]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[16]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[15]+0.5*nuVtSq[3]*temp_F_0_edge[9]; - edge_F_0_incr[20] = 0.2040816326530612*nuVtSq[8]*temp_F_0_edge[20]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[20]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[20]+0.5*nuVtSq[0]*temp_F_0_edge[20]+0.2857142857142857*nuVtSq[7]*temp_F_0_edge[12]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[12]+0.2857142857142857*nuVtSq[6]*temp_F_0_edge[11]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[11]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[8]+0.5*nuVtSq[4]*temp_F_0_edge[8]+0.31943828249997*temp_F_0_edge[7]*nuVtSq[8]+0.5*temp_F_0_edge[0]*nuVtSq[8]+0.5*nuVtSq[5]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[1]*nuVtSq[7]+0.447213595499958*temp_F_0_edge[2]*nuVtSq[6]+0.4*nuVtSq[3]*temp_F_0_edge[4]; - edge_F_0_incr[21] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[26]+0.5*nuVtSq[5]*temp_F_0_edge[26]+0.447213595499958*nuVtSq[7]*temp_F_0_edge[25]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[24]+0.5*nuVtSq[2]*temp_F_0_edge[24]+0.5*nuVtSq[8]*temp_F_0_edge[22]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[21]+0.5*nuVtSq[0]*temp_F_0_edge[21]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[19]+0.5*nuVtSq[6]*temp_F_0_edge[16]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[15]+0.5*nuVtSq[4]*temp_F_0_edge[9]; - edge_F_0_incr[22] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[26]+0.5*nuVtSq[4]*temp_F_0_edge[26]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[25]+0.5*nuVtSq[1]*temp_F_0_edge[25]+0.447213595499958*nuVtSq[6]*temp_F_0_edge[24]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[22]+0.5*nuVtSq[0]*temp_F_0_edge[22]+0.5*nuVtSq[8]*temp_F_0_edge[21]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[19]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[16]+0.5*nuVtSq[7]*temp_F_0_edge[15]+0.5*nuVtSq[5]*temp_F_0_edge[9]; - edge_F_0_incr[23] = 0.2040816326530612*nuVtSq[8]*temp_F_0_edge[23]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[23]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[23]+0.5*nuVtSq[0]*temp_F_0_edge[23]+0.2857142857142858*nuVtSq[7]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[18]+0.2857142857142858*nuVtSq[6]*temp_F_0_edge[17]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[17]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[14]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[14]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[13]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[13]+0.4*nuVtSq[3]*temp_F_0_edge[10]+0.5*temp_F_0_edge[3]*nuVtSq[8]+0.447213595499958*temp_F_0_edge[5]*nuVtSq[7]+0.447213595499958*nuVtSq[6]*temp_F_0_edge[6]; - edge_F_0_incr[24] = 0.2857142857142858*nuVtSq[6]*temp_F_0_edge[26]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[26]+0.4*nuVtSq[3]*temp_F_0_edge[25]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[24]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[24]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[24]+0.5*nuVtSq[0]*temp_F_0_edge[24]+0.447213595499958*nuVtSq[6]*temp_F_0_edge[22]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[21]+0.5*nuVtSq[2]*temp_F_0_edge[21]+0.4*nuVtSq[7]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[19]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[16]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[16]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[6]*temp_F_0_edge[9]; - edge_F_0_incr[25] = 0.2857142857142858*nuVtSq[7]*temp_F_0_edge[26]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[26]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[25]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[25]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[25]+0.5*nuVtSq[0]*temp_F_0_edge[25]+0.4*nuVtSq[3]*temp_F_0_edge[24]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[22]+0.5*nuVtSq[1]*temp_F_0_edge[22]+0.447213595499958*nuVtSq[7]*temp_F_0_edge[21]+0.4*nuVtSq[6]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[19]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[16]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[7]*temp_F_0_edge[9]; - edge_F_0_incr[26] = 0.2040816326530612*nuVtSq[8]*temp_F_0_edge[26]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[26]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[26]+0.5*nuVtSq[0]*temp_F_0_edge[26]+0.2857142857142858*nuVtSq[7]*temp_F_0_edge[25]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[25]+0.2857142857142858*nuVtSq[6]*temp_F_0_edge[24]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[24]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[22]+0.5*nuVtSq[4]*temp_F_0_edge[22]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[21]+0.5*nuVtSq[5]*temp_F_0_edge[21]+0.4*nuVtSq[3]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[16]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[15]+0.5*nuVtSq[8]*temp_F_0_edge[9]; - edge_G_1_incr[0] = 0.5*nuVtSq[8]*temp_G_1_edge[20]+0.5*nuVtSq[7]*temp_G_1_edge[12]+0.5*nuVtSq[6]*temp_G_1_edge[11]+0.5*nuVtSq[5]*temp_G_1_edge[8]+0.5*nuVtSq[4]*temp_G_1_edge[7]+0.5*nuVtSq[3]*temp_G_1_edge[4]+0.5*nuVtSq[2]*temp_G_1_edge[2]+0.5*nuVtSq[1]*temp_G_1_edge[1]+0.5*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.447213595499958*nuVtSq[7]*temp_G_1_edge[20]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[12]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[12]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[7]*temp_G_1_edge[8]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[4]*nuVtSq[6]+0.5*nuVtSq[2]*temp_G_1_edge[4]+0.4472135954999579*temp_G_1_edge[1]*nuVtSq[4]+0.5*temp_G_1_edge[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_edge[1]+0.5*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.447213595499958*nuVtSq[6]*temp_G_1_edge[20]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[12]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[11]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[8]+0.5000000000000001*nuVtSq[6]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[4]*nuVtSq[7]+0.4472135954999579*temp_G_1_edge[2]*nuVtSq[5]+0.5*nuVtSq[1]*temp_G_1_edge[4]+0.5*temp_G_1_edge[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_edge[2]+0.5*temp_G_1_edge[0]*nuVtSq[2]; - edge_G_1_incr[3] = 0.5*nuVtSq[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSq[7]*temp_G_1_edge[18]+0.5000000000000001*nuVtSq[6]*temp_G_1_edge[17]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[14]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[13]+0.5*nuVtSq[3]*temp_G_1_edge[10]+0.5*nuVtSq[2]*temp_G_1_edge[6]+0.5*nuVtSq[1]*temp_G_1_edge[5]+0.5*nuVtSq[0]*temp_G_1_edge[3]; - edge_G_1_incr[4] = 0.4*nuVtSq[3]*temp_G_1_edge[20]+0.4*nuVtSq[6]*temp_G_1_edge[12]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[12]+0.4*nuVtSq[7]*temp_G_1_edge[11]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[11]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[8]+0.4*temp_G_1_edge[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[2]*nuVtSq[7]+0.447213595499958*temp_G_1_edge[1]*nuVtSq[6]+0.4472135954999579*temp_G_1_edge[4]*nuVtSq[5]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[4]+0.5*nuVtSq[0]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_G_1_edge[2]+0.5*temp_G_1_edge[1]*nuVtSq[2]; - edge_G_1_incr[5] = 0.447213595499958*nuVtSq[7]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[8]*temp_G_1_edge[18]+0.5*nuVtSq[5]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[17]+0.5*nuVtSq[7]*temp_G_1_edge[14]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[13]+0.447213595499958*nuVtSq[6]*temp_G_1_edge[10]+0.5*nuVtSq[2]*temp_G_1_edge[10]+0.5*nuVtSq[3]*temp_G_1_edge[6]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[5]+0.5*nuVtSq[0]*temp_G_1_edge[5]+0.5*nuVtSq[1]*temp_G_1_edge[3]; - edge_G_1_incr[6] = 0.447213595499958*nuVtSq[6]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[8]*temp_G_1_edge[17]+0.5*nuVtSq[4]*temp_G_1_edge[17]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[14]+0.5*nuVtSq[6]*temp_G_1_edge[13]+0.447213595499958*nuVtSq[7]*temp_G_1_edge[10]+0.5*nuVtSq[1]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[6]+0.5*nuVtSq[0]*temp_G_1_edge[6]+0.5*nuVtSq[3]*temp_G_1_edge[5]+0.5*nuVtSq[2]*temp_G_1_edge[3]; - edge_G_1_incr[7] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[20]+0.5*nuVtSq[5]*temp_G_1_edge[20]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[12]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[11]+0.5*nuVtSq[8]*temp_G_1_edge[8]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[7]+0.5*nuVtSq[0]*temp_G_1_edge[7]+0.5000000000000001*temp_G_1_edge[2]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[1]; - edge_G_1_incr[8] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[20]+0.5*nuVtSq[4]*temp_G_1_edge[20]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[12]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[12]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[11]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[8]+0.5*nuVtSq[0]*temp_G_1_edge[8]+0.5*temp_G_1_edge[7]*nuVtSq[8]+0.5000000000000001*temp_G_1_edge[1]*nuVtSq[7]+0.5*temp_G_1_edge[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[4]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[2]; - edge_G_1_incr[9] = 0.5*nuVtSq[8]*temp_G_1_edge[26]+0.5000000000000001*nuVtSq[7]*temp_G_1_edge[25]+0.5000000000000001*nuVtSq[6]*temp_G_1_edge[24]+0.5*nuVtSq[5]*temp_G_1_edge[22]+0.5*nuVtSq[4]*temp_G_1_edge[21]+0.5*nuVtSq[3]*temp_G_1_edge[19]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[16]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[15]+0.5*nuVtSq[0]*temp_G_1_edge[9]; - edge_G_1_incr[10] = 0.4*nuVtSq[3]*temp_G_1_edge[23]+0.4*nuVtSq[6]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[18]+0.4*nuVtSq[7]*temp_G_1_edge[17]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[17]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[14]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[13]+0.4*nuVtSq[8]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[10]+0.5*nuVtSq[0]*temp_G_1_edge[10]+0.447213595499958*temp_G_1_edge[6]*nuVtSq[7]+0.5*nuVtSq[1]*temp_G_1_edge[6]+0.447213595499958*temp_G_1_edge[5]*nuVtSq[6]+0.5*nuVtSq[2]*temp_G_1_edge[5]+0.5*nuVtSq[3]*temp_G_1_edge[3]; - edge_G_1_incr[11] = 0.2857142857142857*nuVtSq[6]*temp_G_1_edge[20]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[20]+0.4*nuVtSq[3]*temp_G_1_edge[12]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[11]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[11]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[11]+0.5*nuVtSq[0]*temp_G_1_edge[11]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[8]+0.447213595499958*temp_G_1_edge[2]*nuVtSq[8]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[7]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[7]+0.4*temp_G_1_edge[4]*nuVtSq[7]+0.5*temp_G_1_edge[0]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[4]+0.5000000000000001*temp_G_1_edge[2]*nuVtSq[4]+0.447213595499958*temp_G_1_edge[1]*nuVtSq[3]; - edge_G_1_incr[12] = 0.2857142857142857*nuVtSq[7]*temp_G_1_edge[20]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[20]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[12]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[12]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[12]+0.5*nuVtSq[0]*temp_G_1_edge[12]+0.4*nuVtSq[3]*temp_G_1_edge[11]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[8]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[8]+0.447213595499958*temp_G_1_edge[1]*nuVtSq[8]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[7]+0.5*temp_G_1_edge[0]*nuVtSq[7]+0.4*temp_G_1_edge[4]*nuVtSq[6]+0.5000000000000001*temp_G_1_edge[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[4]+0.447213595499958*temp_G_1_edge[2]*nuVtSq[3]; - edge_G_1_incr[13] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[18]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[17]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[17]+0.5*nuVtSq[8]*temp_G_1_edge[14]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[13]+0.5*nuVtSq[0]*temp_G_1_edge[13]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[10]+0.5*nuVtSq[6]*temp_G_1_edge[6]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[5]+0.5000000000000001*temp_G_1_edge[3]*nuVtSq[4]; - edge_G_1_incr[14] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[23]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[18]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[17]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[14]+0.5*nuVtSq[0]*temp_G_1_edge[14]+0.5*nuVtSq[8]*temp_G_1_edge[13]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[10]+0.5*temp_G_1_edge[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[6]+0.5000000000000001*temp_G_1_edge[3]*nuVtSq[5]; - edge_G_1_incr[15] = 0.4472135954999579*nuVtSq[7]*temp_G_1_edge[26]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[25]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[25]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[24]+0.5*nuVtSq[7]*temp_G_1_edge[22]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[21]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[19]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[19]+0.5*nuVtSq[3]*temp_G_1_edge[16]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[15]+0.5*nuVtSq[0]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[9]; - edge_G_1_incr[16] = 0.4472135954999579*nuVtSq[6]*temp_G_1_edge[26]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[25]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[24]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[24]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[22]+0.5*nuVtSq[6]*temp_G_1_edge[21]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[19]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[16]+0.5*nuVtSq[0]*temp_G_1_edge[16]+0.5*nuVtSq[3]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[9]; - edge_G_1_incr[17] = 0.2857142857142858*nuVtSq[6]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[23]+0.4*nuVtSq[3]*temp_G_1_edge[18]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[17]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[17]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[17]+0.5*nuVtSq[0]*temp_G_1_edge[17]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[14]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[13]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[13]+0.4*nuVtSq[7]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[10]+0.4472135954999579*temp_G_1_edge[6]*nuVtSq[8]+0.5*nuVtSq[4]*temp_G_1_edge[6]+0.5000000000000001*temp_G_1_edge[3]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[5]; - edge_G_1_incr[18] = 0.2857142857142858*nuVtSq[7]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[23]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[18]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[18]+0.5*nuVtSq[0]*temp_G_1_edge[18]+0.4*nuVtSq[3]*temp_G_1_edge[17]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[14]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[14]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[13]+0.4*nuVtSq[6]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[10]+0.4472135954999579*temp_G_1_edge[5]*nuVtSq[8]+0.5000000000000001*temp_G_1_edge[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[6]+0.5*nuVtSq[5]*temp_G_1_edge[5]; - edge_G_1_incr[19] = 0.4*nuVtSq[3]*temp_G_1_edge[26]+0.4*nuVtSq[6]*temp_G_1_edge[25]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[25]+0.4*nuVtSq[7]*temp_G_1_edge[24]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[24]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[22]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[21]+0.4*nuVtSq[8]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[19]+0.5*nuVtSq[0]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[16]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[16]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[15]+0.5*nuVtSq[3]*temp_G_1_edge[9]; - edge_G_1_incr[20] = 0.2040816326530612*nuVtSq[8]*temp_G_1_edge[20]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[20]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[20]+0.5*nuVtSq[0]*temp_G_1_edge[20]+0.2857142857142857*nuVtSq[7]*temp_G_1_edge[12]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[12]+0.2857142857142857*nuVtSq[6]*temp_G_1_edge[11]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[11]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[8]+0.5*nuVtSq[4]*temp_G_1_edge[8]+0.31943828249997*temp_G_1_edge[7]*nuVtSq[8]+0.5*temp_G_1_edge[0]*nuVtSq[8]+0.5*nuVtSq[5]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[1]*nuVtSq[7]+0.447213595499958*temp_G_1_edge[2]*nuVtSq[6]+0.4*nuVtSq[3]*temp_G_1_edge[4]; - edge_G_1_incr[21] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[26]+0.5*nuVtSq[5]*temp_G_1_edge[26]+0.447213595499958*nuVtSq[7]*temp_G_1_edge[25]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[24]+0.5*nuVtSq[2]*temp_G_1_edge[24]+0.5*nuVtSq[8]*temp_G_1_edge[22]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[21]+0.5*nuVtSq[0]*temp_G_1_edge[21]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[19]+0.5*nuVtSq[6]*temp_G_1_edge[16]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[15]+0.5*nuVtSq[4]*temp_G_1_edge[9]; - edge_G_1_incr[22] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[26]+0.5*nuVtSq[4]*temp_G_1_edge[26]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[25]+0.5*nuVtSq[1]*temp_G_1_edge[25]+0.447213595499958*nuVtSq[6]*temp_G_1_edge[24]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[22]+0.5*nuVtSq[0]*temp_G_1_edge[22]+0.5*nuVtSq[8]*temp_G_1_edge[21]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[19]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[16]+0.5*nuVtSq[7]*temp_G_1_edge[15]+0.5*nuVtSq[5]*temp_G_1_edge[9]; - edge_G_1_incr[23] = 0.2040816326530612*nuVtSq[8]*temp_G_1_edge[23]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[23]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[23]+0.5*nuVtSq[0]*temp_G_1_edge[23]+0.2857142857142858*nuVtSq[7]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[18]+0.2857142857142858*nuVtSq[6]*temp_G_1_edge[17]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[17]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[14]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[14]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[13]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[13]+0.4*nuVtSq[3]*temp_G_1_edge[10]+0.5*temp_G_1_edge[3]*nuVtSq[8]+0.447213595499958*temp_G_1_edge[5]*nuVtSq[7]+0.447213595499958*nuVtSq[6]*temp_G_1_edge[6]; - edge_G_1_incr[24] = 0.2857142857142858*nuVtSq[6]*temp_G_1_edge[26]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[26]+0.4*nuVtSq[3]*temp_G_1_edge[25]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[24]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[24]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[24]+0.5*nuVtSq[0]*temp_G_1_edge[24]+0.447213595499958*nuVtSq[6]*temp_G_1_edge[22]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[21]+0.5*nuVtSq[2]*temp_G_1_edge[21]+0.4*nuVtSq[7]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[19]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[16]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[16]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[6]*temp_G_1_edge[9]; - edge_G_1_incr[25] = 0.2857142857142858*nuVtSq[7]*temp_G_1_edge[26]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[26]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[25]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[25]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[25]+0.5*nuVtSq[0]*temp_G_1_edge[25]+0.4*nuVtSq[3]*temp_G_1_edge[24]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[22]+0.5*nuVtSq[1]*temp_G_1_edge[22]+0.447213595499958*nuVtSq[7]*temp_G_1_edge[21]+0.4*nuVtSq[6]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[19]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[16]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[7]*temp_G_1_edge[9]; - edge_G_1_incr[26] = 0.2040816326530612*nuVtSq[8]*temp_G_1_edge[26]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[26]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[26]+0.5*nuVtSq[0]*temp_G_1_edge[26]+0.2857142857142858*nuVtSq[7]*temp_G_1_edge[25]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[25]+0.2857142857142858*nuVtSq[6]*temp_G_1_edge[24]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[24]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[22]+0.5*nuVtSq[4]*temp_G_1_edge[22]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[21]+0.5*nuVtSq[5]*temp_G_1_edge[21]+0.4*nuVtSq[3]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[16]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[15]+0.5*nuVtSq[8]*temp_G_1_edge[9]; + edge_F_0_incr[0] = 0.5*nuVtSqSum[8]*temp_F_0_edge[20]+0.5*nuVtSqSum[7]*temp_F_0_edge[12]+0.5*nuVtSqSum[6]*temp_F_0_edge[11]+0.5*nuVtSqSum[5]*temp_F_0_edge[8]+0.5*nuVtSqSum[4]*temp_F_0_edge[7]+0.5*nuVtSqSum[3]*temp_F_0_edge[4]+0.5*nuVtSqSum[2]*temp_F_0_edge[2]+0.5*nuVtSqSum[1]*temp_F_0_edge[1]+0.5*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[20]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[12]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[12]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_edge[8]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[4]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_F_0_edge[4]+0.4472135954999579*temp_F_0_edge[1]*nuVtSqSum[4]+0.5*temp_F_0_edge[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_edge[1]+0.5*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[20]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[12]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[11]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[8]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[4]*nuVtSqSum[7]+0.4472135954999579*temp_F_0_edge[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*temp_F_0_edge[4]+0.5*temp_F_0_edge[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_edge[2]+0.5*temp_F_0_edge[0]*nuVtSqSum[2]; + edge_F_0_incr[3] = 0.5*nuVtSqSum[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_edge[18]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_edge[17]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[14]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[13]+0.5*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*nuVtSqSum[2]*temp_F_0_edge[6]+0.5*nuVtSqSum[1]*temp_F_0_edge[5]+0.5*nuVtSqSum[0]*temp_F_0_edge[3]; + edge_F_0_incr[4] = 0.4*nuVtSqSum[3]*temp_F_0_edge[20]+0.4*nuVtSqSum[6]*temp_F_0_edge[12]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[12]+0.4*nuVtSqSum[7]*temp_F_0_edge[11]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[11]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[8]+0.4*temp_F_0_edge[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[2]*nuVtSqSum[7]+0.447213595499958*temp_F_0_edge[1]*nuVtSqSum[6]+0.4472135954999579*temp_F_0_edge[4]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[4]+0.5*nuVtSqSum[0]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_F_0_edge[2]+0.5*temp_F_0_edge[1]*nuVtSqSum[2]; + edge_F_0_incr[5] = 0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[8]*temp_F_0_edge[18]+0.5*nuVtSqSum[5]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[17]+0.5*nuVtSqSum[7]*temp_F_0_edge[14]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[13]+0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[10]+0.5*nuVtSqSum[2]*temp_F_0_edge[10]+0.5*nuVtSqSum[3]*temp_F_0_edge[6]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[5]+0.5*nuVtSqSum[0]*temp_F_0_edge[5]+0.5*nuVtSqSum[1]*temp_F_0_edge[3]; + edge_F_0_incr[6] = 0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[8]*temp_F_0_edge[17]+0.5*nuVtSqSum[4]*temp_F_0_edge[17]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[14]+0.5*nuVtSqSum[6]*temp_F_0_edge[13]+0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[10]+0.5*nuVtSqSum[1]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[6]+0.5*nuVtSqSum[0]*temp_F_0_edge[6]+0.5*nuVtSqSum[3]*temp_F_0_edge[5]+0.5*nuVtSqSum[2]*temp_F_0_edge[3]; + edge_F_0_incr[7] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[20]+0.5*nuVtSqSum[5]*temp_F_0_edge[20]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[12]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[11]+0.5*nuVtSqSum[8]*temp_F_0_edge[8]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[7]+0.5*nuVtSqSum[0]*temp_F_0_edge[7]+0.5000000000000001*temp_F_0_edge[2]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[1]; + edge_F_0_incr[8] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[20]+0.5*nuVtSqSum[4]*temp_F_0_edge[20]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[12]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[12]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[11]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[8]+0.5*nuVtSqSum[0]*temp_F_0_edge[8]+0.5*temp_F_0_edge[7]*nuVtSqSum[8]+0.5000000000000001*temp_F_0_edge[1]*nuVtSqSum[7]+0.5*temp_F_0_edge[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[4]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[2]; + edge_F_0_incr[9] = 0.5*nuVtSqSum[8]*temp_F_0_edge[26]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_edge[25]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_edge[24]+0.5*nuVtSqSum[5]*temp_F_0_edge[22]+0.5*nuVtSqSum[4]*temp_F_0_edge[21]+0.5*nuVtSqSum[3]*temp_F_0_edge[19]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[16]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[15]+0.5*nuVtSqSum[0]*temp_F_0_edge[9]; + edge_F_0_incr[10] = 0.4*nuVtSqSum[3]*temp_F_0_edge[23]+0.4*nuVtSqSum[6]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[18]+0.4*nuVtSqSum[7]*temp_F_0_edge[17]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[17]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[14]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[13]+0.4*nuVtSqSum[8]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[10]+0.5*nuVtSqSum[0]*temp_F_0_edge[10]+0.447213595499958*temp_F_0_edge[6]*nuVtSqSum[7]+0.5*nuVtSqSum[1]*temp_F_0_edge[6]+0.447213595499958*temp_F_0_edge[5]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_F_0_edge[5]+0.5*nuVtSqSum[3]*temp_F_0_edge[3]; + edge_F_0_incr[11] = 0.2857142857142857*nuVtSqSum[6]*temp_F_0_edge[20]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[20]+0.4*nuVtSqSum[3]*temp_F_0_edge[12]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[11]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[11]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[11]+0.5*nuVtSqSum[0]*temp_F_0_edge[11]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[8]+0.447213595499958*temp_F_0_edge[2]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[7]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[7]+0.4*temp_F_0_edge[4]*nuVtSqSum[7]+0.5*temp_F_0_edge[0]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[4]+0.5000000000000001*temp_F_0_edge[2]*nuVtSqSum[4]+0.447213595499958*temp_F_0_edge[1]*nuVtSqSum[3]; + edge_F_0_incr[12] = 0.2857142857142857*nuVtSqSum[7]*temp_F_0_edge[20]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[20]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[12]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[12]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[12]+0.5*nuVtSqSum[0]*temp_F_0_edge[12]+0.4*nuVtSqSum[3]*temp_F_0_edge[11]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[8]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[8]+0.447213595499958*temp_F_0_edge[1]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[7]+0.5*temp_F_0_edge[0]*nuVtSqSum[7]+0.4*temp_F_0_edge[4]*nuVtSqSum[6]+0.5000000000000001*temp_F_0_edge[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[4]+0.447213595499958*temp_F_0_edge[2]*nuVtSqSum[3]; + edge_F_0_incr[13] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[18]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[17]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[17]+0.5*nuVtSqSum[8]*temp_F_0_edge[14]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[13]+0.5*nuVtSqSum[0]*temp_F_0_edge[13]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*nuVtSqSum[6]*temp_F_0_edge[6]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[5]+0.5000000000000001*temp_F_0_edge[3]*nuVtSqSum[4]; + edge_F_0_incr[14] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[23]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[18]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[17]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[14]+0.5*nuVtSqSum[0]*temp_F_0_edge[14]+0.5*nuVtSqSum[8]*temp_F_0_edge[13]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*temp_F_0_edge[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[6]+0.5000000000000001*temp_F_0_edge[3]*nuVtSqSum[5]; + edge_F_0_incr[15] = 0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[26]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[25]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[25]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[24]+0.5*nuVtSqSum[7]*temp_F_0_edge[22]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[21]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[19]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[19]+0.5*nuVtSqSum[3]*temp_F_0_edge[16]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[15]+0.5*nuVtSqSum[0]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[9]; + edge_F_0_incr[16] = 0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[26]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[25]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[24]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[24]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[22]+0.5*nuVtSqSum[6]*temp_F_0_edge[21]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[19]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[16]+0.5*nuVtSqSum[0]*temp_F_0_edge[16]+0.5*nuVtSqSum[3]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[9]; + edge_F_0_incr[17] = 0.2857142857142858*nuVtSqSum[6]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[23]+0.4*nuVtSqSum[3]*temp_F_0_edge[18]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[17]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[17]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[17]+0.5*nuVtSqSum[0]*temp_F_0_edge[17]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[14]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[13]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[13]+0.4*nuVtSqSum[7]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[10]+0.4472135954999579*temp_F_0_edge[6]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*temp_F_0_edge[6]+0.5000000000000001*temp_F_0_edge[3]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[5]; + edge_F_0_incr[18] = 0.2857142857142858*nuVtSqSum[7]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[23]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[18]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[18]+0.5*nuVtSqSum[0]*temp_F_0_edge[18]+0.4*nuVtSqSum[3]*temp_F_0_edge[17]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[14]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[14]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[13]+0.4*nuVtSqSum[6]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[10]+0.4472135954999579*temp_F_0_edge[5]*nuVtSqSum[8]+0.5000000000000001*temp_F_0_edge[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[6]+0.5*nuVtSqSum[5]*temp_F_0_edge[5]; + edge_F_0_incr[19] = 0.4*nuVtSqSum[3]*temp_F_0_edge[26]+0.4*nuVtSqSum[6]*temp_F_0_edge[25]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[25]+0.4*nuVtSqSum[7]*temp_F_0_edge[24]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[24]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[22]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[21]+0.4*nuVtSqSum[8]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[19]+0.5*nuVtSqSum[0]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[16]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[16]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[15]+0.5*nuVtSqSum[3]*temp_F_0_edge[9]; + edge_F_0_incr[20] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_edge[20]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[20]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[20]+0.5*nuVtSqSum[0]*temp_F_0_edge[20]+0.2857142857142857*nuVtSqSum[7]*temp_F_0_edge[12]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[12]+0.2857142857142857*nuVtSqSum[6]*temp_F_0_edge[11]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[11]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[8]+0.5*nuVtSqSum[4]*temp_F_0_edge[8]+0.31943828249997*temp_F_0_edge[7]*nuVtSqSum[8]+0.5*temp_F_0_edge[0]*nuVtSqSum[8]+0.5*nuVtSqSum[5]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[1]*nuVtSqSum[7]+0.447213595499958*temp_F_0_edge[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*temp_F_0_edge[4]; + edge_F_0_incr[21] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[26]+0.5*nuVtSqSum[5]*temp_F_0_edge[26]+0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[25]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[24]+0.5*nuVtSqSum[2]*temp_F_0_edge[24]+0.5*nuVtSqSum[8]*temp_F_0_edge[22]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[21]+0.5*nuVtSqSum[0]*temp_F_0_edge[21]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[19]+0.5*nuVtSqSum[6]*temp_F_0_edge[16]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[15]+0.5*nuVtSqSum[4]*temp_F_0_edge[9]; + edge_F_0_incr[22] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[26]+0.5*nuVtSqSum[4]*temp_F_0_edge[26]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[25]+0.5*nuVtSqSum[1]*temp_F_0_edge[25]+0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[24]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[22]+0.5*nuVtSqSum[0]*temp_F_0_edge[22]+0.5*nuVtSqSum[8]*temp_F_0_edge[21]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[19]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[16]+0.5*nuVtSqSum[7]*temp_F_0_edge[15]+0.5*nuVtSqSum[5]*temp_F_0_edge[9]; + edge_F_0_incr[23] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_edge[23]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[23]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[23]+0.5*nuVtSqSum[0]*temp_F_0_edge[23]+0.2857142857142858*nuVtSqSum[7]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[18]+0.2857142857142858*nuVtSqSum[6]*temp_F_0_edge[17]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[17]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[14]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[14]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[13]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[13]+0.4*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*temp_F_0_edge[3]*nuVtSqSum[8]+0.447213595499958*temp_F_0_edge[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[6]; + edge_F_0_incr[24] = 0.2857142857142858*nuVtSqSum[6]*temp_F_0_edge[26]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[26]+0.4*nuVtSqSum[3]*temp_F_0_edge[25]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[24]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[24]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[24]+0.5*nuVtSqSum[0]*temp_F_0_edge[24]+0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[22]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[21]+0.5*nuVtSqSum[2]*temp_F_0_edge[21]+0.4*nuVtSqSum[7]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[19]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[16]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[16]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_edge[9]; + edge_F_0_incr[25] = 0.2857142857142858*nuVtSqSum[7]*temp_F_0_edge[26]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[26]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[25]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[25]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[25]+0.5*nuVtSqSum[0]*temp_F_0_edge[25]+0.4*nuVtSqSum[3]*temp_F_0_edge[24]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[22]+0.5*nuVtSqSum[1]*temp_F_0_edge[22]+0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[21]+0.4*nuVtSqSum[6]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[19]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[16]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_edge[9]; + edge_F_0_incr[26] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_edge[26]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[26]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[26]+0.5*nuVtSqSum[0]*temp_F_0_edge[26]+0.2857142857142858*nuVtSqSum[7]*temp_F_0_edge[25]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[25]+0.2857142857142858*nuVtSqSum[6]*temp_F_0_edge[24]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[24]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[22]+0.5*nuVtSqSum[4]*temp_F_0_edge[22]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[21]+0.5*nuVtSqSum[5]*temp_F_0_edge[21]+0.4*nuVtSqSum[3]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[16]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[15]+0.5*nuVtSqSum[8]*temp_F_0_edge[9]; + edge_G_1_incr[0] = 0.5*nuVtSqSum[8]*temp_G_1_edge[20]+0.5*nuVtSqSum[7]*temp_G_1_edge[12]+0.5*nuVtSqSum[6]*temp_G_1_edge[11]+0.5*nuVtSqSum[5]*temp_G_1_edge[8]+0.5*nuVtSqSum[4]*temp_G_1_edge[7]+0.5*nuVtSqSum[3]*temp_G_1_edge[4]+0.5*nuVtSqSum[2]*temp_G_1_edge[2]+0.5*nuVtSqSum[1]*temp_G_1_edge[1]+0.5*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[20]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[12]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[12]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_edge[8]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[4]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_G_1_edge[4]+0.4472135954999579*temp_G_1_edge[1]*nuVtSqSum[4]+0.5*temp_G_1_edge[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_edge[1]+0.5*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[20]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[12]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[11]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[8]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[4]*nuVtSqSum[7]+0.4472135954999579*temp_G_1_edge[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*temp_G_1_edge[4]+0.5*temp_G_1_edge[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_edge[2]+0.5*temp_G_1_edge[0]*nuVtSqSum[2]; + edge_G_1_incr[3] = 0.5*nuVtSqSum[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_edge[18]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_edge[17]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[14]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[13]+0.5*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*nuVtSqSum[2]*temp_G_1_edge[6]+0.5*nuVtSqSum[1]*temp_G_1_edge[5]+0.5*nuVtSqSum[0]*temp_G_1_edge[3]; + edge_G_1_incr[4] = 0.4*nuVtSqSum[3]*temp_G_1_edge[20]+0.4*nuVtSqSum[6]*temp_G_1_edge[12]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[12]+0.4*nuVtSqSum[7]*temp_G_1_edge[11]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[11]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[8]+0.4*temp_G_1_edge[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[2]*nuVtSqSum[7]+0.447213595499958*temp_G_1_edge[1]*nuVtSqSum[6]+0.4472135954999579*temp_G_1_edge[4]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[4]+0.5*nuVtSqSum[0]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_G_1_edge[2]+0.5*temp_G_1_edge[1]*nuVtSqSum[2]; + edge_G_1_incr[5] = 0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[8]*temp_G_1_edge[18]+0.5*nuVtSqSum[5]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[17]+0.5*nuVtSqSum[7]*temp_G_1_edge[14]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[13]+0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[10]+0.5*nuVtSqSum[2]*temp_G_1_edge[10]+0.5*nuVtSqSum[3]*temp_G_1_edge[6]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[5]+0.5*nuVtSqSum[0]*temp_G_1_edge[5]+0.5*nuVtSqSum[1]*temp_G_1_edge[3]; + edge_G_1_incr[6] = 0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[8]*temp_G_1_edge[17]+0.5*nuVtSqSum[4]*temp_G_1_edge[17]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[14]+0.5*nuVtSqSum[6]*temp_G_1_edge[13]+0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[10]+0.5*nuVtSqSum[1]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[6]+0.5*nuVtSqSum[0]*temp_G_1_edge[6]+0.5*nuVtSqSum[3]*temp_G_1_edge[5]+0.5*nuVtSqSum[2]*temp_G_1_edge[3]; + edge_G_1_incr[7] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[20]+0.5*nuVtSqSum[5]*temp_G_1_edge[20]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[12]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[11]+0.5*nuVtSqSum[8]*temp_G_1_edge[8]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[7]+0.5*nuVtSqSum[0]*temp_G_1_edge[7]+0.5000000000000001*temp_G_1_edge[2]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[1]; + edge_G_1_incr[8] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[20]+0.5*nuVtSqSum[4]*temp_G_1_edge[20]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[12]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[12]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[11]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[8]+0.5*nuVtSqSum[0]*temp_G_1_edge[8]+0.5*temp_G_1_edge[7]*nuVtSqSum[8]+0.5000000000000001*temp_G_1_edge[1]*nuVtSqSum[7]+0.5*temp_G_1_edge[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[4]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[2]; + edge_G_1_incr[9] = 0.5*nuVtSqSum[8]*temp_G_1_edge[26]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_edge[25]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_edge[24]+0.5*nuVtSqSum[5]*temp_G_1_edge[22]+0.5*nuVtSqSum[4]*temp_G_1_edge[21]+0.5*nuVtSqSum[3]*temp_G_1_edge[19]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[16]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[15]+0.5*nuVtSqSum[0]*temp_G_1_edge[9]; + edge_G_1_incr[10] = 0.4*nuVtSqSum[3]*temp_G_1_edge[23]+0.4*nuVtSqSum[6]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[18]+0.4*nuVtSqSum[7]*temp_G_1_edge[17]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[17]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[14]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[13]+0.4*nuVtSqSum[8]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[10]+0.5*nuVtSqSum[0]*temp_G_1_edge[10]+0.447213595499958*temp_G_1_edge[6]*nuVtSqSum[7]+0.5*nuVtSqSum[1]*temp_G_1_edge[6]+0.447213595499958*temp_G_1_edge[5]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_G_1_edge[5]+0.5*nuVtSqSum[3]*temp_G_1_edge[3]; + edge_G_1_incr[11] = 0.2857142857142857*nuVtSqSum[6]*temp_G_1_edge[20]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[20]+0.4*nuVtSqSum[3]*temp_G_1_edge[12]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[11]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[11]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[11]+0.5*nuVtSqSum[0]*temp_G_1_edge[11]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[8]+0.447213595499958*temp_G_1_edge[2]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[7]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[7]+0.4*temp_G_1_edge[4]*nuVtSqSum[7]+0.5*temp_G_1_edge[0]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[4]+0.5000000000000001*temp_G_1_edge[2]*nuVtSqSum[4]+0.447213595499958*temp_G_1_edge[1]*nuVtSqSum[3]; + edge_G_1_incr[12] = 0.2857142857142857*nuVtSqSum[7]*temp_G_1_edge[20]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[20]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[12]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[12]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[12]+0.5*nuVtSqSum[0]*temp_G_1_edge[12]+0.4*nuVtSqSum[3]*temp_G_1_edge[11]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[8]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[8]+0.447213595499958*temp_G_1_edge[1]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[7]+0.5*temp_G_1_edge[0]*nuVtSqSum[7]+0.4*temp_G_1_edge[4]*nuVtSqSum[6]+0.5000000000000001*temp_G_1_edge[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[4]+0.447213595499958*temp_G_1_edge[2]*nuVtSqSum[3]; + edge_G_1_incr[13] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[18]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[17]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[17]+0.5*nuVtSqSum[8]*temp_G_1_edge[14]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[13]+0.5*nuVtSqSum[0]*temp_G_1_edge[13]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*nuVtSqSum[6]*temp_G_1_edge[6]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[5]+0.5000000000000001*temp_G_1_edge[3]*nuVtSqSum[4]; + edge_G_1_incr[14] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[23]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[18]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[17]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[14]+0.5*nuVtSqSum[0]*temp_G_1_edge[14]+0.5*nuVtSqSum[8]*temp_G_1_edge[13]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*temp_G_1_edge[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[6]+0.5000000000000001*temp_G_1_edge[3]*nuVtSqSum[5]; + edge_G_1_incr[15] = 0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[26]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[25]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[25]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[24]+0.5*nuVtSqSum[7]*temp_G_1_edge[22]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[21]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[19]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[19]+0.5*nuVtSqSum[3]*temp_G_1_edge[16]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[15]+0.5*nuVtSqSum[0]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[9]; + edge_G_1_incr[16] = 0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[26]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[25]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[24]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[24]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[22]+0.5*nuVtSqSum[6]*temp_G_1_edge[21]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[19]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[16]+0.5*nuVtSqSum[0]*temp_G_1_edge[16]+0.5*nuVtSqSum[3]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[9]; + edge_G_1_incr[17] = 0.2857142857142858*nuVtSqSum[6]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[23]+0.4*nuVtSqSum[3]*temp_G_1_edge[18]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[17]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[17]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[17]+0.5*nuVtSqSum[0]*temp_G_1_edge[17]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[14]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[13]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[13]+0.4*nuVtSqSum[7]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[10]+0.4472135954999579*temp_G_1_edge[6]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*temp_G_1_edge[6]+0.5000000000000001*temp_G_1_edge[3]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[5]; + edge_G_1_incr[18] = 0.2857142857142858*nuVtSqSum[7]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[23]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[18]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[18]+0.5*nuVtSqSum[0]*temp_G_1_edge[18]+0.4*nuVtSqSum[3]*temp_G_1_edge[17]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[14]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[14]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[13]+0.4*nuVtSqSum[6]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[10]+0.4472135954999579*temp_G_1_edge[5]*nuVtSqSum[8]+0.5000000000000001*temp_G_1_edge[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[6]+0.5*nuVtSqSum[5]*temp_G_1_edge[5]; + edge_G_1_incr[19] = 0.4*nuVtSqSum[3]*temp_G_1_edge[26]+0.4*nuVtSqSum[6]*temp_G_1_edge[25]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[25]+0.4*nuVtSqSum[7]*temp_G_1_edge[24]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[24]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[22]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[21]+0.4*nuVtSqSum[8]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[19]+0.5*nuVtSqSum[0]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[16]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[16]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[15]+0.5*nuVtSqSum[3]*temp_G_1_edge[9]; + edge_G_1_incr[20] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_edge[20]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[20]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[20]+0.5*nuVtSqSum[0]*temp_G_1_edge[20]+0.2857142857142857*nuVtSqSum[7]*temp_G_1_edge[12]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[12]+0.2857142857142857*nuVtSqSum[6]*temp_G_1_edge[11]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[11]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[8]+0.5*nuVtSqSum[4]*temp_G_1_edge[8]+0.31943828249997*temp_G_1_edge[7]*nuVtSqSum[8]+0.5*temp_G_1_edge[0]*nuVtSqSum[8]+0.5*nuVtSqSum[5]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[1]*nuVtSqSum[7]+0.447213595499958*temp_G_1_edge[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*temp_G_1_edge[4]; + edge_G_1_incr[21] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[26]+0.5*nuVtSqSum[5]*temp_G_1_edge[26]+0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[25]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[24]+0.5*nuVtSqSum[2]*temp_G_1_edge[24]+0.5*nuVtSqSum[8]*temp_G_1_edge[22]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[21]+0.5*nuVtSqSum[0]*temp_G_1_edge[21]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[19]+0.5*nuVtSqSum[6]*temp_G_1_edge[16]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[15]+0.5*nuVtSqSum[4]*temp_G_1_edge[9]; + edge_G_1_incr[22] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[26]+0.5*nuVtSqSum[4]*temp_G_1_edge[26]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[25]+0.5*nuVtSqSum[1]*temp_G_1_edge[25]+0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[24]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[22]+0.5*nuVtSqSum[0]*temp_G_1_edge[22]+0.5*nuVtSqSum[8]*temp_G_1_edge[21]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[19]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[16]+0.5*nuVtSqSum[7]*temp_G_1_edge[15]+0.5*nuVtSqSum[5]*temp_G_1_edge[9]; + edge_G_1_incr[23] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_edge[23]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[23]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[23]+0.5*nuVtSqSum[0]*temp_G_1_edge[23]+0.2857142857142858*nuVtSqSum[7]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[18]+0.2857142857142858*nuVtSqSum[6]*temp_G_1_edge[17]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[17]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[14]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[14]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[13]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[13]+0.4*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*temp_G_1_edge[3]*nuVtSqSum[8]+0.447213595499958*temp_G_1_edge[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[6]; + edge_G_1_incr[24] = 0.2857142857142858*nuVtSqSum[6]*temp_G_1_edge[26]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[26]+0.4*nuVtSqSum[3]*temp_G_1_edge[25]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[24]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[24]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[24]+0.5*nuVtSqSum[0]*temp_G_1_edge[24]+0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[22]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[21]+0.5*nuVtSqSum[2]*temp_G_1_edge[21]+0.4*nuVtSqSum[7]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[19]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[16]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[16]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_edge[9]; + edge_G_1_incr[25] = 0.2857142857142858*nuVtSqSum[7]*temp_G_1_edge[26]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[26]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[25]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[25]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[25]+0.5*nuVtSqSum[0]*temp_G_1_edge[25]+0.4*nuVtSqSum[3]*temp_G_1_edge[24]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[22]+0.5*nuVtSqSum[1]*temp_G_1_edge[22]+0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[21]+0.4*nuVtSqSum[6]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[19]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[16]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_edge[9]; + edge_G_1_incr[26] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_edge[26]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[26]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[26]+0.5*nuVtSqSum[0]*temp_G_1_edge[26]+0.2857142857142858*nuVtSqSum[7]*temp_G_1_edge[25]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[25]+0.2857142857142858*nuVtSqSum[6]*temp_G_1_edge[24]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[24]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[22]+0.5*nuVtSqSum[4]*temp_G_1_edge[22]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[21]+0.5*nuVtSqSum[5]*temp_G_1_edge[21]+0.4*nuVtSqSum[3]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[16]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[15]+0.5*nuVtSqSum[8]*temp_G_1_edge[9]; } else { @@ -344,115 +347,115 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_2x1v_tensor_p2(const do temp_G_1_edge[25] = (-7.5*G_1Skin[25])-5.809475019311125*G_1Skin[18]-3.354101966249684*G_1Skin[12]; temp_G_1_edge[26] = (-7.5*G_1Skin[26])-5.809475019311125*G_1Skin[23]-3.354101966249685*G_1Skin[20]; - diff_F_0_incr[0] = 0.5*nuVtSq[8]*temp_F_0_diff[20]+0.5*nuVtSq[7]*temp_F_0_diff[12]+0.5*nuVtSq[6]*temp_F_0_diff[11]+0.5*nuVtSq[5]*temp_F_0_diff[8]+0.5*nuVtSq[4]*temp_F_0_diff[7]+0.5*nuVtSq[3]*temp_F_0_diff[4]+0.5*nuVtSq[2]*temp_F_0_diff[2]+0.5*nuVtSq[1]*temp_F_0_diff[1]+0.5*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.447213595499958*nuVtSq[7]*temp_F_0_diff[20]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[12]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[12]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[7]*temp_F_0_diff[8]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[4]*nuVtSq[6]+0.5*nuVtSq[2]*temp_F_0_diff[4]+0.4472135954999579*temp_F_0_diff[1]*nuVtSq[4]+0.5*temp_F_0_diff[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_diff[1]+0.5*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.447213595499958*nuVtSq[6]*temp_F_0_diff[20]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[12]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[11]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[8]+0.5000000000000001*nuVtSq[6]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[4]*nuVtSq[7]+0.4472135954999579*temp_F_0_diff[2]*nuVtSq[5]+0.5*nuVtSq[1]*temp_F_0_diff[4]+0.5*temp_F_0_diff[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_diff[2]+0.5*temp_F_0_diff[0]*nuVtSq[2]; - diff_F_0_incr[3] = 0.5*nuVtSq[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSq[7]*temp_F_0_diff[18]+0.5000000000000001*nuVtSq[6]*temp_F_0_diff[17]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[14]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[13]+0.5*nuVtSq[3]*temp_F_0_diff[10]+0.5*nuVtSq[2]*temp_F_0_diff[6]+0.5*nuVtSq[1]*temp_F_0_diff[5]+0.5*nuVtSq[0]*temp_F_0_diff[3]; - diff_F_0_incr[4] = 0.4*nuVtSq[3]*temp_F_0_diff[20]+0.4*nuVtSq[6]*temp_F_0_diff[12]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[12]+0.4*nuVtSq[7]*temp_F_0_diff[11]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[11]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[8]+0.4*temp_F_0_diff[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[2]*nuVtSq[7]+0.447213595499958*temp_F_0_diff[1]*nuVtSq[6]+0.4472135954999579*temp_F_0_diff[4]*nuVtSq[5]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[4]+0.5*nuVtSq[0]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_F_0_diff[2]+0.5*temp_F_0_diff[1]*nuVtSq[2]; - diff_F_0_incr[5] = 0.447213595499958*nuVtSq[7]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[8]*temp_F_0_diff[18]+0.5*nuVtSq[5]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[17]+0.5*nuVtSq[7]*temp_F_0_diff[14]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[13]+0.447213595499958*nuVtSq[6]*temp_F_0_diff[10]+0.5*nuVtSq[2]*temp_F_0_diff[10]+0.5*nuVtSq[3]*temp_F_0_diff[6]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[5]+0.5*nuVtSq[0]*temp_F_0_diff[5]+0.5*nuVtSq[1]*temp_F_0_diff[3]; - diff_F_0_incr[6] = 0.447213595499958*nuVtSq[6]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[8]*temp_F_0_diff[17]+0.5*nuVtSq[4]*temp_F_0_diff[17]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[14]+0.5*nuVtSq[6]*temp_F_0_diff[13]+0.447213595499958*nuVtSq[7]*temp_F_0_diff[10]+0.5*nuVtSq[1]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[6]+0.5*nuVtSq[0]*temp_F_0_diff[6]+0.5*nuVtSq[3]*temp_F_0_diff[5]+0.5*nuVtSq[2]*temp_F_0_diff[3]; - diff_F_0_incr[7] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[20]+0.5*nuVtSq[5]*temp_F_0_diff[20]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[12]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[11]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[11]+0.5*nuVtSq[8]*temp_F_0_diff[8]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[7]+0.5*nuVtSq[0]*temp_F_0_diff[7]+0.5000000000000001*temp_F_0_diff[2]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[1]; - diff_F_0_incr[8] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[20]+0.5*nuVtSq[4]*temp_F_0_diff[20]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[12]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[12]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[11]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[8]+0.5*nuVtSq[0]*temp_F_0_diff[8]+0.5*temp_F_0_diff[7]*nuVtSq[8]+0.5000000000000001*temp_F_0_diff[1]*nuVtSq[7]+0.5*temp_F_0_diff[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[4]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[2]; - diff_F_0_incr[9] = 0.5*nuVtSq[8]*temp_F_0_diff[26]+0.5000000000000001*nuVtSq[7]*temp_F_0_diff[25]+0.5000000000000001*nuVtSq[6]*temp_F_0_diff[24]+0.5*nuVtSq[5]*temp_F_0_diff[22]+0.5*nuVtSq[4]*temp_F_0_diff[21]+0.5*nuVtSq[3]*temp_F_0_diff[19]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[16]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[15]+0.5*nuVtSq[0]*temp_F_0_diff[9]; - diff_F_0_incr[10] = 0.4*nuVtSq[3]*temp_F_0_diff[23]+0.4*nuVtSq[6]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[18]+0.4*nuVtSq[7]*temp_F_0_diff[17]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[17]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[14]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[13]+0.4*nuVtSq[8]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[10]+0.5*nuVtSq[0]*temp_F_0_diff[10]+0.447213595499958*temp_F_0_diff[6]*nuVtSq[7]+0.5*nuVtSq[1]*temp_F_0_diff[6]+0.447213595499958*temp_F_0_diff[5]*nuVtSq[6]+0.5*nuVtSq[2]*temp_F_0_diff[5]+0.5*nuVtSq[3]*temp_F_0_diff[3]; - diff_F_0_incr[11] = 0.2857142857142857*nuVtSq[6]*temp_F_0_diff[20]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[20]+0.4*nuVtSq[3]*temp_F_0_diff[12]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[11]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[11]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[11]+0.5*nuVtSq[0]*temp_F_0_diff[11]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[8]+0.447213595499958*temp_F_0_diff[2]*nuVtSq[8]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[7]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[7]+0.4*temp_F_0_diff[4]*nuVtSq[7]+0.5*temp_F_0_diff[0]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[4]+0.5000000000000001*temp_F_0_diff[2]*nuVtSq[4]+0.447213595499958*temp_F_0_diff[1]*nuVtSq[3]; - diff_F_0_incr[12] = 0.2857142857142857*nuVtSq[7]*temp_F_0_diff[20]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[20]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[12]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[12]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[12]+0.5*nuVtSq[0]*temp_F_0_diff[12]+0.4*nuVtSq[3]*temp_F_0_diff[11]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[8]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[8]+0.447213595499958*temp_F_0_diff[1]*nuVtSq[8]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[7]+0.5*temp_F_0_diff[0]*nuVtSq[7]+0.4*temp_F_0_diff[4]*nuVtSq[6]+0.5000000000000001*temp_F_0_diff[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[4]+0.447213595499958*temp_F_0_diff[2]*nuVtSq[3]; - diff_F_0_incr[13] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[18]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[17]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[17]+0.5*nuVtSq[8]*temp_F_0_diff[14]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[13]+0.5*nuVtSq[0]*temp_F_0_diff[13]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[10]+0.5*nuVtSq[6]*temp_F_0_diff[6]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[5]+0.5000000000000001*temp_F_0_diff[3]*nuVtSq[4]; - diff_F_0_incr[14] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[23]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[18]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[17]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[14]+0.5*nuVtSq[0]*temp_F_0_diff[14]+0.5*nuVtSq[8]*temp_F_0_diff[13]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[10]+0.5*temp_F_0_diff[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[6]+0.5000000000000001*temp_F_0_diff[3]*nuVtSq[5]; - diff_F_0_incr[15] = 0.4472135954999579*nuVtSq[7]*temp_F_0_diff[26]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[25]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[25]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[24]+0.5*nuVtSq[7]*temp_F_0_diff[22]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[21]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[19]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[19]+0.5*nuVtSq[3]*temp_F_0_diff[16]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[15]+0.5*nuVtSq[0]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[9]; - diff_F_0_incr[16] = 0.4472135954999579*nuVtSq[6]*temp_F_0_diff[26]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[25]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[24]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[24]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[22]+0.5*nuVtSq[6]*temp_F_0_diff[21]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[19]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[16]+0.5*nuVtSq[0]*temp_F_0_diff[16]+0.5*nuVtSq[3]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[9]; - diff_F_0_incr[17] = 0.2857142857142858*nuVtSq[6]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[23]+0.4*nuVtSq[3]*temp_F_0_diff[18]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[17]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[17]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[17]+0.5*nuVtSq[0]*temp_F_0_diff[17]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[14]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[13]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[13]+0.4*nuVtSq[7]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[10]+0.4472135954999579*temp_F_0_diff[6]*nuVtSq[8]+0.5*nuVtSq[4]*temp_F_0_diff[6]+0.5000000000000001*temp_F_0_diff[3]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[5]; - diff_F_0_incr[18] = 0.2857142857142858*nuVtSq[7]*temp_F_0_diff[23]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[23]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[18]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[18]+0.5*nuVtSq[0]*temp_F_0_diff[18]+0.4*nuVtSq[3]*temp_F_0_diff[17]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[14]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[14]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[13]+0.4*nuVtSq[6]*temp_F_0_diff[10]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[10]+0.4472135954999579*temp_F_0_diff[5]*nuVtSq[8]+0.5000000000000001*temp_F_0_diff[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[6]+0.5*nuVtSq[5]*temp_F_0_diff[5]; - diff_F_0_incr[19] = 0.4*nuVtSq[3]*temp_F_0_diff[26]+0.4*nuVtSq[6]*temp_F_0_diff[25]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[25]+0.4*nuVtSq[7]*temp_F_0_diff[24]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[24]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[22]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[21]+0.4*nuVtSq[8]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[19]+0.5*nuVtSq[0]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[16]+0.5000000000000001*nuVtSq[1]*temp_F_0_diff[16]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[2]*temp_F_0_diff[15]+0.5*nuVtSq[3]*temp_F_0_diff[9]; - diff_F_0_incr[20] = 0.2040816326530612*nuVtSq[8]*temp_F_0_diff[20]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[20]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[20]+0.5*nuVtSq[0]*temp_F_0_diff[20]+0.2857142857142857*nuVtSq[7]*temp_F_0_diff[12]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[12]+0.2857142857142857*nuVtSq[6]*temp_F_0_diff[11]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[11]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[8]+0.5*nuVtSq[4]*temp_F_0_diff[8]+0.31943828249997*temp_F_0_diff[7]*nuVtSq[8]+0.5*temp_F_0_diff[0]*nuVtSq[8]+0.5*nuVtSq[5]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[1]*nuVtSq[7]+0.447213595499958*temp_F_0_diff[2]*nuVtSq[6]+0.4*nuVtSq[3]*temp_F_0_diff[4]; - diff_F_0_incr[21] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[26]+0.5*nuVtSq[5]*temp_F_0_diff[26]+0.447213595499958*nuVtSq[7]*temp_F_0_diff[25]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[24]+0.5*nuVtSq[2]*temp_F_0_diff[24]+0.5*nuVtSq[8]*temp_F_0_diff[22]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[21]+0.5*nuVtSq[0]*temp_F_0_diff[21]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[19]+0.5*nuVtSq[6]*temp_F_0_diff[16]+0.447213595499958*nuVtSq[1]*temp_F_0_diff[15]+0.5*nuVtSq[4]*temp_F_0_diff[9]; - diff_F_0_incr[22] = 0.31943828249997*nuVtSq[8]*temp_F_0_diff[26]+0.5*nuVtSq[4]*temp_F_0_diff[26]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[25]+0.5*nuVtSq[1]*temp_F_0_diff[25]+0.447213595499958*nuVtSq[6]*temp_F_0_diff[24]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[22]+0.5*nuVtSq[0]*temp_F_0_diff[22]+0.5*nuVtSq[8]*temp_F_0_diff[21]+0.4472135954999579*nuVtSq[3]*temp_F_0_diff[19]+0.447213595499958*nuVtSq[2]*temp_F_0_diff[16]+0.5*nuVtSq[7]*temp_F_0_diff[15]+0.5*nuVtSq[5]*temp_F_0_diff[9]; - diff_F_0_incr[23] = 0.2040816326530612*nuVtSq[8]*temp_F_0_diff[23]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[23]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[23]+0.5*nuVtSq[0]*temp_F_0_diff[23]+0.2857142857142858*nuVtSq[7]*temp_F_0_diff[18]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[18]+0.2857142857142858*nuVtSq[6]*temp_F_0_diff[17]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[17]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[14]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[14]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[13]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[13]+0.4*nuVtSq[3]*temp_F_0_diff[10]+0.5*temp_F_0_diff[3]*nuVtSq[8]+0.447213595499958*temp_F_0_diff[5]*nuVtSq[7]+0.447213595499958*nuVtSq[6]*temp_F_0_diff[6]; - diff_F_0_incr[24] = 0.2857142857142858*nuVtSq[6]*temp_F_0_diff[26]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[26]+0.4*nuVtSq[3]*temp_F_0_diff[25]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[24]+0.4472135954999579*nuVtSq[5]*temp_F_0_diff[24]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[24]+0.5*nuVtSq[0]*temp_F_0_diff[24]+0.447213595499958*nuVtSq[6]*temp_F_0_diff[22]+0.31943828249997*nuVtSq[6]*temp_F_0_diff[21]+0.5*nuVtSq[2]*temp_F_0_diff[21]+0.4*nuVtSq[7]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[19]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[16]+0.5000000000000001*nuVtSq[4]*temp_F_0_diff[16]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[6]*temp_F_0_diff[9]; - diff_F_0_incr[25] = 0.2857142857142858*nuVtSq[7]*temp_F_0_diff[26]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[26]+0.2857142857142857*nuVtSq[8]*temp_F_0_diff[25]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[25]+0.4472135954999579*nuVtSq[4]*temp_F_0_diff[25]+0.5*nuVtSq[0]*temp_F_0_diff[25]+0.4*nuVtSq[3]*temp_F_0_diff[24]+0.31943828249997*nuVtSq[7]*temp_F_0_diff[22]+0.5*nuVtSq[1]*temp_F_0_diff[22]+0.447213595499958*nuVtSq[7]*temp_F_0_diff[21]+0.4*nuVtSq[6]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[19]+0.447213595499958*nuVtSq[3]*temp_F_0_diff[16]+0.447213595499958*nuVtSq[8]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[5]*temp_F_0_diff[15]+0.5000000000000001*nuVtSq[7]*temp_F_0_diff[9]; - diff_F_0_incr[26] = 0.2040816326530612*nuVtSq[8]*temp_F_0_diff[26]+0.31943828249997*nuVtSq[5]*temp_F_0_diff[26]+0.31943828249997*nuVtSq[4]*temp_F_0_diff[26]+0.5*nuVtSq[0]*temp_F_0_diff[26]+0.2857142857142858*nuVtSq[7]*temp_F_0_diff[25]+0.4472135954999579*nuVtSq[1]*temp_F_0_diff[25]+0.2857142857142858*nuVtSq[6]*temp_F_0_diff[24]+0.4472135954999579*nuVtSq[2]*temp_F_0_diff[24]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[22]+0.5*nuVtSq[4]*temp_F_0_diff[22]+0.31943828249997*nuVtSq[8]*temp_F_0_diff[21]+0.5*nuVtSq[5]*temp_F_0_diff[21]+0.4*nuVtSq[3]*temp_F_0_diff[19]+0.4472135954999579*nuVtSq[6]*temp_F_0_diff[16]+0.4472135954999579*nuVtSq[7]*temp_F_0_diff[15]+0.5*nuVtSq[8]*temp_F_0_diff[9]; - diff_G_1_incr[0] = 0.5*nuVtSq[8]*temp_G_1_diff[20]+0.5*nuVtSq[7]*temp_G_1_diff[12]+0.5*nuVtSq[6]*temp_G_1_diff[11]+0.5*nuVtSq[5]*temp_G_1_diff[8]+0.5*nuVtSq[4]*temp_G_1_diff[7]+0.5*nuVtSq[3]*temp_G_1_diff[4]+0.5*nuVtSq[2]*temp_G_1_diff[2]+0.5*nuVtSq[1]*temp_G_1_diff[1]+0.5*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.447213595499958*nuVtSq[7]*temp_G_1_diff[20]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[12]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[12]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[7]*temp_G_1_diff[8]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[4]*nuVtSq[6]+0.5*nuVtSq[2]*temp_G_1_diff[4]+0.4472135954999579*temp_G_1_diff[1]*nuVtSq[4]+0.5*temp_G_1_diff[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_diff[1]+0.5*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.447213595499958*nuVtSq[6]*temp_G_1_diff[20]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[12]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[11]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[8]+0.5000000000000001*nuVtSq[6]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[4]*nuVtSq[7]+0.4472135954999579*temp_G_1_diff[2]*nuVtSq[5]+0.5*nuVtSq[1]*temp_G_1_diff[4]+0.5*temp_G_1_diff[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_diff[2]+0.5*temp_G_1_diff[0]*nuVtSq[2]; - diff_G_1_incr[3] = 0.5*nuVtSq[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSq[7]*temp_G_1_diff[18]+0.5000000000000001*nuVtSq[6]*temp_G_1_diff[17]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[14]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[13]+0.5*nuVtSq[3]*temp_G_1_diff[10]+0.5*nuVtSq[2]*temp_G_1_diff[6]+0.5*nuVtSq[1]*temp_G_1_diff[5]+0.5*nuVtSq[0]*temp_G_1_diff[3]; - diff_G_1_incr[4] = 0.4*nuVtSq[3]*temp_G_1_diff[20]+0.4*nuVtSq[6]*temp_G_1_diff[12]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[12]+0.4*nuVtSq[7]*temp_G_1_diff[11]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[11]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[8]+0.4*temp_G_1_diff[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[2]*nuVtSq[7]+0.447213595499958*temp_G_1_diff[1]*nuVtSq[6]+0.4472135954999579*temp_G_1_diff[4]*nuVtSq[5]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[4]+0.5*nuVtSq[0]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_G_1_diff[2]+0.5*temp_G_1_diff[1]*nuVtSq[2]; - diff_G_1_incr[5] = 0.447213595499958*nuVtSq[7]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[8]*temp_G_1_diff[18]+0.5*nuVtSq[5]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[17]+0.5*nuVtSq[7]*temp_G_1_diff[14]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[13]+0.447213595499958*nuVtSq[6]*temp_G_1_diff[10]+0.5*nuVtSq[2]*temp_G_1_diff[10]+0.5*nuVtSq[3]*temp_G_1_diff[6]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[5]+0.5*nuVtSq[0]*temp_G_1_diff[5]+0.5*nuVtSq[1]*temp_G_1_diff[3]; - diff_G_1_incr[6] = 0.447213595499958*nuVtSq[6]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[8]*temp_G_1_diff[17]+0.5*nuVtSq[4]*temp_G_1_diff[17]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[14]+0.5*nuVtSq[6]*temp_G_1_diff[13]+0.447213595499958*nuVtSq[7]*temp_G_1_diff[10]+0.5*nuVtSq[1]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[6]+0.5*nuVtSq[0]*temp_G_1_diff[6]+0.5*nuVtSq[3]*temp_G_1_diff[5]+0.5*nuVtSq[2]*temp_G_1_diff[3]; - diff_G_1_incr[7] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[20]+0.5*nuVtSq[5]*temp_G_1_diff[20]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[12]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[11]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[11]+0.5*nuVtSq[8]*temp_G_1_diff[8]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[7]+0.5*nuVtSq[0]*temp_G_1_diff[7]+0.5000000000000001*temp_G_1_diff[2]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[1]; - diff_G_1_incr[8] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[20]+0.5*nuVtSq[4]*temp_G_1_diff[20]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[12]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[12]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[11]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[8]+0.5*nuVtSq[0]*temp_G_1_diff[8]+0.5*temp_G_1_diff[7]*nuVtSq[8]+0.5000000000000001*temp_G_1_diff[1]*nuVtSq[7]+0.5*temp_G_1_diff[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[4]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[2]; - diff_G_1_incr[9] = 0.5*nuVtSq[8]*temp_G_1_diff[26]+0.5000000000000001*nuVtSq[7]*temp_G_1_diff[25]+0.5000000000000001*nuVtSq[6]*temp_G_1_diff[24]+0.5*nuVtSq[5]*temp_G_1_diff[22]+0.5*nuVtSq[4]*temp_G_1_diff[21]+0.5*nuVtSq[3]*temp_G_1_diff[19]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[16]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[15]+0.5*nuVtSq[0]*temp_G_1_diff[9]; - diff_G_1_incr[10] = 0.4*nuVtSq[3]*temp_G_1_diff[23]+0.4*nuVtSq[6]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[18]+0.4*nuVtSq[7]*temp_G_1_diff[17]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[17]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[14]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[13]+0.4*nuVtSq[8]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[10]+0.5*nuVtSq[0]*temp_G_1_diff[10]+0.447213595499958*temp_G_1_diff[6]*nuVtSq[7]+0.5*nuVtSq[1]*temp_G_1_diff[6]+0.447213595499958*temp_G_1_diff[5]*nuVtSq[6]+0.5*nuVtSq[2]*temp_G_1_diff[5]+0.5*nuVtSq[3]*temp_G_1_diff[3]; - diff_G_1_incr[11] = 0.2857142857142857*nuVtSq[6]*temp_G_1_diff[20]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[20]+0.4*nuVtSq[3]*temp_G_1_diff[12]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[11]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[11]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[11]+0.5*nuVtSq[0]*temp_G_1_diff[11]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[8]+0.447213595499958*temp_G_1_diff[2]*nuVtSq[8]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[7]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[7]+0.4*temp_G_1_diff[4]*nuVtSq[7]+0.5*temp_G_1_diff[0]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[4]+0.5000000000000001*temp_G_1_diff[2]*nuVtSq[4]+0.447213595499958*temp_G_1_diff[1]*nuVtSq[3]; - diff_G_1_incr[12] = 0.2857142857142857*nuVtSq[7]*temp_G_1_diff[20]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[20]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[12]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[12]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[12]+0.5*nuVtSq[0]*temp_G_1_diff[12]+0.4*nuVtSq[3]*temp_G_1_diff[11]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[8]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[8]+0.447213595499958*temp_G_1_diff[1]*nuVtSq[8]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[7]+0.5*temp_G_1_diff[0]*nuVtSq[7]+0.4*temp_G_1_diff[4]*nuVtSq[6]+0.5000000000000001*temp_G_1_diff[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[4]+0.447213595499958*temp_G_1_diff[2]*nuVtSq[3]; - diff_G_1_incr[13] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[18]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[17]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[17]+0.5*nuVtSq[8]*temp_G_1_diff[14]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[13]+0.5*nuVtSq[0]*temp_G_1_diff[13]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[10]+0.5*nuVtSq[6]*temp_G_1_diff[6]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[5]+0.5000000000000001*temp_G_1_diff[3]*nuVtSq[4]; - diff_G_1_incr[14] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[23]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[18]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[17]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[14]+0.5*nuVtSq[0]*temp_G_1_diff[14]+0.5*nuVtSq[8]*temp_G_1_diff[13]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[10]+0.5*temp_G_1_diff[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[6]+0.5000000000000001*temp_G_1_diff[3]*nuVtSq[5]; - diff_G_1_incr[15] = 0.4472135954999579*nuVtSq[7]*temp_G_1_diff[26]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[25]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[25]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[24]+0.5*nuVtSq[7]*temp_G_1_diff[22]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[21]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[19]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[19]+0.5*nuVtSq[3]*temp_G_1_diff[16]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[15]+0.5*nuVtSq[0]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[9]; - diff_G_1_incr[16] = 0.4472135954999579*nuVtSq[6]*temp_G_1_diff[26]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[25]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[24]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[24]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[22]+0.5*nuVtSq[6]*temp_G_1_diff[21]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[19]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[16]+0.5*nuVtSq[0]*temp_G_1_diff[16]+0.5*nuVtSq[3]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[9]; - diff_G_1_incr[17] = 0.2857142857142858*nuVtSq[6]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[23]+0.4*nuVtSq[3]*temp_G_1_diff[18]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[17]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[17]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[17]+0.5*nuVtSq[0]*temp_G_1_diff[17]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[14]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[13]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[13]+0.4*nuVtSq[7]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[10]+0.4472135954999579*temp_G_1_diff[6]*nuVtSq[8]+0.5*nuVtSq[4]*temp_G_1_diff[6]+0.5000000000000001*temp_G_1_diff[3]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[5]; - diff_G_1_incr[18] = 0.2857142857142858*nuVtSq[7]*temp_G_1_diff[23]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[23]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[18]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[18]+0.5*nuVtSq[0]*temp_G_1_diff[18]+0.4*nuVtSq[3]*temp_G_1_diff[17]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[14]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[14]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[13]+0.4*nuVtSq[6]*temp_G_1_diff[10]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[10]+0.4472135954999579*temp_G_1_diff[5]*nuVtSq[8]+0.5000000000000001*temp_G_1_diff[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[6]+0.5*nuVtSq[5]*temp_G_1_diff[5]; - diff_G_1_incr[19] = 0.4*nuVtSq[3]*temp_G_1_diff[26]+0.4*nuVtSq[6]*temp_G_1_diff[25]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[25]+0.4*nuVtSq[7]*temp_G_1_diff[24]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[24]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[22]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[21]+0.4*nuVtSq[8]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[19]+0.5*nuVtSq[0]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[16]+0.5000000000000001*nuVtSq[1]*temp_G_1_diff[16]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[2]*temp_G_1_diff[15]+0.5*nuVtSq[3]*temp_G_1_diff[9]; - diff_G_1_incr[20] = 0.2040816326530612*nuVtSq[8]*temp_G_1_diff[20]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[20]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[20]+0.5*nuVtSq[0]*temp_G_1_diff[20]+0.2857142857142857*nuVtSq[7]*temp_G_1_diff[12]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[12]+0.2857142857142857*nuVtSq[6]*temp_G_1_diff[11]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[11]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[8]+0.5*nuVtSq[4]*temp_G_1_diff[8]+0.31943828249997*temp_G_1_diff[7]*nuVtSq[8]+0.5*temp_G_1_diff[0]*nuVtSq[8]+0.5*nuVtSq[5]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[1]*nuVtSq[7]+0.447213595499958*temp_G_1_diff[2]*nuVtSq[6]+0.4*nuVtSq[3]*temp_G_1_diff[4]; - diff_G_1_incr[21] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[26]+0.5*nuVtSq[5]*temp_G_1_diff[26]+0.447213595499958*nuVtSq[7]*temp_G_1_diff[25]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[24]+0.5*nuVtSq[2]*temp_G_1_diff[24]+0.5*nuVtSq[8]*temp_G_1_diff[22]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[21]+0.5*nuVtSq[0]*temp_G_1_diff[21]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[19]+0.5*nuVtSq[6]*temp_G_1_diff[16]+0.447213595499958*nuVtSq[1]*temp_G_1_diff[15]+0.5*nuVtSq[4]*temp_G_1_diff[9]; - diff_G_1_incr[22] = 0.31943828249997*nuVtSq[8]*temp_G_1_diff[26]+0.5*nuVtSq[4]*temp_G_1_diff[26]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[25]+0.5*nuVtSq[1]*temp_G_1_diff[25]+0.447213595499958*nuVtSq[6]*temp_G_1_diff[24]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[22]+0.5*nuVtSq[0]*temp_G_1_diff[22]+0.5*nuVtSq[8]*temp_G_1_diff[21]+0.4472135954999579*nuVtSq[3]*temp_G_1_diff[19]+0.447213595499958*nuVtSq[2]*temp_G_1_diff[16]+0.5*nuVtSq[7]*temp_G_1_diff[15]+0.5*nuVtSq[5]*temp_G_1_diff[9]; - diff_G_1_incr[23] = 0.2040816326530612*nuVtSq[8]*temp_G_1_diff[23]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[23]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[23]+0.5*nuVtSq[0]*temp_G_1_diff[23]+0.2857142857142858*nuVtSq[7]*temp_G_1_diff[18]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[18]+0.2857142857142858*nuVtSq[6]*temp_G_1_diff[17]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[17]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[14]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[14]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[13]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[13]+0.4*nuVtSq[3]*temp_G_1_diff[10]+0.5*temp_G_1_diff[3]*nuVtSq[8]+0.447213595499958*temp_G_1_diff[5]*nuVtSq[7]+0.447213595499958*nuVtSq[6]*temp_G_1_diff[6]; - diff_G_1_incr[24] = 0.2857142857142858*nuVtSq[6]*temp_G_1_diff[26]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[26]+0.4*nuVtSq[3]*temp_G_1_diff[25]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[24]+0.4472135954999579*nuVtSq[5]*temp_G_1_diff[24]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[24]+0.5*nuVtSq[0]*temp_G_1_diff[24]+0.447213595499958*nuVtSq[6]*temp_G_1_diff[22]+0.31943828249997*nuVtSq[6]*temp_G_1_diff[21]+0.5*nuVtSq[2]*temp_G_1_diff[21]+0.4*nuVtSq[7]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[19]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[16]+0.5000000000000001*nuVtSq[4]*temp_G_1_diff[16]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[6]*temp_G_1_diff[9]; - diff_G_1_incr[25] = 0.2857142857142858*nuVtSq[7]*temp_G_1_diff[26]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[26]+0.2857142857142857*nuVtSq[8]*temp_G_1_diff[25]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[25]+0.4472135954999579*nuVtSq[4]*temp_G_1_diff[25]+0.5*nuVtSq[0]*temp_G_1_diff[25]+0.4*nuVtSq[3]*temp_G_1_diff[24]+0.31943828249997*nuVtSq[7]*temp_G_1_diff[22]+0.5*nuVtSq[1]*temp_G_1_diff[22]+0.447213595499958*nuVtSq[7]*temp_G_1_diff[21]+0.4*nuVtSq[6]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[19]+0.447213595499958*nuVtSq[3]*temp_G_1_diff[16]+0.447213595499958*nuVtSq[8]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[5]*temp_G_1_diff[15]+0.5000000000000001*nuVtSq[7]*temp_G_1_diff[9]; - diff_G_1_incr[26] = 0.2040816326530612*nuVtSq[8]*temp_G_1_diff[26]+0.31943828249997*nuVtSq[5]*temp_G_1_diff[26]+0.31943828249997*nuVtSq[4]*temp_G_1_diff[26]+0.5*nuVtSq[0]*temp_G_1_diff[26]+0.2857142857142858*nuVtSq[7]*temp_G_1_diff[25]+0.4472135954999579*nuVtSq[1]*temp_G_1_diff[25]+0.2857142857142858*nuVtSq[6]*temp_G_1_diff[24]+0.4472135954999579*nuVtSq[2]*temp_G_1_diff[24]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[22]+0.5*nuVtSq[4]*temp_G_1_diff[22]+0.31943828249997*nuVtSq[8]*temp_G_1_diff[21]+0.5*nuVtSq[5]*temp_G_1_diff[21]+0.4*nuVtSq[3]*temp_G_1_diff[19]+0.4472135954999579*nuVtSq[6]*temp_G_1_diff[16]+0.4472135954999579*nuVtSq[7]*temp_G_1_diff[15]+0.5*nuVtSq[8]*temp_G_1_diff[9]; + diff_F_0_incr[0] = 0.5*nuVtSqSum[8]*temp_F_0_diff[20]+0.5*nuVtSqSum[7]*temp_F_0_diff[12]+0.5*nuVtSqSum[6]*temp_F_0_diff[11]+0.5*nuVtSqSum[5]*temp_F_0_diff[8]+0.5*nuVtSqSum[4]*temp_F_0_diff[7]+0.5*nuVtSqSum[3]*temp_F_0_diff[4]+0.5*nuVtSqSum[2]*temp_F_0_diff[2]+0.5*nuVtSqSum[1]*temp_F_0_diff[1]+0.5*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[20]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[12]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[12]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_diff[8]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[4]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_F_0_diff[4]+0.4472135954999579*temp_F_0_diff[1]*nuVtSqSum[4]+0.5*temp_F_0_diff[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_diff[1]+0.5*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[20]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[12]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[11]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[8]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[4]*nuVtSqSum[7]+0.4472135954999579*temp_F_0_diff[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*temp_F_0_diff[4]+0.5*temp_F_0_diff[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_diff[2]+0.5*temp_F_0_diff[0]*nuVtSqSum[2]; + diff_F_0_incr[3] = 0.5*nuVtSqSum[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_diff[18]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_diff[17]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[14]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[13]+0.5*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*nuVtSqSum[2]*temp_F_0_diff[6]+0.5*nuVtSqSum[1]*temp_F_0_diff[5]+0.5*nuVtSqSum[0]*temp_F_0_diff[3]; + diff_F_0_incr[4] = 0.4*nuVtSqSum[3]*temp_F_0_diff[20]+0.4*nuVtSqSum[6]*temp_F_0_diff[12]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[12]+0.4*nuVtSqSum[7]*temp_F_0_diff[11]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[11]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[8]+0.4*temp_F_0_diff[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[2]*nuVtSqSum[7]+0.447213595499958*temp_F_0_diff[1]*nuVtSqSum[6]+0.4472135954999579*temp_F_0_diff[4]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[4]+0.5*nuVtSqSum[0]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_F_0_diff[2]+0.5*temp_F_0_diff[1]*nuVtSqSum[2]; + diff_F_0_incr[5] = 0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[8]*temp_F_0_diff[18]+0.5*nuVtSqSum[5]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[17]+0.5*nuVtSqSum[7]*temp_F_0_diff[14]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[13]+0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[10]+0.5*nuVtSqSum[2]*temp_F_0_diff[10]+0.5*nuVtSqSum[3]*temp_F_0_diff[6]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[5]+0.5*nuVtSqSum[0]*temp_F_0_diff[5]+0.5*nuVtSqSum[1]*temp_F_0_diff[3]; + diff_F_0_incr[6] = 0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[8]*temp_F_0_diff[17]+0.5*nuVtSqSum[4]*temp_F_0_diff[17]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[14]+0.5*nuVtSqSum[6]*temp_F_0_diff[13]+0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[10]+0.5*nuVtSqSum[1]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[6]+0.5*nuVtSqSum[0]*temp_F_0_diff[6]+0.5*nuVtSqSum[3]*temp_F_0_diff[5]+0.5*nuVtSqSum[2]*temp_F_0_diff[3]; + diff_F_0_incr[7] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[20]+0.5*nuVtSqSum[5]*temp_F_0_diff[20]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[12]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[11]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[11]+0.5*nuVtSqSum[8]*temp_F_0_diff[8]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[7]+0.5*nuVtSqSum[0]*temp_F_0_diff[7]+0.5000000000000001*temp_F_0_diff[2]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[4]+0.5*temp_F_0_diff[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[1]; + diff_F_0_incr[8] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[20]+0.5*nuVtSqSum[4]*temp_F_0_diff[20]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[12]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[12]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[11]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[8]+0.5*nuVtSqSum[0]*temp_F_0_diff[8]+0.5*temp_F_0_diff[7]*nuVtSqSum[8]+0.5000000000000001*temp_F_0_diff[1]*nuVtSqSum[7]+0.5*temp_F_0_diff[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[4]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[2]; + diff_F_0_incr[9] = 0.5*nuVtSqSum[8]*temp_F_0_diff[26]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_diff[25]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_diff[24]+0.5*nuVtSqSum[5]*temp_F_0_diff[22]+0.5*nuVtSqSum[4]*temp_F_0_diff[21]+0.5*nuVtSqSum[3]*temp_F_0_diff[19]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[16]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[15]+0.5*nuVtSqSum[0]*temp_F_0_diff[9]; + diff_F_0_incr[10] = 0.4*nuVtSqSum[3]*temp_F_0_diff[23]+0.4*nuVtSqSum[6]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[18]+0.4*nuVtSqSum[7]*temp_F_0_diff[17]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[17]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[14]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[13]+0.4*nuVtSqSum[8]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[10]+0.5*nuVtSqSum[0]*temp_F_0_diff[10]+0.447213595499958*temp_F_0_diff[6]*nuVtSqSum[7]+0.5*nuVtSqSum[1]*temp_F_0_diff[6]+0.447213595499958*temp_F_0_diff[5]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_F_0_diff[5]+0.5*nuVtSqSum[3]*temp_F_0_diff[3]; + diff_F_0_incr[11] = 0.2857142857142857*nuVtSqSum[6]*temp_F_0_diff[20]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[20]+0.4*nuVtSqSum[3]*temp_F_0_diff[12]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[11]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[11]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[11]+0.5*nuVtSqSum[0]*temp_F_0_diff[11]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[8]+0.447213595499958*temp_F_0_diff[2]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[7]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[7]+0.4*temp_F_0_diff[4]*nuVtSqSum[7]+0.5*temp_F_0_diff[0]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[4]+0.5000000000000001*temp_F_0_diff[2]*nuVtSqSum[4]+0.447213595499958*temp_F_0_diff[1]*nuVtSqSum[3]; + diff_F_0_incr[12] = 0.2857142857142857*nuVtSqSum[7]*temp_F_0_diff[20]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[20]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[12]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[12]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[12]+0.5*nuVtSqSum[0]*temp_F_0_diff[12]+0.4*nuVtSqSum[3]*temp_F_0_diff[11]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[8]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[8]+0.447213595499958*temp_F_0_diff[1]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[7]+0.5*temp_F_0_diff[0]*nuVtSqSum[7]+0.4*temp_F_0_diff[4]*nuVtSqSum[6]+0.5000000000000001*temp_F_0_diff[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[4]+0.447213595499958*temp_F_0_diff[2]*nuVtSqSum[3]; + diff_F_0_incr[13] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[18]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[17]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[17]+0.5*nuVtSqSum[8]*temp_F_0_diff[14]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[13]+0.5*nuVtSqSum[0]*temp_F_0_diff[13]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*nuVtSqSum[6]*temp_F_0_diff[6]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[5]+0.5000000000000001*temp_F_0_diff[3]*nuVtSqSum[4]; + diff_F_0_incr[14] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[23]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[23]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[18]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[17]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[14]+0.5*nuVtSqSum[0]*temp_F_0_diff[14]+0.5*nuVtSqSum[8]*temp_F_0_diff[13]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*temp_F_0_diff[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[6]+0.5000000000000001*temp_F_0_diff[3]*nuVtSqSum[5]; + diff_F_0_incr[15] = 0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[26]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[25]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[25]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[24]+0.5*nuVtSqSum[7]*temp_F_0_diff[22]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[21]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[19]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[19]+0.5*nuVtSqSum[3]*temp_F_0_diff[16]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[15]+0.5*nuVtSqSum[0]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[9]; + diff_F_0_incr[16] = 0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[26]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[25]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[24]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[24]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[22]+0.5*nuVtSqSum[6]*temp_F_0_diff[21]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[19]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[16]+0.5*nuVtSqSum[0]*temp_F_0_diff[16]+0.5*nuVtSqSum[3]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[9]; + diff_F_0_incr[17] = 0.2857142857142858*nuVtSqSum[6]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[23]+0.4*nuVtSqSum[3]*temp_F_0_diff[18]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[17]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[17]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[17]+0.5*nuVtSqSum[0]*temp_F_0_diff[17]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[14]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[13]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[13]+0.4*nuVtSqSum[7]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[10]+0.4472135954999579*temp_F_0_diff[6]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*temp_F_0_diff[6]+0.5000000000000001*temp_F_0_diff[3]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[5]; + diff_F_0_incr[18] = 0.2857142857142858*nuVtSqSum[7]*temp_F_0_diff[23]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[23]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[18]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[18]+0.5*nuVtSqSum[0]*temp_F_0_diff[18]+0.4*nuVtSqSum[3]*temp_F_0_diff[17]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[14]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[14]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[13]+0.4*nuVtSqSum[6]*temp_F_0_diff[10]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[10]+0.4472135954999579*temp_F_0_diff[5]*nuVtSqSum[8]+0.5000000000000001*temp_F_0_diff[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[6]+0.5*nuVtSqSum[5]*temp_F_0_diff[5]; + diff_F_0_incr[19] = 0.4*nuVtSqSum[3]*temp_F_0_diff[26]+0.4*nuVtSqSum[6]*temp_F_0_diff[25]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[25]+0.4*nuVtSqSum[7]*temp_F_0_diff[24]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[24]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[22]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[21]+0.4*nuVtSqSum[8]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[19]+0.5*nuVtSqSum[0]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[16]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_diff[16]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_diff[15]+0.5*nuVtSqSum[3]*temp_F_0_diff[9]; + diff_F_0_incr[20] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_diff[20]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[20]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[20]+0.5*nuVtSqSum[0]*temp_F_0_diff[20]+0.2857142857142857*nuVtSqSum[7]*temp_F_0_diff[12]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[12]+0.2857142857142857*nuVtSqSum[6]*temp_F_0_diff[11]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[11]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[8]+0.5*nuVtSqSum[4]*temp_F_0_diff[8]+0.31943828249997*temp_F_0_diff[7]*nuVtSqSum[8]+0.5*temp_F_0_diff[0]*nuVtSqSum[8]+0.5*nuVtSqSum[5]*temp_F_0_diff[7]+0.447213595499958*temp_F_0_diff[1]*nuVtSqSum[7]+0.447213595499958*temp_F_0_diff[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*temp_F_0_diff[4]; + diff_F_0_incr[21] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[26]+0.5*nuVtSqSum[5]*temp_F_0_diff[26]+0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[25]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[24]+0.5*nuVtSqSum[2]*temp_F_0_diff[24]+0.5*nuVtSqSum[8]*temp_F_0_diff[22]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[21]+0.5*nuVtSqSum[0]*temp_F_0_diff[21]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[19]+0.5*nuVtSqSum[6]*temp_F_0_diff[16]+0.447213595499958*nuVtSqSum[1]*temp_F_0_diff[15]+0.5*nuVtSqSum[4]*temp_F_0_diff[9]; + diff_F_0_incr[22] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[26]+0.5*nuVtSqSum[4]*temp_F_0_diff[26]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[25]+0.5*nuVtSqSum[1]*temp_F_0_diff[25]+0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[24]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[22]+0.5*nuVtSqSum[0]*temp_F_0_diff[22]+0.5*nuVtSqSum[8]*temp_F_0_diff[21]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_diff[19]+0.447213595499958*nuVtSqSum[2]*temp_F_0_diff[16]+0.5*nuVtSqSum[7]*temp_F_0_diff[15]+0.5*nuVtSqSum[5]*temp_F_0_diff[9]; + diff_F_0_incr[23] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_diff[23]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[23]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[23]+0.5*nuVtSqSum[0]*temp_F_0_diff[23]+0.2857142857142858*nuVtSqSum[7]*temp_F_0_diff[18]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[18]+0.2857142857142858*nuVtSqSum[6]*temp_F_0_diff[17]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[17]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[14]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[14]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[13]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[13]+0.4*nuVtSqSum[3]*temp_F_0_diff[10]+0.5*temp_F_0_diff[3]*nuVtSqSum[8]+0.447213595499958*temp_F_0_diff[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[6]; + diff_F_0_incr[24] = 0.2857142857142858*nuVtSqSum[6]*temp_F_0_diff[26]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[26]+0.4*nuVtSqSum[3]*temp_F_0_diff[25]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[24]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_diff[24]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[24]+0.5*nuVtSqSum[0]*temp_F_0_diff[24]+0.447213595499958*nuVtSqSum[6]*temp_F_0_diff[22]+0.31943828249997*nuVtSqSum[6]*temp_F_0_diff[21]+0.5*nuVtSqSum[2]*temp_F_0_diff[21]+0.4*nuVtSqSum[7]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[19]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[16]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_diff[16]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_diff[9]; + diff_F_0_incr[25] = 0.2857142857142858*nuVtSqSum[7]*temp_F_0_diff[26]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[26]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_diff[25]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[25]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_diff[25]+0.5*nuVtSqSum[0]*temp_F_0_diff[25]+0.4*nuVtSqSum[3]*temp_F_0_diff[24]+0.31943828249997*nuVtSqSum[7]*temp_F_0_diff[22]+0.5*nuVtSqSum[1]*temp_F_0_diff[22]+0.447213595499958*nuVtSqSum[7]*temp_F_0_diff[21]+0.4*nuVtSqSum[6]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[19]+0.447213595499958*nuVtSqSum[3]*temp_F_0_diff[16]+0.447213595499958*nuVtSqSum[8]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_diff[15]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_diff[9]; + diff_F_0_incr[26] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_diff[26]+0.31943828249997*nuVtSqSum[5]*temp_F_0_diff[26]+0.31943828249997*nuVtSqSum[4]*temp_F_0_diff[26]+0.5*nuVtSqSum[0]*temp_F_0_diff[26]+0.2857142857142858*nuVtSqSum[7]*temp_F_0_diff[25]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_diff[25]+0.2857142857142858*nuVtSqSum[6]*temp_F_0_diff[24]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_diff[24]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[22]+0.5*nuVtSqSum[4]*temp_F_0_diff[22]+0.31943828249997*nuVtSqSum[8]*temp_F_0_diff[21]+0.5*nuVtSqSum[5]*temp_F_0_diff[21]+0.4*nuVtSqSum[3]*temp_F_0_diff[19]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_diff[16]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_diff[15]+0.5*nuVtSqSum[8]*temp_F_0_diff[9]; + diff_G_1_incr[0] = 0.5*nuVtSqSum[8]*temp_G_1_diff[20]+0.5*nuVtSqSum[7]*temp_G_1_diff[12]+0.5*nuVtSqSum[6]*temp_G_1_diff[11]+0.5*nuVtSqSum[5]*temp_G_1_diff[8]+0.5*nuVtSqSum[4]*temp_G_1_diff[7]+0.5*nuVtSqSum[3]*temp_G_1_diff[4]+0.5*nuVtSqSum[2]*temp_G_1_diff[2]+0.5*nuVtSqSum[1]*temp_G_1_diff[1]+0.5*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[20]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[12]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[12]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_diff[8]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[4]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_G_1_diff[4]+0.4472135954999579*temp_G_1_diff[1]*nuVtSqSum[4]+0.5*temp_G_1_diff[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_diff[1]+0.5*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[20]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[12]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[11]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[8]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[4]*nuVtSqSum[7]+0.4472135954999579*temp_G_1_diff[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*temp_G_1_diff[4]+0.5*temp_G_1_diff[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_diff[2]+0.5*temp_G_1_diff[0]*nuVtSqSum[2]; + diff_G_1_incr[3] = 0.5*nuVtSqSum[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_diff[18]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_diff[17]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[14]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[13]+0.5*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*nuVtSqSum[2]*temp_G_1_diff[6]+0.5*nuVtSqSum[1]*temp_G_1_diff[5]+0.5*nuVtSqSum[0]*temp_G_1_diff[3]; + diff_G_1_incr[4] = 0.4*nuVtSqSum[3]*temp_G_1_diff[20]+0.4*nuVtSqSum[6]*temp_G_1_diff[12]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[12]+0.4*nuVtSqSum[7]*temp_G_1_diff[11]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[11]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[8]+0.4*temp_G_1_diff[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[2]*nuVtSqSum[7]+0.447213595499958*temp_G_1_diff[1]*nuVtSqSum[6]+0.4472135954999579*temp_G_1_diff[4]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[4]+0.5*nuVtSqSum[0]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_G_1_diff[2]+0.5*temp_G_1_diff[1]*nuVtSqSum[2]; + diff_G_1_incr[5] = 0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[8]*temp_G_1_diff[18]+0.5*nuVtSqSum[5]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[17]+0.5*nuVtSqSum[7]*temp_G_1_diff[14]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[13]+0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[10]+0.5*nuVtSqSum[2]*temp_G_1_diff[10]+0.5*nuVtSqSum[3]*temp_G_1_diff[6]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[5]+0.5*nuVtSqSum[0]*temp_G_1_diff[5]+0.5*nuVtSqSum[1]*temp_G_1_diff[3]; + diff_G_1_incr[6] = 0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[8]*temp_G_1_diff[17]+0.5*nuVtSqSum[4]*temp_G_1_diff[17]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[14]+0.5*nuVtSqSum[6]*temp_G_1_diff[13]+0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[10]+0.5*nuVtSqSum[1]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[6]+0.5*nuVtSqSum[0]*temp_G_1_diff[6]+0.5*nuVtSqSum[3]*temp_G_1_diff[5]+0.5*nuVtSqSum[2]*temp_G_1_diff[3]; + diff_G_1_incr[7] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[20]+0.5*nuVtSqSum[5]*temp_G_1_diff[20]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[12]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[11]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[11]+0.5*nuVtSqSum[8]*temp_G_1_diff[8]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[7]+0.5*nuVtSqSum[0]*temp_G_1_diff[7]+0.5000000000000001*temp_G_1_diff[2]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[4]+0.5*temp_G_1_diff[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[1]; + diff_G_1_incr[8] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[20]+0.5*nuVtSqSum[4]*temp_G_1_diff[20]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[12]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[12]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[11]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[8]+0.5*nuVtSqSum[0]*temp_G_1_diff[8]+0.5*temp_G_1_diff[7]*nuVtSqSum[8]+0.5000000000000001*temp_G_1_diff[1]*nuVtSqSum[7]+0.5*temp_G_1_diff[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[4]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[2]; + diff_G_1_incr[9] = 0.5*nuVtSqSum[8]*temp_G_1_diff[26]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_diff[25]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_diff[24]+0.5*nuVtSqSum[5]*temp_G_1_diff[22]+0.5*nuVtSqSum[4]*temp_G_1_diff[21]+0.5*nuVtSqSum[3]*temp_G_1_diff[19]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[16]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[15]+0.5*nuVtSqSum[0]*temp_G_1_diff[9]; + diff_G_1_incr[10] = 0.4*nuVtSqSum[3]*temp_G_1_diff[23]+0.4*nuVtSqSum[6]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[18]+0.4*nuVtSqSum[7]*temp_G_1_diff[17]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[17]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[14]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[13]+0.4*nuVtSqSum[8]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[10]+0.5*nuVtSqSum[0]*temp_G_1_diff[10]+0.447213595499958*temp_G_1_diff[6]*nuVtSqSum[7]+0.5*nuVtSqSum[1]*temp_G_1_diff[6]+0.447213595499958*temp_G_1_diff[5]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_G_1_diff[5]+0.5*nuVtSqSum[3]*temp_G_1_diff[3]; + diff_G_1_incr[11] = 0.2857142857142857*nuVtSqSum[6]*temp_G_1_diff[20]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[20]+0.4*nuVtSqSum[3]*temp_G_1_diff[12]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[11]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[11]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[11]+0.5*nuVtSqSum[0]*temp_G_1_diff[11]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[8]+0.447213595499958*temp_G_1_diff[2]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[7]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[7]+0.4*temp_G_1_diff[4]*nuVtSqSum[7]+0.5*temp_G_1_diff[0]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[4]+0.5000000000000001*temp_G_1_diff[2]*nuVtSqSum[4]+0.447213595499958*temp_G_1_diff[1]*nuVtSqSum[3]; + diff_G_1_incr[12] = 0.2857142857142857*nuVtSqSum[7]*temp_G_1_diff[20]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[20]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[12]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[12]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[12]+0.5*nuVtSqSum[0]*temp_G_1_diff[12]+0.4*nuVtSqSum[3]*temp_G_1_diff[11]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[8]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[8]+0.447213595499958*temp_G_1_diff[1]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[7]+0.5*temp_G_1_diff[0]*nuVtSqSum[7]+0.4*temp_G_1_diff[4]*nuVtSqSum[6]+0.5000000000000001*temp_G_1_diff[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[4]+0.447213595499958*temp_G_1_diff[2]*nuVtSqSum[3]; + diff_G_1_incr[13] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[18]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[17]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[17]+0.5*nuVtSqSum[8]*temp_G_1_diff[14]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[13]+0.5*nuVtSqSum[0]*temp_G_1_diff[13]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*nuVtSqSum[6]*temp_G_1_diff[6]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[5]+0.5000000000000001*temp_G_1_diff[3]*nuVtSqSum[4]; + diff_G_1_incr[14] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[23]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[23]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[18]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[17]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[14]+0.5*nuVtSqSum[0]*temp_G_1_diff[14]+0.5*nuVtSqSum[8]*temp_G_1_diff[13]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*temp_G_1_diff[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[6]+0.5000000000000001*temp_G_1_diff[3]*nuVtSqSum[5]; + diff_G_1_incr[15] = 0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[26]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[25]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[25]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[24]+0.5*nuVtSqSum[7]*temp_G_1_diff[22]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[21]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[19]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[19]+0.5*nuVtSqSum[3]*temp_G_1_diff[16]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[15]+0.5*nuVtSqSum[0]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[9]; + diff_G_1_incr[16] = 0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[26]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[25]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[24]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[24]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[22]+0.5*nuVtSqSum[6]*temp_G_1_diff[21]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[19]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[16]+0.5*nuVtSqSum[0]*temp_G_1_diff[16]+0.5*nuVtSqSum[3]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[9]; + diff_G_1_incr[17] = 0.2857142857142858*nuVtSqSum[6]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[23]+0.4*nuVtSqSum[3]*temp_G_1_diff[18]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[17]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[17]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[17]+0.5*nuVtSqSum[0]*temp_G_1_diff[17]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[14]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[13]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[13]+0.4*nuVtSqSum[7]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[10]+0.4472135954999579*temp_G_1_diff[6]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*temp_G_1_diff[6]+0.5000000000000001*temp_G_1_diff[3]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[5]; + diff_G_1_incr[18] = 0.2857142857142858*nuVtSqSum[7]*temp_G_1_diff[23]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[23]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[18]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[18]+0.5*nuVtSqSum[0]*temp_G_1_diff[18]+0.4*nuVtSqSum[3]*temp_G_1_diff[17]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[14]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[14]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[13]+0.4*nuVtSqSum[6]*temp_G_1_diff[10]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[10]+0.4472135954999579*temp_G_1_diff[5]*nuVtSqSum[8]+0.5000000000000001*temp_G_1_diff[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[6]+0.5*nuVtSqSum[5]*temp_G_1_diff[5]; + diff_G_1_incr[19] = 0.4*nuVtSqSum[3]*temp_G_1_diff[26]+0.4*nuVtSqSum[6]*temp_G_1_diff[25]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[25]+0.4*nuVtSqSum[7]*temp_G_1_diff[24]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[24]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[22]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[21]+0.4*nuVtSqSum[8]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[19]+0.5*nuVtSqSum[0]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[16]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_diff[16]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_diff[15]+0.5*nuVtSqSum[3]*temp_G_1_diff[9]; + diff_G_1_incr[20] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_diff[20]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[20]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[20]+0.5*nuVtSqSum[0]*temp_G_1_diff[20]+0.2857142857142857*nuVtSqSum[7]*temp_G_1_diff[12]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[12]+0.2857142857142857*nuVtSqSum[6]*temp_G_1_diff[11]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[11]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[8]+0.5*nuVtSqSum[4]*temp_G_1_diff[8]+0.31943828249997*temp_G_1_diff[7]*nuVtSqSum[8]+0.5*temp_G_1_diff[0]*nuVtSqSum[8]+0.5*nuVtSqSum[5]*temp_G_1_diff[7]+0.447213595499958*temp_G_1_diff[1]*nuVtSqSum[7]+0.447213595499958*temp_G_1_diff[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*temp_G_1_diff[4]; + diff_G_1_incr[21] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[26]+0.5*nuVtSqSum[5]*temp_G_1_diff[26]+0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[25]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[24]+0.5*nuVtSqSum[2]*temp_G_1_diff[24]+0.5*nuVtSqSum[8]*temp_G_1_diff[22]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[21]+0.5*nuVtSqSum[0]*temp_G_1_diff[21]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[19]+0.5*nuVtSqSum[6]*temp_G_1_diff[16]+0.447213595499958*nuVtSqSum[1]*temp_G_1_diff[15]+0.5*nuVtSqSum[4]*temp_G_1_diff[9]; + diff_G_1_incr[22] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[26]+0.5*nuVtSqSum[4]*temp_G_1_diff[26]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[25]+0.5*nuVtSqSum[1]*temp_G_1_diff[25]+0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[24]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[22]+0.5*nuVtSqSum[0]*temp_G_1_diff[22]+0.5*nuVtSqSum[8]*temp_G_1_diff[21]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_diff[19]+0.447213595499958*nuVtSqSum[2]*temp_G_1_diff[16]+0.5*nuVtSqSum[7]*temp_G_1_diff[15]+0.5*nuVtSqSum[5]*temp_G_1_diff[9]; + diff_G_1_incr[23] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_diff[23]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[23]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[23]+0.5*nuVtSqSum[0]*temp_G_1_diff[23]+0.2857142857142858*nuVtSqSum[7]*temp_G_1_diff[18]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[18]+0.2857142857142858*nuVtSqSum[6]*temp_G_1_diff[17]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[17]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[14]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[14]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[13]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[13]+0.4*nuVtSqSum[3]*temp_G_1_diff[10]+0.5*temp_G_1_diff[3]*nuVtSqSum[8]+0.447213595499958*temp_G_1_diff[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[6]; + diff_G_1_incr[24] = 0.2857142857142858*nuVtSqSum[6]*temp_G_1_diff[26]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[26]+0.4*nuVtSqSum[3]*temp_G_1_diff[25]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[24]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_diff[24]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[24]+0.5*nuVtSqSum[0]*temp_G_1_diff[24]+0.447213595499958*nuVtSqSum[6]*temp_G_1_diff[22]+0.31943828249997*nuVtSqSum[6]*temp_G_1_diff[21]+0.5*nuVtSqSum[2]*temp_G_1_diff[21]+0.4*nuVtSqSum[7]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[19]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[16]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_diff[16]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_diff[9]; + diff_G_1_incr[25] = 0.2857142857142858*nuVtSqSum[7]*temp_G_1_diff[26]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[26]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_diff[25]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[25]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_diff[25]+0.5*nuVtSqSum[0]*temp_G_1_diff[25]+0.4*nuVtSqSum[3]*temp_G_1_diff[24]+0.31943828249997*nuVtSqSum[7]*temp_G_1_diff[22]+0.5*nuVtSqSum[1]*temp_G_1_diff[22]+0.447213595499958*nuVtSqSum[7]*temp_G_1_diff[21]+0.4*nuVtSqSum[6]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[19]+0.447213595499958*nuVtSqSum[3]*temp_G_1_diff[16]+0.447213595499958*nuVtSqSum[8]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_diff[15]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_diff[9]; + diff_G_1_incr[26] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_diff[26]+0.31943828249997*nuVtSqSum[5]*temp_G_1_diff[26]+0.31943828249997*nuVtSqSum[4]*temp_G_1_diff[26]+0.5*nuVtSqSum[0]*temp_G_1_diff[26]+0.2857142857142858*nuVtSqSum[7]*temp_G_1_diff[25]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_diff[25]+0.2857142857142858*nuVtSqSum[6]*temp_G_1_diff[24]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_diff[24]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[22]+0.5*nuVtSqSum[4]*temp_G_1_diff[22]+0.31943828249997*nuVtSqSum[8]*temp_G_1_diff[21]+0.5*nuVtSqSum[5]*temp_G_1_diff[21]+0.4*nuVtSqSum[3]*temp_G_1_diff[19]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_diff[16]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_diff[15]+0.5*nuVtSqSum[8]*temp_G_1_diff[9]; - edge_F_0_incr[0] = 0.5*nuVtSq[8]*temp_F_0_edge[20]+0.5*nuVtSq[7]*temp_F_0_edge[12]+0.5*nuVtSq[6]*temp_F_0_edge[11]+0.5*nuVtSq[5]*temp_F_0_edge[8]+0.5*nuVtSq[4]*temp_F_0_edge[7]+0.5*nuVtSq[3]*temp_F_0_edge[4]+0.5*nuVtSq[2]*temp_F_0_edge[2]+0.5*nuVtSq[1]*temp_F_0_edge[1]+0.5*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.447213595499958*nuVtSq[7]*temp_F_0_edge[20]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[12]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[12]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[7]*temp_F_0_edge[8]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[4]*nuVtSq[6]+0.5*nuVtSq[2]*temp_F_0_edge[4]+0.4472135954999579*temp_F_0_edge[1]*nuVtSq[4]+0.5*temp_F_0_edge[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_edge[1]+0.5*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.447213595499958*nuVtSq[6]*temp_F_0_edge[20]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[12]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[11]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[8]+0.5000000000000001*nuVtSq[6]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[4]*nuVtSq[7]+0.4472135954999579*temp_F_0_edge[2]*nuVtSq[5]+0.5*nuVtSq[1]*temp_F_0_edge[4]+0.5*temp_F_0_edge[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_F_0_edge[2]+0.5*temp_F_0_edge[0]*nuVtSq[2]; - edge_F_0_incr[3] = 0.5*nuVtSq[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSq[7]*temp_F_0_edge[18]+0.5000000000000001*nuVtSq[6]*temp_F_0_edge[17]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[14]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[13]+0.5*nuVtSq[3]*temp_F_0_edge[10]+0.5*nuVtSq[2]*temp_F_0_edge[6]+0.5*nuVtSq[1]*temp_F_0_edge[5]+0.5*nuVtSq[0]*temp_F_0_edge[3]; - edge_F_0_incr[4] = 0.4*nuVtSq[3]*temp_F_0_edge[20]+0.4*nuVtSq[6]*temp_F_0_edge[12]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[12]+0.4*nuVtSq[7]*temp_F_0_edge[11]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[11]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[8]+0.4*temp_F_0_edge[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[2]*nuVtSq[7]+0.447213595499958*temp_F_0_edge[1]*nuVtSq[6]+0.4472135954999579*temp_F_0_edge[4]*nuVtSq[5]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[4]+0.5*nuVtSq[0]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_F_0_edge[2]+0.5*temp_F_0_edge[1]*nuVtSq[2]; - edge_F_0_incr[5] = 0.447213595499958*nuVtSq[7]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[8]*temp_F_0_edge[18]+0.5*nuVtSq[5]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[17]+0.5*nuVtSq[7]*temp_F_0_edge[14]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[13]+0.447213595499958*nuVtSq[6]*temp_F_0_edge[10]+0.5*nuVtSq[2]*temp_F_0_edge[10]+0.5*nuVtSq[3]*temp_F_0_edge[6]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[5]+0.5*nuVtSq[0]*temp_F_0_edge[5]+0.5*nuVtSq[1]*temp_F_0_edge[3]; - edge_F_0_incr[6] = 0.447213595499958*nuVtSq[6]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[8]*temp_F_0_edge[17]+0.5*nuVtSq[4]*temp_F_0_edge[17]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[14]+0.5*nuVtSq[6]*temp_F_0_edge[13]+0.447213595499958*nuVtSq[7]*temp_F_0_edge[10]+0.5*nuVtSq[1]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[6]+0.5*nuVtSq[0]*temp_F_0_edge[6]+0.5*nuVtSq[3]*temp_F_0_edge[5]+0.5*nuVtSq[2]*temp_F_0_edge[3]; - edge_F_0_incr[7] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[20]+0.5*nuVtSq[5]*temp_F_0_edge[20]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[12]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[11]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[11]+0.5*nuVtSq[8]*temp_F_0_edge[8]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[7]+0.5*nuVtSq[0]*temp_F_0_edge[7]+0.5000000000000001*temp_F_0_edge[2]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[1]; - edge_F_0_incr[8] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[20]+0.5*nuVtSq[4]*temp_F_0_edge[20]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[12]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[12]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[11]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[8]+0.5*nuVtSq[0]*temp_F_0_edge[8]+0.5*temp_F_0_edge[7]*nuVtSq[8]+0.5000000000000001*temp_F_0_edge[1]*nuVtSq[7]+0.5*temp_F_0_edge[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[4]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[2]; - edge_F_0_incr[9] = 0.5*nuVtSq[8]*temp_F_0_edge[26]+0.5000000000000001*nuVtSq[7]*temp_F_0_edge[25]+0.5000000000000001*nuVtSq[6]*temp_F_0_edge[24]+0.5*nuVtSq[5]*temp_F_0_edge[22]+0.5*nuVtSq[4]*temp_F_0_edge[21]+0.5*nuVtSq[3]*temp_F_0_edge[19]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[16]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[15]+0.5*nuVtSq[0]*temp_F_0_edge[9]; - edge_F_0_incr[10] = 0.4*nuVtSq[3]*temp_F_0_edge[23]+0.4*nuVtSq[6]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[18]+0.4*nuVtSq[7]*temp_F_0_edge[17]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[17]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[14]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[13]+0.4*nuVtSq[8]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[10]+0.5*nuVtSq[0]*temp_F_0_edge[10]+0.447213595499958*temp_F_0_edge[6]*nuVtSq[7]+0.5*nuVtSq[1]*temp_F_0_edge[6]+0.447213595499958*temp_F_0_edge[5]*nuVtSq[6]+0.5*nuVtSq[2]*temp_F_0_edge[5]+0.5*nuVtSq[3]*temp_F_0_edge[3]; - edge_F_0_incr[11] = 0.2857142857142857*nuVtSq[6]*temp_F_0_edge[20]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[20]+0.4*nuVtSq[3]*temp_F_0_edge[12]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[11]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[11]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[11]+0.5*nuVtSq[0]*temp_F_0_edge[11]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[8]+0.447213595499958*temp_F_0_edge[2]*nuVtSq[8]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[7]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[7]+0.4*temp_F_0_edge[4]*nuVtSq[7]+0.5*temp_F_0_edge[0]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[4]+0.5000000000000001*temp_F_0_edge[2]*nuVtSq[4]+0.447213595499958*temp_F_0_edge[1]*nuVtSq[3]; - edge_F_0_incr[12] = 0.2857142857142857*nuVtSq[7]*temp_F_0_edge[20]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[20]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[12]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[12]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[12]+0.5*nuVtSq[0]*temp_F_0_edge[12]+0.4*nuVtSq[3]*temp_F_0_edge[11]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[8]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[8]+0.447213595499958*temp_F_0_edge[1]*nuVtSq[8]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[7]+0.5*temp_F_0_edge[0]*nuVtSq[7]+0.4*temp_F_0_edge[4]*nuVtSq[6]+0.5000000000000001*temp_F_0_edge[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[4]+0.447213595499958*temp_F_0_edge[2]*nuVtSq[3]; - edge_F_0_incr[13] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[18]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[17]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[17]+0.5*nuVtSq[8]*temp_F_0_edge[14]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[13]+0.5*nuVtSq[0]*temp_F_0_edge[13]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[10]+0.5*nuVtSq[6]*temp_F_0_edge[6]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[5]+0.5000000000000001*temp_F_0_edge[3]*nuVtSq[4]; - edge_F_0_incr[14] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[23]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[18]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[17]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[14]+0.5*nuVtSq[0]*temp_F_0_edge[14]+0.5*nuVtSq[8]*temp_F_0_edge[13]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[10]+0.5*temp_F_0_edge[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[6]+0.5000000000000001*temp_F_0_edge[3]*nuVtSq[5]; - edge_F_0_incr[15] = 0.4472135954999579*nuVtSq[7]*temp_F_0_edge[26]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[25]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[25]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[24]+0.5*nuVtSq[7]*temp_F_0_edge[22]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[21]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[19]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[19]+0.5*nuVtSq[3]*temp_F_0_edge[16]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[15]+0.5*nuVtSq[0]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[9]; - edge_F_0_incr[16] = 0.4472135954999579*nuVtSq[6]*temp_F_0_edge[26]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[25]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[24]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[24]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[22]+0.5*nuVtSq[6]*temp_F_0_edge[21]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[19]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[16]+0.5*nuVtSq[0]*temp_F_0_edge[16]+0.5*nuVtSq[3]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[9]; - edge_F_0_incr[17] = 0.2857142857142858*nuVtSq[6]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[23]+0.4*nuVtSq[3]*temp_F_0_edge[18]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[17]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[17]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[17]+0.5*nuVtSq[0]*temp_F_0_edge[17]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[14]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[13]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[13]+0.4*nuVtSq[7]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[10]+0.4472135954999579*temp_F_0_edge[6]*nuVtSq[8]+0.5*nuVtSq[4]*temp_F_0_edge[6]+0.5000000000000001*temp_F_0_edge[3]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[5]; - edge_F_0_incr[18] = 0.2857142857142858*nuVtSq[7]*temp_F_0_edge[23]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[23]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[18]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[18]+0.5*nuVtSq[0]*temp_F_0_edge[18]+0.4*nuVtSq[3]*temp_F_0_edge[17]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[14]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[14]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[13]+0.4*nuVtSq[6]*temp_F_0_edge[10]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[10]+0.4472135954999579*temp_F_0_edge[5]*nuVtSq[8]+0.5000000000000001*temp_F_0_edge[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[6]+0.5*nuVtSq[5]*temp_F_0_edge[5]; - edge_F_0_incr[19] = 0.4*nuVtSq[3]*temp_F_0_edge[26]+0.4*nuVtSq[6]*temp_F_0_edge[25]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[25]+0.4*nuVtSq[7]*temp_F_0_edge[24]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[24]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[22]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[21]+0.4*nuVtSq[8]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[19]+0.5*nuVtSq[0]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[16]+0.5000000000000001*nuVtSq[1]*temp_F_0_edge[16]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[2]*temp_F_0_edge[15]+0.5*nuVtSq[3]*temp_F_0_edge[9]; - edge_F_0_incr[20] = 0.2040816326530612*nuVtSq[8]*temp_F_0_edge[20]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[20]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[20]+0.5*nuVtSq[0]*temp_F_0_edge[20]+0.2857142857142857*nuVtSq[7]*temp_F_0_edge[12]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[12]+0.2857142857142857*nuVtSq[6]*temp_F_0_edge[11]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[11]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[8]+0.5*nuVtSq[4]*temp_F_0_edge[8]+0.31943828249997*temp_F_0_edge[7]*nuVtSq[8]+0.5*temp_F_0_edge[0]*nuVtSq[8]+0.5*nuVtSq[5]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[1]*nuVtSq[7]+0.447213595499958*temp_F_0_edge[2]*nuVtSq[6]+0.4*nuVtSq[3]*temp_F_0_edge[4]; - edge_F_0_incr[21] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[26]+0.5*nuVtSq[5]*temp_F_0_edge[26]+0.447213595499958*nuVtSq[7]*temp_F_0_edge[25]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[24]+0.5*nuVtSq[2]*temp_F_0_edge[24]+0.5*nuVtSq[8]*temp_F_0_edge[22]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[21]+0.5*nuVtSq[0]*temp_F_0_edge[21]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[19]+0.5*nuVtSq[6]*temp_F_0_edge[16]+0.447213595499958*nuVtSq[1]*temp_F_0_edge[15]+0.5*nuVtSq[4]*temp_F_0_edge[9]; - edge_F_0_incr[22] = 0.31943828249997*nuVtSq[8]*temp_F_0_edge[26]+0.5*nuVtSq[4]*temp_F_0_edge[26]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[25]+0.5*nuVtSq[1]*temp_F_0_edge[25]+0.447213595499958*nuVtSq[6]*temp_F_0_edge[24]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[22]+0.5*nuVtSq[0]*temp_F_0_edge[22]+0.5*nuVtSq[8]*temp_F_0_edge[21]+0.4472135954999579*nuVtSq[3]*temp_F_0_edge[19]+0.447213595499958*nuVtSq[2]*temp_F_0_edge[16]+0.5*nuVtSq[7]*temp_F_0_edge[15]+0.5*nuVtSq[5]*temp_F_0_edge[9]; - edge_F_0_incr[23] = 0.2040816326530612*nuVtSq[8]*temp_F_0_edge[23]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[23]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[23]+0.5*nuVtSq[0]*temp_F_0_edge[23]+0.2857142857142858*nuVtSq[7]*temp_F_0_edge[18]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[18]+0.2857142857142858*nuVtSq[6]*temp_F_0_edge[17]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[17]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[14]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[14]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[13]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[13]+0.4*nuVtSq[3]*temp_F_0_edge[10]+0.5*temp_F_0_edge[3]*nuVtSq[8]+0.447213595499958*temp_F_0_edge[5]*nuVtSq[7]+0.447213595499958*nuVtSq[6]*temp_F_0_edge[6]; - edge_F_0_incr[24] = 0.2857142857142858*nuVtSq[6]*temp_F_0_edge[26]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[26]+0.4*nuVtSq[3]*temp_F_0_edge[25]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[24]+0.4472135954999579*nuVtSq[5]*temp_F_0_edge[24]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[24]+0.5*nuVtSq[0]*temp_F_0_edge[24]+0.447213595499958*nuVtSq[6]*temp_F_0_edge[22]+0.31943828249997*nuVtSq[6]*temp_F_0_edge[21]+0.5*nuVtSq[2]*temp_F_0_edge[21]+0.4*nuVtSq[7]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[19]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[16]+0.5000000000000001*nuVtSq[4]*temp_F_0_edge[16]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[6]*temp_F_0_edge[9]; - edge_F_0_incr[25] = 0.2857142857142858*nuVtSq[7]*temp_F_0_edge[26]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[26]+0.2857142857142857*nuVtSq[8]*temp_F_0_edge[25]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[25]+0.4472135954999579*nuVtSq[4]*temp_F_0_edge[25]+0.5*nuVtSq[0]*temp_F_0_edge[25]+0.4*nuVtSq[3]*temp_F_0_edge[24]+0.31943828249997*nuVtSq[7]*temp_F_0_edge[22]+0.5*nuVtSq[1]*temp_F_0_edge[22]+0.447213595499958*nuVtSq[7]*temp_F_0_edge[21]+0.4*nuVtSq[6]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[19]+0.447213595499958*nuVtSq[3]*temp_F_0_edge[16]+0.447213595499958*nuVtSq[8]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[5]*temp_F_0_edge[15]+0.5000000000000001*nuVtSq[7]*temp_F_0_edge[9]; - edge_F_0_incr[26] = 0.2040816326530612*nuVtSq[8]*temp_F_0_edge[26]+0.31943828249997*nuVtSq[5]*temp_F_0_edge[26]+0.31943828249997*nuVtSq[4]*temp_F_0_edge[26]+0.5*nuVtSq[0]*temp_F_0_edge[26]+0.2857142857142858*nuVtSq[7]*temp_F_0_edge[25]+0.4472135954999579*nuVtSq[1]*temp_F_0_edge[25]+0.2857142857142858*nuVtSq[6]*temp_F_0_edge[24]+0.4472135954999579*nuVtSq[2]*temp_F_0_edge[24]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[22]+0.5*nuVtSq[4]*temp_F_0_edge[22]+0.31943828249997*nuVtSq[8]*temp_F_0_edge[21]+0.5*nuVtSq[5]*temp_F_0_edge[21]+0.4*nuVtSq[3]*temp_F_0_edge[19]+0.4472135954999579*nuVtSq[6]*temp_F_0_edge[16]+0.4472135954999579*nuVtSq[7]*temp_F_0_edge[15]+0.5*nuVtSq[8]*temp_F_0_edge[9]; - edge_G_1_incr[0] = 0.5*nuVtSq[8]*temp_G_1_edge[20]+0.5*nuVtSq[7]*temp_G_1_edge[12]+0.5*nuVtSq[6]*temp_G_1_edge[11]+0.5*nuVtSq[5]*temp_G_1_edge[8]+0.5*nuVtSq[4]*temp_G_1_edge[7]+0.5*nuVtSq[3]*temp_G_1_edge[4]+0.5*nuVtSq[2]*temp_G_1_edge[2]+0.5*nuVtSq[1]*temp_G_1_edge[1]+0.5*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.447213595499958*nuVtSq[7]*temp_G_1_edge[20]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[12]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[12]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[7]*temp_G_1_edge[8]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[4]*nuVtSq[6]+0.5*nuVtSq[2]*temp_G_1_edge[4]+0.4472135954999579*temp_G_1_edge[1]*nuVtSq[4]+0.5*temp_G_1_edge[2]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_edge[1]+0.5*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.447213595499958*nuVtSq[6]*temp_G_1_edge[20]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[12]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[11]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[8]+0.5000000000000001*nuVtSq[6]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[4]*nuVtSq[7]+0.4472135954999579*temp_G_1_edge[2]*nuVtSq[5]+0.5*nuVtSq[1]*temp_G_1_edge[4]+0.5*temp_G_1_edge[1]*nuVtSq[3]+0.5*nuVtSq[0]*temp_G_1_edge[2]+0.5*temp_G_1_edge[0]*nuVtSq[2]; - edge_G_1_incr[3] = 0.5*nuVtSq[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSq[7]*temp_G_1_edge[18]+0.5000000000000001*nuVtSq[6]*temp_G_1_edge[17]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[14]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[13]+0.5*nuVtSq[3]*temp_G_1_edge[10]+0.5*nuVtSq[2]*temp_G_1_edge[6]+0.5*nuVtSq[1]*temp_G_1_edge[5]+0.5*nuVtSq[0]*temp_G_1_edge[3]; - edge_G_1_incr[4] = 0.4*nuVtSq[3]*temp_G_1_edge[20]+0.4*nuVtSq[6]*temp_G_1_edge[12]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[12]+0.4*nuVtSq[7]*temp_G_1_edge[11]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[11]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[8]+0.4*temp_G_1_edge[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[2]*nuVtSq[7]+0.447213595499958*temp_G_1_edge[1]*nuVtSq[6]+0.4472135954999579*temp_G_1_edge[4]*nuVtSq[5]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[4]+0.5*nuVtSq[0]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSq[3]+0.5*nuVtSq[1]*temp_G_1_edge[2]+0.5*temp_G_1_edge[1]*nuVtSq[2]; - edge_G_1_incr[5] = 0.447213595499958*nuVtSq[7]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[8]*temp_G_1_edge[18]+0.5*nuVtSq[5]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[17]+0.5*nuVtSq[7]*temp_G_1_edge[14]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[13]+0.447213595499958*nuVtSq[6]*temp_G_1_edge[10]+0.5*nuVtSq[2]*temp_G_1_edge[10]+0.5*nuVtSq[3]*temp_G_1_edge[6]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[5]+0.5*nuVtSq[0]*temp_G_1_edge[5]+0.5*nuVtSq[1]*temp_G_1_edge[3]; - edge_G_1_incr[6] = 0.447213595499958*nuVtSq[6]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[8]*temp_G_1_edge[17]+0.5*nuVtSq[4]*temp_G_1_edge[17]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[14]+0.5*nuVtSq[6]*temp_G_1_edge[13]+0.447213595499958*nuVtSq[7]*temp_G_1_edge[10]+0.5*nuVtSq[1]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[6]+0.5*nuVtSq[0]*temp_G_1_edge[6]+0.5*nuVtSq[3]*temp_G_1_edge[5]+0.5*nuVtSq[2]*temp_G_1_edge[3]; - edge_G_1_incr[7] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[20]+0.5*nuVtSq[5]*temp_G_1_edge[20]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[12]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[11]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[11]+0.5*nuVtSq[8]*temp_G_1_edge[8]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[7]+0.5*nuVtSq[0]*temp_G_1_edge[7]+0.5000000000000001*temp_G_1_edge[2]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[1]; - edge_G_1_incr[8] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[20]+0.5*nuVtSq[4]*temp_G_1_edge[20]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[12]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[12]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[11]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[8]+0.5*nuVtSq[0]*temp_G_1_edge[8]+0.5*temp_G_1_edge[7]*nuVtSq[8]+0.5000000000000001*temp_G_1_edge[1]*nuVtSq[7]+0.5*temp_G_1_edge[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[4]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[2]; - edge_G_1_incr[9] = 0.5*nuVtSq[8]*temp_G_1_edge[26]+0.5000000000000001*nuVtSq[7]*temp_G_1_edge[25]+0.5000000000000001*nuVtSq[6]*temp_G_1_edge[24]+0.5*nuVtSq[5]*temp_G_1_edge[22]+0.5*nuVtSq[4]*temp_G_1_edge[21]+0.5*nuVtSq[3]*temp_G_1_edge[19]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[16]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[15]+0.5*nuVtSq[0]*temp_G_1_edge[9]; - edge_G_1_incr[10] = 0.4*nuVtSq[3]*temp_G_1_edge[23]+0.4*nuVtSq[6]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[18]+0.4*nuVtSq[7]*temp_G_1_edge[17]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[17]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[14]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[13]+0.4*nuVtSq[8]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[10]+0.5*nuVtSq[0]*temp_G_1_edge[10]+0.447213595499958*temp_G_1_edge[6]*nuVtSq[7]+0.5*nuVtSq[1]*temp_G_1_edge[6]+0.447213595499958*temp_G_1_edge[5]*nuVtSq[6]+0.5*nuVtSq[2]*temp_G_1_edge[5]+0.5*nuVtSq[3]*temp_G_1_edge[3]; - edge_G_1_incr[11] = 0.2857142857142857*nuVtSq[6]*temp_G_1_edge[20]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[20]+0.4*nuVtSq[3]*temp_G_1_edge[12]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[11]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[11]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[11]+0.5*nuVtSq[0]*temp_G_1_edge[11]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[8]+0.447213595499958*temp_G_1_edge[2]*nuVtSq[8]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[7]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[7]+0.4*temp_G_1_edge[4]*nuVtSq[7]+0.5*temp_G_1_edge[0]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[4]+0.5000000000000001*temp_G_1_edge[2]*nuVtSq[4]+0.447213595499958*temp_G_1_edge[1]*nuVtSq[3]; - edge_G_1_incr[12] = 0.2857142857142857*nuVtSq[7]*temp_G_1_edge[20]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[20]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[12]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[12]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[12]+0.5*nuVtSq[0]*temp_G_1_edge[12]+0.4*nuVtSq[3]*temp_G_1_edge[11]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[8]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[8]+0.447213595499958*temp_G_1_edge[1]*nuVtSq[8]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[7]+0.5*temp_G_1_edge[0]*nuVtSq[7]+0.4*temp_G_1_edge[4]*nuVtSq[6]+0.5000000000000001*temp_G_1_edge[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[4]+0.447213595499958*temp_G_1_edge[2]*nuVtSq[3]; - edge_G_1_incr[13] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[18]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[17]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[17]+0.5*nuVtSq[8]*temp_G_1_edge[14]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[13]+0.5*nuVtSq[0]*temp_G_1_edge[13]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[10]+0.5*nuVtSq[6]*temp_G_1_edge[6]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[5]+0.5000000000000001*temp_G_1_edge[3]*nuVtSq[4]; - edge_G_1_incr[14] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[23]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[18]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[17]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[14]+0.5*nuVtSq[0]*temp_G_1_edge[14]+0.5*nuVtSq[8]*temp_G_1_edge[13]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[10]+0.5*temp_G_1_edge[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[6]+0.5000000000000001*temp_G_1_edge[3]*nuVtSq[5]; - edge_G_1_incr[15] = 0.4472135954999579*nuVtSq[7]*temp_G_1_edge[26]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[25]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[25]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[24]+0.5*nuVtSq[7]*temp_G_1_edge[22]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[21]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[19]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[19]+0.5*nuVtSq[3]*temp_G_1_edge[16]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[15]+0.5*nuVtSq[0]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[9]; - edge_G_1_incr[16] = 0.4472135954999579*nuVtSq[6]*temp_G_1_edge[26]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[25]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[24]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[24]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[22]+0.5*nuVtSq[6]*temp_G_1_edge[21]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[19]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[16]+0.5*nuVtSq[0]*temp_G_1_edge[16]+0.5*nuVtSq[3]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[9]; - edge_G_1_incr[17] = 0.2857142857142858*nuVtSq[6]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[23]+0.4*nuVtSq[3]*temp_G_1_edge[18]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[17]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[17]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[17]+0.5*nuVtSq[0]*temp_G_1_edge[17]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[14]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[13]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[13]+0.4*nuVtSq[7]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[10]+0.4472135954999579*temp_G_1_edge[6]*nuVtSq[8]+0.5*nuVtSq[4]*temp_G_1_edge[6]+0.5000000000000001*temp_G_1_edge[3]*nuVtSq[6]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[5]; - edge_G_1_incr[18] = 0.2857142857142858*nuVtSq[7]*temp_G_1_edge[23]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[23]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[18]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[18]+0.5*nuVtSq[0]*temp_G_1_edge[18]+0.4*nuVtSq[3]*temp_G_1_edge[17]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[14]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[14]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[13]+0.4*nuVtSq[6]*temp_G_1_edge[10]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[10]+0.4472135954999579*temp_G_1_edge[5]*nuVtSq[8]+0.5000000000000001*temp_G_1_edge[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[6]+0.5*nuVtSq[5]*temp_G_1_edge[5]; - edge_G_1_incr[19] = 0.4*nuVtSq[3]*temp_G_1_edge[26]+0.4*nuVtSq[6]*temp_G_1_edge[25]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[25]+0.4*nuVtSq[7]*temp_G_1_edge[24]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[24]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[22]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[21]+0.4*nuVtSq[8]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[19]+0.5*nuVtSq[0]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[16]+0.5000000000000001*nuVtSq[1]*temp_G_1_edge[16]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[2]*temp_G_1_edge[15]+0.5*nuVtSq[3]*temp_G_1_edge[9]; - edge_G_1_incr[20] = 0.2040816326530612*nuVtSq[8]*temp_G_1_edge[20]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[20]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[20]+0.5*nuVtSq[0]*temp_G_1_edge[20]+0.2857142857142857*nuVtSq[7]*temp_G_1_edge[12]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[12]+0.2857142857142857*nuVtSq[6]*temp_G_1_edge[11]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[11]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[8]+0.5*nuVtSq[4]*temp_G_1_edge[8]+0.31943828249997*temp_G_1_edge[7]*nuVtSq[8]+0.5*temp_G_1_edge[0]*nuVtSq[8]+0.5*nuVtSq[5]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[1]*nuVtSq[7]+0.447213595499958*temp_G_1_edge[2]*nuVtSq[6]+0.4*nuVtSq[3]*temp_G_1_edge[4]; - edge_G_1_incr[21] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[26]+0.5*nuVtSq[5]*temp_G_1_edge[26]+0.447213595499958*nuVtSq[7]*temp_G_1_edge[25]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[24]+0.5*nuVtSq[2]*temp_G_1_edge[24]+0.5*nuVtSq[8]*temp_G_1_edge[22]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[21]+0.5*nuVtSq[0]*temp_G_1_edge[21]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[19]+0.5*nuVtSq[6]*temp_G_1_edge[16]+0.447213595499958*nuVtSq[1]*temp_G_1_edge[15]+0.5*nuVtSq[4]*temp_G_1_edge[9]; - edge_G_1_incr[22] = 0.31943828249997*nuVtSq[8]*temp_G_1_edge[26]+0.5*nuVtSq[4]*temp_G_1_edge[26]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[25]+0.5*nuVtSq[1]*temp_G_1_edge[25]+0.447213595499958*nuVtSq[6]*temp_G_1_edge[24]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[22]+0.5*nuVtSq[0]*temp_G_1_edge[22]+0.5*nuVtSq[8]*temp_G_1_edge[21]+0.4472135954999579*nuVtSq[3]*temp_G_1_edge[19]+0.447213595499958*nuVtSq[2]*temp_G_1_edge[16]+0.5*nuVtSq[7]*temp_G_1_edge[15]+0.5*nuVtSq[5]*temp_G_1_edge[9]; - edge_G_1_incr[23] = 0.2040816326530612*nuVtSq[8]*temp_G_1_edge[23]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[23]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[23]+0.5*nuVtSq[0]*temp_G_1_edge[23]+0.2857142857142858*nuVtSq[7]*temp_G_1_edge[18]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[18]+0.2857142857142858*nuVtSq[6]*temp_G_1_edge[17]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[17]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[14]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[14]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[13]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[13]+0.4*nuVtSq[3]*temp_G_1_edge[10]+0.5*temp_G_1_edge[3]*nuVtSq[8]+0.447213595499958*temp_G_1_edge[5]*nuVtSq[7]+0.447213595499958*nuVtSq[6]*temp_G_1_edge[6]; - edge_G_1_incr[24] = 0.2857142857142858*nuVtSq[6]*temp_G_1_edge[26]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[26]+0.4*nuVtSq[3]*temp_G_1_edge[25]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[24]+0.4472135954999579*nuVtSq[5]*temp_G_1_edge[24]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[24]+0.5*nuVtSq[0]*temp_G_1_edge[24]+0.447213595499958*nuVtSq[6]*temp_G_1_edge[22]+0.31943828249997*nuVtSq[6]*temp_G_1_edge[21]+0.5*nuVtSq[2]*temp_G_1_edge[21]+0.4*nuVtSq[7]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[19]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[16]+0.5000000000000001*nuVtSq[4]*temp_G_1_edge[16]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[6]*temp_G_1_edge[9]; - edge_G_1_incr[25] = 0.2857142857142858*nuVtSq[7]*temp_G_1_edge[26]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[26]+0.2857142857142857*nuVtSq[8]*temp_G_1_edge[25]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[25]+0.4472135954999579*nuVtSq[4]*temp_G_1_edge[25]+0.5*nuVtSq[0]*temp_G_1_edge[25]+0.4*nuVtSq[3]*temp_G_1_edge[24]+0.31943828249997*nuVtSq[7]*temp_G_1_edge[22]+0.5*nuVtSq[1]*temp_G_1_edge[22]+0.447213595499958*nuVtSq[7]*temp_G_1_edge[21]+0.4*nuVtSq[6]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[19]+0.447213595499958*nuVtSq[3]*temp_G_1_edge[16]+0.447213595499958*nuVtSq[8]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[5]*temp_G_1_edge[15]+0.5000000000000001*nuVtSq[7]*temp_G_1_edge[9]; - edge_G_1_incr[26] = 0.2040816326530612*nuVtSq[8]*temp_G_1_edge[26]+0.31943828249997*nuVtSq[5]*temp_G_1_edge[26]+0.31943828249997*nuVtSq[4]*temp_G_1_edge[26]+0.5*nuVtSq[0]*temp_G_1_edge[26]+0.2857142857142858*nuVtSq[7]*temp_G_1_edge[25]+0.4472135954999579*nuVtSq[1]*temp_G_1_edge[25]+0.2857142857142858*nuVtSq[6]*temp_G_1_edge[24]+0.4472135954999579*nuVtSq[2]*temp_G_1_edge[24]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[22]+0.5*nuVtSq[4]*temp_G_1_edge[22]+0.31943828249997*nuVtSq[8]*temp_G_1_edge[21]+0.5*nuVtSq[5]*temp_G_1_edge[21]+0.4*nuVtSq[3]*temp_G_1_edge[19]+0.4472135954999579*nuVtSq[6]*temp_G_1_edge[16]+0.4472135954999579*nuVtSq[7]*temp_G_1_edge[15]+0.5*nuVtSq[8]*temp_G_1_edge[9]; + edge_F_0_incr[0] = 0.5*nuVtSqSum[8]*temp_F_0_edge[20]+0.5*nuVtSqSum[7]*temp_F_0_edge[12]+0.5*nuVtSqSum[6]*temp_F_0_edge[11]+0.5*nuVtSqSum[5]*temp_F_0_edge[8]+0.5*nuVtSqSum[4]*temp_F_0_edge[7]+0.5*nuVtSqSum[3]*temp_F_0_edge[4]+0.5*nuVtSqSum[2]*temp_F_0_edge[2]+0.5*nuVtSqSum[1]*temp_F_0_edge[1]+0.5*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[20]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[12]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[12]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_edge[8]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[4]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_F_0_edge[4]+0.4472135954999579*temp_F_0_edge[1]*nuVtSqSum[4]+0.5*temp_F_0_edge[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_edge[1]+0.5*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[20]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[12]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[11]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[8]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[4]*nuVtSqSum[7]+0.4472135954999579*temp_F_0_edge[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*temp_F_0_edge[4]+0.5*temp_F_0_edge[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_F_0_edge[2]+0.5*temp_F_0_edge[0]*nuVtSqSum[2]; + edge_F_0_incr[3] = 0.5*nuVtSqSum[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_edge[18]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_edge[17]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[14]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[13]+0.5*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*nuVtSqSum[2]*temp_F_0_edge[6]+0.5*nuVtSqSum[1]*temp_F_0_edge[5]+0.5*nuVtSqSum[0]*temp_F_0_edge[3]; + edge_F_0_incr[4] = 0.4*nuVtSqSum[3]*temp_F_0_edge[20]+0.4*nuVtSqSum[6]*temp_F_0_edge[12]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[12]+0.4*nuVtSqSum[7]*temp_F_0_edge[11]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[11]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[8]+0.4*temp_F_0_edge[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[2]*nuVtSqSum[7]+0.447213595499958*temp_F_0_edge[1]*nuVtSqSum[6]+0.4472135954999579*temp_F_0_edge[4]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[4]+0.5*nuVtSqSum[0]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_F_0_edge[2]+0.5*temp_F_0_edge[1]*nuVtSqSum[2]; + edge_F_0_incr[5] = 0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[8]*temp_F_0_edge[18]+0.5*nuVtSqSum[5]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[17]+0.5*nuVtSqSum[7]*temp_F_0_edge[14]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[13]+0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[10]+0.5*nuVtSqSum[2]*temp_F_0_edge[10]+0.5*nuVtSqSum[3]*temp_F_0_edge[6]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[5]+0.5*nuVtSqSum[0]*temp_F_0_edge[5]+0.5*nuVtSqSum[1]*temp_F_0_edge[3]; + edge_F_0_incr[6] = 0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[8]*temp_F_0_edge[17]+0.5*nuVtSqSum[4]*temp_F_0_edge[17]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[14]+0.5*nuVtSqSum[6]*temp_F_0_edge[13]+0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[10]+0.5*nuVtSqSum[1]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[6]+0.5*nuVtSqSum[0]*temp_F_0_edge[6]+0.5*nuVtSqSum[3]*temp_F_0_edge[5]+0.5*nuVtSqSum[2]*temp_F_0_edge[3]; + edge_F_0_incr[7] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[20]+0.5*nuVtSqSum[5]*temp_F_0_edge[20]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[12]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[11]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[11]+0.5*nuVtSqSum[8]*temp_F_0_edge[8]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[7]+0.5*nuVtSqSum[0]*temp_F_0_edge[7]+0.5000000000000001*temp_F_0_edge[2]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[4]+0.5*temp_F_0_edge[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[1]; + edge_F_0_incr[8] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[20]+0.5*nuVtSqSum[4]*temp_F_0_edge[20]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[12]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[12]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[11]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[8]+0.5*nuVtSqSum[0]*temp_F_0_edge[8]+0.5*temp_F_0_edge[7]*nuVtSqSum[8]+0.5000000000000001*temp_F_0_edge[1]*nuVtSqSum[7]+0.5*temp_F_0_edge[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[4]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[2]; + edge_F_0_incr[9] = 0.5*nuVtSqSum[8]*temp_F_0_edge[26]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_edge[25]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_edge[24]+0.5*nuVtSqSum[5]*temp_F_0_edge[22]+0.5*nuVtSqSum[4]*temp_F_0_edge[21]+0.5*nuVtSqSum[3]*temp_F_0_edge[19]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[16]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[15]+0.5*nuVtSqSum[0]*temp_F_0_edge[9]; + edge_F_0_incr[10] = 0.4*nuVtSqSum[3]*temp_F_0_edge[23]+0.4*nuVtSqSum[6]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[18]+0.4*nuVtSqSum[7]*temp_F_0_edge[17]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[17]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[14]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[13]+0.4*nuVtSqSum[8]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[10]+0.5*nuVtSqSum[0]*temp_F_0_edge[10]+0.447213595499958*temp_F_0_edge[6]*nuVtSqSum[7]+0.5*nuVtSqSum[1]*temp_F_0_edge[6]+0.447213595499958*temp_F_0_edge[5]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_F_0_edge[5]+0.5*nuVtSqSum[3]*temp_F_0_edge[3]; + edge_F_0_incr[11] = 0.2857142857142857*nuVtSqSum[6]*temp_F_0_edge[20]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[20]+0.4*nuVtSqSum[3]*temp_F_0_edge[12]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[11]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[11]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[11]+0.5*nuVtSqSum[0]*temp_F_0_edge[11]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[8]+0.447213595499958*temp_F_0_edge[2]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[7]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[7]+0.4*temp_F_0_edge[4]*nuVtSqSum[7]+0.5*temp_F_0_edge[0]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[4]+0.5000000000000001*temp_F_0_edge[2]*nuVtSqSum[4]+0.447213595499958*temp_F_0_edge[1]*nuVtSqSum[3]; + edge_F_0_incr[12] = 0.2857142857142857*nuVtSqSum[7]*temp_F_0_edge[20]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[20]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[12]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[12]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[12]+0.5*nuVtSqSum[0]*temp_F_0_edge[12]+0.4*nuVtSqSum[3]*temp_F_0_edge[11]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[8]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[8]+0.447213595499958*temp_F_0_edge[1]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[7]+0.5*temp_F_0_edge[0]*nuVtSqSum[7]+0.4*temp_F_0_edge[4]*nuVtSqSum[6]+0.5000000000000001*temp_F_0_edge[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[4]+0.447213595499958*temp_F_0_edge[2]*nuVtSqSum[3]; + edge_F_0_incr[13] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[18]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[17]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[17]+0.5*nuVtSqSum[8]*temp_F_0_edge[14]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[13]+0.5*nuVtSqSum[0]*temp_F_0_edge[13]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*nuVtSqSum[6]*temp_F_0_edge[6]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[5]+0.5000000000000001*temp_F_0_edge[3]*nuVtSqSum[4]; + edge_F_0_incr[14] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[23]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[23]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[18]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[17]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[14]+0.5*nuVtSqSum[0]*temp_F_0_edge[14]+0.5*nuVtSqSum[8]*temp_F_0_edge[13]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*temp_F_0_edge[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[6]+0.5000000000000001*temp_F_0_edge[3]*nuVtSqSum[5]; + edge_F_0_incr[15] = 0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[26]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[25]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[25]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[24]+0.5*nuVtSqSum[7]*temp_F_0_edge[22]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[21]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[19]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[19]+0.5*nuVtSqSum[3]*temp_F_0_edge[16]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[15]+0.5*nuVtSqSum[0]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[9]; + edge_F_0_incr[16] = 0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[26]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[25]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[24]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[24]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[22]+0.5*nuVtSqSum[6]*temp_F_0_edge[21]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[19]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[16]+0.5*nuVtSqSum[0]*temp_F_0_edge[16]+0.5*nuVtSqSum[3]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[9]; + edge_F_0_incr[17] = 0.2857142857142858*nuVtSqSum[6]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[23]+0.4*nuVtSqSum[3]*temp_F_0_edge[18]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[17]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[17]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[17]+0.5*nuVtSqSum[0]*temp_F_0_edge[17]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[14]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[13]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[13]+0.4*nuVtSqSum[7]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[10]+0.4472135954999579*temp_F_0_edge[6]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*temp_F_0_edge[6]+0.5000000000000001*temp_F_0_edge[3]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[5]; + edge_F_0_incr[18] = 0.2857142857142858*nuVtSqSum[7]*temp_F_0_edge[23]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[23]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[18]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[18]+0.5*nuVtSqSum[0]*temp_F_0_edge[18]+0.4*nuVtSqSum[3]*temp_F_0_edge[17]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[14]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[14]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[13]+0.4*nuVtSqSum[6]*temp_F_0_edge[10]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[10]+0.4472135954999579*temp_F_0_edge[5]*nuVtSqSum[8]+0.5000000000000001*temp_F_0_edge[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[6]+0.5*nuVtSqSum[5]*temp_F_0_edge[5]; + edge_F_0_incr[19] = 0.4*nuVtSqSum[3]*temp_F_0_edge[26]+0.4*nuVtSqSum[6]*temp_F_0_edge[25]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[25]+0.4*nuVtSqSum[7]*temp_F_0_edge[24]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[24]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[22]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[21]+0.4*nuVtSqSum[8]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[19]+0.5*nuVtSqSum[0]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[16]+0.5000000000000001*nuVtSqSum[1]*temp_F_0_edge[16]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[2]*temp_F_0_edge[15]+0.5*nuVtSqSum[3]*temp_F_0_edge[9]; + edge_F_0_incr[20] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_edge[20]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[20]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[20]+0.5*nuVtSqSum[0]*temp_F_0_edge[20]+0.2857142857142857*nuVtSqSum[7]*temp_F_0_edge[12]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[12]+0.2857142857142857*nuVtSqSum[6]*temp_F_0_edge[11]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[11]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[8]+0.5*nuVtSqSum[4]*temp_F_0_edge[8]+0.31943828249997*temp_F_0_edge[7]*nuVtSqSum[8]+0.5*temp_F_0_edge[0]*nuVtSqSum[8]+0.5*nuVtSqSum[5]*temp_F_0_edge[7]+0.447213595499958*temp_F_0_edge[1]*nuVtSqSum[7]+0.447213595499958*temp_F_0_edge[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*temp_F_0_edge[4]; + edge_F_0_incr[21] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[26]+0.5*nuVtSqSum[5]*temp_F_0_edge[26]+0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[25]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[24]+0.5*nuVtSqSum[2]*temp_F_0_edge[24]+0.5*nuVtSqSum[8]*temp_F_0_edge[22]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[21]+0.5*nuVtSqSum[0]*temp_F_0_edge[21]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[19]+0.5*nuVtSqSum[6]*temp_F_0_edge[16]+0.447213595499958*nuVtSqSum[1]*temp_F_0_edge[15]+0.5*nuVtSqSum[4]*temp_F_0_edge[9]; + edge_F_0_incr[22] = 0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[26]+0.5*nuVtSqSum[4]*temp_F_0_edge[26]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[25]+0.5*nuVtSqSum[1]*temp_F_0_edge[25]+0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[24]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[22]+0.5*nuVtSqSum[0]*temp_F_0_edge[22]+0.5*nuVtSqSum[8]*temp_F_0_edge[21]+0.4472135954999579*nuVtSqSum[3]*temp_F_0_edge[19]+0.447213595499958*nuVtSqSum[2]*temp_F_0_edge[16]+0.5*nuVtSqSum[7]*temp_F_0_edge[15]+0.5*nuVtSqSum[5]*temp_F_0_edge[9]; + edge_F_0_incr[23] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_edge[23]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[23]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[23]+0.5*nuVtSqSum[0]*temp_F_0_edge[23]+0.2857142857142858*nuVtSqSum[7]*temp_F_0_edge[18]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[18]+0.2857142857142858*nuVtSqSum[6]*temp_F_0_edge[17]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[17]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[14]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[14]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[13]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[13]+0.4*nuVtSqSum[3]*temp_F_0_edge[10]+0.5*temp_F_0_edge[3]*nuVtSqSum[8]+0.447213595499958*temp_F_0_edge[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[6]; + edge_F_0_incr[24] = 0.2857142857142858*nuVtSqSum[6]*temp_F_0_edge[26]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[26]+0.4*nuVtSqSum[3]*temp_F_0_edge[25]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[24]+0.4472135954999579*nuVtSqSum[5]*temp_F_0_edge[24]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[24]+0.5*nuVtSqSum[0]*temp_F_0_edge[24]+0.447213595499958*nuVtSqSum[6]*temp_F_0_edge[22]+0.31943828249997*nuVtSqSum[6]*temp_F_0_edge[21]+0.5*nuVtSqSum[2]*temp_F_0_edge[21]+0.4*nuVtSqSum[7]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[19]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[16]+0.5000000000000001*nuVtSqSum[4]*temp_F_0_edge[16]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[6]*temp_F_0_edge[9]; + edge_F_0_incr[25] = 0.2857142857142858*nuVtSqSum[7]*temp_F_0_edge[26]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[26]+0.2857142857142857*nuVtSqSum[8]*temp_F_0_edge[25]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[25]+0.4472135954999579*nuVtSqSum[4]*temp_F_0_edge[25]+0.5*nuVtSqSum[0]*temp_F_0_edge[25]+0.4*nuVtSqSum[3]*temp_F_0_edge[24]+0.31943828249997*nuVtSqSum[7]*temp_F_0_edge[22]+0.5*nuVtSqSum[1]*temp_F_0_edge[22]+0.447213595499958*nuVtSqSum[7]*temp_F_0_edge[21]+0.4*nuVtSqSum[6]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[19]+0.447213595499958*nuVtSqSum[3]*temp_F_0_edge[16]+0.447213595499958*nuVtSqSum[8]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[5]*temp_F_0_edge[15]+0.5000000000000001*nuVtSqSum[7]*temp_F_0_edge[9]; + edge_F_0_incr[26] = 0.2040816326530612*nuVtSqSum[8]*temp_F_0_edge[26]+0.31943828249997*nuVtSqSum[5]*temp_F_0_edge[26]+0.31943828249997*nuVtSqSum[4]*temp_F_0_edge[26]+0.5*nuVtSqSum[0]*temp_F_0_edge[26]+0.2857142857142858*nuVtSqSum[7]*temp_F_0_edge[25]+0.4472135954999579*nuVtSqSum[1]*temp_F_0_edge[25]+0.2857142857142858*nuVtSqSum[6]*temp_F_0_edge[24]+0.4472135954999579*nuVtSqSum[2]*temp_F_0_edge[24]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[22]+0.5*nuVtSqSum[4]*temp_F_0_edge[22]+0.31943828249997*nuVtSqSum[8]*temp_F_0_edge[21]+0.5*nuVtSqSum[5]*temp_F_0_edge[21]+0.4*nuVtSqSum[3]*temp_F_0_edge[19]+0.4472135954999579*nuVtSqSum[6]*temp_F_0_edge[16]+0.4472135954999579*nuVtSqSum[7]*temp_F_0_edge[15]+0.5*nuVtSqSum[8]*temp_F_0_edge[9]; + edge_G_1_incr[0] = 0.5*nuVtSqSum[8]*temp_G_1_edge[20]+0.5*nuVtSqSum[7]*temp_G_1_edge[12]+0.5*nuVtSqSum[6]*temp_G_1_edge[11]+0.5*nuVtSqSum[5]*temp_G_1_edge[8]+0.5*nuVtSqSum[4]*temp_G_1_edge[7]+0.5*nuVtSqSum[3]*temp_G_1_edge[4]+0.5*nuVtSqSum[2]*temp_G_1_edge[2]+0.5*nuVtSqSum[1]*temp_G_1_edge[1]+0.5*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[20]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[12]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[12]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_edge[8]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[4]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_G_1_edge[4]+0.4472135954999579*temp_G_1_edge[1]*nuVtSqSum[4]+0.5*temp_G_1_edge[2]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_edge[1]+0.5*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[20]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[12]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[11]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[8]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[4]*nuVtSqSum[7]+0.4472135954999579*temp_G_1_edge[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*temp_G_1_edge[4]+0.5*temp_G_1_edge[1]*nuVtSqSum[3]+0.5*nuVtSqSum[0]*temp_G_1_edge[2]+0.5*temp_G_1_edge[0]*nuVtSqSum[2]; + edge_G_1_incr[3] = 0.5*nuVtSqSum[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_edge[18]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_edge[17]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[14]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[13]+0.5*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*nuVtSqSum[2]*temp_G_1_edge[6]+0.5*nuVtSqSum[1]*temp_G_1_edge[5]+0.5*nuVtSqSum[0]*temp_G_1_edge[3]; + edge_G_1_incr[4] = 0.4*nuVtSqSum[3]*temp_G_1_edge[20]+0.4*nuVtSqSum[6]*temp_G_1_edge[12]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[12]+0.4*nuVtSqSum[7]*temp_G_1_edge[11]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[11]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[8]+0.4*temp_G_1_edge[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[2]*nuVtSqSum[7]+0.447213595499958*temp_G_1_edge[1]*nuVtSqSum[6]+0.4472135954999579*temp_G_1_edge[4]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[4]+0.5*nuVtSqSum[0]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSqSum[3]+0.5*nuVtSqSum[1]*temp_G_1_edge[2]+0.5*temp_G_1_edge[1]*nuVtSqSum[2]; + edge_G_1_incr[5] = 0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[8]*temp_G_1_edge[18]+0.5*nuVtSqSum[5]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[17]+0.5*nuVtSqSum[7]*temp_G_1_edge[14]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[13]+0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[10]+0.5*nuVtSqSum[2]*temp_G_1_edge[10]+0.5*nuVtSqSum[3]*temp_G_1_edge[6]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[5]+0.5*nuVtSqSum[0]*temp_G_1_edge[5]+0.5*nuVtSqSum[1]*temp_G_1_edge[3]; + edge_G_1_incr[6] = 0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[8]*temp_G_1_edge[17]+0.5*nuVtSqSum[4]*temp_G_1_edge[17]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[14]+0.5*nuVtSqSum[6]*temp_G_1_edge[13]+0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[10]+0.5*nuVtSqSum[1]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[6]+0.5*nuVtSqSum[0]*temp_G_1_edge[6]+0.5*nuVtSqSum[3]*temp_G_1_edge[5]+0.5*nuVtSqSum[2]*temp_G_1_edge[3]; + edge_G_1_incr[7] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[20]+0.5*nuVtSqSum[5]*temp_G_1_edge[20]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[12]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[11]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[11]+0.5*nuVtSqSum[8]*temp_G_1_edge[8]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[7]+0.5*nuVtSqSum[0]*temp_G_1_edge[7]+0.5000000000000001*temp_G_1_edge[2]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[4]+0.5*temp_G_1_edge[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[1]; + edge_G_1_incr[8] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[20]+0.5*nuVtSqSum[4]*temp_G_1_edge[20]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[12]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[12]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[11]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[8]+0.5*nuVtSqSum[0]*temp_G_1_edge[8]+0.5*temp_G_1_edge[7]*nuVtSqSum[8]+0.5000000000000001*temp_G_1_edge[1]*nuVtSqSum[7]+0.5*temp_G_1_edge[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[4]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[2]; + edge_G_1_incr[9] = 0.5*nuVtSqSum[8]*temp_G_1_edge[26]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_edge[25]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_edge[24]+0.5*nuVtSqSum[5]*temp_G_1_edge[22]+0.5*nuVtSqSum[4]*temp_G_1_edge[21]+0.5*nuVtSqSum[3]*temp_G_1_edge[19]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[16]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[15]+0.5*nuVtSqSum[0]*temp_G_1_edge[9]; + edge_G_1_incr[10] = 0.4*nuVtSqSum[3]*temp_G_1_edge[23]+0.4*nuVtSqSum[6]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[18]+0.4*nuVtSqSum[7]*temp_G_1_edge[17]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[17]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[14]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[13]+0.4*nuVtSqSum[8]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[10]+0.5*nuVtSqSum[0]*temp_G_1_edge[10]+0.447213595499958*temp_G_1_edge[6]*nuVtSqSum[7]+0.5*nuVtSqSum[1]*temp_G_1_edge[6]+0.447213595499958*temp_G_1_edge[5]*nuVtSqSum[6]+0.5*nuVtSqSum[2]*temp_G_1_edge[5]+0.5*nuVtSqSum[3]*temp_G_1_edge[3]; + edge_G_1_incr[11] = 0.2857142857142857*nuVtSqSum[6]*temp_G_1_edge[20]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[20]+0.4*nuVtSqSum[3]*temp_G_1_edge[12]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[11]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[11]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[11]+0.5*nuVtSqSum[0]*temp_G_1_edge[11]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[8]+0.447213595499958*temp_G_1_edge[2]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[7]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[7]+0.4*temp_G_1_edge[4]*nuVtSqSum[7]+0.5*temp_G_1_edge[0]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[4]+0.5000000000000001*temp_G_1_edge[2]*nuVtSqSum[4]+0.447213595499958*temp_G_1_edge[1]*nuVtSqSum[3]; + edge_G_1_incr[12] = 0.2857142857142857*nuVtSqSum[7]*temp_G_1_edge[20]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[20]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[12]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[12]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[12]+0.5*nuVtSqSum[0]*temp_G_1_edge[12]+0.4*nuVtSqSum[3]*temp_G_1_edge[11]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[8]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[8]+0.447213595499958*temp_G_1_edge[1]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[7]+0.5*temp_G_1_edge[0]*nuVtSqSum[7]+0.4*temp_G_1_edge[4]*nuVtSqSum[6]+0.5000000000000001*temp_G_1_edge[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[4]+0.447213595499958*temp_G_1_edge[2]*nuVtSqSum[3]; + edge_G_1_incr[13] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[18]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[17]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[17]+0.5*nuVtSqSum[8]*temp_G_1_edge[14]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[13]+0.5*nuVtSqSum[0]*temp_G_1_edge[13]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*nuVtSqSum[6]*temp_G_1_edge[6]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[5]+0.5000000000000001*temp_G_1_edge[3]*nuVtSqSum[4]; + edge_G_1_incr[14] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[23]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[23]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[18]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[17]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[14]+0.5*nuVtSqSum[0]*temp_G_1_edge[14]+0.5*nuVtSqSum[8]*temp_G_1_edge[13]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*temp_G_1_edge[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[6]+0.5000000000000001*temp_G_1_edge[3]*nuVtSqSum[5]; + edge_G_1_incr[15] = 0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[26]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[25]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[25]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[24]+0.5*nuVtSqSum[7]*temp_G_1_edge[22]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[21]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[19]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[19]+0.5*nuVtSqSum[3]*temp_G_1_edge[16]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[15]+0.5*nuVtSqSum[0]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[9]; + edge_G_1_incr[16] = 0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[26]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[25]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[24]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[24]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[22]+0.5*nuVtSqSum[6]*temp_G_1_edge[21]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[19]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[16]+0.5*nuVtSqSum[0]*temp_G_1_edge[16]+0.5*nuVtSqSum[3]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[9]; + edge_G_1_incr[17] = 0.2857142857142858*nuVtSqSum[6]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[23]+0.4*nuVtSqSum[3]*temp_G_1_edge[18]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[17]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[17]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[17]+0.5*nuVtSqSum[0]*temp_G_1_edge[17]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[14]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[13]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[13]+0.4*nuVtSqSum[7]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[10]+0.4472135954999579*temp_G_1_edge[6]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*temp_G_1_edge[6]+0.5000000000000001*temp_G_1_edge[3]*nuVtSqSum[6]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[5]; + edge_G_1_incr[18] = 0.2857142857142858*nuVtSqSum[7]*temp_G_1_edge[23]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[23]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[18]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[18]+0.5*nuVtSqSum[0]*temp_G_1_edge[18]+0.4*nuVtSqSum[3]*temp_G_1_edge[17]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[14]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[14]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[13]+0.4*nuVtSqSum[6]*temp_G_1_edge[10]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[10]+0.4472135954999579*temp_G_1_edge[5]*nuVtSqSum[8]+0.5000000000000001*temp_G_1_edge[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[6]+0.5*nuVtSqSum[5]*temp_G_1_edge[5]; + edge_G_1_incr[19] = 0.4*nuVtSqSum[3]*temp_G_1_edge[26]+0.4*nuVtSqSum[6]*temp_G_1_edge[25]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[25]+0.4*nuVtSqSum[7]*temp_G_1_edge[24]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[24]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[22]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[21]+0.4*nuVtSqSum[8]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[19]+0.5*nuVtSqSum[0]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[16]+0.5000000000000001*nuVtSqSum[1]*temp_G_1_edge[16]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[2]*temp_G_1_edge[15]+0.5*nuVtSqSum[3]*temp_G_1_edge[9]; + edge_G_1_incr[20] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_edge[20]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[20]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[20]+0.5*nuVtSqSum[0]*temp_G_1_edge[20]+0.2857142857142857*nuVtSqSum[7]*temp_G_1_edge[12]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[12]+0.2857142857142857*nuVtSqSum[6]*temp_G_1_edge[11]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[11]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[8]+0.5*nuVtSqSum[4]*temp_G_1_edge[8]+0.31943828249997*temp_G_1_edge[7]*nuVtSqSum[8]+0.5*temp_G_1_edge[0]*nuVtSqSum[8]+0.5*nuVtSqSum[5]*temp_G_1_edge[7]+0.447213595499958*temp_G_1_edge[1]*nuVtSqSum[7]+0.447213595499958*temp_G_1_edge[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*temp_G_1_edge[4]; + edge_G_1_incr[21] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[26]+0.5*nuVtSqSum[5]*temp_G_1_edge[26]+0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[25]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[24]+0.5*nuVtSqSum[2]*temp_G_1_edge[24]+0.5*nuVtSqSum[8]*temp_G_1_edge[22]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[21]+0.5*nuVtSqSum[0]*temp_G_1_edge[21]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[19]+0.5*nuVtSqSum[6]*temp_G_1_edge[16]+0.447213595499958*nuVtSqSum[1]*temp_G_1_edge[15]+0.5*nuVtSqSum[4]*temp_G_1_edge[9]; + edge_G_1_incr[22] = 0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[26]+0.5*nuVtSqSum[4]*temp_G_1_edge[26]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[25]+0.5*nuVtSqSum[1]*temp_G_1_edge[25]+0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[24]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[22]+0.5*nuVtSqSum[0]*temp_G_1_edge[22]+0.5*nuVtSqSum[8]*temp_G_1_edge[21]+0.4472135954999579*nuVtSqSum[3]*temp_G_1_edge[19]+0.447213595499958*nuVtSqSum[2]*temp_G_1_edge[16]+0.5*nuVtSqSum[7]*temp_G_1_edge[15]+0.5*nuVtSqSum[5]*temp_G_1_edge[9]; + edge_G_1_incr[23] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_edge[23]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[23]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[23]+0.5*nuVtSqSum[0]*temp_G_1_edge[23]+0.2857142857142858*nuVtSqSum[7]*temp_G_1_edge[18]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[18]+0.2857142857142858*nuVtSqSum[6]*temp_G_1_edge[17]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[17]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[14]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[14]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[13]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[13]+0.4*nuVtSqSum[3]*temp_G_1_edge[10]+0.5*temp_G_1_edge[3]*nuVtSqSum[8]+0.447213595499958*temp_G_1_edge[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[6]; + edge_G_1_incr[24] = 0.2857142857142858*nuVtSqSum[6]*temp_G_1_edge[26]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[26]+0.4*nuVtSqSum[3]*temp_G_1_edge[25]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[24]+0.4472135954999579*nuVtSqSum[5]*temp_G_1_edge[24]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[24]+0.5*nuVtSqSum[0]*temp_G_1_edge[24]+0.447213595499958*nuVtSqSum[6]*temp_G_1_edge[22]+0.31943828249997*nuVtSqSum[6]*temp_G_1_edge[21]+0.5*nuVtSqSum[2]*temp_G_1_edge[21]+0.4*nuVtSqSum[7]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[19]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[16]+0.5000000000000001*nuVtSqSum[4]*temp_G_1_edge[16]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[6]*temp_G_1_edge[9]; + edge_G_1_incr[25] = 0.2857142857142858*nuVtSqSum[7]*temp_G_1_edge[26]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[26]+0.2857142857142857*nuVtSqSum[8]*temp_G_1_edge[25]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[25]+0.4472135954999579*nuVtSqSum[4]*temp_G_1_edge[25]+0.5*nuVtSqSum[0]*temp_G_1_edge[25]+0.4*nuVtSqSum[3]*temp_G_1_edge[24]+0.31943828249997*nuVtSqSum[7]*temp_G_1_edge[22]+0.5*nuVtSqSum[1]*temp_G_1_edge[22]+0.447213595499958*nuVtSqSum[7]*temp_G_1_edge[21]+0.4*nuVtSqSum[6]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[19]+0.447213595499958*nuVtSqSum[3]*temp_G_1_edge[16]+0.447213595499958*nuVtSqSum[8]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[5]*temp_G_1_edge[15]+0.5000000000000001*nuVtSqSum[7]*temp_G_1_edge[9]; + edge_G_1_incr[26] = 0.2040816326530612*nuVtSqSum[8]*temp_G_1_edge[26]+0.31943828249997*nuVtSqSum[5]*temp_G_1_edge[26]+0.31943828249997*nuVtSqSum[4]*temp_G_1_edge[26]+0.5*nuVtSqSum[0]*temp_G_1_edge[26]+0.2857142857142858*nuVtSqSum[7]*temp_G_1_edge[25]+0.4472135954999579*nuVtSqSum[1]*temp_G_1_edge[25]+0.2857142857142858*nuVtSqSum[6]*temp_G_1_edge[24]+0.4472135954999579*nuVtSqSum[2]*temp_G_1_edge[24]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[22]+0.5*nuVtSqSum[4]*temp_G_1_edge[22]+0.31943828249997*nuVtSqSum[8]*temp_G_1_edge[21]+0.5*nuVtSqSum[5]*temp_G_1_edge[21]+0.4*nuVtSqSum[3]*temp_G_1_edge[19]+0.4472135954999579*nuVtSqSum[6]*temp_G_1_edge[16]+0.4472135954999579*nuVtSqSum[7]*temp_G_1_edge[15]+0.5*nuVtSqSum[8]*temp_G_1_edge[9]; } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1.c index 5c6e84f03..4fbdf001c 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[4]: Cell-center coordinates. - // dxv[4]: Cell spacing. - // nuVtSq[8]: Thermal speeds squared times collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input distribution functions [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell. + // out: Incremented distribution functions in skin cell. double rdvSq4 = 4.0/(dxv[3]*dxv[3]); + const double *nuVtSqSum = &nuPrimMomsSum[8]; + const double *F_0Skin = &fSkin[0]; const double *G_1Skin = &fSkin[24]; const double *F_0Edge = &fEdge[0]; @@ -16,22 +19,22 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1(const doubl double vol_incr_F_0[24] = {0.0}; double vol_incr_G_1[24] = {0.0}; - vol_incr_F_0[16] = 2.371708245126284*nuVtSq[7]*F_0Skin[11]*rdvSq4+2.371708245126284*nuVtSq[6]*F_0Skin[7]*rdvSq4+2.371708245126284*nuVtSq[5]*F_0Skin[6]*rdvSq4+2.371708245126284*nuVtSq[4]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSq[3]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSq[2]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSq[1]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_F_0[17] = 2.371708245126284*nuVtSq[6]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[7]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[3]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSq[5]*rdvSq4+2.371708245126284*nuVtSq[2]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSq[4]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSq[1]*rdvSq4+2.371708245126284*nuVtSq[0]*F_0Skin[1]*rdvSq4; - vol_incr_F_0[18] = 2.371708245126284*nuVtSq[5]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[6]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[3]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[1]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSq[4]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSq[2]*rdvSq4+2.371708245126284*nuVtSq[0]*F_0Skin[2]*rdvSq4; - vol_incr_F_0[19] = 2.371708245126284*nuVtSq[4]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[5]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[2]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[1]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSq[5]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSq[3]*rdvSq4+2.371708245126284*nuVtSq[0]*F_0Skin[3]*rdvSq4; - vol_incr_F_0[20] = 2.371708245126284*nuVtSq[3]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[5]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[6]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[0]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSq[4]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSq[2]*rdvSq4+2.371708245126284*nuVtSq[1]*F_0Skin[2]*rdvSq4; - vol_incr_F_0[21] = 2.371708245126284*nuVtSq[2]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[4]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[5]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[0]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSq[5]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSq[3]*rdvSq4+2.371708245126284*nuVtSq[1]*F_0Skin[3]*rdvSq4; - vol_incr_F_0[22] = 2.371708245126284*nuVtSq[1]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[0]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[4]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[5]*nuVtSq[5]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSq[3]*rdvSq4+2.371708245126284*nuVtSq[2]*F_0Skin[3]*rdvSq4; - vol_incr_F_0[23] = 2.371708245126284*nuVtSq[0]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[1]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[2]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSq[5]*rdvSq4+2.371708245126284*nuVtSq[3]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSq[4]*rdvSq4; - vol_incr_G_1[16] = 2.371708245126284*nuVtSq[7]*G_1Skin[11]*rdvSq4+2.371708245126284*nuVtSq[6]*G_1Skin[7]*rdvSq4+2.371708245126284*nuVtSq[5]*G_1Skin[6]*rdvSq4+2.371708245126284*nuVtSq[4]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSq[3]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSq[2]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSq[1]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSq[0]*rdvSq4; - vol_incr_G_1[17] = 2.371708245126284*nuVtSq[6]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[7]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[3]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSq[5]*rdvSq4+2.371708245126284*nuVtSq[2]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSq[4]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSq[1]*rdvSq4+2.371708245126284*nuVtSq[0]*G_1Skin[1]*rdvSq4; - vol_incr_G_1[18] = 2.371708245126284*nuVtSq[5]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[6]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[3]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[1]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSq[4]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSq[2]*rdvSq4+2.371708245126284*nuVtSq[0]*G_1Skin[2]*rdvSq4; - vol_incr_G_1[19] = 2.371708245126284*nuVtSq[4]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[5]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[2]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[1]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSq[5]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSq[3]*rdvSq4+2.371708245126284*nuVtSq[0]*G_1Skin[3]*rdvSq4; - vol_incr_G_1[20] = 2.371708245126284*nuVtSq[3]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[5]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[6]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[0]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSq[4]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSq[2]*rdvSq4+2.371708245126284*nuVtSq[1]*G_1Skin[2]*rdvSq4; - vol_incr_G_1[21] = 2.371708245126284*nuVtSq[2]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[4]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[5]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[0]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSq[5]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSq[3]*rdvSq4+2.371708245126284*nuVtSq[1]*G_1Skin[3]*rdvSq4; - vol_incr_G_1[22] = 2.371708245126284*nuVtSq[1]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[0]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[4]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[5]*nuVtSq[5]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSq[3]*rdvSq4+2.371708245126284*nuVtSq[2]*G_1Skin[3]*rdvSq4; - vol_incr_G_1[23] = 2.371708245126284*nuVtSq[0]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSq[7]*rdvSq4+2.371708245126284*nuVtSq[1]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSq[6]*rdvSq4+2.371708245126284*nuVtSq[2]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSq[5]*rdvSq4+2.371708245126284*nuVtSq[3]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSq[4]*rdvSq4; + vol_incr_F_0[16] = 2.371708245126284*nuVtSqSum[7]*F_0Skin[11]*rdvSq4+2.371708245126284*nuVtSqSum[6]*F_0Skin[7]*rdvSq4+2.371708245126284*nuVtSqSum[5]*F_0Skin[6]*rdvSq4+2.371708245126284*nuVtSqSum[4]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSqSum[3]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSqSum[2]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSqSum[1]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_F_0[17] = 2.371708245126284*nuVtSqSum[6]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[7]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[3]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSqSum[5]*rdvSq4+2.371708245126284*nuVtSqSum[2]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSqSum[4]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSqSum[1]*rdvSq4+2.371708245126284*nuVtSqSum[0]*F_0Skin[1]*rdvSq4; + vol_incr_F_0[18] = 2.371708245126284*nuVtSqSum[5]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[6]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[3]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[1]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSqSum[4]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSqSum[2]*rdvSq4+2.371708245126284*nuVtSqSum[0]*F_0Skin[2]*rdvSq4; + vol_incr_F_0[19] = 2.371708245126284*nuVtSqSum[4]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[5]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[2]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[1]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSqSum[5]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSqSum[3]*rdvSq4+2.371708245126284*nuVtSqSum[0]*F_0Skin[3]*rdvSq4; + vol_incr_F_0[20] = 2.371708245126284*nuVtSqSum[3]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[5]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[6]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[0]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSqSum[4]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSqSum[2]*rdvSq4+2.371708245126284*nuVtSqSum[1]*F_0Skin[2]*rdvSq4; + vol_incr_F_0[21] = 2.371708245126284*nuVtSqSum[2]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[4]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[5]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[0]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSqSum[5]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSqSum[3]*rdvSq4+2.371708245126284*nuVtSqSum[1]*F_0Skin[3]*rdvSq4; + vol_incr_F_0[22] = 2.371708245126284*nuVtSqSum[1]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[0]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[4]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[5]*nuVtSqSum[5]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSqSum[3]*rdvSq4+2.371708245126284*nuVtSqSum[2]*F_0Skin[3]*rdvSq4; + vol_incr_F_0[23] = 2.371708245126284*nuVtSqSum[0]*F_0Skin[11]*rdvSq4+2.371708245126284*F_0Skin[0]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[1]*F_0Skin[7]*rdvSq4+2.371708245126284*F_0Skin[1]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[2]*F_0Skin[6]*rdvSq4+2.371708245126284*F_0Skin[2]*nuVtSqSum[5]*rdvSq4+2.371708245126284*nuVtSqSum[3]*F_0Skin[5]*rdvSq4+2.371708245126284*F_0Skin[3]*nuVtSqSum[4]*rdvSq4; + vol_incr_G_1[16] = 2.371708245126284*nuVtSqSum[7]*G_1Skin[11]*rdvSq4+2.371708245126284*nuVtSqSum[6]*G_1Skin[7]*rdvSq4+2.371708245126284*nuVtSqSum[5]*G_1Skin[6]*rdvSq4+2.371708245126284*nuVtSqSum[4]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSqSum[3]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSqSum[2]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSqSum[1]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSqSum[0]*rdvSq4; + vol_incr_G_1[17] = 2.371708245126284*nuVtSqSum[6]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[7]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[3]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSqSum[5]*rdvSq4+2.371708245126284*nuVtSqSum[2]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSqSum[4]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSqSum[1]*rdvSq4+2.371708245126284*nuVtSqSum[0]*G_1Skin[1]*rdvSq4; + vol_incr_G_1[18] = 2.371708245126284*nuVtSqSum[5]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[6]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[3]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[1]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSqSum[4]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSqSum[2]*rdvSq4+2.371708245126284*nuVtSqSum[0]*G_1Skin[2]*rdvSq4; + vol_incr_G_1[19] = 2.371708245126284*nuVtSqSum[4]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[5]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[2]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[1]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSqSum[5]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSqSum[3]*rdvSq4+2.371708245126284*nuVtSqSum[0]*G_1Skin[3]*rdvSq4; + vol_incr_G_1[20] = 2.371708245126284*nuVtSqSum[3]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[5]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[6]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[0]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSqSum[4]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSqSum[2]*rdvSq4+2.371708245126284*nuVtSqSum[1]*G_1Skin[2]*rdvSq4; + vol_incr_G_1[21] = 2.371708245126284*nuVtSqSum[2]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[4]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[5]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[0]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSqSum[5]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSqSum[3]*rdvSq4+2.371708245126284*nuVtSqSum[1]*G_1Skin[3]*rdvSq4; + vol_incr_G_1[22] = 2.371708245126284*nuVtSqSum[1]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[0]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[4]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[5]*nuVtSqSum[5]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSqSum[3]*rdvSq4+2.371708245126284*nuVtSqSum[2]*G_1Skin[3]*rdvSq4; + vol_incr_G_1[23] = 2.371708245126284*nuVtSqSum[0]*G_1Skin[11]*rdvSq4+2.371708245126284*G_1Skin[0]*nuVtSqSum[7]*rdvSq4+2.371708245126284*nuVtSqSum[1]*G_1Skin[7]*rdvSq4+2.371708245126284*G_1Skin[1]*nuVtSqSum[6]*rdvSq4+2.371708245126284*nuVtSqSum[2]*G_1Skin[6]*rdvSq4+2.371708245126284*G_1Skin[2]*nuVtSqSum[5]*rdvSq4+2.371708245126284*nuVtSqSum[3]*G_1Skin[5]*rdvSq4+2.371708245126284*G_1Skin[3]*nuVtSqSum[4]*rdvSq4; double temp_F_0_diff[24] = {0.0}; double temp_F_0_edge[24] = {0.0}; @@ -127,103 +130,103 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1(const doubl temp_G_1_edge[22] = (-7.5*G_1Skin[22])+5.809475019311125*G_1Skin[14]-3.354101966249685*G_1Skin[7]; temp_G_1_edge[23] = (-7.5*G_1Skin[23])+5.809475019311126*G_1Skin[15]-3.354101966249684*G_1Skin[11]; - diff_F_0_incr[0] = 0.3535533905932737*nuVtSq[7]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[7]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[6]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[5]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[3]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[2]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[1]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.3535533905932737*nuVtSq[6]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[7]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[6]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[3]*nuVtSq[5]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[1]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.3535533905932737*nuVtSq[5]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[6]*nuVtSq[7]+0.3535533905932737*temp_F_0_diff[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[2]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[2]; - diff_F_0_incr[3] = 0.3535533905932737*nuVtSq[4]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[6]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[5]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[3]; - diff_F_0_incr[4] = 0.3535533905932737*nuVtSq[7]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[4]; - diff_F_0_incr[5] = 0.3535533905932737*nuVtSq[3]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[6]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[4]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[2]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[2]; - diff_F_0_incr[6] = 0.3535533905932737*nuVtSq[2]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[5]*nuVtSq[6]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[5]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[3]; - diff_F_0_incr[7] = 0.3535533905932737*nuVtSq[1]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[5]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[3]; - diff_F_0_incr[8] = 0.3535533905932737*nuVtSq[6]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[4]; - diff_F_0_incr[9] = 0.3535533905932737*nuVtSq[5]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[4]; - diff_F_0_incr[10] = 0.3535533905932737*nuVtSq[4]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[4]; - diff_F_0_incr[11] = 0.3535533905932737*nuVtSq[0]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[5]+0.3535533905932737*temp_F_0_diff[3]*nuVtSq[4]; - diff_F_0_incr[12] = 0.3535533905932737*nuVtSq[3]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[4]; - diff_F_0_incr[13] = 0.3535533905932737*nuVtSq[2]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSq[5]; - diff_F_0_incr[14] = 0.3535533905932737*nuVtSq[1]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSq[6]; - diff_F_0_incr[15] = 0.3535533905932737*nuVtSq[0]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSq[7]; - diff_F_0_incr[16] = 0.3535533905932737*nuVtSq[7]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[16]; - diff_F_0_incr[17] = 0.3535533905932737*nuVtSq[6]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[16]; - diff_F_0_incr[18] = 0.3535533905932737*nuVtSq[5]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[16]; - diff_F_0_incr[19] = 0.3535533905932737*nuVtSq[4]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[16]; - diff_F_0_incr[20] = 0.3535533905932737*nuVtSq[3]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[16]; - diff_F_0_incr[21] = 0.3535533905932737*nuVtSq[2]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[16]; - diff_F_0_incr[22] = 0.3535533905932737*nuVtSq[1]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[16]; - diff_F_0_incr[23] = 0.3535533905932737*nuVtSq[0]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[16]; - diff_G_1_incr[0] = 0.3535533905932737*nuVtSq[7]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[7]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[6]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[5]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[3]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[2]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[1]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.3535533905932737*nuVtSq[6]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[7]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[6]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[3]*nuVtSq[5]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[1]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.3535533905932737*nuVtSq[5]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[6]*nuVtSq[7]+0.3535533905932737*temp_G_1_diff[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[2]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[2]; - diff_G_1_incr[3] = 0.3535533905932737*nuVtSq[4]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[6]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[5]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[3]; - diff_G_1_incr[4] = 0.3535533905932737*nuVtSq[7]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[4]; - diff_G_1_incr[5] = 0.3535533905932737*nuVtSq[3]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[6]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[4]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[2]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[2]; - diff_G_1_incr[6] = 0.3535533905932737*nuVtSq[2]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[5]*nuVtSq[6]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[5]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[3]; - diff_G_1_incr[7] = 0.3535533905932737*nuVtSq[1]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[5]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[3]; - diff_G_1_incr[8] = 0.3535533905932737*nuVtSq[6]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[4]; - diff_G_1_incr[9] = 0.3535533905932737*nuVtSq[5]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[4]; - diff_G_1_incr[10] = 0.3535533905932737*nuVtSq[4]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[4]; - diff_G_1_incr[11] = 0.3535533905932737*nuVtSq[0]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[5]+0.3535533905932737*temp_G_1_diff[3]*nuVtSq[4]; - diff_G_1_incr[12] = 0.3535533905932737*nuVtSq[3]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[4]; - diff_G_1_incr[13] = 0.3535533905932737*nuVtSq[2]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSq[5]; - diff_G_1_incr[14] = 0.3535533905932737*nuVtSq[1]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSq[6]; - diff_G_1_incr[15] = 0.3535533905932737*nuVtSq[0]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSq[7]; - diff_G_1_incr[16] = 0.3535533905932737*nuVtSq[7]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[16]; - diff_G_1_incr[17] = 0.3535533905932737*nuVtSq[6]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[16]; - diff_G_1_incr[18] = 0.3535533905932737*nuVtSq[5]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[16]; - diff_G_1_incr[19] = 0.3535533905932737*nuVtSq[4]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[16]; - diff_G_1_incr[20] = 0.3535533905932737*nuVtSq[3]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[16]; - diff_G_1_incr[21] = 0.3535533905932737*nuVtSq[2]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[16]; - diff_G_1_incr[22] = 0.3535533905932737*nuVtSq[1]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[16]; - diff_G_1_incr[23] = 0.3535533905932737*nuVtSq[0]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[16]; + diff_F_0_incr[0] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[7]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[6]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[5]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[3]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[2]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[1]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[7]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[6]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[3]*nuVtSqSum[5]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[1]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[6]*nuVtSqSum[7]+0.3535533905932737*temp_F_0_diff[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[2]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[2]; + diff_F_0_incr[3] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[6]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[3]; + diff_F_0_incr[4] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[4]; + diff_F_0_incr[5] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[6]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[2]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[2]; + diff_F_0_incr[6] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[5]*nuVtSqSum[6]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[3]; + diff_F_0_incr[7] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[5]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[3]; + diff_F_0_incr[8] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[4]; + diff_F_0_incr[9] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[4]; + diff_F_0_incr[10] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[4]; + diff_F_0_incr[11] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[5]+0.3535533905932737*temp_F_0_diff[3]*nuVtSqSum[4]; + diff_F_0_incr[12] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[4]; + diff_F_0_incr[13] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSqSum[5]; + diff_F_0_incr[14] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSqSum[6]; + diff_F_0_incr[15] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSqSum[7]; + diff_F_0_incr[16] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[16]; + diff_F_0_incr[17] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[16]; + diff_F_0_incr[18] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[16]; + diff_F_0_incr[19] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[16]; + diff_F_0_incr[20] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[16]; + diff_F_0_incr[21] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[16]; + diff_F_0_incr[22] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[16]; + diff_F_0_incr[23] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[16]; + diff_G_1_incr[0] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[7]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[6]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[5]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[3]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[2]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[1]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[7]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[6]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[3]*nuVtSqSum[5]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[1]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[6]*nuVtSqSum[7]+0.3535533905932737*temp_G_1_diff[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[2]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[2]; + diff_G_1_incr[3] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[6]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[3]; + diff_G_1_incr[4] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[4]; + diff_G_1_incr[5] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[6]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[2]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[2]; + diff_G_1_incr[6] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[5]*nuVtSqSum[6]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[3]; + diff_G_1_incr[7] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[5]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[3]; + diff_G_1_incr[8] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[4]; + diff_G_1_incr[9] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[4]; + diff_G_1_incr[10] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[4]; + diff_G_1_incr[11] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[5]+0.3535533905932737*temp_G_1_diff[3]*nuVtSqSum[4]; + diff_G_1_incr[12] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[4]; + diff_G_1_incr[13] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSqSum[5]; + diff_G_1_incr[14] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSqSum[6]; + diff_G_1_incr[15] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSqSum[7]; + diff_G_1_incr[16] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[16]; + diff_G_1_incr[17] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[16]; + diff_G_1_incr[18] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[16]; + diff_G_1_incr[19] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[16]; + diff_G_1_incr[20] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[16]; + diff_G_1_incr[21] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[16]; + diff_G_1_incr[22] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[16]; + diff_G_1_incr[23] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[16]; - edge_F_0_incr[0] = 0.3535533905932737*nuVtSq[7]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[7]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[6]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[5]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[3]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[2]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[1]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.3535533905932737*nuVtSq[6]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[7]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[6]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[3]*nuVtSq[5]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[1]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.3535533905932737*nuVtSq[5]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[6]*nuVtSq[7]+0.3535533905932737*temp_F_0_edge[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[2]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[2]; - edge_F_0_incr[3] = 0.3535533905932737*nuVtSq[4]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[6]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[5]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[3]; - edge_F_0_incr[4] = 0.3535533905932737*nuVtSq[7]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[4]; - edge_F_0_incr[5] = 0.3535533905932737*nuVtSq[3]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[6]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[4]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[2]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[2]; - edge_F_0_incr[6] = 0.3535533905932737*nuVtSq[2]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[5]*nuVtSq[6]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[5]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[3]; - edge_F_0_incr[7] = 0.3535533905932737*nuVtSq[1]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[5]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[3]; - edge_F_0_incr[8] = 0.3535533905932737*nuVtSq[6]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[4]; - edge_F_0_incr[9] = 0.3535533905932737*nuVtSq[5]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[4]; - edge_F_0_incr[10] = 0.3535533905932737*nuVtSq[4]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[4]; - edge_F_0_incr[11] = 0.3535533905932737*nuVtSq[0]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[5]+0.3535533905932737*temp_F_0_edge[3]*nuVtSq[4]; - edge_F_0_incr[12] = 0.3535533905932737*nuVtSq[3]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[4]; - edge_F_0_incr[13] = 0.3535533905932737*nuVtSq[2]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSq[5]; - edge_F_0_incr[14] = 0.3535533905932737*nuVtSq[1]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSq[6]; - edge_F_0_incr[15] = 0.3535533905932737*nuVtSq[0]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSq[7]; - edge_F_0_incr[16] = 0.3535533905932737*nuVtSq[7]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[16]; - edge_F_0_incr[17] = 0.3535533905932737*nuVtSq[6]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[16]; - edge_F_0_incr[18] = 0.3535533905932737*nuVtSq[5]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[16]; - edge_F_0_incr[19] = 0.3535533905932737*nuVtSq[4]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[16]; - edge_F_0_incr[20] = 0.3535533905932737*nuVtSq[3]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[16]; - edge_F_0_incr[21] = 0.3535533905932737*nuVtSq[2]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[16]; - edge_F_0_incr[22] = 0.3535533905932737*nuVtSq[1]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[16]; - edge_F_0_incr[23] = 0.3535533905932737*nuVtSq[0]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[16]; - edge_G_1_incr[0] = 0.3535533905932737*nuVtSq[7]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[7]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[6]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[5]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[3]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[2]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[1]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.3535533905932737*nuVtSq[6]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[7]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[6]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[3]*nuVtSq[5]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[1]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.3535533905932737*nuVtSq[5]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[6]*nuVtSq[7]+0.3535533905932737*temp_G_1_edge[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[2]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[2]; - edge_G_1_incr[3] = 0.3535533905932737*nuVtSq[4]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[6]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[5]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[3]; - edge_G_1_incr[4] = 0.3535533905932737*nuVtSq[7]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[4]; - edge_G_1_incr[5] = 0.3535533905932737*nuVtSq[3]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[6]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[4]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[2]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[2]; - edge_G_1_incr[6] = 0.3535533905932737*nuVtSq[2]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[5]*nuVtSq[6]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[5]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[3]; - edge_G_1_incr[7] = 0.3535533905932737*nuVtSq[1]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[5]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[3]; - edge_G_1_incr[8] = 0.3535533905932737*nuVtSq[6]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[4]; - edge_G_1_incr[9] = 0.3535533905932737*nuVtSq[5]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[4]; - edge_G_1_incr[10] = 0.3535533905932737*nuVtSq[4]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[4]; - edge_G_1_incr[11] = 0.3535533905932737*nuVtSq[0]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[5]+0.3535533905932737*temp_G_1_edge[3]*nuVtSq[4]; - edge_G_1_incr[12] = 0.3535533905932737*nuVtSq[3]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[4]; - edge_G_1_incr[13] = 0.3535533905932737*nuVtSq[2]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSq[5]; - edge_G_1_incr[14] = 0.3535533905932737*nuVtSq[1]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSq[6]; - edge_G_1_incr[15] = 0.3535533905932737*nuVtSq[0]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSq[7]; - edge_G_1_incr[16] = 0.3535533905932737*nuVtSq[7]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[16]; - edge_G_1_incr[17] = 0.3535533905932737*nuVtSq[6]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[16]; - edge_G_1_incr[18] = 0.3535533905932737*nuVtSq[5]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[16]; - edge_G_1_incr[19] = 0.3535533905932737*nuVtSq[4]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[16]; - edge_G_1_incr[20] = 0.3535533905932737*nuVtSq[3]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[16]; - edge_G_1_incr[21] = 0.3535533905932737*nuVtSq[2]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[16]; - edge_G_1_incr[22] = 0.3535533905932737*nuVtSq[1]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[16]; - edge_G_1_incr[23] = 0.3535533905932737*nuVtSq[0]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[16]; + edge_F_0_incr[0] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[7]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[6]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[5]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[3]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[2]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[1]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[7]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[6]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[3]*nuVtSqSum[5]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[1]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[6]*nuVtSqSum[7]+0.3535533905932737*temp_F_0_edge[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[2]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[2]; + edge_F_0_incr[3] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[6]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[3]; + edge_F_0_incr[4] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[4]; + edge_F_0_incr[5] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[6]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[2]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[2]; + edge_F_0_incr[6] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[5]*nuVtSqSum[6]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[3]; + edge_F_0_incr[7] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[5]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[3]; + edge_F_0_incr[8] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[4]; + edge_F_0_incr[9] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[4]; + edge_F_0_incr[10] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[4]; + edge_F_0_incr[11] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[5]+0.3535533905932737*temp_F_0_edge[3]*nuVtSqSum[4]; + edge_F_0_incr[12] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[4]; + edge_F_0_incr[13] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSqSum[5]; + edge_F_0_incr[14] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSqSum[6]; + edge_F_0_incr[15] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSqSum[7]; + edge_F_0_incr[16] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[16]; + edge_F_0_incr[17] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[16]; + edge_F_0_incr[18] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[16]; + edge_F_0_incr[19] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[16]; + edge_F_0_incr[20] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[16]; + edge_F_0_incr[21] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[16]; + edge_F_0_incr[22] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[16]; + edge_F_0_incr[23] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[16]; + edge_G_1_incr[0] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[7]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[6]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[5]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[3]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[2]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[1]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[7]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[6]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[3]*nuVtSqSum[5]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[1]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[6]*nuVtSqSum[7]+0.3535533905932737*temp_G_1_edge[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[2]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[2]; + edge_G_1_incr[3] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[6]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[3]; + edge_G_1_incr[4] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[4]; + edge_G_1_incr[5] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[6]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[2]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[2]; + edge_G_1_incr[6] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[5]*nuVtSqSum[6]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[3]; + edge_G_1_incr[7] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[5]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[3]; + edge_G_1_incr[8] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[4]; + edge_G_1_incr[9] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[4]; + edge_G_1_incr[10] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[4]; + edge_G_1_incr[11] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[5]+0.3535533905932737*temp_G_1_edge[3]*nuVtSqSum[4]; + edge_G_1_incr[12] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[4]; + edge_G_1_incr[13] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSqSum[5]; + edge_G_1_incr[14] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSqSum[6]; + edge_G_1_incr[15] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSqSum[7]; + edge_G_1_incr[16] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[16]; + edge_G_1_incr[17] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[16]; + edge_G_1_incr[18] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[16]; + edge_G_1_incr[19] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[16]; + edge_G_1_incr[20] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[16]; + edge_G_1_incr[21] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[16]; + edge_G_1_incr[22] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[16]; + edge_G_1_incr[23] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[16]; } else { @@ -310,103 +313,103 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_boundary_surfvpar_3x1v_ser_p1(const doubl temp_G_1_edge[22] = (-7.5*G_1Skin[22])-5.809475019311125*G_1Skin[14]-3.354101966249685*G_1Skin[7]; temp_G_1_edge[23] = (-7.5*G_1Skin[23])-5.809475019311126*G_1Skin[15]-3.354101966249684*G_1Skin[11]; - diff_F_0_incr[0] = 0.3535533905932737*nuVtSq[7]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[7]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[6]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[5]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[3]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[2]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[1]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[0]; - diff_F_0_incr[1] = 0.3535533905932737*nuVtSq[6]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[7]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[6]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[3]*nuVtSq[5]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[1]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[1]; - diff_F_0_incr[2] = 0.3535533905932737*nuVtSq[5]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[6]*nuVtSq[7]+0.3535533905932737*temp_F_0_diff[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[2]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[2]; - diff_F_0_incr[3] = 0.3535533905932737*nuVtSq[4]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[6]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[5]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[3]; - diff_F_0_incr[4] = 0.3535533905932737*nuVtSq[7]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[4]; - diff_F_0_incr[5] = 0.3535533905932737*nuVtSq[3]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[6]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[4]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[2]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[2]; - diff_F_0_incr[6] = 0.3535533905932737*nuVtSq[2]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[5]*nuVtSq[6]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[5]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[3]; - diff_F_0_incr[7] = 0.3535533905932737*nuVtSq[1]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[5]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[3]; - diff_F_0_incr[8] = 0.3535533905932737*nuVtSq[6]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[4]; - diff_F_0_incr[9] = 0.3535533905932737*nuVtSq[5]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[4]; - diff_F_0_incr[10] = 0.3535533905932737*nuVtSq[4]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[4]; - diff_F_0_incr[11] = 0.3535533905932737*nuVtSq[0]*temp_F_0_diff[11]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[2]*nuVtSq[5]+0.3535533905932737*temp_F_0_diff[3]*nuVtSq[4]; - diff_F_0_incr[12] = 0.3535533905932737*nuVtSq[3]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[8]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[4]; - diff_F_0_incr[13] = 0.3535533905932737*nuVtSq[2]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSq[5]; - diff_F_0_incr[14] = 0.3535533905932737*nuVtSq[1]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSq[6]; - diff_F_0_incr[15] = 0.3535533905932737*nuVtSq[0]*temp_F_0_diff[15]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[14]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[13]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[12]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[10]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[9]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSq[7]; - diff_F_0_incr[16] = 0.3535533905932737*nuVtSq[7]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[16]; - diff_F_0_incr[17] = 0.3535533905932737*nuVtSq[6]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[16]; - diff_F_0_incr[18] = 0.3535533905932737*nuVtSq[5]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[16]; - diff_F_0_incr[19] = 0.3535533905932737*nuVtSq[4]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[16]; - diff_F_0_incr[20] = 0.3535533905932737*nuVtSq[3]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[16]; - diff_F_0_incr[21] = 0.3535533905932737*nuVtSq[2]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[16]; - diff_F_0_incr[22] = 0.3535533905932737*nuVtSq[1]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[0]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[16]; - diff_F_0_incr[23] = 0.3535533905932737*nuVtSq[0]*temp_F_0_diff[23]+0.3535533905932737*nuVtSq[1]*temp_F_0_diff[22]+0.3535533905932737*nuVtSq[2]*temp_F_0_diff[21]+0.3535533905932737*nuVtSq[3]*temp_F_0_diff[20]+0.3535533905932737*nuVtSq[4]*temp_F_0_diff[19]+0.3535533905932737*nuVtSq[5]*temp_F_0_diff[18]+0.3535533905932737*nuVtSq[6]*temp_F_0_diff[17]+0.3535533905932737*nuVtSq[7]*temp_F_0_diff[16]; - diff_G_1_incr[0] = 0.3535533905932737*nuVtSq[7]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[7]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[6]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[5]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[3]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[2]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[1]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[0]; - diff_G_1_incr[1] = 0.3535533905932737*nuVtSq[6]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[7]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[6]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[3]*nuVtSq[5]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[1]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[1]; - diff_G_1_incr[2] = 0.3535533905932737*nuVtSq[5]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[6]*nuVtSq[7]+0.3535533905932737*temp_G_1_diff[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[2]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[2]; - diff_G_1_incr[3] = 0.3535533905932737*nuVtSq[4]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[6]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[5]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[3]; - diff_G_1_incr[4] = 0.3535533905932737*nuVtSq[7]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[4]; - diff_G_1_incr[5] = 0.3535533905932737*nuVtSq[3]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[6]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[4]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[2]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[2]; - diff_G_1_incr[6] = 0.3535533905932737*nuVtSq[2]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[5]*nuVtSq[6]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[5]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[3]; - diff_G_1_incr[7] = 0.3535533905932737*nuVtSq[1]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[5]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[3]; - diff_G_1_incr[8] = 0.3535533905932737*nuVtSq[6]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[4]; - diff_G_1_incr[9] = 0.3535533905932737*nuVtSq[5]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[4]; - diff_G_1_incr[10] = 0.3535533905932737*nuVtSq[4]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[4]; - diff_G_1_incr[11] = 0.3535533905932737*nuVtSq[0]*temp_G_1_diff[11]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[2]*nuVtSq[5]+0.3535533905932737*temp_G_1_diff[3]*nuVtSq[4]; - diff_G_1_incr[12] = 0.3535533905932737*nuVtSq[3]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[8]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[4]; - diff_G_1_incr[13] = 0.3535533905932737*nuVtSq[2]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSq[5]; - diff_G_1_incr[14] = 0.3535533905932737*nuVtSq[1]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSq[6]; - diff_G_1_incr[15] = 0.3535533905932737*nuVtSq[0]*temp_G_1_diff[15]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[14]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[13]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[12]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[10]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[9]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSq[7]; - diff_G_1_incr[16] = 0.3535533905932737*nuVtSq[7]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[16]; - diff_G_1_incr[17] = 0.3535533905932737*nuVtSq[6]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[16]; - diff_G_1_incr[18] = 0.3535533905932737*nuVtSq[5]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[16]; - diff_G_1_incr[19] = 0.3535533905932737*nuVtSq[4]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[16]; - diff_G_1_incr[20] = 0.3535533905932737*nuVtSq[3]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[16]; - diff_G_1_incr[21] = 0.3535533905932737*nuVtSq[2]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[16]; - diff_G_1_incr[22] = 0.3535533905932737*nuVtSq[1]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[0]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[16]; - diff_G_1_incr[23] = 0.3535533905932737*nuVtSq[0]*temp_G_1_diff[23]+0.3535533905932737*nuVtSq[1]*temp_G_1_diff[22]+0.3535533905932737*nuVtSq[2]*temp_G_1_diff[21]+0.3535533905932737*nuVtSq[3]*temp_G_1_diff[20]+0.3535533905932737*nuVtSq[4]*temp_G_1_diff[19]+0.3535533905932737*nuVtSq[5]*temp_G_1_diff[18]+0.3535533905932737*nuVtSq[6]*temp_G_1_diff[17]+0.3535533905932737*nuVtSq[7]*temp_G_1_diff[16]; + diff_F_0_incr[0] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[7]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[6]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[5]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[3]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[2]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[1]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[0]; + diff_F_0_incr[1] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[7]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[6]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[3]*nuVtSqSum[5]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[1]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[1]; + diff_F_0_incr[2] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[6]*nuVtSqSum[7]+0.3535533905932737*temp_F_0_diff[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[2]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[2]; + diff_F_0_incr[3] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[6]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[3]; + diff_F_0_incr[4] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[4]; + diff_F_0_incr[5] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[6]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[2]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[2]; + diff_F_0_incr[6] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[5]*nuVtSqSum[6]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[3]; + diff_F_0_incr[7] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[5]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[3]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[3]; + diff_F_0_incr[8] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[4]; + diff_F_0_incr[9] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[4]; + diff_F_0_incr[10] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[4]; + diff_F_0_incr[11] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[11]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[7]+0.3535533905932737*temp_F_0_diff[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[6]+0.3535533905932737*temp_F_0_diff[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[5]+0.3535533905932737*temp_F_0_diff[2]*nuVtSqSum[5]+0.3535533905932737*temp_F_0_diff[3]*nuVtSqSum[4]; + diff_F_0_incr[12] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[8]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[4]; + diff_F_0_incr[13] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSqSum[5]; + diff_F_0_incr[14] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSqSum[6]; + diff_F_0_incr[15] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[15]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[14]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[13]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[12]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[10]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[9]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[8]+0.3535533905932737*temp_F_0_diff[4]*nuVtSqSum[7]; + diff_F_0_incr[16] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[16]; + diff_F_0_incr[17] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[16]; + diff_F_0_incr[18] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[16]; + diff_F_0_incr[19] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[16]; + diff_F_0_incr[20] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[16]; + diff_F_0_incr[21] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[16]; + diff_F_0_incr[22] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[16]; + diff_F_0_incr[23] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_diff[23]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_diff[22]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_diff[21]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_diff[20]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_diff[19]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_diff[18]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_diff[17]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_diff[16]; + diff_G_1_incr[0] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[7]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[6]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[5]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[3]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[2]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[1]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[0]; + diff_G_1_incr[1] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[7]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[6]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[3]*nuVtSqSum[5]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[1]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[1]; + diff_G_1_incr[2] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[6]*nuVtSqSum[7]+0.3535533905932737*temp_G_1_diff[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[2]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[2]; + diff_G_1_incr[3] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[6]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[3]; + diff_G_1_incr[4] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[4]; + diff_G_1_incr[5] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[6]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[2]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[2]; + diff_G_1_incr[6] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[5]*nuVtSqSum[6]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[3]; + diff_G_1_incr[7] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[5]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[3]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[3]; + diff_G_1_incr[8] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[4]; + diff_G_1_incr[9] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[4]; + diff_G_1_incr[10] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[4]; + diff_G_1_incr[11] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[11]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[7]+0.3535533905932737*temp_G_1_diff[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[6]+0.3535533905932737*temp_G_1_diff[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[5]+0.3535533905932737*temp_G_1_diff[2]*nuVtSqSum[5]+0.3535533905932737*temp_G_1_diff[3]*nuVtSqSum[4]; + diff_G_1_incr[12] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[8]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[4]; + diff_G_1_incr[13] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSqSum[5]; + diff_G_1_incr[14] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSqSum[6]; + diff_G_1_incr[15] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[15]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[14]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[13]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[12]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[10]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[9]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[8]+0.3535533905932737*temp_G_1_diff[4]*nuVtSqSum[7]; + diff_G_1_incr[16] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[16]; + diff_G_1_incr[17] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[16]; + diff_G_1_incr[18] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[16]; + diff_G_1_incr[19] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[16]; + diff_G_1_incr[20] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[16]; + diff_G_1_incr[21] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[16]; + diff_G_1_incr[22] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[16]; + diff_G_1_incr[23] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_diff[23]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_diff[22]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_diff[21]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_diff[20]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_diff[19]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_diff[18]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_diff[17]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_diff[16]; - edge_F_0_incr[0] = 0.3535533905932737*nuVtSq[7]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[7]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[6]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[5]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[3]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[2]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[1]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[0]; - edge_F_0_incr[1] = 0.3535533905932737*nuVtSq[6]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[7]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[6]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[3]*nuVtSq[5]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[1]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[1]; - edge_F_0_incr[2] = 0.3535533905932737*nuVtSq[5]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[6]*nuVtSq[7]+0.3535533905932737*temp_F_0_edge[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[2]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[2]; - edge_F_0_incr[3] = 0.3535533905932737*nuVtSq[4]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[6]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[5]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[3]; - edge_F_0_incr[4] = 0.3535533905932737*nuVtSq[7]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[4]; - edge_F_0_incr[5] = 0.3535533905932737*nuVtSq[3]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[6]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[4]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[2]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[2]; - edge_F_0_incr[6] = 0.3535533905932737*nuVtSq[2]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[5]*nuVtSq[6]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[5]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[3]; - edge_F_0_incr[7] = 0.3535533905932737*nuVtSq[1]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[5]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[3]; - edge_F_0_incr[8] = 0.3535533905932737*nuVtSq[6]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[4]; - edge_F_0_incr[9] = 0.3535533905932737*nuVtSq[5]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[4]; - edge_F_0_incr[10] = 0.3535533905932737*nuVtSq[4]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[4]; - edge_F_0_incr[11] = 0.3535533905932737*nuVtSq[0]*temp_F_0_edge[11]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[2]*nuVtSq[5]+0.3535533905932737*temp_F_0_edge[3]*nuVtSq[4]; - edge_F_0_incr[12] = 0.3535533905932737*nuVtSq[3]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[8]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[4]; - edge_F_0_incr[13] = 0.3535533905932737*nuVtSq[2]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSq[5]; - edge_F_0_incr[14] = 0.3535533905932737*nuVtSq[1]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSq[6]; - edge_F_0_incr[15] = 0.3535533905932737*nuVtSq[0]*temp_F_0_edge[15]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[14]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[13]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[12]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[10]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[9]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSq[7]; - edge_F_0_incr[16] = 0.3535533905932737*nuVtSq[7]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[16]; - edge_F_0_incr[17] = 0.3535533905932737*nuVtSq[6]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[16]; - edge_F_0_incr[18] = 0.3535533905932737*nuVtSq[5]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[16]; - edge_F_0_incr[19] = 0.3535533905932737*nuVtSq[4]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[16]; - edge_F_0_incr[20] = 0.3535533905932737*nuVtSq[3]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[16]; - edge_F_0_incr[21] = 0.3535533905932737*nuVtSq[2]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[16]; - edge_F_0_incr[22] = 0.3535533905932737*nuVtSq[1]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[0]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[16]; - edge_F_0_incr[23] = 0.3535533905932737*nuVtSq[0]*temp_F_0_edge[23]+0.3535533905932737*nuVtSq[1]*temp_F_0_edge[22]+0.3535533905932737*nuVtSq[2]*temp_F_0_edge[21]+0.3535533905932737*nuVtSq[3]*temp_F_0_edge[20]+0.3535533905932737*nuVtSq[4]*temp_F_0_edge[19]+0.3535533905932737*nuVtSq[5]*temp_F_0_edge[18]+0.3535533905932737*nuVtSq[6]*temp_F_0_edge[17]+0.3535533905932737*nuVtSq[7]*temp_F_0_edge[16]; - edge_G_1_incr[0] = 0.3535533905932737*nuVtSq[7]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[7]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[6]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[5]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[3]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[2]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[1]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[0]; - edge_G_1_incr[1] = 0.3535533905932737*nuVtSq[6]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[7]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[6]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[3]*nuVtSq[5]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[1]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[1]; - edge_G_1_incr[2] = 0.3535533905932737*nuVtSq[5]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[6]*nuVtSq[7]+0.3535533905932737*temp_G_1_edge[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[4]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[2]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[2]; - edge_G_1_incr[3] = 0.3535533905932737*nuVtSq[4]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[6]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[5]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[3]; - edge_G_1_incr[4] = 0.3535533905932737*nuVtSq[7]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[4]; - edge_G_1_incr[5] = 0.3535533905932737*nuVtSq[3]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[6]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[4]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[2]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[2]; - edge_G_1_incr[6] = 0.3535533905932737*nuVtSq[2]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[5]*nuVtSq[6]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[5]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[3]; - edge_G_1_incr[7] = 0.3535533905932737*nuVtSq[1]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[5]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[3]; - edge_G_1_incr[8] = 0.3535533905932737*nuVtSq[6]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[4]; - edge_G_1_incr[9] = 0.3535533905932737*nuVtSq[5]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[4]; - edge_G_1_incr[10] = 0.3535533905932737*nuVtSq[4]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[4]; - edge_G_1_incr[11] = 0.3535533905932737*nuVtSq[0]*temp_G_1_edge[11]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[2]*nuVtSq[5]+0.3535533905932737*temp_G_1_edge[3]*nuVtSq[4]; - edge_G_1_incr[12] = 0.3535533905932737*nuVtSq[3]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[8]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[4]; - edge_G_1_incr[13] = 0.3535533905932737*nuVtSq[2]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSq[5]; - edge_G_1_incr[14] = 0.3535533905932737*nuVtSq[1]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSq[6]; - edge_G_1_incr[15] = 0.3535533905932737*nuVtSq[0]*temp_G_1_edge[15]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[14]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[13]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[12]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[10]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[9]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSq[7]; - edge_G_1_incr[16] = 0.3535533905932737*nuVtSq[7]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[16]; - edge_G_1_incr[17] = 0.3535533905932737*nuVtSq[6]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[16]; - edge_G_1_incr[18] = 0.3535533905932737*nuVtSq[5]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[16]; - edge_G_1_incr[19] = 0.3535533905932737*nuVtSq[4]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[16]; - edge_G_1_incr[20] = 0.3535533905932737*nuVtSq[3]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[16]; - edge_G_1_incr[21] = 0.3535533905932737*nuVtSq[2]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[16]; - edge_G_1_incr[22] = 0.3535533905932737*nuVtSq[1]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[0]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[16]; - edge_G_1_incr[23] = 0.3535533905932737*nuVtSq[0]*temp_G_1_edge[23]+0.3535533905932737*nuVtSq[1]*temp_G_1_edge[22]+0.3535533905932737*nuVtSq[2]*temp_G_1_edge[21]+0.3535533905932737*nuVtSq[3]*temp_G_1_edge[20]+0.3535533905932737*nuVtSq[4]*temp_G_1_edge[19]+0.3535533905932737*nuVtSq[5]*temp_G_1_edge[18]+0.3535533905932737*nuVtSq[6]*temp_G_1_edge[17]+0.3535533905932737*nuVtSq[7]*temp_G_1_edge[16]; + edge_F_0_incr[0] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[7]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[6]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[5]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[3]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[2]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[1]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[0]; + edge_F_0_incr[1] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[7]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[6]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[3]*nuVtSqSum[5]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[1]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[1]; + edge_F_0_incr[2] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[6]*nuVtSqSum[7]+0.3535533905932737*temp_F_0_edge[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[2]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[2]; + edge_F_0_incr[3] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[6]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[3]; + edge_F_0_incr[4] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[4]; + edge_F_0_incr[5] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[6]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[2]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[2]; + edge_F_0_incr[6] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[5]*nuVtSqSum[6]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[3]; + edge_F_0_incr[7] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[5]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[3]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[3]; + edge_F_0_incr[8] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[4]; + edge_F_0_incr[9] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[4]; + edge_F_0_incr[10] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[4]; + edge_F_0_incr[11] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[11]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[7]+0.3535533905932737*temp_F_0_edge[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[6]+0.3535533905932737*temp_F_0_edge[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[5]+0.3535533905932737*temp_F_0_edge[2]*nuVtSqSum[5]+0.3535533905932737*temp_F_0_edge[3]*nuVtSqSum[4]; + edge_F_0_incr[12] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[8]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[4]; + edge_F_0_incr[13] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSqSum[5]; + edge_F_0_incr[14] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSqSum[6]; + edge_F_0_incr[15] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[15]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[14]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[13]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[12]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[10]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[9]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[8]+0.3535533905932737*temp_F_0_edge[4]*nuVtSqSum[7]; + edge_F_0_incr[16] = 0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[16]; + edge_F_0_incr[17] = 0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[16]; + edge_F_0_incr[18] = 0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[16]; + edge_F_0_incr[19] = 0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[16]; + edge_F_0_incr[20] = 0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[16]; + edge_F_0_incr[21] = 0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[16]; + edge_F_0_incr[22] = 0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[16]; + edge_F_0_incr[23] = 0.3535533905932737*nuVtSqSum[0]*temp_F_0_edge[23]+0.3535533905932737*nuVtSqSum[1]*temp_F_0_edge[22]+0.3535533905932737*nuVtSqSum[2]*temp_F_0_edge[21]+0.3535533905932737*nuVtSqSum[3]*temp_F_0_edge[20]+0.3535533905932737*nuVtSqSum[4]*temp_F_0_edge[19]+0.3535533905932737*nuVtSqSum[5]*temp_F_0_edge[18]+0.3535533905932737*nuVtSqSum[6]*temp_F_0_edge[17]+0.3535533905932737*nuVtSqSum[7]*temp_F_0_edge[16]; + edge_G_1_incr[0] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[7]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[6]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[5]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[3]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[2]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[1]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[0]; + edge_G_1_incr[1] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[7]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[6]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[3]*nuVtSqSum[5]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[1]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[1]; + edge_G_1_incr[2] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[6]*nuVtSqSum[7]+0.3535533905932737*temp_G_1_edge[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[2]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[2]; + edge_G_1_incr[3] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[6]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[3]; + edge_G_1_incr[4] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[4]; + edge_G_1_incr[5] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[6]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[4]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[2]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[2]; + edge_G_1_incr[6] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[5]*nuVtSqSum[6]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[3]; + edge_G_1_incr[7] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[5]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[3]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[3]; + edge_G_1_incr[8] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[4]; + edge_G_1_incr[9] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[4]; + edge_G_1_incr[10] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[4]; + edge_G_1_incr[11] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[11]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[7]+0.3535533905932737*temp_G_1_edge[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[6]+0.3535533905932737*temp_G_1_edge[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[5]+0.3535533905932737*temp_G_1_edge[2]*nuVtSqSum[5]+0.3535533905932737*temp_G_1_edge[3]*nuVtSqSum[4]; + edge_G_1_incr[12] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[8]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[4]; + edge_G_1_incr[13] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSqSum[5]; + edge_G_1_incr[14] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSqSum[6]; + edge_G_1_incr[15] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[15]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[14]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[13]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[12]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[10]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[9]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[8]+0.3535533905932737*temp_G_1_edge[4]*nuVtSqSum[7]; + edge_G_1_incr[16] = 0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[16]; + edge_G_1_incr[17] = 0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[16]; + edge_G_1_incr[18] = 0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[16]; + edge_G_1_incr[19] = 0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[16]; + edge_G_1_incr[20] = 0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[16]; + edge_G_1_incr[21] = 0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[16]; + edge_G_1_incr[22] = 0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[16]; + edge_G_1_incr[23] = 0.3535533905932737*nuVtSqSum[0]*temp_G_1_edge[23]+0.3535533905932737*nuVtSqSum[1]*temp_G_1_edge[22]+0.3535533905932737*nuVtSqSum[2]*temp_G_1_edge[21]+0.3535533905932737*nuVtSqSum[3]*temp_G_1_edge[20]+0.3535533905932737*nuVtSqSum[4]*temp_G_1_edge[19]+0.3535533905932737*nuVtSqSum[5]*temp_G_1_edge[18]+0.3535533905932737*nuVtSqSum[6]*temp_G_1_edge[17]+0.3535533905932737*nuVtSqSum[7]*temp_G_1_edge[16]; } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1.c index f008c0270..1c33a3c3b 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[2]: cell-center coordinates. - // dxv[2]: cell spacing. - // nuVtSqSum[2]: Sum of thermal speeds squared time their respective collisionalities. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: Incremented distribution function in cell + // out: Incremented distribution functions in center cell. double rdvSq4 = 4.0/(dxv[1]*dxv[1]); + const double *nuVtSqSum = &nuPrimMomsSum[2]; + const double *F_0l = &fl[0]; const double *G_1l = &fl[6]; const double *F_0c = &fc[0]; @@ -33,18 +36,18 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p1(const double *w, con G_1_xx[4] = (-0.140625*G_1r[4])-0.140625*G_1l[4]-6.28125*G_1c[4]-0.3025768239224545*G_1r[2]+0.3025768239224545*G_1l[2]+0.4192627457812106*G_1r[0]+0.4192627457812106*G_1l[0]-0.8385254915624212*G_1c[0]; G_1_xx[5] = (-0.140625*G_1r[5])-0.140625*G_1l[5]-6.28125*G_1c[5]-0.3025768239224544*G_1r[3]+0.3025768239224544*G_1l[3]+0.4192627457812105*G_1r[1]+0.4192627457812105*G_1l[1]-0.8385254915624211*G_1c[1]; - incr_F_0[0] = 0.7071067811865475*F_0_xx[1]*nuVtSq[1]+0.7071067811865475*F_0_xx[0]*nuVtSq[0]; - incr_F_0[1] = 0.7071067811865475*F_0_xx[0]*nuVtSq[1]+0.7071067811865475*nuVtSq[0]*F_0_xx[1]; - incr_F_0[2] = 0.7071067811865475*nuVtSq[1]*F_0_xx[3]+0.7071067811865475*nuVtSq[0]*F_0_xx[2]; - incr_F_0[3] = 0.7071067811865475*nuVtSq[0]*F_0_xx[3]+0.7071067811865475*nuVtSq[1]*F_0_xx[2]; - incr_F_0[4] = 0.7071067811865475*nuVtSq[1]*F_0_xx[5]+0.7071067811865475*nuVtSq[0]*F_0_xx[4]; - incr_F_0[5] = 0.7071067811865475*nuVtSq[0]*F_0_xx[5]+0.7071067811865475*nuVtSq[1]*F_0_xx[4]; - incr_G_1[0] = 0.7071067811865475*G_1_xx[1]*nuVtSq[1]+0.7071067811865475*G_1_xx[0]*nuVtSq[0]; - incr_G_1[1] = 0.7071067811865475*G_1_xx[0]*nuVtSq[1]+0.7071067811865475*nuVtSq[0]*G_1_xx[1]; - incr_G_1[2] = 0.7071067811865475*nuVtSq[1]*G_1_xx[3]+0.7071067811865475*nuVtSq[0]*G_1_xx[2]; - incr_G_1[3] = 0.7071067811865475*nuVtSq[0]*G_1_xx[3]+0.7071067811865475*nuVtSq[1]*G_1_xx[2]; - incr_G_1[4] = 0.7071067811865475*nuVtSq[1]*G_1_xx[5]+0.7071067811865475*nuVtSq[0]*G_1_xx[4]; - incr_G_1[5] = 0.7071067811865475*nuVtSq[0]*G_1_xx[5]+0.7071067811865475*nuVtSq[1]*G_1_xx[4]; + incr_F_0[0] = 0.7071067811865475*F_0_xx[1]*nuVtSqSum[1]+0.7071067811865475*F_0_xx[0]*nuVtSqSum[0]; + incr_F_0[1] = 0.7071067811865475*F_0_xx[0]*nuVtSqSum[1]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[1]; + incr_F_0[2] = 0.7071067811865475*nuVtSqSum[1]*F_0_xx[3]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[2]; + incr_F_0[3] = 0.7071067811865475*nuVtSqSum[0]*F_0_xx[3]+0.7071067811865475*nuVtSqSum[1]*F_0_xx[2]; + incr_F_0[4] = 0.7071067811865475*nuVtSqSum[1]*F_0_xx[5]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[4]; + incr_F_0[5] = 0.7071067811865475*nuVtSqSum[0]*F_0_xx[5]+0.7071067811865475*nuVtSqSum[1]*F_0_xx[4]; + incr_G_1[0] = 0.7071067811865475*G_1_xx[1]*nuVtSqSum[1]+0.7071067811865475*G_1_xx[0]*nuVtSqSum[0]; + incr_G_1[1] = 0.7071067811865475*G_1_xx[0]*nuVtSqSum[1]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[1]; + incr_G_1[2] = 0.7071067811865475*nuVtSqSum[1]*G_1_xx[3]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[2]; + incr_G_1[3] = 0.7071067811865475*nuVtSqSum[0]*G_1_xx[3]+0.7071067811865475*nuVtSqSum[1]*G_1_xx[2]; + incr_G_1[4] = 0.7071067811865475*nuVtSqSum[1]*G_1_xx[5]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[4]; + incr_G_1[5] = 0.7071067811865475*nuVtSqSum[0]*G_1_xx[5]+0.7071067811865475*nuVtSqSum[1]*G_1_xx[4]; out_F_0[0] += incr_F_0[0]*rdvSq4; out_F_0[1] += incr_F_0[1]*rdvSq4; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2.c index e163dc995..22830efbd 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[2]: cell-center coordinates. - // dxv[2]: cell spacing. - // nuVtSqSum[3]: Sum of thermal speeds squared time their respective collisionalities. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: Incremented distribution function in cell + // out: Incremented distribution functions in center cell. double rdvSq4 = 4.0/(dxv[1]*dxv[1]); + const double *nuVtSqSum = &nuPrimMomsSum[3]; + const double *F_0l = &fl[0]; const double *G_1l = &fl[8]; const double *F_0c = &fc[0]; @@ -18,22 +21,22 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_ser_p2(const double *w, con double incr_F_0[8] = {0.0}; double incr_G_1[8] = {0.0}; - incr_F_0[0] = 0.4743416490252568*nuVtSq[1]*F_0r[7]+0.4743416490252568*nuVtSq[1]*F_0l[7]-0.9486832980505138*nuVtSq[1]*F_0c[7]-0.842012099081717*nuVtSq[2]*F_0r[6]+0.842012099081717*nuVtSq[2]*F_0l[6]+0.4743416490252568*nuVtSq[0]*F_0r[5]+0.4743416490252568*nuVtSq[0]*F_0l[5]-0.9486832980505137*nuVtSq[0]*F_0c[5]+0.6629126073623879*nuVtSq[2]*F_0r[4]+0.6629126073623879*nuVtSq[2]*F_0l[4]-1.325825214724776*nuVtSq[2]*F_0c[4]-0.8420120990817169*nuVtSq[1]*F_0r[3]+0.8420120990817169*nuVtSq[1]*F_0l[3]-0.8420120990817169*nuVtSq[0]*F_0r[2]+0.8420120990817169*nuVtSq[0]*F_0l[2]+0.6629126073623879*F_0r[1]*nuVtSq[1]+0.6629126073623879*F_0l[1]*nuVtSq[1]-1.325825214724776*F_0c[1]*nuVtSq[1]+0.6629126073623879*F_0r[0]*nuVtSq[0]+0.6629126073623879*F_0l[0]*nuVtSq[0]-1.325825214724776*F_0c[0]*nuVtSq[0]; - incr_F_0[1] = 0.4242640687119285*nuVtSq[2]*F_0r[7]+0.4743416490252568*nuVtSq[0]*F_0r[7]+0.4242640687119285*nuVtSq[2]*F_0l[7]+0.4743416490252568*nuVtSq[0]*F_0l[7]-0.848528137423857*nuVtSq[2]*F_0c[7]-0.9486832980505138*nuVtSq[0]*F_0c[7]-0.7531185165696033*nuVtSq[1]*F_0r[6]+0.7531185165696033*nuVtSq[1]*F_0l[6]+0.4743416490252568*nuVtSq[1]*F_0r[5]+0.4743416490252568*nuVtSq[1]*F_0l[5]-0.9486832980505137*nuVtSq[1]*F_0c[5]+0.592927061281571*nuVtSq[1]*F_0r[4]+0.592927061281571*nuVtSq[1]*F_0l[4]-1.185854122563142*nuVtSq[1]*F_0c[4]-0.753118516569603*nuVtSq[2]*F_0r[3]-0.8420120990817169*nuVtSq[0]*F_0r[3]+0.753118516569603*nuVtSq[2]*F_0l[3]+0.8420120990817169*nuVtSq[0]*F_0l[3]+0.592927061281571*F_0r[1]*nuVtSq[2]+0.592927061281571*F_0l[1]*nuVtSq[2]-1.185854122563142*F_0c[1]*nuVtSq[2]-0.8420120990817169*nuVtSq[1]*F_0r[2]+0.8420120990817169*nuVtSq[1]*F_0l[2]+0.6629126073623879*F_0r[0]*nuVtSq[1]+0.6629126073623879*F_0l[0]*nuVtSq[1]-1.325825214724776*F_0c[0]*nuVtSq[1]+0.6629126073623879*nuVtSq[0]*F_0r[1]+0.6629126073623879*nuVtSq[0]*F_0l[1]-1.325825214724776*nuVtSq[0]*F_0c[1]; - incr_F_0[2] = 0.522048062622111*nuVtSq[1]*F_0r[7]-0.522048062622111*nuVtSq[1]*F_0l[7]-1.027514541411701*nuVtSq[2]*F_0r[6]-1.027514541411701*nuVtSq[2]*F_0l[6]-3.778601861965611*nuVtSq[2]*F_0c[6]+0.522048062622111*nuVtSq[0]*F_0r[5]-0.522048062622111*nuVtSq[0]*F_0l[5]+0.8420120990817169*nuVtSq[2]*F_0r[4]-0.8420120990817169*nuVtSq[2]*F_0l[4]-1.027514541411701*nuVtSq[1]*F_0r[3]-1.027514541411701*nuVtSq[1]*F_0l[3]-3.778601861965611*nuVtSq[1]*F_0c[3]-1.027514541411701*nuVtSq[0]*F_0r[2]-1.027514541411701*nuVtSq[0]*F_0l[2]-3.778601861965611*nuVtSq[0]*F_0c[2]+0.8420120990817169*F_0r[1]*nuVtSq[1]-0.8420120990817169*F_0l[1]*nuVtSq[1]+0.8420120990817169*F_0r[0]*nuVtSq[0]-0.8420120990817169*F_0l[0]*nuVtSq[0]; - incr_F_0[3] = 0.466933982218043*nuVtSq[2]*F_0r[7]+0.522048062622111*nuVtSq[0]*F_0r[7]-0.466933982218043*nuVtSq[2]*F_0l[7]-0.522048062622111*nuVtSq[0]*F_0l[7]-0.9190369449864345*nuVtSq[1]*F_0r[6]-0.9190369449864345*nuVtSq[1]*F_0l[6]-3.379684249304953*nuVtSq[1]*F_0c[6]+0.522048062622111*nuVtSq[1]*F_0r[5]-0.522048062622111*nuVtSq[1]*F_0l[5]+0.753118516569603*nuVtSq[1]*F_0r[4]-0.753118516569603*nuVtSq[1]*F_0l[4]-0.9190369449864345*nuVtSq[2]*F_0r[3]-1.027514541411701*nuVtSq[0]*F_0r[3]-0.9190369449864345*nuVtSq[2]*F_0l[3]-1.027514541411701*nuVtSq[0]*F_0l[3]-3.379684249304954*nuVtSq[2]*F_0c[3]-3.778601861965611*nuVtSq[0]*F_0c[3]+0.753118516569603*F_0r[1]*nuVtSq[2]-0.753118516569603*F_0l[1]*nuVtSq[2]-1.027514541411701*nuVtSq[1]*F_0r[2]-1.027514541411701*nuVtSq[1]*F_0l[2]-3.778601861965611*nuVtSq[1]*F_0c[2]+0.8420120990817169*F_0r[0]*nuVtSq[1]-0.8420120990817169*F_0l[0]*nuVtSq[1]+0.8420120990817169*nuVtSq[0]*F_0r[1]-0.8420120990817169*nuVtSq[0]*F_0l[1]; - incr_F_0[4] = 0.4242640687119285*nuVtSq[1]*F_0r[7]+0.4242640687119285*nuVtSq[1]*F_0l[7]-0.848528137423857*nuVtSq[1]*F_0c[7]-0.5379417975497165*nuVtSq[2]*F_0r[6]-0.842012099081717*nuVtSq[0]*F_0r[6]+0.5379417975497165*nuVtSq[2]*F_0l[6]+0.842012099081717*nuVtSq[0]*F_0l[6]+0.4743416490252568*nuVtSq[2]*F_0r[5]+0.4743416490252568*nuVtSq[2]*F_0l[5]-0.9486832980505137*nuVtSq[2]*F_0c[5]+0.4235193294868364*nuVtSq[2]*F_0r[4]+0.6629126073623879*nuVtSq[0]*F_0r[4]+0.4235193294868364*nuVtSq[2]*F_0l[4]+0.6629126073623879*nuVtSq[0]*F_0l[4]-0.8470386589736728*nuVtSq[2]*F_0c[4]-1.325825214724776*nuVtSq[0]*F_0c[4]-0.753118516569603*nuVtSq[1]*F_0r[3]+0.753118516569603*nuVtSq[1]*F_0l[3]-0.8420120990817169*F_0r[2]*nuVtSq[2]+0.8420120990817169*F_0l[2]*nuVtSq[2]+0.6629126073623879*F_0r[0]*nuVtSq[2]+0.6629126073623879*F_0l[0]*nuVtSq[2]-1.325825214724776*F_0c[0]*nuVtSq[2]+0.592927061281571*F_0r[1]*nuVtSq[1]+0.592927061281571*F_0l[1]*nuVtSq[1]-1.185854122563142*F_0c[1]*nuVtSq[1]; - incr_F_0[5] = (-0.09943689110435815*nuVtSq[1]*F_0r[7])-0.09943689110435815*nuVtSq[1]*F_0l[7]-4.441514469327998*nuVtSq[1]*F_0c[7]-0.2139541240254553*nuVtSq[2]*F_0r[6]+0.2139541240254553*nuVtSq[2]*F_0l[6]-0.09943689110435816*nuVtSq[0]*F_0r[5]-0.09943689110435816*nuVtSq[0]*F_0l[5]-4.441514469327998*nuVtSq[0]*F_0c[5]+0.2964635306407854*nuVtSq[2]*F_0r[4]+0.2964635306407854*nuVtSq[2]*F_0l[4]-0.592927061281571*nuVtSq[2]*F_0c[4]-0.2139541240254554*nuVtSq[1]*F_0r[3]+0.2139541240254554*nuVtSq[1]*F_0l[3]-0.2139541240254554*nuVtSq[0]*F_0r[2]+0.2139541240254554*nuVtSq[0]*F_0l[2]+0.2964635306407854*F_0r[1]*nuVtSq[1]+0.2964635306407854*F_0l[1]*nuVtSq[1]-0.592927061281571*F_0c[1]*nuVtSq[1]+0.2964635306407854*F_0r[0]*nuVtSq[0]+0.2964635306407854*F_0l[0]*nuVtSq[0]-0.592927061281571*F_0c[0]*nuVtSq[0]; - incr_F_0[6] = 0.4669339822180429*nuVtSq[1]*F_0r[7]-0.4669339822180429*nuVtSq[1]*F_0l[7]-0.6564549607045962*nuVtSq[2]*F_0r[6]-1.027514541411701*nuVtSq[0]*F_0r[6]-0.6564549607045962*nuVtSq[2]*F_0l[6]-1.027514541411701*nuVtSq[0]*F_0l[6]-2.414060178074966*nuVtSq[2]*F_0c[6]-3.778601861965611*nuVtSq[0]*F_0c[6]+0.522048062622111*nuVtSq[2]*F_0r[5]-0.522048062622111*nuVtSq[2]*F_0l[5]+0.5379417975497165*nuVtSq[2]*F_0r[4]+0.842012099081717*nuVtSq[0]*F_0r[4]-0.5379417975497165*nuVtSq[2]*F_0l[4]-0.842012099081717*nuVtSq[0]*F_0l[4]-0.9190369449864345*nuVtSq[1]*F_0r[3]-0.9190369449864345*nuVtSq[1]*F_0l[3]-3.379684249304953*nuVtSq[1]*F_0c[3]-1.027514541411701*F_0r[2]*nuVtSq[2]-1.027514541411701*F_0l[2]*nuVtSq[2]-3.778601861965611*F_0c[2]*nuVtSq[2]+0.842012099081717*F_0r[0]*nuVtSq[2]-0.842012099081717*F_0l[0]*nuVtSq[2]+0.7531185165696033*F_0r[1]*nuVtSq[1]-0.7531185165696033*F_0l[1]*nuVtSq[1]; - incr_F_0[7] = (-0.0889390591922356*nuVtSq[2]*F_0r[7])-0.09943689110435816*nuVtSq[0]*F_0r[7]-0.0889390591922356*nuVtSq[2]*F_0l[7]-0.09943689110435816*nuVtSq[0]*F_0l[7]-3.972611310586524*nuVtSq[2]*F_0c[7]-4.441514469327998*nuVtSq[0]*F_0c[7]-0.1913663861549356*nuVtSq[1]*F_0r[6]+0.1913663861549356*nuVtSq[1]*F_0l[6]-0.09943689110435815*nuVtSq[1]*F_0r[5]-0.09943689110435815*nuVtSq[1]*F_0l[5]-4.441514469327998*nuVtSq[1]*F_0c[5]+0.2651650429449552*nuVtSq[1]*F_0r[4]+0.2651650429449552*nuVtSq[1]*F_0l[4]-0.5303300858899104*nuVtSq[1]*F_0c[4]-0.1913663861549357*nuVtSq[2]*F_0r[3]-0.2139541240254553*nuVtSq[0]*F_0r[3]+0.1913663861549357*nuVtSq[2]*F_0l[3]+0.2139541240254553*nuVtSq[0]*F_0l[3]+0.2651650429449552*F_0r[1]*nuVtSq[2]+0.2651650429449552*F_0l[1]*nuVtSq[2]-0.5303300858899104*F_0c[1]*nuVtSq[2]-0.2139541240254553*nuVtSq[1]*F_0r[2]+0.2139541240254553*nuVtSq[1]*F_0l[2]+0.2964635306407854*F_0r[0]*nuVtSq[1]+0.2964635306407854*F_0l[0]*nuVtSq[1]-0.5929270612815709*F_0c[0]*nuVtSq[1]+0.2964635306407854*nuVtSq[0]*F_0r[1]+0.2964635306407854*nuVtSq[0]*F_0l[1]-0.5929270612815709*nuVtSq[0]*F_0c[1]; - incr_G_1[0] = 0.4743416490252568*nuVtSq[1]*G_1r[7]+0.4743416490252568*nuVtSq[1]*G_1l[7]-0.9486832980505138*nuVtSq[1]*G_1c[7]-0.842012099081717*nuVtSq[2]*G_1r[6]+0.842012099081717*nuVtSq[2]*G_1l[6]+0.4743416490252568*nuVtSq[0]*G_1r[5]+0.4743416490252568*nuVtSq[0]*G_1l[5]-0.9486832980505137*nuVtSq[0]*G_1c[5]+0.6629126073623879*nuVtSq[2]*G_1r[4]+0.6629126073623879*nuVtSq[2]*G_1l[4]-1.325825214724776*nuVtSq[2]*G_1c[4]-0.8420120990817169*nuVtSq[1]*G_1r[3]+0.8420120990817169*nuVtSq[1]*G_1l[3]-0.8420120990817169*nuVtSq[0]*G_1r[2]+0.8420120990817169*nuVtSq[0]*G_1l[2]+0.6629126073623879*G_1r[1]*nuVtSq[1]+0.6629126073623879*G_1l[1]*nuVtSq[1]-1.325825214724776*G_1c[1]*nuVtSq[1]+0.6629126073623879*G_1r[0]*nuVtSq[0]+0.6629126073623879*G_1l[0]*nuVtSq[0]-1.325825214724776*G_1c[0]*nuVtSq[0]; - incr_G_1[1] = 0.4242640687119285*nuVtSq[2]*G_1r[7]+0.4743416490252568*nuVtSq[0]*G_1r[7]+0.4242640687119285*nuVtSq[2]*G_1l[7]+0.4743416490252568*nuVtSq[0]*G_1l[7]-0.848528137423857*nuVtSq[2]*G_1c[7]-0.9486832980505138*nuVtSq[0]*G_1c[7]-0.7531185165696033*nuVtSq[1]*G_1r[6]+0.7531185165696033*nuVtSq[1]*G_1l[6]+0.4743416490252568*nuVtSq[1]*G_1r[5]+0.4743416490252568*nuVtSq[1]*G_1l[5]-0.9486832980505137*nuVtSq[1]*G_1c[5]+0.592927061281571*nuVtSq[1]*G_1r[4]+0.592927061281571*nuVtSq[1]*G_1l[4]-1.185854122563142*nuVtSq[1]*G_1c[4]-0.753118516569603*nuVtSq[2]*G_1r[3]-0.8420120990817169*nuVtSq[0]*G_1r[3]+0.753118516569603*nuVtSq[2]*G_1l[3]+0.8420120990817169*nuVtSq[0]*G_1l[3]+0.592927061281571*G_1r[1]*nuVtSq[2]+0.592927061281571*G_1l[1]*nuVtSq[2]-1.185854122563142*G_1c[1]*nuVtSq[2]-0.8420120990817169*nuVtSq[1]*G_1r[2]+0.8420120990817169*nuVtSq[1]*G_1l[2]+0.6629126073623879*G_1r[0]*nuVtSq[1]+0.6629126073623879*G_1l[0]*nuVtSq[1]-1.325825214724776*G_1c[0]*nuVtSq[1]+0.6629126073623879*nuVtSq[0]*G_1r[1]+0.6629126073623879*nuVtSq[0]*G_1l[1]-1.325825214724776*nuVtSq[0]*G_1c[1]; - incr_G_1[2] = 0.522048062622111*nuVtSq[1]*G_1r[7]-0.522048062622111*nuVtSq[1]*G_1l[7]-1.027514541411701*nuVtSq[2]*G_1r[6]-1.027514541411701*nuVtSq[2]*G_1l[6]-3.778601861965611*nuVtSq[2]*G_1c[6]+0.522048062622111*nuVtSq[0]*G_1r[5]-0.522048062622111*nuVtSq[0]*G_1l[5]+0.8420120990817169*nuVtSq[2]*G_1r[4]-0.8420120990817169*nuVtSq[2]*G_1l[4]-1.027514541411701*nuVtSq[1]*G_1r[3]-1.027514541411701*nuVtSq[1]*G_1l[3]-3.778601861965611*nuVtSq[1]*G_1c[3]-1.027514541411701*nuVtSq[0]*G_1r[2]-1.027514541411701*nuVtSq[0]*G_1l[2]-3.778601861965611*nuVtSq[0]*G_1c[2]+0.8420120990817169*G_1r[1]*nuVtSq[1]-0.8420120990817169*G_1l[1]*nuVtSq[1]+0.8420120990817169*G_1r[0]*nuVtSq[0]-0.8420120990817169*G_1l[0]*nuVtSq[0]; - incr_G_1[3] = 0.466933982218043*nuVtSq[2]*G_1r[7]+0.522048062622111*nuVtSq[0]*G_1r[7]-0.466933982218043*nuVtSq[2]*G_1l[7]-0.522048062622111*nuVtSq[0]*G_1l[7]-0.9190369449864345*nuVtSq[1]*G_1r[6]-0.9190369449864345*nuVtSq[1]*G_1l[6]-3.379684249304953*nuVtSq[1]*G_1c[6]+0.522048062622111*nuVtSq[1]*G_1r[5]-0.522048062622111*nuVtSq[1]*G_1l[5]+0.753118516569603*nuVtSq[1]*G_1r[4]-0.753118516569603*nuVtSq[1]*G_1l[4]-0.9190369449864345*nuVtSq[2]*G_1r[3]-1.027514541411701*nuVtSq[0]*G_1r[3]-0.9190369449864345*nuVtSq[2]*G_1l[3]-1.027514541411701*nuVtSq[0]*G_1l[3]-3.379684249304954*nuVtSq[2]*G_1c[3]-3.778601861965611*nuVtSq[0]*G_1c[3]+0.753118516569603*G_1r[1]*nuVtSq[2]-0.753118516569603*G_1l[1]*nuVtSq[2]-1.027514541411701*nuVtSq[1]*G_1r[2]-1.027514541411701*nuVtSq[1]*G_1l[2]-3.778601861965611*nuVtSq[1]*G_1c[2]+0.8420120990817169*G_1r[0]*nuVtSq[1]-0.8420120990817169*G_1l[0]*nuVtSq[1]+0.8420120990817169*nuVtSq[0]*G_1r[1]-0.8420120990817169*nuVtSq[0]*G_1l[1]; - incr_G_1[4] = 0.4242640687119285*nuVtSq[1]*G_1r[7]+0.4242640687119285*nuVtSq[1]*G_1l[7]-0.848528137423857*nuVtSq[1]*G_1c[7]-0.5379417975497165*nuVtSq[2]*G_1r[6]-0.842012099081717*nuVtSq[0]*G_1r[6]+0.5379417975497165*nuVtSq[2]*G_1l[6]+0.842012099081717*nuVtSq[0]*G_1l[6]+0.4743416490252568*nuVtSq[2]*G_1r[5]+0.4743416490252568*nuVtSq[2]*G_1l[5]-0.9486832980505137*nuVtSq[2]*G_1c[5]+0.4235193294868364*nuVtSq[2]*G_1r[4]+0.6629126073623879*nuVtSq[0]*G_1r[4]+0.4235193294868364*nuVtSq[2]*G_1l[4]+0.6629126073623879*nuVtSq[0]*G_1l[4]-0.8470386589736728*nuVtSq[2]*G_1c[4]-1.325825214724776*nuVtSq[0]*G_1c[4]-0.753118516569603*nuVtSq[1]*G_1r[3]+0.753118516569603*nuVtSq[1]*G_1l[3]-0.8420120990817169*G_1r[2]*nuVtSq[2]+0.8420120990817169*G_1l[2]*nuVtSq[2]+0.6629126073623879*G_1r[0]*nuVtSq[2]+0.6629126073623879*G_1l[0]*nuVtSq[2]-1.325825214724776*G_1c[0]*nuVtSq[2]+0.592927061281571*G_1r[1]*nuVtSq[1]+0.592927061281571*G_1l[1]*nuVtSq[1]-1.185854122563142*G_1c[1]*nuVtSq[1]; - incr_G_1[5] = (-0.09943689110435815*nuVtSq[1]*G_1r[7])-0.09943689110435815*nuVtSq[1]*G_1l[7]-4.441514469327998*nuVtSq[1]*G_1c[7]-0.2139541240254553*nuVtSq[2]*G_1r[6]+0.2139541240254553*nuVtSq[2]*G_1l[6]-0.09943689110435816*nuVtSq[0]*G_1r[5]-0.09943689110435816*nuVtSq[0]*G_1l[5]-4.441514469327998*nuVtSq[0]*G_1c[5]+0.2964635306407854*nuVtSq[2]*G_1r[4]+0.2964635306407854*nuVtSq[2]*G_1l[4]-0.592927061281571*nuVtSq[2]*G_1c[4]-0.2139541240254554*nuVtSq[1]*G_1r[3]+0.2139541240254554*nuVtSq[1]*G_1l[3]-0.2139541240254554*nuVtSq[0]*G_1r[2]+0.2139541240254554*nuVtSq[0]*G_1l[2]+0.2964635306407854*G_1r[1]*nuVtSq[1]+0.2964635306407854*G_1l[1]*nuVtSq[1]-0.592927061281571*G_1c[1]*nuVtSq[1]+0.2964635306407854*G_1r[0]*nuVtSq[0]+0.2964635306407854*G_1l[0]*nuVtSq[0]-0.592927061281571*G_1c[0]*nuVtSq[0]; - incr_G_1[6] = 0.4669339822180429*nuVtSq[1]*G_1r[7]-0.4669339822180429*nuVtSq[1]*G_1l[7]-0.6564549607045962*nuVtSq[2]*G_1r[6]-1.027514541411701*nuVtSq[0]*G_1r[6]-0.6564549607045962*nuVtSq[2]*G_1l[6]-1.027514541411701*nuVtSq[0]*G_1l[6]-2.414060178074966*nuVtSq[2]*G_1c[6]-3.778601861965611*nuVtSq[0]*G_1c[6]+0.522048062622111*nuVtSq[2]*G_1r[5]-0.522048062622111*nuVtSq[2]*G_1l[5]+0.5379417975497165*nuVtSq[2]*G_1r[4]+0.842012099081717*nuVtSq[0]*G_1r[4]-0.5379417975497165*nuVtSq[2]*G_1l[4]-0.842012099081717*nuVtSq[0]*G_1l[4]-0.9190369449864345*nuVtSq[1]*G_1r[3]-0.9190369449864345*nuVtSq[1]*G_1l[3]-3.379684249304953*nuVtSq[1]*G_1c[3]-1.027514541411701*G_1r[2]*nuVtSq[2]-1.027514541411701*G_1l[2]*nuVtSq[2]-3.778601861965611*G_1c[2]*nuVtSq[2]+0.842012099081717*G_1r[0]*nuVtSq[2]-0.842012099081717*G_1l[0]*nuVtSq[2]+0.7531185165696033*G_1r[1]*nuVtSq[1]-0.7531185165696033*G_1l[1]*nuVtSq[1]; - incr_G_1[7] = (-0.0889390591922356*nuVtSq[2]*G_1r[7])-0.09943689110435816*nuVtSq[0]*G_1r[7]-0.0889390591922356*nuVtSq[2]*G_1l[7]-0.09943689110435816*nuVtSq[0]*G_1l[7]-3.972611310586524*nuVtSq[2]*G_1c[7]-4.441514469327998*nuVtSq[0]*G_1c[7]-0.1913663861549356*nuVtSq[1]*G_1r[6]+0.1913663861549356*nuVtSq[1]*G_1l[6]-0.09943689110435815*nuVtSq[1]*G_1r[5]-0.09943689110435815*nuVtSq[1]*G_1l[5]-4.441514469327998*nuVtSq[1]*G_1c[5]+0.2651650429449552*nuVtSq[1]*G_1r[4]+0.2651650429449552*nuVtSq[1]*G_1l[4]-0.5303300858899104*nuVtSq[1]*G_1c[4]-0.1913663861549357*nuVtSq[2]*G_1r[3]-0.2139541240254553*nuVtSq[0]*G_1r[3]+0.1913663861549357*nuVtSq[2]*G_1l[3]+0.2139541240254553*nuVtSq[0]*G_1l[3]+0.2651650429449552*G_1r[1]*nuVtSq[2]+0.2651650429449552*G_1l[1]*nuVtSq[2]-0.5303300858899104*G_1c[1]*nuVtSq[2]-0.2139541240254553*nuVtSq[1]*G_1r[2]+0.2139541240254553*nuVtSq[1]*G_1l[2]+0.2964635306407854*G_1r[0]*nuVtSq[1]+0.2964635306407854*G_1l[0]*nuVtSq[1]-0.5929270612815709*G_1c[0]*nuVtSq[1]+0.2964635306407854*nuVtSq[0]*G_1r[1]+0.2964635306407854*nuVtSq[0]*G_1l[1]-0.5929270612815709*nuVtSq[0]*G_1c[1]; + incr_F_0[0] = 0.4743416490252568*nuVtSqSum[1]*F_0r[7]+0.4743416490252568*nuVtSqSum[1]*F_0l[7]-0.9486832980505138*nuVtSqSum[1]*F_0c[7]-0.842012099081717*nuVtSqSum[2]*F_0r[6]+0.842012099081717*nuVtSqSum[2]*F_0l[6]+0.4743416490252568*nuVtSqSum[0]*F_0r[5]+0.4743416490252568*nuVtSqSum[0]*F_0l[5]-0.9486832980505137*nuVtSqSum[0]*F_0c[5]+0.6629126073623879*nuVtSqSum[2]*F_0r[4]+0.6629126073623879*nuVtSqSum[2]*F_0l[4]-1.325825214724776*nuVtSqSum[2]*F_0c[4]-0.8420120990817169*nuVtSqSum[1]*F_0r[3]+0.8420120990817169*nuVtSqSum[1]*F_0l[3]-0.8420120990817169*nuVtSqSum[0]*F_0r[2]+0.8420120990817169*nuVtSqSum[0]*F_0l[2]+0.6629126073623879*F_0r[1]*nuVtSqSum[1]+0.6629126073623879*F_0l[1]*nuVtSqSum[1]-1.325825214724776*F_0c[1]*nuVtSqSum[1]+0.6629126073623879*F_0r[0]*nuVtSqSum[0]+0.6629126073623879*F_0l[0]*nuVtSqSum[0]-1.325825214724776*F_0c[0]*nuVtSqSum[0]; + incr_F_0[1] = 0.4242640687119285*nuVtSqSum[2]*F_0r[7]+0.4743416490252568*nuVtSqSum[0]*F_0r[7]+0.4242640687119285*nuVtSqSum[2]*F_0l[7]+0.4743416490252568*nuVtSqSum[0]*F_0l[7]-0.848528137423857*nuVtSqSum[2]*F_0c[7]-0.9486832980505138*nuVtSqSum[0]*F_0c[7]-0.7531185165696033*nuVtSqSum[1]*F_0r[6]+0.7531185165696033*nuVtSqSum[1]*F_0l[6]+0.4743416490252568*nuVtSqSum[1]*F_0r[5]+0.4743416490252568*nuVtSqSum[1]*F_0l[5]-0.9486832980505137*nuVtSqSum[1]*F_0c[5]+0.592927061281571*nuVtSqSum[1]*F_0r[4]+0.592927061281571*nuVtSqSum[1]*F_0l[4]-1.185854122563142*nuVtSqSum[1]*F_0c[4]-0.753118516569603*nuVtSqSum[2]*F_0r[3]-0.8420120990817169*nuVtSqSum[0]*F_0r[3]+0.753118516569603*nuVtSqSum[2]*F_0l[3]+0.8420120990817169*nuVtSqSum[0]*F_0l[3]+0.592927061281571*F_0r[1]*nuVtSqSum[2]+0.592927061281571*F_0l[1]*nuVtSqSum[2]-1.185854122563142*F_0c[1]*nuVtSqSum[2]-0.8420120990817169*nuVtSqSum[1]*F_0r[2]+0.8420120990817169*nuVtSqSum[1]*F_0l[2]+0.6629126073623879*F_0r[0]*nuVtSqSum[1]+0.6629126073623879*F_0l[0]*nuVtSqSum[1]-1.325825214724776*F_0c[0]*nuVtSqSum[1]+0.6629126073623879*nuVtSqSum[0]*F_0r[1]+0.6629126073623879*nuVtSqSum[0]*F_0l[1]-1.325825214724776*nuVtSqSum[0]*F_0c[1]; + incr_F_0[2] = 0.522048062622111*nuVtSqSum[1]*F_0r[7]-0.522048062622111*nuVtSqSum[1]*F_0l[7]-1.027514541411701*nuVtSqSum[2]*F_0r[6]-1.027514541411701*nuVtSqSum[2]*F_0l[6]-3.778601861965611*nuVtSqSum[2]*F_0c[6]+0.522048062622111*nuVtSqSum[0]*F_0r[5]-0.522048062622111*nuVtSqSum[0]*F_0l[5]+0.8420120990817169*nuVtSqSum[2]*F_0r[4]-0.8420120990817169*nuVtSqSum[2]*F_0l[4]-1.027514541411701*nuVtSqSum[1]*F_0r[3]-1.027514541411701*nuVtSqSum[1]*F_0l[3]-3.778601861965611*nuVtSqSum[1]*F_0c[3]-1.027514541411701*nuVtSqSum[0]*F_0r[2]-1.027514541411701*nuVtSqSum[0]*F_0l[2]-3.778601861965611*nuVtSqSum[0]*F_0c[2]+0.8420120990817169*F_0r[1]*nuVtSqSum[1]-0.8420120990817169*F_0l[1]*nuVtSqSum[1]+0.8420120990817169*F_0r[0]*nuVtSqSum[0]-0.8420120990817169*F_0l[0]*nuVtSqSum[0]; + incr_F_0[3] = 0.466933982218043*nuVtSqSum[2]*F_0r[7]+0.522048062622111*nuVtSqSum[0]*F_0r[7]-0.466933982218043*nuVtSqSum[2]*F_0l[7]-0.522048062622111*nuVtSqSum[0]*F_0l[7]-0.9190369449864345*nuVtSqSum[1]*F_0r[6]-0.9190369449864345*nuVtSqSum[1]*F_0l[6]-3.379684249304953*nuVtSqSum[1]*F_0c[6]+0.522048062622111*nuVtSqSum[1]*F_0r[5]-0.522048062622111*nuVtSqSum[1]*F_0l[5]+0.753118516569603*nuVtSqSum[1]*F_0r[4]-0.753118516569603*nuVtSqSum[1]*F_0l[4]-0.9190369449864345*nuVtSqSum[2]*F_0r[3]-1.027514541411701*nuVtSqSum[0]*F_0r[3]-0.9190369449864345*nuVtSqSum[2]*F_0l[3]-1.027514541411701*nuVtSqSum[0]*F_0l[3]-3.379684249304954*nuVtSqSum[2]*F_0c[3]-3.778601861965611*nuVtSqSum[0]*F_0c[3]+0.753118516569603*F_0r[1]*nuVtSqSum[2]-0.753118516569603*F_0l[1]*nuVtSqSum[2]-1.027514541411701*nuVtSqSum[1]*F_0r[2]-1.027514541411701*nuVtSqSum[1]*F_0l[2]-3.778601861965611*nuVtSqSum[1]*F_0c[2]+0.8420120990817169*F_0r[0]*nuVtSqSum[1]-0.8420120990817169*F_0l[0]*nuVtSqSum[1]+0.8420120990817169*nuVtSqSum[0]*F_0r[1]-0.8420120990817169*nuVtSqSum[0]*F_0l[1]; + incr_F_0[4] = 0.4242640687119285*nuVtSqSum[1]*F_0r[7]+0.4242640687119285*nuVtSqSum[1]*F_0l[7]-0.848528137423857*nuVtSqSum[1]*F_0c[7]-0.5379417975497165*nuVtSqSum[2]*F_0r[6]-0.842012099081717*nuVtSqSum[0]*F_0r[6]+0.5379417975497165*nuVtSqSum[2]*F_0l[6]+0.842012099081717*nuVtSqSum[0]*F_0l[6]+0.4743416490252568*nuVtSqSum[2]*F_0r[5]+0.4743416490252568*nuVtSqSum[2]*F_0l[5]-0.9486832980505137*nuVtSqSum[2]*F_0c[5]+0.4235193294868364*nuVtSqSum[2]*F_0r[4]+0.6629126073623879*nuVtSqSum[0]*F_0r[4]+0.4235193294868364*nuVtSqSum[2]*F_0l[4]+0.6629126073623879*nuVtSqSum[0]*F_0l[4]-0.8470386589736728*nuVtSqSum[2]*F_0c[4]-1.325825214724776*nuVtSqSum[0]*F_0c[4]-0.753118516569603*nuVtSqSum[1]*F_0r[3]+0.753118516569603*nuVtSqSum[1]*F_0l[3]-0.8420120990817169*F_0r[2]*nuVtSqSum[2]+0.8420120990817169*F_0l[2]*nuVtSqSum[2]+0.6629126073623879*F_0r[0]*nuVtSqSum[2]+0.6629126073623879*F_0l[0]*nuVtSqSum[2]-1.325825214724776*F_0c[0]*nuVtSqSum[2]+0.592927061281571*F_0r[1]*nuVtSqSum[1]+0.592927061281571*F_0l[1]*nuVtSqSum[1]-1.185854122563142*F_0c[1]*nuVtSqSum[1]; + incr_F_0[5] = (-0.09943689110435815*nuVtSqSum[1]*F_0r[7])-0.09943689110435815*nuVtSqSum[1]*F_0l[7]-4.441514469327998*nuVtSqSum[1]*F_0c[7]-0.2139541240254553*nuVtSqSum[2]*F_0r[6]+0.2139541240254553*nuVtSqSum[2]*F_0l[6]-0.09943689110435816*nuVtSqSum[0]*F_0r[5]-0.09943689110435816*nuVtSqSum[0]*F_0l[5]-4.441514469327998*nuVtSqSum[0]*F_0c[5]+0.2964635306407854*nuVtSqSum[2]*F_0r[4]+0.2964635306407854*nuVtSqSum[2]*F_0l[4]-0.592927061281571*nuVtSqSum[2]*F_0c[4]-0.2139541240254554*nuVtSqSum[1]*F_0r[3]+0.2139541240254554*nuVtSqSum[1]*F_0l[3]-0.2139541240254554*nuVtSqSum[0]*F_0r[2]+0.2139541240254554*nuVtSqSum[0]*F_0l[2]+0.2964635306407854*F_0r[1]*nuVtSqSum[1]+0.2964635306407854*F_0l[1]*nuVtSqSum[1]-0.592927061281571*F_0c[1]*nuVtSqSum[1]+0.2964635306407854*F_0r[0]*nuVtSqSum[0]+0.2964635306407854*F_0l[0]*nuVtSqSum[0]-0.592927061281571*F_0c[0]*nuVtSqSum[0]; + incr_F_0[6] = 0.4669339822180429*nuVtSqSum[1]*F_0r[7]-0.4669339822180429*nuVtSqSum[1]*F_0l[7]-0.6564549607045962*nuVtSqSum[2]*F_0r[6]-1.027514541411701*nuVtSqSum[0]*F_0r[6]-0.6564549607045962*nuVtSqSum[2]*F_0l[6]-1.027514541411701*nuVtSqSum[0]*F_0l[6]-2.414060178074966*nuVtSqSum[2]*F_0c[6]-3.778601861965611*nuVtSqSum[0]*F_0c[6]+0.522048062622111*nuVtSqSum[2]*F_0r[5]-0.522048062622111*nuVtSqSum[2]*F_0l[5]+0.5379417975497165*nuVtSqSum[2]*F_0r[4]+0.842012099081717*nuVtSqSum[0]*F_0r[4]-0.5379417975497165*nuVtSqSum[2]*F_0l[4]-0.842012099081717*nuVtSqSum[0]*F_0l[4]-0.9190369449864345*nuVtSqSum[1]*F_0r[3]-0.9190369449864345*nuVtSqSum[1]*F_0l[3]-3.379684249304953*nuVtSqSum[1]*F_0c[3]-1.027514541411701*F_0r[2]*nuVtSqSum[2]-1.027514541411701*F_0l[2]*nuVtSqSum[2]-3.778601861965611*F_0c[2]*nuVtSqSum[2]+0.842012099081717*F_0r[0]*nuVtSqSum[2]-0.842012099081717*F_0l[0]*nuVtSqSum[2]+0.7531185165696033*F_0r[1]*nuVtSqSum[1]-0.7531185165696033*F_0l[1]*nuVtSqSum[1]; + incr_F_0[7] = (-0.0889390591922356*nuVtSqSum[2]*F_0r[7])-0.09943689110435816*nuVtSqSum[0]*F_0r[7]-0.0889390591922356*nuVtSqSum[2]*F_0l[7]-0.09943689110435816*nuVtSqSum[0]*F_0l[7]-3.972611310586524*nuVtSqSum[2]*F_0c[7]-4.441514469327998*nuVtSqSum[0]*F_0c[7]-0.1913663861549356*nuVtSqSum[1]*F_0r[6]+0.1913663861549356*nuVtSqSum[1]*F_0l[6]-0.09943689110435815*nuVtSqSum[1]*F_0r[5]-0.09943689110435815*nuVtSqSum[1]*F_0l[5]-4.441514469327998*nuVtSqSum[1]*F_0c[5]+0.2651650429449552*nuVtSqSum[1]*F_0r[4]+0.2651650429449552*nuVtSqSum[1]*F_0l[4]-0.5303300858899104*nuVtSqSum[1]*F_0c[4]-0.1913663861549357*nuVtSqSum[2]*F_0r[3]-0.2139541240254553*nuVtSqSum[0]*F_0r[3]+0.1913663861549357*nuVtSqSum[2]*F_0l[3]+0.2139541240254553*nuVtSqSum[0]*F_0l[3]+0.2651650429449552*F_0r[1]*nuVtSqSum[2]+0.2651650429449552*F_0l[1]*nuVtSqSum[2]-0.5303300858899104*F_0c[1]*nuVtSqSum[2]-0.2139541240254553*nuVtSqSum[1]*F_0r[2]+0.2139541240254553*nuVtSqSum[1]*F_0l[2]+0.2964635306407854*F_0r[0]*nuVtSqSum[1]+0.2964635306407854*F_0l[0]*nuVtSqSum[1]-0.5929270612815709*F_0c[0]*nuVtSqSum[1]+0.2964635306407854*nuVtSqSum[0]*F_0r[1]+0.2964635306407854*nuVtSqSum[0]*F_0l[1]-0.5929270612815709*nuVtSqSum[0]*F_0c[1]; + incr_G_1[0] = 0.4743416490252568*nuVtSqSum[1]*G_1r[7]+0.4743416490252568*nuVtSqSum[1]*G_1l[7]-0.9486832980505138*nuVtSqSum[1]*G_1c[7]-0.842012099081717*nuVtSqSum[2]*G_1r[6]+0.842012099081717*nuVtSqSum[2]*G_1l[6]+0.4743416490252568*nuVtSqSum[0]*G_1r[5]+0.4743416490252568*nuVtSqSum[0]*G_1l[5]-0.9486832980505137*nuVtSqSum[0]*G_1c[5]+0.6629126073623879*nuVtSqSum[2]*G_1r[4]+0.6629126073623879*nuVtSqSum[2]*G_1l[4]-1.325825214724776*nuVtSqSum[2]*G_1c[4]-0.8420120990817169*nuVtSqSum[1]*G_1r[3]+0.8420120990817169*nuVtSqSum[1]*G_1l[3]-0.8420120990817169*nuVtSqSum[0]*G_1r[2]+0.8420120990817169*nuVtSqSum[0]*G_1l[2]+0.6629126073623879*G_1r[1]*nuVtSqSum[1]+0.6629126073623879*G_1l[1]*nuVtSqSum[1]-1.325825214724776*G_1c[1]*nuVtSqSum[1]+0.6629126073623879*G_1r[0]*nuVtSqSum[0]+0.6629126073623879*G_1l[0]*nuVtSqSum[0]-1.325825214724776*G_1c[0]*nuVtSqSum[0]; + incr_G_1[1] = 0.4242640687119285*nuVtSqSum[2]*G_1r[7]+0.4743416490252568*nuVtSqSum[0]*G_1r[7]+0.4242640687119285*nuVtSqSum[2]*G_1l[7]+0.4743416490252568*nuVtSqSum[0]*G_1l[7]-0.848528137423857*nuVtSqSum[2]*G_1c[7]-0.9486832980505138*nuVtSqSum[0]*G_1c[7]-0.7531185165696033*nuVtSqSum[1]*G_1r[6]+0.7531185165696033*nuVtSqSum[1]*G_1l[6]+0.4743416490252568*nuVtSqSum[1]*G_1r[5]+0.4743416490252568*nuVtSqSum[1]*G_1l[5]-0.9486832980505137*nuVtSqSum[1]*G_1c[5]+0.592927061281571*nuVtSqSum[1]*G_1r[4]+0.592927061281571*nuVtSqSum[1]*G_1l[4]-1.185854122563142*nuVtSqSum[1]*G_1c[4]-0.753118516569603*nuVtSqSum[2]*G_1r[3]-0.8420120990817169*nuVtSqSum[0]*G_1r[3]+0.753118516569603*nuVtSqSum[2]*G_1l[3]+0.8420120990817169*nuVtSqSum[0]*G_1l[3]+0.592927061281571*G_1r[1]*nuVtSqSum[2]+0.592927061281571*G_1l[1]*nuVtSqSum[2]-1.185854122563142*G_1c[1]*nuVtSqSum[2]-0.8420120990817169*nuVtSqSum[1]*G_1r[2]+0.8420120990817169*nuVtSqSum[1]*G_1l[2]+0.6629126073623879*G_1r[0]*nuVtSqSum[1]+0.6629126073623879*G_1l[0]*nuVtSqSum[1]-1.325825214724776*G_1c[0]*nuVtSqSum[1]+0.6629126073623879*nuVtSqSum[0]*G_1r[1]+0.6629126073623879*nuVtSqSum[0]*G_1l[1]-1.325825214724776*nuVtSqSum[0]*G_1c[1]; + incr_G_1[2] = 0.522048062622111*nuVtSqSum[1]*G_1r[7]-0.522048062622111*nuVtSqSum[1]*G_1l[7]-1.027514541411701*nuVtSqSum[2]*G_1r[6]-1.027514541411701*nuVtSqSum[2]*G_1l[6]-3.778601861965611*nuVtSqSum[2]*G_1c[6]+0.522048062622111*nuVtSqSum[0]*G_1r[5]-0.522048062622111*nuVtSqSum[0]*G_1l[5]+0.8420120990817169*nuVtSqSum[2]*G_1r[4]-0.8420120990817169*nuVtSqSum[2]*G_1l[4]-1.027514541411701*nuVtSqSum[1]*G_1r[3]-1.027514541411701*nuVtSqSum[1]*G_1l[3]-3.778601861965611*nuVtSqSum[1]*G_1c[3]-1.027514541411701*nuVtSqSum[0]*G_1r[2]-1.027514541411701*nuVtSqSum[0]*G_1l[2]-3.778601861965611*nuVtSqSum[0]*G_1c[2]+0.8420120990817169*G_1r[1]*nuVtSqSum[1]-0.8420120990817169*G_1l[1]*nuVtSqSum[1]+0.8420120990817169*G_1r[0]*nuVtSqSum[0]-0.8420120990817169*G_1l[0]*nuVtSqSum[0]; + incr_G_1[3] = 0.466933982218043*nuVtSqSum[2]*G_1r[7]+0.522048062622111*nuVtSqSum[0]*G_1r[7]-0.466933982218043*nuVtSqSum[2]*G_1l[7]-0.522048062622111*nuVtSqSum[0]*G_1l[7]-0.9190369449864345*nuVtSqSum[1]*G_1r[6]-0.9190369449864345*nuVtSqSum[1]*G_1l[6]-3.379684249304953*nuVtSqSum[1]*G_1c[6]+0.522048062622111*nuVtSqSum[1]*G_1r[5]-0.522048062622111*nuVtSqSum[1]*G_1l[5]+0.753118516569603*nuVtSqSum[1]*G_1r[4]-0.753118516569603*nuVtSqSum[1]*G_1l[4]-0.9190369449864345*nuVtSqSum[2]*G_1r[3]-1.027514541411701*nuVtSqSum[0]*G_1r[3]-0.9190369449864345*nuVtSqSum[2]*G_1l[3]-1.027514541411701*nuVtSqSum[0]*G_1l[3]-3.379684249304954*nuVtSqSum[2]*G_1c[3]-3.778601861965611*nuVtSqSum[0]*G_1c[3]+0.753118516569603*G_1r[1]*nuVtSqSum[2]-0.753118516569603*G_1l[1]*nuVtSqSum[2]-1.027514541411701*nuVtSqSum[1]*G_1r[2]-1.027514541411701*nuVtSqSum[1]*G_1l[2]-3.778601861965611*nuVtSqSum[1]*G_1c[2]+0.8420120990817169*G_1r[0]*nuVtSqSum[1]-0.8420120990817169*G_1l[0]*nuVtSqSum[1]+0.8420120990817169*nuVtSqSum[0]*G_1r[1]-0.8420120990817169*nuVtSqSum[0]*G_1l[1]; + incr_G_1[4] = 0.4242640687119285*nuVtSqSum[1]*G_1r[7]+0.4242640687119285*nuVtSqSum[1]*G_1l[7]-0.848528137423857*nuVtSqSum[1]*G_1c[7]-0.5379417975497165*nuVtSqSum[2]*G_1r[6]-0.842012099081717*nuVtSqSum[0]*G_1r[6]+0.5379417975497165*nuVtSqSum[2]*G_1l[6]+0.842012099081717*nuVtSqSum[0]*G_1l[6]+0.4743416490252568*nuVtSqSum[2]*G_1r[5]+0.4743416490252568*nuVtSqSum[2]*G_1l[5]-0.9486832980505137*nuVtSqSum[2]*G_1c[5]+0.4235193294868364*nuVtSqSum[2]*G_1r[4]+0.6629126073623879*nuVtSqSum[0]*G_1r[4]+0.4235193294868364*nuVtSqSum[2]*G_1l[4]+0.6629126073623879*nuVtSqSum[0]*G_1l[4]-0.8470386589736728*nuVtSqSum[2]*G_1c[4]-1.325825214724776*nuVtSqSum[0]*G_1c[4]-0.753118516569603*nuVtSqSum[1]*G_1r[3]+0.753118516569603*nuVtSqSum[1]*G_1l[3]-0.8420120990817169*G_1r[2]*nuVtSqSum[2]+0.8420120990817169*G_1l[2]*nuVtSqSum[2]+0.6629126073623879*G_1r[0]*nuVtSqSum[2]+0.6629126073623879*G_1l[0]*nuVtSqSum[2]-1.325825214724776*G_1c[0]*nuVtSqSum[2]+0.592927061281571*G_1r[1]*nuVtSqSum[1]+0.592927061281571*G_1l[1]*nuVtSqSum[1]-1.185854122563142*G_1c[1]*nuVtSqSum[1]; + incr_G_1[5] = (-0.09943689110435815*nuVtSqSum[1]*G_1r[7])-0.09943689110435815*nuVtSqSum[1]*G_1l[7]-4.441514469327998*nuVtSqSum[1]*G_1c[7]-0.2139541240254553*nuVtSqSum[2]*G_1r[6]+0.2139541240254553*nuVtSqSum[2]*G_1l[6]-0.09943689110435816*nuVtSqSum[0]*G_1r[5]-0.09943689110435816*nuVtSqSum[0]*G_1l[5]-4.441514469327998*nuVtSqSum[0]*G_1c[5]+0.2964635306407854*nuVtSqSum[2]*G_1r[4]+0.2964635306407854*nuVtSqSum[2]*G_1l[4]-0.592927061281571*nuVtSqSum[2]*G_1c[4]-0.2139541240254554*nuVtSqSum[1]*G_1r[3]+0.2139541240254554*nuVtSqSum[1]*G_1l[3]-0.2139541240254554*nuVtSqSum[0]*G_1r[2]+0.2139541240254554*nuVtSqSum[0]*G_1l[2]+0.2964635306407854*G_1r[1]*nuVtSqSum[1]+0.2964635306407854*G_1l[1]*nuVtSqSum[1]-0.592927061281571*G_1c[1]*nuVtSqSum[1]+0.2964635306407854*G_1r[0]*nuVtSqSum[0]+0.2964635306407854*G_1l[0]*nuVtSqSum[0]-0.592927061281571*G_1c[0]*nuVtSqSum[0]; + incr_G_1[6] = 0.4669339822180429*nuVtSqSum[1]*G_1r[7]-0.4669339822180429*nuVtSqSum[1]*G_1l[7]-0.6564549607045962*nuVtSqSum[2]*G_1r[6]-1.027514541411701*nuVtSqSum[0]*G_1r[6]-0.6564549607045962*nuVtSqSum[2]*G_1l[6]-1.027514541411701*nuVtSqSum[0]*G_1l[6]-2.414060178074966*nuVtSqSum[2]*G_1c[6]-3.778601861965611*nuVtSqSum[0]*G_1c[6]+0.522048062622111*nuVtSqSum[2]*G_1r[5]-0.522048062622111*nuVtSqSum[2]*G_1l[5]+0.5379417975497165*nuVtSqSum[2]*G_1r[4]+0.842012099081717*nuVtSqSum[0]*G_1r[4]-0.5379417975497165*nuVtSqSum[2]*G_1l[4]-0.842012099081717*nuVtSqSum[0]*G_1l[4]-0.9190369449864345*nuVtSqSum[1]*G_1r[3]-0.9190369449864345*nuVtSqSum[1]*G_1l[3]-3.379684249304953*nuVtSqSum[1]*G_1c[3]-1.027514541411701*G_1r[2]*nuVtSqSum[2]-1.027514541411701*G_1l[2]*nuVtSqSum[2]-3.778601861965611*G_1c[2]*nuVtSqSum[2]+0.842012099081717*G_1r[0]*nuVtSqSum[2]-0.842012099081717*G_1l[0]*nuVtSqSum[2]+0.7531185165696033*G_1r[1]*nuVtSqSum[1]-0.7531185165696033*G_1l[1]*nuVtSqSum[1]; + incr_G_1[7] = (-0.0889390591922356*nuVtSqSum[2]*G_1r[7])-0.09943689110435816*nuVtSqSum[0]*G_1r[7]-0.0889390591922356*nuVtSqSum[2]*G_1l[7]-0.09943689110435816*nuVtSqSum[0]*G_1l[7]-3.972611310586524*nuVtSqSum[2]*G_1c[7]-4.441514469327998*nuVtSqSum[0]*G_1c[7]-0.1913663861549356*nuVtSqSum[1]*G_1r[6]+0.1913663861549356*nuVtSqSum[1]*G_1l[6]-0.09943689110435815*nuVtSqSum[1]*G_1r[5]-0.09943689110435815*nuVtSqSum[1]*G_1l[5]-4.441514469327998*nuVtSqSum[1]*G_1c[5]+0.2651650429449552*nuVtSqSum[1]*G_1r[4]+0.2651650429449552*nuVtSqSum[1]*G_1l[4]-0.5303300858899104*nuVtSqSum[1]*G_1c[4]-0.1913663861549357*nuVtSqSum[2]*G_1r[3]-0.2139541240254553*nuVtSqSum[0]*G_1r[3]+0.1913663861549357*nuVtSqSum[2]*G_1l[3]+0.2139541240254553*nuVtSqSum[0]*G_1l[3]+0.2651650429449552*G_1r[1]*nuVtSqSum[2]+0.2651650429449552*G_1l[1]*nuVtSqSum[2]-0.5303300858899104*G_1c[1]*nuVtSqSum[2]-0.2139541240254553*nuVtSqSum[1]*G_1r[2]+0.2139541240254553*nuVtSqSum[1]*G_1l[2]+0.2964635306407854*G_1r[0]*nuVtSqSum[1]+0.2964635306407854*G_1l[0]*nuVtSqSum[1]-0.5929270612815709*G_1c[0]*nuVtSqSum[1]+0.2964635306407854*nuVtSqSum[0]*G_1r[1]+0.2964635306407854*nuVtSqSum[0]*G_1l[1]-0.5929270612815709*nuVtSqSum[0]*G_1c[1]; out_F_0[0] += incr_F_0[0]*rdvSq4; out_F_0[1] += incr_F_0[1]*rdvSq4; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2.c index db2084376..cb81b6fa9 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[2]: cell-center coordinates. - // dxv[2]: cell spacing. - // nuVtSqSum[3]: Sum of thermal speeds squared time their respective collisionalities. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: Incremented distribution function in cell + // out: Incremented distribution functions in center cell. double rdvSq4 = 4.0/(dxv[1]*dxv[1]); + const double *nuVtSqSum = &nuPrimMomsSum[3]; + const double *F_0l = &fl[0]; const double *G_1l = &fl[9]; const double *F_0c = &fc[0]; @@ -39,24 +42,24 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_1x1v_tensor_p2(const double *w, G_1_xx[7] = (-0.140625*G_1r[7])-0.140625*G_1l[7]-6.28125*G_1c[7]-0.3025768239224544*G_1r[3]+0.3025768239224544*G_1l[3]+0.4192627457812105*G_1r[1]+0.4192627457812105*G_1l[1]-0.8385254915624211*G_1c[1]; G_1_xx[8] = (-0.140625*G_1r[8])-0.140625*G_1l[8]-6.28125*G_1c[8]-0.3025768239224544*G_1r[6]+0.3025768239224544*G_1l[6]+0.4192627457812106*G_1r[4]+0.4192627457812106*G_1l[4]-0.8385254915624212*G_1c[4]; - incr_F_0[0] = 0.7071067811865475*nuVtSq[2]*F_0_xx[4]+0.7071067811865475*F_0_xx[1]*nuVtSq[1]+0.7071067811865475*F_0_xx[0]*nuVtSq[0]; - incr_F_0[1] = 0.6324555320336759*nuVtSq[1]*F_0_xx[4]+0.6324555320336759*F_0_xx[1]*nuVtSq[2]+0.7071067811865475*F_0_xx[0]*nuVtSq[1]+0.7071067811865475*nuVtSq[0]*F_0_xx[1]; - incr_F_0[2] = 0.7071067811865475*nuVtSq[2]*F_0_xx[6]+0.7071067811865475*nuVtSq[1]*F_0_xx[3]+0.7071067811865475*nuVtSq[0]*F_0_xx[2]; - incr_F_0[3] = 0.632455532033676*nuVtSq[1]*F_0_xx[6]+0.6324555320336759*nuVtSq[2]*F_0_xx[3]+0.7071067811865475*nuVtSq[0]*F_0_xx[3]+0.7071067811865475*nuVtSq[1]*F_0_xx[2]; - incr_F_0[4] = 0.4517539514526256*nuVtSq[2]*F_0_xx[4]+0.7071067811865475*nuVtSq[0]*F_0_xx[4]+0.7071067811865475*F_0_xx[0]*nuVtSq[2]+0.6324555320336759*F_0_xx[1]*nuVtSq[1]; - incr_F_0[5] = 0.7071067811865475*nuVtSq[2]*F_0_xx[8]+0.7071067811865475*nuVtSq[1]*F_0_xx[7]+0.7071067811865475*nuVtSq[0]*F_0_xx[5]; - incr_F_0[6] = 0.4517539514526256*nuVtSq[2]*F_0_xx[6]+0.7071067811865475*nuVtSq[0]*F_0_xx[6]+0.632455532033676*nuVtSq[1]*F_0_xx[3]+0.7071067811865475*F_0_xx[2]*nuVtSq[2]; - incr_F_0[7] = 0.632455532033676*nuVtSq[1]*F_0_xx[8]+0.6324555320336759*nuVtSq[2]*F_0_xx[7]+0.7071067811865475*nuVtSq[0]*F_0_xx[7]+0.7071067811865475*nuVtSq[1]*F_0_xx[5]; - incr_F_0[8] = 0.4517539514526256*nuVtSq[2]*F_0_xx[8]+0.7071067811865475*nuVtSq[0]*F_0_xx[8]+0.632455532033676*nuVtSq[1]*F_0_xx[7]+0.7071067811865475*nuVtSq[2]*F_0_xx[5]; - incr_G_1[0] = 0.7071067811865475*nuVtSq[2]*G_1_xx[4]+0.7071067811865475*G_1_xx[1]*nuVtSq[1]+0.7071067811865475*G_1_xx[0]*nuVtSq[0]; - incr_G_1[1] = 0.6324555320336759*nuVtSq[1]*G_1_xx[4]+0.6324555320336759*G_1_xx[1]*nuVtSq[2]+0.7071067811865475*G_1_xx[0]*nuVtSq[1]+0.7071067811865475*nuVtSq[0]*G_1_xx[1]; - incr_G_1[2] = 0.7071067811865475*nuVtSq[2]*G_1_xx[6]+0.7071067811865475*nuVtSq[1]*G_1_xx[3]+0.7071067811865475*nuVtSq[0]*G_1_xx[2]; - incr_G_1[3] = 0.632455532033676*nuVtSq[1]*G_1_xx[6]+0.6324555320336759*nuVtSq[2]*G_1_xx[3]+0.7071067811865475*nuVtSq[0]*G_1_xx[3]+0.7071067811865475*nuVtSq[1]*G_1_xx[2]; - incr_G_1[4] = 0.4517539514526256*nuVtSq[2]*G_1_xx[4]+0.7071067811865475*nuVtSq[0]*G_1_xx[4]+0.7071067811865475*G_1_xx[0]*nuVtSq[2]+0.6324555320336759*G_1_xx[1]*nuVtSq[1]; - incr_G_1[5] = 0.7071067811865475*nuVtSq[2]*G_1_xx[8]+0.7071067811865475*nuVtSq[1]*G_1_xx[7]+0.7071067811865475*nuVtSq[0]*G_1_xx[5]; - incr_G_1[6] = 0.4517539514526256*nuVtSq[2]*G_1_xx[6]+0.7071067811865475*nuVtSq[0]*G_1_xx[6]+0.632455532033676*nuVtSq[1]*G_1_xx[3]+0.7071067811865475*G_1_xx[2]*nuVtSq[2]; - incr_G_1[7] = 0.632455532033676*nuVtSq[1]*G_1_xx[8]+0.6324555320336759*nuVtSq[2]*G_1_xx[7]+0.7071067811865475*nuVtSq[0]*G_1_xx[7]+0.7071067811865475*nuVtSq[1]*G_1_xx[5]; - incr_G_1[8] = 0.4517539514526256*nuVtSq[2]*G_1_xx[8]+0.7071067811865475*nuVtSq[0]*G_1_xx[8]+0.632455532033676*nuVtSq[1]*G_1_xx[7]+0.7071067811865475*nuVtSq[2]*G_1_xx[5]; + incr_F_0[0] = 0.7071067811865475*nuVtSqSum[2]*F_0_xx[4]+0.7071067811865475*F_0_xx[1]*nuVtSqSum[1]+0.7071067811865475*F_0_xx[0]*nuVtSqSum[0]; + incr_F_0[1] = 0.6324555320336759*nuVtSqSum[1]*F_0_xx[4]+0.6324555320336759*F_0_xx[1]*nuVtSqSum[2]+0.7071067811865475*F_0_xx[0]*nuVtSqSum[1]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[1]; + incr_F_0[2] = 0.7071067811865475*nuVtSqSum[2]*F_0_xx[6]+0.7071067811865475*nuVtSqSum[1]*F_0_xx[3]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[2]; + incr_F_0[3] = 0.632455532033676*nuVtSqSum[1]*F_0_xx[6]+0.6324555320336759*nuVtSqSum[2]*F_0_xx[3]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[3]+0.7071067811865475*nuVtSqSum[1]*F_0_xx[2]; + incr_F_0[4] = 0.4517539514526256*nuVtSqSum[2]*F_0_xx[4]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[4]+0.7071067811865475*F_0_xx[0]*nuVtSqSum[2]+0.6324555320336759*F_0_xx[1]*nuVtSqSum[1]; + incr_F_0[5] = 0.7071067811865475*nuVtSqSum[2]*F_0_xx[8]+0.7071067811865475*nuVtSqSum[1]*F_0_xx[7]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[5]; + incr_F_0[6] = 0.4517539514526256*nuVtSqSum[2]*F_0_xx[6]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[6]+0.632455532033676*nuVtSqSum[1]*F_0_xx[3]+0.7071067811865475*F_0_xx[2]*nuVtSqSum[2]; + incr_F_0[7] = 0.632455532033676*nuVtSqSum[1]*F_0_xx[8]+0.6324555320336759*nuVtSqSum[2]*F_0_xx[7]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[7]+0.7071067811865475*nuVtSqSum[1]*F_0_xx[5]; + incr_F_0[8] = 0.4517539514526256*nuVtSqSum[2]*F_0_xx[8]+0.7071067811865475*nuVtSqSum[0]*F_0_xx[8]+0.632455532033676*nuVtSqSum[1]*F_0_xx[7]+0.7071067811865475*nuVtSqSum[2]*F_0_xx[5]; + incr_G_1[0] = 0.7071067811865475*nuVtSqSum[2]*G_1_xx[4]+0.7071067811865475*G_1_xx[1]*nuVtSqSum[1]+0.7071067811865475*G_1_xx[0]*nuVtSqSum[0]; + incr_G_1[1] = 0.6324555320336759*nuVtSqSum[1]*G_1_xx[4]+0.6324555320336759*G_1_xx[1]*nuVtSqSum[2]+0.7071067811865475*G_1_xx[0]*nuVtSqSum[1]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[1]; + incr_G_1[2] = 0.7071067811865475*nuVtSqSum[2]*G_1_xx[6]+0.7071067811865475*nuVtSqSum[1]*G_1_xx[3]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[2]; + incr_G_1[3] = 0.632455532033676*nuVtSqSum[1]*G_1_xx[6]+0.6324555320336759*nuVtSqSum[2]*G_1_xx[3]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[3]+0.7071067811865475*nuVtSqSum[1]*G_1_xx[2]; + incr_G_1[4] = 0.4517539514526256*nuVtSqSum[2]*G_1_xx[4]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[4]+0.7071067811865475*G_1_xx[0]*nuVtSqSum[2]+0.6324555320336759*G_1_xx[1]*nuVtSqSum[1]; + incr_G_1[5] = 0.7071067811865475*nuVtSqSum[2]*G_1_xx[8]+0.7071067811865475*nuVtSqSum[1]*G_1_xx[7]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[5]; + incr_G_1[6] = 0.4517539514526256*nuVtSqSum[2]*G_1_xx[6]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[6]+0.632455532033676*nuVtSqSum[1]*G_1_xx[3]+0.7071067811865475*G_1_xx[2]*nuVtSqSum[2]; + incr_G_1[7] = 0.632455532033676*nuVtSqSum[1]*G_1_xx[8]+0.6324555320336759*nuVtSqSum[2]*G_1_xx[7]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[7]+0.7071067811865475*nuVtSqSum[1]*G_1_xx[5]; + incr_G_1[8] = 0.4517539514526256*nuVtSqSum[2]*G_1_xx[8]+0.7071067811865475*nuVtSqSum[0]*G_1_xx[8]+0.632455532033676*nuVtSqSum[1]*G_1_xx[7]+0.7071067811865475*nuVtSqSum[2]*G_1_xx[5]; out_F_0[0] += incr_F_0[0]*rdvSq4; out_F_0[1] += incr_F_0[1]*rdvSq4; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1.c index df0e83625..43e44b820 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[3]: cell-center coordinates. - // dxv[3]: cell spacing. - // nuVtSqSum[4]: Sum of thermal speeds squared time their respective collisionalities. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: Incremented distribution function in cell + // out: Incremented distribution functions in center cell. double rdvSq4 = 4.0/(dxv[2]*dxv[2]); + const double *nuVtSqSum = &nuPrimMomsSum[4]; + const double *F_0l = &fl[0]; const double *G_1l = &fl[12]; const double *F_0c = &fc[0]; @@ -45,30 +48,30 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_ser_p1(const double *w, con G_1_xx[10] = (-0.140625*G_1r[10])-0.140625*G_1l[10]-6.28125*G_1c[10]-0.3025768239224544*G_1r[6]+0.3025768239224544*G_1l[6]+0.4192627457812105*G_1r[2]+0.4192627457812105*G_1l[2]-0.8385254915624211*G_1c[2]; G_1_xx[11] = (-0.140625*G_1r[11])-0.140625*G_1l[11]-6.28125*G_1c[11]-0.3025768239224545*G_1r[7]+0.3025768239224545*G_1l[7]+0.4192627457812106*G_1r[4]+0.4192627457812106*G_1l[4]-0.8385254915624212*G_1c[4]; - incr_F_0[0] = 0.5*nuVtSq[3]*F_0_xx[4]+0.5*F_0_xx[2]*nuVtSq[2]+0.5*F_0_xx[1]*nuVtSq[1]+0.5*F_0_xx[0]*nuVtSq[0]; - incr_F_0[1] = 0.5*nuVtSq[2]*F_0_xx[4]+0.5*F_0_xx[2]*nuVtSq[3]+0.5*F_0_xx[0]*nuVtSq[1]+0.5*nuVtSq[0]*F_0_xx[1]; - incr_F_0[2] = 0.5*nuVtSq[1]*F_0_xx[4]+0.5*F_0_xx[1]*nuVtSq[3]+0.5*F_0_xx[0]*nuVtSq[2]+0.5*nuVtSq[0]*F_0_xx[2]; - incr_F_0[3] = 0.5*nuVtSq[3]*F_0_xx[7]+0.5*nuVtSq[2]*F_0_xx[6]+0.5*nuVtSq[1]*F_0_xx[5]+0.5*nuVtSq[0]*F_0_xx[3]; - incr_F_0[4] = 0.5*nuVtSq[0]*F_0_xx[4]+0.5*F_0_xx[0]*nuVtSq[3]+0.5*F_0_xx[1]*nuVtSq[2]+0.5*nuVtSq[1]*F_0_xx[2]; - incr_F_0[5] = 0.5*nuVtSq[2]*F_0_xx[7]+0.5*nuVtSq[3]*F_0_xx[6]+0.5*nuVtSq[0]*F_0_xx[5]+0.5*nuVtSq[1]*F_0_xx[3]; - incr_F_0[6] = 0.5*nuVtSq[1]*F_0_xx[7]+0.5*nuVtSq[0]*F_0_xx[6]+0.5*nuVtSq[3]*F_0_xx[5]+0.5*nuVtSq[2]*F_0_xx[3]; - incr_F_0[7] = 0.5*nuVtSq[0]*F_0_xx[7]+0.5*nuVtSq[1]*F_0_xx[6]+0.5*nuVtSq[2]*F_0_xx[5]+0.5*F_0_xx[3]*nuVtSq[3]; - incr_F_0[8] = 0.5*nuVtSq[3]*F_0_xx[11]+0.5000000000000001*nuVtSq[2]*F_0_xx[10]+0.5000000000000001*nuVtSq[1]*F_0_xx[9]+0.5*nuVtSq[0]*F_0_xx[8]; - incr_F_0[9] = 0.5000000000000001*nuVtSq[2]*F_0_xx[11]+0.5*nuVtSq[3]*F_0_xx[10]+0.5*nuVtSq[0]*F_0_xx[9]+0.5000000000000001*nuVtSq[1]*F_0_xx[8]; - incr_F_0[10] = 0.5000000000000001*nuVtSq[1]*F_0_xx[11]+0.5*nuVtSq[0]*F_0_xx[10]+0.5*nuVtSq[3]*F_0_xx[9]+0.5000000000000001*nuVtSq[2]*F_0_xx[8]; - incr_F_0[11] = 0.5*nuVtSq[0]*F_0_xx[11]+0.5000000000000001*nuVtSq[1]*F_0_xx[10]+0.5000000000000001*nuVtSq[2]*F_0_xx[9]+0.5*nuVtSq[3]*F_0_xx[8]; - incr_G_1[0] = 0.5*nuVtSq[3]*G_1_xx[4]+0.5*G_1_xx[2]*nuVtSq[2]+0.5*G_1_xx[1]*nuVtSq[1]+0.5*G_1_xx[0]*nuVtSq[0]; - incr_G_1[1] = 0.5*nuVtSq[2]*G_1_xx[4]+0.5*G_1_xx[2]*nuVtSq[3]+0.5*G_1_xx[0]*nuVtSq[1]+0.5*nuVtSq[0]*G_1_xx[1]; - incr_G_1[2] = 0.5*nuVtSq[1]*G_1_xx[4]+0.5*G_1_xx[1]*nuVtSq[3]+0.5*G_1_xx[0]*nuVtSq[2]+0.5*nuVtSq[0]*G_1_xx[2]; - incr_G_1[3] = 0.5*nuVtSq[3]*G_1_xx[7]+0.5*nuVtSq[2]*G_1_xx[6]+0.5*nuVtSq[1]*G_1_xx[5]+0.5*nuVtSq[0]*G_1_xx[3]; - incr_G_1[4] = 0.5*nuVtSq[0]*G_1_xx[4]+0.5*G_1_xx[0]*nuVtSq[3]+0.5*G_1_xx[1]*nuVtSq[2]+0.5*nuVtSq[1]*G_1_xx[2]; - incr_G_1[5] = 0.5*nuVtSq[2]*G_1_xx[7]+0.5*nuVtSq[3]*G_1_xx[6]+0.5*nuVtSq[0]*G_1_xx[5]+0.5*nuVtSq[1]*G_1_xx[3]; - incr_G_1[6] = 0.5*nuVtSq[1]*G_1_xx[7]+0.5*nuVtSq[0]*G_1_xx[6]+0.5*nuVtSq[3]*G_1_xx[5]+0.5*nuVtSq[2]*G_1_xx[3]; - incr_G_1[7] = 0.5*nuVtSq[0]*G_1_xx[7]+0.5*nuVtSq[1]*G_1_xx[6]+0.5*nuVtSq[2]*G_1_xx[5]+0.5*G_1_xx[3]*nuVtSq[3]; - incr_G_1[8] = 0.5*nuVtSq[3]*G_1_xx[11]+0.5000000000000001*nuVtSq[2]*G_1_xx[10]+0.5000000000000001*nuVtSq[1]*G_1_xx[9]+0.5*nuVtSq[0]*G_1_xx[8]; - incr_G_1[9] = 0.5000000000000001*nuVtSq[2]*G_1_xx[11]+0.5*nuVtSq[3]*G_1_xx[10]+0.5*nuVtSq[0]*G_1_xx[9]+0.5000000000000001*nuVtSq[1]*G_1_xx[8]; - incr_G_1[10] = 0.5000000000000001*nuVtSq[1]*G_1_xx[11]+0.5*nuVtSq[0]*G_1_xx[10]+0.5*nuVtSq[3]*G_1_xx[9]+0.5000000000000001*nuVtSq[2]*G_1_xx[8]; - incr_G_1[11] = 0.5*nuVtSq[0]*G_1_xx[11]+0.5000000000000001*nuVtSq[1]*G_1_xx[10]+0.5000000000000001*nuVtSq[2]*G_1_xx[9]+0.5*nuVtSq[3]*G_1_xx[8]; + incr_F_0[0] = 0.5*nuVtSqSum[3]*F_0_xx[4]+0.5*F_0_xx[2]*nuVtSqSum[2]+0.5*F_0_xx[1]*nuVtSqSum[1]+0.5*F_0_xx[0]*nuVtSqSum[0]; + incr_F_0[1] = 0.5*nuVtSqSum[2]*F_0_xx[4]+0.5*F_0_xx[2]*nuVtSqSum[3]+0.5*F_0_xx[0]*nuVtSqSum[1]+0.5*nuVtSqSum[0]*F_0_xx[1]; + incr_F_0[2] = 0.5*nuVtSqSum[1]*F_0_xx[4]+0.5*F_0_xx[1]*nuVtSqSum[3]+0.5*F_0_xx[0]*nuVtSqSum[2]+0.5*nuVtSqSum[0]*F_0_xx[2]; + incr_F_0[3] = 0.5*nuVtSqSum[3]*F_0_xx[7]+0.5*nuVtSqSum[2]*F_0_xx[6]+0.5*nuVtSqSum[1]*F_0_xx[5]+0.5*nuVtSqSum[0]*F_0_xx[3]; + incr_F_0[4] = 0.5*nuVtSqSum[0]*F_0_xx[4]+0.5*F_0_xx[0]*nuVtSqSum[3]+0.5*F_0_xx[1]*nuVtSqSum[2]+0.5*nuVtSqSum[1]*F_0_xx[2]; + incr_F_0[5] = 0.5*nuVtSqSum[2]*F_0_xx[7]+0.5*nuVtSqSum[3]*F_0_xx[6]+0.5*nuVtSqSum[0]*F_0_xx[5]+0.5*nuVtSqSum[1]*F_0_xx[3]; + incr_F_0[6] = 0.5*nuVtSqSum[1]*F_0_xx[7]+0.5*nuVtSqSum[0]*F_0_xx[6]+0.5*nuVtSqSum[3]*F_0_xx[5]+0.5*nuVtSqSum[2]*F_0_xx[3]; + incr_F_0[7] = 0.5*nuVtSqSum[0]*F_0_xx[7]+0.5*nuVtSqSum[1]*F_0_xx[6]+0.5*nuVtSqSum[2]*F_0_xx[5]+0.5*F_0_xx[3]*nuVtSqSum[3]; + incr_F_0[8] = 0.5*nuVtSqSum[3]*F_0_xx[11]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[10]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[9]+0.5*nuVtSqSum[0]*F_0_xx[8]; + incr_F_0[9] = 0.5000000000000001*nuVtSqSum[2]*F_0_xx[11]+0.5*nuVtSqSum[3]*F_0_xx[10]+0.5*nuVtSqSum[0]*F_0_xx[9]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[8]; + incr_F_0[10] = 0.5000000000000001*nuVtSqSum[1]*F_0_xx[11]+0.5*nuVtSqSum[0]*F_0_xx[10]+0.5*nuVtSqSum[3]*F_0_xx[9]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[8]; + incr_F_0[11] = 0.5*nuVtSqSum[0]*F_0_xx[11]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[10]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[9]+0.5*nuVtSqSum[3]*F_0_xx[8]; + incr_G_1[0] = 0.5*nuVtSqSum[3]*G_1_xx[4]+0.5*G_1_xx[2]*nuVtSqSum[2]+0.5*G_1_xx[1]*nuVtSqSum[1]+0.5*G_1_xx[0]*nuVtSqSum[0]; + incr_G_1[1] = 0.5*nuVtSqSum[2]*G_1_xx[4]+0.5*G_1_xx[2]*nuVtSqSum[3]+0.5*G_1_xx[0]*nuVtSqSum[1]+0.5*nuVtSqSum[0]*G_1_xx[1]; + incr_G_1[2] = 0.5*nuVtSqSum[1]*G_1_xx[4]+0.5*G_1_xx[1]*nuVtSqSum[3]+0.5*G_1_xx[0]*nuVtSqSum[2]+0.5*nuVtSqSum[0]*G_1_xx[2]; + incr_G_1[3] = 0.5*nuVtSqSum[3]*G_1_xx[7]+0.5*nuVtSqSum[2]*G_1_xx[6]+0.5*nuVtSqSum[1]*G_1_xx[5]+0.5*nuVtSqSum[0]*G_1_xx[3]; + incr_G_1[4] = 0.5*nuVtSqSum[0]*G_1_xx[4]+0.5*G_1_xx[0]*nuVtSqSum[3]+0.5*G_1_xx[1]*nuVtSqSum[2]+0.5*nuVtSqSum[1]*G_1_xx[2]; + incr_G_1[5] = 0.5*nuVtSqSum[2]*G_1_xx[7]+0.5*nuVtSqSum[3]*G_1_xx[6]+0.5*nuVtSqSum[0]*G_1_xx[5]+0.5*nuVtSqSum[1]*G_1_xx[3]; + incr_G_1[6] = 0.5*nuVtSqSum[1]*G_1_xx[7]+0.5*nuVtSqSum[0]*G_1_xx[6]+0.5*nuVtSqSum[3]*G_1_xx[5]+0.5*nuVtSqSum[2]*G_1_xx[3]; + incr_G_1[7] = 0.5*nuVtSqSum[0]*G_1_xx[7]+0.5*nuVtSqSum[1]*G_1_xx[6]+0.5*nuVtSqSum[2]*G_1_xx[5]+0.5*G_1_xx[3]*nuVtSqSum[3]; + incr_G_1[8] = 0.5*nuVtSqSum[3]*G_1_xx[11]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[10]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[9]+0.5*nuVtSqSum[0]*G_1_xx[8]; + incr_G_1[9] = 0.5000000000000001*nuVtSqSum[2]*G_1_xx[11]+0.5*nuVtSqSum[3]*G_1_xx[10]+0.5*nuVtSqSum[0]*G_1_xx[9]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[8]; + incr_G_1[10] = 0.5000000000000001*nuVtSqSum[1]*G_1_xx[11]+0.5*nuVtSqSum[0]*G_1_xx[10]+0.5*nuVtSqSum[3]*G_1_xx[9]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[8]; + incr_G_1[11] = 0.5*nuVtSqSum[0]*G_1_xx[11]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[10]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[9]+0.5*nuVtSqSum[3]*G_1_xx[8]; out_F_0[0] += incr_F_0[0]*rdvSq4; out_F_0[1] += incr_F_0[1]*rdvSq4; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2.c index 3a727150b..5ff286ce1 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[3]: cell-center coordinates. - // dxv[3]: cell spacing. - // nuVtSqSum[9]: Sum of thermal speeds squared time their respective collisionalities. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: Incremented distribution function in cell + // out: Incremented distribution functions in center cell. double rdvSq4 = 4.0/(dxv[2]*dxv[2]); + const double *nuVtSqSum = &nuPrimMomsSum[9]; + const double *F_0l = &fl[0]; const double *G_1l = &fl[27]; const double *F_0c = &fc[0]; @@ -75,60 +78,60 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_2x1v_tensor_p2(const double *w, G_1_xx[25] = (-0.140625*G_1r[25])-0.140625*G_1l[25]-6.28125*G_1c[25]-0.3025768239224545*G_1r[18]+0.3025768239224545*G_1l[18]+0.4192627457812105*G_1r[12]+0.4192627457812105*G_1l[12]-0.8385254915624211*G_1c[12]; G_1_xx[26] = (-0.140625*G_1r[26])-0.140625*G_1l[26]-6.28125*G_1c[26]-0.3025768239224545*G_1r[23]+0.3025768239224545*G_1l[23]+0.4192627457812106*G_1r[20]+0.4192627457812106*G_1l[20]-0.8385254915624212*G_1c[20]; - incr_F_0[0] = 0.5*nuVtSq[8]*F_0_xx[20]+0.5*nuVtSq[7]*F_0_xx[12]+0.5*nuVtSq[6]*F_0_xx[11]+0.5*nuVtSq[5]*F_0_xx[8]+0.5*nuVtSq[4]*F_0_xx[7]+0.5*nuVtSq[3]*F_0_xx[4]+0.5*F_0_xx[2]*nuVtSq[2]+0.5*F_0_xx[1]*nuVtSq[1]+0.5*F_0_xx[0]*nuVtSq[0]; - incr_F_0[1] = 0.447213595499958*nuVtSq[7]*F_0_xx[20]+0.447213595499958*nuVtSq[8]*F_0_xx[12]+0.5000000000000001*nuVtSq[5]*F_0_xx[12]+0.447213595499958*nuVtSq[3]*F_0_xx[11]+0.5000000000000001*nuVtSq[7]*F_0_xx[8]+0.4472135954999579*nuVtSq[1]*F_0_xx[7]+0.447213595499958*F_0_xx[4]*nuVtSq[6]+0.4472135954999579*F_0_xx[1]*nuVtSq[4]+0.5*nuVtSq[2]*F_0_xx[4]+0.5*F_0_xx[2]*nuVtSq[3]+0.5*F_0_xx[0]*nuVtSq[1]+0.5*nuVtSq[0]*F_0_xx[1]; - incr_F_0[2] = 0.447213595499958*nuVtSq[6]*F_0_xx[20]+0.447213595499958*nuVtSq[3]*F_0_xx[12]+0.447213595499958*nuVtSq[8]*F_0_xx[11]+0.5000000000000001*nuVtSq[4]*F_0_xx[11]+0.4472135954999579*nuVtSq[2]*F_0_xx[8]+0.447213595499958*F_0_xx[4]*nuVtSq[7]+0.5000000000000001*nuVtSq[6]*F_0_xx[7]+0.4472135954999579*F_0_xx[2]*nuVtSq[5]+0.5*nuVtSq[1]*F_0_xx[4]+0.5*F_0_xx[1]*nuVtSq[3]+0.5*F_0_xx[0]*nuVtSq[2]+0.5*nuVtSq[0]*F_0_xx[2]; - incr_F_0[3] = 0.5*nuVtSq[8]*F_0_xx[23]+0.5000000000000001*nuVtSq[7]*F_0_xx[18]+0.5000000000000001*nuVtSq[6]*F_0_xx[17]+0.5000000000000001*nuVtSq[5]*F_0_xx[14]+0.5000000000000001*nuVtSq[4]*F_0_xx[13]+0.5*nuVtSq[3]*F_0_xx[10]+0.5*nuVtSq[2]*F_0_xx[6]+0.5*nuVtSq[1]*F_0_xx[5]+0.5*nuVtSq[0]*F_0_xx[3]; - incr_F_0[4] = 0.4*nuVtSq[3]*F_0_xx[20]+0.4*nuVtSq[6]*F_0_xx[12]+0.447213595499958*nuVtSq[2]*F_0_xx[12]+0.4*nuVtSq[7]*F_0_xx[11]+0.447213595499958*nuVtSq[1]*F_0_xx[11]+0.4*F_0_xx[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*F_0_xx[8]+0.447213595499958*F_0_xx[2]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*F_0_xx[7]+0.447213595499958*F_0_xx[1]*nuVtSq[6]+0.4472135954999579*F_0_xx[4]*nuVtSq[5]+0.4472135954999579*F_0_xx[4]*nuVtSq[4]+0.5*nuVtSq[0]*F_0_xx[4]+0.5*F_0_xx[0]*nuVtSq[3]+0.5*F_0_xx[1]*nuVtSq[2]+0.5*nuVtSq[1]*F_0_xx[2]; - incr_F_0[5] = 0.447213595499958*nuVtSq[7]*F_0_xx[23]+0.4472135954999579*nuVtSq[8]*F_0_xx[18]+0.5*nuVtSq[5]*F_0_xx[18]+0.4472135954999579*nuVtSq[3]*F_0_xx[17]+0.5*nuVtSq[7]*F_0_xx[14]+0.447213595499958*nuVtSq[1]*F_0_xx[13]+0.447213595499958*nuVtSq[6]*F_0_xx[10]+0.5*nuVtSq[2]*F_0_xx[10]+0.5*nuVtSq[3]*F_0_xx[6]+0.4472135954999579*nuVtSq[4]*F_0_xx[5]+0.5*nuVtSq[0]*F_0_xx[5]+0.5*nuVtSq[1]*F_0_xx[3]; - incr_F_0[6] = 0.447213595499958*nuVtSq[6]*F_0_xx[23]+0.4472135954999579*nuVtSq[3]*F_0_xx[18]+0.4472135954999579*nuVtSq[8]*F_0_xx[17]+0.5*nuVtSq[4]*F_0_xx[17]+0.447213595499958*nuVtSq[2]*F_0_xx[14]+0.5*nuVtSq[6]*F_0_xx[13]+0.447213595499958*nuVtSq[7]*F_0_xx[10]+0.5*nuVtSq[1]*F_0_xx[10]+0.4472135954999579*nuVtSq[5]*F_0_xx[6]+0.5*nuVtSq[0]*F_0_xx[6]+0.5*nuVtSq[3]*F_0_xx[5]+0.5*nuVtSq[2]*F_0_xx[3]; - incr_F_0[7] = 0.31943828249997*nuVtSq[8]*F_0_xx[20]+0.5*nuVtSq[5]*F_0_xx[20]+0.4472135954999579*nuVtSq[7]*F_0_xx[12]+0.31943828249997*nuVtSq[6]*F_0_xx[11]+0.5000000000000001*nuVtSq[2]*F_0_xx[11]+0.5*F_0_xx[8]*nuVtSq[8]+0.31943828249997*nuVtSq[4]*F_0_xx[7]+0.5*nuVtSq[0]*F_0_xx[7]+0.5000000000000001*F_0_xx[2]*nuVtSq[6]+0.5*F_0_xx[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[3]*F_0_xx[4]+0.4472135954999579*F_0_xx[1]*nuVtSq[1]; - incr_F_0[8] = 0.31943828249997*nuVtSq[8]*F_0_xx[20]+0.5*nuVtSq[4]*F_0_xx[20]+0.31943828249997*nuVtSq[7]*F_0_xx[12]+0.5000000000000001*nuVtSq[1]*F_0_xx[12]+0.4472135954999579*nuVtSq[6]*F_0_xx[11]+0.5*F_0_xx[7]*nuVtSq[8]+0.31943828249997*nuVtSq[5]*F_0_xx[8]+0.5*nuVtSq[0]*F_0_xx[8]+0.5000000000000001*F_0_xx[1]*nuVtSq[7]+0.5*F_0_xx[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*F_0_xx[4]+0.4472135954999579*F_0_xx[2]*nuVtSq[2]; - incr_F_0[9] = 0.5*nuVtSq[8]*F_0_xx[26]+0.5000000000000001*nuVtSq[7]*F_0_xx[25]+0.5000000000000001*nuVtSq[6]*F_0_xx[24]+0.5*nuVtSq[5]*F_0_xx[22]+0.5*nuVtSq[4]*F_0_xx[21]+0.5*nuVtSq[3]*F_0_xx[19]+0.5000000000000001*nuVtSq[2]*F_0_xx[16]+0.5000000000000001*nuVtSq[1]*F_0_xx[15]+0.5*nuVtSq[0]*F_0_xx[9]; - incr_F_0[10] = 0.4*nuVtSq[3]*F_0_xx[23]+0.4*nuVtSq[6]*F_0_xx[18]+0.4472135954999579*nuVtSq[2]*F_0_xx[18]+0.4*nuVtSq[7]*F_0_xx[17]+0.4472135954999579*nuVtSq[1]*F_0_xx[17]+0.447213595499958*nuVtSq[3]*F_0_xx[14]+0.447213595499958*nuVtSq[3]*F_0_xx[13]+0.4*nuVtSq[8]*F_0_xx[10]+0.4472135954999579*nuVtSq[5]*F_0_xx[10]+0.4472135954999579*nuVtSq[4]*F_0_xx[10]+0.5*nuVtSq[0]*F_0_xx[10]+0.447213595499958*F_0_xx[6]*nuVtSq[7]+0.447213595499958*F_0_xx[5]*nuVtSq[6]+0.5*nuVtSq[1]*F_0_xx[6]+0.5*nuVtSq[2]*F_0_xx[5]+0.5*F_0_xx[3]*nuVtSq[3]; - incr_F_0[11] = 0.2857142857142857*nuVtSq[6]*F_0_xx[20]+0.447213595499958*nuVtSq[2]*F_0_xx[20]+0.4*nuVtSq[3]*F_0_xx[12]+0.2857142857142857*nuVtSq[8]*F_0_xx[11]+0.4472135954999579*nuVtSq[5]*F_0_xx[11]+0.31943828249997*nuVtSq[4]*F_0_xx[11]+0.5*nuVtSq[0]*F_0_xx[11]+0.447213595499958*F_0_xx[2]*nuVtSq[8]+0.4472135954999579*nuVtSq[6]*F_0_xx[8]+0.4*F_0_xx[4]*nuVtSq[7]+0.31943828249997*nuVtSq[6]*F_0_xx[7]+0.5000000000000001*nuVtSq[2]*F_0_xx[7]+0.5*F_0_xx[0]*nuVtSq[6]+0.5000000000000001*F_0_xx[2]*nuVtSq[4]+0.447213595499958*nuVtSq[1]*F_0_xx[4]+0.447213595499958*F_0_xx[1]*nuVtSq[3]; - incr_F_0[12] = 0.2857142857142857*nuVtSq[7]*F_0_xx[20]+0.447213595499958*nuVtSq[1]*F_0_xx[20]+0.2857142857142857*nuVtSq[8]*F_0_xx[12]+0.31943828249997*nuVtSq[5]*F_0_xx[12]+0.4472135954999579*nuVtSq[4]*F_0_xx[12]+0.5*nuVtSq[0]*F_0_xx[12]+0.4*nuVtSq[3]*F_0_xx[11]+0.447213595499958*F_0_xx[1]*nuVtSq[8]+0.31943828249997*nuVtSq[7]*F_0_xx[8]+0.5000000000000001*nuVtSq[1]*F_0_xx[8]+0.4472135954999579*F_0_xx[7]*nuVtSq[7]+0.5*F_0_xx[0]*nuVtSq[7]+0.4*F_0_xx[4]*nuVtSq[6]+0.5000000000000001*F_0_xx[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*F_0_xx[4]+0.447213595499958*F_0_xx[2]*nuVtSq[3]; - incr_F_0[13] = 0.31943828249997*nuVtSq[8]*F_0_xx[23]+0.5000000000000001*nuVtSq[5]*F_0_xx[23]+0.4472135954999579*nuVtSq[7]*F_0_xx[18]+0.31943828249997*nuVtSq[6]*F_0_xx[17]+0.5000000000000001*nuVtSq[2]*F_0_xx[17]+0.5*nuVtSq[8]*F_0_xx[14]+0.31943828249997*nuVtSq[4]*F_0_xx[13]+0.5*nuVtSq[0]*F_0_xx[13]+0.447213595499958*nuVtSq[3]*F_0_xx[10]+0.5*F_0_xx[6]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*F_0_xx[5]+0.5000000000000001*F_0_xx[3]*nuVtSq[4]; - incr_F_0[14] = 0.31943828249997*nuVtSq[8]*F_0_xx[23]+0.5000000000000001*nuVtSq[4]*F_0_xx[23]+0.31943828249997*nuVtSq[7]*F_0_xx[18]+0.5000000000000001*nuVtSq[1]*F_0_xx[18]+0.4472135954999579*nuVtSq[6]*F_0_xx[17]+0.31943828249997*nuVtSq[5]*F_0_xx[14]+0.5*nuVtSq[0]*F_0_xx[14]+0.5*nuVtSq[8]*F_0_xx[13]+0.447213595499958*nuVtSq[3]*F_0_xx[10]+0.5*F_0_xx[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*F_0_xx[6]+0.5000000000000001*F_0_xx[3]*nuVtSq[5]; - incr_F_0[15] = 0.4472135954999579*nuVtSq[7]*F_0_xx[26]+0.447213595499958*nuVtSq[8]*F_0_xx[25]+0.5000000000000001*nuVtSq[5]*F_0_xx[25]+0.447213595499958*nuVtSq[3]*F_0_xx[24]+0.5*nuVtSq[7]*F_0_xx[22]+0.447213595499958*nuVtSq[1]*F_0_xx[21]+0.4472135954999579*nuVtSq[6]*F_0_xx[19]+0.5000000000000001*nuVtSq[2]*F_0_xx[19]+0.5*nuVtSq[3]*F_0_xx[16]+0.4472135954999579*nuVtSq[4]*F_0_xx[15]+0.5*nuVtSq[0]*F_0_xx[15]+0.5000000000000001*nuVtSq[1]*F_0_xx[9]; - incr_F_0[16] = 0.4472135954999579*nuVtSq[6]*F_0_xx[26]+0.447213595499958*nuVtSq[3]*F_0_xx[25]+0.447213595499958*nuVtSq[8]*F_0_xx[24]+0.5000000000000001*nuVtSq[4]*F_0_xx[24]+0.447213595499958*nuVtSq[2]*F_0_xx[22]+0.5*nuVtSq[6]*F_0_xx[21]+0.4472135954999579*nuVtSq[7]*F_0_xx[19]+0.5000000000000001*nuVtSq[1]*F_0_xx[19]+0.4472135954999579*nuVtSq[5]*F_0_xx[16]+0.5*nuVtSq[0]*F_0_xx[16]+0.5*nuVtSq[3]*F_0_xx[15]+0.5000000000000001*nuVtSq[2]*F_0_xx[9]; - incr_F_0[17] = 0.2857142857142858*nuVtSq[6]*F_0_xx[23]+0.4472135954999579*nuVtSq[2]*F_0_xx[23]+0.4*nuVtSq[3]*F_0_xx[18]+0.2857142857142857*nuVtSq[8]*F_0_xx[17]+0.4472135954999579*nuVtSq[5]*F_0_xx[17]+0.31943828249997*nuVtSq[4]*F_0_xx[17]+0.5*nuVtSq[0]*F_0_xx[17]+0.4472135954999579*nuVtSq[6]*F_0_xx[14]+0.31943828249997*nuVtSq[6]*F_0_xx[13]+0.5000000000000001*nuVtSq[2]*F_0_xx[13]+0.4*nuVtSq[7]*F_0_xx[10]+0.4472135954999579*nuVtSq[1]*F_0_xx[10]+0.4472135954999579*F_0_xx[6]*nuVtSq[8]+0.5000000000000001*F_0_xx[3]*nuVtSq[6]+0.5*nuVtSq[4]*F_0_xx[6]+0.4472135954999579*nuVtSq[3]*F_0_xx[5]; - incr_F_0[18] = 0.2857142857142858*nuVtSq[7]*F_0_xx[23]+0.4472135954999579*nuVtSq[1]*F_0_xx[23]+0.2857142857142857*nuVtSq[8]*F_0_xx[18]+0.31943828249997*nuVtSq[5]*F_0_xx[18]+0.4472135954999579*nuVtSq[4]*F_0_xx[18]+0.5*nuVtSq[0]*F_0_xx[18]+0.4*nuVtSq[3]*F_0_xx[17]+0.31943828249997*nuVtSq[7]*F_0_xx[14]+0.5000000000000001*nuVtSq[1]*F_0_xx[14]+0.4472135954999579*nuVtSq[7]*F_0_xx[13]+0.4*nuVtSq[6]*F_0_xx[10]+0.4472135954999579*nuVtSq[2]*F_0_xx[10]+0.4472135954999579*F_0_xx[5]*nuVtSq[8]+0.5000000000000001*F_0_xx[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*F_0_xx[6]+0.5*F_0_xx[5]*nuVtSq[5]; - incr_F_0[19] = 0.4*nuVtSq[3]*F_0_xx[26]+0.4*nuVtSq[6]*F_0_xx[25]+0.4472135954999579*nuVtSq[2]*F_0_xx[25]+0.4*nuVtSq[7]*F_0_xx[24]+0.4472135954999579*nuVtSq[1]*F_0_xx[24]+0.4472135954999579*nuVtSq[3]*F_0_xx[22]+0.4472135954999579*nuVtSq[3]*F_0_xx[21]+0.4*nuVtSq[8]*F_0_xx[19]+0.4472135954999579*nuVtSq[5]*F_0_xx[19]+0.4472135954999579*nuVtSq[4]*F_0_xx[19]+0.5*nuVtSq[0]*F_0_xx[19]+0.4472135954999579*nuVtSq[7]*F_0_xx[16]+0.5000000000000001*nuVtSq[1]*F_0_xx[16]+0.4472135954999579*nuVtSq[6]*F_0_xx[15]+0.5000000000000001*nuVtSq[2]*F_0_xx[15]+0.5*nuVtSq[3]*F_0_xx[9]; - incr_F_0[20] = 0.2040816326530612*nuVtSq[8]*F_0_xx[20]+0.31943828249997*nuVtSq[5]*F_0_xx[20]+0.31943828249997*nuVtSq[4]*F_0_xx[20]+0.5*nuVtSq[0]*F_0_xx[20]+0.2857142857142857*nuVtSq[7]*F_0_xx[12]+0.447213595499958*nuVtSq[1]*F_0_xx[12]+0.2857142857142857*nuVtSq[6]*F_0_xx[11]+0.447213595499958*nuVtSq[2]*F_0_xx[11]+0.31943828249997*F_0_xx[8]*nuVtSq[8]+0.31943828249997*F_0_xx[7]*nuVtSq[8]+0.5*F_0_xx[0]*nuVtSq[8]+0.5*nuVtSq[4]*F_0_xx[8]+0.447213595499958*F_0_xx[1]*nuVtSq[7]+0.5*nuVtSq[5]*F_0_xx[7]+0.447213595499958*F_0_xx[2]*nuVtSq[6]+0.4*nuVtSq[3]*F_0_xx[4]; - incr_F_0[21] = 0.31943828249997*nuVtSq[8]*F_0_xx[26]+0.5*nuVtSq[5]*F_0_xx[26]+0.447213595499958*nuVtSq[7]*F_0_xx[25]+0.31943828249997*nuVtSq[6]*F_0_xx[24]+0.5*nuVtSq[2]*F_0_xx[24]+0.5*nuVtSq[8]*F_0_xx[22]+0.31943828249997*nuVtSq[4]*F_0_xx[21]+0.5*nuVtSq[0]*F_0_xx[21]+0.4472135954999579*nuVtSq[3]*F_0_xx[19]+0.5*nuVtSq[6]*F_0_xx[16]+0.447213595499958*nuVtSq[1]*F_0_xx[15]+0.5*nuVtSq[4]*F_0_xx[9]; - incr_F_0[22] = 0.31943828249997*nuVtSq[8]*F_0_xx[26]+0.5*nuVtSq[4]*F_0_xx[26]+0.31943828249997*nuVtSq[7]*F_0_xx[25]+0.5*nuVtSq[1]*F_0_xx[25]+0.447213595499958*nuVtSq[6]*F_0_xx[24]+0.31943828249997*nuVtSq[5]*F_0_xx[22]+0.5*nuVtSq[0]*F_0_xx[22]+0.5*nuVtSq[8]*F_0_xx[21]+0.4472135954999579*nuVtSq[3]*F_0_xx[19]+0.447213595499958*nuVtSq[2]*F_0_xx[16]+0.5*nuVtSq[7]*F_0_xx[15]+0.5*nuVtSq[5]*F_0_xx[9]; - incr_F_0[23] = 0.2040816326530612*nuVtSq[8]*F_0_xx[23]+0.31943828249997*nuVtSq[5]*F_0_xx[23]+0.31943828249997*nuVtSq[4]*F_0_xx[23]+0.5*nuVtSq[0]*F_0_xx[23]+0.2857142857142858*nuVtSq[7]*F_0_xx[18]+0.4472135954999579*nuVtSq[1]*F_0_xx[18]+0.2857142857142858*nuVtSq[6]*F_0_xx[17]+0.4472135954999579*nuVtSq[2]*F_0_xx[17]+0.31943828249997*nuVtSq[8]*F_0_xx[14]+0.5000000000000001*nuVtSq[4]*F_0_xx[14]+0.31943828249997*nuVtSq[8]*F_0_xx[13]+0.5000000000000001*nuVtSq[5]*F_0_xx[13]+0.4*nuVtSq[3]*F_0_xx[10]+0.5*F_0_xx[3]*nuVtSq[8]+0.447213595499958*F_0_xx[5]*nuVtSq[7]+0.447213595499958*F_0_xx[6]*nuVtSq[6]; - incr_F_0[24] = 0.2857142857142858*nuVtSq[6]*F_0_xx[26]+0.4472135954999579*nuVtSq[2]*F_0_xx[26]+0.4*nuVtSq[3]*F_0_xx[25]+0.2857142857142857*nuVtSq[8]*F_0_xx[24]+0.4472135954999579*nuVtSq[5]*F_0_xx[24]+0.31943828249997*nuVtSq[4]*F_0_xx[24]+0.5*nuVtSq[0]*F_0_xx[24]+0.447213595499958*nuVtSq[6]*F_0_xx[22]+0.31943828249997*nuVtSq[6]*F_0_xx[21]+0.5*nuVtSq[2]*F_0_xx[21]+0.4*nuVtSq[7]*F_0_xx[19]+0.4472135954999579*nuVtSq[1]*F_0_xx[19]+0.447213595499958*nuVtSq[8]*F_0_xx[16]+0.5000000000000001*nuVtSq[4]*F_0_xx[16]+0.447213595499958*nuVtSq[3]*F_0_xx[15]+0.5000000000000001*nuVtSq[6]*F_0_xx[9]; - incr_F_0[25] = 0.2857142857142858*nuVtSq[7]*F_0_xx[26]+0.4472135954999579*nuVtSq[1]*F_0_xx[26]+0.2857142857142857*nuVtSq[8]*F_0_xx[25]+0.31943828249997*nuVtSq[5]*F_0_xx[25]+0.4472135954999579*nuVtSq[4]*F_0_xx[25]+0.5*nuVtSq[0]*F_0_xx[25]+0.4*nuVtSq[3]*F_0_xx[24]+0.31943828249997*nuVtSq[7]*F_0_xx[22]+0.5*nuVtSq[1]*F_0_xx[22]+0.447213595499958*nuVtSq[7]*F_0_xx[21]+0.4*nuVtSq[6]*F_0_xx[19]+0.4472135954999579*nuVtSq[2]*F_0_xx[19]+0.447213595499958*nuVtSq[3]*F_0_xx[16]+0.447213595499958*nuVtSq[8]*F_0_xx[15]+0.5000000000000001*nuVtSq[5]*F_0_xx[15]+0.5000000000000001*nuVtSq[7]*F_0_xx[9]; - incr_F_0[26] = 0.2040816326530612*nuVtSq[8]*F_0_xx[26]+0.31943828249997*nuVtSq[5]*F_0_xx[26]+0.31943828249997*nuVtSq[4]*F_0_xx[26]+0.5*nuVtSq[0]*F_0_xx[26]+0.2857142857142858*nuVtSq[7]*F_0_xx[25]+0.4472135954999579*nuVtSq[1]*F_0_xx[25]+0.2857142857142858*nuVtSq[6]*F_0_xx[24]+0.4472135954999579*nuVtSq[2]*F_0_xx[24]+0.31943828249997*nuVtSq[8]*F_0_xx[22]+0.5*nuVtSq[4]*F_0_xx[22]+0.31943828249997*nuVtSq[8]*F_0_xx[21]+0.5*nuVtSq[5]*F_0_xx[21]+0.4*nuVtSq[3]*F_0_xx[19]+0.4472135954999579*nuVtSq[6]*F_0_xx[16]+0.4472135954999579*nuVtSq[7]*F_0_xx[15]+0.5*nuVtSq[8]*F_0_xx[9]; - incr_G_1[0] = 0.5*nuVtSq[8]*G_1_xx[20]+0.5*nuVtSq[7]*G_1_xx[12]+0.5*nuVtSq[6]*G_1_xx[11]+0.5*nuVtSq[5]*G_1_xx[8]+0.5*nuVtSq[4]*G_1_xx[7]+0.5*nuVtSq[3]*G_1_xx[4]+0.5*G_1_xx[2]*nuVtSq[2]+0.5*G_1_xx[1]*nuVtSq[1]+0.5*G_1_xx[0]*nuVtSq[0]; - incr_G_1[1] = 0.447213595499958*nuVtSq[7]*G_1_xx[20]+0.447213595499958*nuVtSq[8]*G_1_xx[12]+0.5000000000000001*nuVtSq[5]*G_1_xx[12]+0.447213595499958*nuVtSq[3]*G_1_xx[11]+0.5000000000000001*nuVtSq[7]*G_1_xx[8]+0.4472135954999579*nuVtSq[1]*G_1_xx[7]+0.447213595499958*G_1_xx[4]*nuVtSq[6]+0.4472135954999579*G_1_xx[1]*nuVtSq[4]+0.5*nuVtSq[2]*G_1_xx[4]+0.5*G_1_xx[2]*nuVtSq[3]+0.5*G_1_xx[0]*nuVtSq[1]+0.5*nuVtSq[0]*G_1_xx[1]; - incr_G_1[2] = 0.447213595499958*nuVtSq[6]*G_1_xx[20]+0.447213595499958*nuVtSq[3]*G_1_xx[12]+0.447213595499958*nuVtSq[8]*G_1_xx[11]+0.5000000000000001*nuVtSq[4]*G_1_xx[11]+0.4472135954999579*nuVtSq[2]*G_1_xx[8]+0.447213595499958*G_1_xx[4]*nuVtSq[7]+0.5000000000000001*nuVtSq[6]*G_1_xx[7]+0.4472135954999579*G_1_xx[2]*nuVtSq[5]+0.5*nuVtSq[1]*G_1_xx[4]+0.5*G_1_xx[1]*nuVtSq[3]+0.5*G_1_xx[0]*nuVtSq[2]+0.5*nuVtSq[0]*G_1_xx[2]; - incr_G_1[3] = 0.5*nuVtSq[8]*G_1_xx[23]+0.5000000000000001*nuVtSq[7]*G_1_xx[18]+0.5000000000000001*nuVtSq[6]*G_1_xx[17]+0.5000000000000001*nuVtSq[5]*G_1_xx[14]+0.5000000000000001*nuVtSq[4]*G_1_xx[13]+0.5*nuVtSq[3]*G_1_xx[10]+0.5*nuVtSq[2]*G_1_xx[6]+0.5*nuVtSq[1]*G_1_xx[5]+0.5*nuVtSq[0]*G_1_xx[3]; - incr_G_1[4] = 0.4*nuVtSq[3]*G_1_xx[20]+0.4*nuVtSq[6]*G_1_xx[12]+0.447213595499958*nuVtSq[2]*G_1_xx[12]+0.4*nuVtSq[7]*G_1_xx[11]+0.447213595499958*nuVtSq[1]*G_1_xx[11]+0.4*G_1_xx[4]*nuVtSq[8]+0.4472135954999579*nuVtSq[3]*G_1_xx[8]+0.447213595499958*G_1_xx[2]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*G_1_xx[7]+0.447213595499958*G_1_xx[1]*nuVtSq[6]+0.4472135954999579*G_1_xx[4]*nuVtSq[5]+0.4472135954999579*G_1_xx[4]*nuVtSq[4]+0.5*nuVtSq[0]*G_1_xx[4]+0.5*G_1_xx[0]*nuVtSq[3]+0.5*G_1_xx[1]*nuVtSq[2]+0.5*nuVtSq[1]*G_1_xx[2]; - incr_G_1[5] = 0.447213595499958*nuVtSq[7]*G_1_xx[23]+0.4472135954999579*nuVtSq[8]*G_1_xx[18]+0.5*nuVtSq[5]*G_1_xx[18]+0.4472135954999579*nuVtSq[3]*G_1_xx[17]+0.5*nuVtSq[7]*G_1_xx[14]+0.447213595499958*nuVtSq[1]*G_1_xx[13]+0.447213595499958*nuVtSq[6]*G_1_xx[10]+0.5*nuVtSq[2]*G_1_xx[10]+0.5*nuVtSq[3]*G_1_xx[6]+0.4472135954999579*nuVtSq[4]*G_1_xx[5]+0.5*nuVtSq[0]*G_1_xx[5]+0.5*nuVtSq[1]*G_1_xx[3]; - incr_G_1[6] = 0.447213595499958*nuVtSq[6]*G_1_xx[23]+0.4472135954999579*nuVtSq[3]*G_1_xx[18]+0.4472135954999579*nuVtSq[8]*G_1_xx[17]+0.5*nuVtSq[4]*G_1_xx[17]+0.447213595499958*nuVtSq[2]*G_1_xx[14]+0.5*nuVtSq[6]*G_1_xx[13]+0.447213595499958*nuVtSq[7]*G_1_xx[10]+0.5*nuVtSq[1]*G_1_xx[10]+0.4472135954999579*nuVtSq[5]*G_1_xx[6]+0.5*nuVtSq[0]*G_1_xx[6]+0.5*nuVtSq[3]*G_1_xx[5]+0.5*nuVtSq[2]*G_1_xx[3]; - incr_G_1[7] = 0.31943828249997*nuVtSq[8]*G_1_xx[20]+0.5*nuVtSq[5]*G_1_xx[20]+0.4472135954999579*nuVtSq[7]*G_1_xx[12]+0.31943828249997*nuVtSq[6]*G_1_xx[11]+0.5000000000000001*nuVtSq[2]*G_1_xx[11]+0.5*G_1_xx[8]*nuVtSq[8]+0.31943828249997*nuVtSq[4]*G_1_xx[7]+0.5*nuVtSq[0]*G_1_xx[7]+0.5000000000000001*G_1_xx[2]*nuVtSq[6]+0.5*G_1_xx[0]*nuVtSq[4]+0.4472135954999579*nuVtSq[3]*G_1_xx[4]+0.4472135954999579*G_1_xx[1]*nuVtSq[1]; - incr_G_1[8] = 0.31943828249997*nuVtSq[8]*G_1_xx[20]+0.5*nuVtSq[4]*G_1_xx[20]+0.31943828249997*nuVtSq[7]*G_1_xx[12]+0.5000000000000001*nuVtSq[1]*G_1_xx[12]+0.4472135954999579*nuVtSq[6]*G_1_xx[11]+0.5*G_1_xx[7]*nuVtSq[8]+0.31943828249997*nuVtSq[5]*G_1_xx[8]+0.5*nuVtSq[0]*G_1_xx[8]+0.5000000000000001*G_1_xx[1]*nuVtSq[7]+0.5*G_1_xx[0]*nuVtSq[5]+0.4472135954999579*nuVtSq[3]*G_1_xx[4]+0.4472135954999579*G_1_xx[2]*nuVtSq[2]; - incr_G_1[9] = 0.5*nuVtSq[8]*G_1_xx[26]+0.5000000000000001*nuVtSq[7]*G_1_xx[25]+0.5000000000000001*nuVtSq[6]*G_1_xx[24]+0.5*nuVtSq[5]*G_1_xx[22]+0.5*nuVtSq[4]*G_1_xx[21]+0.5*nuVtSq[3]*G_1_xx[19]+0.5000000000000001*nuVtSq[2]*G_1_xx[16]+0.5000000000000001*nuVtSq[1]*G_1_xx[15]+0.5*nuVtSq[0]*G_1_xx[9]; - incr_G_1[10] = 0.4*nuVtSq[3]*G_1_xx[23]+0.4*nuVtSq[6]*G_1_xx[18]+0.4472135954999579*nuVtSq[2]*G_1_xx[18]+0.4*nuVtSq[7]*G_1_xx[17]+0.4472135954999579*nuVtSq[1]*G_1_xx[17]+0.447213595499958*nuVtSq[3]*G_1_xx[14]+0.447213595499958*nuVtSq[3]*G_1_xx[13]+0.4*nuVtSq[8]*G_1_xx[10]+0.4472135954999579*nuVtSq[5]*G_1_xx[10]+0.4472135954999579*nuVtSq[4]*G_1_xx[10]+0.5*nuVtSq[0]*G_1_xx[10]+0.447213595499958*G_1_xx[6]*nuVtSq[7]+0.447213595499958*G_1_xx[5]*nuVtSq[6]+0.5*nuVtSq[1]*G_1_xx[6]+0.5*nuVtSq[2]*G_1_xx[5]+0.5*G_1_xx[3]*nuVtSq[3]; - incr_G_1[11] = 0.2857142857142857*nuVtSq[6]*G_1_xx[20]+0.447213595499958*nuVtSq[2]*G_1_xx[20]+0.4*nuVtSq[3]*G_1_xx[12]+0.2857142857142857*nuVtSq[8]*G_1_xx[11]+0.4472135954999579*nuVtSq[5]*G_1_xx[11]+0.31943828249997*nuVtSq[4]*G_1_xx[11]+0.5*nuVtSq[0]*G_1_xx[11]+0.447213595499958*G_1_xx[2]*nuVtSq[8]+0.4472135954999579*nuVtSq[6]*G_1_xx[8]+0.4*G_1_xx[4]*nuVtSq[7]+0.31943828249997*nuVtSq[6]*G_1_xx[7]+0.5000000000000001*nuVtSq[2]*G_1_xx[7]+0.5*G_1_xx[0]*nuVtSq[6]+0.5000000000000001*G_1_xx[2]*nuVtSq[4]+0.447213595499958*nuVtSq[1]*G_1_xx[4]+0.447213595499958*G_1_xx[1]*nuVtSq[3]; - incr_G_1[12] = 0.2857142857142857*nuVtSq[7]*G_1_xx[20]+0.447213595499958*nuVtSq[1]*G_1_xx[20]+0.2857142857142857*nuVtSq[8]*G_1_xx[12]+0.31943828249997*nuVtSq[5]*G_1_xx[12]+0.4472135954999579*nuVtSq[4]*G_1_xx[12]+0.5*nuVtSq[0]*G_1_xx[12]+0.4*nuVtSq[3]*G_1_xx[11]+0.447213595499958*G_1_xx[1]*nuVtSq[8]+0.31943828249997*nuVtSq[7]*G_1_xx[8]+0.5000000000000001*nuVtSq[1]*G_1_xx[8]+0.4472135954999579*G_1_xx[7]*nuVtSq[7]+0.5*G_1_xx[0]*nuVtSq[7]+0.4*G_1_xx[4]*nuVtSq[6]+0.5000000000000001*G_1_xx[1]*nuVtSq[5]+0.447213595499958*nuVtSq[2]*G_1_xx[4]+0.447213595499958*G_1_xx[2]*nuVtSq[3]; - incr_G_1[13] = 0.31943828249997*nuVtSq[8]*G_1_xx[23]+0.5000000000000001*nuVtSq[5]*G_1_xx[23]+0.4472135954999579*nuVtSq[7]*G_1_xx[18]+0.31943828249997*nuVtSq[6]*G_1_xx[17]+0.5000000000000001*nuVtSq[2]*G_1_xx[17]+0.5*nuVtSq[8]*G_1_xx[14]+0.31943828249997*nuVtSq[4]*G_1_xx[13]+0.5*nuVtSq[0]*G_1_xx[13]+0.447213595499958*nuVtSq[3]*G_1_xx[10]+0.5*G_1_xx[6]*nuVtSq[6]+0.447213595499958*nuVtSq[1]*G_1_xx[5]+0.5000000000000001*G_1_xx[3]*nuVtSq[4]; - incr_G_1[14] = 0.31943828249997*nuVtSq[8]*G_1_xx[23]+0.5000000000000001*nuVtSq[4]*G_1_xx[23]+0.31943828249997*nuVtSq[7]*G_1_xx[18]+0.5000000000000001*nuVtSq[1]*G_1_xx[18]+0.4472135954999579*nuVtSq[6]*G_1_xx[17]+0.31943828249997*nuVtSq[5]*G_1_xx[14]+0.5*nuVtSq[0]*G_1_xx[14]+0.5*nuVtSq[8]*G_1_xx[13]+0.447213595499958*nuVtSq[3]*G_1_xx[10]+0.5*G_1_xx[5]*nuVtSq[7]+0.447213595499958*nuVtSq[2]*G_1_xx[6]+0.5000000000000001*G_1_xx[3]*nuVtSq[5]; - incr_G_1[15] = 0.4472135954999579*nuVtSq[7]*G_1_xx[26]+0.447213595499958*nuVtSq[8]*G_1_xx[25]+0.5000000000000001*nuVtSq[5]*G_1_xx[25]+0.447213595499958*nuVtSq[3]*G_1_xx[24]+0.5*nuVtSq[7]*G_1_xx[22]+0.447213595499958*nuVtSq[1]*G_1_xx[21]+0.4472135954999579*nuVtSq[6]*G_1_xx[19]+0.5000000000000001*nuVtSq[2]*G_1_xx[19]+0.5*nuVtSq[3]*G_1_xx[16]+0.4472135954999579*nuVtSq[4]*G_1_xx[15]+0.5*nuVtSq[0]*G_1_xx[15]+0.5000000000000001*nuVtSq[1]*G_1_xx[9]; - incr_G_1[16] = 0.4472135954999579*nuVtSq[6]*G_1_xx[26]+0.447213595499958*nuVtSq[3]*G_1_xx[25]+0.447213595499958*nuVtSq[8]*G_1_xx[24]+0.5000000000000001*nuVtSq[4]*G_1_xx[24]+0.447213595499958*nuVtSq[2]*G_1_xx[22]+0.5*nuVtSq[6]*G_1_xx[21]+0.4472135954999579*nuVtSq[7]*G_1_xx[19]+0.5000000000000001*nuVtSq[1]*G_1_xx[19]+0.4472135954999579*nuVtSq[5]*G_1_xx[16]+0.5*nuVtSq[0]*G_1_xx[16]+0.5*nuVtSq[3]*G_1_xx[15]+0.5000000000000001*nuVtSq[2]*G_1_xx[9]; - incr_G_1[17] = 0.2857142857142858*nuVtSq[6]*G_1_xx[23]+0.4472135954999579*nuVtSq[2]*G_1_xx[23]+0.4*nuVtSq[3]*G_1_xx[18]+0.2857142857142857*nuVtSq[8]*G_1_xx[17]+0.4472135954999579*nuVtSq[5]*G_1_xx[17]+0.31943828249997*nuVtSq[4]*G_1_xx[17]+0.5*nuVtSq[0]*G_1_xx[17]+0.4472135954999579*nuVtSq[6]*G_1_xx[14]+0.31943828249997*nuVtSq[6]*G_1_xx[13]+0.5000000000000001*nuVtSq[2]*G_1_xx[13]+0.4*nuVtSq[7]*G_1_xx[10]+0.4472135954999579*nuVtSq[1]*G_1_xx[10]+0.4472135954999579*G_1_xx[6]*nuVtSq[8]+0.5000000000000001*G_1_xx[3]*nuVtSq[6]+0.5*nuVtSq[4]*G_1_xx[6]+0.4472135954999579*nuVtSq[3]*G_1_xx[5]; - incr_G_1[18] = 0.2857142857142858*nuVtSq[7]*G_1_xx[23]+0.4472135954999579*nuVtSq[1]*G_1_xx[23]+0.2857142857142857*nuVtSq[8]*G_1_xx[18]+0.31943828249997*nuVtSq[5]*G_1_xx[18]+0.4472135954999579*nuVtSq[4]*G_1_xx[18]+0.5*nuVtSq[0]*G_1_xx[18]+0.4*nuVtSq[3]*G_1_xx[17]+0.31943828249997*nuVtSq[7]*G_1_xx[14]+0.5000000000000001*nuVtSq[1]*G_1_xx[14]+0.4472135954999579*nuVtSq[7]*G_1_xx[13]+0.4*nuVtSq[6]*G_1_xx[10]+0.4472135954999579*nuVtSq[2]*G_1_xx[10]+0.4472135954999579*G_1_xx[5]*nuVtSq[8]+0.5000000000000001*G_1_xx[3]*nuVtSq[7]+0.4472135954999579*nuVtSq[3]*G_1_xx[6]+0.5*G_1_xx[5]*nuVtSq[5]; - incr_G_1[19] = 0.4*nuVtSq[3]*G_1_xx[26]+0.4*nuVtSq[6]*G_1_xx[25]+0.4472135954999579*nuVtSq[2]*G_1_xx[25]+0.4*nuVtSq[7]*G_1_xx[24]+0.4472135954999579*nuVtSq[1]*G_1_xx[24]+0.4472135954999579*nuVtSq[3]*G_1_xx[22]+0.4472135954999579*nuVtSq[3]*G_1_xx[21]+0.4*nuVtSq[8]*G_1_xx[19]+0.4472135954999579*nuVtSq[5]*G_1_xx[19]+0.4472135954999579*nuVtSq[4]*G_1_xx[19]+0.5*nuVtSq[0]*G_1_xx[19]+0.4472135954999579*nuVtSq[7]*G_1_xx[16]+0.5000000000000001*nuVtSq[1]*G_1_xx[16]+0.4472135954999579*nuVtSq[6]*G_1_xx[15]+0.5000000000000001*nuVtSq[2]*G_1_xx[15]+0.5*nuVtSq[3]*G_1_xx[9]; - incr_G_1[20] = 0.2040816326530612*nuVtSq[8]*G_1_xx[20]+0.31943828249997*nuVtSq[5]*G_1_xx[20]+0.31943828249997*nuVtSq[4]*G_1_xx[20]+0.5*nuVtSq[0]*G_1_xx[20]+0.2857142857142857*nuVtSq[7]*G_1_xx[12]+0.447213595499958*nuVtSq[1]*G_1_xx[12]+0.2857142857142857*nuVtSq[6]*G_1_xx[11]+0.447213595499958*nuVtSq[2]*G_1_xx[11]+0.31943828249997*G_1_xx[8]*nuVtSq[8]+0.31943828249997*G_1_xx[7]*nuVtSq[8]+0.5*G_1_xx[0]*nuVtSq[8]+0.5*nuVtSq[4]*G_1_xx[8]+0.447213595499958*G_1_xx[1]*nuVtSq[7]+0.5*nuVtSq[5]*G_1_xx[7]+0.447213595499958*G_1_xx[2]*nuVtSq[6]+0.4*nuVtSq[3]*G_1_xx[4]; - incr_G_1[21] = 0.31943828249997*nuVtSq[8]*G_1_xx[26]+0.5*nuVtSq[5]*G_1_xx[26]+0.447213595499958*nuVtSq[7]*G_1_xx[25]+0.31943828249997*nuVtSq[6]*G_1_xx[24]+0.5*nuVtSq[2]*G_1_xx[24]+0.5*nuVtSq[8]*G_1_xx[22]+0.31943828249997*nuVtSq[4]*G_1_xx[21]+0.5*nuVtSq[0]*G_1_xx[21]+0.4472135954999579*nuVtSq[3]*G_1_xx[19]+0.5*nuVtSq[6]*G_1_xx[16]+0.447213595499958*nuVtSq[1]*G_1_xx[15]+0.5*nuVtSq[4]*G_1_xx[9]; - incr_G_1[22] = 0.31943828249997*nuVtSq[8]*G_1_xx[26]+0.5*nuVtSq[4]*G_1_xx[26]+0.31943828249997*nuVtSq[7]*G_1_xx[25]+0.5*nuVtSq[1]*G_1_xx[25]+0.447213595499958*nuVtSq[6]*G_1_xx[24]+0.31943828249997*nuVtSq[5]*G_1_xx[22]+0.5*nuVtSq[0]*G_1_xx[22]+0.5*nuVtSq[8]*G_1_xx[21]+0.4472135954999579*nuVtSq[3]*G_1_xx[19]+0.447213595499958*nuVtSq[2]*G_1_xx[16]+0.5*nuVtSq[7]*G_1_xx[15]+0.5*nuVtSq[5]*G_1_xx[9]; - incr_G_1[23] = 0.2040816326530612*nuVtSq[8]*G_1_xx[23]+0.31943828249997*nuVtSq[5]*G_1_xx[23]+0.31943828249997*nuVtSq[4]*G_1_xx[23]+0.5*nuVtSq[0]*G_1_xx[23]+0.2857142857142858*nuVtSq[7]*G_1_xx[18]+0.4472135954999579*nuVtSq[1]*G_1_xx[18]+0.2857142857142858*nuVtSq[6]*G_1_xx[17]+0.4472135954999579*nuVtSq[2]*G_1_xx[17]+0.31943828249997*nuVtSq[8]*G_1_xx[14]+0.5000000000000001*nuVtSq[4]*G_1_xx[14]+0.31943828249997*nuVtSq[8]*G_1_xx[13]+0.5000000000000001*nuVtSq[5]*G_1_xx[13]+0.4*nuVtSq[3]*G_1_xx[10]+0.5*G_1_xx[3]*nuVtSq[8]+0.447213595499958*G_1_xx[5]*nuVtSq[7]+0.447213595499958*G_1_xx[6]*nuVtSq[6]; - incr_G_1[24] = 0.2857142857142858*nuVtSq[6]*G_1_xx[26]+0.4472135954999579*nuVtSq[2]*G_1_xx[26]+0.4*nuVtSq[3]*G_1_xx[25]+0.2857142857142857*nuVtSq[8]*G_1_xx[24]+0.4472135954999579*nuVtSq[5]*G_1_xx[24]+0.31943828249997*nuVtSq[4]*G_1_xx[24]+0.5*nuVtSq[0]*G_1_xx[24]+0.447213595499958*nuVtSq[6]*G_1_xx[22]+0.31943828249997*nuVtSq[6]*G_1_xx[21]+0.5*nuVtSq[2]*G_1_xx[21]+0.4*nuVtSq[7]*G_1_xx[19]+0.4472135954999579*nuVtSq[1]*G_1_xx[19]+0.447213595499958*nuVtSq[8]*G_1_xx[16]+0.5000000000000001*nuVtSq[4]*G_1_xx[16]+0.447213595499958*nuVtSq[3]*G_1_xx[15]+0.5000000000000001*nuVtSq[6]*G_1_xx[9]; - incr_G_1[25] = 0.2857142857142858*nuVtSq[7]*G_1_xx[26]+0.4472135954999579*nuVtSq[1]*G_1_xx[26]+0.2857142857142857*nuVtSq[8]*G_1_xx[25]+0.31943828249997*nuVtSq[5]*G_1_xx[25]+0.4472135954999579*nuVtSq[4]*G_1_xx[25]+0.5*nuVtSq[0]*G_1_xx[25]+0.4*nuVtSq[3]*G_1_xx[24]+0.31943828249997*nuVtSq[7]*G_1_xx[22]+0.5*nuVtSq[1]*G_1_xx[22]+0.447213595499958*nuVtSq[7]*G_1_xx[21]+0.4*nuVtSq[6]*G_1_xx[19]+0.4472135954999579*nuVtSq[2]*G_1_xx[19]+0.447213595499958*nuVtSq[3]*G_1_xx[16]+0.447213595499958*nuVtSq[8]*G_1_xx[15]+0.5000000000000001*nuVtSq[5]*G_1_xx[15]+0.5000000000000001*nuVtSq[7]*G_1_xx[9]; - incr_G_1[26] = 0.2040816326530612*nuVtSq[8]*G_1_xx[26]+0.31943828249997*nuVtSq[5]*G_1_xx[26]+0.31943828249997*nuVtSq[4]*G_1_xx[26]+0.5*nuVtSq[0]*G_1_xx[26]+0.2857142857142858*nuVtSq[7]*G_1_xx[25]+0.4472135954999579*nuVtSq[1]*G_1_xx[25]+0.2857142857142858*nuVtSq[6]*G_1_xx[24]+0.4472135954999579*nuVtSq[2]*G_1_xx[24]+0.31943828249997*nuVtSq[8]*G_1_xx[22]+0.5*nuVtSq[4]*G_1_xx[22]+0.31943828249997*nuVtSq[8]*G_1_xx[21]+0.5*nuVtSq[5]*G_1_xx[21]+0.4*nuVtSq[3]*G_1_xx[19]+0.4472135954999579*nuVtSq[6]*G_1_xx[16]+0.4472135954999579*nuVtSq[7]*G_1_xx[15]+0.5*nuVtSq[8]*G_1_xx[9]; + incr_F_0[0] = 0.5*nuVtSqSum[8]*F_0_xx[20]+0.5*nuVtSqSum[7]*F_0_xx[12]+0.5*nuVtSqSum[6]*F_0_xx[11]+0.5*nuVtSqSum[5]*F_0_xx[8]+0.5*nuVtSqSum[4]*F_0_xx[7]+0.5*nuVtSqSum[3]*F_0_xx[4]+0.5*F_0_xx[2]*nuVtSqSum[2]+0.5*F_0_xx[1]*nuVtSqSum[1]+0.5*F_0_xx[0]*nuVtSqSum[0]; + incr_F_0[1] = 0.447213595499958*nuVtSqSum[7]*F_0_xx[20]+0.447213595499958*nuVtSqSum[8]*F_0_xx[12]+0.5000000000000001*nuVtSqSum[5]*F_0_xx[12]+0.447213595499958*nuVtSqSum[3]*F_0_xx[11]+0.5000000000000001*nuVtSqSum[7]*F_0_xx[8]+0.4472135954999579*nuVtSqSum[1]*F_0_xx[7]+0.447213595499958*F_0_xx[4]*nuVtSqSum[6]+0.4472135954999579*F_0_xx[1]*nuVtSqSum[4]+0.5*nuVtSqSum[2]*F_0_xx[4]+0.5*F_0_xx[2]*nuVtSqSum[3]+0.5*F_0_xx[0]*nuVtSqSum[1]+0.5*nuVtSqSum[0]*F_0_xx[1]; + incr_F_0[2] = 0.447213595499958*nuVtSqSum[6]*F_0_xx[20]+0.447213595499958*nuVtSqSum[3]*F_0_xx[12]+0.447213595499958*nuVtSqSum[8]*F_0_xx[11]+0.5000000000000001*nuVtSqSum[4]*F_0_xx[11]+0.4472135954999579*nuVtSqSum[2]*F_0_xx[8]+0.447213595499958*F_0_xx[4]*nuVtSqSum[7]+0.5000000000000001*nuVtSqSum[6]*F_0_xx[7]+0.4472135954999579*F_0_xx[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*F_0_xx[4]+0.5*F_0_xx[1]*nuVtSqSum[3]+0.5*F_0_xx[0]*nuVtSqSum[2]+0.5*nuVtSqSum[0]*F_0_xx[2]; + incr_F_0[3] = 0.5*nuVtSqSum[8]*F_0_xx[23]+0.5000000000000001*nuVtSqSum[7]*F_0_xx[18]+0.5000000000000001*nuVtSqSum[6]*F_0_xx[17]+0.5000000000000001*nuVtSqSum[5]*F_0_xx[14]+0.5000000000000001*nuVtSqSum[4]*F_0_xx[13]+0.5*nuVtSqSum[3]*F_0_xx[10]+0.5*nuVtSqSum[2]*F_0_xx[6]+0.5*nuVtSqSum[1]*F_0_xx[5]+0.5*nuVtSqSum[0]*F_0_xx[3]; + incr_F_0[4] = 0.4*nuVtSqSum[3]*F_0_xx[20]+0.4*nuVtSqSum[6]*F_0_xx[12]+0.447213595499958*nuVtSqSum[2]*F_0_xx[12]+0.4*nuVtSqSum[7]*F_0_xx[11]+0.447213595499958*nuVtSqSum[1]*F_0_xx[11]+0.4*F_0_xx[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[8]+0.447213595499958*F_0_xx[2]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[7]+0.447213595499958*F_0_xx[1]*nuVtSqSum[6]+0.4472135954999579*F_0_xx[4]*nuVtSqSum[5]+0.4472135954999579*F_0_xx[4]*nuVtSqSum[4]+0.5*nuVtSqSum[0]*F_0_xx[4]+0.5*F_0_xx[0]*nuVtSqSum[3]+0.5*F_0_xx[1]*nuVtSqSum[2]+0.5*nuVtSqSum[1]*F_0_xx[2]; + incr_F_0[5] = 0.447213595499958*nuVtSqSum[7]*F_0_xx[23]+0.4472135954999579*nuVtSqSum[8]*F_0_xx[18]+0.5*nuVtSqSum[5]*F_0_xx[18]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[17]+0.5*nuVtSqSum[7]*F_0_xx[14]+0.447213595499958*nuVtSqSum[1]*F_0_xx[13]+0.447213595499958*nuVtSqSum[6]*F_0_xx[10]+0.5*nuVtSqSum[2]*F_0_xx[10]+0.5*nuVtSqSum[3]*F_0_xx[6]+0.4472135954999579*nuVtSqSum[4]*F_0_xx[5]+0.5*nuVtSqSum[0]*F_0_xx[5]+0.5*nuVtSqSum[1]*F_0_xx[3]; + incr_F_0[6] = 0.447213595499958*nuVtSqSum[6]*F_0_xx[23]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[18]+0.4472135954999579*nuVtSqSum[8]*F_0_xx[17]+0.5*nuVtSqSum[4]*F_0_xx[17]+0.447213595499958*nuVtSqSum[2]*F_0_xx[14]+0.5*nuVtSqSum[6]*F_0_xx[13]+0.447213595499958*nuVtSqSum[7]*F_0_xx[10]+0.5*nuVtSqSum[1]*F_0_xx[10]+0.4472135954999579*nuVtSqSum[5]*F_0_xx[6]+0.5*nuVtSqSum[0]*F_0_xx[6]+0.5*nuVtSqSum[3]*F_0_xx[5]+0.5*nuVtSqSum[2]*F_0_xx[3]; + incr_F_0[7] = 0.31943828249997*nuVtSqSum[8]*F_0_xx[20]+0.5*nuVtSqSum[5]*F_0_xx[20]+0.4472135954999579*nuVtSqSum[7]*F_0_xx[12]+0.31943828249997*nuVtSqSum[6]*F_0_xx[11]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[11]+0.5*F_0_xx[8]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[4]*F_0_xx[7]+0.5*nuVtSqSum[0]*F_0_xx[7]+0.5000000000000001*F_0_xx[2]*nuVtSqSum[6]+0.5*F_0_xx[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[4]+0.4472135954999579*F_0_xx[1]*nuVtSqSum[1]; + incr_F_0[8] = 0.31943828249997*nuVtSqSum[8]*F_0_xx[20]+0.5*nuVtSqSum[4]*F_0_xx[20]+0.31943828249997*nuVtSqSum[7]*F_0_xx[12]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[12]+0.4472135954999579*nuVtSqSum[6]*F_0_xx[11]+0.5*F_0_xx[7]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[5]*F_0_xx[8]+0.5*nuVtSqSum[0]*F_0_xx[8]+0.5000000000000001*F_0_xx[1]*nuVtSqSum[7]+0.5*F_0_xx[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[4]+0.4472135954999579*F_0_xx[2]*nuVtSqSum[2]; + incr_F_0[9] = 0.5*nuVtSqSum[8]*F_0_xx[26]+0.5000000000000001*nuVtSqSum[7]*F_0_xx[25]+0.5000000000000001*nuVtSqSum[6]*F_0_xx[24]+0.5*nuVtSqSum[5]*F_0_xx[22]+0.5*nuVtSqSum[4]*F_0_xx[21]+0.5*nuVtSqSum[3]*F_0_xx[19]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[16]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[15]+0.5*nuVtSqSum[0]*F_0_xx[9]; + incr_F_0[10] = 0.4*nuVtSqSum[3]*F_0_xx[23]+0.4*nuVtSqSum[6]*F_0_xx[18]+0.4472135954999579*nuVtSqSum[2]*F_0_xx[18]+0.4*nuVtSqSum[7]*F_0_xx[17]+0.4472135954999579*nuVtSqSum[1]*F_0_xx[17]+0.447213595499958*nuVtSqSum[3]*F_0_xx[14]+0.447213595499958*nuVtSqSum[3]*F_0_xx[13]+0.4*nuVtSqSum[8]*F_0_xx[10]+0.4472135954999579*nuVtSqSum[5]*F_0_xx[10]+0.4472135954999579*nuVtSqSum[4]*F_0_xx[10]+0.5*nuVtSqSum[0]*F_0_xx[10]+0.447213595499958*F_0_xx[6]*nuVtSqSum[7]+0.447213595499958*F_0_xx[5]*nuVtSqSum[6]+0.5*nuVtSqSum[1]*F_0_xx[6]+0.5*nuVtSqSum[2]*F_0_xx[5]+0.5*F_0_xx[3]*nuVtSqSum[3]; + incr_F_0[11] = 0.2857142857142857*nuVtSqSum[6]*F_0_xx[20]+0.447213595499958*nuVtSqSum[2]*F_0_xx[20]+0.4*nuVtSqSum[3]*F_0_xx[12]+0.2857142857142857*nuVtSqSum[8]*F_0_xx[11]+0.4472135954999579*nuVtSqSum[5]*F_0_xx[11]+0.31943828249997*nuVtSqSum[4]*F_0_xx[11]+0.5*nuVtSqSum[0]*F_0_xx[11]+0.447213595499958*F_0_xx[2]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[6]*F_0_xx[8]+0.4*F_0_xx[4]*nuVtSqSum[7]+0.31943828249997*nuVtSqSum[6]*F_0_xx[7]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[7]+0.5*F_0_xx[0]*nuVtSqSum[6]+0.5000000000000001*F_0_xx[2]*nuVtSqSum[4]+0.447213595499958*nuVtSqSum[1]*F_0_xx[4]+0.447213595499958*F_0_xx[1]*nuVtSqSum[3]; + incr_F_0[12] = 0.2857142857142857*nuVtSqSum[7]*F_0_xx[20]+0.447213595499958*nuVtSqSum[1]*F_0_xx[20]+0.2857142857142857*nuVtSqSum[8]*F_0_xx[12]+0.31943828249997*nuVtSqSum[5]*F_0_xx[12]+0.4472135954999579*nuVtSqSum[4]*F_0_xx[12]+0.5*nuVtSqSum[0]*F_0_xx[12]+0.4*nuVtSqSum[3]*F_0_xx[11]+0.447213595499958*F_0_xx[1]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[7]*F_0_xx[8]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[8]+0.4472135954999579*F_0_xx[7]*nuVtSqSum[7]+0.5*F_0_xx[0]*nuVtSqSum[7]+0.4*F_0_xx[4]*nuVtSqSum[6]+0.5000000000000001*F_0_xx[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*F_0_xx[4]+0.447213595499958*F_0_xx[2]*nuVtSqSum[3]; + incr_F_0[13] = 0.31943828249997*nuVtSqSum[8]*F_0_xx[23]+0.5000000000000001*nuVtSqSum[5]*F_0_xx[23]+0.4472135954999579*nuVtSqSum[7]*F_0_xx[18]+0.31943828249997*nuVtSqSum[6]*F_0_xx[17]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[17]+0.5*nuVtSqSum[8]*F_0_xx[14]+0.31943828249997*nuVtSqSum[4]*F_0_xx[13]+0.5*nuVtSqSum[0]*F_0_xx[13]+0.447213595499958*nuVtSqSum[3]*F_0_xx[10]+0.5*F_0_xx[6]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*F_0_xx[5]+0.5000000000000001*F_0_xx[3]*nuVtSqSum[4]; + incr_F_0[14] = 0.31943828249997*nuVtSqSum[8]*F_0_xx[23]+0.5000000000000001*nuVtSqSum[4]*F_0_xx[23]+0.31943828249997*nuVtSqSum[7]*F_0_xx[18]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[18]+0.4472135954999579*nuVtSqSum[6]*F_0_xx[17]+0.31943828249997*nuVtSqSum[5]*F_0_xx[14]+0.5*nuVtSqSum[0]*F_0_xx[14]+0.5*nuVtSqSum[8]*F_0_xx[13]+0.447213595499958*nuVtSqSum[3]*F_0_xx[10]+0.5*F_0_xx[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*F_0_xx[6]+0.5000000000000001*F_0_xx[3]*nuVtSqSum[5]; + incr_F_0[15] = 0.4472135954999579*nuVtSqSum[7]*F_0_xx[26]+0.447213595499958*nuVtSqSum[8]*F_0_xx[25]+0.5000000000000001*nuVtSqSum[5]*F_0_xx[25]+0.447213595499958*nuVtSqSum[3]*F_0_xx[24]+0.5*nuVtSqSum[7]*F_0_xx[22]+0.447213595499958*nuVtSqSum[1]*F_0_xx[21]+0.4472135954999579*nuVtSqSum[6]*F_0_xx[19]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[19]+0.5*nuVtSqSum[3]*F_0_xx[16]+0.4472135954999579*nuVtSqSum[4]*F_0_xx[15]+0.5*nuVtSqSum[0]*F_0_xx[15]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[9]; + incr_F_0[16] = 0.4472135954999579*nuVtSqSum[6]*F_0_xx[26]+0.447213595499958*nuVtSqSum[3]*F_0_xx[25]+0.447213595499958*nuVtSqSum[8]*F_0_xx[24]+0.5000000000000001*nuVtSqSum[4]*F_0_xx[24]+0.447213595499958*nuVtSqSum[2]*F_0_xx[22]+0.5*nuVtSqSum[6]*F_0_xx[21]+0.4472135954999579*nuVtSqSum[7]*F_0_xx[19]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[19]+0.4472135954999579*nuVtSqSum[5]*F_0_xx[16]+0.5*nuVtSqSum[0]*F_0_xx[16]+0.5*nuVtSqSum[3]*F_0_xx[15]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[9]; + incr_F_0[17] = 0.2857142857142858*nuVtSqSum[6]*F_0_xx[23]+0.4472135954999579*nuVtSqSum[2]*F_0_xx[23]+0.4*nuVtSqSum[3]*F_0_xx[18]+0.2857142857142857*nuVtSqSum[8]*F_0_xx[17]+0.4472135954999579*nuVtSqSum[5]*F_0_xx[17]+0.31943828249997*nuVtSqSum[4]*F_0_xx[17]+0.5*nuVtSqSum[0]*F_0_xx[17]+0.4472135954999579*nuVtSqSum[6]*F_0_xx[14]+0.31943828249997*nuVtSqSum[6]*F_0_xx[13]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[13]+0.4*nuVtSqSum[7]*F_0_xx[10]+0.4472135954999579*nuVtSqSum[1]*F_0_xx[10]+0.4472135954999579*F_0_xx[6]*nuVtSqSum[8]+0.5000000000000001*F_0_xx[3]*nuVtSqSum[6]+0.5*nuVtSqSum[4]*F_0_xx[6]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[5]; + incr_F_0[18] = 0.2857142857142858*nuVtSqSum[7]*F_0_xx[23]+0.4472135954999579*nuVtSqSum[1]*F_0_xx[23]+0.2857142857142857*nuVtSqSum[8]*F_0_xx[18]+0.31943828249997*nuVtSqSum[5]*F_0_xx[18]+0.4472135954999579*nuVtSqSum[4]*F_0_xx[18]+0.5*nuVtSqSum[0]*F_0_xx[18]+0.4*nuVtSqSum[3]*F_0_xx[17]+0.31943828249997*nuVtSqSum[7]*F_0_xx[14]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[14]+0.4472135954999579*nuVtSqSum[7]*F_0_xx[13]+0.4*nuVtSqSum[6]*F_0_xx[10]+0.4472135954999579*nuVtSqSum[2]*F_0_xx[10]+0.4472135954999579*F_0_xx[5]*nuVtSqSum[8]+0.5000000000000001*F_0_xx[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[6]+0.5*F_0_xx[5]*nuVtSqSum[5]; + incr_F_0[19] = 0.4*nuVtSqSum[3]*F_0_xx[26]+0.4*nuVtSqSum[6]*F_0_xx[25]+0.4472135954999579*nuVtSqSum[2]*F_0_xx[25]+0.4*nuVtSqSum[7]*F_0_xx[24]+0.4472135954999579*nuVtSqSum[1]*F_0_xx[24]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[22]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[21]+0.4*nuVtSqSum[8]*F_0_xx[19]+0.4472135954999579*nuVtSqSum[5]*F_0_xx[19]+0.4472135954999579*nuVtSqSum[4]*F_0_xx[19]+0.5*nuVtSqSum[0]*F_0_xx[19]+0.4472135954999579*nuVtSqSum[7]*F_0_xx[16]+0.5000000000000001*nuVtSqSum[1]*F_0_xx[16]+0.4472135954999579*nuVtSqSum[6]*F_0_xx[15]+0.5000000000000001*nuVtSqSum[2]*F_0_xx[15]+0.5*nuVtSqSum[3]*F_0_xx[9]; + incr_F_0[20] = 0.2040816326530612*nuVtSqSum[8]*F_0_xx[20]+0.31943828249997*nuVtSqSum[5]*F_0_xx[20]+0.31943828249997*nuVtSqSum[4]*F_0_xx[20]+0.5*nuVtSqSum[0]*F_0_xx[20]+0.2857142857142857*nuVtSqSum[7]*F_0_xx[12]+0.447213595499958*nuVtSqSum[1]*F_0_xx[12]+0.2857142857142857*nuVtSqSum[6]*F_0_xx[11]+0.447213595499958*nuVtSqSum[2]*F_0_xx[11]+0.31943828249997*F_0_xx[8]*nuVtSqSum[8]+0.31943828249997*F_0_xx[7]*nuVtSqSum[8]+0.5*F_0_xx[0]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*F_0_xx[8]+0.447213595499958*F_0_xx[1]*nuVtSqSum[7]+0.5*nuVtSqSum[5]*F_0_xx[7]+0.447213595499958*F_0_xx[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*F_0_xx[4]; + incr_F_0[21] = 0.31943828249997*nuVtSqSum[8]*F_0_xx[26]+0.5*nuVtSqSum[5]*F_0_xx[26]+0.447213595499958*nuVtSqSum[7]*F_0_xx[25]+0.31943828249997*nuVtSqSum[6]*F_0_xx[24]+0.5*nuVtSqSum[2]*F_0_xx[24]+0.5*nuVtSqSum[8]*F_0_xx[22]+0.31943828249997*nuVtSqSum[4]*F_0_xx[21]+0.5*nuVtSqSum[0]*F_0_xx[21]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[19]+0.5*nuVtSqSum[6]*F_0_xx[16]+0.447213595499958*nuVtSqSum[1]*F_0_xx[15]+0.5*nuVtSqSum[4]*F_0_xx[9]; + incr_F_0[22] = 0.31943828249997*nuVtSqSum[8]*F_0_xx[26]+0.5*nuVtSqSum[4]*F_0_xx[26]+0.31943828249997*nuVtSqSum[7]*F_0_xx[25]+0.5*nuVtSqSum[1]*F_0_xx[25]+0.447213595499958*nuVtSqSum[6]*F_0_xx[24]+0.31943828249997*nuVtSqSum[5]*F_0_xx[22]+0.5*nuVtSqSum[0]*F_0_xx[22]+0.5*nuVtSqSum[8]*F_0_xx[21]+0.4472135954999579*nuVtSqSum[3]*F_0_xx[19]+0.447213595499958*nuVtSqSum[2]*F_0_xx[16]+0.5*nuVtSqSum[7]*F_0_xx[15]+0.5*nuVtSqSum[5]*F_0_xx[9]; + incr_F_0[23] = 0.2040816326530612*nuVtSqSum[8]*F_0_xx[23]+0.31943828249997*nuVtSqSum[5]*F_0_xx[23]+0.31943828249997*nuVtSqSum[4]*F_0_xx[23]+0.5*nuVtSqSum[0]*F_0_xx[23]+0.2857142857142858*nuVtSqSum[7]*F_0_xx[18]+0.4472135954999579*nuVtSqSum[1]*F_0_xx[18]+0.2857142857142858*nuVtSqSum[6]*F_0_xx[17]+0.4472135954999579*nuVtSqSum[2]*F_0_xx[17]+0.31943828249997*nuVtSqSum[8]*F_0_xx[14]+0.5000000000000001*nuVtSqSum[4]*F_0_xx[14]+0.31943828249997*nuVtSqSum[8]*F_0_xx[13]+0.5000000000000001*nuVtSqSum[5]*F_0_xx[13]+0.4*nuVtSqSum[3]*F_0_xx[10]+0.5*F_0_xx[3]*nuVtSqSum[8]+0.447213595499958*F_0_xx[5]*nuVtSqSum[7]+0.447213595499958*F_0_xx[6]*nuVtSqSum[6]; + incr_F_0[24] = 0.2857142857142858*nuVtSqSum[6]*F_0_xx[26]+0.4472135954999579*nuVtSqSum[2]*F_0_xx[26]+0.4*nuVtSqSum[3]*F_0_xx[25]+0.2857142857142857*nuVtSqSum[8]*F_0_xx[24]+0.4472135954999579*nuVtSqSum[5]*F_0_xx[24]+0.31943828249997*nuVtSqSum[4]*F_0_xx[24]+0.5*nuVtSqSum[0]*F_0_xx[24]+0.447213595499958*nuVtSqSum[6]*F_0_xx[22]+0.31943828249997*nuVtSqSum[6]*F_0_xx[21]+0.5*nuVtSqSum[2]*F_0_xx[21]+0.4*nuVtSqSum[7]*F_0_xx[19]+0.4472135954999579*nuVtSqSum[1]*F_0_xx[19]+0.447213595499958*nuVtSqSum[8]*F_0_xx[16]+0.5000000000000001*nuVtSqSum[4]*F_0_xx[16]+0.447213595499958*nuVtSqSum[3]*F_0_xx[15]+0.5000000000000001*nuVtSqSum[6]*F_0_xx[9]; + incr_F_0[25] = 0.2857142857142858*nuVtSqSum[7]*F_0_xx[26]+0.4472135954999579*nuVtSqSum[1]*F_0_xx[26]+0.2857142857142857*nuVtSqSum[8]*F_0_xx[25]+0.31943828249997*nuVtSqSum[5]*F_0_xx[25]+0.4472135954999579*nuVtSqSum[4]*F_0_xx[25]+0.5*nuVtSqSum[0]*F_0_xx[25]+0.4*nuVtSqSum[3]*F_0_xx[24]+0.31943828249997*nuVtSqSum[7]*F_0_xx[22]+0.5*nuVtSqSum[1]*F_0_xx[22]+0.447213595499958*nuVtSqSum[7]*F_0_xx[21]+0.4*nuVtSqSum[6]*F_0_xx[19]+0.4472135954999579*nuVtSqSum[2]*F_0_xx[19]+0.447213595499958*nuVtSqSum[3]*F_0_xx[16]+0.447213595499958*nuVtSqSum[8]*F_0_xx[15]+0.5000000000000001*nuVtSqSum[5]*F_0_xx[15]+0.5000000000000001*nuVtSqSum[7]*F_0_xx[9]; + incr_F_0[26] = 0.2040816326530612*nuVtSqSum[8]*F_0_xx[26]+0.31943828249997*nuVtSqSum[5]*F_0_xx[26]+0.31943828249997*nuVtSqSum[4]*F_0_xx[26]+0.5*nuVtSqSum[0]*F_0_xx[26]+0.2857142857142858*nuVtSqSum[7]*F_0_xx[25]+0.4472135954999579*nuVtSqSum[1]*F_0_xx[25]+0.2857142857142858*nuVtSqSum[6]*F_0_xx[24]+0.4472135954999579*nuVtSqSum[2]*F_0_xx[24]+0.31943828249997*nuVtSqSum[8]*F_0_xx[22]+0.5*nuVtSqSum[4]*F_0_xx[22]+0.31943828249997*nuVtSqSum[8]*F_0_xx[21]+0.5*nuVtSqSum[5]*F_0_xx[21]+0.4*nuVtSqSum[3]*F_0_xx[19]+0.4472135954999579*nuVtSqSum[6]*F_0_xx[16]+0.4472135954999579*nuVtSqSum[7]*F_0_xx[15]+0.5*nuVtSqSum[8]*F_0_xx[9]; + incr_G_1[0] = 0.5*nuVtSqSum[8]*G_1_xx[20]+0.5*nuVtSqSum[7]*G_1_xx[12]+0.5*nuVtSqSum[6]*G_1_xx[11]+0.5*nuVtSqSum[5]*G_1_xx[8]+0.5*nuVtSqSum[4]*G_1_xx[7]+0.5*nuVtSqSum[3]*G_1_xx[4]+0.5*G_1_xx[2]*nuVtSqSum[2]+0.5*G_1_xx[1]*nuVtSqSum[1]+0.5*G_1_xx[0]*nuVtSqSum[0]; + incr_G_1[1] = 0.447213595499958*nuVtSqSum[7]*G_1_xx[20]+0.447213595499958*nuVtSqSum[8]*G_1_xx[12]+0.5000000000000001*nuVtSqSum[5]*G_1_xx[12]+0.447213595499958*nuVtSqSum[3]*G_1_xx[11]+0.5000000000000001*nuVtSqSum[7]*G_1_xx[8]+0.4472135954999579*nuVtSqSum[1]*G_1_xx[7]+0.447213595499958*G_1_xx[4]*nuVtSqSum[6]+0.4472135954999579*G_1_xx[1]*nuVtSqSum[4]+0.5*nuVtSqSum[2]*G_1_xx[4]+0.5*G_1_xx[2]*nuVtSqSum[3]+0.5*G_1_xx[0]*nuVtSqSum[1]+0.5*nuVtSqSum[0]*G_1_xx[1]; + incr_G_1[2] = 0.447213595499958*nuVtSqSum[6]*G_1_xx[20]+0.447213595499958*nuVtSqSum[3]*G_1_xx[12]+0.447213595499958*nuVtSqSum[8]*G_1_xx[11]+0.5000000000000001*nuVtSqSum[4]*G_1_xx[11]+0.4472135954999579*nuVtSqSum[2]*G_1_xx[8]+0.447213595499958*G_1_xx[4]*nuVtSqSum[7]+0.5000000000000001*nuVtSqSum[6]*G_1_xx[7]+0.4472135954999579*G_1_xx[2]*nuVtSqSum[5]+0.5*nuVtSqSum[1]*G_1_xx[4]+0.5*G_1_xx[1]*nuVtSqSum[3]+0.5*G_1_xx[0]*nuVtSqSum[2]+0.5*nuVtSqSum[0]*G_1_xx[2]; + incr_G_1[3] = 0.5*nuVtSqSum[8]*G_1_xx[23]+0.5000000000000001*nuVtSqSum[7]*G_1_xx[18]+0.5000000000000001*nuVtSqSum[6]*G_1_xx[17]+0.5000000000000001*nuVtSqSum[5]*G_1_xx[14]+0.5000000000000001*nuVtSqSum[4]*G_1_xx[13]+0.5*nuVtSqSum[3]*G_1_xx[10]+0.5*nuVtSqSum[2]*G_1_xx[6]+0.5*nuVtSqSum[1]*G_1_xx[5]+0.5*nuVtSqSum[0]*G_1_xx[3]; + incr_G_1[4] = 0.4*nuVtSqSum[3]*G_1_xx[20]+0.4*nuVtSqSum[6]*G_1_xx[12]+0.447213595499958*nuVtSqSum[2]*G_1_xx[12]+0.4*nuVtSqSum[7]*G_1_xx[11]+0.447213595499958*nuVtSqSum[1]*G_1_xx[11]+0.4*G_1_xx[4]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[8]+0.447213595499958*G_1_xx[2]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[7]+0.447213595499958*G_1_xx[1]*nuVtSqSum[6]+0.4472135954999579*G_1_xx[4]*nuVtSqSum[5]+0.4472135954999579*G_1_xx[4]*nuVtSqSum[4]+0.5*nuVtSqSum[0]*G_1_xx[4]+0.5*G_1_xx[0]*nuVtSqSum[3]+0.5*G_1_xx[1]*nuVtSqSum[2]+0.5*nuVtSqSum[1]*G_1_xx[2]; + incr_G_1[5] = 0.447213595499958*nuVtSqSum[7]*G_1_xx[23]+0.4472135954999579*nuVtSqSum[8]*G_1_xx[18]+0.5*nuVtSqSum[5]*G_1_xx[18]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[17]+0.5*nuVtSqSum[7]*G_1_xx[14]+0.447213595499958*nuVtSqSum[1]*G_1_xx[13]+0.447213595499958*nuVtSqSum[6]*G_1_xx[10]+0.5*nuVtSqSum[2]*G_1_xx[10]+0.5*nuVtSqSum[3]*G_1_xx[6]+0.4472135954999579*nuVtSqSum[4]*G_1_xx[5]+0.5*nuVtSqSum[0]*G_1_xx[5]+0.5*nuVtSqSum[1]*G_1_xx[3]; + incr_G_1[6] = 0.447213595499958*nuVtSqSum[6]*G_1_xx[23]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[18]+0.4472135954999579*nuVtSqSum[8]*G_1_xx[17]+0.5*nuVtSqSum[4]*G_1_xx[17]+0.447213595499958*nuVtSqSum[2]*G_1_xx[14]+0.5*nuVtSqSum[6]*G_1_xx[13]+0.447213595499958*nuVtSqSum[7]*G_1_xx[10]+0.5*nuVtSqSum[1]*G_1_xx[10]+0.4472135954999579*nuVtSqSum[5]*G_1_xx[6]+0.5*nuVtSqSum[0]*G_1_xx[6]+0.5*nuVtSqSum[3]*G_1_xx[5]+0.5*nuVtSqSum[2]*G_1_xx[3]; + incr_G_1[7] = 0.31943828249997*nuVtSqSum[8]*G_1_xx[20]+0.5*nuVtSqSum[5]*G_1_xx[20]+0.4472135954999579*nuVtSqSum[7]*G_1_xx[12]+0.31943828249997*nuVtSqSum[6]*G_1_xx[11]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[11]+0.5*G_1_xx[8]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[4]*G_1_xx[7]+0.5*nuVtSqSum[0]*G_1_xx[7]+0.5000000000000001*G_1_xx[2]*nuVtSqSum[6]+0.5*G_1_xx[0]*nuVtSqSum[4]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[4]+0.4472135954999579*G_1_xx[1]*nuVtSqSum[1]; + incr_G_1[8] = 0.31943828249997*nuVtSqSum[8]*G_1_xx[20]+0.5*nuVtSqSum[4]*G_1_xx[20]+0.31943828249997*nuVtSqSum[7]*G_1_xx[12]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[12]+0.4472135954999579*nuVtSqSum[6]*G_1_xx[11]+0.5*G_1_xx[7]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[5]*G_1_xx[8]+0.5*nuVtSqSum[0]*G_1_xx[8]+0.5000000000000001*G_1_xx[1]*nuVtSqSum[7]+0.5*G_1_xx[0]*nuVtSqSum[5]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[4]+0.4472135954999579*G_1_xx[2]*nuVtSqSum[2]; + incr_G_1[9] = 0.5*nuVtSqSum[8]*G_1_xx[26]+0.5000000000000001*nuVtSqSum[7]*G_1_xx[25]+0.5000000000000001*nuVtSqSum[6]*G_1_xx[24]+0.5*nuVtSqSum[5]*G_1_xx[22]+0.5*nuVtSqSum[4]*G_1_xx[21]+0.5*nuVtSqSum[3]*G_1_xx[19]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[16]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[15]+0.5*nuVtSqSum[0]*G_1_xx[9]; + incr_G_1[10] = 0.4*nuVtSqSum[3]*G_1_xx[23]+0.4*nuVtSqSum[6]*G_1_xx[18]+0.4472135954999579*nuVtSqSum[2]*G_1_xx[18]+0.4*nuVtSqSum[7]*G_1_xx[17]+0.4472135954999579*nuVtSqSum[1]*G_1_xx[17]+0.447213595499958*nuVtSqSum[3]*G_1_xx[14]+0.447213595499958*nuVtSqSum[3]*G_1_xx[13]+0.4*nuVtSqSum[8]*G_1_xx[10]+0.4472135954999579*nuVtSqSum[5]*G_1_xx[10]+0.4472135954999579*nuVtSqSum[4]*G_1_xx[10]+0.5*nuVtSqSum[0]*G_1_xx[10]+0.447213595499958*G_1_xx[6]*nuVtSqSum[7]+0.447213595499958*G_1_xx[5]*nuVtSqSum[6]+0.5*nuVtSqSum[1]*G_1_xx[6]+0.5*nuVtSqSum[2]*G_1_xx[5]+0.5*G_1_xx[3]*nuVtSqSum[3]; + incr_G_1[11] = 0.2857142857142857*nuVtSqSum[6]*G_1_xx[20]+0.447213595499958*nuVtSqSum[2]*G_1_xx[20]+0.4*nuVtSqSum[3]*G_1_xx[12]+0.2857142857142857*nuVtSqSum[8]*G_1_xx[11]+0.4472135954999579*nuVtSqSum[5]*G_1_xx[11]+0.31943828249997*nuVtSqSum[4]*G_1_xx[11]+0.5*nuVtSqSum[0]*G_1_xx[11]+0.447213595499958*G_1_xx[2]*nuVtSqSum[8]+0.4472135954999579*nuVtSqSum[6]*G_1_xx[8]+0.4*G_1_xx[4]*nuVtSqSum[7]+0.31943828249997*nuVtSqSum[6]*G_1_xx[7]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[7]+0.5*G_1_xx[0]*nuVtSqSum[6]+0.5000000000000001*G_1_xx[2]*nuVtSqSum[4]+0.447213595499958*nuVtSqSum[1]*G_1_xx[4]+0.447213595499958*G_1_xx[1]*nuVtSqSum[3]; + incr_G_1[12] = 0.2857142857142857*nuVtSqSum[7]*G_1_xx[20]+0.447213595499958*nuVtSqSum[1]*G_1_xx[20]+0.2857142857142857*nuVtSqSum[8]*G_1_xx[12]+0.31943828249997*nuVtSqSum[5]*G_1_xx[12]+0.4472135954999579*nuVtSqSum[4]*G_1_xx[12]+0.5*nuVtSqSum[0]*G_1_xx[12]+0.4*nuVtSqSum[3]*G_1_xx[11]+0.447213595499958*G_1_xx[1]*nuVtSqSum[8]+0.31943828249997*nuVtSqSum[7]*G_1_xx[8]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[8]+0.4472135954999579*G_1_xx[7]*nuVtSqSum[7]+0.5*G_1_xx[0]*nuVtSqSum[7]+0.4*G_1_xx[4]*nuVtSqSum[6]+0.5000000000000001*G_1_xx[1]*nuVtSqSum[5]+0.447213595499958*nuVtSqSum[2]*G_1_xx[4]+0.447213595499958*G_1_xx[2]*nuVtSqSum[3]; + incr_G_1[13] = 0.31943828249997*nuVtSqSum[8]*G_1_xx[23]+0.5000000000000001*nuVtSqSum[5]*G_1_xx[23]+0.4472135954999579*nuVtSqSum[7]*G_1_xx[18]+0.31943828249997*nuVtSqSum[6]*G_1_xx[17]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[17]+0.5*nuVtSqSum[8]*G_1_xx[14]+0.31943828249997*nuVtSqSum[4]*G_1_xx[13]+0.5*nuVtSqSum[0]*G_1_xx[13]+0.447213595499958*nuVtSqSum[3]*G_1_xx[10]+0.5*G_1_xx[6]*nuVtSqSum[6]+0.447213595499958*nuVtSqSum[1]*G_1_xx[5]+0.5000000000000001*G_1_xx[3]*nuVtSqSum[4]; + incr_G_1[14] = 0.31943828249997*nuVtSqSum[8]*G_1_xx[23]+0.5000000000000001*nuVtSqSum[4]*G_1_xx[23]+0.31943828249997*nuVtSqSum[7]*G_1_xx[18]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[18]+0.4472135954999579*nuVtSqSum[6]*G_1_xx[17]+0.31943828249997*nuVtSqSum[5]*G_1_xx[14]+0.5*nuVtSqSum[0]*G_1_xx[14]+0.5*nuVtSqSum[8]*G_1_xx[13]+0.447213595499958*nuVtSqSum[3]*G_1_xx[10]+0.5*G_1_xx[5]*nuVtSqSum[7]+0.447213595499958*nuVtSqSum[2]*G_1_xx[6]+0.5000000000000001*G_1_xx[3]*nuVtSqSum[5]; + incr_G_1[15] = 0.4472135954999579*nuVtSqSum[7]*G_1_xx[26]+0.447213595499958*nuVtSqSum[8]*G_1_xx[25]+0.5000000000000001*nuVtSqSum[5]*G_1_xx[25]+0.447213595499958*nuVtSqSum[3]*G_1_xx[24]+0.5*nuVtSqSum[7]*G_1_xx[22]+0.447213595499958*nuVtSqSum[1]*G_1_xx[21]+0.4472135954999579*nuVtSqSum[6]*G_1_xx[19]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[19]+0.5*nuVtSqSum[3]*G_1_xx[16]+0.4472135954999579*nuVtSqSum[4]*G_1_xx[15]+0.5*nuVtSqSum[0]*G_1_xx[15]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[9]; + incr_G_1[16] = 0.4472135954999579*nuVtSqSum[6]*G_1_xx[26]+0.447213595499958*nuVtSqSum[3]*G_1_xx[25]+0.447213595499958*nuVtSqSum[8]*G_1_xx[24]+0.5000000000000001*nuVtSqSum[4]*G_1_xx[24]+0.447213595499958*nuVtSqSum[2]*G_1_xx[22]+0.5*nuVtSqSum[6]*G_1_xx[21]+0.4472135954999579*nuVtSqSum[7]*G_1_xx[19]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[19]+0.4472135954999579*nuVtSqSum[5]*G_1_xx[16]+0.5*nuVtSqSum[0]*G_1_xx[16]+0.5*nuVtSqSum[3]*G_1_xx[15]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[9]; + incr_G_1[17] = 0.2857142857142858*nuVtSqSum[6]*G_1_xx[23]+0.4472135954999579*nuVtSqSum[2]*G_1_xx[23]+0.4*nuVtSqSum[3]*G_1_xx[18]+0.2857142857142857*nuVtSqSum[8]*G_1_xx[17]+0.4472135954999579*nuVtSqSum[5]*G_1_xx[17]+0.31943828249997*nuVtSqSum[4]*G_1_xx[17]+0.5*nuVtSqSum[0]*G_1_xx[17]+0.4472135954999579*nuVtSqSum[6]*G_1_xx[14]+0.31943828249997*nuVtSqSum[6]*G_1_xx[13]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[13]+0.4*nuVtSqSum[7]*G_1_xx[10]+0.4472135954999579*nuVtSqSum[1]*G_1_xx[10]+0.4472135954999579*G_1_xx[6]*nuVtSqSum[8]+0.5000000000000001*G_1_xx[3]*nuVtSqSum[6]+0.5*nuVtSqSum[4]*G_1_xx[6]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[5]; + incr_G_1[18] = 0.2857142857142858*nuVtSqSum[7]*G_1_xx[23]+0.4472135954999579*nuVtSqSum[1]*G_1_xx[23]+0.2857142857142857*nuVtSqSum[8]*G_1_xx[18]+0.31943828249997*nuVtSqSum[5]*G_1_xx[18]+0.4472135954999579*nuVtSqSum[4]*G_1_xx[18]+0.5*nuVtSqSum[0]*G_1_xx[18]+0.4*nuVtSqSum[3]*G_1_xx[17]+0.31943828249997*nuVtSqSum[7]*G_1_xx[14]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[14]+0.4472135954999579*nuVtSqSum[7]*G_1_xx[13]+0.4*nuVtSqSum[6]*G_1_xx[10]+0.4472135954999579*nuVtSqSum[2]*G_1_xx[10]+0.4472135954999579*G_1_xx[5]*nuVtSqSum[8]+0.5000000000000001*G_1_xx[3]*nuVtSqSum[7]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[6]+0.5*G_1_xx[5]*nuVtSqSum[5]; + incr_G_1[19] = 0.4*nuVtSqSum[3]*G_1_xx[26]+0.4*nuVtSqSum[6]*G_1_xx[25]+0.4472135954999579*nuVtSqSum[2]*G_1_xx[25]+0.4*nuVtSqSum[7]*G_1_xx[24]+0.4472135954999579*nuVtSqSum[1]*G_1_xx[24]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[22]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[21]+0.4*nuVtSqSum[8]*G_1_xx[19]+0.4472135954999579*nuVtSqSum[5]*G_1_xx[19]+0.4472135954999579*nuVtSqSum[4]*G_1_xx[19]+0.5*nuVtSqSum[0]*G_1_xx[19]+0.4472135954999579*nuVtSqSum[7]*G_1_xx[16]+0.5000000000000001*nuVtSqSum[1]*G_1_xx[16]+0.4472135954999579*nuVtSqSum[6]*G_1_xx[15]+0.5000000000000001*nuVtSqSum[2]*G_1_xx[15]+0.5*nuVtSqSum[3]*G_1_xx[9]; + incr_G_1[20] = 0.2040816326530612*nuVtSqSum[8]*G_1_xx[20]+0.31943828249997*nuVtSqSum[5]*G_1_xx[20]+0.31943828249997*nuVtSqSum[4]*G_1_xx[20]+0.5*nuVtSqSum[0]*G_1_xx[20]+0.2857142857142857*nuVtSqSum[7]*G_1_xx[12]+0.447213595499958*nuVtSqSum[1]*G_1_xx[12]+0.2857142857142857*nuVtSqSum[6]*G_1_xx[11]+0.447213595499958*nuVtSqSum[2]*G_1_xx[11]+0.31943828249997*G_1_xx[8]*nuVtSqSum[8]+0.31943828249997*G_1_xx[7]*nuVtSqSum[8]+0.5*G_1_xx[0]*nuVtSqSum[8]+0.5*nuVtSqSum[4]*G_1_xx[8]+0.447213595499958*G_1_xx[1]*nuVtSqSum[7]+0.5*nuVtSqSum[5]*G_1_xx[7]+0.447213595499958*G_1_xx[2]*nuVtSqSum[6]+0.4*nuVtSqSum[3]*G_1_xx[4]; + incr_G_1[21] = 0.31943828249997*nuVtSqSum[8]*G_1_xx[26]+0.5*nuVtSqSum[5]*G_1_xx[26]+0.447213595499958*nuVtSqSum[7]*G_1_xx[25]+0.31943828249997*nuVtSqSum[6]*G_1_xx[24]+0.5*nuVtSqSum[2]*G_1_xx[24]+0.5*nuVtSqSum[8]*G_1_xx[22]+0.31943828249997*nuVtSqSum[4]*G_1_xx[21]+0.5*nuVtSqSum[0]*G_1_xx[21]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[19]+0.5*nuVtSqSum[6]*G_1_xx[16]+0.447213595499958*nuVtSqSum[1]*G_1_xx[15]+0.5*nuVtSqSum[4]*G_1_xx[9]; + incr_G_1[22] = 0.31943828249997*nuVtSqSum[8]*G_1_xx[26]+0.5*nuVtSqSum[4]*G_1_xx[26]+0.31943828249997*nuVtSqSum[7]*G_1_xx[25]+0.5*nuVtSqSum[1]*G_1_xx[25]+0.447213595499958*nuVtSqSum[6]*G_1_xx[24]+0.31943828249997*nuVtSqSum[5]*G_1_xx[22]+0.5*nuVtSqSum[0]*G_1_xx[22]+0.5*nuVtSqSum[8]*G_1_xx[21]+0.4472135954999579*nuVtSqSum[3]*G_1_xx[19]+0.447213595499958*nuVtSqSum[2]*G_1_xx[16]+0.5*nuVtSqSum[7]*G_1_xx[15]+0.5*nuVtSqSum[5]*G_1_xx[9]; + incr_G_1[23] = 0.2040816326530612*nuVtSqSum[8]*G_1_xx[23]+0.31943828249997*nuVtSqSum[5]*G_1_xx[23]+0.31943828249997*nuVtSqSum[4]*G_1_xx[23]+0.5*nuVtSqSum[0]*G_1_xx[23]+0.2857142857142858*nuVtSqSum[7]*G_1_xx[18]+0.4472135954999579*nuVtSqSum[1]*G_1_xx[18]+0.2857142857142858*nuVtSqSum[6]*G_1_xx[17]+0.4472135954999579*nuVtSqSum[2]*G_1_xx[17]+0.31943828249997*nuVtSqSum[8]*G_1_xx[14]+0.5000000000000001*nuVtSqSum[4]*G_1_xx[14]+0.31943828249997*nuVtSqSum[8]*G_1_xx[13]+0.5000000000000001*nuVtSqSum[5]*G_1_xx[13]+0.4*nuVtSqSum[3]*G_1_xx[10]+0.5*G_1_xx[3]*nuVtSqSum[8]+0.447213595499958*G_1_xx[5]*nuVtSqSum[7]+0.447213595499958*G_1_xx[6]*nuVtSqSum[6]; + incr_G_1[24] = 0.2857142857142858*nuVtSqSum[6]*G_1_xx[26]+0.4472135954999579*nuVtSqSum[2]*G_1_xx[26]+0.4*nuVtSqSum[3]*G_1_xx[25]+0.2857142857142857*nuVtSqSum[8]*G_1_xx[24]+0.4472135954999579*nuVtSqSum[5]*G_1_xx[24]+0.31943828249997*nuVtSqSum[4]*G_1_xx[24]+0.5*nuVtSqSum[0]*G_1_xx[24]+0.447213595499958*nuVtSqSum[6]*G_1_xx[22]+0.31943828249997*nuVtSqSum[6]*G_1_xx[21]+0.5*nuVtSqSum[2]*G_1_xx[21]+0.4*nuVtSqSum[7]*G_1_xx[19]+0.4472135954999579*nuVtSqSum[1]*G_1_xx[19]+0.447213595499958*nuVtSqSum[8]*G_1_xx[16]+0.5000000000000001*nuVtSqSum[4]*G_1_xx[16]+0.447213595499958*nuVtSqSum[3]*G_1_xx[15]+0.5000000000000001*nuVtSqSum[6]*G_1_xx[9]; + incr_G_1[25] = 0.2857142857142858*nuVtSqSum[7]*G_1_xx[26]+0.4472135954999579*nuVtSqSum[1]*G_1_xx[26]+0.2857142857142857*nuVtSqSum[8]*G_1_xx[25]+0.31943828249997*nuVtSqSum[5]*G_1_xx[25]+0.4472135954999579*nuVtSqSum[4]*G_1_xx[25]+0.5*nuVtSqSum[0]*G_1_xx[25]+0.4*nuVtSqSum[3]*G_1_xx[24]+0.31943828249997*nuVtSqSum[7]*G_1_xx[22]+0.5*nuVtSqSum[1]*G_1_xx[22]+0.447213595499958*nuVtSqSum[7]*G_1_xx[21]+0.4*nuVtSqSum[6]*G_1_xx[19]+0.4472135954999579*nuVtSqSum[2]*G_1_xx[19]+0.447213595499958*nuVtSqSum[3]*G_1_xx[16]+0.447213595499958*nuVtSqSum[8]*G_1_xx[15]+0.5000000000000001*nuVtSqSum[5]*G_1_xx[15]+0.5000000000000001*nuVtSqSum[7]*G_1_xx[9]; + incr_G_1[26] = 0.2040816326530612*nuVtSqSum[8]*G_1_xx[26]+0.31943828249997*nuVtSqSum[5]*G_1_xx[26]+0.31943828249997*nuVtSqSum[4]*G_1_xx[26]+0.5*nuVtSqSum[0]*G_1_xx[26]+0.2857142857142858*nuVtSqSum[7]*G_1_xx[25]+0.4472135954999579*nuVtSqSum[1]*G_1_xx[25]+0.2857142857142858*nuVtSqSum[6]*G_1_xx[24]+0.4472135954999579*nuVtSqSum[2]*G_1_xx[24]+0.31943828249997*nuVtSqSum[8]*G_1_xx[22]+0.5*nuVtSqSum[4]*G_1_xx[22]+0.31943828249997*nuVtSqSum[8]*G_1_xx[21]+0.5*nuVtSqSum[5]*G_1_xx[21]+0.4*nuVtSqSum[3]*G_1_xx[19]+0.4472135954999579*nuVtSqSum[6]*G_1_xx[16]+0.4472135954999579*nuVtSqSum[7]*G_1_xx[15]+0.5*nuVtSqSum[8]*G_1_xx[9]; out_F_0[0] += incr_F_0[0]*rdvSq4; out_F_0[1] += incr_F_0[1]*rdvSq4; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1.c index dd345f298..a81a9d200 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1.c @@ -1,12 +1,15 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[4]: cell-center coordinates. - // dxv[4]: cell spacing. - // nuVtSqSum[8]: Sum of thermal speeds squared time their respective collisionalities. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: Incremented distribution function in cell + // out: Incremented distribution functions in center cell. double rdvSq4 = 4.0/(dxv[3]*dxv[3]); + const double *nuVtSqSum = &nuPrimMomsSum[8]; + const double *F_0l = &fl[0]; const double *G_1l = &fl[24]; const double *F_0c = &fc[0]; @@ -69,54 +72,54 @@ GKYL_CU_DH double lbo_vlasov_pkpm_diff_surfvpar_3x1v_ser_p1(const double *w, con G_1_xx[22] = (-0.140625*G_1r[22])-0.140625*G_1l[22]-6.28125*G_1c[22]-0.3025768239224545*G_1r[14]+0.3025768239224545*G_1l[14]+0.4192627457812106*G_1r[7]+0.4192627457812106*G_1l[7]-0.8385254915624212*G_1c[7]; G_1_xx[23] = (-0.140625*G_1r[23])-0.140625*G_1l[23]-6.28125*G_1c[23]-0.3025768239224544*G_1r[15]+0.3025768239224544*G_1l[15]+0.4192627457812105*G_1r[11]+0.4192627457812105*G_1l[11]-0.8385254915624211*G_1c[11]; - incr_F_0[0] = 0.3535533905932737*nuVtSq[7]*F_0_xx[11]+0.3535533905932737*nuVtSq[6]*F_0_xx[7]+0.3535533905932737*nuVtSq[5]*F_0_xx[6]+0.3535533905932737*nuVtSq[4]*F_0_xx[5]+0.3535533905932737*F_0_xx[3]*nuVtSq[3]+0.3535533905932737*F_0_xx[2]*nuVtSq[2]+0.3535533905932737*F_0_xx[1]*nuVtSq[1]+0.3535533905932737*F_0_xx[0]*nuVtSq[0]; - incr_F_0[1] = 0.3535533905932737*nuVtSq[6]*F_0_xx[11]+0.3535533905932737*F_0_xx[7]*nuVtSq[7]+0.3535533905932737*nuVtSq[3]*F_0_xx[6]+0.3535533905932737*F_0_xx[3]*nuVtSq[5]+0.3535533905932737*nuVtSq[2]*F_0_xx[5]+0.3535533905932737*F_0_xx[2]*nuVtSq[4]+0.3535533905932737*F_0_xx[0]*nuVtSq[1]+0.3535533905932737*nuVtSq[0]*F_0_xx[1]; - incr_F_0[2] = 0.3535533905932737*nuVtSq[5]*F_0_xx[11]+0.3535533905932737*F_0_xx[6]*nuVtSq[7]+0.3535533905932737*nuVtSq[3]*F_0_xx[7]+0.3535533905932737*F_0_xx[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*F_0_xx[5]+0.3535533905932737*F_0_xx[1]*nuVtSq[4]+0.3535533905932737*F_0_xx[0]*nuVtSq[2]+0.3535533905932737*nuVtSq[0]*F_0_xx[2]; - incr_F_0[3] = 0.3535533905932737*nuVtSq[4]*F_0_xx[11]+0.3535533905932737*F_0_xx[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*F_0_xx[7]+0.3535533905932737*F_0_xx[2]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*F_0_xx[6]+0.3535533905932737*F_0_xx[1]*nuVtSq[5]+0.3535533905932737*F_0_xx[0]*nuVtSq[3]+0.3535533905932737*nuVtSq[0]*F_0_xx[3]; - incr_F_0[4] = 0.3535533905932737*nuVtSq[7]*F_0_xx[15]+0.3535533905932737*nuVtSq[6]*F_0_xx[14]+0.3535533905932737*nuVtSq[5]*F_0_xx[13]+0.3535533905932737*nuVtSq[4]*F_0_xx[12]+0.3535533905932737*nuVtSq[3]*F_0_xx[10]+0.3535533905932737*nuVtSq[2]*F_0_xx[9]+0.3535533905932737*nuVtSq[1]*F_0_xx[8]+0.3535533905932737*nuVtSq[0]*F_0_xx[4]; - incr_F_0[5] = 0.3535533905932737*nuVtSq[3]*F_0_xx[11]+0.3535533905932737*F_0_xx[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[5]*F_0_xx[7]+0.3535533905932737*F_0_xx[6]*nuVtSq[6]+0.3535533905932737*nuVtSq[0]*F_0_xx[5]+0.3535533905932737*F_0_xx[0]*nuVtSq[4]+0.3535533905932737*F_0_xx[1]*nuVtSq[2]+0.3535533905932737*nuVtSq[1]*F_0_xx[2]; - incr_F_0[6] = 0.3535533905932737*nuVtSq[2]*F_0_xx[11]+0.3535533905932737*F_0_xx[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*F_0_xx[7]+0.3535533905932737*F_0_xx[5]*nuVtSq[6]+0.3535533905932737*nuVtSq[0]*F_0_xx[6]+0.3535533905932737*F_0_xx[0]*nuVtSq[5]+0.3535533905932737*F_0_xx[1]*nuVtSq[3]+0.3535533905932737*nuVtSq[1]*F_0_xx[3]; - incr_F_0[7] = 0.3535533905932737*nuVtSq[1]*F_0_xx[11]+0.3535533905932737*F_0_xx[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*F_0_xx[7]+0.3535533905932737*F_0_xx[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[4]*F_0_xx[6]+0.3535533905932737*F_0_xx[5]*nuVtSq[5]+0.3535533905932737*F_0_xx[2]*nuVtSq[3]+0.3535533905932737*nuVtSq[2]*F_0_xx[3]; - incr_F_0[8] = 0.3535533905932737*nuVtSq[6]*F_0_xx[15]+0.3535533905932737*nuVtSq[7]*F_0_xx[14]+0.3535533905932737*nuVtSq[3]*F_0_xx[13]+0.3535533905932737*nuVtSq[2]*F_0_xx[12]+0.3535533905932737*nuVtSq[5]*F_0_xx[10]+0.3535533905932737*nuVtSq[4]*F_0_xx[9]+0.3535533905932737*nuVtSq[0]*F_0_xx[8]+0.3535533905932737*nuVtSq[1]*F_0_xx[4]; - incr_F_0[9] = 0.3535533905932737*nuVtSq[5]*F_0_xx[15]+0.3535533905932737*nuVtSq[3]*F_0_xx[14]+0.3535533905932737*nuVtSq[7]*F_0_xx[13]+0.3535533905932737*nuVtSq[1]*F_0_xx[12]+0.3535533905932737*nuVtSq[6]*F_0_xx[10]+0.3535533905932737*nuVtSq[0]*F_0_xx[9]+0.3535533905932737*nuVtSq[4]*F_0_xx[8]+0.3535533905932737*nuVtSq[2]*F_0_xx[4]; - incr_F_0[10] = 0.3535533905932737*nuVtSq[4]*F_0_xx[15]+0.3535533905932737*nuVtSq[2]*F_0_xx[14]+0.3535533905932737*nuVtSq[1]*F_0_xx[13]+0.3535533905932737*nuVtSq[7]*F_0_xx[12]+0.3535533905932737*nuVtSq[0]*F_0_xx[10]+0.3535533905932737*nuVtSq[6]*F_0_xx[9]+0.3535533905932737*nuVtSq[5]*F_0_xx[8]+0.3535533905932737*nuVtSq[3]*F_0_xx[4]; - incr_F_0[11] = 0.3535533905932737*nuVtSq[0]*F_0_xx[11]+0.3535533905932737*F_0_xx[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*F_0_xx[7]+0.3535533905932737*F_0_xx[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[2]*F_0_xx[6]+0.3535533905932737*F_0_xx[2]*nuVtSq[5]+0.3535533905932737*nuVtSq[3]*F_0_xx[5]+0.3535533905932737*F_0_xx[3]*nuVtSq[4]; - incr_F_0[12] = 0.3535533905932737*nuVtSq[3]*F_0_xx[15]+0.3535533905932737*nuVtSq[5]*F_0_xx[14]+0.3535533905932737*nuVtSq[6]*F_0_xx[13]+0.3535533905932737*nuVtSq[0]*F_0_xx[12]+0.3535533905932737*nuVtSq[7]*F_0_xx[10]+0.3535533905932737*nuVtSq[1]*F_0_xx[9]+0.3535533905932737*nuVtSq[2]*F_0_xx[8]+0.3535533905932737*F_0_xx[4]*nuVtSq[4]; - incr_F_0[13] = 0.3535533905932737*nuVtSq[2]*F_0_xx[15]+0.3535533905932737*nuVtSq[4]*F_0_xx[14]+0.3535533905932737*nuVtSq[0]*F_0_xx[13]+0.3535533905932737*nuVtSq[6]*F_0_xx[12]+0.3535533905932737*nuVtSq[1]*F_0_xx[10]+0.3535533905932737*nuVtSq[7]*F_0_xx[9]+0.3535533905932737*nuVtSq[3]*F_0_xx[8]+0.3535533905932737*F_0_xx[4]*nuVtSq[5]; - incr_F_0[14] = 0.3535533905932737*nuVtSq[1]*F_0_xx[15]+0.3535533905932737*nuVtSq[0]*F_0_xx[14]+0.3535533905932737*nuVtSq[4]*F_0_xx[13]+0.3535533905932737*nuVtSq[5]*F_0_xx[12]+0.3535533905932737*nuVtSq[2]*F_0_xx[10]+0.3535533905932737*nuVtSq[3]*F_0_xx[9]+0.3535533905932737*nuVtSq[7]*F_0_xx[8]+0.3535533905932737*F_0_xx[4]*nuVtSq[6]; - incr_F_0[15] = 0.3535533905932737*nuVtSq[0]*F_0_xx[15]+0.3535533905932737*nuVtSq[1]*F_0_xx[14]+0.3535533905932737*nuVtSq[2]*F_0_xx[13]+0.3535533905932737*nuVtSq[3]*F_0_xx[12]+0.3535533905932737*nuVtSq[4]*F_0_xx[10]+0.3535533905932737*nuVtSq[5]*F_0_xx[9]+0.3535533905932737*nuVtSq[6]*F_0_xx[8]+0.3535533905932737*F_0_xx[4]*nuVtSq[7]; - incr_F_0[16] = 0.3535533905932737*nuVtSq[7]*F_0_xx[23]+0.3535533905932737*nuVtSq[6]*F_0_xx[22]+0.3535533905932737*nuVtSq[5]*F_0_xx[21]+0.3535533905932737*nuVtSq[4]*F_0_xx[20]+0.3535533905932737*nuVtSq[3]*F_0_xx[19]+0.3535533905932737*nuVtSq[2]*F_0_xx[18]+0.3535533905932737*nuVtSq[1]*F_0_xx[17]+0.3535533905932737*nuVtSq[0]*F_0_xx[16]; - incr_F_0[17] = 0.3535533905932737*nuVtSq[6]*F_0_xx[23]+0.3535533905932737*nuVtSq[7]*F_0_xx[22]+0.3535533905932737*nuVtSq[3]*F_0_xx[21]+0.3535533905932737*nuVtSq[2]*F_0_xx[20]+0.3535533905932737*nuVtSq[5]*F_0_xx[19]+0.3535533905932737*nuVtSq[4]*F_0_xx[18]+0.3535533905932737*nuVtSq[0]*F_0_xx[17]+0.3535533905932737*nuVtSq[1]*F_0_xx[16]; - incr_F_0[18] = 0.3535533905932737*nuVtSq[5]*F_0_xx[23]+0.3535533905932737*nuVtSq[3]*F_0_xx[22]+0.3535533905932737*nuVtSq[7]*F_0_xx[21]+0.3535533905932737*nuVtSq[1]*F_0_xx[20]+0.3535533905932737*nuVtSq[6]*F_0_xx[19]+0.3535533905932737*nuVtSq[0]*F_0_xx[18]+0.3535533905932737*nuVtSq[4]*F_0_xx[17]+0.3535533905932737*nuVtSq[2]*F_0_xx[16]; - incr_F_0[19] = 0.3535533905932737*nuVtSq[4]*F_0_xx[23]+0.3535533905932737*nuVtSq[2]*F_0_xx[22]+0.3535533905932737*nuVtSq[1]*F_0_xx[21]+0.3535533905932737*nuVtSq[7]*F_0_xx[20]+0.3535533905932737*nuVtSq[0]*F_0_xx[19]+0.3535533905932737*nuVtSq[6]*F_0_xx[18]+0.3535533905932737*nuVtSq[5]*F_0_xx[17]+0.3535533905932737*nuVtSq[3]*F_0_xx[16]; - incr_F_0[20] = 0.3535533905932737*nuVtSq[3]*F_0_xx[23]+0.3535533905932737*nuVtSq[5]*F_0_xx[22]+0.3535533905932737*nuVtSq[6]*F_0_xx[21]+0.3535533905932737*nuVtSq[0]*F_0_xx[20]+0.3535533905932737*nuVtSq[7]*F_0_xx[19]+0.3535533905932737*nuVtSq[1]*F_0_xx[18]+0.3535533905932737*nuVtSq[2]*F_0_xx[17]+0.3535533905932737*nuVtSq[4]*F_0_xx[16]; - incr_F_0[21] = 0.3535533905932737*nuVtSq[2]*F_0_xx[23]+0.3535533905932737*nuVtSq[4]*F_0_xx[22]+0.3535533905932737*nuVtSq[0]*F_0_xx[21]+0.3535533905932737*nuVtSq[6]*F_0_xx[20]+0.3535533905932737*nuVtSq[1]*F_0_xx[19]+0.3535533905932737*nuVtSq[7]*F_0_xx[18]+0.3535533905932737*nuVtSq[3]*F_0_xx[17]+0.3535533905932737*nuVtSq[5]*F_0_xx[16]; - incr_F_0[22] = 0.3535533905932737*nuVtSq[1]*F_0_xx[23]+0.3535533905932737*nuVtSq[0]*F_0_xx[22]+0.3535533905932737*nuVtSq[4]*F_0_xx[21]+0.3535533905932737*nuVtSq[5]*F_0_xx[20]+0.3535533905932737*nuVtSq[2]*F_0_xx[19]+0.3535533905932737*nuVtSq[3]*F_0_xx[18]+0.3535533905932737*nuVtSq[7]*F_0_xx[17]+0.3535533905932737*nuVtSq[6]*F_0_xx[16]; - incr_F_0[23] = 0.3535533905932737*nuVtSq[0]*F_0_xx[23]+0.3535533905932737*nuVtSq[1]*F_0_xx[22]+0.3535533905932737*nuVtSq[2]*F_0_xx[21]+0.3535533905932737*nuVtSq[3]*F_0_xx[20]+0.3535533905932737*nuVtSq[4]*F_0_xx[19]+0.3535533905932737*nuVtSq[5]*F_0_xx[18]+0.3535533905932737*nuVtSq[6]*F_0_xx[17]+0.3535533905932737*nuVtSq[7]*F_0_xx[16]; - incr_G_1[0] = 0.3535533905932737*nuVtSq[7]*G_1_xx[11]+0.3535533905932737*nuVtSq[6]*G_1_xx[7]+0.3535533905932737*nuVtSq[5]*G_1_xx[6]+0.3535533905932737*nuVtSq[4]*G_1_xx[5]+0.3535533905932737*G_1_xx[3]*nuVtSq[3]+0.3535533905932737*G_1_xx[2]*nuVtSq[2]+0.3535533905932737*G_1_xx[1]*nuVtSq[1]+0.3535533905932737*G_1_xx[0]*nuVtSq[0]; - incr_G_1[1] = 0.3535533905932737*nuVtSq[6]*G_1_xx[11]+0.3535533905932737*G_1_xx[7]*nuVtSq[7]+0.3535533905932737*nuVtSq[3]*G_1_xx[6]+0.3535533905932737*G_1_xx[3]*nuVtSq[5]+0.3535533905932737*nuVtSq[2]*G_1_xx[5]+0.3535533905932737*G_1_xx[2]*nuVtSq[4]+0.3535533905932737*G_1_xx[0]*nuVtSq[1]+0.3535533905932737*nuVtSq[0]*G_1_xx[1]; - incr_G_1[2] = 0.3535533905932737*nuVtSq[5]*G_1_xx[11]+0.3535533905932737*G_1_xx[6]*nuVtSq[7]+0.3535533905932737*nuVtSq[3]*G_1_xx[7]+0.3535533905932737*G_1_xx[3]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*G_1_xx[5]+0.3535533905932737*G_1_xx[1]*nuVtSq[4]+0.3535533905932737*G_1_xx[0]*nuVtSq[2]+0.3535533905932737*nuVtSq[0]*G_1_xx[2]; - incr_G_1[3] = 0.3535533905932737*nuVtSq[4]*G_1_xx[11]+0.3535533905932737*G_1_xx[5]*nuVtSq[7]+0.3535533905932737*nuVtSq[2]*G_1_xx[7]+0.3535533905932737*G_1_xx[2]*nuVtSq[6]+0.3535533905932737*nuVtSq[1]*G_1_xx[6]+0.3535533905932737*G_1_xx[1]*nuVtSq[5]+0.3535533905932737*G_1_xx[0]*nuVtSq[3]+0.3535533905932737*nuVtSq[0]*G_1_xx[3]; - incr_G_1[4] = 0.3535533905932737*nuVtSq[7]*G_1_xx[15]+0.3535533905932737*nuVtSq[6]*G_1_xx[14]+0.3535533905932737*nuVtSq[5]*G_1_xx[13]+0.3535533905932737*nuVtSq[4]*G_1_xx[12]+0.3535533905932737*nuVtSq[3]*G_1_xx[10]+0.3535533905932737*nuVtSq[2]*G_1_xx[9]+0.3535533905932737*nuVtSq[1]*G_1_xx[8]+0.3535533905932737*nuVtSq[0]*G_1_xx[4]; - incr_G_1[5] = 0.3535533905932737*nuVtSq[3]*G_1_xx[11]+0.3535533905932737*G_1_xx[3]*nuVtSq[7]+0.3535533905932737*nuVtSq[5]*G_1_xx[7]+0.3535533905932737*G_1_xx[6]*nuVtSq[6]+0.3535533905932737*nuVtSq[0]*G_1_xx[5]+0.3535533905932737*G_1_xx[0]*nuVtSq[4]+0.3535533905932737*G_1_xx[1]*nuVtSq[2]+0.3535533905932737*nuVtSq[1]*G_1_xx[2]; - incr_G_1[6] = 0.3535533905932737*nuVtSq[2]*G_1_xx[11]+0.3535533905932737*G_1_xx[2]*nuVtSq[7]+0.3535533905932737*nuVtSq[4]*G_1_xx[7]+0.3535533905932737*G_1_xx[5]*nuVtSq[6]+0.3535533905932737*nuVtSq[0]*G_1_xx[6]+0.3535533905932737*G_1_xx[0]*nuVtSq[5]+0.3535533905932737*G_1_xx[1]*nuVtSq[3]+0.3535533905932737*nuVtSq[1]*G_1_xx[3]; - incr_G_1[7] = 0.3535533905932737*nuVtSq[1]*G_1_xx[11]+0.3535533905932737*G_1_xx[1]*nuVtSq[7]+0.3535533905932737*nuVtSq[0]*G_1_xx[7]+0.3535533905932737*G_1_xx[0]*nuVtSq[6]+0.3535533905932737*nuVtSq[4]*G_1_xx[6]+0.3535533905932737*G_1_xx[5]*nuVtSq[5]+0.3535533905932737*G_1_xx[2]*nuVtSq[3]+0.3535533905932737*nuVtSq[2]*G_1_xx[3]; - incr_G_1[8] = 0.3535533905932737*nuVtSq[6]*G_1_xx[15]+0.3535533905932737*nuVtSq[7]*G_1_xx[14]+0.3535533905932737*nuVtSq[3]*G_1_xx[13]+0.3535533905932737*nuVtSq[2]*G_1_xx[12]+0.3535533905932737*nuVtSq[5]*G_1_xx[10]+0.3535533905932737*nuVtSq[4]*G_1_xx[9]+0.3535533905932737*nuVtSq[0]*G_1_xx[8]+0.3535533905932737*nuVtSq[1]*G_1_xx[4]; - incr_G_1[9] = 0.3535533905932737*nuVtSq[5]*G_1_xx[15]+0.3535533905932737*nuVtSq[3]*G_1_xx[14]+0.3535533905932737*nuVtSq[7]*G_1_xx[13]+0.3535533905932737*nuVtSq[1]*G_1_xx[12]+0.3535533905932737*nuVtSq[6]*G_1_xx[10]+0.3535533905932737*nuVtSq[0]*G_1_xx[9]+0.3535533905932737*nuVtSq[4]*G_1_xx[8]+0.3535533905932737*nuVtSq[2]*G_1_xx[4]; - incr_G_1[10] = 0.3535533905932737*nuVtSq[4]*G_1_xx[15]+0.3535533905932737*nuVtSq[2]*G_1_xx[14]+0.3535533905932737*nuVtSq[1]*G_1_xx[13]+0.3535533905932737*nuVtSq[7]*G_1_xx[12]+0.3535533905932737*nuVtSq[0]*G_1_xx[10]+0.3535533905932737*nuVtSq[6]*G_1_xx[9]+0.3535533905932737*nuVtSq[5]*G_1_xx[8]+0.3535533905932737*nuVtSq[3]*G_1_xx[4]; - incr_G_1[11] = 0.3535533905932737*nuVtSq[0]*G_1_xx[11]+0.3535533905932737*G_1_xx[0]*nuVtSq[7]+0.3535533905932737*nuVtSq[1]*G_1_xx[7]+0.3535533905932737*G_1_xx[1]*nuVtSq[6]+0.3535533905932737*nuVtSq[2]*G_1_xx[6]+0.3535533905932737*G_1_xx[2]*nuVtSq[5]+0.3535533905932737*nuVtSq[3]*G_1_xx[5]+0.3535533905932737*G_1_xx[3]*nuVtSq[4]; - incr_G_1[12] = 0.3535533905932737*nuVtSq[3]*G_1_xx[15]+0.3535533905932737*nuVtSq[5]*G_1_xx[14]+0.3535533905932737*nuVtSq[6]*G_1_xx[13]+0.3535533905932737*nuVtSq[0]*G_1_xx[12]+0.3535533905932737*nuVtSq[7]*G_1_xx[10]+0.3535533905932737*nuVtSq[1]*G_1_xx[9]+0.3535533905932737*nuVtSq[2]*G_1_xx[8]+0.3535533905932737*G_1_xx[4]*nuVtSq[4]; - incr_G_1[13] = 0.3535533905932737*nuVtSq[2]*G_1_xx[15]+0.3535533905932737*nuVtSq[4]*G_1_xx[14]+0.3535533905932737*nuVtSq[0]*G_1_xx[13]+0.3535533905932737*nuVtSq[6]*G_1_xx[12]+0.3535533905932737*nuVtSq[1]*G_1_xx[10]+0.3535533905932737*nuVtSq[7]*G_1_xx[9]+0.3535533905932737*nuVtSq[3]*G_1_xx[8]+0.3535533905932737*G_1_xx[4]*nuVtSq[5]; - incr_G_1[14] = 0.3535533905932737*nuVtSq[1]*G_1_xx[15]+0.3535533905932737*nuVtSq[0]*G_1_xx[14]+0.3535533905932737*nuVtSq[4]*G_1_xx[13]+0.3535533905932737*nuVtSq[5]*G_1_xx[12]+0.3535533905932737*nuVtSq[2]*G_1_xx[10]+0.3535533905932737*nuVtSq[3]*G_1_xx[9]+0.3535533905932737*nuVtSq[7]*G_1_xx[8]+0.3535533905932737*G_1_xx[4]*nuVtSq[6]; - incr_G_1[15] = 0.3535533905932737*nuVtSq[0]*G_1_xx[15]+0.3535533905932737*nuVtSq[1]*G_1_xx[14]+0.3535533905932737*nuVtSq[2]*G_1_xx[13]+0.3535533905932737*nuVtSq[3]*G_1_xx[12]+0.3535533905932737*nuVtSq[4]*G_1_xx[10]+0.3535533905932737*nuVtSq[5]*G_1_xx[9]+0.3535533905932737*nuVtSq[6]*G_1_xx[8]+0.3535533905932737*G_1_xx[4]*nuVtSq[7]; - incr_G_1[16] = 0.3535533905932737*nuVtSq[7]*G_1_xx[23]+0.3535533905932737*nuVtSq[6]*G_1_xx[22]+0.3535533905932737*nuVtSq[5]*G_1_xx[21]+0.3535533905932737*nuVtSq[4]*G_1_xx[20]+0.3535533905932737*nuVtSq[3]*G_1_xx[19]+0.3535533905932737*nuVtSq[2]*G_1_xx[18]+0.3535533905932737*nuVtSq[1]*G_1_xx[17]+0.3535533905932737*nuVtSq[0]*G_1_xx[16]; - incr_G_1[17] = 0.3535533905932737*nuVtSq[6]*G_1_xx[23]+0.3535533905932737*nuVtSq[7]*G_1_xx[22]+0.3535533905932737*nuVtSq[3]*G_1_xx[21]+0.3535533905932737*nuVtSq[2]*G_1_xx[20]+0.3535533905932737*nuVtSq[5]*G_1_xx[19]+0.3535533905932737*nuVtSq[4]*G_1_xx[18]+0.3535533905932737*nuVtSq[0]*G_1_xx[17]+0.3535533905932737*nuVtSq[1]*G_1_xx[16]; - incr_G_1[18] = 0.3535533905932737*nuVtSq[5]*G_1_xx[23]+0.3535533905932737*nuVtSq[3]*G_1_xx[22]+0.3535533905932737*nuVtSq[7]*G_1_xx[21]+0.3535533905932737*nuVtSq[1]*G_1_xx[20]+0.3535533905932737*nuVtSq[6]*G_1_xx[19]+0.3535533905932737*nuVtSq[0]*G_1_xx[18]+0.3535533905932737*nuVtSq[4]*G_1_xx[17]+0.3535533905932737*nuVtSq[2]*G_1_xx[16]; - incr_G_1[19] = 0.3535533905932737*nuVtSq[4]*G_1_xx[23]+0.3535533905932737*nuVtSq[2]*G_1_xx[22]+0.3535533905932737*nuVtSq[1]*G_1_xx[21]+0.3535533905932737*nuVtSq[7]*G_1_xx[20]+0.3535533905932737*nuVtSq[0]*G_1_xx[19]+0.3535533905932737*nuVtSq[6]*G_1_xx[18]+0.3535533905932737*nuVtSq[5]*G_1_xx[17]+0.3535533905932737*nuVtSq[3]*G_1_xx[16]; - incr_G_1[20] = 0.3535533905932737*nuVtSq[3]*G_1_xx[23]+0.3535533905932737*nuVtSq[5]*G_1_xx[22]+0.3535533905932737*nuVtSq[6]*G_1_xx[21]+0.3535533905932737*nuVtSq[0]*G_1_xx[20]+0.3535533905932737*nuVtSq[7]*G_1_xx[19]+0.3535533905932737*nuVtSq[1]*G_1_xx[18]+0.3535533905932737*nuVtSq[2]*G_1_xx[17]+0.3535533905932737*nuVtSq[4]*G_1_xx[16]; - incr_G_1[21] = 0.3535533905932737*nuVtSq[2]*G_1_xx[23]+0.3535533905932737*nuVtSq[4]*G_1_xx[22]+0.3535533905932737*nuVtSq[0]*G_1_xx[21]+0.3535533905932737*nuVtSq[6]*G_1_xx[20]+0.3535533905932737*nuVtSq[1]*G_1_xx[19]+0.3535533905932737*nuVtSq[7]*G_1_xx[18]+0.3535533905932737*nuVtSq[3]*G_1_xx[17]+0.3535533905932737*nuVtSq[5]*G_1_xx[16]; - incr_G_1[22] = 0.3535533905932737*nuVtSq[1]*G_1_xx[23]+0.3535533905932737*nuVtSq[0]*G_1_xx[22]+0.3535533905932737*nuVtSq[4]*G_1_xx[21]+0.3535533905932737*nuVtSq[5]*G_1_xx[20]+0.3535533905932737*nuVtSq[2]*G_1_xx[19]+0.3535533905932737*nuVtSq[3]*G_1_xx[18]+0.3535533905932737*nuVtSq[7]*G_1_xx[17]+0.3535533905932737*nuVtSq[6]*G_1_xx[16]; - incr_G_1[23] = 0.3535533905932737*nuVtSq[0]*G_1_xx[23]+0.3535533905932737*nuVtSq[1]*G_1_xx[22]+0.3535533905932737*nuVtSq[2]*G_1_xx[21]+0.3535533905932737*nuVtSq[3]*G_1_xx[20]+0.3535533905932737*nuVtSq[4]*G_1_xx[19]+0.3535533905932737*nuVtSq[5]*G_1_xx[18]+0.3535533905932737*nuVtSq[6]*G_1_xx[17]+0.3535533905932737*nuVtSq[7]*G_1_xx[16]; + incr_F_0[0] = 0.3535533905932737*nuVtSqSum[7]*F_0_xx[11]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[7]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[6]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[5]+0.3535533905932737*F_0_xx[3]*nuVtSqSum[3]+0.3535533905932737*F_0_xx[2]*nuVtSqSum[2]+0.3535533905932737*F_0_xx[1]*nuVtSqSum[1]+0.3535533905932737*F_0_xx[0]*nuVtSqSum[0]; + incr_F_0[1] = 0.3535533905932737*nuVtSqSum[6]*F_0_xx[11]+0.3535533905932737*F_0_xx[7]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[6]+0.3535533905932737*F_0_xx[3]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[5]+0.3535533905932737*F_0_xx[2]*nuVtSqSum[4]+0.3535533905932737*F_0_xx[0]*nuVtSqSum[1]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[1]; + incr_F_0[2] = 0.3535533905932737*nuVtSqSum[5]*F_0_xx[11]+0.3535533905932737*F_0_xx[6]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[7]+0.3535533905932737*F_0_xx[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[5]+0.3535533905932737*F_0_xx[1]*nuVtSqSum[4]+0.3535533905932737*F_0_xx[0]*nuVtSqSum[2]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[2]; + incr_F_0[3] = 0.3535533905932737*nuVtSqSum[4]*F_0_xx[11]+0.3535533905932737*F_0_xx[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[7]+0.3535533905932737*F_0_xx[2]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[6]+0.3535533905932737*F_0_xx[1]*nuVtSqSum[5]+0.3535533905932737*F_0_xx[0]*nuVtSqSum[3]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[3]; + incr_F_0[4] = 0.3535533905932737*nuVtSqSum[7]*F_0_xx[15]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[14]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[13]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[12]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[10]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[9]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[8]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[4]; + incr_F_0[5] = 0.3535533905932737*nuVtSqSum[3]*F_0_xx[11]+0.3535533905932737*F_0_xx[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[7]+0.3535533905932737*F_0_xx[6]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[5]+0.3535533905932737*F_0_xx[0]*nuVtSqSum[4]+0.3535533905932737*F_0_xx[1]*nuVtSqSum[2]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[2]; + incr_F_0[6] = 0.3535533905932737*nuVtSqSum[2]*F_0_xx[11]+0.3535533905932737*F_0_xx[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[7]+0.3535533905932737*F_0_xx[5]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[6]+0.3535533905932737*F_0_xx[0]*nuVtSqSum[5]+0.3535533905932737*F_0_xx[1]*nuVtSqSum[3]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[3]; + incr_F_0[7] = 0.3535533905932737*nuVtSqSum[1]*F_0_xx[11]+0.3535533905932737*F_0_xx[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[7]+0.3535533905932737*F_0_xx[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[6]+0.3535533905932737*F_0_xx[5]*nuVtSqSum[5]+0.3535533905932737*F_0_xx[2]*nuVtSqSum[3]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[3]; + incr_F_0[8] = 0.3535533905932737*nuVtSqSum[6]*F_0_xx[15]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[14]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[13]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[12]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[10]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[9]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[8]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[4]; + incr_F_0[9] = 0.3535533905932737*nuVtSqSum[5]*F_0_xx[15]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[14]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[13]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[12]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[10]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[9]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[8]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[4]; + incr_F_0[10] = 0.3535533905932737*nuVtSqSum[4]*F_0_xx[15]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[14]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[13]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[12]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[10]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[9]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[8]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[4]; + incr_F_0[11] = 0.3535533905932737*nuVtSqSum[0]*F_0_xx[11]+0.3535533905932737*F_0_xx[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[7]+0.3535533905932737*F_0_xx[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[6]+0.3535533905932737*F_0_xx[2]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[5]+0.3535533905932737*F_0_xx[3]*nuVtSqSum[4]; + incr_F_0[12] = 0.3535533905932737*nuVtSqSum[3]*F_0_xx[15]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[14]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[13]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[12]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[10]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[9]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[8]+0.3535533905932737*F_0_xx[4]*nuVtSqSum[4]; + incr_F_0[13] = 0.3535533905932737*nuVtSqSum[2]*F_0_xx[15]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[14]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[13]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[12]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[10]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[9]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[8]+0.3535533905932737*F_0_xx[4]*nuVtSqSum[5]; + incr_F_0[14] = 0.3535533905932737*nuVtSqSum[1]*F_0_xx[15]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[14]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[13]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[12]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[10]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[9]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[8]+0.3535533905932737*F_0_xx[4]*nuVtSqSum[6]; + incr_F_0[15] = 0.3535533905932737*nuVtSqSum[0]*F_0_xx[15]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[14]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[13]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[12]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[10]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[9]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[8]+0.3535533905932737*F_0_xx[4]*nuVtSqSum[7]; + incr_F_0[16] = 0.3535533905932737*nuVtSqSum[7]*F_0_xx[23]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[22]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[21]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[20]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[19]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[18]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[17]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[16]; + incr_F_0[17] = 0.3535533905932737*nuVtSqSum[6]*F_0_xx[23]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[22]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[21]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[20]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[19]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[18]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[17]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[16]; + incr_F_0[18] = 0.3535533905932737*nuVtSqSum[5]*F_0_xx[23]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[22]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[21]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[20]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[19]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[18]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[17]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[16]; + incr_F_0[19] = 0.3535533905932737*nuVtSqSum[4]*F_0_xx[23]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[22]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[21]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[20]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[19]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[18]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[17]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[16]; + incr_F_0[20] = 0.3535533905932737*nuVtSqSum[3]*F_0_xx[23]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[22]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[21]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[20]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[19]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[18]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[17]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[16]; + incr_F_0[21] = 0.3535533905932737*nuVtSqSum[2]*F_0_xx[23]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[22]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[21]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[20]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[19]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[18]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[17]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[16]; + incr_F_0[22] = 0.3535533905932737*nuVtSqSum[1]*F_0_xx[23]+0.3535533905932737*nuVtSqSum[0]*F_0_xx[22]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[21]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[20]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[19]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[18]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[17]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[16]; + incr_F_0[23] = 0.3535533905932737*nuVtSqSum[0]*F_0_xx[23]+0.3535533905932737*nuVtSqSum[1]*F_0_xx[22]+0.3535533905932737*nuVtSqSum[2]*F_0_xx[21]+0.3535533905932737*nuVtSqSum[3]*F_0_xx[20]+0.3535533905932737*nuVtSqSum[4]*F_0_xx[19]+0.3535533905932737*nuVtSqSum[5]*F_0_xx[18]+0.3535533905932737*nuVtSqSum[6]*F_0_xx[17]+0.3535533905932737*nuVtSqSum[7]*F_0_xx[16]; + incr_G_1[0] = 0.3535533905932737*nuVtSqSum[7]*G_1_xx[11]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[7]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[6]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[5]+0.3535533905932737*G_1_xx[3]*nuVtSqSum[3]+0.3535533905932737*G_1_xx[2]*nuVtSqSum[2]+0.3535533905932737*G_1_xx[1]*nuVtSqSum[1]+0.3535533905932737*G_1_xx[0]*nuVtSqSum[0]; + incr_G_1[1] = 0.3535533905932737*nuVtSqSum[6]*G_1_xx[11]+0.3535533905932737*G_1_xx[7]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[6]+0.3535533905932737*G_1_xx[3]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[5]+0.3535533905932737*G_1_xx[2]*nuVtSqSum[4]+0.3535533905932737*G_1_xx[0]*nuVtSqSum[1]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[1]; + incr_G_1[2] = 0.3535533905932737*nuVtSqSum[5]*G_1_xx[11]+0.3535533905932737*G_1_xx[6]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[7]+0.3535533905932737*G_1_xx[3]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[5]+0.3535533905932737*G_1_xx[1]*nuVtSqSum[4]+0.3535533905932737*G_1_xx[0]*nuVtSqSum[2]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[2]; + incr_G_1[3] = 0.3535533905932737*nuVtSqSum[4]*G_1_xx[11]+0.3535533905932737*G_1_xx[5]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[7]+0.3535533905932737*G_1_xx[2]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[6]+0.3535533905932737*G_1_xx[1]*nuVtSqSum[5]+0.3535533905932737*G_1_xx[0]*nuVtSqSum[3]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[3]; + incr_G_1[4] = 0.3535533905932737*nuVtSqSum[7]*G_1_xx[15]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[14]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[13]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[12]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[10]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[9]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[8]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[4]; + incr_G_1[5] = 0.3535533905932737*nuVtSqSum[3]*G_1_xx[11]+0.3535533905932737*G_1_xx[3]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[7]+0.3535533905932737*G_1_xx[6]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[5]+0.3535533905932737*G_1_xx[0]*nuVtSqSum[4]+0.3535533905932737*G_1_xx[1]*nuVtSqSum[2]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[2]; + incr_G_1[6] = 0.3535533905932737*nuVtSqSum[2]*G_1_xx[11]+0.3535533905932737*G_1_xx[2]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[7]+0.3535533905932737*G_1_xx[5]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[6]+0.3535533905932737*G_1_xx[0]*nuVtSqSum[5]+0.3535533905932737*G_1_xx[1]*nuVtSqSum[3]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[3]; + incr_G_1[7] = 0.3535533905932737*nuVtSqSum[1]*G_1_xx[11]+0.3535533905932737*G_1_xx[1]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[7]+0.3535533905932737*G_1_xx[0]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[6]+0.3535533905932737*G_1_xx[5]*nuVtSqSum[5]+0.3535533905932737*G_1_xx[2]*nuVtSqSum[3]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[3]; + incr_G_1[8] = 0.3535533905932737*nuVtSqSum[6]*G_1_xx[15]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[14]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[13]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[12]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[10]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[9]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[8]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[4]; + incr_G_1[9] = 0.3535533905932737*nuVtSqSum[5]*G_1_xx[15]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[14]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[13]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[12]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[10]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[9]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[8]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[4]; + incr_G_1[10] = 0.3535533905932737*nuVtSqSum[4]*G_1_xx[15]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[14]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[13]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[12]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[10]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[9]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[8]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[4]; + incr_G_1[11] = 0.3535533905932737*nuVtSqSum[0]*G_1_xx[11]+0.3535533905932737*G_1_xx[0]*nuVtSqSum[7]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[7]+0.3535533905932737*G_1_xx[1]*nuVtSqSum[6]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[6]+0.3535533905932737*G_1_xx[2]*nuVtSqSum[5]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[5]+0.3535533905932737*G_1_xx[3]*nuVtSqSum[4]; + incr_G_1[12] = 0.3535533905932737*nuVtSqSum[3]*G_1_xx[15]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[14]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[13]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[12]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[10]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[9]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[8]+0.3535533905932737*G_1_xx[4]*nuVtSqSum[4]; + incr_G_1[13] = 0.3535533905932737*nuVtSqSum[2]*G_1_xx[15]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[14]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[13]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[12]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[10]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[9]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[8]+0.3535533905932737*G_1_xx[4]*nuVtSqSum[5]; + incr_G_1[14] = 0.3535533905932737*nuVtSqSum[1]*G_1_xx[15]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[14]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[13]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[12]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[10]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[9]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[8]+0.3535533905932737*G_1_xx[4]*nuVtSqSum[6]; + incr_G_1[15] = 0.3535533905932737*nuVtSqSum[0]*G_1_xx[15]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[14]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[13]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[12]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[10]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[9]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[8]+0.3535533905932737*G_1_xx[4]*nuVtSqSum[7]; + incr_G_1[16] = 0.3535533905932737*nuVtSqSum[7]*G_1_xx[23]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[22]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[21]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[20]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[19]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[18]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[17]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[16]; + incr_G_1[17] = 0.3535533905932737*nuVtSqSum[6]*G_1_xx[23]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[22]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[21]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[20]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[19]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[18]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[17]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[16]; + incr_G_1[18] = 0.3535533905932737*nuVtSqSum[5]*G_1_xx[23]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[22]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[21]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[20]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[19]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[18]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[17]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[16]; + incr_G_1[19] = 0.3535533905932737*nuVtSqSum[4]*G_1_xx[23]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[22]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[21]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[20]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[19]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[18]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[17]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[16]; + incr_G_1[20] = 0.3535533905932737*nuVtSqSum[3]*G_1_xx[23]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[22]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[21]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[20]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[19]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[18]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[17]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[16]; + incr_G_1[21] = 0.3535533905932737*nuVtSqSum[2]*G_1_xx[23]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[22]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[21]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[20]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[19]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[18]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[17]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[16]; + incr_G_1[22] = 0.3535533905932737*nuVtSqSum[1]*G_1_xx[23]+0.3535533905932737*nuVtSqSum[0]*G_1_xx[22]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[21]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[20]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[19]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[18]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[17]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[16]; + incr_G_1[23] = 0.3535533905932737*nuVtSqSum[0]*G_1_xx[23]+0.3535533905932737*nuVtSqSum[1]*G_1_xx[22]+0.3535533905932737*nuVtSqSum[2]*G_1_xx[21]+0.3535533905932737*nuVtSqSum[3]*G_1_xx[20]+0.3535533905932737*nuVtSqSum[4]*G_1_xx[19]+0.3535533905932737*nuVtSqSum[5]*G_1_xx[18]+0.3535533905932737*nuVtSqSum[6]*G_1_xx[17]+0.3535533905932737*nuVtSqSum[7]*G_1_xx[16]; out_F_0[0] += incr_F_0[0]*rdvSq4; out_F_0[1] += incr_F_0[1]*rdvSq4; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1.c index 459664fbb..695607abc 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1.c @@ -1,14 +1,16 @@ -#include #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nuVtSq: Thermal speed squared times collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvparSq4 = 4.0/(dxv[1]*dxv[1]); - return fabs(6.363961030678928*nuVtSq[0]*rdvparSq4); + const double *nuVtSqSum = &nuPrimMomsSum[2]; + + return fabs(6.363961030678928*nuVtSqSum[0]*rdvparSq4); } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2.c index 4a92c37c6..6eb51435a 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2.c @@ -1,14 +1,16 @@ -#include #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nuVtSq: Thermal speed squared times collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvparSq4 = 4.0/(dxv[1]*dxv[1]); - return fabs((6.363961030678928*nuVtSq[0]-7.115124735378852*nuVtSq[2])*rdvparSq4); + const double *nuVtSqSum = &nuPrimMomsSum[3]; + + return fabs((6.363961030678928*nuVtSqSum[0]-7.115124735378852*nuVtSqSum[2])*rdvparSq4); } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2.c index 32e0ba18d..0a8a7a8ed 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2.c @@ -1,14 +1,16 @@ -#include #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nuVtSq: Thermal speed squared times collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvparSq4 = 4.0/(dxv[1]*dxv[1]); - return fabs((6.363961030678928*nuVtSq[0]-7.115124735378852*nuVtSq[2])*rdvparSq4); + const double *nuVtSqSum = &nuPrimMomsSum[3]; + + return fabs((6.363961030678928*nuVtSqSum[0]-7.115124735378852*nuVtSqSum[2])*rdvparSq4); } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1.c index e15c1de7b..68e4d8ddf 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1.c @@ -1,14 +1,16 @@ -#include #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[3]: Cell-center coordinates. - // dxv[3]: Cell spacing. - // nuVtSq: Thermal speed squared times collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvparSq4 = 4.0/(dxv[2]*dxv[2]); - return fabs(4.5*nuVtSq[0]*rdvparSq4); + const double *nuVtSqSum = &nuPrimMomsSum[4]; + + return fabs(4.5*nuVtSqSum[0]*rdvparSq4); } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2.c index cf2a25290..47f0bbb73 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2.c @@ -1,14 +1,16 @@ -#include #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[3]: Cell-center coordinates. - // dxv[3]: Cell spacing. - // nuVtSq: Thermal speed squared times collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvparSq4 = 4.0/(dxv[2]*dxv[2]); - return fabs((5.625*nuVtSq[8]-5.031152949374527*(nuVtSq[5]+nuVtSq[4])+4.5*nuVtSq[0])*rdvparSq4); + const double *nuVtSqSum = &nuPrimMomsSum[9]; + + return fabs((5.625*nuVtSqSum[8]-5.031152949374527*(nuVtSqSum[5]+nuVtSqSum[4])+4.5*nuVtSqSum[0])*rdvparSq4); } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1.c index e6efce474..671d7ed02 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1.c @@ -1,14 +1,16 @@ -#include #include -GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1(const double *w, const double *dxv, const double *nuVtSq, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[4]: Cell-center coordinates. - // dxv[4]: Cell spacing. - // nuVtSq: Thermal speed squared times collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvparSq4 = 4.0/(dxv[3]*dxv[3]); - return fabs(3.181980515339463*nuVtSq[0]*rdvparSq4); + const double *nuVtSqSum = &nuPrimMomsSum[8]; + + return fabs(3.181980515339463*nuVtSqSum[0]*rdvparSq4); } diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1.c index 99d6424cb..3cd6ba8a7 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nu, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nu: Collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell + // out: Incremented distribution function in cell const double dv1par = 2.0/dxv[1]; const double dvpar = dxv[1], wvpar = w[1]; const double *F_0Skin = &fSkin[0]; @@ -14,20 +17,44 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1(const doubl const double *G_1Edge = &fEdge[6]; double *out_F_0 = &out[0]; double *out_G_1 = &out[6]; + const double *sumNuUPar = &nuPrimMomsSum[0]; double alphaDrSurf[2] = {0.0}; + double F_0_UpwindQuad[2] = {0.0}; + double F_0_Upwind[2] = {0.0};; double Ghat_F_0[2] = {0.0}; + double G_1_UpwindQuad[2] = {0.0}; + double G_1_Upwind[2] = {0.0};; double Ghat_G_1[2] = {0.0}; if (edge == -1) { - alphaDrSurf[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; + alphaDrSurf[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; - Ghat_F_0[0] = 1.118033988749895*alphaDrSurf[1]*F_0Skin[5]+1.118033988749895*alphaDrSurf[0]*F_0Skin[4]+0.8660254037844386*alphaDrSurf[1]*F_0Skin[3]+0.8660254037844386*alphaDrSurf[0]*F_0Skin[2]+0.5*F_0Skin[1]*alphaDrSurf[1]+0.5*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 1.118033988749895*alphaDrSurf[0]*F_0Skin[5]+1.118033988749895*alphaDrSurf[1]*F_0Skin[4]+0.8660254037844386*alphaDrSurf[0]*F_0Skin[3]+0.8660254037844386*alphaDrSurf[1]*F_0Skin[2]+0.5*F_0Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0Skin[1]; - Ghat_G_1[0] = 1.118033988749895*alphaDrSurf[1]*G_1Skin[5]+1.118033988749895*alphaDrSurf[0]*G_1Skin[4]+0.8660254037844386*alphaDrSurf[1]*G_1Skin[3]+0.8660254037844386*alphaDrSurf[0]*G_1Skin[2]+0.5*G_1Skin[1]*alphaDrSurf[1]+0.5*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 1.118033988749895*alphaDrSurf[0]*G_1Skin[5]+1.118033988749895*alphaDrSurf[1]*G_1Skin[4]+0.8660254037844386*alphaDrSurf[0]*G_1Skin[3]+0.8660254037844386*alphaDrSurf[1]*G_1Skin[2]+0.5*G_1Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1Skin[1]; + if (0.7071067811865475*alphaDrSurf[0]-0.7071067811865475*alphaDrSurf[1] < 0) { + F_0_UpwindQuad[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_r(F_0Skin); + G_1_UpwindQuad[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_r(G_1Skin); + } else { + F_0_UpwindQuad[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_l(F_0Edge); + G_1_UpwindQuad[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_l(G_1Edge); + } + if (0.7071067811865475*(alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_r(F_0Skin); + G_1_UpwindQuad[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_r(G_1Skin); + } else { + F_0_UpwindQuad[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_l(F_0Edge); + G_1_UpwindQuad[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_l(G_1Edge); + } + + // Project tensor nodal quadrature basis back onto modal basis. + hyb_1x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + hyb_1x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); + + Ghat_F_0[0] = 0.7071067811865475*F_0_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_G_1[0] = 0.7071067811865475*G_1_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[1]; out_F_0[0] += 0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += 0.7071067811865475*Ghat_F_0[1]*dv1par; @@ -44,13 +71,32 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p1(const doubl } else { - alphaDrSurf[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; + alphaDrSurf[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + + if (0.7071067811865475*alphaDrSurf[0]-0.7071067811865475*alphaDrSurf[1] < 0) { + F_0_UpwindQuad[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_r(F_0Edge); + G_1_UpwindQuad[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_r(G_1Edge); + } else { + F_0_UpwindQuad[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_l(F_0Skin); + G_1_UpwindQuad[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_l(G_1Skin); + } + if (0.7071067811865475*(alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_r(F_0Edge); + G_1_UpwindQuad[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_r(G_1Edge); + } else { + F_0_UpwindQuad[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_l(F_0Skin); + G_1_UpwindQuad[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_l(G_1Skin); + } + + // Project tensor nodal quadrature basis back onto modal basis. + hyb_1x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + hyb_1x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); - Ghat_F_0[0] = 1.118033988749895*alphaDrSurf[1]*F_0Skin[5]+1.118033988749895*alphaDrSurf[0]*F_0Skin[4]-0.8660254037844386*alphaDrSurf[1]*F_0Skin[3]-0.8660254037844386*alphaDrSurf[0]*F_0Skin[2]+0.5*F_0Skin[1]*alphaDrSurf[1]+0.5*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 1.118033988749895*alphaDrSurf[0]*F_0Skin[5]+1.118033988749895*alphaDrSurf[1]*F_0Skin[4]-0.8660254037844386*alphaDrSurf[0]*F_0Skin[3]-0.8660254037844386*alphaDrSurf[1]*F_0Skin[2]+0.5*F_0Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0Skin[1]; - Ghat_G_1[0] = 1.118033988749895*alphaDrSurf[1]*G_1Skin[5]+1.118033988749895*alphaDrSurf[0]*G_1Skin[4]-0.8660254037844386*alphaDrSurf[1]*G_1Skin[3]-0.8660254037844386*alphaDrSurf[0]*G_1Skin[2]+0.5*G_1Skin[1]*alphaDrSurf[1]+0.5*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 1.118033988749895*alphaDrSurf[0]*G_1Skin[5]+1.118033988749895*alphaDrSurf[1]*G_1Skin[4]-0.8660254037844386*alphaDrSurf[0]*G_1Skin[3]-0.8660254037844386*alphaDrSurf[1]*G_1Skin[2]+0.5*G_1Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1Skin[1]; + Ghat_F_0[0] = 0.7071067811865475*F_0_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_G_1[0] = 0.7071067811865475*G_1_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[1]; out_F_0[0] += -0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += -0.7071067811865475*Ghat_F_0[1]*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2.c index 26a019bea..48c48b449 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nu, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nu: Collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell + // out: Incremented distribution function in cell const double dv1par = 2.0/dxv[1]; const double dvpar = dxv[1], wvpar = w[1]; const double *F_0Skin = &fSkin[0]; @@ -14,23 +17,54 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2(const doubl const double *G_1Edge = &fEdge[8]; double *out_F_0 = &out[0]; double *out_G_1 = &out[8]; + const double *sumNuUPar = &nuPrimMomsSum[0]; double alphaDrSurf[3] = {0.0}; + double F_0_UpwindQuad[3] = {0.0}; + double F_0_Upwind[3] = {0.0};; double Ghat_F_0[3] = {0.0}; + double G_1_UpwindQuad[3] = {0.0}; + double G_1_Upwind[3] = {0.0};; double Ghat_G_1[3] = {0.0}; if (edge == -1) { - alphaDrSurf[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; + alphaDrSurf[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; - Ghat_F_0[0] = 1.118033988749895*alphaDrSurf[1]*F_0Skin[7]+0.8660254037844387*alphaDrSurf[2]*F_0Skin[6]+1.118033988749895*alphaDrSurf[0]*F_0Skin[5]+0.5*alphaDrSurf[2]*F_0Skin[4]+0.8660254037844386*alphaDrSurf[1]*F_0Skin[3]+0.8660254037844386*alphaDrSurf[0]*F_0Skin[2]+0.5*F_0Skin[1]*alphaDrSurf[1]+0.5*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 1.0*alphaDrSurf[2]*F_0Skin[7]+1.118033988749895*alphaDrSurf[0]*F_0Skin[7]+0.7745966692414834*alphaDrSurf[1]*F_0Skin[6]+1.118033988749895*alphaDrSurf[1]*F_0Skin[5]+0.4472135954999579*alphaDrSurf[1]*F_0Skin[4]+0.7745966692414833*alphaDrSurf[2]*F_0Skin[3]+0.8660254037844386*alphaDrSurf[0]*F_0Skin[3]+0.4472135954999579*F_0Skin[1]*alphaDrSurf[2]+0.8660254037844386*alphaDrSurf[1]*F_0Skin[2]+0.5*F_0Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 1.0*alphaDrSurf[1]*F_0Skin[7]+0.5532833351724881*alphaDrSurf[2]*F_0Skin[6]+0.8660254037844387*alphaDrSurf[0]*F_0Skin[6]+1.118033988749895*alphaDrSurf[2]*F_0Skin[5]+0.31943828249997*alphaDrSurf[2]*F_0Skin[4]+0.5*alphaDrSurf[0]*F_0Skin[4]+0.7745966692414833*alphaDrSurf[1]*F_0Skin[3]+0.8660254037844386*F_0Skin[2]*alphaDrSurf[2]+0.5*F_0Skin[0]*alphaDrSurf[2]+0.4472135954999579*F_0Skin[1]*alphaDrSurf[1]; - Ghat_G_1[0] = 1.118033988749895*alphaDrSurf[1]*G_1Skin[7]+0.8660254037844387*alphaDrSurf[2]*G_1Skin[6]+1.118033988749895*alphaDrSurf[0]*G_1Skin[5]+0.5*alphaDrSurf[2]*G_1Skin[4]+0.8660254037844386*alphaDrSurf[1]*G_1Skin[3]+0.8660254037844386*alphaDrSurf[0]*G_1Skin[2]+0.5*G_1Skin[1]*alphaDrSurf[1]+0.5*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 1.0*alphaDrSurf[2]*G_1Skin[7]+1.118033988749895*alphaDrSurf[0]*G_1Skin[7]+0.7745966692414834*alphaDrSurf[1]*G_1Skin[6]+1.118033988749895*alphaDrSurf[1]*G_1Skin[5]+0.4472135954999579*alphaDrSurf[1]*G_1Skin[4]+0.7745966692414833*alphaDrSurf[2]*G_1Skin[3]+0.8660254037844386*alphaDrSurf[0]*G_1Skin[3]+0.4472135954999579*G_1Skin[1]*alphaDrSurf[2]+0.8660254037844386*alphaDrSurf[1]*G_1Skin[2]+0.5*G_1Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 1.0*alphaDrSurf[1]*G_1Skin[7]+0.5532833351724881*alphaDrSurf[2]*G_1Skin[6]+0.8660254037844387*alphaDrSurf[0]*G_1Skin[6]+1.118033988749895*alphaDrSurf[2]*G_1Skin[5]+0.31943828249997*alphaDrSurf[2]*G_1Skin[4]+0.5*alphaDrSurf[0]*G_1Skin[4]+0.7745966692414833*alphaDrSurf[1]*G_1Skin[3]+0.8660254037844386*G_1Skin[2]*alphaDrSurf[2]+0.5*G_1Skin[0]*alphaDrSurf[2]+0.4472135954999579*G_1Skin[1]*alphaDrSurf[1]; + if (0.6324555320336759*alphaDrSurf[2]-0.9486832980505137*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = ser_2x_p2_surfx2_eval_quad_node_0_r(F_0Skin); + G_1_UpwindQuad[0] = ser_2x_p2_surfx2_eval_quad_node_0_r(G_1Skin); + } else { + F_0_UpwindQuad[0] = ser_2x_p2_surfx2_eval_quad_node_0_l(F_0Edge); + G_1_UpwindQuad[0] = ser_2x_p2_surfx2_eval_quad_node_0_l(G_1Edge); + } + if (0.7071067811865475*alphaDrSurf[0]-0.7905694150420947*alphaDrSurf[2] < 0) { + F_0_UpwindQuad[1] = ser_2x_p2_surfx2_eval_quad_node_1_r(F_0Skin); + G_1_UpwindQuad[1] = ser_2x_p2_surfx2_eval_quad_node_1_r(G_1Skin); + } else { + F_0_UpwindQuad[1] = ser_2x_p2_surfx2_eval_quad_node_1_l(F_0Edge); + G_1_UpwindQuad[1] = ser_2x_p2_surfx2_eval_quad_node_1_l(G_1Edge); + } + if (0.6324555320336759*alphaDrSurf[2]+0.9486832980505137*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[2] = ser_2x_p2_surfx2_eval_quad_node_2_r(F_0Skin); + G_1_UpwindQuad[2] = ser_2x_p2_surfx2_eval_quad_node_2_r(G_1Skin); + } else { + F_0_UpwindQuad[2] = ser_2x_p2_surfx2_eval_quad_node_2_l(F_0Edge); + G_1_UpwindQuad[2] = ser_2x_p2_surfx2_eval_quad_node_2_l(G_1Edge); + } + + // Project tensor nodal quadrature basis back onto modal basis. + ser_2x_p2_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + ser_2x_p2_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); + + Ghat_F_0[0] = 0.7071067811865475*F_0_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*F_0_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.6324555320336759*F_0_Upwind[1]*alphaDrSurf[2]+0.6324555320336759*alphaDrSurf[1]*F_0_Upwind[2]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.4517539514526256*F_0_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[2]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[2]+0.6324555320336759*F_0_Upwind[1]*alphaDrSurf[1]; + Ghat_G_1[0] = 0.7071067811865475*G_1_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*G_1_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.6324555320336759*G_1_Upwind[1]*alphaDrSurf[2]+0.6324555320336759*alphaDrSurf[1]*G_1_Upwind[2]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.4517539514526256*G_1_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[2]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[2]+0.6324555320336759*G_1_Upwind[1]*alphaDrSurf[1]; out_F_0[0] += 0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += 0.7071067811865475*Ghat_F_0[1]*dv1par; @@ -51,16 +85,42 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_ser_p2(const doubl } else { - alphaDrSurf[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; + alphaDrSurf[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + + if (0.6324555320336759*alphaDrSurf[2]-0.9486832980505137*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = ser_2x_p2_surfx2_eval_quad_node_0_r(F_0Edge); + G_1_UpwindQuad[0] = ser_2x_p2_surfx2_eval_quad_node_0_r(G_1Edge); + } else { + F_0_UpwindQuad[0] = ser_2x_p2_surfx2_eval_quad_node_0_l(F_0Skin); + G_1_UpwindQuad[0] = ser_2x_p2_surfx2_eval_quad_node_0_l(G_1Skin); + } + if (0.7071067811865475*alphaDrSurf[0]-0.7905694150420947*alphaDrSurf[2] < 0) { + F_0_UpwindQuad[1] = ser_2x_p2_surfx2_eval_quad_node_1_r(F_0Edge); + G_1_UpwindQuad[1] = ser_2x_p2_surfx2_eval_quad_node_1_r(G_1Edge); + } else { + F_0_UpwindQuad[1] = ser_2x_p2_surfx2_eval_quad_node_1_l(F_0Skin); + G_1_UpwindQuad[1] = ser_2x_p2_surfx2_eval_quad_node_1_l(G_1Skin); + } + if (0.6324555320336759*alphaDrSurf[2]+0.9486832980505137*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[2] = ser_2x_p2_surfx2_eval_quad_node_2_r(F_0Edge); + G_1_UpwindQuad[2] = ser_2x_p2_surfx2_eval_quad_node_2_r(G_1Edge); + } else { + F_0_UpwindQuad[2] = ser_2x_p2_surfx2_eval_quad_node_2_l(F_0Skin); + G_1_UpwindQuad[2] = ser_2x_p2_surfx2_eval_quad_node_2_l(G_1Skin); + } + + // Project tensor nodal quadrature basis back onto modal basis. + ser_2x_p2_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + ser_2x_p2_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); - Ghat_F_0[0] = 1.118033988749895*alphaDrSurf[1]*F_0Skin[7]-0.8660254037844387*alphaDrSurf[2]*F_0Skin[6]+1.118033988749895*alphaDrSurf[0]*F_0Skin[5]+0.5*alphaDrSurf[2]*F_0Skin[4]-0.8660254037844386*alphaDrSurf[1]*F_0Skin[3]-0.8660254037844386*alphaDrSurf[0]*F_0Skin[2]+0.5*F_0Skin[1]*alphaDrSurf[1]+0.5*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 1.0*alphaDrSurf[2]*F_0Skin[7]+1.118033988749895*alphaDrSurf[0]*F_0Skin[7]-0.7745966692414834*alphaDrSurf[1]*F_0Skin[6]+1.118033988749895*alphaDrSurf[1]*F_0Skin[5]+0.4472135954999579*alphaDrSurf[1]*F_0Skin[4]-0.7745966692414833*alphaDrSurf[2]*F_0Skin[3]-0.8660254037844386*alphaDrSurf[0]*F_0Skin[3]+0.4472135954999579*F_0Skin[1]*alphaDrSurf[2]-0.8660254037844386*alphaDrSurf[1]*F_0Skin[2]+0.5*F_0Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 1.0*alphaDrSurf[1]*F_0Skin[7]-0.5532833351724881*alphaDrSurf[2]*F_0Skin[6]-0.8660254037844387*alphaDrSurf[0]*F_0Skin[6]+1.118033988749895*alphaDrSurf[2]*F_0Skin[5]+0.31943828249997*alphaDrSurf[2]*F_0Skin[4]+0.5*alphaDrSurf[0]*F_0Skin[4]-0.7745966692414833*alphaDrSurf[1]*F_0Skin[3]-0.8660254037844386*F_0Skin[2]*alphaDrSurf[2]+0.5*F_0Skin[0]*alphaDrSurf[2]+0.4472135954999579*F_0Skin[1]*alphaDrSurf[1]; - Ghat_G_1[0] = 1.118033988749895*alphaDrSurf[1]*G_1Skin[7]-0.8660254037844387*alphaDrSurf[2]*G_1Skin[6]+1.118033988749895*alphaDrSurf[0]*G_1Skin[5]+0.5*alphaDrSurf[2]*G_1Skin[4]-0.8660254037844386*alphaDrSurf[1]*G_1Skin[3]-0.8660254037844386*alphaDrSurf[0]*G_1Skin[2]+0.5*G_1Skin[1]*alphaDrSurf[1]+0.5*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 1.0*alphaDrSurf[2]*G_1Skin[7]+1.118033988749895*alphaDrSurf[0]*G_1Skin[7]-0.7745966692414834*alphaDrSurf[1]*G_1Skin[6]+1.118033988749895*alphaDrSurf[1]*G_1Skin[5]+0.4472135954999579*alphaDrSurf[1]*G_1Skin[4]-0.7745966692414833*alphaDrSurf[2]*G_1Skin[3]-0.8660254037844386*alphaDrSurf[0]*G_1Skin[3]+0.4472135954999579*G_1Skin[1]*alphaDrSurf[2]-0.8660254037844386*alphaDrSurf[1]*G_1Skin[2]+0.5*G_1Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 1.0*alphaDrSurf[1]*G_1Skin[7]-0.5532833351724881*alphaDrSurf[2]*G_1Skin[6]-0.8660254037844387*alphaDrSurf[0]*G_1Skin[6]+1.118033988749895*alphaDrSurf[2]*G_1Skin[5]+0.31943828249997*alphaDrSurf[2]*G_1Skin[4]+0.5*alphaDrSurf[0]*G_1Skin[4]-0.7745966692414833*alphaDrSurf[1]*G_1Skin[3]-0.8660254037844386*G_1Skin[2]*alphaDrSurf[2]+0.5*G_1Skin[0]*alphaDrSurf[2]+0.4472135954999579*G_1Skin[1]*alphaDrSurf[1]; + Ghat_F_0[0] = 0.7071067811865475*F_0_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*F_0_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.6324555320336759*F_0_Upwind[1]*alphaDrSurf[2]+0.6324555320336759*alphaDrSurf[1]*F_0_Upwind[2]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.4517539514526256*F_0_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[2]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[2]+0.6324555320336759*F_0_Upwind[1]*alphaDrSurf[1]; + Ghat_G_1[0] = 0.7071067811865475*G_1_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*G_1_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.6324555320336759*G_1_Upwind[1]*alphaDrSurf[2]+0.6324555320336759*alphaDrSurf[1]*G_1_Upwind[2]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.4517539514526256*G_1_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[2]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[2]+0.6324555320336759*G_1_Upwind[1]*alphaDrSurf[1]; out_F_0[0] += -0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += -0.7071067811865475*Ghat_F_0[1]*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2.c index add059826..95eb2475d 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nu: Collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell + // out: Incremented distribution function in cell const double dv1par = 2.0/dxv[1]; const double dvpar = dxv[1], wvpar = w[1]; const double *F_0Skin = &fSkin[0]; @@ -14,23 +17,54 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2(const do const double *G_1Edge = &fEdge[9]; double *out_F_0 = &out[0]; double *out_G_1 = &out[9]; + const double *sumNuUPar = &nuPrimMomsSum[0]; double alphaDrSurf[3] = {0.0}; + double F_0_UpwindQuad[3] = {0.0}; + double F_0_Upwind[3] = {0.0};; double Ghat_F_0[3] = {0.0}; + double G_1_UpwindQuad[3] = {0.0}; + double G_1_Upwind[3] = {0.0};; double Ghat_G_1[3] = {0.0}; if (edge == -1) { - alphaDrSurf[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; + alphaDrSurf[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; - Ghat_F_0[0] = 1.118033988749895*alphaDrSurf[2]*F_0Skin[8]+1.118033988749895*alphaDrSurf[1]*F_0Skin[7]+0.8660254037844387*alphaDrSurf[2]*F_0Skin[6]+1.118033988749895*alphaDrSurf[0]*F_0Skin[5]+0.5*alphaDrSurf[2]*F_0Skin[4]+0.8660254037844386*alphaDrSurf[1]*F_0Skin[3]+0.8660254037844386*alphaDrSurf[0]*F_0Skin[2]+0.5*F_0Skin[1]*alphaDrSurf[1]+0.5*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = alphaDrSurf[1]*F_0Skin[8]+1.0*alphaDrSurf[2]*F_0Skin[7]+1.118033988749895*alphaDrSurf[0]*F_0Skin[7]+0.7745966692414834*alphaDrSurf[1]*F_0Skin[6]+1.118033988749895*alphaDrSurf[1]*F_0Skin[5]+0.4472135954999579*alphaDrSurf[1]*F_0Skin[4]+0.7745966692414833*alphaDrSurf[2]*F_0Skin[3]+0.8660254037844386*alphaDrSurf[0]*F_0Skin[3]+0.4472135954999579*F_0Skin[1]*alphaDrSurf[2]+0.8660254037844386*alphaDrSurf[1]*F_0Skin[2]+0.5*F_0Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 0.7142857142857143*alphaDrSurf[2]*F_0Skin[8]+1.118033988749895*alphaDrSurf[0]*F_0Skin[8]+1.0*alphaDrSurf[1]*F_0Skin[7]+0.5532833351724881*alphaDrSurf[2]*F_0Skin[6]+0.8660254037844387*alphaDrSurf[0]*F_0Skin[6]+1.118033988749895*alphaDrSurf[2]*F_0Skin[5]+0.31943828249997*alphaDrSurf[2]*F_0Skin[4]+0.5*alphaDrSurf[0]*F_0Skin[4]+0.7745966692414833*alphaDrSurf[1]*F_0Skin[3]+0.8660254037844386*F_0Skin[2]*alphaDrSurf[2]+0.5*F_0Skin[0]*alphaDrSurf[2]+0.4472135954999579*F_0Skin[1]*alphaDrSurf[1]; - Ghat_G_1[0] = 1.118033988749895*alphaDrSurf[2]*G_1Skin[8]+1.118033988749895*alphaDrSurf[1]*G_1Skin[7]+0.8660254037844387*alphaDrSurf[2]*G_1Skin[6]+1.118033988749895*alphaDrSurf[0]*G_1Skin[5]+0.5*alphaDrSurf[2]*G_1Skin[4]+0.8660254037844386*alphaDrSurf[1]*G_1Skin[3]+0.8660254037844386*alphaDrSurf[0]*G_1Skin[2]+0.5*G_1Skin[1]*alphaDrSurf[1]+0.5*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = alphaDrSurf[1]*G_1Skin[8]+1.0*alphaDrSurf[2]*G_1Skin[7]+1.118033988749895*alphaDrSurf[0]*G_1Skin[7]+0.7745966692414834*alphaDrSurf[1]*G_1Skin[6]+1.118033988749895*alphaDrSurf[1]*G_1Skin[5]+0.4472135954999579*alphaDrSurf[1]*G_1Skin[4]+0.7745966692414833*alphaDrSurf[2]*G_1Skin[3]+0.8660254037844386*alphaDrSurf[0]*G_1Skin[3]+0.4472135954999579*G_1Skin[1]*alphaDrSurf[2]+0.8660254037844386*alphaDrSurf[1]*G_1Skin[2]+0.5*G_1Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 0.7142857142857143*alphaDrSurf[2]*G_1Skin[8]+1.118033988749895*alphaDrSurf[0]*G_1Skin[8]+1.0*alphaDrSurf[1]*G_1Skin[7]+0.5532833351724881*alphaDrSurf[2]*G_1Skin[6]+0.8660254037844387*alphaDrSurf[0]*G_1Skin[6]+1.118033988749895*alphaDrSurf[2]*G_1Skin[5]+0.31943828249997*alphaDrSurf[2]*G_1Skin[4]+0.5*alphaDrSurf[0]*G_1Skin[4]+0.7745966692414833*alphaDrSurf[1]*G_1Skin[3]+0.8660254037844386*G_1Skin[2]*alphaDrSurf[2]+0.5*G_1Skin[0]*alphaDrSurf[2]+0.4472135954999579*G_1Skin[1]*alphaDrSurf[1]; + if (0.6324555320336759*alphaDrSurf[2]-0.9486832980505137*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = tensor_2x_p2_surfx2_eval_quad_node_0_r(F_0Skin); + G_1_UpwindQuad[0] = tensor_2x_p2_surfx2_eval_quad_node_0_r(G_1Skin); + } else { + F_0_UpwindQuad[0] = tensor_2x_p2_surfx2_eval_quad_node_0_l(F_0Edge); + G_1_UpwindQuad[0] = tensor_2x_p2_surfx2_eval_quad_node_0_l(G_1Edge); + } + if (0.7071067811865475*alphaDrSurf[0]-0.7905694150420947*alphaDrSurf[2] < 0) { + F_0_UpwindQuad[1] = tensor_2x_p2_surfx2_eval_quad_node_1_r(F_0Skin); + G_1_UpwindQuad[1] = tensor_2x_p2_surfx2_eval_quad_node_1_r(G_1Skin); + } else { + F_0_UpwindQuad[1] = tensor_2x_p2_surfx2_eval_quad_node_1_l(F_0Edge); + G_1_UpwindQuad[1] = tensor_2x_p2_surfx2_eval_quad_node_1_l(G_1Edge); + } + if (0.6324555320336759*alphaDrSurf[2]+0.9486832980505137*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[2] = tensor_2x_p2_surfx2_eval_quad_node_2_r(F_0Skin); + G_1_UpwindQuad[2] = tensor_2x_p2_surfx2_eval_quad_node_2_r(G_1Skin); + } else { + F_0_UpwindQuad[2] = tensor_2x_p2_surfx2_eval_quad_node_2_l(F_0Edge); + G_1_UpwindQuad[2] = tensor_2x_p2_surfx2_eval_quad_node_2_l(G_1Edge); + } + + // Project tensor nodal quadrature basis back onto modal basis. + tensor_2x_p2_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + tensor_2x_p2_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); + + Ghat_F_0[0] = 0.7071067811865475*F_0_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*F_0_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.6324555320336759*F_0_Upwind[1]*alphaDrSurf[2]+0.6324555320336759*alphaDrSurf[1]*F_0_Upwind[2]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.4517539514526256*F_0_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[2]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[2]+0.6324555320336759*F_0_Upwind[1]*alphaDrSurf[1]; + Ghat_G_1[0] = 0.7071067811865475*G_1_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*G_1_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.6324555320336759*G_1_Upwind[1]*alphaDrSurf[2]+0.6324555320336759*alphaDrSurf[1]*G_1_Upwind[2]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.4517539514526256*G_1_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[2]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[2]+0.6324555320336759*G_1_Upwind[1]*alphaDrSurf[1]; out_F_0[0] += 0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += 0.7071067811865475*Ghat_F_0[1]*dv1par; @@ -53,16 +87,42 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_1x1v_tensor_p2(const do } else { - alphaDrSurf[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; + alphaDrSurf[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + + if (0.6324555320336759*alphaDrSurf[2]-0.9486832980505137*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = tensor_2x_p2_surfx2_eval_quad_node_0_r(F_0Edge); + G_1_UpwindQuad[0] = tensor_2x_p2_surfx2_eval_quad_node_0_r(G_1Edge); + } else { + F_0_UpwindQuad[0] = tensor_2x_p2_surfx2_eval_quad_node_0_l(F_0Skin); + G_1_UpwindQuad[0] = tensor_2x_p2_surfx2_eval_quad_node_0_l(G_1Skin); + } + if (0.7071067811865475*alphaDrSurf[0]-0.7905694150420947*alphaDrSurf[2] < 0) { + F_0_UpwindQuad[1] = tensor_2x_p2_surfx2_eval_quad_node_1_r(F_0Edge); + G_1_UpwindQuad[1] = tensor_2x_p2_surfx2_eval_quad_node_1_r(G_1Edge); + } else { + F_0_UpwindQuad[1] = tensor_2x_p2_surfx2_eval_quad_node_1_l(F_0Skin); + G_1_UpwindQuad[1] = tensor_2x_p2_surfx2_eval_quad_node_1_l(G_1Skin); + } + if (0.6324555320336759*alphaDrSurf[2]+0.9486832980505137*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[2] = tensor_2x_p2_surfx2_eval_quad_node_2_r(F_0Edge); + G_1_UpwindQuad[2] = tensor_2x_p2_surfx2_eval_quad_node_2_r(G_1Edge); + } else { + F_0_UpwindQuad[2] = tensor_2x_p2_surfx2_eval_quad_node_2_l(F_0Skin); + G_1_UpwindQuad[2] = tensor_2x_p2_surfx2_eval_quad_node_2_l(G_1Skin); + } + + // Project tensor nodal quadrature basis back onto modal basis. + tensor_2x_p2_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + tensor_2x_p2_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); - Ghat_F_0[0] = 1.118033988749895*alphaDrSurf[2]*F_0Skin[8]+1.118033988749895*alphaDrSurf[1]*F_0Skin[7]-0.8660254037844387*alphaDrSurf[2]*F_0Skin[6]+1.118033988749895*alphaDrSurf[0]*F_0Skin[5]+0.5*alphaDrSurf[2]*F_0Skin[4]-0.8660254037844386*alphaDrSurf[1]*F_0Skin[3]-0.8660254037844386*alphaDrSurf[0]*F_0Skin[2]+0.5*F_0Skin[1]*alphaDrSurf[1]+0.5*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = alphaDrSurf[1]*F_0Skin[8]+1.0*alphaDrSurf[2]*F_0Skin[7]+1.118033988749895*alphaDrSurf[0]*F_0Skin[7]-0.7745966692414834*alphaDrSurf[1]*F_0Skin[6]+1.118033988749895*alphaDrSurf[1]*F_0Skin[5]+0.4472135954999579*alphaDrSurf[1]*F_0Skin[4]-0.7745966692414833*alphaDrSurf[2]*F_0Skin[3]-0.8660254037844386*alphaDrSurf[0]*F_0Skin[3]+0.4472135954999579*F_0Skin[1]*alphaDrSurf[2]-0.8660254037844386*alphaDrSurf[1]*F_0Skin[2]+0.5*F_0Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 0.7142857142857143*alphaDrSurf[2]*F_0Skin[8]+1.118033988749895*alphaDrSurf[0]*F_0Skin[8]+1.0*alphaDrSurf[1]*F_0Skin[7]-0.5532833351724881*alphaDrSurf[2]*F_0Skin[6]-0.8660254037844387*alphaDrSurf[0]*F_0Skin[6]+1.118033988749895*alphaDrSurf[2]*F_0Skin[5]+0.31943828249997*alphaDrSurf[2]*F_0Skin[4]+0.5*alphaDrSurf[0]*F_0Skin[4]-0.7745966692414833*alphaDrSurf[1]*F_0Skin[3]-0.8660254037844386*F_0Skin[2]*alphaDrSurf[2]+0.5*F_0Skin[0]*alphaDrSurf[2]+0.4472135954999579*F_0Skin[1]*alphaDrSurf[1]; - Ghat_G_1[0] = 1.118033988749895*alphaDrSurf[2]*G_1Skin[8]+1.118033988749895*alphaDrSurf[1]*G_1Skin[7]-0.8660254037844387*alphaDrSurf[2]*G_1Skin[6]+1.118033988749895*alphaDrSurf[0]*G_1Skin[5]+0.5*alphaDrSurf[2]*G_1Skin[4]-0.8660254037844386*alphaDrSurf[1]*G_1Skin[3]-0.8660254037844386*alphaDrSurf[0]*G_1Skin[2]+0.5*G_1Skin[1]*alphaDrSurf[1]+0.5*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = alphaDrSurf[1]*G_1Skin[8]+1.0*alphaDrSurf[2]*G_1Skin[7]+1.118033988749895*alphaDrSurf[0]*G_1Skin[7]-0.7745966692414834*alphaDrSurf[1]*G_1Skin[6]+1.118033988749895*alphaDrSurf[1]*G_1Skin[5]+0.4472135954999579*alphaDrSurf[1]*G_1Skin[4]-0.7745966692414833*alphaDrSurf[2]*G_1Skin[3]-0.8660254037844386*alphaDrSurf[0]*G_1Skin[3]+0.4472135954999579*G_1Skin[1]*alphaDrSurf[2]-0.8660254037844386*alphaDrSurf[1]*G_1Skin[2]+0.5*G_1Skin[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 0.7142857142857143*alphaDrSurf[2]*G_1Skin[8]+1.118033988749895*alphaDrSurf[0]*G_1Skin[8]+1.0*alphaDrSurf[1]*G_1Skin[7]-0.5532833351724881*alphaDrSurf[2]*G_1Skin[6]-0.8660254037844387*alphaDrSurf[0]*G_1Skin[6]+1.118033988749895*alphaDrSurf[2]*G_1Skin[5]+0.31943828249997*alphaDrSurf[2]*G_1Skin[4]+0.5*alphaDrSurf[0]*G_1Skin[4]-0.7745966692414833*alphaDrSurf[1]*G_1Skin[3]-0.8660254037844386*G_1Skin[2]*alphaDrSurf[2]+0.5*G_1Skin[0]*alphaDrSurf[2]+0.4472135954999579*G_1Skin[1]*alphaDrSurf[1]; + Ghat_F_0[0] = 0.7071067811865475*F_0_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*F_0_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.6324555320336759*F_0_Upwind[1]*alphaDrSurf[2]+0.6324555320336759*alphaDrSurf[1]*F_0_Upwind[2]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.4517539514526256*F_0_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*F_0_Upwind[0]*alphaDrSurf[2]+0.7071067811865475*alphaDrSurf[0]*F_0_Upwind[2]+0.6324555320336759*F_0_Upwind[1]*alphaDrSurf[1]; + Ghat_G_1[0] = 0.7071067811865475*G_1_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*G_1_Upwind[1]*alphaDrSurf[1]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.6324555320336759*G_1_Upwind[1]*alphaDrSurf[2]+0.6324555320336759*alphaDrSurf[1]*G_1_Upwind[2]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[1]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.4517539514526256*G_1_Upwind[2]*alphaDrSurf[2]+0.7071067811865475*G_1_Upwind[0]*alphaDrSurf[2]+0.7071067811865475*alphaDrSurf[0]*G_1_Upwind[2]+0.6324555320336759*G_1_Upwind[1]*alphaDrSurf[1]; out_F_0[0] += -0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += -0.7071067811865475*Ghat_F_0[1]*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1.c index edc671b31..d6ce9cf69 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nu, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[3]: Cell-center coordinates. - // dxv[3]: Cell spacing. - // nu: Collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell + // out: Incremented distribution function in cell const double dv1par = 2.0/dxv[2]; const double dvpar = dxv[2], wvpar = w[2]; const double *F_0Skin = &fSkin[0]; @@ -14,26 +17,64 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1(const doubl const double *G_1Edge = &fEdge[12]; double *out_F_0 = &out[0]; double *out_G_1 = &out[12]; + const double *sumNuUPar = &nuPrimMomsSum[0]; double alphaDrSurf[4] = {0.0}; + double F_0_UpwindQuad[4] = {0.0}; + double F_0_Upwind[4] = {0.0};; double Ghat_F_0[4] = {0.0}; + double G_1_UpwindQuad[4] = {0.0}; + double G_1_Upwind[4] = {0.0};; double Ghat_G_1[4] = {0.0}; if (edge == -1) { - alphaDrSurf[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; - alphaDrSurf[3] = nu[3]*wvpar+0.5*nu[3]*dvpar; + alphaDrSurf[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf[3] = nuSum[3]*wvpar+0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; - Ghat_F_0[0] = 0.7905694150420947*alphaDrSurf[3]*F_0Skin[11]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[10]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[9]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[8]+0.6123724356957944*alphaDrSurf[3]*F_0Skin[7]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[6]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[3]*F_0Skin[4]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[3]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[2]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[1]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 0.7905694150420947*alphaDrSurf[2]*F_0Skin[11]+0.7905694150420948*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[9]+0.7905694150420947*alphaDrSurf[1]*F_0Skin[8]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[7]+0.6123724356957944*alphaDrSurf[3]*F_0Skin[6]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[2]*F_0Skin[4]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[3]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 0.7905694150420947*alphaDrSurf[1]*F_0Skin[11]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[10]+0.7905694150420948*alphaDrSurf[3]*F_0Skin[9]+0.7905694150420947*alphaDrSurf[2]*F_0Skin[8]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[7]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[6]+0.6123724356957944*alphaDrSurf[3]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[4]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[3]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[2]; - Ghat_F_0[3] = 0.7905694150420947*alphaDrSurf[0]*F_0Skin[11]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[10]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[9]+0.7905694150420947*alphaDrSurf[3]*F_0Skin[8]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[7]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[6]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[4]+0.6123724356957944*F_0Skin[3]*alphaDrSurf[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[3]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[2]; - Ghat_G_1[0] = 0.7905694150420947*alphaDrSurf[3]*G_1Skin[11]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[10]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[9]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[8]+0.6123724356957944*alphaDrSurf[3]*G_1Skin[7]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[6]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[3]*G_1Skin[4]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[3]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[2]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[1]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 0.7905694150420947*alphaDrSurf[2]*G_1Skin[11]+0.7905694150420948*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[9]+0.7905694150420947*alphaDrSurf[1]*G_1Skin[8]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[7]+0.6123724356957944*alphaDrSurf[3]*G_1Skin[6]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[2]*G_1Skin[4]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[3]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 0.7905694150420947*alphaDrSurf[1]*G_1Skin[11]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[10]+0.7905694150420948*alphaDrSurf[3]*G_1Skin[9]+0.7905694150420947*alphaDrSurf[2]*G_1Skin[8]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[7]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[6]+0.6123724356957944*alphaDrSurf[3]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[4]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[3]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[2]; - Ghat_G_1[3] = 0.7905694150420947*alphaDrSurf[0]*G_1Skin[11]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[10]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[9]+0.7905694150420947*alphaDrSurf[3]*G_1Skin[8]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[7]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[6]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[4]+0.6123724356957944*G_1Skin[3]*alphaDrSurf[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[3]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[2]; + if (0.5*alphaDrSurf[3]-0.5*(alphaDrSurf[2]+alphaDrSurf[1])+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_r(F_0Skin); + G_1_UpwindQuad[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_r(G_1Skin); + } else { + F_0_UpwindQuad[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_l(F_0Edge); + G_1_UpwindQuad[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_l(G_1Edge); + } + if ((-0.5*alphaDrSurf[3])+0.5*alphaDrSurf[2]-0.5*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_r(F_0Skin); + G_1_UpwindQuad[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_r(G_1Skin); + } else { + F_0_UpwindQuad[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_l(F_0Edge); + G_1_UpwindQuad[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_l(G_1Edge); + } + if (0.5*(alphaDrSurf[1]+alphaDrSurf[0])-0.5*(alphaDrSurf[3]+alphaDrSurf[2]) < 0) { + F_0_UpwindQuad[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_r(F_0Skin); + G_1_UpwindQuad[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_r(G_1Skin); + } else { + F_0_UpwindQuad[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_l(F_0Edge); + G_1_UpwindQuad[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_l(G_1Edge); + } + if (0.5*(alphaDrSurf[3]+alphaDrSurf[2]+alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_r(F_0Skin); + G_1_UpwindQuad[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_r(G_1Skin); + } else { + F_0_UpwindQuad[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_l(F_0Edge); + G_1_UpwindQuad[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_l(G_1Edge); + } + + // Project tensor nodal quadrature basis back onto modal basis. + hyb_2x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + hyb_2x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); + + Ghat_F_0[0] = 0.5*F_0_Upwind[3]*alphaDrSurf[3]+0.5*F_0_Upwind[2]*alphaDrSurf[2]+0.5*F_0_Upwind[1]*alphaDrSurf[1]+0.5*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.5*F_0_Upwind[2]*alphaDrSurf[3]+0.5*alphaDrSurf[2]*F_0_Upwind[3]+0.5*F_0_Upwind[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.5*F_0_Upwind[1]*alphaDrSurf[3]+0.5*alphaDrSurf[1]*F_0_Upwind[3]+0.5*F_0_Upwind[0]*alphaDrSurf[2]+0.5*alphaDrSurf[0]*F_0_Upwind[2]; + Ghat_F_0[3] = 0.5*F_0_Upwind[0]*alphaDrSurf[3]+0.5*alphaDrSurf[0]*F_0_Upwind[3]+0.5*F_0_Upwind[1]*alphaDrSurf[2]+0.5*alphaDrSurf[1]*F_0_Upwind[2]; + Ghat_G_1[0] = 0.5*G_1_Upwind[3]*alphaDrSurf[3]+0.5*G_1_Upwind[2]*alphaDrSurf[2]+0.5*G_1_Upwind[1]*alphaDrSurf[1]+0.5*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.5*G_1_Upwind[2]*alphaDrSurf[3]+0.5*alphaDrSurf[2]*G_1_Upwind[3]+0.5*G_1_Upwind[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.5*G_1_Upwind[1]*alphaDrSurf[3]+0.5*alphaDrSurf[1]*G_1_Upwind[3]+0.5*G_1_Upwind[0]*alphaDrSurf[2]+0.5*alphaDrSurf[0]*G_1_Upwind[2]; + Ghat_G_1[3] = 0.5*G_1_Upwind[0]*alphaDrSurf[3]+0.5*alphaDrSurf[0]*G_1_Upwind[3]+0.5*G_1_Upwind[1]*alphaDrSurf[2]+0.5*alphaDrSurf[1]*G_1_Upwind[2]; out_F_0[0] += 0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += 0.7071067811865475*Ghat_F_0[1]*dv1par; @@ -62,19 +103,52 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_ser_p1(const doubl } else { - alphaDrSurf[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; - alphaDrSurf[3] = nu[3]*wvpar-0.5*nu[3]*dvpar; - - Ghat_F_0[0] = 0.7905694150420947*alphaDrSurf[3]*F_0Skin[11]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[10]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[9]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[8]-0.6123724356957944*alphaDrSurf[3]*F_0Skin[7]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[6]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[3]*F_0Skin[4]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[3]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[2]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[1]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 0.7905694150420947*alphaDrSurf[2]*F_0Skin[11]+0.7905694150420948*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[9]+0.7905694150420947*alphaDrSurf[1]*F_0Skin[8]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[7]-0.6123724356957944*alphaDrSurf[3]*F_0Skin[6]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[2]*F_0Skin[4]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[3]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 0.7905694150420947*alphaDrSurf[1]*F_0Skin[11]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[10]+0.7905694150420948*alphaDrSurf[3]*F_0Skin[9]+0.7905694150420947*alphaDrSurf[2]*F_0Skin[8]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[7]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[6]-0.6123724356957944*alphaDrSurf[3]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[4]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[3]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[2]; - Ghat_F_0[3] = 0.7905694150420947*alphaDrSurf[0]*F_0Skin[11]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[10]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[9]+0.7905694150420947*alphaDrSurf[3]*F_0Skin[8]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[7]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[6]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[4]-0.6123724356957944*F_0Skin[3]*alphaDrSurf[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[3]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[2]; - Ghat_G_1[0] = 0.7905694150420947*alphaDrSurf[3]*G_1Skin[11]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[10]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[9]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[8]-0.6123724356957944*alphaDrSurf[3]*G_1Skin[7]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[6]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[3]*G_1Skin[4]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[3]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[2]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[1]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 0.7905694150420947*alphaDrSurf[2]*G_1Skin[11]+0.7905694150420948*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[9]+0.7905694150420947*alphaDrSurf[1]*G_1Skin[8]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[7]-0.6123724356957944*alphaDrSurf[3]*G_1Skin[6]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[2]*G_1Skin[4]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[3]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 0.7905694150420947*alphaDrSurf[1]*G_1Skin[11]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[10]+0.7905694150420948*alphaDrSurf[3]*G_1Skin[9]+0.7905694150420947*alphaDrSurf[2]*G_1Skin[8]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[7]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[6]-0.6123724356957944*alphaDrSurf[3]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[4]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[3]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[2]; - Ghat_G_1[3] = 0.7905694150420947*alphaDrSurf[0]*G_1Skin[11]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[10]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[9]+0.7905694150420947*alphaDrSurf[3]*G_1Skin[8]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[7]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[6]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[4]-0.6123724356957944*G_1Skin[3]*alphaDrSurf[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[3]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[2]; + alphaDrSurf[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf[3] = nuSum[3]*wvpar-0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; + + if (0.5*alphaDrSurf[3]-0.5*(alphaDrSurf[2]+alphaDrSurf[1])+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_r(F_0Edge); + G_1_UpwindQuad[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_r(G_1Edge); + } else { + F_0_UpwindQuad[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_l(F_0Skin); + G_1_UpwindQuad[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_l(G_1Skin); + } + if ((-0.5*alphaDrSurf[3])+0.5*alphaDrSurf[2]-0.5*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_r(F_0Edge); + G_1_UpwindQuad[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_r(G_1Edge); + } else { + F_0_UpwindQuad[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_l(F_0Skin); + G_1_UpwindQuad[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_l(G_1Skin); + } + if (0.5*(alphaDrSurf[1]+alphaDrSurf[0])-0.5*(alphaDrSurf[3]+alphaDrSurf[2]) < 0) { + F_0_UpwindQuad[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_r(F_0Edge); + G_1_UpwindQuad[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_r(G_1Edge); + } else { + F_0_UpwindQuad[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_l(F_0Skin); + G_1_UpwindQuad[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_l(G_1Skin); + } + if (0.5*(alphaDrSurf[3]+alphaDrSurf[2]+alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_r(F_0Edge); + G_1_UpwindQuad[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_r(G_1Edge); + } else { + F_0_UpwindQuad[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_l(F_0Skin); + G_1_UpwindQuad[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_l(G_1Skin); + } + + // Project tensor nodal quadrature basis back onto modal basis. + hyb_2x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + hyb_2x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); + + Ghat_F_0[0] = 0.5*F_0_Upwind[3]*alphaDrSurf[3]+0.5*F_0_Upwind[2]*alphaDrSurf[2]+0.5*F_0_Upwind[1]*alphaDrSurf[1]+0.5*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.5*F_0_Upwind[2]*alphaDrSurf[3]+0.5*alphaDrSurf[2]*F_0_Upwind[3]+0.5*F_0_Upwind[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.5*F_0_Upwind[1]*alphaDrSurf[3]+0.5*alphaDrSurf[1]*F_0_Upwind[3]+0.5*F_0_Upwind[0]*alphaDrSurf[2]+0.5*alphaDrSurf[0]*F_0_Upwind[2]; + Ghat_F_0[3] = 0.5*F_0_Upwind[0]*alphaDrSurf[3]+0.5*alphaDrSurf[0]*F_0_Upwind[3]+0.5*F_0_Upwind[1]*alphaDrSurf[2]+0.5*alphaDrSurf[1]*F_0_Upwind[2]; + Ghat_G_1[0] = 0.5*G_1_Upwind[3]*alphaDrSurf[3]+0.5*G_1_Upwind[2]*alphaDrSurf[2]+0.5*G_1_Upwind[1]*alphaDrSurf[1]+0.5*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.5*G_1_Upwind[2]*alphaDrSurf[3]+0.5*alphaDrSurf[2]*G_1_Upwind[3]+0.5*G_1_Upwind[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.5*G_1_Upwind[1]*alphaDrSurf[3]+0.5*alphaDrSurf[1]*G_1_Upwind[3]+0.5*G_1_Upwind[0]*alphaDrSurf[2]+0.5*alphaDrSurf[0]*G_1_Upwind[2]; + Ghat_G_1[3] = 0.5*G_1_Upwind[0]*alphaDrSurf[3]+0.5*alphaDrSurf[0]*G_1_Upwind[3]+0.5*G_1_Upwind[1]*alphaDrSurf[2]+0.5*alphaDrSurf[1]*G_1_Upwind[2]; out_F_0[0] += -0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += -0.7071067811865475*Ghat_F_0[1]*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2.c index 54241b779..295291949 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[3]: Cell-center coordinates. - // dxv[3]: Cell spacing. - // nu: Collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell + // out: Incremented distribution function in cell const double dv1par = 2.0/dxv[2]; const double dvpar = dxv[2], wvpar = w[2]; const double *F_0Skin = &fSkin[0]; @@ -14,41 +17,114 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2(const do const double *G_1Edge = &fEdge[27]; double *out_F_0 = &out[0]; double *out_G_1 = &out[27]; + const double *sumNuUPar = &nuPrimMomsSum[0]; double alphaDrSurf[9] = {0.0}; + double F_0_UpwindQuad[9] = {0.0}; + double F_0_Upwind[9] = {0.0};; double Ghat_F_0[9] = {0.0}; + double G_1_UpwindQuad[9] = {0.0}; + double G_1_Upwind[9] = {0.0};; double Ghat_G_1[9] = {0.0}; if (edge == -1) { - alphaDrSurf[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; - alphaDrSurf[3] = nu[3]*wvpar+0.5*nu[3]*dvpar; - alphaDrSurf[4] = nu[4]*wvpar+0.5*nu[4]*dvpar; - alphaDrSurf[5] = nu[5]*wvpar+0.5*nu[5]*dvpar; - alphaDrSurf[6] = nu[6]*wvpar+0.5*nu[6]*dvpar; - alphaDrSurf[7] = nu[7]*wvpar+0.5*nu[7]*dvpar; - alphaDrSurf[8] = nu[8]*wvpar+0.5*nu[8]*dvpar; - - Ghat_F_0[0] = 0.7905694150420947*alphaDrSurf[8]*F_0Skin[26]+0.7905694150420948*alphaDrSurf[7]*F_0Skin[25]+0.7905694150420948*alphaDrSurf[6]*F_0Skin[24]+0.6123724356957944*alphaDrSurf[8]*F_0Skin[23]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[22]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[21]+0.3535533905932737*alphaDrSurf[8]*F_0Skin[20]+0.7905694150420947*alphaDrSurf[3]*F_0Skin[19]+0.6123724356957944*alphaDrSurf[7]*F_0Skin[18]+0.6123724356957944*alphaDrSurf[6]*F_0Skin[17]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[16]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[15]+0.6123724356957944*alphaDrSurf[5]*F_0Skin[14]+0.6123724356957944*alphaDrSurf[4]*F_0Skin[13]+0.3535533905932737*alphaDrSurf[7]*F_0Skin[12]+0.3535533905932737*alphaDrSurf[6]*F_0Skin[11]+0.6123724356957944*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[9]+0.3535533905932737*alphaDrSurf[5]*F_0Skin[8]+0.3535533905932737*alphaDrSurf[4]*F_0Skin[7]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[6]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[3]*F_0Skin[4]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[3]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[2]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[1]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 0.7071067811865475*alphaDrSurf[7]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[8]*F_0Skin[25]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[24]+0.5477225575051661*alphaDrSurf[7]*F_0Skin[23]+0.7905694150420948*alphaDrSurf[7]*F_0Skin[22]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[21]+0.3162277660168379*alphaDrSurf[7]*F_0Skin[20]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[19]+0.7905694150420947*alphaDrSurf[2]*F_0Skin[19]+0.5477225575051661*alphaDrSurf[8]*F_0Skin[18]+0.6123724356957944*alphaDrSurf[5]*F_0Skin[18]+0.5477225575051661*alphaDrSurf[3]*F_0Skin[17]+0.7905694150420948*alphaDrSurf[3]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[4]*F_0Skin[15]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[15]+0.6123724356957944*alphaDrSurf[7]*F_0Skin[14]+0.5477225575051661*alphaDrSurf[1]*F_0Skin[13]+0.3162277660168379*alphaDrSurf[8]*F_0Skin[12]+0.3535533905932737*alphaDrSurf[5]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[11]+0.5477225575051661*alphaDrSurf[6]*F_0Skin[10]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[1]*F_0Skin[9]+0.3535533905932737*alphaDrSurf[7]*F_0Skin[8]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[7]+0.3162277660168379*F_0Skin[4]*alphaDrSurf[6]+0.6123724356957944*alphaDrSurf[3]*F_0Skin[6]+0.5477225575051661*alphaDrSurf[4]*F_0Skin[5]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[5]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[2]*F_0Skin[4]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[3]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 0.7071067811865475*alphaDrSurf[6]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[8]*F_0Skin[24]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[24]+0.5477225575051661*alphaDrSurf[6]*F_0Skin[23]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[22]+0.7905694150420948*alphaDrSurf[6]*F_0Skin[21]+0.3162277660168379*alphaDrSurf[6]*F_0Skin[20]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[19]+0.7905694150420947*alphaDrSurf[1]*F_0Skin[19]+0.5477225575051661*alphaDrSurf[3]*F_0Skin[18]+0.5477225575051661*alphaDrSurf[8]*F_0Skin[17]+0.6123724356957944*alphaDrSurf[4]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[5]*F_0Skin[16]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[16]+0.7905694150420948*alphaDrSurf[3]*F_0Skin[15]+0.5477225575051661*alphaDrSurf[2]*F_0Skin[14]+0.6123724356957944*alphaDrSurf[6]*F_0Skin[13]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[8]*F_0Skin[11]+0.3535533905932737*alphaDrSurf[4]*F_0Skin[11]+0.5477225575051661*alphaDrSurf[7]*F_0Skin[10]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[2]*F_0Skin[9]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[8]+0.3162277660168379*F_0Skin[4]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[6]*F_0Skin[7]+0.5477225575051661*alphaDrSurf[5]*F_0Skin[6]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[6]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[5]+0.6123724356957944*alphaDrSurf[3]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[4]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[3]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[2]; - Ghat_F_0[3] = 0.6324555320336759*alphaDrSurf[3]*F_0Skin[26]+0.632455532033676*alphaDrSurf[6]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[25]+0.632455532033676*alphaDrSurf[7]*F_0Skin[24]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[24]+0.4898979485566357*alphaDrSurf[3]*F_0Skin[23]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[22]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[21]+0.2828427124746191*alphaDrSurf[3]*F_0Skin[20]+0.6324555320336759*alphaDrSurf[8]*F_0Skin[19]+0.7071067811865475*alphaDrSurf[5]*F_0Skin[19]+0.7071067811865475*alphaDrSurf[4]*F_0Skin[19]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[19]+0.4898979485566356*alphaDrSurf[6]*F_0Skin[18]+0.5477225575051661*alphaDrSurf[2]*F_0Skin[18]+0.4898979485566356*alphaDrSurf[7]*F_0Skin[17]+0.5477225575051661*alphaDrSurf[1]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[16]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[15]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[15]+0.5477225575051661*alphaDrSurf[3]*F_0Skin[14]+0.5477225575051661*alphaDrSurf[3]*F_0Skin[13]+0.2828427124746191*alphaDrSurf[6]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[12]+0.2828427124746191*alphaDrSurf[7]*F_0Skin[11]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[11]+0.4898979485566357*alphaDrSurf[8]*F_0Skin[10]+0.5477225575051661*alphaDrSurf[5]*F_0Skin[10]+0.5477225575051661*alphaDrSurf[4]*F_0Skin[10]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[3]*F_0Skin[9]+0.2828427124746191*F_0Skin[4]*alphaDrSurf[8]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[8]+0.5477225575051661*F_0Skin[6]*alphaDrSurf[7]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[7]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[7]+0.5477225575051661*F_0Skin[5]*alphaDrSurf[6]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[6]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[6]+0.3162277660168379*F_0Skin[4]*alphaDrSurf[5]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[5]+0.3162277660168379*F_0Skin[4]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[4]+0.6123724356957944*F_0Skin[3]*alphaDrSurf[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[3]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[2]; - Ghat_F_0[4] = 0.5050762722761053*alphaDrSurf[8]*F_0Skin[26]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[25]+0.5050762722761054*alphaDrSurf[6]*F_0Skin[24]+0.7905694150420947*alphaDrSurf[2]*F_0Skin[24]+0.3912303982179757*alphaDrSurf[8]*F_0Skin[23]+0.6123724356957944*alphaDrSurf[5]*F_0Skin[23]+0.7905694150420947*alphaDrSurf[8]*F_0Skin[22]+0.5050762722761053*alphaDrSurf[4]*F_0Skin[21]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[21]+0.2258769757263128*alphaDrSurf[8]*F_0Skin[20]+0.3535533905932737*alphaDrSurf[5]*F_0Skin[20]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[19]+0.5477225575051661*alphaDrSurf[7]*F_0Skin[18]+0.3912303982179757*alphaDrSurf[6]*F_0Skin[17]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[17]+0.7905694150420947*alphaDrSurf[6]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[15]+0.6123724356957944*alphaDrSurf[8]*F_0Skin[14]+0.3912303982179757*alphaDrSurf[4]*F_0Skin[13]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[13]+0.3162277660168379*alphaDrSurf[7]*F_0Skin[12]+0.2258769757263128*alphaDrSurf[6]*F_0Skin[11]+0.3535533905932737*alphaDrSurf[2]*F_0Skin[11]+0.5477225575051661*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[9]+0.3535533905932737*F_0Skin[8]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[4]*F_0Skin[7]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[7]+0.6123724356957944*F_0Skin[6]*alphaDrSurf[6]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[6]+0.5477225575051661*alphaDrSurf[1]*F_0Skin[5]+0.6123724356957944*F_0Skin[3]*alphaDrSurf[4]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[4]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[4]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[1]; - Ghat_F_0[5] = 0.5050762722761053*alphaDrSurf[8]*F_0Skin[26]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[26]+0.5050762722761054*alphaDrSurf[7]*F_0Skin[25]+0.7905694150420947*alphaDrSurf[1]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[24]+0.3912303982179757*alphaDrSurf[8]*F_0Skin[23]+0.6123724356957944*alphaDrSurf[4]*F_0Skin[23]+0.5050762722761053*alphaDrSurf[5]*F_0Skin[22]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[22]+0.7905694150420947*alphaDrSurf[8]*F_0Skin[21]+0.2258769757263128*alphaDrSurf[8]*F_0Skin[20]+0.3535533905932737*alphaDrSurf[4]*F_0Skin[20]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[19]+0.3912303982179757*alphaDrSurf[7]*F_0Skin[18]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[18]+0.5477225575051661*alphaDrSurf[6]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[16]+0.7905694150420947*alphaDrSurf[7]*F_0Skin[15]+0.3912303982179757*alphaDrSurf[5]*F_0Skin[14]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[14]+0.6123724356957944*alphaDrSurf[8]*F_0Skin[13]+0.2258769757263128*alphaDrSurf[7]*F_0Skin[12]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[6]*F_0Skin[11]+0.5477225575051661*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[9]+0.3535533905932737*F_0Skin[7]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[5]*F_0Skin[8]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[8]+0.6123724356957944*F_0Skin[5]*alphaDrSurf[7]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[7]+0.5477225575051661*alphaDrSurf[2]*F_0Skin[6]+0.6123724356957944*F_0Skin[3]*alphaDrSurf[5]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[5]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[4]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[2]; - Ghat_F_0[6] = 0.4517539514526256*alphaDrSurf[6]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[26]+0.632455532033676*alphaDrSurf[3]*F_0Skin[25]+0.4517539514526257*alphaDrSurf[8]*F_0Skin[24]+0.7071067811865475*alphaDrSurf[5]*F_0Skin[24]+0.5050762722761054*alphaDrSurf[4]*F_0Skin[24]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[24]+0.3499271061118826*alphaDrSurf[6]*F_0Skin[23]+0.5477225575051661*alphaDrSurf[2]*F_0Skin[23]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[22]+0.5050762722761053*alphaDrSurf[6]*F_0Skin[21]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[21]+0.2020305089104422*alphaDrSurf[6]*F_0Skin[20]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[20]+0.6324555320336759*alphaDrSurf[7]*F_0Skin[19]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[19]+0.4898979485566356*alphaDrSurf[3]*F_0Skin[18]+0.3499271061118826*alphaDrSurf[8]*F_0Skin[17]+0.5477225575051661*alphaDrSurf[5]*F_0Skin[17]+0.3912303982179757*alphaDrSurf[4]*F_0Skin[17]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[8]*F_0Skin[16]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[15]+0.5477225575051661*alphaDrSurf[6]*F_0Skin[14]+0.3912303982179757*alphaDrSurf[6]*F_0Skin[13]+0.6123724356957944*alphaDrSurf[2]*F_0Skin[13]+0.2828427124746191*alphaDrSurf[3]*F_0Skin[12]+0.2020305089104422*alphaDrSurf[8]*F_0Skin[11]+0.3162277660168379*alphaDrSurf[5]*F_0Skin[11]+0.2258769757263128*alphaDrSurf[4]*F_0Skin[11]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[11]+0.4898979485566357*alphaDrSurf[7]*F_0Skin[10]+0.5477225575051661*alphaDrSurf[1]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[6]*F_0Skin[9]+0.5477225575051661*F_0Skin[6]*alphaDrSurf[8]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[8]+0.3162277660168379*alphaDrSurf[6]*F_0Skin[8]+0.2828427124746191*F_0Skin[4]*alphaDrSurf[7]+0.2258769757263128*alphaDrSurf[6]*F_0Skin[7]+0.3535533905932737*alphaDrSurf[2]*F_0Skin[7]+0.6123724356957944*F_0Skin[3]*alphaDrSurf[6]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[6]+0.6123724356957944*alphaDrSurf[4]*F_0Skin[6]+0.5477225575051661*alphaDrSurf[3]*F_0Skin[5]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[4]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[4]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[3]; - Ghat_F_0[7] = 0.4517539514526256*alphaDrSurf[7]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[26]+0.4517539514526257*alphaDrSurf[8]*F_0Skin[25]+0.5050762722761054*alphaDrSurf[5]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[4]*F_0Skin[25]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[25]+0.632455532033676*alphaDrSurf[3]*F_0Skin[24]+0.3499271061118826*alphaDrSurf[7]*F_0Skin[23]+0.5477225575051661*alphaDrSurf[1]*F_0Skin[23]+0.5050762722761053*alphaDrSurf[7]*F_0Skin[22]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[22]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[21]+0.2020305089104422*alphaDrSurf[7]*F_0Skin[20]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[20]+0.6324555320336759*alphaDrSurf[6]*F_0Skin[19]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[19]+0.3499271061118826*alphaDrSurf[8]*F_0Skin[18]+0.3912303982179757*alphaDrSurf[5]*F_0Skin[18]+0.5477225575051661*alphaDrSurf[4]*F_0Skin[18]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[18]+0.4898979485566356*alphaDrSurf[3]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[8]*F_0Skin[15]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[15]+0.3912303982179757*alphaDrSurf[7]*F_0Skin[14]+0.6123724356957944*alphaDrSurf[1]*F_0Skin[14]+0.5477225575051661*alphaDrSurf[7]*F_0Skin[13]+0.2020305089104422*alphaDrSurf[8]*F_0Skin[12]+0.2258769757263128*alphaDrSurf[5]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[4]*F_0Skin[12]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[12]+0.2828427124746191*alphaDrSurf[3]*F_0Skin[11]+0.4898979485566357*alphaDrSurf[6]*F_0Skin[10]+0.5477225575051661*alphaDrSurf[2]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[7]*F_0Skin[9]+0.5477225575051661*F_0Skin[5]*alphaDrSurf[8]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[7]*F_0Skin[8]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[8]+0.3162277660168379*F_0Skin[7]*alphaDrSurf[7]+0.6123724356957944*F_0Skin[3]*alphaDrSurf[7]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[7]+0.2828427124746191*F_0Skin[4]*alphaDrSurf[6]+0.5477225575051661*alphaDrSurf[3]*F_0Skin[6]+0.6123724356957944*F_0Skin[5]*alphaDrSurf[5]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[5]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[4]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[3]; - Ghat_F_0[8] = 0.3226813938947327*alphaDrSurf[8]*F_0Skin[26]+0.5050762722761053*alphaDrSurf[5]*F_0Skin[26]+0.5050762722761053*alphaDrSurf[4]*F_0Skin[26]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[26]+0.4517539514526257*alphaDrSurf[7]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[25]+0.4517539514526257*alphaDrSurf[6]*F_0Skin[24]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[24]+0.249947932937059*alphaDrSurf[8]*F_0Skin[23]+0.3912303982179757*alphaDrSurf[5]*F_0Skin[23]+0.3912303982179757*alphaDrSurf[4]*F_0Skin[23]+0.6123724356957944*alphaDrSurf[0]*F_0Skin[23]+0.5050762722761053*alphaDrSurf[8]*F_0Skin[22]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[22]+0.5050762722761053*alphaDrSurf[8]*F_0Skin[21]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[21]+0.1443075063646015*alphaDrSurf[8]*F_0Skin[20]+0.2258769757263128*alphaDrSurf[5]*F_0Skin[20]+0.2258769757263128*alphaDrSurf[4]*F_0Skin[20]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[20]+0.6324555320336759*alphaDrSurf[3]*F_0Skin[19]+0.3499271061118826*alphaDrSurf[7]*F_0Skin[18]+0.5477225575051661*alphaDrSurf[1]*F_0Skin[18]+0.3499271061118826*alphaDrSurf[6]*F_0Skin[17]+0.5477225575051661*alphaDrSurf[2]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[15]+0.3912303982179757*alphaDrSurf[8]*F_0Skin[14]+0.6123724356957944*alphaDrSurf[4]*F_0Skin[14]+0.3912303982179757*alphaDrSurf[8]*F_0Skin[13]+0.6123724356957944*alphaDrSurf[5]*F_0Skin[13]+0.2020305089104422*alphaDrSurf[7]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[12]+0.2020305089104422*alphaDrSurf[6]*F_0Skin[11]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[11]+0.4898979485566357*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[8]*F_0Skin[9]+0.2258769757263128*F_0Skin[8]*alphaDrSurf[8]+0.2258769757263128*F_0Skin[7]*alphaDrSurf[8]+0.6123724356957944*F_0Skin[3]*alphaDrSurf[8]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[8]+0.3535533905932737*alphaDrSurf[4]*F_0Skin[8]+0.5477225575051661*F_0Skin[5]*alphaDrSurf[7]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[5]*F_0Skin[7]+0.5477225575051661*F_0Skin[6]*alphaDrSurf[6]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[6]+0.2828427124746191*alphaDrSurf[3]*F_0Skin[4]; - Ghat_G_1[0] = 0.7905694150420947*alphaDrSurf[8]*G_1Skin[26]+0.7905694150420948*alphaDrSurf[7]*G_1Skin[25]+0.7905694150420948*alphaDrSurf[6]*G_1Skin[24]+0.6123724356957944*alphaDrSurf[8]*G_1Skin[23]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[22]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[21]+0.3535533905932737*alphaDrSurf[8]*G_1Skin[20]+0.7905694150420947*alphaDrSurf[3]*G_1Skin[19]+0.6123724356957944*alphaDrSurf[7]*G_1Skin[18]+0.6123724356957944*alphaDrSurf[6]*G_1Skin[17]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[16]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[15]+0.6123724356957944*alphaDrSurf[5]*G_1Skin[14]+0.6123724356957944*alphaDrSurf[4]*G_1Skin[13]+0.3535533905932737*alphaDrSurf[7]*G_1Skin[12]+0.3535533905932737*alphaDrSurf[6]*G_1Skin[11]+0.6123724356957944*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[9]+0.3535533905932737*alphaDrSurf[5]*G_1Skin[8]+0.3535533905932737*alphaDrSurf[4]*G_1Skin[7]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[6]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[3]*G_1Skin[4]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[3]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[2]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[1]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 0.7071067811865475*alphaDrSurf[7]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[8]*G_1Skin[25]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[24]+0.5477225575051661*alphaDrSurf[7]*G_1Skin[23]+0.7905694150420948*alphaDrSurf[7]*G_1Skin[22]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[21]+0.3162277660168379*alphaDrSurf[7]*G_1Skin[20]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[19]+0.7905694150420947*alphaDrSurf[2]*G_1Skin[19]+0.5477225575051661*alphaDrSurf[8]*G_1Skin[18]+0.6123724356957944*alphaDrSurf[5]*G_1Skin[18]+0.5477225575051661*alphaDrSurf[3]*G_1Skin[17]+0.7905694150420948*alphaDrSurf[3]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[4]*G_1Skin[15]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[15]+0.6123724356957944*alphaDrSurf[7]*G_1Skin[14]+0.5477225575051661*alphaDrSurf[1]*G_1Skin[13]+0.3162277660168379*alphaDrSurf[8]*G_1Skin[12]+0.3535533905932737*alphaDrSurf[5]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[11]+0.5477225575051661*alphaDrSurf[6]*G_1Skin[10]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[1]*G_1Skin[9]+0.3535533905932737*alphaDrSurf[7]*G_1Skin[8]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[7]+0.3162277660168379*G_1Skin[4]*alphaDrSurf[6]+0.6123724356957944*alphaDrSurf[3]*G_1Skin[6]+0.5477225575051661*alphaDrSurf[4]*G_1Skin[5]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[5]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[2]*G_1Skin[4]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[3]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 0.7071067811865475*alphaDrSurf[6]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[8]*G_1Skin[24]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[24]+0.5477225575051661*alphaDrSurf[6]*G_1Skin[23]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[22]+0.7905694150420948*alphaDrSurf[6]*G_1Skin[21]+0.3162277660168379*alphaDrSurf[6]*G_1Skin[20]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[19]+0.7905694150420947*alphaDrSurf[1]*G_1Skin[19]+0.5477225575051661*alphaDrSurf[3]*G_1Skin[18]+0.5477225575051661*alphaDrSurf[8]*G_1Skin[17]+0.6123724356957944*alphaDrSurf[4]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[5]*G_1Skin[16]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[16]+0.7905694150420948*alphaDrSurf[3]*G_1Skin[15]+0.5477225575051661*alphaDrSurf[2]*G_1Skin[14]+0.6123724356957944*alphaDrSurf[6]*G_1Skin[13]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[8]*G_1Skin[11]+0.3535533905932737*alphaDrSurf[4]*G_1Skin[11]+0.5477225575051661*alphaDrSurf[7]*G_1Skin[10]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[2]*G_1Skin[9]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[8]+0.3162277660168379*G_1Skin[4]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[6]*G_1Skin[7]+0.5477225575051661*alphaDrSurf[5]*G_1Skin[6]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[6]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[5]+0.6123724356957944*alphaDrSurf[3]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[4]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[3]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[2]; - Ghat_G_1[3] = 0.6324555320336759*alphaDrSurf[3]*G_1Skin[26]+0.632455532033676*alphaDrSurf[6]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[25]+0.632455532033676*alphaDrSurf[7]*G_1Skin[24]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[24]+0.4898979485566357*alphaDrSurf[3]*G_1Skin[23]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[22]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[21]+0.2828427124746191*alphaDrSurf[3]*G_1Skin[20]+0.6324555320336759*alphaDrSurf[8]*G_1Skin[19]+0.7071067811865475*alphaDrSurf[5]*G_1Skin[19]+0.7071067811865475*alphaDrSurf[4]*G_1Skin[19]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[19]+0.4898979485566356*alphaDrSurf[6]*G_1Skin[18]+0.5477225575051661*alphaDrSurf[2]*G_1Skin[18]+0.4898979485566356*alphaDrSurf[7]*G_1Skin[17]+0.5477225575051661*alphaDrSurf[1]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[16]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[15]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[15]+0.5477225575051661*alphaDrSurf[3]*G_1Skin[14]+0.5477225575051661*alphaDrSurf[3]*G_1Skin[13]+0.2828427124746191*alphaDrSurf[6]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[12]+0.2828427124746191*alphaDrSurf[7]*G_1Skin[11]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[11]+0.4898979485566357*alphaDrSurf[8]*G_1Skin[10]+0.5477225575051661*alphaDrSurf[5]*G_1Skin[10]+0.5477225575051661*alphaDrSurf[4]*G_1Skin[10]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[3]*G_1Skin[9]+0.2828427124746191*G_1Skin[4]*alphaDrSurf[8]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[8]+0.5477225575051661*G_1Skin[6]*alphaDrSurf[7]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[7]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[7]+0.5477225575051661*G_1Skin[5]*alphaDrSurf[6]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[6]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[6]+0.3162277660168379*G_1Skin[4]*alphaDrSurf[5]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[5]+0.3162277660168379*G_1Skin[4]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[4]+0.6123724356957944*G_1Skin[3]*alphaDrSurf[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[3]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[2]; - Ghat_G_1[4] = 0.5050762722761053*alphaDrSurf[8]*G_1Skin[26]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[25]+0.5050762722761054*alphaDrSurf[6]*G_1Skin[24]+0.7905694150420947*alphaDrSurf[2]*G_1Skin[24]+0.3912303982179757*alphaDrSurf[8]*G_1Skin[23]+0.6123724356957944*alphaDrSurf[5]*G_1Skin[23]+0.7905694150420947*alphaDrSurf[8]*G_1Skin[22]+0.5050762722761053*alphaDrSurf[4]*G_1Skin[21]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[21]+0.2258769757263128*alphaDrSurf[8]*G_1Skin[20]+0.3535533905932737*alphaDrSurf[5]*G_1Skin[20]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[19]+0.5477225575051661*alphaDrSurf[7]*G_1Skin[18]+0.3912303982179757*alphaDrSurf[6]*G_1Skin[17]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[17]+0.7905694150420947*alphaDrSurf[6]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[15]+0.6123724356957944*alphaDrSurf[8]*G_1Skin[14]+0.3912303982179757*alphaDrSurf[4]*G_1Skin[13]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[13]+0.3162277660168379*alphaDrSurf[7]*G_1Skin[12]+0.2258769757263128*alphaDrSurf[6]*G_1Skin[11]+0.3535533905932737*alphaDrSurf[2]*G_1Skin[11]+0.5477225575051661*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[9]+0.3535533905932737*G_1Skin[8]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[4]*G_1Skin[7]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[7]+0.6123724356957944*G_1Skin[6]*alphaDrSurf[6]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[6]+0.5477225575051661*alphaDrSurf[1]*G_1Skin[5]+0.6123724356957944*G_1Skin[3]*alphaDrSurf[4]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[4]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[4]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[1]; - Ghat_G_1[5] = 0.5050762722761053*alphaDrSurf[8]*G_1Skin[26]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[26]+0.5050762722761054*alphaDrSurf[7]*G_1Skin[25]+0.7905694150420947*alphaDrSurf[1]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[24]+0.3912303982179757*alphaDrSurf[8]*G_1Skin[23]+0.6123724356957944*alphaDrSurf[4]*G_1Skin[23]+0.5050762722761053*alphaDrSurf[5]*G_1Skin[22]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[22]+0.7905694150420947*alphaDrSurf[8]*G_1Skin[21]+0.2258769757263128*alphaDrSurf[8]*G_1Skin[20]+0.3535533905932737*alphaDrSurf[4]*G_1Skin[20]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[19]+0.3912303982179757*alphaDrSurf[7]*G_1Skin[18]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[18]+0.5477225575051661*alphaDrSurf[6]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[16]+0.7905694150420947*alphaDrSurf[7]*G_1Skin[15]+0.3912303982179757*alphaDrSurf[5]*G_1Skin[14]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[14]+0.6123724356957944*alphaDrSurf[8]*G_1Skin[13]+0.2258769757263128*alphaDrSurf[7]*G_1Skin[12]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[6]*G_1Skin[11]+0.5477225575051661*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[9]+0.3535533905932737*G_1Skin[7]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[5]*G_1Skin[8]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[8]+0.6123724356957944*G_1Skin[5]*alphaDrSurf[7]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[7]+0.5477225575051661*alphaDrSurf[2]*G_1Skin[6]+0.6123724356957944*G_1Skin[3]*alphaDrSurf[5]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[5]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[4]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[2]; - Ghat_G_1[6] = 0.4517539514526256*alphaDrSurf[6]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[26]+0.632455532033676*alphaDrSurf[3]*G_1Skin[25]+0.4517539514526257*alphaDrSurf[8]*G_1Skin[24]+0.7071067811865475*alphaDrSurf[5]*G_1Skin[24]+0.5050762722761054*alphaDrSurf[4]*G_1Skin[24]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[24]+0.3499271061118826*alphaDrSurf[6]*G_1Skin[23]+0.5477225575051661*alphaDrSurf[2]*G_1Skin[23]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[22]+0.5050762722761053*alphaDrSurf[6]*G_1Skin[21]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[21]+0.2020305089104422*alphaDrSurf[6]*G_1Skin[20]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[20]+0.6324555320336759*alphaDrSurf[7]*G_1Skin[19]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[19]+0.4898979485566356*alphaDrSurf[3]*G_1Skin[18]+0.3499271061118826*alphaDrSurf[8]*G_1Skin[17]+0.5477225575051661*alphaDrSurf[5]*G_1Skin[17]+0.3912303982179757*alphaDrSurf[4]*G_1Skin[17]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[8]*G_1Skin[16]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[15]+0.5477225575051661*alphaDrSurf[6]*G_1Skin[14]+0.3912303982179757*alphaDrSurf[6]*G_1Skin[13]+0.6123724356957944*alphaDrSurf[2]*G_1Skin[13]+0.2828427124746191*alphaDrSurf[3]*G_1Skin[12]+0.2020305089104422*alphaDrSurf[8]*G_1Skin[11]+0.3162277660168379*alphaDrSurf[5]*G_1Skin[11]+0.2258769757263128*alphaDrSurf[4]*G_1Skin[11]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[11]+0.4898979485566357*alphaDrSurf[7]*G_1Skin[10]+0.5477225575051661*alphaDrSurf[1]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[6]*G_1Skin[9]+0.5477225575051661*G_1Skin[6]*alphaDrSurf[8]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[8]+0.3162277660168379*alphaDrSurf[6]*G_1Skin[8]+0.2828427124746191*G_1Skin[4]*alphaDrSurf[7]+0.2258769757263128*alphaDrSurf[6]*G_1Skin[7]+0.3535533905932737*alphaDrSurf[2]*G_1Skin[7]+0.6123724356957944*G_1Skin[3]*alphaDrSurf[6]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[6]+0.6123724356957944*alphaDrSurf[4]*G_1Skin[6]+0.5477225575051661*alphaDrSurf[3]*G_1Skin[5]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[4]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[4]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[3]; - Ghat_G_1[7] = 0.4517539514526256*alphaDrSurf[7]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[26]+0.4517539514526257*alphaDrSurf[8]*G_1Skin[25]+0.5050762722761054*alphaDrSurf[5]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[4]*G_1Skin[25]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[25]+0.632455532033676*alphaDrSurf[3]*G_1Skin[24]+0.3499271061118826*alphaDrSurf[7]*G_1Skin[23]+0.5477225575051661*alphaDrSurf[1]*G_1Skin[23]+0.5050762722761053*alphaDrSurf[7]*G_1Skin[22]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[22]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[21]+0.2020305089104422*alphaDrSurf[7]*G_1Skin[20]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[20]+0.6324555320336759*alphaDrSurf[6]*G_1Skin[19]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[19]+0.3499271061118826*alphaDrSurf[8]*G_1Skin[18]+0.3912303982179757*alphaDrSurf[5]*G_1Skin[18]+0.5477225575051661*alphaDrSurf[4]*G_1Skin[18]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[18]+0.4898979485566356*alphaDrSurf[3]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[8]*G_1Skin[15]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[15]+0.3912303982179757*alphaDrSurf[7]*G_1Skin[14]+0.6123724356957944*alphaDrSurf[1]*G_1Skin[14]+0.5477225575051661*alphaDrSurf[7]*G_1Skin[13]+0.2020305089104422*alphaDrSurf[8]*G_1Skin[12]+0.2258769757263128*alphaDrSurf[5]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[4]*G_1Skin[12]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[12]+0.2828427124746191*alphaDrSurf[3]*G_1Skin[11]+0.4898979485566357*alphaDrSurf[6]*G_1Skin[10]+0.5477225575051661*alphaDrSurf[2]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[7]*G_1Skin[9]+0.5477225575051661*G_1Skin[5]*alphaDrSurf[8]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[7]*G_1Skin[8]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[8]+0.3162277660168379*G_1Skin[7]*alphaDrSurf[7]+0.6123724356957944*G_1Skin[3]*alphaDrSurf[7]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[7]+0.2828427124746191*G_1Skin[4]*alphaDrSurf[6]+0.5477225575051661*alphaDrSurf[3]*G_1Skin[6]+0.6123724356957944*G_1Skin[5]*alphaDrSurf[5]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[5]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[4]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[3]; - Ghat_G_1[8] = 0.3226813938947327*alphaDrSurf[8]*G_1Skin[26]+0.5050762722761053*alphaDrSurf[5]*G_1Skin[26]+0.5050762722761053*alphaDrSurf[4]*G_1Skin[26]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[26]+0.4517539514526257*alphaDrSurf[7]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[25]+0.4517539514526257*alphaDrSurf[6]*G_1Skin[24]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[24]+0.249947932937059*alphaDrSurf[8]*G_1Skin[23]+0.3912303982179757*alphaDrSurf[5]*G_1Skin[23]+0.3912303982179757*alphaDrSurf[4]*G_1Skin[23]+0.6123724356957944*alphaDrSurf[0]*G_1Skin[23]+0.5050762722761053*alphaDrSurf[8]*G_1Skin[22]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[22]+0.5050762722761053*alphaDrSurf[8]*G_1Skin[21]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[21]+0.1443075063646015*alphaDrSurf[8]*G_1Skin[20]+0.2258769757263128*alphaDrSurf[5]*G_1Skin[20]+0.2258769757263128*alphaDrSurf[4]*G_1Skin[20]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[20]+0.6324555320336759*alphaDrSurf[3]*G_1Skin[19]+0.3499271061118826*alphaDrSurf[7]*G_1Skin[18]+0.5477225575051661*alphaDrSurf[1]*G_1Skin[18]+0.3499271061118826*alphaDrSurf[6]*G_1Skin[17]+0.5477225575051661*alphaDrSurf[2]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[15]+0.3912303982179757*alphaDrSurf[8]*G_1Skin[14]+0.6123724356957944*alphaDrSurf[4]*G_1Skin[14]+0.3912303982179757*alphaDrSurf[8]*G_1Skin[13]+0.6123724356957944*alphaDrSurf[5]*G_1Skin[13]+0.2020305089104422*alphaDrSurf[7]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[12]+0.2020305089104422*alphaDrSurf[6]*G_1Skin[11]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[11]+0.4898979485566357*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[8]*G_1Skin[9]+0.2258769757263128*G_1Skin[8]*alphaDrSurf[8]+0.2258769757263128*G_1Skin[7]*alphaDrSurf[8]+0.6123724356957944*G_1Skin[3]*alphaDrSurf[8]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[8]+0.3535533905932737*alphaDrSurf[4]*G_1Skin[8]+0.5477225575051661*G_1Skin[5]*alphaDrSurf[7]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[5]*G_1Skin[7]+0.5477225575051661*G_1Skin[6]*alphaDrSurf[6]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[6]+0.2828427124746191*alphaDrSurf[3]*G_1Skin[4]; + alphaDrSurf[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf[3] = nuSum[3]*wvpar+0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; + alphaDrSurf[4] = nuSum[4]*wvpar+0.5*nuSum[4]*dvpar-1.0*sumNuUPar[4]; + alphaDrSurf[5] = nuSum[5]*wvpar+0.5*nuSum[5]*dvpar-1.0*sumNuUPar[5]; + alphaDrSurf[6] = nuSum[6]*wvpar+0.5*nuSum[6]*dvpar-1.0*sumNuUPar[6]; + alphaDrSurf[7] = nuSum[7]*wvpar+0.5*nuSum[7]*dvpar-1.0*sumNuUPar[7]; + alphaDrSurf[8] = nuSum[8]*wvpar+0.5*nuSum[8]*dvpar-1.0*sumNuUPar[8]; + + if (0.4*alphaDrSurf[8]-0.5999999999999995*alphaDrSurf[7]-0.5999999999999999*alphaDrSurf[6]+0.4472135954999579*(alphaDrSurf[5]+alphaDrSurf[4])+0.9*alphaDrSurf[3]-0.6708203932499369*(alphaDrSurf[2]+alphaDrSurf[1])+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = tensor_3x_p2_surfx3_eval_quad_node_0_r(F_0Skin); + G_1_UpwindQuad[0] = tensor_3x_p2_surfx3_eval_quad_node_0_r(G_1Skin); + } else { + F_0_UpwindQuad[0] = tensor_3x_p2_surfx3_eval_quad_node_0_l(F_0Edge); + G_1_UpwindQuad[0] = tensor_3x_p2_surfx3_eval_quad_node_0_l(G_1Edge); + } + if ((-0.5*alphaDrSurf[8])+0.75*alphaDrSurf[7]-0.5590169943749475*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[4]-0.6708203932499369*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[1] = tensor_3x_p2_surfx3_eval_quad_node_1_r(F_0Skin); + G_1_UpwindQuad[1] = tensor_3x_p2_surfx3_eval_quad_node_1_r(G_1Skin); + } else { + F_0_UpwindQuad[1] = tensor_3x_p2_surfx3_eval_quad_node_1_l(F_0Edge); + G_1_UpwindQuad[1] = tensor_3x_p2_surfx3_eval_quad_node_1_l(G_1Edge); + } + if (0.4*alphaDrSurf[8]-0.5999999999999995*alphaDrSurf[7]+0.5999999999999999*alphaDrSurf[6]+0.4472135954999579*(alphaDrSurf[5]+alphaDrSurf[4])-0.9*alphaDrSurf[3]+0.6708203932499369*alphaDrSurf[2]-0.6708203932499369*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[2] = tensor_3x_p2_surfx3_eval_quad_node_2_r(F_0Skin); + G_1_UpwindQuad[2] = tensor_3x_p2_surfx3_eval_quad_node_2_r(G_1Skin); + } else { + F_0_UpwindQuad[2] = tensor_3x_p2_surfx3_eval_quad_node_2_l(F_0Edge); + G_1_UpwindQuad[2] = tensor_3x_p2_surfx3_eval_quad_node_2_l(G_1Edge); + } + if ((-0.5*alphaDrSurf[8])+0.75*alphaDrSurf[6]+0.4472135954999579*alphaDrSurf[5]-0.5590169943749475*alphaDrSurf[4]-0.6708203932499369*alphaDrSurf[2]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[3] = tensor_3x_p2_surfx3_eval_quad_node_3_r(F_0Skin); + G_1_UpwindQuad[3] = tensor_3x_p2_surfx3_eval_quad_node_3_r(G_1Skin); + } else { + F_0_UpwindQuad[3] = tensor_3x_p2_surfx3_eval_quad_node_3_l(F_0Edge); + G_1_UpwindQuad[3] = tensor_3x_p2_surfx3_eval_quad_node_3_l(G_1Edge); + } + if (0.625*alphaDrSurf[8]-0.5590169943749475*(alphaDrSurf[5]+alphaDrSurf[4])+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[4] = tensor_3x_p2_surfx3_eval_quad_node_4_r(F_0Skin); + G_1_UpwindQuad[4] = tensor_3x_p2_surfx3_eval_quad_node_4_r(G_1Skin); + } else { + F_0_UpwindQuad[4] = tensor_3x_p2_surfx3_eval_quad_node_4_l(F_0Edge); + G_1_UpwindQuad[4] = tensor_3x_p2_surfx3_eval_quad_node_4_l(G_1Edge); + } + if ((-0.5*alphaDrSurf[8])-0.75*alphaDrSurf[6]+0.4472135954999579*alphaDrSurf[5]-0.5590169943749475*alphaDrSurf[4]+0.6708203932499369*alphaDrSurf[2]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[5] = tensor_3x_p2_surfx3_eval_quad_node_5_r(F_0Skin); + G_1_UpwindQuad[5] = tensor_3x_p2_surfx3_eval_quad_node_5_r(G_1Skin); + } else { + F_0_UpwindQuad[5] = tensor_3x_p2_surfx3_eval_quad_node_5_l(F_0Edge); + G_1_UpwindQuad[5] = tensor_3x_p2_surfx3_eval_quad_node_5_l(G_1Edge); + } + if (0.4*alphaDrSurf[8]+0.5999999999999995*alphaDrSurf[7]-0.5999999999999999*alphaDrSurf[6]+0.4472135954999579*(alphaDrSurf[5]+alphaDrSurf[4])-0.9*alphaDrSurf[3]-0.6708203932499369*alphaDrSurf[2]+0.6708203932499369*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[6] = tensor_3x_p2_surfx3_eval_quad_node_6_r(F_0Skin); + G_1_UpwindQuad[6] = tensor_3x_p2_surfx3_eval_quad_node_6_r(G_1Skin); + } else { + F_0_UpwindQuad[6] = tensor_3x_p2_surfx3_eval_quad_node_6_l(F_0Edge); + G_1_UpwindQuad[6] = tensor_3x_p2_surfx3_eval_quad_node_6_l(G_1Edge); + } + if ((-0.5*alphaDrSurf[8])-0.75*alphaDrSurf[7]-0.5590169943749475*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[4]+0.6708203932499369*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[7] = tensor_3x_p2_surfx3_eval_quad_node_7_r(F_0Skin); + G_1_UpwindQuad[7] = tensor_3x_p2_surfx3_eval_quad_node_7_r(G_1Skin); + } else { + F_0_UpwindQuad[7] = tensor_3x_p2_surfx3_eval_quad_node_7_l(F_0Edge); + G_1_UpwindQuad[7] = tensor_3x_p2_surfx3_eval_quad_node_7_l(G_1Edge); + } + if (0.4*alphaDrSurf[8]+0.5999999999999995*alphaDrSurf[7]+0.5999999999999999*alphaDrSurf[6]+0.4472135954999579*(alphaDrSurf[5]+alphaDrSurf[4])+0.9*alphaDrSurf[3]+0.6708203932499369*(alphaDrSurf[2]+alphaDrSurf[1])+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[8] = tensor_3x_p2_surfx3_eval_quad_node_8_r(F_0Skin); + G_1_UpwindQuad[8] = tensor_3x_p2_surfx3_eval_quad_node_8_r(G_1Skin); + } else { + F_0_UpwindQuad[8] = tensor_3x_p2_surfx3_eval_quad_node_8_l(F_0Edge); + G_1_UpwindQuad[8] = tensor_3x_p2_surfx3_eval_quad_node_8_l(G_1Edge); + } + + // Project tensor nodal quadrature basis back onto modal basis. + tensor_3x_p2_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + tensor_3x_p2_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); + + Ghat_F_0[0] = 0.5*F_0_Upwind[8]*alphaDrSurf[8]+0.5*F_0_Upwind[7]*alphaDrSurf[7]+0.5*F_0_Upwind[6]*alphaDrSurf[6]+0.5*F_0_Upwind[5]*alphaDrSurf[5]+0.5*F_0_Upwind[4]*alphaDrSurf[4]+0.5*F_0_Upwind[3]*alphaDrSurf[3]+0.5*F_0_Upwind[2]*alphaDrSurf[2]+0.5*F_0_Upwind[1]*alphaDrSurf[1]+0.5*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.447213595499958*F_0_Upwind[7]*alphaDrSurf[8]+0.447213595499958*alphaDrSurf[7]*F_0_Upwind[8]+0.5000000000000001*F_0_Upwind[5]*alphaDrSurf[7]+0.5000000000000001*alphaDrSurf[5]*F_0_Upwind[7]+0.447213595499958*F_0_Upwind[3]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[3]*F_0_Upwind[6]+0.4472135954999579*F_0_Upwind[1]*alphaDrSurf[4]+0.4472135954999579*alphaDrSurf[1]*F_0_Upwind[4]+0.5*F_0_Upwind[2]*alphaDrSurf[3]+0.5*alphaDrSurf[2]*F_0_Upwind[3]+0.5*F_0_Upwind[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.447213595499958*F_0_Upwind[6]*alphaDrSurf[8]+0.447213595499958*alphaDrSurf[6]*F_0_Upwind[8]+0.447213595499958*F_0_Upwind[3]*alphaDrSurf[7]+0.447213595499958*alphaDrSurf[3]*F_0_Upwind[7]+0.5000000000000001*F_0_Upwind[4]*alphaDrSurf[6]+0.5000000000000001*alphaDrSurf[4]*F_0_Upwind[6]+0.4472135954999579*F_0_Upwind[2]*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[2]*F_0_Upwind[5]+0.5*F_0_Upwind[1]*alphaDrSurf[3]+0.5*alphaDrSurf[1]*F_0_Upwind[3]+0.5*F_0_Upwind[0]*alphaDrSurf[2]+0.5*alphaDrSurf[0]*F_0_Upwind[2]; + Ghat_F_0[3] = 0.4*F_0_Upwind[3]*alphaDrSurf[8]+0.4*alphaDrSurf[3]*F_0_Upwind[8]+0.4*F_0_Upwind[6]*alphaDrSurf[7]+0.447213595499958*F_0_Upwind[2]*alphaDrSurf[7]+0.4*alphaDrSurf[6]*F_0_Upwind[7]+0.447213595499958*alphaDrSurf[2]*F_0_Upwind[7]+0.447213595499958*F_0_Upwind[1]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[1]*F_0_Upwind[6]+0.4472135954999579*F_0_Upwind[3]*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[3]*F_0_Upwind[5]+0.4472135954999579*F_0_Upwind[3]*alphaDrSurf[4]+0.4472135954999579*alphaDrSurf[3]*F_0_Upwind[4]+0.5*F_0_Upwind[0]*alphaDrSurf[3]+0.5*alphaDrSurf[0]*F_0_Upwind[3]+0.5*F_0_Upwind[1]*alphaDrSurf[2]+0.5*alphaDrSurf[1]*F_0_Upwind[2]; + Ghat_F_0[4] = 0.31943828249997*F_0_Upwind[8]*alphaDrSurf[8]+0.5*F_0_Upwind[5]*alphaDrSurf[8]+0.5*alphaDrSurf[5]*F_0_Upwind[8]+0.4472135954999579*F_0_Upwind[7]*alphaDrSurf[7]+0.31943828249997*F_0_Upwind[6]*alphaDrSurf[6]+0.5000000000000001*F_0_Upwind[2]*alphaDrSurf[6]+0.5000000000000001*alphaDrSurf[2]*F_0_Upwind[6]+0.31943828249997*F_0_Upwind[4]*alphaDrSurf[4]+0.5*F_0_Upwind[0]*alphaDrSurf[4]+0.5*alphaDrSurf[0]*F_0_Upwind[4]+0.4472135954999579*F_0_Upwind[3]*alphaDrSurf[3]+0.4472135954999579*F_0_Upwind[1]*alphaDrSurf[1]; + Ghat_F_0[5] = 0.31943828249997*F_0_Upwind[8]*alphaDrSurf[8]+0.5*F_0_Upwind[4]*alphaDrSurf[8]+0.5*alphaDrSurf[4]*F_0_Upwind[8]+0.31943828249997*F_0_Upwind[7]*alphaDrSurf[7]+0.5000000000000001*F_0_Upwind[1]*alphaDrSurf[7]+0.5000000000000001*alphaDrSurf[1]*F_0_Upwind[7]+0.4472135954999579*F_0_Upwind[6]*alphaDrSurf[6]+0.31943828249997*F_0_Upwind[5]*alphaDrSurf[5]+0.5*F_0_Upwind[0]*alphaDrSurf[5]+0.5*alphaDrSurf[0]*F_0_Upwind[5]+0.4472135954999579*F_0_Upwind[3]*alphaDrSurf[3]+0.4472135954999579*F_0_Upwind[2]*alphaDrSurf[2]; + Ghat_F_0[6] = 0.2857142857142857*F_0_Upwind[6]*alphaDrSurf[8]+0.447213595499958*F_0_Upwind[2]*alphaDrSurf[8]+0.2857142857142857*alphaDrSurf[6]*F_0_Upwind[8]+0.447213595499958*alphaDrSurf[2]*F_0_Upwind[8]+0.4*F_0_Upwind[3]*alphaDrSurf[7]+0.4*alphaDrSurf[3]*F_0_Upwind[7]+0.4472135954999579*F_0_Upwind[5]*alphaDrSurf[6]+0.31943828249997*F_0_Upwind[4]*alphaDrSurf[6]+0.5*F_0_Upwind[0]*alphaDrSurf[6]+0.4472135954999579*alphaDrSurf[5]*F_0_Upwind[6]+0.31943828249997*alphaDrSurf[4]*F_0_Upwind[6]+0.5*alphaDrSurf[0]*F_0_Upwind[6]+0.5000000000000001*F_0_Upwind[2]*alphaDrSurf[4]+0.5000000000000001*alphaDrSurf[2]*F_0_Upwind[4]+0.447213595499958*F_0_Upwind[1]*alphaDrSurf[3]+0.447213595499958*alphaDrSurf[1]*F_0_Upwind[3]; + Ghat_F_0[7] = 0.2857142857142857*F_0_Upwind[7]*alphaDrSurf[8]+0.447213595499958*F_0_Upwind[1]*alphaDrSurf[8]+0.2857142857142857*alphaDrSurf[7]*F_0_Upwind[8]+0.447213595499958*alphaDrSurf[1]*F_0_Upwind[8]+0.31943828249997*F_0_Upwind[5]*alphaDrSurf[7]+0.4472135954999579*F_0_Upwind[4]*alphaDrSurf[7]+0.5*F_0_Upwind[0]*alphaDrSurf[7]+0.31943828249997*alphaDrSurf[5]*F_0_Upwind[7]+0.4472135954999579*alphaDrSurf[4]*F_0_Upwind[7]+0.5*alphaDrSurf[0]*F_0_Upwind[7]+0.4*F_0_Upwind[3]*alphaDrSurf[6]+0.4*alphaDrSurf[3]*F_0_Upwind[6]+0.5000000000000001*F_0_Upwind[1]*alphaDrSurf[5]+0.5000000000000001*alphaDrSurf[1]*F_0_Upwind[5]+0.447213595499958*F_0_Upwind[2]*alphaDrSurf[3]+0.447213595499958*alphaDrSurf[2]*F_0_Upwind[3]; + Ghat_F_0[8] = 0.2040816326530612*F_0_Upwind[8]*alphaDrSurf[8]+0.31943828249997*F_0_Upwind[5]*alphaDrSurf[8]+0.31943828249997*F_0_Upwind[4]*alphaDrSurf[8]+0.5*F_0_Upwind[0]*alphaDrSurf[8]+0.31943828249997*alphaDrSurf[5]*F_0_Upwind[8]+0.31943828249997*alphaDrSurf[4]*F_0_Upwind[8]+0.5*alphaDrSurf[0]*F_0_Upwind[8]+0.2857142857142857*F_0_Upwind[7]*alphaDrSurf[7]+0.447213595499958*F_0_Upwind[1]*alphaDrSurf[7]+0.447213595499958*alphaDrSurf[1]*F_0_Upwind[7]+0.2857142857142857*F_0_Upwind[6]*alphaDrSurf[6]+0.447213595499958*F_0_Upwind[2]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[2]*F_0_Upwind[6]+0.5*F_0_Upwind[4]*alphaDrSurf[5]+0.5*alphaDrSurf[4]*F_0_Upwind[5]+0.4*F_0_Upwind[3]*alphaDrSurf[3]; + Ghat_G_1[0] = 0.5*G_1_Upwind[8]*alphaDrSurf[8]+0.5*G_1_Upwind[7]*alphaDrSurf[7]+0.5*G_1_Upwind[6]*alphaDrSurf[6]+0.5*G_1_Upwind[5]*alphaDrSurf[5]+0.5*G_1_Upwind[4]*alphaDrSurf[4]+0.5*G_1_Upwind[3]*alphaDrSurf[3]+0.5*G_1_Upwind[2]*alphaDrSurf[2]+0.5*G_1_Upwind[1]*alphaDrSurf[1]+0.5*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.447213595499958*G_1_Upwind[7]*alphaDrSurf[8]+0.447213595499958*alphaDrSurf[7]*G_1_Upwind[8]+0.5000000000000001*G_1_Upwind[5]*alphaDrSurf[7]+0.5000000000000001*alphaDrSurf[5]*G_1_Upwind[7]+0.447213595499958*G_1_Upwind[3]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[3]*G_1_Upwind[6]+0.4472135954999579*G_1_Upwind[1]*alphaDrSurf[4]+0.4472135954999579*alphaDrSurf[1]*G_1_Upwind[4]+0.5*G_1_Upwind[2]*alphaDrSurf[3]+0.5*alphaDrSurf[2]*G_1_Upwind[3]+0.5*G_1_Upwind[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.447213595499958*G_1_Upwind[6]*alphaDrSurf[8]+0.447213595499958*alphaDrSurf[6]*G_1_Upwind[8]+0.447213595499958*G_1_Upwind[3]*alphaDrSurf[7]+0.447213595499958*alphaDrSurf[3]*G_1_Upwind[7]+0.5000000000000001*G_1_Upwind[4]*alphaDrSurf[6]+0.5000000000000001*alphaDrSurf[4]*G_1_Upwind[6]+0.4472135954999579*G_1_Upwind[2]*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[2]*G_1_Upwind[5]+0.5*G_1_Upwind[1]*alphaDrSurf[3]+0.5*alphaDrSurf[1]*G_1_Upwind[3]+0.5*G_1_Upwind[0]*alphaDrSurf[2]+0.5*alphaDrSurf[0]*G_1_Upwind[2]; + Ghat_G_1[3] = 0.4*G_1_Upwind[3]*alphaDrSurf[8]+0.4*alphaDrSurf[3]*G_1_Upwind[8]+0.4*G_1_Upwind[6]*alphaDrSurf[7]+0.447213595499958*G_1_Upwind[2]*alphaDrSurf[7]+0.4*alphaDrSurf[6]*G_1_Upwind[7]+0.447213595499958*alphaDrSurf[2]*G_1_Upwind[7]+0.447213595499958*G_1_Upwind[1]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[1]*G_1_Upwind[6]+0.4472135954999579*G_1_Upwind[3]*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[3]*G_1_Upwind[5]+0.4472135954999579*G_1_Upwind[3]*alphaDrSurf[4]+0.4472135954999579*alphaDrSurf[3]*G_1_Upwind[4]+0.5*G_1_Upwind[0]*alphaDrSurf[3]+0.5*alphaDrSurf[0]*G_1_Upwind[3]+0.5*G_1_Upwind[1]*alphaDrSurf[2]+0.5*alphaDrSurf[1]*G_1_Upwind[2]; + Ghat_G_1[4] = 0.31943828249997*G_1_Upwind[8]*alphaDrSurf[8]+0.5*G_1_Upwind[5]*alphaDrSurf[8]+0.5*alphaDrSurf[5]*G_1_Upwind[8]+0.4472135954999579*G_1_Upwind[7]*alphaDrSurf[7]+0.31943828249997*G_1_Upwind[6]*alphaDrSurf[6]+0.5000000000000001*G_1_Upwind[2]*alphaDrSurf[6]+0.5000000000000001*alphaDrSurf[2]*G_1_Upwind[6]+0.31943828249997*G_1_Upwind[4]*alphaDrSurf[4]+0.5*G_1_Upwind[0]*alphaDrSurf[4]+0.5*alphaDrSurf[0]*G_1_Upwind[4]+0.4472135954999579*G_1_Upwind[3]*alphaDrSurf[3]+0.4472135954999579*G_1_Upwind[1]*alphaDrSurf[1]; + Ghat_G_1[5] = 0.31943828249997*G_1_Upwind[8]*alphaDrSurf[8]+0.5*G_1_Upwind[4]*alphaDrSurf[8]+0.5*alphaDrSurf[4]*G_1_Upwind[8]+0.31943828249997*G_1_Upwind[7]*alphaDrSurf[7]+0.5000000000000001*G_1_Upwind[1]*alphaDrSurf[7]+0.5000000000000001*alphaDrSurf[1]*G_1_Upwind[7]+0.4472135954999579*G_1_Upwind[6]*alphaDrSurf[6]+0.31943828249997*G_1_Upwind[5]*alphaDrSurf[5]+0.5*G_1_Upwind[0]*alphaDrSurf[5]+0.5*alphaDrSurf[0]*G_1_Upwind[5]+0.4472135954999579*G_1_Upwind[3]*alphaDrSurf[3]+0.4472135954999579*G_1_Upwind[2]*alphaDrSurf[2]; + Ghat_G_1[6] = 0.2857142857142857*G_1_Upwind[6]*alphaDrSurf[8]+0.447213595499958*G_1_Upwind[2]*alphaDrSurf[8]+0.2857142857142857*alphaDrSurf[6]*G_1_Upwind[8]+0.447213595499958*alphaDrSurf[2]*G_1_Upwind[8]+0.4*G_1_Upwind[3]*alphaDrSurf[7]+0.4*alphaDrSurf[3]*G_1_Upwind[7]+0.4472135954999579*G_1_Upwind[5]*alphaDrSurf[6]+0.31943828249997*G_1_Upwind[4]*alphaDrSurf[6]+0.5*G_1_Upwind[0]*alphaDrSurf[6]+0.4472135954999579*alphaDrSurf[5]*G_1_Upwind[6]+0.31943828249997*alphaDrSurf[4]*G_1_Upwind[6]+0.5*alphaDrSurf[0]*G_1_Upwind[6]+0.5000000000000001*G_1_Upwind[2]*alphaDrSurf[4]+0.5000000000000001*alphaDrSurf[2]*G_1_Upwind[4]+0.447213595499958*G_1_Upwind[1]*alphaDrSurf[3]+0.447213595499958*alphaDrSurf[1]*G_1_Upwind[3]; + Ghat_G_1[7] = 0.2857142857142857*G_1_Upwind[7]*alphaDrSurf[8]+0.447213595499958*G_1_Upwind[1]*alphaDrSurf[8]+0.2857142857142857*alphaDrSurf[7]*G_1_Upwind[8]+0.447213595499958*alphaDrSurf[1]*G_1_Upwind[8]+0.31943828249997*G_1_Upwind[5]*alphaDrSurf[7]+0.4472135954999579*G_1_Upwind[4]*alphaDrSurf[7]+0.5*G_1_Upwind[0]*alphaDrSurf[7]+0.31943828249997*alphaDrSurf[5]*G_1_Upwind[7]+0.4472135954999579*alphaDrSurf[4]*G_1_Upwind[7]+0.5*alphaDrSurf[0]*G_1_Upwind[7]+0.4*G_1_Upwind[3]*alphaDrSurf[6]+0.4*alphaDrSurf[3]*G_1_Upwind[6]+0.5000000000000001*G_1_Upwind[1]*alphaDrSurf[5]+0.5000000000000001*alphaDrSurf[1]*G_1_Upwind[5]+0.447213595499958*G_1_Upwind[2]*alphaDrSurf[3]+0.447213595499958*alphaDrSurf[2]*G_1_Upwind[3]; + Ghat_G_1[8] = 0.2040816326530612*G_1_Upwind[8]*alphaDrSurf[8]+0.31943828249997*G_1_Upwind[5]*alphaDrSurf[8]+0.31943828249997*G_1_Upwind[4]*alphaDrSurf[8]+0.5*G_1_Upwind[0]*alphaDrSurf[8]+0.31943828249997*alphaDrSurf[5]*G_1_Upwind[8]+0.31943828249997*alphaDrSurf[4]*G_1_Upwind[8]+0.5*alphaDrSurf[0]*G_1_Upwind[8]+0.2857142857142857*G_1_Upwind[7]*alphaDrSurf[7]+0.447213595499958*G_1_Upwind[1]*alphaDrSurf[7]+0.447213595499958*alphaDrSurf[1]*G_1_Upwind[7]+0.2857142857142857*G_1_Upwind[6]*alphaDrSurf[6]+0.447213595499958*G_1_Upwind[2]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[2]*G_1_Upwind[6]+0.5*G_1_Upwind[4]*alphaDrSurf[5]+0.5*alphaDrSurf[4]*G_1_Upwind[5]+0.4*G_1_Upwind[3]*alphaDrSurf[3]; out_F_0[0] += 0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += 0.7071067811865475*Ghat_F_0[1]*dv1par; @@ -107,34 +183,102 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_2x1v_tensor_p2(const do } else { - alphaDrSurf[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; - alphaDrSurf[3] = nu[3]*wvpar-0.5*nu[3]*dvpar; - alphaDrSurf[4] = nu[4]*wvpar-0.5*nu[4]*dvpar; - alphaDrSurf[5] = nu[5]*wvpar-0.5*nu[5]*dvpar; - alphaDrSurf[6] = nu[6]*wvpar-0.5*nu[6]*dvpar; - alphaDrSurf[7] = nu[7]*wvpar-0.5*nu[7]*dvpar; - alphaDrSurf[8] = nu[8]*wvpar-0.5*nu[8]*dvpar; - - Ghat_F_0[0] = 0.7905694150420947*alphaDrSurf[8]*F_0Skin[26]+0.7905694150420948*alphaDrSurf[7]*F_0Skin[25]+0.7905694150420948*alphaDrSurf[6]*F_0Skin[24]-0.6123724356957944*alphaDrSurf[8]*F_0Skin[23]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[22]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[21]+0.3535533905932737*alphaDrSurf[8]*F_0Skin[20]+0.7905694150420947*alphaDrSurf[3]*F_0Skin[19]-0.6123724356957944*alphaDrSurf[7]*F_0Skin[18]-0.6123724356957944*alphaDrSurf[6]*F_0Skin[17]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[16]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[15]-0.6123724356957944*alphaDrSurf[5]*F_0Skin[14]-0.6123724356957944*alphaDrSurf[4]*F_0Skin[13]+0.3535533905932737*alphaDrSurf[7]*F_0Skin[12]+0.3535533905932737*alphaDrSurf[6]*F_0Skin[11]-0.6123724356957944*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[9]+0.3535533905932737*alphaDrSurf[5]*F_0Skin[8]+0.3535533905932737*alphaDrSurf[4]*F_0Skin[7]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[6]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[3]*F_0Skin[4]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[3]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[2]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[1]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 0.7071067811865475*alphaDrSurf[7]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[8]*F_0Skin[25]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[24]-0.5477225575051661*alphaDrSurf[7]*F_0Skin[23]+0.7905694150420948*alphaDrSurf[7]*F_0Skin[22]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[21]+0.3162277660168379*alphaDrSurf[7]*F_0Skin[20]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[19]+0.7905694150420947*alphaDrSurf[2]*F_0Skin[19]-0.5477225575051661*alphaDrSurf[8]*F_0Skin[18]-0.6123724356957944*alphaDrSurf[5]*F_0Skin[18]-0.5477225575051661*alphaDrSurf[3]*F_0Skin[17]+0.7905694150420948*alphaDrSurf[3]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[4]*F_0Skin[15]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[15]-0.6123724356957944*alphaDrSurf[7]*F_0Skin[14]-0.5477225575051661*alphaDrSurf[1]*F_0Skin[13]+0.3162277660168379*alphaDrSurf[8]*F_0Skin[12]+0.3535533905932737*alphaDrSurf[5]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[11]-0.5477225575051661*alphaDrSurf[6]*F_0Skin[10]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[1]*F_0Skin[9]+0.3535533905932737*alphaDrSurf[7]*F_0Skin[8]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[7]+0.3162277660168379*F_0Skin[4]*alphaDrSurf[6]-0.6123724356957944*alphaDrSurf[3]*F_0Skin[6]-0.5477225575051661*alphaDrSurf[4]*F_0Skin[5]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[5]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[2]*F_0Skin[4]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[3]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 0.7071067811865475*alphaDrSurf[6]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[8]*F_0Skin[24]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[24]-0.5477225575051661*alphaDrSurf[6]*F_0Skin[23]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[22]+0.7905694150420948*alphaDrSurf[6]*F_0Skin[21]+0.3162277660168379*alphaDrSurf[6]*F_0Skin[20]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[19]+0.7905694150420947*alphaDrSurf[1]*F_0Skin[19]-0.5477225575051661*alphaDrSurf[3]*F_0Skin[18]-0.5477225575051661*alphaDrSurf[8]*F_0Skin[17]-0.6123724356957944*alphaDrSurf[4]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[5]*F_0Skin[16]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[16]+0.7905694150420948*alphaDrSurf[3]*F_0Skin[15]-0.5477225575051661*alphaDrSurf[2]*F_0Skin[14]-0.6123724356957944*alphaDrSurf[6]*F_0Skin[13]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[8]*F_0Skin[11]+0.3535533905932737*alphaDrSurf[4]*F_0Skin[11]-0.5477225575051661*alphaDrSurf[7]*F_0Skin[10]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[2]*F_0Skin[9]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[8]+0.3162277660168379*F_0Skin[4]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[6]*F_0Skin[7]-0.5477225575051661*alphaDrSurf[5]*F_0Skin[6]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[6]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[5]-0.6123724356957944*alphaDrSurf[3]*F_0Skin[5]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[4]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[3]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[2]; - Ghat_F_0[3] = 0.6324555320336759*alphaDrSurf[3]*F_0Skin[26]+0.632455532033676*alphaDrSurf[6]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[25]+0.632455532033676*alphaDrSurf[7]*F_0Skin[24]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[24]-0.4898979485566357*alphaDrSurf[3]*F_0Skin[23]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[22]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[21]+0.2828427124746191*alphaDrSurf[3]*F_0Skin[20]+0.6324555320336759*alphaDrSurf[8]*F_0Skin[19]+0.7071067811865475*alphaDrSurf[5]*F_0Skin[19]+0.7071067811865475*alphaDrSurf[4]*F_0Skin[19]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[19]-0.4898979485566356*alphaDrSurf[6]*F_0Skin[18]-0.5477225575051661*alphaDrSurf[2]*F_0Skin[18]-0.4898979485566356*alphaDrSurf[7]*F_0Skin[17]-0.5477225575051661*alphaDrSurf[1]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[16]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[15]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[15]-0.5477225575051661*alphaDrSurf[3]*F_0Skin[14]-0.5477225575051661*alphaDrSurf[3]*F_0Skin[13]+0.2828427124746191*alphaDrSurf[6]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[12]+0.2828427124746191*alphaDrSurf[7]*F_0Skin[11]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[11]-0.4898979485566357*alphaDrSurf[8]*F_0Skin[10]-0.5477225575051661*alphaDrSurf[5]*F_0Skin[10]-0.5477225575051661*alphaDrSurf[4]*F_0Skin[10]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[3]*F_0Skin[9]+0.2828427124746191*F_0Skin[4]*alphaDrSurf[8]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[8]-0.5477225575051661*F_0Skin[6]*alphaDrSurf[7]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[7]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[7]-0.5477225575051661*F_0Skin[5]*alphaDrSurf[6]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[6]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[6]+0.3162277660168379*F_0Skin[4]*alphaDrSurf[5]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[5]+0.3162277660168379*F_0Skin[4]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[4]-0.6123724356957944*F_0Skin[3]*alphaDrSurf[3]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[3]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[2]; - Ghat_F_0[4] = 0.5050762722761053*alphaDrSurf[8]*F_0Skin[26]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[25]+0.5050762722761054*alphaDrSurf[6]*F_0Skin[24]+0.7905694150420947*alphaDrSurf[2]*F_0Skin[24]-0.3912303982179757*alphaDrSurf[8]*F_0Skin[23]-0.6123724356957944*alphaDrSurf[5]*F_0Skin[23]+0.7905694150420947*alphaDrSurf[8]*F_0Skin[22]+0.5050762722761053*alphaDrSurf[4]*F_0Skin[21]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[21]+0.2258769757263128*alphaDrSurf[8]*F_0Skin[20]+0.3535533905932737*alphaDrSurf[5]*F_0Skin[20]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[19]-0.5477225575051661*alphaDrSurf[7]*F_0Skin[18]-0.3912303982179757*alphaDrSurf[6]*F_0Skin[17]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[17]+0.7905694150420947*alphaDrSurf[6]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[15]-0.6123724356957944*alphaDrSurf[8]*F_0Skin[14]-0.3912303982179757*alphaDrSurf[4]*F_0Skin[13]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[13]+0.3162277660168379*alphaDrSurf[7]*F_0Skin[12]+0.2258769757263128*alphaDrSurf[6]*F_0Skin[11]+0.3535533905932737*alphaDrSurf[2]*F_0Skin[11]-0.5477225575051661*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[9]+0.3535533905932737*F_0Skin[8]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[4]*F_0Skin[7]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[7]-0.6123724356957944*F_0Skin[6]*alphaDrSurf[6]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[6]-0.5477225575051661*alphaDrSurf[1]*F_0Skin[5]-0.6123724356957944*F_0Skin[3]*alphaDrSurf[4]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[4]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[4]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[1]; - Ghat_F_0[5] = 0.5050762722761053*alphaDrSurf[8]*F_0Skin[26]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[26]+0.5050762722761054*alphaDrSurf[7]*F_0Skin[25]+0.7905694150420947*alphaDrSurf[1]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[24]-0.3912303982179757*alphaDrSurf[8]*F_0Skin[23]-0.6123724356957944*alphaDrSurf[4]*F_0Skin[23]+0.5050762722761053*alphaDrSurf[5]*F_0Skin[22]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[22]+0.7905694150420947*alphaDrSurf[8]*F_0Skin[21]+0.2258769757263128*alphaDrSurf[8]*F_0Skin[20]+0.3535533905932737*alphaDrSurf[4]*F_0Skin[20]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[19]-0.3912303982179757*alphaDrSurf[7]*F_0Skin[18]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[18]-0.5477225575051661*alphaDrSurf[6]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[16]+0.7905694150420947*alphaDrSurf[7]*F_0Skin[15]-0.3912303982179757*alphaDrSurf[5]*F_0Skin[14]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[14]-0.6123724356957944*alphaDrSurf[8]*F_0Skin[13]+0.2258769757263128*alphaDrSurf[7]*F_0Skin[12]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[6]*F_0Skin[11]-0.5477225575051661*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[9]+0.3535533905932737*F_0Skin[7]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[5]*F_0Skin[8]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[8]-0.6123724356957944*F_0Skin[5]*alphaDrSurf[7]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[7]-0.5477225575051661*alphaDrSurf[2]*F_0Skin[6]-0.6123724356957944*F_0Skin[3]*alphaDrSurf[5]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[5]+0.3162277660168379*alphaDrSurf[3]*F_0Skin[4]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[2]; - Ghat_F_0[6] = 0.4517539514526256*alphaDrSurf[6]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[26]+0.632455532033676*alphaDrSurf[3]*F_0Skin[25]+0.4517539514526257*alphaDrSurf[8]*F_0Skin[24]+0.7071067811865475*alphaDrSurf[5]*F_0Skin[24]+0.5050762722761054*alphaDrSurf[4]*F_0Skin[24]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[24]-0.3499271061118826*alphaDrSurf[6]*F_0Skin[23]-0.5477225575051661*alphaDrSurf[2]*F_0Skin[23]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[22]+0.5050762722761053*alphaDrSurf[6]*F_0Skin[21]+0.7905694150420948*alphaDrSurf[2]*F_0Skin[21]+0.2020305089104422*alphaDrSurf[6]*F_0Skin[20]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[20]+0.6324555320336759*alphaDrSurf[7]*F_0Skin[19]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[19]-0.4898979485566356*alphaDrSurf[3]*F_0Skin[18]-0.3499271061118826*alphaDrSurf[8]*F_0Skin[17]-0.5477225575051661*alphaDrSurf[5]*F_0Skin[17]-0.3912303982179757*alphaDrSurf[4]*F_0Skin[17]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[8]*F_0Skin[16]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[15]-0.5477225575051661*alphaDrSurf[6]*F_0Skin[14]-0.3912303982179757*alphaDrSurf[6]*F_0Skin[13]-0.6123724356957944*alphaDrSurf[2]*F_0Skin[13]+0.2828427124746191*alphaDrSurf[3]*F_0Skin[12]+0.2020305089104422*alphaDrSurf[8]*F_0Skin[11]+0.3162277660168379*alphaDrSurf[5]*F_0Skin[11]+0.2258769757263128*alphaDrSurf[4]*F_0Skin[11]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[11]-0.4898979485566357*alphaDrSurf[7]*F_0Skin[10]-0.5477225575051661*alphaDrSurf[1]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[6]*F_0Skin[9]-0.5477225575051661*F_0Skin[6]*alphaDrSurf[8]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[8]+0.3162277660168379*alphaDrSurf[6]*F_0Skin[8]+0.2828427124746191*F_0Skin[4]*alphaDrSurf[7]+0.2258769757263128*alphaDrSurf[6]*F_0Skin[7]+0.3535533905932737*alphaDrSurf[2]*F_0Skin[7]-0.6123724356957944*F_0Skin[3]*alphaDrSurf[6]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[6]-0.6123724356957944*alphaDrSurf[4]*F_0Skin[6]-0.5477225575051661*alphaDrSurf[3]*F_0Skin[5]+0.3535533905932737*F_0Skin[2]*alphaDrSurf[4]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[4]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[3]; - Ghat_F_0[7] = 0.4517539514526256*alphaDrSurf[7]*F_0Skin[26]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[26]+0.4517539514526257*alphaDrSurf[8]*F_0Skin[25]+0.5050762722761054*alphaDrSurf[5]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[4]*F_0Skin[25]+0.7905694150420948*alphaDrSurf[0]*F_0Skin[25]+0.632455532033676*alphaDrSurf[3]*F_0Skin[24]-0.3499271061118826*alphaDrSurf[7]*F_0Skin[23]-0.5477225575051661*alphaDrSurf[1]*F_0Skin[23]+0.5050762722761053*alphaDrSurf[7]*F_0Skin[22]+0.7905694150420948*alphaDrSurf[1]*F_0Skin[22]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[21]+0.2020305089104422*alphaDrSurf[7]*F_0Skin[20]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[20]+0.6324555320336759*alphaDrSurf[6]*F_0Skin[19]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[19]-0.3499271061118826*alphaDrSurf[8]*F_0Skin[18]-0.3912303982179757*alphaDrSurf[5]*F_0Skin[18]-0.5477225575051661*alphaDrSurf[4]*F_0Skin[18]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[18]-0.4898979485566356*alphaDrSurf[3]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[3]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[8]*F_0Skin[15]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[15]-0.3912303982179757*alphaDrSurf[7]*F_0Skin[14]-0.6123724356957944*alphaDrSurf[1]*F_0Skin[14]-0.5477225575051661*alphaDrSurf[7]*F_0Skin[13]+0.2020305089104422*alphaDrSurf[8]*F_0Skin[12]+0.2258769757263128*alphaDrSurf[5]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[4]*F_0Skin[12]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[12]+0.2828427124746191*alphaDrSurf[3]*F_0Skin[11]-0.4898979485566357*alphaDrSurf[6]*F_0Skin[10]-0.5477225575051661*alphaDrSurf[2]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[7]*F_0Skin[9]-0.5477225575051661*F_0Skin[5]*alphaDrSurf[8]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[7]*F_0Skin[8]+0.3535533905932737*alphaDrSurf[1]*F_0Skin[8]+0.3162277660168379*F_0Skin[7]*alphaDrSurf[7]-0.6123724356957944*F_0Skin[3]*alphaDrSurf[7]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[7]+0.2828427124746191*F_0Skin[4]*alphaDrSurf[6]-0.5477225575051661*alphaDrSurf[3]*F_0Skin[6]-0.6123724356957944*F_0Skin[5]*alphaDrSurf[5]+0.3535533905932737*F_0Skin[1]*alphaDrSurf[5]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[4]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[3]; - Ghat_F_0[8] = 0.3226813938947327*alphaDrSurf[8]*F_0Skin[26]+0.5050762722761053*alphaDrSurf[5]*F_0Skin[26]+0.5050762722761053*alphaDrSurf[4]*F_0Skin[26]+0.7905694150420947*alphaDrSurf[0]*F_0Skin[26]+0.4517539514526257*alphaDrSurf[7]*F_0Skin[25]+0.7071067811865475*alphaDrSurf[1]*F_0Skin[25]+0.4517539514526257*alphaDrSurf[6]*F_0Skin[24]+0.7071067811865475*alphaDrSurf[2]*F_0Skin[24]-0.249947932937059*alphaDrSurf[8]*F_0Skin[23]-0.3912303982179757*alphaDrSurf[5]*F_0Skin[23]-0.3912303982179757*alphaDrSurf[4]*F_0Skin[23]-0.6123724356957944*alphaDrSurf[0]*F_0Skin[23]+0.5050762722761053*alphaDrSurf[8]*F_0Skin[22]+0.7905694150420947*alphaDrSurf[4]*F_0Skin[22]+0.5050762722761053*alphaDrSurf[8]*F_0Skin[21]+0.7905694150420947*alphaDrSurf[5]*F_0Skin[21]+0.1443075063646015*alphaDrSurf[8]*F_0Skin[20]+0.2258769757263128*alphaDrSurf[5]*F_0Skin[20]+0.2258769757263128*alphaDrSurf[4]*F_0Skin[20]+0.3535533905932737*alphaDrSurf[0]*F_0Skin[20]+0.6324555320336759*alphaDrSurf[3]*F_0Skin[19]-0.3499271061118826*alphaDrSurf[7]*F_0Skin[18]-0.5477225575051661*alphaDrSurf[1]*F_0Skin[18]-0.3499271061118826*alphaDrSurf[6]*F_0Skin[17]-0.5477225575051661*alphaDrSurf[2]*F_0Skin[17]+0.7071067811865475*alphaDrSurf[6]*F_0Skin[16]+0.7071067811865475*alphaDrSurf[7]*F_0Skin[15]-0.3912303982179757*alphaDrSurf[8]*F_0Skin[14]-0.6123724356957944*alphaDrSurf[4]*F_0Skin[14]-0.3912303982179757*alphaDrSurf[8]*F_0Skin[13]-0.6123724356957944*alphaDrSurf[5]*F_0Skin[13]+0.2020305089104422*alphaDrSurf[7]*F_0Skin[12]+0.3162277660168379*alphaDrSurf[1]*F_0Skin[12]+0.2020305089104422*alphaDrSurf[6]*F_0Skin[11]+0.3162277660168379*alphaDrSurf[2]*F_0Skin[11]-0.4898979485566357*alphaDrSurf[3]*F_0Skin[10]+0.7905694150420947*alphaDrSurf[8]*F_0Skin[9]+0.2258769757263128*F_0Skin[8]*alphaDrSurf[8]+0.2258769757263128*F_0Skin[7]*alphaDrSurf[8]-0.6123724356957944*F_0Skin[3]*alphaDrSurf[8]+0.3535533905932737*F_0Skin[0]*alphaDrSurf[8]+0.3535533905932737*alphaDrSurf[4]*F_0Skin[8]-0.5477225575051661*F_0Skin[5]*alphaDrSurf[7]+0.3162277660168379*F_0Skin[1]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[5]*F_0Skin[7]-0.5477225575051661*F_0Skin[6]*alphaDrSurf[6]+0.3162277660168379*F_0Skin[2]*alphaDrSurf[6]+0.2828427124746191*alphaDrSurf[3]*F_0Skin[4]; - Ghat_G_1[0] = 0.7905694150420947*alphaDrSurf[8]*G_1Skin[26]+0.7905694150420948*alphaDrSurf[7]*G_1Skin[25]+0.7905694150420948*alphaDrSurf[6]*G_1Skin[24]-0.6123724356957944*alphaDrSurf[8]*G_1Skin[23]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[22]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[21]+0.3535533905932737*alphaDrSurf[8]*G_1Skin[20]+0.7905694150420947*alphaDrSurf[3]*G_1Skin[19]-0.6123724356957944*alphaDrSurf[7]*G_1Skin[18]-0.6123724356957944*alphaDrSurf[6]*G_1Skin[17]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[16]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[15]-0.6123724356957944*alphaDrSurf[5]*G_1Skin[14]-0.6123724356957944*alphaDrSurf[4]*G_1Skin[13]+0.3535533905932737*alphaDrSurf[7]*G_1Skin[12]+0.3535533905932737*alphaDrSurf[6]*G_1Skin[11]-0.6123724356957944*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[9]+0.3535533905932737*alphaDrSurf[5]*G_1Skin[8]+0.3535533905932737*alphaDrSurf[4]*G_1Skin[7]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[6]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[3]*G_1Skin[4]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[3]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[2]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[1]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 0.7071067811865475*alphaDrSurf[7]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[8]*G_1Skin[25]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[24]-0.5477225575051661*alphaDrSurf[7]*G_1Skin[23]+0.7905694150420948*alphaDrSurf[7]*G_1Skin[22]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[21]+0.3162277660168379*alphaDrSurf[7]*G_1Skin[20]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[19]+0.7905694150420947*alphaDrSurf[2]*G_1Skin[19]-0.5477225575051661*alphaDrSurf[8]*G_1Skin[18]-0.6123724356957944*alphaDrSurf[5]*G_1Skin[18]-0.5477225575051661*alphaDrSurf[3]*G_1Skin[17]+0.7905694150420948*alphaDrSurf[3]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[4]*G_1Skin[15]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[15]-0.6123724356957944*alphaDrSurf[7]*G_1Skin[14]-0.5477225575051661*alphaDrSurf[1]*G_1Skin[13]+0.3162277660168379*alphaDrSurf[8]*G_1Skin[12]+0.3535533905932737*alphaDrSurf[5]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[11]-0.5477225575051661*alphaDrSurf[6]*G_1Skin[10]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[1]*G_1Skin[9]+0.3535533905932737*alphaDrSurf[7]*G_1Skin[8]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[7]+0.3162277660168379*G_1Skin[4]*alphaDrSurf[6]-0.6123724356957944*alphaDrSurf[3]*G_1Skin[6]-0.5477225575051661*alphaDrSurf[4]*G_1Skin[5]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[5]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[2]*G_1Skin[4]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[3]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 0.7071067811865475*alphaDrSurf[6]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[8]*G_1Skin[24]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[24]-0.5477225575051661*alphaDrSurf[6]*G_1Skin[23]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[22]+0.7905694150420948*alphaDrSurf[6]*G_1Skin[21]+0.3162277660168379*alphaDrSurf[6]*G_1Skin[20]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[19]+0.7905694150420947*alphaDrSurf[1]*G_1Skin[19]-0.5477225575051661*alphaDrSurf[3]*G_1Skin[18]-0.5477225575051661*alphaDrSurf[8]*G_1Skin[17]-0.6123724356957944*alphaDrSurf[4]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[5]*G_1Skin[16]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[16]+0.7905694150420948*alphaDrSurf[3]*G_1Skin[15]-0.5477225575051661*alphaDrSurf[2]*G_1Skin[14]-0.6123724356957944*alphaDrSurf[6]*G_1Skin[13]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[8]*G_1Skin[11]+0.3535533905932737*alphaDrSurf[4]*G_1Skin[11]-0.5477225575051661*alphaDrSurf[7]*G_1Skin[10]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[2]*G_1Skin[9]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[8]+0.3162277660168379*G_1Skin[4]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[6]*G_1Skin[7]-0.5477225575051661*alphaDrSurf[5]*G_1Skin[6]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[6]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[5]-0.6123724356957944*alphaDrSurf[3]*G_1Skin[5]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[4]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[3]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[2]; - Ghat_G_1[3] = 0.6324555320336759*alphaDrSurf[3]*G_1Skin[26]+0.632455532033676*alphaDrSurf[6]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[25]+0.632455532033676*alphaDrSurf[7]*G_1Skin[24]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[24]-0.4898979485566357*alphaDrSurf[3]*G_1Skin[23]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[22]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[21]+0.2828427124746191*alphaDrSurf[3]*G_1Skin[20]+0.6324555320336759*alphaDrSurf[8]*G_1Skin[19]+0.7071067811865475*alphaDrSurf[5]*G_1Skin[19]+0.7071067811865475*alphaDrSurf[4]*G_1Skin[19]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[19]-0.4898979485566356*alphaDrSurf[6]*G_1Skin[18]-0.5477225575051661*alphaDrSurf[2]*G_1Skin[18]-0.4898979485566356*alphaDrSurf[7]*G_1Skin[17]-0.5477225575051661*alphaDrSurf[1]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[16]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[15]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[15]-0.5477225575051661*alphaDrSurf[3]*G_1Skin[14]-0.5477225575051661*alphaDrSurf[3]*G_1Skin[13]+0.2828427124746191*alphaDrSurf[6]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[12]+0.2828427124746191*alphaDrSurf[7]*G_1Skin[11]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[11]-0.4898979485566357*alphaDrSurf[8]*G_1Skin[10]-0.5477225575051661*alphaDrSurf[5]*G_1Skin[10]-0.5477225575051661*alphaDrSurf[4]*G_1Skin[10]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[3]*G_1Skin[9]+0.2828427124746191*G_1Skin[4]*alphaDrSurf[8]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[8]-0.5477225575051661*G_1Skin[6]*alphaDrSurf[7]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[7]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[7]-0.5477225575051661*G_1Skin[5]*alphaDrSurf[6]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[6]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[6]+0.3162277660168379*G_1Skin[4]*alphaDrSurf[5]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[5]+0.3162277660168379*G_1Skin[4]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[4]-0.6123724356957944*G_1Skin[3]*alphaDrSurf[3]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[3]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[2]; - Ghat_G_1[4] = 0.5050762722761053*alphaDrSurf[8]*G_1Skin[26]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[25]+0.5050762722761054*alphaDrSurf[6]*G_1Skin[24]+0.7905694150420947*alphaDrSurf[2]*G_1Skin[24]-0.3912303982179757*alphaDrSurf[8]*G_1Skin[23]-0.6123724356957944*alphaDrSurf[5]*G_1Skin[23]+0.7905694150420947*alphaDrSurf[8]*G_1Skin[22]+0.5050762722761053*alphaDrSurf[4]*G_1Skin[21]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[21]+0.2258769757263128*alphaDrSurf[8]*G_1Skin[20]+0.3535533905932737*alphaDrSurf[5]*G_1Skin[20]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[19]-0.5477225575051661*alphaDrSurf[7]*G_1Skin[18]-0.3912303982179757*alphaDrSurf[6]*G_1Skin[17]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[17]+0.7905694150420947*alphaDrSurf[6]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[15]-0.6123724356957944*alphaDrSurf[8]*G_1Skin[14]-0.3912303982179757*alphaDrSurf[4]*G_1Skin[13]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[13]+0.3162277660168379*alphaDrSurf[7]*G_1Skin[12]+0.2258769757263128*alphaDrSurf[6]*G_1Skin[11]+0.3535533905932737*alphaDrSurf[2]*G_1Skin[11]-0.5477225575051661*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[9]+0.3535533905932737*G_1Skin[8]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[4]*G_1Skin[7]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[7]-0.6123724356957944*G_1Skin[6]*alphaDrSurf[6]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[6]-0.5477225575051661*alphaDrSurf[1]*G_1Skin[5]-0.6123724356957944*G_1Skin[3]*alphaDrSurf[4]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[4]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[4]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[1]; - Ghat_G_1[5] = 0.5050762722761053*alphaDrSurf[8]*G_1Skin[26]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[26]+0.5050762722761054*alphaDrSurf[7]*G_1Skin[25]+0.7905694150420947*alphaDrSurf[1]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[24]-0.3912303982179757*alphaDrSurf[8]*G_1Skin[23]-0.6123724356957944*alphaDrSurf[4]*G_1Skin[23]+0.5050762722761053*alphaDrSurf[5]*G_1Skin[22]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[22]+0.7905694150420947*alphaDrSurf[8]*G_1Skin[21]+0.2258769757263128*alphaDrSurf[8]*G_1Skin[20]+0.3535533905932737*alphaDrSurf[4]*G_1Skin[20]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[19]-0.3912303982179757*alphaDrSurf[7]*G_1Skin[18]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[18]-0.5477225575051661*alphaDrSurf[6]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[16]+0.7905694150420947*alphaDrSurf[7]*G_1Skin[15]-0.3912303982179757*alphaDrSurf[5]*G_1Skin[14]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[14]-0.6123724356957944*alphaDrSurf[8]*G_1Skin[13]+0.2258769757263128*alphaDrSurf[7]*G_1Skin[12]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[6]*G_1Skin[11]-0.5477225575051661*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[9]+0.3535533905932737*G_1Skin[7]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[5]*G_1Skin[8]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[8]-0.6123724356957944*G_1Skin[5]*alphaDrSurf[7]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[7]-0.5477225575051661*alphaDrSurf[2]*G_1Skin[6]-0.6123724356957944*G_1Skin[3]*alphaDrSurf[5]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[5]+0.3162277660168379*alphaDrSurf[3]*G_1Skin[4]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[2]; - Ghat_G_1[6] = 0.4517539514526256*alphaDrSurf[6]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[26]+0.632455532033676*alphaDrSurf[3]*G_1Skin[25]+0.4517539514526257*alphaDrSurf[8]*G_1Skin[24]+0.7071067811865475*alphaDrSurf[5]*G_1Skin[24]+0.5050762722761054*alphaDrSurf[4]*G_1Skin[24]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[24]-0.3499271061118826*alphaDrSurf[6]*G_1Skin[23]-0.5477225575051661*alphaDrSurf[2]*G_1Skin[23]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[22]+0.5050762722761053*alphaDrSurf[6]*G_1Skin[21]+0.7905694150420948*alphaDrSurf[2]*G_1Skin[21]+0.2020305089104422*alphaDrSurf[6]*G_1Skin[20]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[20]+0.6324555320336759*alphaDrSurf[7]*G_1Skin[19]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[19]-0.4898979485566356*alphaDrSurf[3]*G_1Skin[18]-0.3499271061118826*alphaDrSurf[8]*G_1Skin[17]-0.5477225575051661*alphaDrSurf[5]*G_1Skin[17]-0.3912303982179757*alphaDrSurf[4]*G_1Skin[17]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[8]*G_1Skin[16]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[15]-0.5477225575051661*alphaDrSurf[6]*G_1Skin[14]-0.3912303982179757*alphaDrSurf[6]*G_1Skin[13]-0.6123724356957944*alphaDrSurf[2]*G_1Skin[13]+0.2828427124746191*alphaDrSurf[3]*G_1Skin[12]+0.2020305089104422*alphaDrSurf[8]*G_1Skin[11]+0.3162277660168379*alphaDrSurf[5]*G_1Skin[11]+0.2258769757263128*alphaDrSurf[4]*G_1Skin[11]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[11]-0.4898979485566357*alphaDrSurf[7]*G_1Skin[10]-0.5477225575051661*alphaDrSurf[1]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[6]*G_1Skin[9]-0.5477225575051661*G_1Skin[6]*alphaDrSurf[8]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[8]+0.3162277660168379*alphaDrSurf[6]*G_1Skin[8]+0.2828427124746191*G_1Skin[4]*alphaDrSurf[7]+0.2258769757263128*alphaDrSurf[6]*G_1Skin[7]+0.3535533905932737*alphaDrSurf[2]*G_1Skin[7]-0.6123724356957944*G_1Skin[3]*alphaDrSurf[6]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[6]-0.6123724356957944*alphaDrSurf[4]*G_1Skin[6]-0.5477225575051661*alphaDrSurf[3]*G_1Skin[5]+0.3535533905932737*G_1Skin[2]*alphaDrSurf[4]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[4]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[3]; - Ghat_G_1[7] = 0.4517539514526256*alphaDrSurf[7]*G_1Skin[26]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[26]+0.4517539514526257*alphaDrSurf[8]*G_1Skin[25]+0.5050762722761054*alphaDrSurf[5]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[4]*G_1Skin[25]+0.7905694150420948*alphaDrSurf[0]*G_1Skin[25]+0.632455532033676*alphaDrSurf[3]*G_1Skin[24]-0.3499271061118826*alphaDrSurf[7]*G_1Skin[23]-0.5477225575051661*alphaDrSurf[1]*G_1Skin[23]+0.5050762722761053*alphaDrSurf[7]*G_1Skin[22]+0.7905694150420948*alphaDrSurf[1]*G_1Skin[22]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[21]+0.2020305089104422*alphaDrSurf[7]*G_1Skin[20]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[20]+0.6324555320336759*alphaDrSurf[6]*G_1Skin[19]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[19]-0.3499271061118826*alphaDrSurf[8]*G_1Skin[18]-0.3912303982179757*alphaDrSurf[5]*G_1Skin[18]-0.5477225575051661*alphaDrSurf[4]*G_1Skin[18]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[18]-0.4898979485566356*alphaDrSurf[3]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[3]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[8]*G_1Skin[15]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[15]-0.3912303982179757*alphaDrSurf[7]*G_1Skin[14]-0.6123724356957944*alphaDrSurf[1]*G_1Skin[14]-0.5477225575051661*alphaDrSurf[7]*G_1Skin[13]+0.2020305089104422*alphaDrSurf[8]*G_1Skin[12]+0.2258769757263128*alphaDrSurf[5]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[4]*G_1Skin[12]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[12]+0.2828427124746191*alphaDrSurf[3]*G_1Skin[11]-0.4898979485566357*alphaDrSurf[6]*G_1Skin[10]-0.5477225575051661*alphaDrSurf[2]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[7]*G_1Skin[9]-0.5477225575051661*G_1Skin[5]*alphaDrSurf[8]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[8]+0.2258769757263128*alphaDrSurf[7]*G_1Skin[8]+0.3535533905932737*alphaDrSurf[1]*G_1Skin[8]+0.3162277660168379*G_1Skin[7]*alphaDrSurf[7]-0.6123724356957944*G_1Skin[3]*alphaDrSurf[7]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[7]+0.2828427124746191*G_1Skin[4]*alphaDrSurf[6]-0.5477225575051661*alphaDrSurf[3]*G_1Skin[6]-0.6123724356957944*G_1Skin[5]*alphaDrSurf[5]+0.3535533905932737*G_1Skin[1]*alphaDrSurf[5]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[4]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[3]; - Ghat_G_1[8] = 0.3226813938947327*alphaDrSurf[8]*G_1Skin[26]+0.5050762722761053*alphaDrSurf[5]*G_1Skin[26]+0.5050762722761053*alphaDrSurf[4]*G_1Skin[26]+0.7905694150420947*alphaDrSurf[0]*G_1Skin[26]+0.4517539514526257*alphaDrSurf[7]*G_1Skin[25]+0.7071067811865475*alphaDrSurf[1]*G_1Skin[25]+0.4517539514526257*alphaDrSurf[6]*G_1Skin[24]+0.7071067811865475*alphaDrSurf[2]*G_1Skin[24]-0.249947932937059*alphaDrSurf[8]*G_1Skin[23]-0.3912303982179757*alphaDrSurf[5]*G_1Skin[23]-0.3912303982179757*alphaDrSurf[4]*G_1Skin[23]-0.6123724356957944*alphaDrSurf[0]*G_1Skin[23]+0.5050762722761053*alphaDrSurf[8]*G_1Skin[22]+0.7905694150420947*alphaDrSurf[4]*G_1Skin[22]+0.5050762722761053*alphaDrSurf[8]*G_1Skin[21]+0.7905694150420947*alphaDrSurf[5]*G_1Skin[21]+0.1443075063646015*alphaDrSurf[8]*G_1Skin[20]+0.2258769757263128*alphaDrSurf[5]*G_1Skin[20]+0.2258769757263128*alphaDrSurf[4]*G_1Skin[20]+0.3535533905932737*alphaDrSurf[0]*G_1Skin[20]+0.6324555320336759*alphaDrSurf[3]*G_1Skin[19]-0.3499271061118826*alphaDrSurf[7]*G_1Skin[18]-0.5477225575051661*alphaDrSurf[1]*G_1Skin[18]-0.3499271061118826*alphaDrSurf[6]*G_1Skin[17]-0.5477225575051661*alphaDrSurf[2]*G_1Skin[17]+0.7071067811865475*alphaDrSurf[6]*G_1Skin[16]+0.7071067811865475*alphaDrSurf[7]*G_1Skin[15]-0.3912303982179757*alphaDrSurf[8]*G_1Skin[14]-0.6123724356957944*alphaDrSurf[4]*G_1Skin[14]-0.3912303982179757*alphaDrSurf[8]*G_1Skin[13]-0.6123724356957944*alphaDrSurf[5]*G_1Skin[13]+0.2020305089104422*alphaDrSurf[7]*G_1Skin[12]+0.3162277660168379*alphaDrSurf[1]*G_1Skin[12]+0.2020305089104422*alphaDrSurf[6]*G_1Skin[11]+0.3162277660168379*alphaDrSurf[2]*G_1Skin[11]-0.4898979485566357*alphaDrSurf[3]*G_1Skin[10]+0.7905694150420947*alphaDrSurf[8]*G_1Skin[9]+0.2258769757263128*G_1Skin[8]*alphaDrSurf[8]+0.2258769757263128*G_1Skin[7]*alphaDrSurf[8]-0.6123724356957944*G_1Skin[3]*alphaDrSurf[8]+0.3535533905932737*G_1Skin[0]*alphaDrSurf[8]+0.3535533905932737*alphaDrSurf[4]*G_1Skin[8]-0.5477225575051661*G_1Skin[5]*alphaDrSurf[7]+0.3162277660168379*G_1Skin[1]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[5]*G_1Skin[7]-0.5477225575051661*G_1Skin[6]*alphaDrSurf[6]+0.3162277660168379*G_1Skin[2]*alphaDrSurf[6]+0.2828427124746191*alphaDrSurf[3]*G_1Skin[4]; + alphaDrSurf[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf[3] = nuSum[3]*wvpar-0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; + alphaDrSurf[4] = nuSum[4]*wvpar-0.5*nuSum[4]*dvpar-1.0*sumNuUPar[4]; + alphaDrSurf[5] = nuSum[5]*wvpar-0.5*nuSum[5]*dvpar-1.0*sumNuUPar[5]; + alphaDrSurf[6] = nuSum[6]*wvpar-0.5*nuSum[6]*dvpar-1.0*sumNuUPar[6]; + alphaDrSurf[7] = nuSum[7]*wvpar-0.5*nuSum[7]*dvpar-1.0*sumNuUPar[7]; + alphaDrSurf[8] = nuSum[8]*wvpar-0.5*nuSum[8]*dvpar-1.0*sumNuUPar[8]; + + if (0.4*alphaDrSurf[8]-0.5999999999999995*alphaDrSurf[7]-0.5999999999999999*alphaDrSurf[6]+0.4472135954999579*(alphaDrSurf[5]+alphaDrSurf[4])+0.9*alphaDrSurf[3]-0.6708203932499369*(alphaDrSurf[2]+alphaDrSurf[1])+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = tensor_3x_p2_surfx3_eval_quad_node_0_r(F_0Edge); + G_1_UpwindQuad[0] = tensor_3x_p2_surfx3_eval_quad_node_0_r(G_1Edge); + } else { + F_0_UpwindQuad[0] = tensor_3x_p2_surfx3_eval_quad_node_0_l(F_0Skin); + G_1_UpwindQuad[0] = tensor_3x_p2_surfx3_eval_quad_node_0_l(G_1Skin); + } + if ((-0.5*alphaDrSurf[8])+0.75*alphaDrSurf[7]-0.5590169943749475*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[4]-0.6708203932499369*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[1] = tensor_3x_p2_surfx3_eval_quad_node_1_r(F_0Edge); + G_1_UpwindQuad[1] = tensor_3x_p2_surfx3_eval_quad_node_1_r(G_1Edge); + } else { + F_0_UpwindQuad[1] = tensor_3x_p2_surfx3_eval_quad_node_1_l(F_0Skin); + G_1_UpwindQuad[1] = tensor_3x_p2_surfx3_eval_quad_node_1_l(G_1Skin); + } + if (0.4*alphaDrSurf[8]-0.5999999999999995*alphaDrSurf[7]+0.5999999999999999*alphaDrSurf[6]+0.4472135954999579*(alphaDrSurf[5]+alphaDrSurf[4])-0.9*alphaDrSurf[3]+0.6708203932499369*alphaDrSurf[2]-0.6708203932499369*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[2] = tensor_3x_p2_surfx3_eval_quad_node_2_r(F_0Edge); + G_1_UpwindQuad[2] = tensor_3x_p2_surfx3_eval_quad_node_2_r(G_1Edge); + } else { + F_0_UpwindQuad[2] = tensor_3x_p2_surfx3_eval_quad_node_2_l(F_0Skin); + G_1_UpwindQuad[2] = tensor_3x_p2_surfx3_eval_quad_node_2_l(G_1Skin); + } + if ((-0.5*alphaDrSurf[8])+0.75*alphaDrSurf[6]+0.4472135954999579*alphaDrSurf[5]-0.5590169943749475*alphaDrSurf[4]-0.6708203932499369*alphaDrSurf[2]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[3] = tensor_3x_p2_surfx3_eval_quad_node_3_r(F_0Edge); + G_1_UpwindQuad[3] = tensor_3x_p2_surfx3_eval_quad_node_3_r(G_1Edge); + } else { + F_0_UpwindQuad[3] = tensor_3x_p2_surfx3_eval_quad_node_3_l(F_0Skin); + G_1_UpwindQuad[3] = tensor_3x_p2_surfx3_eval_quad_node_3_l(G_1Skin); + } + if (0.625*alphaDrSurf[8]-0.5590169943749475*(alphaDrSurf[5]+alphaDrSurf[4])+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[4] = tensor_3x_p2_surfx3_eval_quad_node_4_r(F_0Edge); + G_1_UpwindQuad[4] = tensor_3x_p2_surfx3_eval_quad_node_4_r(G_1Edge); + } else { + F_0_UpwindQuad[4] = tensor_3x_p2_surfx3_eval_quad_node_4_l(F_0Skin); + G_1_UpwindQuad[4] = tensor_3x_p2_surfx3_eval_quad_node_4_l(G_1Skin); + } + if ((-0.5*alphaDrSurf[8])-0.75*alphaDrSurf[6]+0.4472135954999579*alphaDrSurf[5]-0.5590169943749475*alphaDrSurf[4]+0.6708203932499369*alphaDrSurf[2]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[5] = tensor_3x_p2_surfx3_eval_quad_node_5_r(F_0Edge); + G_1_UpwindQuad[5] = tensor_3x_p2_surfx3_eval_quad_node_5_r(G_1Edge); + } else { + F_0_UpwindQuad[5] = tensor_3x_p2_surfx3_eval_quad_node_5_l(F_0Skin); + G_1_UpwindQuad[5] = tensor_3x_p2_surfx3_eval_quad_node_5_l(G_1Skin); + } + if (0.4*alphaDrSurf[8]+0.5999999999999995*alphaDrSurf[7]-0.5999999999999999*alphaDrSurf[6]+0.4472135954999579*(alphaDrSurf[5]+alphaDrSurf[4])-0.9*alphaDrSurf[3]-0.6708203932499369*alphaDrSurf[2]+0.6708203932499369*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[6] = tensor_3x_p2_surfx3_eval_quad_node_6_r(F_0Edge); + G_1_UpwindQuad[6] = tensor_3x_p2_surfx3_eval_quad_node_6_r(G_1Edge); + } else { + F_0_UpwindQuad[6] = tensor_3x_p2_surfx3_eval_quad_node_6_l(F_0Skin); + G_1_UpwindQuad[6] = tensor_3x_p2_surfx3_eval_quad_node_6_l(G_1Skin); + } + if ((-0.5*alphaDrSurf[8])-0.75*alphaDrSurf[7]-0.5590169943749475*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[4]+0.6708203932499369*alphaDrSurf[1]+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[7] = tensor_3x_p2_surfx3_eval_quad_node_7_r(F_0Edge); + G_1_UpwindQuad[7] = tensor_3x_p2_surfx3_eval_quad_node_7_r(G_1Edge); + } else { + F_0_UpwindQuad[7] = tensor_3x_p2_surfx3_eval_quad_node_7_l(F_0Skin); + G_1_UpwindQuad[7] = tensor_3x_p2_surfx3_eval_quad_node_7_l(G_1Skin); + } + if (0.4*alphaDrSurf[8]+0.5999999999999995*alphaDrSurf[7]+0.5999999999999999*alphaDrSurf[6]+0.4472135954999579*(alphaDrSurf[5]+alphaDrSurf[4])+0.9*alphaDrSurf[3]+0.6708203932499369*(alphaDrSurf[2]+alphaDrSurf[1])+0.5*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[8] = tensor_3x_p2_surfx3_eval_quad_node_8_r(F_0Edge); + G_1_UpwindQuad[8] = tensor_3x_p2_surfx3_eval_quad_node_8_r(G_1Edge); + } else { + F_0_UpwindQuad[8] = tensor_3x_p2_surfx3_eval_quad_node_8_l(F_0Skin); + G_1_UpwindQuad[8] = tensor_3x_p2_surfx3_eval_quad_node_8_l(G_1Skin); + } + + // Project tensor nodal quadrature basis back onto modal basis. + tensor_3x_p2_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + tensor_3x_p2_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); + + Ghat_F_0[0] = 0.5*F_0_Upwind[8]*alphaDrSurf[8]+0.5*F_0_Upwind[7]*alphaDrSurf[7]+0.5*F_0_Upwind[6]*alphaDrSurf[6]+0.5*F_0_Upwind[5]*alphaDrSurf[5]+0.5*F_0_Upwind[4]*alphaDrSurf[4]+0.5*F_0_Upwind[3]*alphaDrSurf[3]+0.5*F_0_Upwind[2]*alphaDrSurf[2]+0.5*F_0_Upwind[1]*alphaDrSurf[1]+0.5*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.447213595499958*F_0_Upwind[7]*alphaDrSurf[8]+0.447213595499958*alphaDrSurf[7]*F_0_Upwind[8]+0.5000000000000001*F_0_Upwind[5]*alphaDrSurf[7]+0.5000000000000001*alphaDrSurf[5]*F_0_Upwind[7]+0.447213595499958*F_0_Upwind[3]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[3]*F_0_Upwind[6]+0.4472135954999579*F_0_Upwind[1]*alphaDrSurf[4]+0.4472135954999579*alphaDrSurf[1]*F_0_Upwind[4]+0.5*F_0_Upwind[2]*alphaDrSurf[3]+0.5*alphaDrSurf[2]*F_0_Upwind[3]+0.5*F_0_Upwind[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.447213595499958*F_0_Upwind[6]*alphaDrSurf[8]+0.447213595499958*alphaDrSurf[6]*F_0_Upwind[8]+0.447213595499958*F_0_Upwind[3]*alphaDrSurf[7]+0.447213595499958*alphaDrSurf[3]*F_0_Upwind[7]+0.5000000000000001*F_0_Upwind[4]*alphaDrSurf[6]+0.5000000000000001*alphaDrSurf[4]*F_0_Upwind[6]+0.4472135954999579*F_0_Upwind[2]*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[2]*F_0_Upwind[5]+0.5*F_0_Upwind[1]*alphaDrSurf[3]+0.5*alphaDrSurf[1]*F_0_Upwind[3]+0.5*F_0_Upwind[0]*alphaDrSurf[2]+0.5*alphaDrSurf[0]*F_0_Upwind[2]; + Ghat_F_0[3] = 0.4*F_0_Upwind[3]*alphaDrSurf[8]+0.4*alphaDrSurf[3]*F_0_Upwind[8]+0.4*F_0_Upwind[6]*alphaDrSurf[7]+0.447213595499958*F_0_Upwind[2]*alphaDrSurf[7]+0.4*alphaDrSurf[6]*F_0_Upwind[7]+0.447213595499958*alphaDrSurf[2]*F_0_Upwind[7]+0.447213595499958*F_0_Upwind[1]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[1]*F_0_Upwind[6]+0.4472135954999579*F_0_Upwind[3]*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[3]*F_0_Upwind[5]+0.4472135954999579*F_0_Upwind[3]*alphaDrSurf[4]+0.4472135954999579*alphaDrSurf[3]*F_0_Upwind[4]+0.5*F_0_Upwind[0]*alphaDrSurf[3]+0.5*alphaDrSurf[0]*F_0_Upwind[3]+0.5*F_0_Upwind[1]*alphaDrSurf[2]+0.5*alphaDrSurf[1]*F_0_Upwind[2]; + Ghat_F_0[4] = 0.31943828249997*F_0_Upwind[8]*alphaDrSurf[8]+0.5*F_0_Upwind[5]*alphaDrSurf[8]+0.5*alphaDrSurf[5]*F_0_Upwind[8]+0.4472135954999579*F_0_Upwind[7]*alphaDrSurf[7]+0.31943828249997*F_0_Upwind[6]*alphaDrSurf[6]+0.5000000000000001*F_0_Upwind[2]*alphaDrSurf[6]+0.5000000000000001*alphaDrSurf[2]*F_0_Upwind[6]+0.31943828249997*F_0_Upwind[4]*alphaDrSurf[4]+0.5*F_0_Upwind[0]*alphaDrSurf[4]+0.5*alphaDrSurf[0]*F_0_Upwind[4]+0.4472135954999579*F_0_Upwind[3]*alphaDrSurf[3]+0.4472135954999579*F_0_Upwind[1]*alphaDrSurf[1]; + Ghat_F_0[5] = 0.31943828249997*F_0_Upwind[8]*alphaDrSurf[8]+0.5*F_0_Upwind[4]*alphaDrSurf[8]+0.5*alphaDrSurf[4]*F_0_Upwind[8]+0.31943828249997*F_0_Upwind[7]*alphaDrSurf[7]+0.5000000000000001*F_0_Upwind[1]*alphaDrSurf[7]+0.5000000000000001*alphaDrSurf[1]*F_0_Upwind[7]+0.4472135954999579*F_0_Upwind[6]*alphaDrSurf[6]+0.31943828249997*F_0_Upwind[5]*alphaDrSurf[5]+0.5*F_0_Upwind[0]*alphaDrSurf[5]+0.5*alphaDrSurf[0]*F_0_Upwind[5]+0.4472135954999579*F_0_Upwind[3]*alphaDrSurf[3]+0.4472135954999579*F_0_Upwind[2]*alphaDrSurf[2]; + Ghat_F_0[6] = 0.2857142857142857*F_0_Upwind[6]*alphaDrSurf[8]+0.447213595499958*F_0_Upwind[2]*alphaDrSurf[8]+0.2857142857142857*alphaDrSurf[6]*F_0_Upwind[8]+0.447213595499958*alphaDrSurf[2]*F_0_Upwind[8]+0.4*F_0_Upwind[3]*alphaDrSurf[7]+0.4*alphaDrSurf[3]*F_0_Upwind[7]+0.4472135954999579*F_0_Upwind[5]*alphaDrSurf[6]+0.31943828249997*F_0_Upwind[4]*alphaDrSurf[6]+0.5*F_0_Upwind[0]*alphaDrSurf[6]+0.4472135954999579*alphaDrSurf[5]*F_0_Upwind[6]+0.31943828249997*alphaDrSurf[4]*F_0_Upwind[6]+0.5*alphaDrSurf[0]*F_0_Upwind[6]+0.5000000000000001*F_0_Upwind[2]*alphaDrSurf[4]+0.5000000000000001*alphaDrSurf[2]*F_0_Upwind[4]+0.447213595499958*F_0_Upwind[1]*alphaDrSurf[3]+0.447213595499958*alphaDrSurf[1]*F_0_Upwind[3]; + Ghat_F_0[7] = 0.2857142857142857*F_0_Upwind[7]*alphaDrSurf[8]+0.447213595499958*F_0_Upwind[1]*alphaDrSurf[8]+0.2857142857142857*alphaDrSurf[7]*F_0_Upwind[8]+0.447213595499958*alphaDrSurf[1]*F_0_Upwind[8]+0.31943828249997*F_0_Upwind[5]*alphaDrSurf[7]+0.4472135954999579*F_0_Upwind[4]*alphaDrSurf[7]+0.5*F_0_Upwind[0]*alphaDrSurf[7]+0.31943828249997*alphaDrSurf[5]*F_0_Upwind[7]+0.4472135954999579*alphaDrSurf[4]*F_0_Upwind[7]+0.5*alphaDrSurf[0]*F_0_Upwind[7]+0.4*F_0_Upwind[3]*alphaDrSurf[6]+0.4*alphaDrSurf[3]*F_0_Upwind[6]+0.5000000000000001*F_0_Upwind[1]*alphaDrSurf[5]+0.5000000000000001*alphaDrSurf[1]*F_0_Upwind[5]+0.447213595499958*F_0_Upwind[2]*alphaDrSurf[3]+0.447213595499958*alphaDrSurf[2]*F_0_Upwind[3]; + Ghat_F_0[8] = 0.2040816326530612*F_0_Upwind[8]*alphaDrSurf[8]+0.31943828249997*F_0_Upwind[5]*alphaDrSurf[8]+0.31943828249997*F_0_Upwind[4]*alphaDrSurf[8]+0.5*F_0_Upwind[0]*alphaDrSurf[8]+0.31943828249997*alphaDrSurf[5]*F_0_Upwind[8]+0.31943828249997*alphaDrSurf[4]*F_0_Upwind[8]+0.5*alphaDrSurf[0]*F_0_Upwind[8]+0.2857142857142857*F_0_Upwind[7]*alphaDrSurf[7]+0.447213595499958*F_0_Upwind[1]*alphaDrSurf[7]+0.447213595499958*alphaDrSurf[1]*F_0_Upwind[7]+0.2857142857142857*F_0_Upwind[6]*alphaDrSurf[6]+0.447213595499958*F_0_Upwind[2]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[2]*F_0_Upwind[6]+0.5*F_0_Upwind[4]*alphaDrSurf[5]+0.5*alphaDrSurf[4]*F_0_Upwind[5]+0.4*F_0_Upwind[3]*alphaDrSurf[3]; + Ghat_G_1[0] = 0.5*G_1_Upwind[8]*alphaDrSurf[8]+0.5*G_1_Upwind[7]*alphaDrSurf[7]+0.5*G_1_Upwind[6]*alphaDrSurf[6]+0.5*G_1_Upwind[5]*alphaDrSurf[5]+0.5*G_1_Upwind[4]*alphaDrSurf[4]+0.5*G_1_Upwind[3]*alphaDrSurf[3]+0.5*G_1_Upwind[2]*alphaDrSurf[2]+0.5*G_1_Upwind[1]*alphaDrSurf[1]+0.5*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.447213595499958*G_1_Upwind[7]*alphaDrSurf[8]+0.447213595499958*alphaDrSurf[7]*G_1_Upwind[8]+0.5000000000000001*G_1_Upwind[5]*alphaDrSurf[7]+0.5000000000000001*alphaDrSurf[5]*G_1_Upwind[7]+0.447213595499958*G_1_Upwind[3]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[3]*G_1_Upwind[6]+0.4472135954999579*G_1_Upwind[1]*alphaDrSurf[4]+0.4472135954999579*alphaDrSurf[1]*G_1_Upwind[4]+0.5*G_1_Upwind[2]*alphaDrSurf[3]+0.5*alphaDrSurf[2]*G_1_Upwind[3]+0.5*G_1_Upwind[0]*alphaDrSurf[1]+0.5*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.447213595499958*G_1_Upwind[6]*alphaDrSurf[8]+0.447213595499958*alphaDrSurf[6]*G_1_Upwind[8]+0.447213595499958*G_1_Upwind[3]*alphaDrSurf[7]+0.447213595499958*alphaDrSurf[3]*G_1_Upwind[7]+0.5000000000000001*G_1_Upwind[4]*alphaDrSurf[6]+0.5000000000000001*alphaDrSurf[4]*G_1_Upwind[6]+0.4472135954999579*G_1_Upwind[2]*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[2]*G_1_Upwind[5]+0.5*G_1_Upwind[1]*alphaDrSurf[3]+0.5*alphaDrSurf[1]*G_1_Upwind[3]+0.5*G_1_Upwind[0]*alphaDrSurf[2]+0.5*alphaDrSurf[0]*G_1_Upwind[2]; + Ghat_G_1[3] = 0.4*G_1_Upwind[3]*alphaDrSurf[8]+0.4*alphaDrSurf[3]*G_1_Upwind[8]+0.4*G_1_Upwind[6]*alphaDrSurf[7]+0.447213595499958*G_1_Upwind[2]*alphaDrSurf[7]+0.4*alphaDrSurf[6]*G_1_Upwind[7]+0.447213595499958*alphaDrSurf[2]*G_1_Upwind[7]+0.447213595499958*G_1_Upwind[1]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[1]*G_1_Upwind[6]+0.4472135954999579*G_1_Upwind[3]*alphaDrSurf[5]+0.4472135954999579*alphaDrSurf[3]*G_1_Upwind[5]+0.4472135954999579*G_1_Upwind[3]*alphaDrSurf[4]+0.4472135954999579*alphaDrSurf[3]*G_1_Upwind[4]+0.5*G_1_Upwind[0]*alphaDrSurf[3]+0.5*alphaDrSurf[0]*G_1_Upwind[3]+0.5*G_1_Upwind[1]*alphaDrSurf[2]+0.5*alphaDrSurf[1]*G_1_Upwind[2]; + Ghat_G_1[4] = 0.31943828249997*G_1_Upwind[8]*alphaDrSurf[8]+0.5*G_1_Upwind[5]*alphaDrSurf[8]+0.5*alphaDrSurf[5]*G_1_Upwind[8]+0.4472135954999579*G_1_Upwind[7]*alphaDrSurf[7]+0.31943828249997*G_1_Upwind[6]*alphaDrSurf[6]+0.5000000000000001*G_1_Upwind[2]*alphaDrSurf[6]+0.5000000000000001*alphaDrSurf[2]*G_1_Upwind[6]+0.31943828249997*G_1_Upwind[4]*alphaDrSurf[4]+0.5*G_1_Upwind[0]*alphaDrSurf[4]+0.5*alphaDrSurf[0]*G_1_Upwind[4]+0.4472135954999579*G_1_Upwind[3]*alphaDrSurf[3]+0.4472135954999579*G_1_Upwind[1]*alphaDrSurf[1]; + Ghat_G_1[5] = 0.31943828249997*G_1_Upwind[8]*alphaDrSurf[8]+0.5*G_1_Upwind[4]*alphaDrSurf[8]+0.5*alphaDrSurf[4]*G_1_Upwind[8]+0.31943828249997*G_1_Upwind[7]*alphaDrSurf[7]+0.5000000000000001*G_1_Upwind[1]*alphaDrSurf[7]+0.5000000000000001*alphaDrSurf[1]*G_1_Upwind[7]+0.4472135954999579*G_1_Upwind[6]*alphaDrSurf[6]+0.31943828249997*G_1_Upwind[5]*alphaDrSurf[5]+0.5*G_1_Upwind[0]*alphaDrSurf[5]+0.5*alphaDrSurf[0]*G_1_Upwind[5]+0.4472135954999579*G_1_Upwind[3]*alphaDrSurf[3]+0.4472135954999579*G_1_Upwind[2]*alphaDrSurf[2]; + Ghat_G_1[6] = 0.2857142857142857*G_1_Upwind[6]*alphaDrSurf[8]+0.447213595499958*G_1_Upwind[2]*alphaDrSurf[8]+0.2857142857142857*alphaDrSurf[6]*G_1_Upwind[8]+0.447213595499958*alphaDrSurf[2]*G_1_Upwind[8]+0.4*G_1_Upwind[3]*alphaDrSurf[7]+0.4*alphaDrSurf[3]*G_1_Upwind[7]+0.4472135954999579*G_1_Upwind[5]*alphaDrSurf[6]+0.31943828249997*G_1_Upwind[4]*alphaDrSurf[6]+0.5*G_1_Upwind[0]*alphaDrSurf[6]+0.4472135954999579*alphaDrSurf[5]*G_1_Upwind[6]+0.31943828249997*alphaDrSurf[4]*G_1_Upwind[6]+0.5*alphaDrSurf[0]*G_1_Upwind[6]+0.5000000000000001*G_1_Upwind[2]*alphaDrSurf[4]+0.5000000000000001*alphaDrSurf[2]*G_1_Upwind[4]+0.447213595499958*G_1_Upwind[1]*alphaDrSurf[3]+0.447213595499958*alphaDrSurf[1]*G_1_Upwind[3]; + Ghat_G_1[7] = 0.2857142857142857*G_1_Upwind[7]*alphaDrSurf[8]+0.447213595499958*G_1_Upwind[1]*alphaDrSurf[8]+0.2857142857142857*alphaDrSurf[7]*G_1_Upwind[8]+0.447213595499958*alphaDrSurf[1]*G_1_Upwind[8]+0.31943828249997*G_1_Upwind[5]*alphaDrSurf[7]+0.4472135954999579*G_1_Upwind[4]*alphaDrSurf[7]+0.5*G_1_Upwind[0]*alphaDrSurf[7]+0.31943828249997*alphaDrSurf[5]*G_1_Upwind[7]+0.4472135954999579*alphaDrSurf[4]*G_1_Upwind[7]+0.5*alphaDrSurf[0]*G_1_Upwind[7]+0.4*G_1_Upwind[3]*alphaDrSurf[6]+0.4*alphaDrSurf[3]*G_1_Upwind[6]+0.5000000000000001*G_1_Upwind[1]*alphaDrSurf[5]+0.5000000000000001*alphaDrSurf[1]*G_1_Upwind[5]+0.447213595499958*G_1_Upwind[2]*alphaDrSurf[3]+0.447213595499958*alphaDrSurf[2]*G_1_Upwind[3]; + Ghat_G_1[8] = 0.2040816326530612*G_1_Upwind[8]*alphaDrSurf[8]+0.31943828249997*G_1_Upwind[5]*alphaDrSurf[8]+0.31943828249997*G_1_Upwind[4]*alphaDrSurf[8]+0.5*G_1_Upwind[0]*alphaDrSurf[8]+0.31943828249997*alphaDrSurf[5]*G_1_Upwind[8]+0.31943828249997*alphaDrSurf[4]*G_1_Upwind[8]+0.5*alphaDrSurf[0]*G_1_Upwind[8]+0.2857142857142857*G_1_Upwind[7]*alphaDrSurf[7]+0.447213595499958*G_1_Upwind[1]*alphaDrSurf[7]+0.447213595499958*alphaDrSurf[1]*G_1_Upwind[7]+0.2857142857142857*G_1_Upwind[6]*alphaDrSurf[6]+0.447213595499958*G_1_Upwind[2]*alphaDrSurf[6]+0.447213595499958*alphaDrSurf[2]*G_1_Upwind[6]+0.5*G_1_Upwind[4]*alphaDrSurf[5]+0.5*alphaDrSurf[4]*G_1_Upwind[5]+0.4*G_1_Upwind[3]*alphaDrSurf[3]; out_F_0[0] += -0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += -0.7071067811865475*Ghat_F_0[1]*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1.c index f24323556..5ae7d67e5 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nu, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out) { - // w[4]: Cell-center coordinates. - // dxv[4]: Cell spacing. - // nu: Collisionality. - // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell - // out: Incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fSkin/fEdge: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in skin cell/last edge cell + // out: Incremented distribution function in cell const double dv1par = 2.0/dxv[3]; const double dvpar = dxv[3], wvpar = w[3]; const double *F_0Skin = &fSkin[0]; @@ -14,38 +17,104 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1(const doubl const double *G_1Edge = &fEdge[24]; double *out_F_0 = &out[0]; double *out_G_1 = &out[24]; + const double *sumNuUPar = &nuPrimMomsSum[0]; double alphaDrSurf[8] = {0.0}; + double F_0_UpwindQuad[8] = {0.0}; + double F_0_Upwind[8] = {0.0};; double Ghat_F_0[8] = {0.0}; + double G_1_UpwindQuad[8] = {0.0}; + double G_1_Upwind[8] = {0.0};; double Ghat_G_1[8] = {0.0}; if (edge == -1) { - alphaDrSurf[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; - alphaDrSurf[3] = nu[3]*wvpar+0.5*nu[3]*dvpar; - alphaDrSurf[4] = nu[4]*wvpar+0.5*nu[4]*dvpar; - alphaDrSurf[5] = nu[5]*wvpar+0.5*nu[5]*dvpar; - alphaDrSurf[6] = nu[6]*wvpar+0.5*nu[6]*dvpar; - alphaDrSurf[7] = nu[7]*wvpar+0.5*nu[7]*dvpar; - - Ghat_F_0[0] = 0.5590169943749476*alphaDrSurf[7]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[6]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[5]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[4]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[3]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[2]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[1]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[0]*F_0Skin[16]+0.4330127018922193*alphaDrSurf[7]*F_0Skin[15]+0.4330127018922193*alphaDrSurf[6]*F_0Skin[14]+0.4330127018922193*alphaDrSurf[5]*F_0Skin[13]+0.4330127018922193*alphaDrSurf[4]*F_0Skin[12]+0.25*alphaDrSurf[7]*F_0Skin[11]+0.4330127018922193*alphaDrSurf[3]*F_0Skin[10]+0.4330127018922193*alphaDrSurf[2]*F_0Skin[9]+0.4330127018922193*alphaDrSurf[1]*F_0Skin[8]+0.25*alphaDrSurf[6]*F_0Skin[7]+0.25*alphaDrSurf[5]*F_0Skin[6]+0.25*alphaDrSurf[4]*F_0Skin[5]+0.4330127018922193*alphaDrSurf[0]*F_0Skin[4]+0.25*F_0Skin[3]*alphaDrSurf[3]+0.25*F_0Skin[2]*alphaDrSurf[2]+0.25*F_0Skin[1]*alphaDrSurf[1]+0.25*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 0.5590169943749476*alphaDrSurf[6]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[7]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[3]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[2]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[5]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[4]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[0]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[1]*F_0Skin[16]+0.4330127018922193*alphaDrSurf[6]*F_0Skin[15]+0.4330127018922193*alphaDrSurf[7]*F_0Skin[14]+0.4330127018922193*alphaDrSurf[3]*F_0Skin[13]+0.4330127018922193*alphaDrSurf[2]*F_0Skin[12]+0.25*alphaDrSurf[6]*F_0Skin[11]+0.4330127018922193*alphaDrSurf[5]*F_0Skin[10]+0.4330127018922193*alphaDrSurf[4]*F_0Skin[9]+0.4330127018922193*alphaDrSurf[0]*F_0Skin[8]+0.25*F_0Skin[7]*alphaDrSurf[7]+0.25*alphaDrSurf[3]*F_0Skin[6]+0.25*F_0Skin[3]*alphaDrSurf[5]+0.25*alphaDrSurf[2]*F_0Skin[5]+0.25*F_0Skin[2]*alphaDrSurf[4]+0.4330127018922193*alphaDrSurf[1]*F_0Skin[4]+0.25*F_0Skin[0]*alphaDrSurf[1]+0.25*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 0.5590169943749476*alphaDrSurf[5]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[3]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[7]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[1]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[6]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[0]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[4]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[2]*F_0Skin[16]+0.4330127018922193*alphaDrSurf[5]*F_0Skin[15]+0.4330127018922193*alphaDrSurf[3]*F_0Skin[14]+0.4330127018922193*alphaDrSurf[7]*F_0Skin[13]+0.4330127018922193*alphaDrSurf[1]*F_0Skin[12]+0.25*alphaDrSurf[5]*F_0Skin[11]+0.4330127018922193*alphaDrSurf[6]*F_0Skin[10]+0.4330127018922193*alphaDrSurf[0]*F_0Skin[9]+0.4330127018922193*alphaDrSurf[4]*F_0Skin[8]+0.25*F_0Skin[6]*alphaDrSurf[7]+0.25*alphaDrSurf[3]*F_0Skin[7]+0.25*F_0Skin[3]*alphaDrSurf[6]+0.25*alphaDrSurf[1]*F_0Skin[5]+0.25*F_0Skin[1]*alphaDrSurf[4]+0.4330127018922193*alphaDrSurf[2]*F_0Skin[4]+0.25*F_0Skin[0]*alphaDrSurf[2]+0.25*alphaDrSurf[0]*F_0Skin[2]; - Ghat_F_0[3] = 0.5590169943749476*alphaDrSurf[4]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[2]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[1]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[7]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[0]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[6]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[5]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[3]*F_0Skin[16]+0.4330127018922193*alphaDrSurf[4]*F_0Skin[15]+0.4330127018922193*alphaDrSurf[2]*F_0Skin[14]+0.4330127018922193*alphaDrSurf[1]*F_0Skin[13]+0.4330127018922193*alphaDrSurf[7]*F_0Skin[12]+0.25*alphaDrSurf[4]*F_0Skin[11]+0.4330127018922193*alphaDrSurf[0]*F_0Skin[10]+0.4330127018922193*alphaDrSurf[6]*F_0Skin[9]+0.4330127018922193*alphaDrSurf[5]*F_0Skin[8]+0.25*F_0Skin[5]*alphaDrSurf[7]+0.25*alphaDrSurf[2]*F_0Skin[7]+0.25*F_0Skin[2]*alphaDrSurf[6]+0.25*alphaDrSurf[1]*F_0Skin[6]+0.25*F_0Skin[1]*alphaDrSurf[5]+0.4330127018922193*alphaDrSurf[3]*F_0Skin[4]+0.25*F_0Skin[0]*alphaDrSurf[3]+0.25*alphaDrSurf[0]*F_0Skin[3]; - Ghat_F_0[4] = 0.5590169943749476*alphaDrSurf[3]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[5]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[6]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[0]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[7]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[1]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[2]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[4]*F_0Skin[16]+0.4330127018922193*alphaDrSurf[3]*F_0Skin[15]+0.4330127018922193*alphaDrSurf[5]*F_0Skin[14]+0.4330127018922193*alphaDrSurf[6]*F_0Skin[13]+0.4330127018922193*alphaDrSurf[0]*F_0Skin[12]+0.25*alphaDrSurf[3]*F_0Skin[11]+0.4330127018922193*alphaDrSurf[7]*F_0Skin[10]+0.4330127018922193*alphaDrSurf[1]*F_0Skin[9]+0.4330127018922193*alphaDrSurf[2]*F_0Skin[8]+0.25*F_0Skin[3]*alphaDrSurf[7]+0.25*alphaDrSurf[5]*F_0Skin[7]+0.25*F_0Skin[6]*alphaDrSurf[6]+0.25*alphaDrSurf[0]*F_0Skin[5]+0.4330127018922193*F_0Skin[4]*alphaDrSurf[4]+0.25*F_0Skin[0]*alphaDrSurf[4]+0.25*F_0Skin[1]*alphaDrSurf[2]+0.25*alphaDrSurf[1]*F_0Skin[2]; - Ghat_F_0[5] = 0.5590169943749476*alphaDrSurf[2]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[4]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[0]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[6]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[1]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[7]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[3]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[5]*F_0Skin[16]+0.4330127018922193*alphaDrSurf[2]*F_0Skin[15]+0.4330127018922193*alphaDrSurf[4]*F_0Skin[14]+0.4330127018922193*alphaDrSurf[0]*F_0Skin[13]+0.4330127018922193*alphaDrSurf[6]*F_0Skin[12]+0.25*alphaDrSurf[2]*F_0Skin[11]+0.4330127018922193*alphaDrSurf[1]*F_0Skin[10]+0.4330127018922193*alphaDrSurf[7]*F_0Skin[9]+0.4330127018922193*alphaDrSurf[3]*F_0Skin[8]+0.25*F_0Skin[2]*alphaDrSurf[7]+0.25*alphaDrSurf[4]*F_0Skin[7]+0.25*F_0Skin[5]*alphaDrSurf[6]+0.25*alphaDrSurf[0]*F_0Skin[6]+0.4330127018922193*F_0Skin[4]*alphaDrSurf[5]+0.25*F_0Skin[0]*alphaDrSurf[5]+0.25*F_0Skin[1]*alphaDrSurf[3]+0.25*alphaDrSurf[1]*F_0Skin[3]; - Ghat_F_0[6] = 0.5590169943749476*alphaDrSurf[1]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[0]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[4]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[5]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[2]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[3]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[7]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[6]*F_0Skin[16]+0.4330127018922193*alphaDrSurf[1]*F_0Skin[15]+0.4330127018922193*alphaDrSurf[0]*F_0Skin[14]+0.4330127018922193*alphaDrSurf[4]*F_0Skin[13]+0.4330127018922193*alphaDrSurf[5]*F_0Skin[12]+0.25*alphaDrSurf[1]*F_0Skin[11]+0.4330127018922193*alphaDrSurf[2]*F_0Skin[10]+0.4330127018922193*alphaDrSurf[3]*F_0Skin[9]+0.4330127018922193*alphaDrSurf[7]*F_0Skin[8]+0.25*F_0Skin[1]*alphaDrSurf[7]+0.25*alphaDrSurf[0]*F_0Skin[7]+0.4330127018922193*F_0Skin[4]*alphaDrSurf[6]+0.25*F_0Skin[0]*alphaDrSurf[6]+0.25*alphaDrSurf[4]*F_0Skin[6]+0.25*F_0Skin[5]*alphaDrSurf[5]+0.25*F_0Skin[2]*alphaDrSurf[3]+0.25*alphaDrSurf[2]*F_0Skin[3]; - Ghat_F_0[7] = 0.5590169943749476*alphaDrSurf[0]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[1]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[2]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[3]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[4]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[5]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[6]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[7]*F_0Skin[16]+0.4330127018922193*alphaDrSurf[0]*F_0Skin[15]+0.4330127018922193*alphaDrSurf[1]*F_0Skin[14]+0.4330127018922193*alphaDrSurf[2]*F_0Skin[13]+0.4330127018922193*alphaDrSurf[3]*F_0Skin[12]+0.25*alphaDrSurf[0]*F_0Skin[11]+0.4330127018922193*alphaDrSurf[4]*F_0Skin[10]+0.4330127018922193*alphaDrSurf[5]*F_0Skin[9]+0.4330127018922193*alphaDrSurf[6]*F_0Skin[8]+0.4330127018922193*F_0Skin[4]*alphaDrSurf[7]+0.25*F_0Skin[0]*alphaDrSurf[7]+0.25*alphaDrSurf[1]*F_0Skin[7]+0.25*F_0Skin[1]*alphaDrSurf[6]+0.25*alphaDrSurf[2]*F_0Skin[6]+0.25*F_0Skin[2]*alphaDrSurf[5]+0.25*alphaDrSurf[3]*F_0Skin[5]+0.25*F_0Skin[3]*alphaDrSurf[4]; - Ghat_G_1[0] = 0.5590169943749476*alphaDrSurf[7]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[6]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[5]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[4]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[3]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[2]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[1]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[0]*G_1Skin[16]+0.4330127018922193*alphaDrSurf[7]*G_1Skin[15]+0.4330127018922193*alphaDrSurf[6]*G_1Skin[14]+0.4330127018922193*alphaDrSurf[5]*G_1Skin[13]+0.4330127018922193*alphaDrSurf[4]*G_1Skin[12]+0.25*alphaDrSurf[7]*G_1Skin[11]+0.4330127018922193*alphaDrSurf[3]*G_1Skin[10]+0.4330127018922193*alphaDrSurf[2]*G_1Skin[9]+0.4330127018922193*alphaDrSurf[1]*G_1Skin[8]+0.25*alphaDrSurf[6]*G_1Skin[7]+0.25*alphaDrSurf[5]*G_1Skin[6]+0.25*alphaDrSurf[4]*G_1Skin[5]+0.4330127018922193*alphaDrSurf[0]*G_1Skin[4]+0.25*G_1Skin[3]*alphaDrSurf[3]+0.25*G_1Skin[2]*alphaDrSurf[2]+0.25*G_1Skin[1]*alphaDrSurf[1]+0.25*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 0.5590169943749476*alphaDrSurf[6]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[7]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[3]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[2]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[5]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[4]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[0]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[1]*G_1Skin[16]+0.4330127018922193*alphaDrSurf[6]*G_1Skin[15]+0.4330127018922193*alphaDrSurf[7]*G_1Skin[14]+0.4330127018922193*alphaDrSurf[3]*G_1Skin[13]+0.4330127018922193*alphaDrSurf[2]*G_1Skin[12]+0.25*alphaDrSurf[6]*G_1Skin[11]+0.4330127018922193*alphaDrSurf[5]*G_1Skin[10]+0.4330127018922193*alphaDrSurf[4]*G_1Skin[9]+0.4330127018922193*alphaDrSurf[0]*G_1Skin[8]+0.25*G_1Skin[7]*alphaDrSurf[7]+0.25*alphaDrSurf[3]*G_1Skin[6]+0.25*G_1Skin[3]*alphaDrSurf[5]+0.25*alphaDrSurf[2]*G_1Skin[5]+0.25*G_1Skin[2]*alphaDrSurf[4]+0.4330127018922193*alphaDrSurf[1]*G_1Skin[4]+0.25*G_1Skin[0]*alphaDrSurf[1]+0.25*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 0.5590169943749476*alphaDrSurf[5]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[3]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[7]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[1]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[6]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[0]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[4]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[2]*G_1Skin[16]+0.4330127018922193*alphaDrSurf[5]*G_1Skin[15]+0.4330127018922193*alphaDrSurf[3]*G_1Skin[14]+0.4330127018922193*alphaDrSurf[7]*G_1Skin[13]+0.4330127018922193*alphaDrSurf[1]*G_1Skin[12]+0.25*alphaDrSurf[5]*G_1Skin[11]+0.4330127018922193*alphaDrSurf[6]*G_1Skin[10]+0.4330127018922193*alphaDrSurf[0]*G_1Skin[9]+0.4330127018922193*alphaDrSurf[4]*G_1Skin[8]+0.25*G_1Skin[6]*alphaDrSurf[7]+0.25*alphaDrSurf[3]*G_1Skin[7]+0.25*G_1Skin[3]*alphaDrSurf[6]+0.25*alphaDrSurf[1]*G_1Skin[5]+0.25*G_1Skin[1]*alphaDrSurf[4]+0.4330127018922193*alphaDrSurf[2]*G_1Skin[4]+0.25*G_1Skin[0]*alphaDrSurf[2]+0.25*alphaDrSurf[0]*G_1Skin[2]; - Ghat_G_1[3] = 0.5590169943749476*alphaDrSurf[4]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[2]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[1]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[7]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[0]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[6]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[5]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[3]*G_1Skin[16]+0.4330127018922193*alphaDrSurf[4]*G_1Skin[15]+0.4330127018922193*alphaDrSurf[2]*G_1Skin[14]+0.4330127018922193*alphaDrSurf[1]*G_1Skin[13]+0.4330127018922193*alphaDrSurf[7]*G_1Skin[12]+0.25*alphaDrSurf[4]*G_1Skin[11]+0.4330127018922193*alphaDrSurf[0]*G_1Skin[10]+0.4330127018922193*alphaDrSurf[6]*G_1Skin[9]+0.4330127018922193*alphaDrSurf[5]*G_1Skin[8]+0.25*G_1Skin[5]*alphaDrSurf[7]+0.25*alphaDrSurf[2]*G_1Skin[7]+0.25*G_1Skin[2]*alphaDrSurf[6]+0.25*alphaDrSurf[1]*G_1Skin[6]+0.25*G_1Skin[1]*alphaDrSurf[5]+0.4330127018922193*alphaDrSurf[3]*G_1Skin[4]+0.25*G_1Skin[0]*alphaDrSurf[3]+0.25*alphaDrSurf[0]*G_1Skin[3]; - Ghat_G_1[4] = 0.5590169943749476*alphaDrSurf[3]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[5]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[6]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[0]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[7]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[1]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[2]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[4]*G_1Skin[16]+0.4330127018922193*alphaDrSurf[3]*G_1Skin[15]+0.4330127018922193*alphaDrSurf[5]*G_1Skin[14]+0.4330127018922193*alphaDrSurf[6]*G_1Skin[13]+0.4330127018922193*alphaDrSurf[0]*G_1Skin[12]+0.25*alphaDrSurf[3]*G_1Skin[11]+0.4330127018922193*alphaDrSurf[7]*G_1Skin[10]+0.4330127018922193*alphaDrSurf[1]*G_1Skin[9]+0.4330127018922193*alphaDrSurf[2]*G_1Skin[8]+0.25*G_1Skin[3]*alphaDrSurf[7]+0.25*alphaDrSurf[5]*G_1Skin[7]+0.25*G_1Skin[6]*alphaDrSurf[6]+0.25*alphaDrSurf[0]*G_1Skin[5]+0.4330127018922193*G_1Skin[4]*alphaDrSurf[4]+0.25*G_1Skin[0]*alphaDrSurf[4]+0.25*G_1Skin[1]*alphaDrSurf[2]+0.25*alphaDrSurf[1]*G_1Skin[2]; - Ghat_G_1[5] = 0.5590169943749476*alphaDrSurf[2]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[4]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[0]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[6]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[1]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[7]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[3]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[5]*G_1Skin[16]+0.4330127018922193*alphaDrSurf[2]*G_1Skin[15]+0.4330127018922193*alphaDrSurf[4]*G_1Skin[14]+0.4330127018922193*alphaDrSurf[0]*G_1Skin[13]+0.4330127018922193*alphaDrSurf[6]*G_1Skin[12]+0.25*alphaDrSurf[2]*G_1Skin[11]+0.4330127018922193*alphaDrSurf[1]*G_1Skin[10]+0.4330127018922193*alphaDrSurf[7]*G_1Skin[9]+0.4330127018922193*alphaDrSurf[3]*G_1Skin[8]+0.25*G_1Skin[2]*alphaDrSurf[7]+0.25*alphaDrSurf[4]*G_1Skin[7]+0.25*G_1Skin[5]*alphaDrSurf[6]+0.25*alphaDrSurf[0]*G_1Skin[6]+0.4330127018922193*G_1Skin[4]*alphaDrSurf[5]+0.25*G_1Skin[0]*alphaDrSurf[5]+0.25*G_1Skin[1]*alphaDrSurf[3]+0.25*alphaDrSurf[1]*G_1Skin[3]; - Ghat_G_1[6] = 0.5590169943749476*alphaDrSurf[1]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[0]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[4]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[5]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[2]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[3]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[7]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[6]*G_1Skin[16]+0.4330127018922193*alphaDrSurf[1]*G_1Skin[15]+0.4330127018922193*alphaDrSurf[0]*G_1Skin[14]+0.4330127018922193*alphaDrSurf[4]*G_1Skin[13]+0.4330127018922193*alphaDrSurf[5]*G_1Skin[12]+0.25*alphaDrSurf[1]*G_1Skin[11]+0.4330127018922193*alphaDrSurf[2]*G_1Skin[10]+0.4330127018922193*alphaDrSurf[3]*G_1Skin[9]+0.4330127018922193*alphaDrSurf[7]*G_1Skin[8]+0.25*G_1Skin[1]*alphaDrSurf[7]+0.25*alphaDrSurf[0]*G_1Skin[7]+0.4330127018922193*G_1Skin[4]*alphaDrSurf[6]+0.25*G_1Skin[0]*alphaDrSurf[6]+0.25*alphaDrSurf[4]*G_1Skin[6]+0.25*G_1Skin[5]*alphaDrSurf[5]+0.25*G_1Skin[2]*alphaDrSurf[3]+0.25*alphaDrSurf[2]*G_1Skin[3]; - Ghat_G_1[7] = 0.5590169943749476*alphaDrSurf[0]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[1]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[2]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[3]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[4]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[5]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[6]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[7]*G_1Skin[16]+0.4330127018922193*alphaDrSurf[0]*G_1Skin[15]+0.4330127018922193*alphaDrSurf[1]*G_1Skin[14]+0.4330127018922193*alphaDrSurf[2]*G_1Skin[13]+0.4330127018922193*alphaDrSurf[3]*G_1Skin[12]+0.25*alphaDrSurf[0]*G_1Skin[11]+0.4330127018922193*alphaDrSurf[4]*G_1Skin[10]+0.4330127018922193*alphaDrSurf[5]*G_1Skin[9]+0.4330127018922193*alphaDrSurf[6]*G_1Skin[8]+0.4330127018922193*G_1Skin[4]*alphaDrSurf[7]+0.25*G_1Skin[0]*alphaDrSurf[7]+0.25*alphaDrSurf[1]*G_1Skin[7]+0.25*G_1Skin[1]*alphaDrSurf[6]+0.25*alphaDrSurf[2]*G_1Skin[6]+0.25*G_1Skin[2]*alphaDrSurf[5]+0.25*alphaDrSurf[3]*G_1Skin[5]+0.25*G_1Skin[3]*alphaDrSurf[4]; + alphaDrSurf[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf[3] = nuSum[3]*wvpar+0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; + alphaDrSurf[4] = nuSum[4]*wvpar+0.5*nuSum[4]*dvpar-1.0*sumNuUPar[4]; + alphaDrSurf[5] = nuSum[5]*wvpar+0.5*nuSum[5]*dvpar-1.0*sumNuUPar[5]; + alphaDrSurf[6] = nuSum[6]*wvpar+0.5*nuSum[6]*dvpar-1.0*sumNuUPar[6]; + alphaDrSurf[7] = nuSum[7]*wvpar+0.5*nuSum[7]*dvpar-1.0*sumNuUPar[7]; + + if ((-0.3535533905932737*alphaDrSurf[7])+0.3535533905932737*(alphaDrSurf[6]+alphaDrSurf[5]+alphaDrSurf[4])-0.3535533905932737*(alphaDrSurf[3]+alphaDrSurf[2]+alphaDrSurf[1])+0.3535533905932737*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_r(F_0Skin); + G_1_UpwindQuad[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_r(G_1Skin); + } else { + F_0_UpwindQuad[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_l(F_0Edge); + G_1_UpwindQuad[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_l(G_1Edge); + } + if (0.3535533905932737*alphaDrSurf[7]-0.3535533905932737*(alphaDrSurf[6]+alphaDrSurf[5])+0.3535533905932737*(alphaDrSurf[4]+alphaDrSurf[3])-0.3535533905932737*(alphaDrSurf[2]+alphaDrSurf[1])+0.3535533905932737*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_r(F_0Skin); + G_1_UpwindQuad[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_r(G_1Skin); + } else { + F_0_UpwindQuad[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_l(F_0Edge); + G_1_UpwindQuad[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_l(G_1Edge); + } + if (0.3535533905932737*alphaDrSurf[7]-0.3535533905932737*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[5]-0.3535533905932737*(alphaDrSurf[4]+alphaDrSurf[3])+0.3535533905932737*alphaDrSurf[2]-0.3535533905932737*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_r(F_0Skin); + G_1_UpwindQuad[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_r(G_1Skin); + } else { + F_0_UpwindQuad[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_l(F_0Edge); + G_1_UpwindQuad[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_l(G_1Edge); + } + if ((-0.3535533905932737*alphaDrSurf[7])+0.3535533905932737*alphaDrSurf[6]-0.3535533905932737*(alphaDrSurf[5]+alphaDrSurf[4])+0.3535533905932737*(alphaDrSurf[3]+alphaDrSurf[2])-0.3535533905932737*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_r(F_0Skin); + G_1_UpwindQuad[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_r(G_1Skin); + } else { + F_0_UpwindQuad[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_l(F_0Edge); + G_1_UpwindQuad[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_l(G_1Edge); + } + if (0.3535533905932737*(alphaDrSurf[7]+alphaDrSurf[6])-0.3535533905932737*(alphaDrSurf[5]+alphaDrSurf[4]+alphaDrSurf[3]+alphaDrSurf[2])+0.3535533905932737*(alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_r(F_0Skin); + G_1_UpwindQuad[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_r(G_1Skin); + } else { + F_0_UpwindQuad[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_l(F_0Edge); + G_1_UpwindQuad[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_l(G_1Edge); + } + if ((-0.3535533905932737*(alphaDrSurf[7]+alphaDrSurf[6]))+0.3535533905932737*alphaDrSurf[5]-0.3535533905932737*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[3]-0.3535533905932737*alphaDrSurf[2]+0.3535533905932737*(alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_r(F_0Skin); + G_1_UpwindQuad[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_r(G_1Skin); + } else { + F_0_UpwindQuad[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_l(F_0Edge); + G_1_UpwindQuad[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_l(G_1Edge); + } + if ((-0.3535533905932737*(alphaDrSurf[7]+alphaDrSurf[6]+alphaDrSurf[5]))+0.3535533905932737*alphaDrSurf[4]-0.3535533905932737*alphaDrSurf[3]+0.3535533905932737*(alphaDrSurf[2]+alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_r(F_0Skin); + G_1_UpwindQuad[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_r(G_1Skin); + } else { + F_0_UpwindQuad[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_l(F_0Edge); + G_1_UpwindQuad[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_l(G_1Edge); + } + if (0.3535533905932737*(alphaDrSurf[7]+alphaDrSurf[6]+alphaDrSurf[5]+alphaDrSurf[4]+alphaDrSurf[3]+alphaDrSurf[2]+alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_r(F_0Skin); + G_1_UpwindQuad[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_r(G_1Skin); + } else { + F_0_UpwindQuad[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_l(F_0Edge); + G_1_UpwindQuad[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_l(G_1Edge); + } + + // Project tensor nodal quadrature basis back onto modal basis. + hyb_3x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + hyb_3x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); + + Ghat_F_0[0] = 0.3535533905932737*F_0_Upwind[7]*alphaDrSurf[7]+0.3535533905932737*F_0_Upwind[6]*alphaDrSurf[6]+0.3535533905932737*F_0_Upwind[5]*alphaDrSurf[5]+0.3535533905932737*F_0_Upwind[4]*alphaDrSurf[4]+0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[3]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[2]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[1]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.3535533905932737*F_0_Upwind[6]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[6]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[3]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[4]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.3535533905932737*F_0_Upwind[5]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[5]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[3]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[4]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[2]; + Ghat_F_0[3] = 0.3535533905932737*F_0_Upwind[4]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[4]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[3]; + Ghat_F_0[4] = 0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[3]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[5]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[5]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[4]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[2]; + Ghat_F_0[5] = 0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[4]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[4]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[3]; + Ghat_F_0[6] = 0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[4]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[4]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[3]; + Ghat_F_0[7] = 0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[3]*F_0_Upwind[4]; + Ghat_G_1[0] = 0.3535533905932737*G_1_Upwind[7]*alphaDrSurf[7]+0.3535533905932737*G_1_Upwind[6]*alphaDrSurf[6]+0.3535533905932737*G_1_Upwind[5]*alphaDrSurf[5]+0.3535533905932737*G_1_Upwind[4]*alphaDrSurf[4]+0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[3]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[2]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[1]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.3535533905932737*G_1_Upwind[6]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[6]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[3]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[4]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.3535533905932737*G_1_Upwind[5]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[5]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[3]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[4]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[2]; + Ghat_G_1[3] = 0.3535533905932737*G_1_Upwind[4]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[4]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[3]; + Ghat_G_1[4] = 0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[3]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[5]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[5]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[4]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[2]; + Ghat_G_1[5] = 0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[4]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[4]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[3]; + Ghat_G_1[6] = 0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[4]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[4]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[3]; + Ghat_G_1[7] = 0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[3]*G_1_Upwind[4]; out_F_0[0] += 0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += 0.7071067811865475*Ghat_F_0[1]*dv1par; @@ -98,31 +167,92 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_boundary_surfvpar_3x1v_ser_p1(const doubl } else { - alphaDrSurf[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; - alphaDrSurf[3] = nu[3]*wvpar-0.5*nu[3]*dvpar; - alphaDrSurf[4] = nu[4]*wvpar-0.5*nu[4]*dvpar; - alphaDrSurf[5] = nu[5]*wvpar-0.5*nu[5]*dvpar; - alphaDrSurf[6] = nu[6]*wvpar-0.5*nu[6]*dvpar; - alphaDrSurf[7] = nu[7]*wvpar-0.5*nu[7]*dvpar; - - Ghat_F_0[0] = 0.5590169943749476*alphaDrSurf[7]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[6]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[5]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[4]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[3]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[2]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[1]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[0]*F_0Skin[16]-0.4330127018922193*alphaDrSurf[7]*F_0Skin[15]-0.4330127018922193*alphaDrSurf[6]*F_0Skin[14]-0.4330127018922193*alphaDrSurf[5]*F_0Skin[13]-0.4330127018922193*alphaDrSurf[4]*F_0Skin[12]+0.25*alphaDrSurf[7]*F_0Skin[11]-0.4330127018922193*alphaDrSurf[3]*F_0Skin[10]-0.4330127018922193*alphaDrSurf[2]*F_0Skin[9]-0.4330127018922193*alphaDrSurf[1]*F_0Skin[8]+0.25*alphaDrSurf[6]*F_0Skin[7]+0.25*alphaDrSurf[5]*F_0Skin[6]+0.25*alphaDrSurf[4]*F_0Skin[5]-0.4330127018922193*alphaDrSurf[0]*F_0Skin[4]+0.25*F_0Skin[3]*alphaDrSurf[3]+0.25*F_0Skin[2]*alphaDrSurf[2]+0.25*F_0Skin[1]*alphaDrSurf[1]+0.25*F_0Skin[0]*alphaDrSurf[0]; - Ghat_F_0[1] = 0.5590169943749476*alphaDrSurf[6]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[7]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[3]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[2]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[5]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[4]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[0]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[1]*F_0Skin[16]-0.4330127018922193*alphaDrSurf[6]*F_0Skin[15]-0.4330127018922193*alphaDrSurf[7]*F_0Skin[14]-0.4330127018922193*alphaDrSurf[3]*F_0Skin[13]-0.4330127018922193*alphaDrSurf[2]*F_0Skin[12]+0.25*alphaDrSurf[6]*F_0Skin[11]-0.4330127018922193*alphaDrSurf[5]*F_0Skin[10]-0.4330127018922193*alphaDrSurf[4]*F_0Skin[9]-0.4330127018922193*alphaDrSurf[0]*F_0Skin[8]+0.25*F_0Skin[7]*alphaDrSurf[7]+0.25*alphaDrSurf[3]*F_0Skin[6]+0.25*F_0Skin[3]*alphaDrSurf[5]+0.25*alphaDrSurf[2]*F_0Skin[5]+0.25*F_0Skin[2]*alphaDrSurf[4]-0.4330127018922193*alphaDrSurf[1]*F_0Skin[4]+0.25*F_0Skin[0]*alphaDrSurf[1]+0.25*alphaDrSurf[0]*F_0Skin[1]; - Ghat_F_0[2] = 0.5590169943749476*alphaDrSurf[5]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[3]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[7]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[1]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[6]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[0]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[4]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[2]*F_0Skin[16]-0.4330127018922193*alphaDrSurf[5]*F_0Skin[15]-0.4330127018922193*alphaDrSurf[3]*F_0Skin[14]-0.4330127018922193*alphaDrSurf[7]*F_0Skin[13]-0.4330127018922193*alphaDrSurf[1]*F_0Skin[12]+0.25*alphaDrSurf[5]*F_0Skin[11]-0.4330127018922193*alphaDrSurf[6]*F_0Skin[10]-0.4330127018922193*alphaDrSurf[0]*F_0Skin[9]-0.4330127018922193*alphaDrSurf[4]*F_0Skin[8]+0.25*F_0Skin[6]*alphaDrSurf[7]+0.25*alphaDrSurf[3]*F_0Skin[7]+0.25*F_0Skin[3]*alphaDrSurf[6]+0.25*alphaDrSurf[1]*F_0Skin[5]+0.25*F_0Skin[1]*alphaDrSurf[4]-0.4330127018922193*alphaDrSurf[2]*F_0Skin[4]+0.25*F_0Skin[0]*alphaDrSurf[2]+0.25*alphaDrSurf[0]*F_0Skin[2]; - Ghat_F_0[3] = 0.5590169943749476*alphaDrSurf[4]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[2]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[1]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[7]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[0]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[6]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[5]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[3]*F_0Skin[16]-0.4330127018922193*alphaDrSurf[4]*F_0Skin[15]-0.4330127018922193*alphaDrSurf[2]*F_0Skin[14]-0.4330127018922193*alphaDrSurf[1]*F_0Skin[13]-0.4330127018922193*alphaDrSurf[7]*F_0Skin[12]+0.25*alphaDrSurf[4]*F_0Skin[11]-0.4330127018922193*alphaDrSurf[0]*F_0Skin[10]-0.4330127018922193*alphaDrSurf[6]*F_0Skin[9]-0.4330127018922193*alphaDrSurf[5]*F_0Skin[8]+0.25*F_0Skin[5]*alphaDrSurf[7]+0.25*alphaDrSurf[2]*F_0Skin[7]+0.25*F_0Skin[2]*alphaDrSurf[6]+0.25*alphaDrSurf[1]*F_0Skin[6]+0.25*F_0Skin[1]*alphaDrSurf[5]-0.4330127018922193*alphaDrSurf[3]*F_0Skin[4]+0.25*F_0Skin[0]*alphaDrSurf[3]+0.25*alphaDrSurf[0]*F_0Skin[3]; - Ghat_F_0[4] = 0.5590169943749476*alphaDrSurf[3]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[5]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[6]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[0]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[7]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[1]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[2]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[4]*F_0Skin[16]-0.4330127018922193*alphaDrSurf[3]*F_0Skin[15]-0.4330127018922193*alphaDrSurf[5]*F_0Skin[14]-0.4330127018922193*alphaDrSurf[6]*F_0Skin[13]-0.4330127018922193*alphaDrSurf[0]*F_0Skin[12]+0.25*alphaDrSurf[3]*F_0Skin[11]-0.4330127018922193*alphaDrSurf[7]*F_0Skin[10]-0.4330127018922193*alphaDrSurf[1]*F_0Skin[9]-0.4330127018922193*alphaDrSurf[2]*F_0Skin[8]+0.25*F_0Skin[3]*alphaDrSurf[7]+0.25*alphaDrSurf[5]*F_0Skin[7]+0.25*F_0Skin[6]*alphaDrSurf[6]+0.25*alphaDrSurf[0]*F_0Skin[5]-0.4330127018922193*F_0Skin[4]*alphaDrSurf[4]+0.25*F_0Skin[0]*alphaDrSurf[4]+0.25*F_0Skin[1]*alphaDrSurf[2]+0.25*alphaDrSurf[1]*F_0Skin[2]; - Ghat_F_0[5] = 0.5590169943749476*alphaDrSurf[2]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[4]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[0]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[6]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[1]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[7]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[3]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[5]*F_0Skin[16]-0.4330127018922193*alphaDrSurf[2]*F_0Skin[15]-0.4330127018922193*alphaDrSurf[4]*F_0Skin[14]-0.4330127018922193*alphaDrSurf[0]*F_0Skin[13]-0.4330127018922193*alphaDrSurf[6]*F_0Skin[12]+0.25*alphaDrSurf[2]*F_0Skin[11]-0.4330127018922193*alphaDrSurf[1]*F_0Skin[10]-0.4330127018922193*alphaDrSurf[7]*F_0Skin[9]-0.4330127018922193*alphaDrSurf[3]*F_0Skin[8]+0.25*F_0Skin[2]*alphaDrSurf[7]+0.25*alphaDrSurf[4]*F_0Skin[7]+0.25*F_0Skin[5]*alphaDrSurf[6]+0.25*alphaDrSurf[0]*F_0Skin[6]-0.4330127018922193*F_0Skin[4]*alphaDrSurf[5]+0.25*F_0Skin[0]*alphaDrSurf[5]+0.25*F_0Skin[1]*alphaDrSurf[3]+0.25*alphaDrSurf[1]*F_0Skin[3]; - Ghat_F_0[6] = 0.5590169943749476*alphaDrSurf[1]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[0]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[4]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[5]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[2]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[3]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[7]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[6]*F_0Skin[16]-0.4330127018922193*alphaDrSurf[1]*F_0Skin[15]-0.4330127018922193*alphaDrSurf[0]*F_0Skin[14]-0.4330127018922193*alphaDrSurf[4]*F_0Skin[13]-0.4330127018922193*alphaDrSurf[5]*F_0Skin[12]+0.25*alphaDrSurf[1]*F_0Skin[11]-0.4330127018922193*alphaDrSurf[2]*F_0Skin[10]-0.4330127018922193*alphaDrSurf[3]*F_0Skin[9]-0.4330127018922193*alphaDrSurf[7]*F_0Skin[8]+0.25*F_0Skin[1]*alphaDrSurf[7]+0.25*alphaDrSurf[0]*F_0Skin[7]-0.4330127018922193*F_0Skin[4]*alphaDrSurf[6]+0.25*F_0Skin[0]*alphaDrSurf[6]+0.25*alphaDrSurf[4]*F_0Skin[6]+0.25*F_0Skin[5]*alphaDrSurf[5]+0.25*F_0Skin[2]*alphaDrSurf[3]+0.25*alphaDrSurf[2]*F_0Skin[3]; - Ghat_F_0[7] = 0.5590169943749476*alphaDrSurf[0]*F_0Skin[23]+0.5590169943749475*alphaDrSurf[1]*F_0Skin[22]+0.5590169943749475*alphaDrSurf[2]*F_0Skin[21]+0.5590169943749475*alphaDrSurf[3]*F_0Skin[20]+0.5590169943749476*alphaDrSurf[4]*F_0Skin[19]+0.5590169943749476*alphaDrSurf[5]*F_0Skin[18]+0.5590169943749476*alphaDrSurf[6]*F_0Skin[17]+0.5590169943749475*alphaDrSurf[7]*F_0Skin[16]-0.4330127018922193*alphaDrSurf[0]*F_0Skin[15]-0.4330127018922193*alphaDrSurf[1]*F_0Skin[14]-0.4330127018922193*alphaDrSurf[2]*F_0Skin[13]-0.4330127018922193*alphaDrSurf[3]*F_0Skin[12]+0.25*alphaDrSurf[0]*F_0Skin[11]-0.4330127018922193*alphaDrSurf[4]*F_0Skin[10]-0.4330127018922193*alphaDrSurf[5]*F_0Skin[9]-0.4330127018922193*alphaDrSurf[6]*F_0Skin[8]-0.4330127018922193*F_0Skin[4]*alphaDrSurf[7]+0.25*F_0Skin[0]*alphaDrSurf[7]+0.25*alphaDrSurf[1]*F_0Skin[7]+0.25*F_0Skin[1]*alphaDrSurf[6]+0.25*alphaDrSurf[2]*F_0Skin[6]+0.25*F_0Skin[2]*alphaDrSurf[5]+0.25*alphaDrSurf[3]*F_0Skin[5]+0.25*F_0Skin[3]*alphaDrSurf[4]; - Ghat_G_1[0] = 0.5590169943749476*alphaDrSurf[7]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[6]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[5]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[4]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[3]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[2]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[1]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[0]*G_1Skin[16]-0.4330127018922193*alphaDrSurf[7]*G_1Skin[15]-0.4330127018922193*alphaDrSurf[6]*G_1Skin[14]-0.4330127018922193*alphaDrSurf[5]*G_1Skin[13]-0.4330127018922193*alphaDrSurf[4]*G_1Skin[12]+0.25*alphaDrSurf[7]*G_1Skin[11]-0.4330127018922193*alphaDrSurf[3]*G_1Skin[10]-0.4330127018922193*alphaDrSurf[2]*G_1Skin[9]-0.4330127018922193*alphaDrSurf[1]*G_1Skin[8]+0.25*alphaDrSurf[6]*G_1Skin[7]+0.25*alphaDrSurf[5]*G_1Skin[6]+0.25*alphaDrSurf[4]*G_1Skin[5]-0.4330127018922193*alphaDrSurf[0]*G_1Skin[4]+0.25*G_1Skin[3]*alphaDrSurf[3]+0.25*G_1Skin[2]*alphaDrSurf[2]+0.25*G_1Skin[1]*alphaDrSurf[1]+0.25*G_1Skin[0]*alphaDrSurf[0]; - Ghat_G_1[1] = 0.5590169943749476*alphaDrSurf[6]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[7]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[3]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[2]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[5]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[4]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[0]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[1]*G_1Skin[16]-0.4330127018922193*alphaDrSurf[6]*G_1Skin[15]-0.4330127018922193*alphaDrSurf[7]*G_1Skin[14]-0.4330127018922193*alphaDrSurf[3]*G_1Skin[13]-0.4330127018922193*alphaDrSurf[2]*G_1Skin[12]+0.25*alphaDrSurf[6]*G_1Skin[11]-0.4330127018922193*alphaDrSurf[5]*G_1Skin[10]-0.4330127018922193*alphaDrSurf[4]*G_1Skin[9]-0.4330127018922193*alphaDrSurf[0]*G_1Skin[8]+0.25*G_1Skin[7]*alphaDrSurf[7]+0.25*alphaDrSurf[3]*G_1Skin[6]+0.25*G_1Skin[3]*alphaDrSurf[5]+0.25*alphaDrSurf[2]*G_1Skin[5]+0.25*G_1Skin[2]*alphaDrSurf[4]-0.4330127018922193*alphaDrSurf[1]*G_1Skin[4]+0.25*G_1Skin[0]*alphaDrSurf[1]+0.25*alphaDrSurf[0]*G_1Skin[1]; - Ghat_G_1[2] = 0.5590169943749476*alphaDrSurf[5]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[3]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[7]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[1]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[6]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[0]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[4]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[2]*G_1Skin[16]-0.4330127018922193*alphaDrSurf[5]*G_1Skin[15]-0.4330127018922193*alphaDrSurf[3]*G_1Skin[14]-0.4330127018922193*alphaDrSurf[7]*G_1Skin[13]-0.4330127018922193*alphaDrSurf[1]*G_1Skin[12]+0.25*alphaDrSurf[5]*G_1Skin[11]-0.4330127018922193*alphaDrSurf[6]*G_1Skin[10]-0.4330127018922193*alphaDrSurf[0]*G_1Skin[9]-0.4330127018922193*alphaDrSurf[4]*G_1Skin[8]+0.25*G_1Skin[6]*alphaDrSurf[7]+0.25*alphaDrSurf[3]*G_1Skin[7]+0.25*G_1Skin[3]*alphaDrSurf[6]+0.25*alphaDrSurf[1]*G_1Skin[5]+0.25*G_1Skin[1]*alphaDrSurf[4]-0.4330127018922193*alphaDrSurf[2]*G_1Skin[4]+0.25*G_1Skin[0]*alphaDrSurf[2]+0.25*alphaDrSurf[0]*G_1Skin[2]; - Ghat_G_1[3] = 0.5590169943749476*alphaDrSurf[4]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[2]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[1]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[7]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[0]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[6]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[5]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[3]*G_1Skin[16]-0.4330127018922193*alphaDrSurf[4]*G_1Skin[15]-0.4330127018922193*alphaDrSurf[2]*G_1Skin[14]-0.4330127018922193*alphaDrSurf[1]*G_1Skin[13]-0.4330127018922193*alphaDrSurf[7]*G_1Skin[12]+0.25*alphaDrSurf[4]*G_1Skin[11]-0.4330127018922193*alphaDrSurf[0]*G_1Skin[10]-0.4330127018922193*alphaDrSurf[6]*G_1Skin[9]-0.4330127018922193*alphaDrSurf[5]*G_1Skin[8]+0.25*G_1Skin[5]*alphaDrSurf[7]+0.25*alphaDrSurf[2]*G_1Skin[7]+0.25*G_1Skin[2]*alphaDrSurf[6]+0.25*alphaDrSurf[1]*G_1Skin[6]+0.25*G_1Skin[1]*alphaDrSurf[5]-0.4330127018922193*alphaDrSurf[3]*G_1Skin[4]+0.25*G_1Skin[0]*alphaDrSurf[3]+0.25*alphaDrSurf[0]*G_1Skin[3]; - Ghat_G_1[4] = 0.5590169943749476*alphaDrSurf[3]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[5]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[6]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[0]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[7]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[1]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[2]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[4]*G_1Skin[16]-0.4330127018922193*alphaDrSurf[3]*G_1Skin[15]-0.4330127018922193*alphaDrSurf[5]*G_1Skin[14]-0.4330127018922193*alphaDrSurf[6]*G_1Skin[13]-0.4330127018922193*alphaDrSurf[0]*G_1Skin[12]+0.25*alphaDrSurf[3]*G_1Skin[11]-0.4330127018922193*alphaDrSurf[7]*G_1Skin[10]-0.4330127018922193*alphaDrSurf[1]*G_1Skin[9]-0.4330127018922193*alphaDrSurf[2]*G_1Skin[8]+0.25*G_1Skin[3]*alphaDrSurf[7]+0.25*alphaDrSurf[5]*G_1Skin[7]+0.25*G_1Skin[6]*alphaDrSurf[6]+0.25*alphaDrSurf[0]*G_1Skin[5]-0.4330127018922193*G_1Skin[4]*alphaDrSurf[4]+0.25*G_1Skin[0]*alphaDrSurf[4]+0.25*G_1Skin[1]*alphaDrSurf[2]+0.25*alphaDrSurf[1]*G_1Skin[2]; - Ghat_G_1[5] = 0.5590169943749476*alphaDrSurf[2]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[4]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[0]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[6]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[1]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[7]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[3]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[5]*G_1Skin[16]-0.4330127018922193*alphaDrSurf[2]*G_1Skin[15]-0.4330127018922193*alphaDrSurf[4]*G_1Skin[14]-0.4330127018922193*alphaDrSurf[0]*G_1Skin[13]-0.4330127018922193*alphaDrSurf[6]*G_1Skin[12]+0.25*alphaDrSurf[2]*G_1Skin[11]-0.4330127018922193*alphaDrSurf[1]*G_1Skin[10]-0.4330127018922193*alphaDrSurf[7]*G_1Skin[9]-0.4330127018922193*alphaDrSurf[3]*G_1Skin[8]+0.25*G_1Skin[2]*alphaDrSurf[7]+0.25*alphaDrSurf[4]*G_1Skin[7]+0.25*G_1Skin[5]*alphaDrSurf[6]+0.25*alphaDrSurf[0]*G_1Skin[6]-0.4330127018922193*G_1Skin[4]*alphaDrSurf[5]+0.25*G_1Skin[0]*alphaDrSurf[5]+0.25*G_1Skin[1]*alphaDrSurf[3]+0.25*alphaDrSurf[1]*G_1Skin[3]; - Ghat_G_1[6] = 0.5590169943749476*alphaDrSurf[1]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[0]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[4]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[5]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[2]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[3]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[7]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[6]*G_1Skin[16]-0.4330127018922193*alphaDrSurf[1]*G_1Skin[15]-0.4330127018922193*alphaDrSurf[0]*G_1Skin[14]-0.4330127018922193*alphaDrSurf[4]*G_1Skin[13]-0.4330127018922193*alphaDrSurf[5]*G_1Skin[12]+0.25*alphaDrSurf[1]*G_1Skin[11]-0.4330127018922193*alphaDrSurf[2]*G_1Skin[10]-0.4330127018922193*alphaDrSurf[3]*G_1Skin[9]-0.4330127018922193*alphaDrSurf[7]*G_1Skin[8]+0.25*G_1Skin[1]*alphaDrSurf[7]+0.25*alphaDrSurf[0]*G_1Skin[7]-0.4330127018922193*G_1Skin[4]*alphaDrSurf[6]+0.25*G_1Skin[0]*alphaDrSurf[6]+0.25*alphaDrSurf[4]*G_1Skin[6]+0.25*G_1Skin[5]*alphaDrSurf[5]+0.25*G_1Skin[2]*alphaDrSurf[3]+0.25*alphaDrSurf[2]*G_1Skin[3]; - Ghat_G_1[7] = 0.5590169943749476*alphaDrSurf[0]*G_1Skin[23]+0.5590169943749475*alphaDrSurf[1]*G_1Skin[22]+0.5590169943749475*alphaDrSurf[2]*G_1Skin[21]+0.5590169943749475*alphaDrSurf[3]*G_1Skin[20]+0.5590169943749476*alphaDrSurf[4]*G_1Skin[19]+0.5590169943749476*alphaDrSurf[5]*G_1Skin[18]+0.5590169943749476*alphaDrSurf[6]*G_1Skin[17]+0.5590169943749475*alphaDrSurf[7]*G_1Skin[16]-0.4330127018922193*alphaDrSurf[0]*G_1Skin[15]-0.4330127018922193*alphaDrSurf[1]*G_1Skin[14]-0.4330127018922193*alphaDrSurf[2]*G_1Skin[13]-0.4330127018922193*alphaDrSurf[3]*G_1Skin[12]+0.25*alphaDrSurf[0]*G_1Skin[11]-0.4330127018922193*alphaDrSurf[4]*G_1Skin[10]-0.4330127018922193*alphaDrSurf[5]*G_1Skin[9]-0.4330127018922193*alphaDrSurf[6]*G_1Skin[8]-0.4330127018922193*G_1Skin[4]*alphaDrSurf[7]+0.25*G_1Skin[0]*alphaDrSurf[7]+0.25*alphaDrSurf[1]*G_1Skin[7]+0.25*G_1Skin[1]*alphaDrSurf[6]+0.25*alphaDrSurf[2]*G_1Skin[6]+0.25*G_1Skin[2]*alphaDrSurf[5]+0.25*alphaDrSurf[3]*G_1Skin[5]+0.25*G_1Skin[3]*alphaDrSurf[4]; + alphaDrSurf[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf[3] = nuSum[3]*wvpar-0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; + alphaDrSurf[4] = nuSum[4]*wvpar-0.5*nuSum[4]*dvpar-1.0*sumNuUPar[4]; + alphaDrSurf[5] = nuSum[5]*wvpar-0.5*nuSum[5]*dvpar-1.0*sumNuUPar[5]; + alphaDrSurf[6] = nuSum[6]*wvpar-0.5*nuSum[6]*dvpar-1.0*sumNuUPar[6]; + alphaDrSurf[7] = nuSum[7]*wvpar-0.5*nuSum[7]*dvpar-1.0*sumNuUPar[7]; + + if ((-0.3535533905932737*alphaDrSurf[7])+0.3535533905932737*(alphaDrSurf[6]+alphaDrSurf[5]+alphaDrSurf[4])-0.3535533905932737*(alphaDrSurf[3]+alphaDrSurf[2]+alphaDrSurf[1])+0.3535533905932737*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_r(F_0Edge); + G_1_UpwindQuad[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_r(G_1Edge); + } else { + F_0_UpwindQuad[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_l(F_0Skin); + G_1_UpwindQuad[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_l(G_1Skin); + } + if (0.3535533905932737*alphaDrSurf[7]-0.3535533905932737*(alphaDrSurf[6]+alphaDrSurf[5])+0.3535533905932737*(alphaDrSurf[4]+alphaDrSurf[3])-0.3535533905932737*(alphaDrSurf[2]+alphaDrSurf[1])+0.3535533905932737*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_r(F_0Edge); + G_1_UpwindQuad[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_r(G_1Edge); + } else { + F_0_UpwindQuad[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_l(F_0Skin); + G_1_UpwindQuad[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_l(G_1Skin); + } + if (0.3535533905932737*alphaDrSurf[7]-0.3535533905932737*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[5]-0.3535533905932737*(alphaDrSurf[4]+alphaDrSurf[3])+0.3535533905932737*alphaDrSurf[2]-0.3535533905932737*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_r(F_0Edge); + G_1_UpwindQuad[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_r(G_1Edge); + } else { + F_0_UpwindQuad[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_l(F_0Skin); + G_1_UpwindQuad[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_l(G_1Skin); + } + if ((-0.3535533905932737*alphaDrSurf[7])+0.3535533905932737*alphaDrSurf[6]-0.3535533905932737*(alphaDrSurf[5]+alphaDrSurf[4])+0.3535533905932737*(alphaDrSurf[3]+alphaDrSurf[2])-0.3535533905932737*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0] < 0) { + F_0_UpwindQuad[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_r(F_0Edge); + G_1_UpwindQuad[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_r(G_1Edge); + } else { + F_0_UpwindQuad[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_l(F_0Skin); + G_1_UpwindQuad[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_l(G_1Skin); + } + if (0.3535533905932737*(alphaDrSurf[7]+alphaDrSurf[6])-0.3535533905932737*(alphaDrSurf[5]+alphaDrSurf[4]+alphaDrSurf[3]+alphaDrSurf[2])+0.3535533905932737*(alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_r(F_0Edge); + G_1_UpwindQuad[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_r(G_1Edge); + } else { + F_0_UpwindQuad[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_l(F_0Skin); + G_1_UpwindQuad[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_l(G_1Skin); + } + if ((-0.3535533905932737*(alphaDrSurf[7]+alphaDrSurf[6]))+0.3535533905932737*alphaDrSurf[5]-0.3535533905932737*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[3]-0.3535533905932737*alphaDrSurf[2]+0.3535533905932737*(alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_r(F_0Edge); + G_1_UpwindQuad[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_r(G_1Edge); + } else { + F_0_UpwindQuad[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_l(F_0Skin); + G_1_UpwindQuad[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_l(G_1Skin); + } + if ((-0.3535533905932737*(alphaDrSurf[7]+alphaDrSurf[6]+alphaDrSurf[5]))+0.3535533905932737*alphaDrSurf[4]-0.3535533905932737*alphaDrSurf[3]+0.3535533905932737*(alphaDrSurf[2]+alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_r(F_0Edge); + G_1_UpwindQuad[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_r(G_1Edge); + } else { + F_0_UpwindQuad[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_l(F_0Skin); + G_1_UpwindQuad[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_l(G_1Skin); + } + if (0.3535533905932737*(alphaDrSurf[7]+alphaDrSurf[6]+alphaDrSurf[5]+alphaDrSurf[4]+alphaDrSurf[3]+alphaDrSurf[2]+alphaDrSurf[1]+alphaDrSurf[0]) < 0) { + F_0_UpwindQuad[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_r(F_0Edge); + G_1_UpwindQuad[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_r(G_1Edge); + } else { + F_0_UpwindQuad[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_l(F_0Skin); + G_1_UpwindQuad[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_l(G_1Skin); + } + + // Project tensor nodal quadrature basis back onto modal basis. + hyb_3x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad, F_0_Upwind); + hyb_3x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad, G_1_Upwind); + + Ghat_F_0[0] = 0.3535533905932737*F_0_Upwind[7]*alphaDrSurf[7]+0.3535533905932737*F_0_Upwind[6]*alphaDrSurf[6]+0.3535533905932737*F_0_Upwind[5]*alphaDrSurf[5]+0.3535533905932737*F_0_Upwind[4]*alphaDrSurf[4]+0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[3]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[2]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[1]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[0]; + Ghat_F_0[1] = 0.3535533905932737*F_0_Upwind[6]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[6]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[3]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[4]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[1]; + Ghat_F_0[2] = 0.3535533905932737*F_0_Upwind[5]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[5]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[3]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[4]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[2]; + Ghat_F_0[3] = 0.3535533905932737*F_0_Upwind[4]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[4]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[3]; + Ghat_F_0[4] = 0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[3]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[5]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[5]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[4]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[2]; + Ghat_F_0[5] = 0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[4]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[4]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[3]; + Ghat_F_0[6] = 0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[4]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[4]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[3]; + Ghat_F_0[7] = 0.3535533905932737*F_0_Upwind[0]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[0]*F_0_Upwind[7]+0.3535533905932737*F_0_Upwind[1]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[1]*F_0_Upwind[6]+0.3535533905932737*F_0_Upwind[2]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[2]*F_0_Upwind[5]+0.3535533905932737*F_0_Upwind[3]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[3]*F_0_Upwind[4]; + Ghat_G_1[0] = 0.3535533905932737*G_1_Upwind[7]*alphaDrSurf[7]+0.3535533905932737*G_1_Upwind[6]*alphaDrSurf[6]+0.3535533905932737*G_1_Upwind[5]*alphaDrSurf[5]+0.3535533905932737*G_1_Upwind[4]*alphaDrSurf[4]+0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[3]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[2]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[1]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[0]; + Ghat_G_1[1] = 0.3535533905932737*G_1_Upwind[6]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[6]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[3]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[4]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[1]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[1]; + Ghat_G_1[2] = 0.3535533905932737*G_1_Upwind[5]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[5]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[3]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[4]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[2]; + Ghat_G_1[3] = 0.3535533905932737*G_1_Upwind[4]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[4]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[3]; + Ghat_G_1[4] = 0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[3]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[5]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[5]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[4]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[2]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[2]; + Ghat_G_1[5] = 0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[4]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[4]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[3]; + Ghat_G_1[6] = 0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[4]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[4]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[3]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[3]; + Ghat_G_1[7] = 0.3535533905932737*G_1_Upwind[0]*alphaDrSurf[7]+0.3535533905932737*alphaDrSurf[0]*G_1_Upwind[7]+0.3535533905932737*G_1_Upwind[1]*alphaDrSurf[6]+0.3535533905932737*alphaDrSurf[1]*G_1_Upwind[6]+0.3535533905932737*G_1_Upwind[2]*alphaDrSurf[5]+0.3535533905932737*alphaDrSurf[2]*G_1_Upwind[5]+0.3535533905932737*G_1_Upwind[3]*alphaDrSurf[4]+0.3535533905932737*alphaDrSurf[3]*G_1_Upwind[4]; out_F_0[0] += -0.7071067811865475*Ghat_F_0[0]*dv1par; out_F_0[1] += -0.7071067811865475*Ghat_F_0[1]*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1.c index d76b94221..0d1c887e3 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[2]: cell-center coordinates. - // dxv[2]: cell spacing. - // nu: collisionalities added (self and cross species collisionalities). - // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fl/fc/fr: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)] in left/center/right cells. + // out: Incremented output distribution functions in center cell. const double dv1par = 2.0/dxv[1]; const double dvpar = dxv[1], wvpar = w[1]; @@ -18,43 +21,74 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p1(const double *w, con double *out_F_0 = &out[0]; double *out_G_1 = &out[6]; + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrSurf_l[2] = {0.0}; - alphaDrSurf_l[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf_l[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; + alphaDrSurf_l[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_l[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; double alphaDrSurf_r[2] = {0.0}; - alphaDrSurf_r[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf_r[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - - double Ghat_F_0_r[2]; - double Ghat_F_0_l[2]; - double Ghat_G_1_r[2]; - double Ghat_G_1_l[2]; - if (wvpar>0) { - - Ghat_F_0_r[0] = 1.118033988749895*(alphaDrSurf_r[1]*F_0r[5]+alphaDrSurf_r[0]*F_0r[4])-0.8660254037844386*(alphaDrSurf_r[1]*F_0r[3]+alphaDrSurf_r[0]*F_0r[2])+0.5*(F_0r[1]*alphaDrSurf_r[1]+F_0r[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = 1.118033988749895*(alphaDrSurf_r[0]*F_0r[5]+alphaDrSurf_r[1]*F_0r[4])-0.8660254037844386*(alphaDrSurf_r[0]*F_0r[3]+alphaDrSurf_r[1]*F_0r[2])+0.5*(F_0r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0r[1]); - Ghat_G_1_r[0] = 1.118033988749895*(alphaDrSurf_r[1]*G_1r[5]+alphaDrSurf_r[0]*G_1r[4])-0.8660254037844386*(alphaDrSurf_r[1]*G_1r[3]+alphaDrSurf_r[0]*G_1r[2])+0.5*(G_1r[1]*alphaDrSurf_r[1]+G_1r[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = 1.118033988749895*(alphaDrSurf_r[0]*G_1r[5]+alphaDrSurf_r[1]*G_1r[4])-0.8660254037844386*(alphaDrSurf_r[0]*G_1r[3]+alphaDrSurf_r[1]*G_1r[2])+0.5*(G_1r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1r[1]); + alphaDrSurf_r[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_r[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; - Ghat_F_0_l[0] = 1.118033988749895*(alphaDrSurf_l[1]*F_0c[5]+alphaDrSurf_l[0]*F_0c[4])-0.8660254037844386*(alphaDrSurf_l[1]*F_0c[3]+alphaDrSurf_l[0]*F_0c[2])+0.5*(F_0c[1]*alphaDrSurf_l[1]+F_0c[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = 1.118033988749895*(alphaDrSurf_l[0]*F_0c[5]+alphaDrSurf_l[1]*F_0c[4])-0.8660254037844386*(alphaDrSurf_l[0]*F_0c[3]+alphaDrSurf_l[1]*F_0c[2])+0.5*(F_0c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0c[1]); - Ghat_G_1_l[0] = 1.118033988749895*(alphaDrSurf_l[1]*G_1c[5]+alphaDrSurf_l[0]*G_1c[4])-0.8660254037844386*(alphaDrSurf_l[1]*G_1c[3]+alphaDrSurf_l[0]*G_1c[2])+0.5*(G_1c[1]*alphaDrSurf_l[1]+G_1c[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = 1.118033988749895*(alphaDrSurf_l[0]*G_1c[5]+alphaDrSurf_l[1]*G_1c[4])-0.8660254037844386*(alphaDrSurf_l[0]*G_1c[3]+alphaDrSurf_l[1]*G_1c[2])+0.5*(G_1c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1c[1]); + double F_0_UpwindQuad_l[2] = {0.0}; + double F_0_UpwindQuad_r[2] = {0.0}; + double F_0_Upwind_l[2] = {0.0}; + double F_0_Upwind_r[2] = {0.0}; + double Ghat_F_0_l[2] = {0.0}; + double Ghat_F_0_r[2] = {0.0}; + double G_1_UpwindQuad_l[2] = {0.0}; + double G_1_UpwindQuad_r[2] = {0.0}; + double G_1_Upwind_l[2] = {0.0}; + double G_1_Upwind_r[2] = {0.0}; + double Ghat_G_1_l[2] = {0.0}; + double Ghat_G_1_r[2] = {0.0}; + if (0.7071067811865475*alphaDrSurf_l[0]-0.7071067811865475*alphaDrSurf_l[1] < 0) { + F_0_UpwindQuad_l[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_r(F_0l); + G_1_UpwindQuad_l[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_r(G_1l); + } else { + F_0_UpwindQuad_l[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_l(F_0c); + G_1_UpwindQuad_l[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_l(G_1c); + } + if (0.7071067811865475*alphaDrSurf_r[0]-0.7071067811865475*alphaDrSurf_r[1] < 0) { + F_0_UpwindQuad_r[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_r(F_0c); + G_1_UpwindQuad_r[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_r(G_1c); + } else { + F_0_UpwindQuad_r[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_l(F_0r); + G_1_UpwindQuad_r[0] = hyb_1x1v_p1_surfx2_eval_quad_node_0_l(G_1r); + } + if (0.7071067811865475*(alphaDrSurf_l[1]+alphaDrSurf_l[0]) < 0) { + F_0_UpwindQuad_l[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_r(F_0l); + G_1_UpwindQuad_l[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_r(G_1l); + } else { + F_0_UpwindQuad_l[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_l(F_0c); + G_1_UpwindQuad_l[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_l(G_1c); + } + if (0.7071067811865475*(alphaDrSurf_r[1]+alphaDrSurf_r[0]) < 0) { + F_0_UpwindQuad_r[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_r(F_0c); + G_1_UpwindQuad_r[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_r(G_1c); } else { + F_0_UpwindQuad_r[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_l(F_0r); + G_1_UpwindQuad_r[1] = hyb_1x1v_p1_surfx2_eval_quad_node_1_l(G_1r); + } - Ghat_F_0_r[0] = 1.118033988749895*(alphaDrSurf_r[1]*F_0c[5]+alphaDrSurf_r[0]*F_0c[4])+0.8660254037844386*(alphaDrSurf_r[1]*F_0c[3]+alphaDrSurf_r[0]*F_0c[2])+0.5*(F_0c[1]*alphaDrSurf_r[1]+F_0c[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = 1.118033988749895*(alphaDrSurf_r[0]*F_0c[5]+alphaDrSurf_r[1]*F_0c[4])+0.8660254037844386*(alphaDrSurf_r[0]*F_0c[3]+alphaDrSurf_r[1]*F_0c[2])+0.5*(F_0c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0c[1]); - Ghat_G_1_r[0] = 1.118033988749895*(alphaDrSurf_r[1]*G_1c[5]+alphaDrSurf_r[0]*G_1c[4])+0.8660254037844386*(alphaDrSurf_r[1]*G_1c[3]+alphaDrSurf_r[0]*G_1c[2])+0.5*(G_1c[1]*alphaDrSurf_r[1]+G_1c[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = 1.118033988749895*(alphaDrSurf_r[0]*G_1c[5]+alphaDrSurf_r[1]*G_1c[4])+0.8660254037844386*(alphaDrSurf_r[0]*G_1c[3]+alphaDrSurf_r[1]*G_1c[2])+0.5*(G_1c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1c[1]); + // Project tensor nodal quadrature basis back onto modal basis. + hyb_1x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad_l, F_0_Upwind_l); + hyb_1x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad_r, F_0_Upwind_r); + hyb_1x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad_l, G_1_Upwind_l); + hyb_1x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad_r, G_1_Upwind_r); - Ghat_F_0_l[0] = 1.118033988749895*(alphaDrSurf_l[1]*F_0l[5]+alphaDrSurf_l[0]*F_0l[4])+0.8660254037844386*(alphaDrSurf_l[1]*F_0l[3]+alphaDrSurf_l[0]*F_0l[2])+0.5*(F_0l[1]*alphaDrSurf_l[1]+F_0l[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = 1.118033988749895*(alphaDrSurf_l[0]*F_0l[5]+alphaDrSurf_l[1]*F_0l[4])+0.8660254037844386*(alphaDrSurf_l[0]*F_0l[3]+alphaDrSurf_l[1]*F_0l[2])+0.5*(F_0l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0l[1]); - Ghat_G_1_l[0] = 1.118033988749895*(alphaDrSurf_l[1]*G_1l[5]+alphaDrSurf_l[0]*G_1l[4])+0.8660254037844386*(alphaDrSurf_l[1]*G_1l[3]+alphaDrSurf_l[0]*G_1l[2])+0.5*(G_1l[1]*alphaDrSurf_l[1]+G_1l[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = 1.118033988749895*(alphaDrSurf_l[0]*G_1l[5]+alphaDrSurf_l[1]*G_1l[4])+0.8660254037844386*(alphaDrSurf_l[0]*G_1l[3]+alphaDrSurf_l[1]*G_1l[2])+0.5*(G_1l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1l[1]); + Ghat_F_0_l[0] = 0.7071067811865475*(F_0_Upwind_l[1]*alphaDrSurf_l[1]+F_0_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_F_0_l[1] = 0.7071067811865475*(F_0_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0_Upwind_l[1]); + Ghat_G_1_l[0] = 0.7071067811865475*(G_1_Upwind_l[1]*alphaDrSurf_l[1]+G_1_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_G_1_l[1] = 0.7071067811865475*(G_1_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1_Upwind_l[1]); + + Ghat_F_0_r[0] = 0.7071067811865475*(F_0_Upwind_r[1]*alphaDrSurf_r[1]+F_0_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_F_0_r[1] = 0.7071067811865475*(F_0_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0_Upwind_r[1]); + Ghat_G_1_r[0] = 0.7071067811865475*(G_1_Upwind_r[1]*alphaDrSurf_r[1]+G_1_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_G_1_r[1] = 0.7071067811865475*(G_1_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1_Upwind_r[1]); - } out_F_0[0] += (0.7071067811865475*Ghat_F_0_r[0]-0.7071067811865475*Ghat_F_0_l[0])*dv1par; out_F_0[1] += (0.7071067811865475*Ghat_F_0_r[1]-0.7071067811865475*Ghat_F_0_l[1])*dv1par; out_F_0[2] += 1.224744871391589*(Ghat_F_0_r[0]+Ghat_F_0_l[0])*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2.c index a54d30d97..ca0f13fa9 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[2]: cell-center coordinates. - // dxv[2]: cell spacing. - // nu: collisionalities added (self and cross species collisionalities). - // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fl/fc/fr: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)] in left/center/right cells. + // out: Incremented output distribution functions in center cell. const double dv1par = 2.0/dxv[1]; const double dvpar = dxv[1], wvpar = w[1]; @@ -18,53 +21,94 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_ser_p2(const double *w, con double *out_F_0 = &out[0]; double *out_G_1 = &out[8]; + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrSurf_l[3] = {0.0}; - alphaDrSurf_l[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf_l[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf_l[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; + alphaDrSurf_l[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_l[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_l[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; double alphaDrSurf_r[3] = {0.0}; - alphaDrSurf_r[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf_r[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf_r[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; - - double Ghat_F_0_r[3]; - double Ghat_F_0_l[3]; - double Ghat_G_1_r[3]; - double Ghat_G_1_l[3]; - if (wvpar>0) { + alphaDrSurf_r[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_r[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_r[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; - Ghat_F_0_r[0] = 1.118033988749895*alphaDrSurf_r[1]*F_0r[7]-0.8660254037844386*alphaDrSurf_r[2]*F_0r[6]+1.118033988749895*alphaDrSurf_r[0]*F_0r[5]+0.5*alphaDrSurf_r[2]*F_0r[4]-0.8660254037844386*(alphaDrSurf_r[1]*F_0r[3]+alphaDrSurf_r[0]*F_0r[2])+0.5*(F_0r[1]*alphaDrSurf_r[1]+F_0r[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = (alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*F_0r[7]+alphaDrSurf_r[1]*((-0.7745966692414833*F_0r[6])+1.118033988749895*F_0r[5]+0.4472135954999579*F_0r[4])+((-0.7745966692414833*alphaDrSurf_r[2])-0.8660254037844386*alphaDrSurf_r[0])*F_0r[3]+0.4472135954999579*F_0r[1]*alphaDrSurf_r[2]-0.8660254037844386*alphaDrSurf_r[1]*F_0r[2]+0.5*(F_0r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0r[1]); - Ghat_F_0_r[2] = alphaDrSurf_r[1]*F_0r[7]+((-0.5532833351724881*alphaDrSurf_r[2])-0.8660254037844386*alphaDrSurf_r[0])*F_0r[6]+1.118033988749895*alphaDrSurf_r[2]*F_0r[5]+(0.31943828249997*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0])*F_0r[4]-0.7745966692414833*alphaDrSurf_r[1]*F_0r[3]+(0.5*F_0r[0]-0.8660254037844386*F_0r[2])*alphaDrSurf_r[2]+0.4472135954999579*F_0r[1]*alphaDrSurf_r[1]; - Ghat_G_1_r[0] = 1.118033988749895*alphaDrSurf_r[1]*G_1r[7]-0.8660254037844386*alphaDrSurf_r[2]*G_1r[6]+1.118033988749895*alphaDrSurf_r[0]*G_1r[5]+0.5*alphaDrSurf_r[2]*G_1r[4]-0.8660254037844386*(alphaDrSurf_r[1]*G_1r[3]+alphaDrSurf_r[0]*G_1r[2])+0.5*(G_1r[1]*alphaDrSurf_r[1]+G_1r[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = (alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*G_1r[7]+alphaDrSurf_r[1]*((-0.7745966692414833*G_1r[6])+1.118033988749895*G_1r[5]+0.4472135954999579*G_1r[4])+((-0.7745966692414833*alphaDrSurf_r[2])-0.8660254037844386*alphaDrSurf_r[0])*G_1r[3]+0.4472135954999579*G_1r[1]*alphaDrSurf_r[2]-0.8660254037844386*alphaDrSurf_r[1]*G_1r[2]+0.5*(G_1r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1r[1]); - Ghat_G_1_r[2] = alphaDrSurf_r[1]*G_1r[7]+((-0.5532833351724881*alphaDrSurf_r[2])-0.8660254037844386*alphaDrSurf_r[0])*G_1r[6]+1.118033988749895*alphaDrSurf_r[2]*G_1r[5]+(0.31943828249997*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0])*G_1r[4]-0.7745966692414833*alphaDrSurf_r[1]*G_1r[3]+(0.5*G_1r[0]-0.8660254037844386*G_1r[2])*alphaDrSurf_r[2]+0.4472135954999579*G_1r[1]*alphaDrSurf_r[1]; - - Ghat_F_0_l[0] = 1.118033988749895*alphaDrSurf_l[1]*F_0c[7]-0.8660254037844386*alphaDrSurf_l[2]*F_0c[6]+1.118033988749895*alphaDrSurf_l[0]*F_0c[5]+0.5*alphaDrSurf_l[2]*F_0c[4]-0.8660254037844386*(alphaDrSurf_l[1]*F_0c[3]+alphaDrSurf_l[0]*F_0c[2])+0.5*(F_0c[1]*alphaDrSurf_l[1]+F_0c[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = (alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*F_0c[7]+alphaDrSurf_l[1]*((-0.7745966692414833*F_0c[6])+1.118033988749895*F_0c[5]+0.4472135954999579*F_0c[4])+((-0.7745966692414833*alphaDrSurf_l[2])-0.8660254037844386*alphaDrSurf_l[0])*F_0c[3]+0.4472135954999579*F_0c[1]*alphaDrSurf_l[2]-0.8660254037844386*alphaDrSurf_l[1]*F_0c[2]+0.5*(F_0c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0c[1]); - Ghat_F_0_l[2] = alphaDrSurf_l[1]*F_0c[7]+((-0.5532833351724881*alphaDrSurf_l[2])-0.8660254037844386*alphaDrSurf_l[0])*F_0c[6]+1.118033988749895*alphaDrSurf_l[2]*F_0c[5]+(0.31943828249997*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0])*F_0c[4]-0.7745966692414833*alphaDrSurf_l[1]*F_0c[3]+(0.5*F_0c[0]-0.8660254037844386*F_0c[2])*alphaDrSurf_l[2]+0.4472135954999579*F_0c[1]*alphaDrSurf_l[1]; - Ghat_G_1_l[0] = 1.118033988749895*alphaDrSurf_l[1]*G_1c[7]-0.8660254037844386*alphaDrSurf_l[2]*G_1c[6]+1.118033988749895*alphaDrSurf_l[0]*G_1c[5]+0.5*alphaDrSurf_l[2]*G_1c[4]-0.8660254037844386*(alphaDrSurf_l[1]*G_1c[3]+alphaDrSurf_l[0]*G_1c[2])+0.5*(G_1c[1]*alphaDrSurf_l[1]+G_1c[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = (alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*G_1c[7]+alphaDrSurf_l[1]*((-0.7745966692414833*G_1c[6])+1.118033988749895*G_1c[5]+0.4472135954999579*G_1c[4])+((-0.7745966692414833*alphaDrSurf_l[2])-0.8660254037844386*alphaDrSurf_l[0])*G_1c[3]+0.4472135954999579*G_1c[1]*alphaDrSurf_l[2]-0.8660254037844386*alphaDrSurf_l[1]*G_1c[2]+0.5*(G_1c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1c[1]); - Ghat_G_1_l[2] = alphaDrSurf_l[1]*G_1c[7]+((-0.5532833351724881*alphaDrSurf_l[2])-0.8660254037844386*alphaDrSurf_l[0])*G_1c[6]+1.118033988749895*alphaDrSurf_l[2]*G_1c[5]+(0.31943828249997*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0])*G_1c[4]-0.7745966692414833*alphaDrSurf_l[1]*G_1c[3]+(0.5*G_1c[0]-0.8660254037844386*G_1c[2])*alphaDrSurf_l[2]+0.4472135954999579*G_1c[1]*alphaDrSurf_l[1]; + double F_0_UpwindQuad_l[3] = {0.0}; + double F_0_UpwindQuad_r[3] = {0.0}; + double F_0_Upwind_l[3] = {0.0}; + double F_0_Upwind_r[3] = {0.0}; + double Ghat_F_0_l[3] = {0.0}; + double Ghat_F_0_r[3] = {0.0}; + double G_1_UpwindQuad_l[3] = {0.0}; + double G_1_UpwindQuad_r[3] = {0.0}; + double G_1_Upwind_l[3] = {0.0}; + double G_1_Upwind_r[3] = {0.0}; + double Ghat_G_1_l[3] = {0.0}; + double Ghat_G_1_r[3] = {0.0}; + if (0.6324555320336759*alphaDrSurf_l[2]-0.9486832980505137*alphaDrSurf_l[1]+0.7071067811865475*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[0] = ser_2x_p2_surfx2_eval_quad_node_0_r(F_0l); + G_1_UpwindQuad_l[0] = ser_2x_p2_surfx2_eval_quad_node_0_r(G_1l); + } else { + F_0_UpwindQuad_l[0] = ser_2x_p2_surfx2_eval_quad_node_0_l(F_0c); + G_1_UpwindQuad_l[0] = ser_2x_p2_surfx2_eval_quad_node_0_l(G_1c); + } + if (0.6324555320336759*alphaDrSurf_r[2]-0.9486832980505137*alphaDrSurf_r[1]+0.7071067811865475*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[0] = ser_2x_p2_surfx2_eval_quad_node_0_r(F_0c); + G_1_UpwindQuad_r[0] = ser_2x_p2_surfx2_eval_quad_node_0_r(G_1c); + } else { + F_0_UpwindQuad_r[0] = ser_2x_p2_surfx2_eval_quad_node_0_l(F_0r); + G_1_UpwindQuad_r[0] = ser_2x_p2_surfx2_eval_quad_node_0_l(G_1r); + } + if (0.7071067811865475*alphaDrSurf_l[0]-0.7905694150420947*alphaDrSurf_l[2] < 0) { + F_0_UpwindQuad_l[1] = ser_2x_p2_surfx2_eval_quad_node_1_r(F_0l); + G_1_UpwindQuad_l[1] = ser_2x_p2_surfx2_eval_quad_node_1_r(G_1l); + } else { + F_0_UpwindQuad_l[1] = ser_2x_p2_surfx2_eval_quad_node_1_l(F_0c); + G_1_UpwindQuad_l[1] = ser_2x_p2_surfx2_eval_quad_node_1_l(G_1c); + } + if (0.7071067811865475*alphaDrSurf_r[0]-0.7905694150420947*alphaDrSurf_r[2] < 0) { + F_0_UpwindQuad_r[1] = ser_2x_p2_surfx2_eval_quad_node_1_r(F_0c); + G_1_UpwindQuad_r[1] = ser_2x_p2_surfx2_eval_quad_node_1_r(G_1c); + } else { + F_0_UpwindQuad_r[1] = ser_2x_p2_surfx2_eval_quad_node_1_l(F_0r); + G_1_UpwindQuad_r[1] = ser_2x_p2_surfx2_eval_quad_node_1_l(G_1r); + } + if (0.6324555320336759*alphaDrSurf_l[2]+0.9486832980505137*alphaDrSurf_l[1]+0.7071067811865475*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[2] = ser_2x_p2_surfx2_eval_quad_node_2_r(F_0l); + G_1_UpwindQuad_l[2] = ser_2x_p2_surfx2_eval_quad_node_2_r(G_1l); + } else { + F_0_UpwindQuad_l[2] = ser_2x_p2_surfx2_eval_quad_node_2_l(F_0c); + G_1_UpwindQuad_l[2] = ser_2x_p2_surfx2_eval_quad_node_2_l(G_1c); + } + if (0.6324555320336759*alphaDrSurf_r[2]+0.9486832980505137*alphaDrSurf_r[1]+0.7071067811865475*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[2] = ser_2x_p2_surfx2_eval_quad_node_2_r(F_0c); + G_1_UpwindQuad_r[2] = ser_2x_p2_surfx2_eval_quad_node_2_r(G_1c); } else { + F_0_UpwindQuad_r[2] = ser_2x_p2_surfx2_eval_quad_node_2_l(F_0r); + G_1_UpwindQuad_r[2] = ser_2x_p2_surfx2_eval_quad_node_2_l(G_1r); + } - Ghat_F_0_r[0] = 1.118033988749895*alphaDrSurf_r[1]*F_0c[7]+0.8660254037844386*alphaDrSurf_r[2]*F_0c[6]+1.118033988749895*alphaDrSurf_r[0]*F_0c[5]+0.5*alphaDrSurf_r[2]*F_0c[4]+0.8660254037844386*(alphaDrSurf_r[1]*F_0c[3]+alphaDrSurf_r[0]*F_0c[2])+0.5*(F_0c[1]*alphaDrSurf_r[1]+F_0c[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = (alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*F_0c[7]+alphaDrSurf_r[1]*(0.7745966692414833*F_0c[6]+1.118033988749895*F_0c[5]+0.4472135954999579*F_0c[4])+(0.7745966692414833*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[0])*F_0c[3]+0.4472135954999579*F_0c[1]*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[1]*F_0c[2]+0.5*(F_0c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0c[1]); - Ghat_F_0_r[2] = alphaDrSurf_r[1]*F_0c[7]+(0.5532833351724881*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[0])*F_0c[6]+1.118033988749895*alphaDrSurf_r[2]*F_0c[5]+(0.31943828249997*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0])*F_0c[4]+0.7745966692414833*alphaDrSurf_r[1]*F_0c[3]+(0.8660254037844386*F_0c[2]+0.5*F_0c[0])*alphaDrSurf_r[2]+0.4472135954999579*F_0c[1]*alphaDrSurf_r[1]; - Ghat_G_1_r[0] = 1.118033988749895*alphaDrSurf_r[1]*G_1c[7]+0.8660254037844386*alphaDrSurf_r[2]*G_1c[6]+1.118033988749895*alphaDrSurf_r[0]*G_1c[5]+0.5*alphaDrSurf_r[2]*G_1c[4]+0.8660254037844386*(alphaDrSurf_r[1]*G_1c[3]+alphaDrSurf_r[0]*G_1c[2])+0.5*(G_1c[1]*alphaDrSurf_r[1]+G_1c[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = (alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*G_1c[7]+alphaDrSurf_r[1]*(0.7745966692414833*G_1c[6]+1.118033988749895*G_1c[5]+0.4472135954999579*G_1c[4])+(0.7745966692414833*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[0])*G_1c[3]+0.4472135954999579*G_1c[1]*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[1]*G_1c[2]+0.5*(G_1c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1c[1]); - Ghat_G_1_r[2] = alphaDrSurf_r[1]*G_1c[7]+(0.5532833351724881*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[0])*G_1c[6]+1.118033988749895*alphaDrSurf_r[2]*G_1c[5]+(0.31943828249997*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0])*G_1c[4]+0.7745966692414833*alphaDrSurf_r[1]*G_1c[3]+(0.8660254037844386*G_1c[2]+0.5*G_1c[0])*alphaDrSurf_r[2]+0.4472135954999579*G_1c[1]*alphaDrSurf_r[1]; + // Project tensor nodal quadrature basis back onto modal basis. + ser_2x_p2_upwind_quad_to_modal(F_0_UpwindQuad_l, F_0_Upwind_l); + ser_2x_p2_upwind_quad_to_modal(F_0_UpwindQuad_r, F_0_Upwind_r); + ser_2x_p2_upwind_quad_to_modal(G_1_UpwindQuad_l, G_1_Upwind_l); + ser_2x_p2_upwind_quad_to_modal(G_1_UpwindQuad_r, G_1_Upwind_r); - Ghat_F_0_l[0] = 1.118033988749895*alphaDrSurf_l[1]*F_0l[7]+0.8660254037844386*alphaDrSurf_l[2]*F_0l[6]+1.118033988749895*alphaDrSurf_l[0]*F_0l[5]+0.5*alphaDrSurf_l[2]*F_0l[4]+0.8660254037844386*(alphaDrSurf_l[1]*F_0l[3]+alphaDrSurf_l[0]*F_0l[2])+0.5*(F_0l[1]*alphaDrSurf_l[1]+F_0l[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = (alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*F_0l[7]+alphaDrSurf_l[1]*(0.7745966692414833*F_0l[6]+1.118033988749895*F_0l[5]+0.4472135954999579*F_0l[4])+(0.7745966692414833*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[0])*F_0l[3]+0.4472135954999579*F_0l[1]*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[1]*F_0l[2]+0.5*(F_0l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0l[1]); - Ghat_F_0_l[2] = alphaDrSurf_l[1]*F_0l[7]+(0.5532833351724881*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[0])*F_0l[6]+1.118033988749895*alphaDrSurf_l[2]*F_0l[5]+(0.31943828249997*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0])*F_0l[4]+0.7745966692414833*alphaDrSurf_l[1]*F_0l[3]+(0.8660254037844386*F_0l[2]+0.5*F_0l[0])*alphaDrSurf_l[2]+0.4472135954999579*F_0l[1]*alphaDrSurf_l[1]; - Ghat_G_1_l[0] = 1.118033988749895*alphaDrSurf_l[1]*G_1l[7]+0.8660254037844386*alphaDrSurf_l[2]*G_1l[6]+1.118033988749895*alphaDrSurf_l[0]*G_1l[5]+0.5*alphaDrSurf_l[2]*G_1l[4]+0.8660254037844386*(alphaDrSurf_l[1]*G_1l[3]+alphaDrSurf_l[0]*G_1l[2])+0.5*(G_1l[1]*alphaDrSurf_l[1]+G_1l[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = (alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*G_1l[7]+alphaDrSurf_l[1]*(0.7745966692414833*G_1l[6]+1.118033988749895*G_1l[5]+0.4472135954999579*G_1l[4])+(0.7745966692414833*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[0])*G_1l[3]+0.4472135954999579*G_1l[1]*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[1]*G_1l[2]+0.5*(G_1l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1l[1]); - Ghat_G_1_l[2] = alphaDrSurf_l[1]*G_1l[7]+(0.5532833351724881*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[0])*G_1l[6]+1.118033988749895*alphaDrSurf_l[2]*G_1l[5]+(0.31943828249997*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0])*G_1l[4]+0.7745966692414833*alphaDrSurf_l[1]*G_1l[3]+(0.8660254037844386*G_1l[2]+0.5*G_1l[0])*alphaDrSurf_l[2]+0.4472135954999579*G_1l[1]*alphaDrSurf_l[1]; + Ghat_F_0_l[0] = 0.7071067811865475*(F_0_Upwind_l[2]*alphaDrSurf_l[2]+F_0_Upwind_l[1]*alphaDrSurf_l[1]+F_0_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_F_0_l[1] = 0.6324555320336759*(F_0_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0_Upwind_l[2])+0.7071067811865475*(F_0_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0_Upwind_l[1]); + Ghat_F_0_l[2] = 0.4517539514526256*F_0_Upwind_l[2]*alphaDrSurf_l[2]+0.7071067811865475*(F_0_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0_Upwind_l[2])+0.6324555320336759*F_0_Upwind_l[1]*alphaDrSurf_l[1]; + Ghat_G_1_l[0] = 0.7071067811865475*(G_1_Upwind_l[2]*alphaDrSurf_l[2]+G_1_Upwind_l[1]*alphaDrSurf_l[1]+G_1_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_G_1_l[1] = 0.6324555320336759*(G_1_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1_Upwind_l[2])+0.7071067811865475*(G_1_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1_Upwind_l[1]); + Ghat_G_1_l[2] = 0.4517539514526256*G_1_Upwind_l[2]*alphaDrSurf_l[2]+0.7071067811865475*(G_1_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1_Upwind_l[2])+0.6324555320336759*G_1_Upwind_l[1]*alphaDrSurf_l[1]; + + Ghat_F_0_r[0] = 0.7071067811865475*(F_0_Upwind_r[2]*alphaDrSurf_r[2]+F_0_Upwind_r[1]*alphaDrSurf_r[1]+F_0_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_F_0_r[1] = 0.6324555320336759*(F_0_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0_Upwind_r[2])+0.7071067811865475*(F_0_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0_Upwind_r[1]); + Ghat_F_0_r[2] = 0.4517539514526256*F_0_Upwind_r[2]*alphaDrSurf_r[2]+0.7071067811865475*(F_0_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0_Upwind_r[2])+0.6324555320336759*F_0_Upwind_r[1]*alphaDrSurf_r[1]; + Ghat_G_1_r[0] = 0.7071067811865475*(G_1_Upwind_r[2]*alphaDrSurf_r[2]+G_1_Upwind_r[1]*alphaDrSurf_r[1]+G_1_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_G_1_r[1] = 0.6324555320336759*(G_1_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1_Upwind_r[2])+0.7071067811865475*(G_1_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1_Upwind_r[1]); + Ghat_G_1_r[2] = 0.4517539514526256*G_1_Upwind_r[2]*alphaDrSurf_r[2]+0.7071067811865475*(G_1_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1_Upwind_r[2])+0.6324555320336759*G_1_Upwind_r[1]*alphaDrSurf_r[1]; - } out_F_0[0] += (0.7071067811865475*Ghat_F_0_r[0]-0.7071067811865475*Ghat_F_0_l[0])*dv1par; out_F_0[1] += (0.7071067811865475*Ghat_F_0_r[1]-0.7071067811865475*Ghat_F_0_l[1])*dv1par; out_F_0[2] += 1.224744871391589*(Ghat_F_0_r[0]+Ghat_F_0_l[0])*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2.c index 961ac2b57..9c54930e2 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[2]: cell-center coordinates. - // dxv[2]: cell spacing. - // nu: collisionalities added (self and cross species collisionalities). - // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fl/fc/fr: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)] in left/center/right cells. + // out: Incremented output distribution functions in center cell. const double dv1par = 2.0/dxv[1]; const double dvpar = dxv[1], wvpar = w[1]; @@ -18,53 +21,94 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_1x1v_tensor_p2(const double *w, double *out_F_0 = &out[0]; double *out_G_1 = &out[9]; + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrSurf_l[3] = {0.0}; - alphaDrSurf_l[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf_l[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf_l[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; + alphaDrSurf_l[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_l[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_l[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; double alphaDrSurf_r[3] = {0.0}; - alphaDrSurf_r[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf_r[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf_r[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; - - double Ghat_F_0_r[3]; - double Ghat_F_0_l[3]; - double Ghat_G_1_r[3]; - double Ghat_G_1_l[3]; - if (wvpar>0) { + alphaDrSurf_r[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_r[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_r[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; - Ghat_F_0_r[0] = 1.118033988749895*(alphaDrSurf_r[2]*F_0r[8]+alphaDrSurf_r[1]*F_0r[7])-0.8660254037844386*alphaDrSurf_r[2]*F_0r[6]+1.118033988749895*alphaDrSurf_r[0]*F_0r[5]+0.5*alphaDrSurf_r[2]*F_0r[4]-0.8660254037844386*(alphaDrSurf_r[1]*F_0r[3]+alphaDrSurf_r[0]*F_0r[2])+0.5*(F_0r[1]*alphaDrSurf_r[1]+F_0r[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = alphaDrSurf_r[1]*F_0r[8]+(alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*F_0r[7]+alphaDrSurf_r[1]*((-0.7745966692414833*F_0r[6])+1.118033988749895*F_0r[5]+0.4472135954999579*F_0r[4])+((-0.7745966692414833*alphaDrSurf_r[2])-0.8660254037844386*alphaDrSurf_r[0])*F_0r[3]+0.4472135954999579*F_0r[1]*alphaDrSurf_r[2]-0.8660254037844386*alphaDrSurf_r[1]*F_0r[2]+0.5*(F_0r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0r[1]); - Ghat_F_0_r[2] = (0.7142857142857143*alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*F_0r[8]+alphaDrSurf_r[1]*F_0r[7]+((-0.5532833351724881*alphaDrSurf_r[2])-0.8660254037844386*alphaDrSurf_r[0])*F_0r[6]+1.118033988749895*alphaDrSurf_r[2]*F_0r[5]+(0.31943828249997*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0])*F_0r[4]-0.7745966692414833*alphaDrSurf_r[1]*F_0r[3]+(0.5*F_0r[0]-0.8660254037844386*F_0r[2])*alphaDrSurf_r[2]+0.4472135954999579*F_0r[1]*alphaDrSurf_r[1]; - Ghat_G_1_r[0] = 1.118033988749895*(alphaDrSurf_r[2]*G_1r[8]+alphaDrSurf_r[1]*G_1r[7])-0.8660254037844386*alphaDrSurf_r[2]*G_1r[6]+1.118033988749895*alphaDrSurf_r[0]*G_1r[5]+0.5*alphaDrSurf_r[2]*G_1r[4]-0.8660254037844386*(alphaDrSurf_r[1]*G_1r[3]+alphaDrSurf_r[0]*G_1r[2])+0.5*(G_1r[1]*alphaDrSurf_r[1]+G_1r[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = alphaDrSurf_r[1]*G_1r[8]+(alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*G_1r[7]+alphaDrSurf_r[1]*((-0.7745966692414833*G_1r[6])+1.118033988749895*G_1r[5]+0.4472135954999579*G_1r[4])+((-0.7745966692414833*alphaDrSurf_r[2])-0.8660254037844386*alphaDrSurf_r[0])*G_1r[3]+0.4472135954999579*G_1r[1]*alphaDrSurf_r[2]-0.8660254037844386*alphaDrSurf_r[1]*G_1r[2]+0.5*(G_1r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1r[1]); - Ghat_G_1_r[2] = (0.7142857142857143*alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*G_1r[8]+alphaDrSurf_r[1]*G_1r[7]+((-0.5532833351724881*alphaDrSurf_r[2])-0.8660254037844386*alphaDrSurf_r[0])*G_1r[6]+1.118033988749895*alphaDrSurf_r[2]*G_1r[5]+(0.31943828249997*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0])*G_1r[4]-0.7745966692414833*alphaDrSurf_r[1]*G_1r[3]+(0.5*G_1r[0]-0.8660254037844386*G_1r[2])*alphaDrSurf_r[2]+0.4472135954999579*G_1r[1]*alphaDrSurf_r[1]; - - Ghat_F_0_l[0] = 1.118033988749895*(alphaDrSurf_l[2]*F_0c[8]+alphaDrSurf_l[1]*F_0c[7])-0.8660254037844386*alphaDrSurf_l[2]*F_0c[6]+1.118033988749895*alphaDrSurf_l[0]*F_0c[5]+0.5*alphaDrSurf_l[2]*F_0c[4]-0.8660254037844386*(alphaDrSurf_l[1]*F_0c[3]+alphaDrSurf_l[0]*F_0c[2])+0.5*(F_0c[1]*alphaDrSurf_l[1]+F_0c[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = alphaDrSurf_l[1]*F_0c[8]+(alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*F_0c[7]+alphaDrSurf_l[1]*((-0.7745966692414833*F_0c[6])+1.118033988749895*F_0c[5]+0.4472135954999579*F_0c[4])+((-0.7745966692414833*alphaDrSurf_l[2])-0.8660254037844386*alphaDrSurf_l[0])*F_0c[3]+0.4472135954999579*F_0c[1]*alphaDrSurf_l[2]-0.8660254037844386*alphaDrSurf_l[1]*F_0c[2]+0.5*(F_0c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0c[1]); - Ghat_F_0_l[2] = (0.7142857142857143*alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*F_0c[8]+alphaDrSurf_l[1]*F_0c[7]+((-0.5532833351724881*alphaDrSurf_l[2])-0.8660254037844386*alphaDrSurf_l[0])*F_0c[6]+1.118033988749895*alphaDrSurf_l[2]*F_0c[5]+(0.31943828249997*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0])*F_0c[4]-0.7745966692414833*alphaDrSurf_l[1]*F_0c[3]+(0.5*F_0c[0]-0.8660254037844386*F_0c[2])*alphaDrSurf_l[2]+0.4472135954999579*F_0c[1]*alphaDrSurf_l[1]; - Ghat_G_1_l[0] = 1.118033988749895*(alphaDrSurf_l[2]*G_1c[8]+alphaDrSurf_l[1]*G_1c[7])-0.8660254037844386*alphaDrSurf_l[2]*G_1c[6]+1.118033988749895*alphaDrSurf_l[0]*G_1c[5]+0.5*alphaDrSurf_l[2]*G_1c[4]-0.8660254037844386*(alphaDrSurf_l[1]*G_1c[3]+alphaDrSurf_l[0]*G_1c[2])+0.5*(G_1c[1]*alphaDrSurf_l[1]+G_1c[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = alphaDrSurf_l[1]*G_1c[8]+(alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*G_1c[7]+alphaDrSurf_l[1]*((-0.7745966692414833*G_1c[6])+1.118033988749895*G_1c[5]+0.4472135954999579*G_1c[4])+((-0.7745966692414833*alphaDrSurf_l[2])-0.8660254037844386*alphaDrSurf_l[0])*G_1c[3]+0.4472135954999579*G_1c[1]*alphaDrSurf_l[2]-0.8660254037844386*alphaDrSurf_l[1]*G_1c[2]+0.5*(G_1c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1c[1]); - Ghat_G_1_l[2] = (0.7142857142857143*alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*G_1c[8]+alphaDrSurf_l[1]*G_1c[7]+((-0.5532833351724881*alphaDrSurf_l[2])-0.8660254037844386*alphaDrSurf_l[0])*G_1c[6]+1.118033988749895*alphaDrSurf_l[2]*G_1c[5]+(0.31943828249997*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0])*G_1c[4]-0.7745966692414833*alphaDrSurf_l[1]*G_1c[3]+(0.5*G_1c[0]-0.8660254037844386*G_1c[2])*alphaDrSurf_l[2]+0.4472135954999579*G_1c[1]*alphaDrSurf_l[1]; + double F_0_UpwindQuad_l[3] = {0.0}; + double F_0_UpwindQuad_r[3] = {0.0}; + double F_0_Upwind_l[3] = {0.0}; + double F_0_Upwind_r[3] = {0.0}; + double Ghat_F_0_l[3] = {0.0}; + double Ghat_F_0_r[3] = {0.0}; + double G_1_UpwindQuad_l[3] = {0.0}; + double G_1_UpwindQuad_r[3] = {0.0}; + double G_1_Upwind_l[3] = {0.0}; + double G_1_Upwind_r[3] = {0.0}; + double Ghat_G_1_l[3] = {0.0}; + double Ghat_G_1_r[3] = {0.0}; + if (0.6324555320336759*alphaDrSurf_l[2]-0.9486832980505137*alphaDrSurf_l[1]+0.7071067811865475*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[0] = tensor_2x_p2_surfx2_eval_quad_node_0_r(F_0l); + G_1_UpwindQuad_l[0] = tensor_2x_p2_surfx2_eval_quad_node_0_r(G_1l); + } else { + F_0_UpwindQuad_l[0] = tensor_2x_p2_surfx2_eval_quad_node_0_l(F_0c); + G_1_UpwindQuad_l[0] = tensor_2x_p2_surfx2_eval_quad_node_0_l(G_1c); + } + if (0.6324555320336759*alphaDrSurf_r[2]-0.9486832980505137*alphaDrSurf_r[1]+0.7071067811865475*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[0] = tensor_2x_p2_surfx2_eval_quad_node_0_r(F_0c); + G_1_UpwindQuad_r[0] = tensor_2x_p2_surfx2_eval_quad_node_0_r(G_1c); + } else { + F_0_UpwindQuad_r[0] = tensor_2x_p2_surfx2_eval_quad_node_0_l(F_0r); + G_1_UpwindQuad_r[0] = tensor_2x_p2_surfx2_eval_quad_node_0_l(G_1r); + } + if (0.7071067811865475*alphaDrSurf_l[0]-0.7905694150420947*alphaDrSurf_l[2] < 0) { + F_0_UpwindQuad_l[1] = tensor_2x_p2_surfx2_eval_quad_node_1_r(F_0l); + G_1_UpwindQuad_l[1] = tensor_2x_p2_surfx2_eval_quad_node_1_r(G_1l); + } else { + F_0_UpwindQuad_l[1] = tensor_2x_p2_surfx2_eval_quad_node_1_l(F_0c); + G_1_UpwindQuad_l[1] = tensor_2x_p2_surfx2_eval_quad_node_1_l(G_1c); + } + if (0.7071067811865475*alphaDrSurf_r[0]-0.7905694150420947*alphaDrSurf_r[2] < 0) { + F_0_UpwindQuad_r[1] = tensor_2x_p2_surfx2_eval_quad_node_1_r(F_0c); + G_1_UpwindQuad_r[1] = tensor_2x_p2_surfx2_eval_quad_node_1_r(G_1c); + } else { + F_0_UpwindQuad_r[1] = tensor_2x_p2_surfx2_eval_quad_node_1_l(F_0r); + G_1_UpwindQuad_r[1] = tensor_2x_p2_surfx2_eval_quad_node_1_l(G_1r); + } + if (0.6324555320336759*alphaDrSurf_l[2]+0.9486832980505137*alphaDrSurf_l[1]+0.7071067811865475*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[2] = tensor_2x_p2_surfx2_eval_quad_node_2_r(F_0l); + G_1_UpwindQuad_l[2] = tensor_2x_p2_surfx2_eval_quad_node_2_r(G_1l); + } else { + F_0_UpwindQuad_l[2] = tensor_2x_p2_surfx2_eval_quad_node_2_l(F_0c); + G_1_UpwindQuad_l[2] = tensor_2x_p2_surfx2_eval_quad_node_2_l(G_1c); + } + if (0.6324555320336759*alphaDrSurf_r[2]+0.9486832980505137*alphaDrSurf_r[1]+0.7071067811865475*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[2] = tensor_2x_p2_surfx2_eval_quad_node_2_r(F_0c); + G_1_UpwindQuad_r[2] = tensor_2x_p2_surfx2_eval_quad_node_2_r(G_1c); } else { + F_0_UpwindQuad_r[2] = tensor_2x_p2_surfx2_eval_quad_node_2_l(F_0r); + G_1_UpwindQuad_r[2] = tensor_2x_p2_surfx2_eval_quad_node_2_l(G_1r); + } - Ghat_F_0_r[0] = 1.118033988749895*(alphaDrSurf_r[2]*F_0c[8]+alphaDrSurf_r[1]*F_0c[7])+0.8660254037844386*alphaDrSurf_r[2]*F_0c[6]+1.118033988749895*alphaDrSurf_r[0]*F_0c[5]+0.5*alphaDrSurf_r[2]*F_0c[4]+0.8660254037844386*(alphaDrSurf_r[1]*F_0c[3]+alphaDrSurf_r[0]*F_0c[2])+0.5*(F_0c[1]*alphaDrSurf_r[1]+F_0c[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = alphaDrSurf_r[1]*F_0c[8]+(alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*F_0c[7]+alphaDrSurf_r[1]*(0.7745966692414833*F_0c[6]+1.118033988749895*F_0c[5]+0.4472135954999579*F_0c[4])+(0.7745966692414833*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[0])*F_0c[3]+0.4472135954999579*F_0c[1]*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[1]*F_0c[2]+0.5*(F_0c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0c[1]); - Ghat_F_0_r[2] = (0.7142857142857143*alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*F_0c[8]+alphaDrSurf_r[1]*F_0c[7]+(0.5532833351724881*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[0])*F_0c[6]+1.118033988749895*alphaDrSurf_r[2]*F_0c[5]+(0.31943828249997*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0])*F_0c[4]+0.7745966692414833*alphaDrSurf_r[1]*F_0c[3]+(0.8660254037844386*F_0c[2]+0.5*F_0c[0])*alphaDrSurf_r[2]+0.4472135954999579*F_0c[1]*alphaDrSurf_r[1]; - Ghat_G_1_r[0] = 1.118033988749895*(alphaDrSurf_r[2]*G_1c[8]+alphaDrSurf_r[1]*G_1c[7])+0.8660254037844386*alphaDrSurf_r[2]*G_1c[6]+1.118033988749895*alphaDrSurf_r[0]*G_1c[5]+0.5*alphaDrSurf_r[2]*G_1c[4]+0.8660254037844386*(alphaDrSurf_r[1]*G_1c[3]+alphaDrSurf_r[0]*G_1c[2])+0.5*(G_1c[1]*alphaDrSurf_r[1]+G_1c[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = alphaDrSurf_r[1]*G_1c[8]+(alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*G_1c[7]+alphaDrSurf_r[1]*(0.7745966692414833*G_1c[6]+1.118033988749895*G_1c[5]+0.4472135954999579*G_1c[4])+(0.7745966692414833*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[0])*G_1c[3]+0.4472135954999579*G_1c[1]*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[1]*G_1c[2]+0.5*(G_1c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1c[1]); - Ghat_G_1_r[2] = (0.7142857142857143*alphaDrSurf_r[2]+1.118033988749895*alphaDrSurf_r[0])*G_1c[8]+alphaDrSurf_r[1]*G_1c[7]+(0.5532833351724881*alphaDrSurf_r[2]+0.8660254037844386*alphaDrSurf_r[0])*G_1c[6]+1.118033988749895*alphaDrSurf_r[2]*G_1c[5]+(0.31943828249997*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0])*G_1c[4]+0.7745966692414833*alphaDrSurf_r[1]*G_1c[3]+(0.8660254037844386*G_1c[2]+0.5*G_1c[0])*alphaDrSurf_r[2]+0.4472135954999579*G_1c[1]*alphaDrSurf_r[1]; + // Project tensor nodal quadrature basis back onto modal basis. + tensor_2x_p2_upwind_quad_to_modal(F_0_UpwindQuad_l, F_0_Upwind_l); + tensor_2x_p2_upwind_quad_to_modal(F_0_UpwindQuad_r, F_0_Upwind_r); + tensor_2x_p2_upwind_quad_to_modal(G_1_UpwindQuad_l, G_1_Upwind_l); + tensor_2x_p2_upwind_quad_to_modal(G_1_UpwindQuad_r, G_1_Upwind_r); - Ghat_F_0_l[0] = 1.118033988749895*(alphaDrSurf_l[2]*F_0l[8]+alphaDrSurf_l[1]*F_0l[7])+0.8660254037844386*alphaDrSurf_l[2]*F_0l[6]+1.118033988749895*alphaDrSurf_l[0]*F_0l[5]+0.5*alphaDrSurf_l[2]*F_0l[4]+0.8660254037844386*(alphaDrSurf_l[1]*F_0l[3]+alphaDrSurf_l[0]*F_0l[2])+0.5*(F_0l[1]*alphaDrSurf_l[1]+F_0l[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = alphaDrSurf_l[1]*F_0l[8]+(alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*F_0l[7]+alphaDrSurf_l[1]*(0.7745966692414833*F_0l[6]+1.118033988749895*F_0l[5]+0.4472135954999579*F_0l[4])+(0.7745966692414833*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[0])*F_0l[3]+0.4472135954999579*F_0l[1]*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[1]*F_0l[2]+0.5*(F_0l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0l[1]); - Ghat_F_0_l[2] = (0.7142857142857143*alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*F_0l[8]+alphaDrSurf_l[1]*F_0l[7]+(0.5532833351724881*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[0])*F_0l[6]+1.118033988749895*alphaDrSurf_l[2]*F_0l[5]+(0.31943828249997*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0])*F_0l[4]+0.7745966692414833*alphaDrSurf_l[1]*F_0l[3]+(0.8660254037844386*F_0l[2]+0.5*F_0l[0])*alphaDrSurf_l[2]+0.4472135954999579*F_0l[1]*alphaDrSurf_l[1]; - Ghat_G_1_l[0] = 1.118033988749895*(alphaDrSurf_l[2]*G_1l[8]+alphaDrSurf_l[1]*G_1l[7])+0.8660254037844386*alphaDrSurf_l[2]*G_1l[6]+1.118033988749895*alphaDrSurf_l[0]*G_1l[5]+0.5*alphaDrSurf_l[2]*G_1l[4]+0.8660254037844386*(alphaDrSurf_l[1]*G_1l[3]+alphaDrSurf_l[0]*G_1l[2])+0.5*(G_1l[1]*alphaDrSurf_l[1]+G_1l[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = alphaDrSurf_l[1]*G_1l[8]+(alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*G_1l[7]+alphaDrSurf_l[1]*(0.7745966692414833*G_1l[6]+1.118033988749895*G_1l[5]+0.4472135954999579*G_1l[4])+(0.7745966692414833*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[0])*G_1l[3]+0.4472135954999579*G_1l[1]*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[1]*G_1l[2]+0.5*(G_1l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1l[1]); - Ghat_G_1_l[2] = (0.7142857142857143*alphaDrSurf_l[2]+1.118033988749895*alphaDrSurf_l[0])*G_1l[8]+alphaDrSurf_l[1]*G_1l[7]+(0.5532833351724881*alphaDrSurf_l[2]+0.8660254037844386*alphaDrSurf_l[0])*G_1l[6]+1.118033988749895*alphaDrSurf_l[2]*G_1l[5]+(0.31943828249997*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0])*G_1l[4]+0.7745966692414833*alphaDrSurf_l[1]*G_1l[3]+(0.8660254037844386*G_1l[2]+0.5*G_1l[0])*alphaDrSurf_l[2]+0.4472135954999579*G_1l[1]*alphaDrSurf_l[1]; + Ghat_F_0_l[0] = 0.7071067811865475*(F_0_Upwind_l[2]*alphaDrSurf_l[2]+F_0_Upwind_l[1]*alphaDrSurf_l[1]+F_0_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_F_0_l[1] = 0.6324555320336759*(F_0_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0_Upwind_l[2])+0.7071067811865475*(F_0_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0_Upwind_l[1]); + Ghat_F_0_l[2] = 0.4517539514526256*F_0_Upwind_l[2]*alphaDrSurf_l[2]+0.7071067811865475*(F_0_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0_Upwind_l[2])+0.6324555320336759*F_0_Upwind_l[1]*alphaDrSurf_l[1]; + Ghat_G_1_l[0] = 0.7071067811865475*(G_1_Upwind_l[2]*alphaDrSurf_l[2]+G_1_Upwind_l[1]*alphaDrSurf_l[1]+G_1_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_G_1_l[1] = 0.6324555320336759*(G_1_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1_Upwind_l[2])+0.7071067811865475*(G_1_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1_Upwind_l[1]); + Ghat_G_1_l[2] = 0.4517539514526256*G_1_Upwind_l[2]*alphaDrSurf_l[2]+0.7071067811865475*(G_1_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1_Upwind_l[2])+0.6324555320336759*G_1_Upwind_l[1]*alphaDrSurf_l[1]; + + Ghat_F_0_r[0] = 0.7071067811865475*(F_0_Upwind_r[2]*alphaDrSurf_r[2]+F_0_Upwind_r[1]*alphaDrSurf_r[1]+F_0_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_F_0_r[1] = 0.6324555320336759*(F_0_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0_Upwind_r[2])+0.7071067811865475*(F_0_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0_Upwind_r[1]); + Ghat_F_0_r[2] = 0.4517539514526256*F_0_Upwind_r[2]*alphaDrSurf_r[2]+0.7071067811865475*(F_0_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0_Upwind_r[2])+0.6324555320336759*F_0_Upwind_r[1]*alphaDrSurf_r[1]; + Ghat_G_1_r[0] = 0.7071067811865475*(G_1_Upwind_r[2]*alphaDrSurf_r[2]+G_1_Upwind_r[1]*alphaDrSurf_r[1]+G_1_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_G_1_r[1] = 0.6324555320336759*(G_1_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1_Upwind_r[2])+0.7071067811865475*(G_1_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1_Upwind_r[1]); + Ghat_G_1_r[2] = 0.4517539514526256*G_1_Upwind_r[2]*alphaDrSurf_r[2]+0.7071067811865475*(G_1_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1_Upwind_r[2])+0.6324555320336759*G_1_Upwind_r[1]*alphaDrSurf_r[1]; - } out_F_0[0] += (0.7071067811865475*Ghat_F_0_r[0]-0.7071067811865475*Ghat_F_0_l[0])*dv1par; out_F_0[1] += (0.7071067811865475*Ghat_F_0_r[1]-0.7071067811865475*Ghat_F_0_l[1])*dv1par; out_F_0[2] += 1.224744871391589*(Ghat_F_0_r[0]+Ghat_F_0_l[0])*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1.c index 16b23a585..866e96d6d 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[3]: cell-center coordinates. - // dxv[3]: cell spacing. - // nu: collisionalities added (self and cross species collisionalities). - // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fl/fc/fr: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)] in left/center/right cells. + // out: Incremented output distribution functions in center cell. const double dv1par = 2.0/dxv[2]; const double dvpar = dxv[2], wvpar = w[2]; @@ -18,63 +21,114 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_ser_p1(const double *w, con double *out_F_0 = &out[0]; double *out_G_1 = &out[12]; + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrSurf_l[4] = {0.0}; - alphaDrSurf_l[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf_l[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf_l[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; - alphaDrSurf_l[3] = nu[3]*wvpar-0.5*nu[3]*dvpar; + alphaDrSurf_l[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_l[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_l[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf_l[3] = nuSum[3]*wvpar-0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; double alphaDrSurf_r[4] = {0.0}; - alphaDrSurf_r[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf_r[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf_r[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; - alphaDrSurf_r[3] = nu[3]*wvpar+0.5*nu[3]*dvpar; - - double Ghat_F_0_r[4]; - double Ghat_F_0_l[4]; - double Ghat_G_1_r[4]; - double Ghat_G_1_l[4]; - if (wvpar>0) { - - Ghat_F_0_r[0] = 0.7905694150420947*(alphaDrSurf_r[3]*F_0r[11]+alphaDrSurf_r[2]*F_0r[10]+alphaDrSurf_r[1]*F_0r[9]+alphaDrSurf_r[0]*F_0r[8])-0.6123724356957944*(alphaDrSurf_r[3]*F_0r[7]+alphaDrSurf_r[2]*F_0r[6]+alphaDrSurf_r[1]*F_0r[5])+0.3535533905932737*alphaDrSurf_r[3]*F_0r[4]-0.6123724356957944*alphaDrSurf_r[0]*F_0r[3]+0.3535533905932737*(F_0r[2]*alphaDrSurf_r[2]+F_0r[1]*alphaDrSurf_r[1]+F_0r[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = 0.7905694150420947*(alphaDrSurf_r[2]*F_0r[11]+alphaDrSurf_r[3]*F_0r[10]+alphaDrSurf_r[0]*F_0r[9]+alphaDrSurf_r[1]*F_0r[8])-0.6123724356957944*(alphaDrSurf_r[2]*F_0r[7]+alphaDrSurf_r[3]*F_0r[6]+alphaDrSurf_r[0]*F_0r[5])+0.3535533905932737*(alphaDrSurf_r[2]*F_0r[4]+F_0r[2]*alphaDrSurf_r[3])-0.6123724356957944*alphaDrSurf_r[1]*F_0r[3]+0.3535533905932737*(F_0r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0r[1]); - Ghat_F_0_r[2] = 0.7905694150420947*(alphaDrSurf_r[1]*F_0r[11]+alphaDrSurf_r[0]*F_0r[10]+alphaDrSurf_r[3]*F_0r[9]+alphaDrSurf_r[2]*F_0r[8])-0.6123724356957944*(alphaDrSurf_r[1]*F_0r[7]+alphaDrSurf_r[0]*F_0r[6]+alphaDrSurf_r[3]*F_0r[5])+0.3535533905932737*(alphaDrSurf_r[1]*F_0r[4]+F_0r[1]*alphaDrSurf_r[3])-0.6123724356957944*alphaDrSurf_r[2]*F_0r[3]+0.3535533905932737*(F_0r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0r[2]); - Ghat_F_0_r[3] = 0.7905694150420947*(alphaDrSurf_r[0]*F_0r[11]+alphaDrSurf_r[1]*F_0r[10]+alphaDrSurf_r[2]*F_0r[9]+alphaDrSurf_r[3]*F_0r[8])-0.6123724356957944*(alphaDrSurf_r[0]*F_0r[7]+alphaDrSurf_r[1]*F_0r[6]+alphaDrSurf_r[2]*F_0r[5])+0.3535533905932737*alphaDrSurf_r[0]*F_0r[4]-0.6123724356957944*F_0r[3]*alphaDrSurf_r[3]+0.3535533905932737*(F_0r[0]*alphaDrSurf_r[3]+F_0r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0r[2]); - Ghat_G_1_r[0] = 0.7905694150420947*(alphaDrSurf_r[3]*G_1r[11]+alphaDrSurf_r[2]*G_1r[10]+alphaDrSurf_r[1]*G_1r[9]+alphaDrSurf_r[0]*G_1r[8])-0.6123724356957944*(alphaDrSurf_r[3]*G_1r[7]+alphaDrSurf_r[2]*G_1r[6]+alphaDrSurf_r[1]*G_1r[5])+0.3535533905932737*alphaDrSurf_r[3]*G_1r[4]-0.6123724356957944*alphaDrSurf_r[0]*G_1r[3]+0.3535533905932737*(G_1r[2]*alphaDrSurf_r[2]+G_1r[1]*alphaDrSurf_r[1]+G_1r[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = 0.7905694150420947*(alphaDrSurf_r[2]*G_1r[11]+alphaDrSurf_r[3]*G_1r[10]+alphaDrSurf_r[0]*G_1r[9]+alphaDrSurf_r[1]*G_1r[8])-0.6123724356957944*(alphaDrSurf_r[2]*G_1r[7]+alphaDrSurf_r[3]*G_1r[6]+alphaDrSurf_r[0]*G_1r[5])+0.3535533905932737*(alphaDrSurf_r[2]*G_1r[4]+G_1r[2]*alphaDrSurf_r[3])-0.6123724356957944*alphaDrSurf_r[1]*G_1r[3]+0.3535533905932737*(G_1r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1r[1]); - Ghat_G_1_r[2] = 0.7905694150420947*(alphaDrSurf_r[1]*G_1r[11]+alphaDrSurf_r[0]*G_1r[10]+alphaDrSurf_r[3]*G_1r[9]+alphaDrSurf_r[2]*G_1r[8])-0.6123724356957944*(alphaDrSurf_r[1]*G_1r[7]+alphaDrSurf_r[0]*G_1r[6]+alphaDrSurf_r[3]*G_1r[5])+0.3535533905932737*(alphaDrSurf_r[1]*G_1r[4]+G_1r[1]*alphaDrSurf_r[3])-0.6123724356957944*alphaDrSurf_r[2]*G_1r[3]+0.3535533905932737*(G_1r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1r[2]); - Ghat_G_1_r[3] = 0.7905694150420947*(alphaDrSurf_r[0]*G_1r[11]+alphaDrSurf_r[1]*G_1r[10]+alphaDrSurf_r[2]*G_1r[9]+alphaDrSurf_r[3]*G_1r[8])-0.6123724356957944*(alphaDrSurf_r[0]*G_1r[7]+alphaDrSurf_r[1]*G_1r[6]+alphaDrSurf_r[2]*G_1r[5])+0.3535533905932737*alphaDrSurf_r[0]*G_1r[4]-0.6123724356957944*G_1r[3]*alphaDrSurf_r[3]+0.3535533905932737*(G_1r[0]*alphaDrSurf_r[3]+G_1r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1r[2]); + alphaDrSurf_r[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_r[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_r[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf_r[3] = nuSum[3]*wvpar+0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; - Ghat_F_0_l[0] = 0.7905694150420947*(alphaDrSurf_l[3]*F_0c[11]+alphaDrSurf_l[2]*F_0c[10]+alphaDrSurf_l[1]*F_0c[9]+alphaDrSurf_l[0]*F_0c[8])-0.6123724356957944*(alphaDrSurf_l[3]*F_0c[7]+alphaDrSurf_l[2]*F_0c[6]+alphaDrSurf_l[1]*F_0c[5])+0.3535533905932737*alphaDrSurf_l[3]*F_0c[4]-0.6123724356957944*alphaDrSurf_l[0]*F_0c[3]+0.3535533905932737*(F_0c[2]*alphaDrSurf_l[2]+F_0c[1]*alphaDrSurf_l[1]+F_0c[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = 0.7905694150420947*(alphaDrSurf_l[2]*F_0c[11]+alphaDrSurf_l[3]*F_0c[10]+alphaDrSurf_l[0]*F_0c[9]+alphaDrSurf_l[1]*F_0c[8])-0.6123724356957944*(alphaDrSurf_l[2]*F_0c[7]+alphaDrSurf_l[3]*F_0c[6]+alphaDrSurf_l[0]*F_0c[5])+0.3535533905932737*(alphaDrSurf_l[2]*F_0c[4]+F_0c[2]*alphaDrSurf_l[3])-0.6123724356957944*alphaDrSurf_l[1]*F_0c[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0c[1]); - Ghat_F_0_l[2] = 0.7905694150420947*(alphaDrSurf_l[1]*F_0c[11]+alphaDrSurf_l[0]*F_0c[10]+alphaDrSurf_l[3]*F_0c[9]+alphaDrSurf_l[2]*F_0c[8])-0.6123724356957944*(alphaDrSurf_l[1]*F_0c[7]+alphaDrSurf_l[0]*F_0c[6]+alphaDrSurf_l[3]*F_0c[5])+0.3535533905932737*(alphaDrSurf_l[1]*F_0c[4]+F_0c[1]*alphaDrSurf_l[3])-0.6123724356957944*alphaDrSurf_l[2]*F_0c[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0c[2]); - Ghat_F_0_l[3] = 0.7905694150420947*(alphaDrSurf_l[0]*F_0c[11]+alphaDrSurf_l[1]*F_0c[10]+alphaDrSurf_l[2]*F_0c[9]+alphaDrSurf_l[3]*F_0c[8])-0.6123724356957944*(alphaDrSurf_l[0]*F_0c[7]+alphaDrSurf_l[1]*F_0c[6]+alphaDrSurf_l[2]*F_0c[5])+0.3535533905932737*alphaDrSurf_l[0]*F_0c[4]-0.6123724356957944*F_0c[3]*alphaDrSurf_l[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_l[3]+F_0c[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0c[2]); - Ghat_G_1_l[0] = 0.7905694150420947*(alphaDrSurf_l[3]*G_1c[11]+alphaDrSurf_l[2]*G_1c[10]+alphaDrSurf_l[1]*G_1c[9]+alphaDrSurf_l[0]*G_1c[8])-0.6123724356957944*(alphaDrSurf_l[3]*G_1c[7]+alphaDrSurf_l[2]*G_1c[6]+alphaDrSurf_l[1]*G_1c[5])+0.3535533905932737*alphaDrSurf_l[3]*G_1c[4]-0.6123724356957944*alphaDrSurf_l[0]*G_1c[3]+0.3535533905932737*(G_1c[2]*alphaDrSurf_l[2]+G_1c[1]*alphaDrSurf_l[1]+G_1c[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = 0.7905694150420947*(alphaDrSurf_l[2]*G_1c[11]+alphaDrSurf_l[3]*G_1c[10]+alphaDrSurf_l[0]*G_1c[9]+alphaDrSurf_l[1]*G_1c[8])-0.6123724356957944*(alphaDrSurf_l[2]*G_1c[7]+alphaDrSurf_l[3]*G_1c[6]+alphaDrSurf_l[0]*G_1c[5])+0.3535533905932737*(alphaDrSurf_l[2]*G_1c[4]+G_1c[2]*alphaDrSurf_l[3])-0.6123724356957944*alphaDrSurf_l[1]*G_1c[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1c[1]); - Ghat_G_1_l[2] = 0.7905694150420947*(alphaDrSurf_l[1]*G_1c[11]+alphaDrSurf_l[0]*G_1c[10]+alphaDrSurf_l[3]*G_1c[9]+alphaDrSurf_l[2]*G_1c[8])-0.6123724356957944*(alphaDrSurf_l[1]*G_1c[7]+alphaDrSurf_l[0]*G_1c[6]+alphaDrSurf_l[3]*G_1c[5])+0.3535533905932737*(alphaDrSurf_l[1]*G_1c[4]+G_1c[1]*alphaDrSurf_l[3])-0.6123724356957944*alphaDrSurf_l[2]*G_1c[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1c[2]); - Ghat_G_1_l[3] = 0.7905694150420947*(alphaDrSurf_l[0]*G_1c[11]+alphaDrSurf_l[1]*G_1c[10]+alphaDrSurf_l[2]*G_1c[9]+alphaDrSurf_l[3]*G_1c[8])-0.6123724356957944*(alphaDrSurf_l[0]*G_1c[7]+alphaDrSurf_l[1]*G_1c[6]+alphaDrSurf_l[2]*G_1c[5])+0.3535533905932737*alphaDrSurf_l[0]*G_1c[4]-0.6123724356957944*G_1c[3]*alphaDrSurf_l[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_l[3]+G_1c[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1c[2]); + double F_0_UpwindQuad_l[4] = {0.0}; + double F_0_UpwindQuad_r[4] = {0.0}; + double F_0_Upwind_l[4] = {0.0}; + double F_0_Upwind_r[4] = {0.0}; + double Ghat_F_0_l[4] = {0.0}; + double Ghat_F_0_r[4] = {0.0}; + double G_1_UpwindQuad_l[4] = {0.0}; + double G_1_UpwindQuad_r[4] = {0.0}; + double G_1_Upwind_l[4] = {0.0}; + double G_1_Upwind_r[4] = {0.0}; + double Ghat_G_1_l[4] = {0.0}; + double Ghat_G_1_r[4] = {0.0}; + if (0.5*alphaDrSurf_l[3]-0.5*(alphaDrSurf_l[2]+alphaDrSurf_l[1])+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_r(F_0l); + G_1_UpwindQuad_l[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_r(G_1l); + } else { + F_0_UpwindQuad_l[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_l(F_0c); + G_1_UpwindQuad_l[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_l(G_1c); + } + if (0.5*alphaDrSurf_r[3]-0.5*(alphaDrSurf_r[2]+alphaDrSurf_r[1])+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_r(F_0c); + G_1_UpwindQuad_r[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_r(G_1c); + } else { + F_0_UpwindQuad_r[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_l(F_0r); + G_1_UpwindQuad_r[0] = hyb_2x1v_p1_surfx3_eval_quad_node_0_l(G_1r); + } + if ((-0.5*alphaDrSurf_l[3])+0.5*alphaDrSurf_l[2]-0.5*alphaDrSurf_l[1]+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_r(F_0l); + G_1_UpwindQuad_l[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_r(G_1l); + } else { + F_0_UpwindQuad_l[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_l(F_0c); + G_1_UpwindQuad_l[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_l(G_1c); + } + if ((-0.5*alphaDrSurf_r[3])+0.5*alphaDrSurf_r[2]-0.5*alphaDrSurf_r[1]+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_r(F_0c); + G_1_UpwindQuad_r[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_r(G_1c); + } else { + F_0_UpwindQuad_r[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_l(F_0r); + G_1_UpwindQuad_r[1] = hyb_2x1v_p1_surfx3_eval_quad_node_1_l(G_1r); + } + if (0.5*(alphaDrSurf_l[1]+alphaDrSurf_l[0])-0.5*(alphaDrSurf_l[3]+alphaDrSurf_l[2]) < 0) { + F_0_UpwindQuad_l[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_r(F_0l); + G_1_UpwindQuad_l[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_r(G_1l); + } else { + F_0_UpwindQuad_l[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_l(F_0c); + G_1_UpwindQuad_l[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_l(G_1c); + } + if (0.5*(alphaDrSurf_r[1]+alphaDrSurf_r[0])-0.5*(alphaDrSurf_r[3]+alphaDrSurf_r[2]) < 0) { + F_0_UpwindQuad_r[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_r(F_0c); + G_1_UpwindQuad_r[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_r(G_1c); + } else { + F_0_UpwindQuad_r[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_l(F_0r); + G_1_UpwindQuad_r[2] = hyb_2x1v_p1_surfx3_eval_quad_node_2_l(G_1r); + } + if (0.5*(alphaDrSurf_l[3]+alphaDrSurf_l[2]+alphaDrSurf_l[1]+alphaDrSurf_l[0]) < 0) { + F_0_UpwindQuad_l[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_r(F_0l); + G_1_UpwindQuad_l[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_r(G_1l); } else { + F_0_UpwindQuad_l[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_l(F_0c); + G_1_UpwindQuad_l[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_l(G_1c); + } + if (0.5*(alphaDrSurf_r[3]+alphaDrSurf_r[2]+alphaDrSurf_r[1]+alphaDrSurf_r[0]) < 0) { + F_0_UpwindQuad_r[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_r(F_0c); + G_1_UpwindQuad_r[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_r(G_1c); + } else { + F_0_UpwindQuad_r[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_l(F_0r); + G_1_UpwindQuad_r[3] = hyb_2x1v_p1_surfx3_eval_quad_node_3_l(G_1r); + } - Ghat_F_0_r[0] = 0.7905694150420947*(alphaDrSurf_r[3]*F_0c[11]+alphaDrSurf_r[2]*F_0c[10]+alphaDrSurf_r[1]*F_0c[9]+alphaDrSurf_r[0]*F_0c[8])+0.6123724356957944*(alphaDrSurf_r[3]*F_0c[7]+alphaDrSurf_r[2]*F_0c[6]+alphaDrSurf_r[1]*F_0c[5])+0.3535533905932737*alphaDrSurf_r[3]*F_0c[4]+0.6123724356957944*alphaDrSurf_r[0]*F_0c[3]+0.3535533905932737*(F_0c[2]*alphaDrSurf_r[2]+F_0c[1]*alphaDrSurf_r[1]+F_0c[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = 0.7905694150420947*(alphaDrSurf_r[2]*F_0c[11]+alphaDrSurf_r[3]*F_0c[10]+alphaDrSurf_r[0]*F_0c[9]+alphaDrSurf_r[1]*F_0c[8])+0.6123724356957944*(alphaDrSurf_r[2]*F_0c[7]+alphaDrSurf_r[3]*F_0c[6]+alphaDrSurf_r[0]*F_0c[5])+0.3535533905932737*(alphaDrSurf_r[2]*F_0c[4]+F_0c[2]*alphaDrSurf_r[3])+0.6123724356957944*alphaDrSurf_r[1]*F_0c[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0c[1]); - Ghat_F_0_r[2] = 0.7905694150420947*(alphaDrSurf_r[1]*F_0c[11]+alphaDrSurf_r[0]*F_0c[10]+alphaDrSurf_r[3]*F_0c[9]+alphaDrSurf_r[2]*F_0c[8])+0.6123724356957944*(alphaDrSurf_r[1]*F_0c[7]+alphaDrSurf_r[0]*F_0c[6]+alphaDrSurf_r[3]*F_0c[5])+0.3535533905932737*(alphaDrSurf_r[1]*F_0c[4]+F_0c[1]*alphaDrSurf_r[3])+0.6123724356957944*alphaDrSurf_r[2]*F_0c[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0c[2]); - Ghat_F_0_r[3] = 0.7905694150420947*(alphaDrSurf_r[0]*F_0c[11]+alphaDrSurf_r[1]*F_0c[10]+alphaDrSurf_r[2]*F_0c[9]+alphaDrSurf_r[3]*F_0c[8])+0.6123724356957944*(alphaDrSurf_r[0]*F_0c[7]+alphaDrSurf_r[1]*F_0c[6]+alphaDrSurf_r[2]*F_0c[5])+0.3535533905932737*alphaDrSurf_r[0]*F_0c[4]+0.6123724356957944*F_0c[3]*alphaDrSurf_r[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_r[3]+F_0c[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0c[2]); - Ghat_G_1_r[0] = 0.7905694150420947*(alphaDrSurf_r[3]*G_1c[11]+alphaDrSurf_r[2]*G_1c[10]+alphaDrSurf_r[1]*G_1c[9]+alphaDrSurf_r[0]*G_1c[8])+0.6123724356957944*(alphaDrSurf_r[3]*G_1c[7]+alphaDrSurf_r[2]*G_1c[6]+alphaDrSurf_r[1]*G_1c[5])+0.3535533905932737*alphaDrSurf_r[3]*G_1c[4]+0.6123724356957944*alphaDrSurf_r[0]*G_1c[3]+0.3535533905932737*(G_1c[2]*alphaDrSurf_r[2]+G_1c[1]*alphaDrSurf_r[1]+G_1c[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = 0.7905694150420947*(alphaDrSurf_r[2]*G_1c[11]+alphaDrSurf_r[3]*G_1c[10]+alphaDrSurf_r[0]*G_1c[9]+alphaDrSurf_r[1]*G_1c[8])+0.6123724356957944*(alphaDrSurf_r[2]*G_1c[7]+alphaDrSurf_r[3]*G_1c[6]+alphaDrSurf_r[0]*G_1c[5])+0.3535533905932737*(alphaDrSurf_r[2]*G_1c[4]+G_1c[2]*alphaDrSurf_r[3])+0.6123724356957944*alphaDrSurf_r[1]*G_1c[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1c[1]); - Ghat_G_1_r[2] = 0.7905694150420947*(alphaDrSurf_r[1]*G_1c[11]+alphaDrSurf_r[0]*G_1c[10]+alphaDrSurf_r[3]*G_1c[9]+alphaDrSurf_r[2]*G_1c[8])+0.6123724356957944*(alphaDrSurf_r[1]*G_1c[7]+alphaDrSurf_r[0]*G_1c[6]+alphaDrSurf_r[3]*G_1c[5])+0.3535533905932737*(alphaDrSurf_r[1]*G_1c[4]+G_1c[1]*alphaDrSurf_r[3])+0.6123724356957944*alphaDrSurf_r[2]*G_1c[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1c[2]); - Ghat_G_1_r[3] = 0.7905694150420947*(alphaDrSurf_r[0]*G_1c[11]+alphaDrSurf_r[1]*G_1c[10]+alphaDrSurf_r[2]*G_1c[9]+alphaDrSurf_r[3]*G_1c[8])+0.6123724356957944*(alphaDrSurf_r[0]*G_1c[7]+alphaDrSurf_r[1]*G_1c[6]+alphaDrSurf_r[2]*G_1c[5])+0.3535533905932737*alphaDrSurf_r[0]*G_1c[4]+0.6123724356957944*G_1c[3]*alphaDrSurf_r[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_r[3]+G_1c[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1c[2]); + // Project tensor nodal quadrature basis back onto modal basis. + hyb_2x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad_l, F_0_Upwind_l); + hyb_2x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad_r, F_0_Upwind_r); + hyb_2x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad_l, G_1_Upwind_l); + hyb_2x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad_r, G_1_Upwind_r); - Ghat_F_0_l[0] = 0.7905694150420947*(alphaDrSurf_l[3]*F_0l[11]+alphaDrSurf_l[2]*F_0l[10]+alphaDrSurf_l[1]*F_0l[9]+alphaDrSurf_l[0]*F_0l[8])+0.6123724356957944*(alphaDrSurf_l[3]*F_0l[7]+alphaDrSurf_l[2]*F_0l[6]+alphaDrSurf_l[1]*F_0l[5])+0.3535533905932737*alphaDrSurf_l[3]*F_0l[4]+0.6123724356957944*alphaDrSurf_l[0]*F_0l[3]+0.3535533905932737*(F_0l[2]*alphaDrSurf_l[2]+F_0l[1]*alphaDrSurf_l[1]+F_0l[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = 0.7905694150420947*(alphaDrSurf_l[2]*F_0l[11]+alphaDrSurf_l[3]*F_0l[10]+alphaDrSurf_l[0]*F_0l[9]+alphaDrSurf_l[1]*F_0l[8])+0.6123724356957944*(alphaDrSurf_l[2]*F_0l[7]+alphaDrSurf_l[3]*F_0l[6]+alphaDrSurf_l[0]*F_0l[5])+0.3535533905932737*(alphaDrSurf_l[2]*F_0l[4]+F_0l[2]*alphaDrSurf_l[3])+0.6123724356957944*alphaDrSurf_l[1]*F_0l[3]+0.3535533905932737*(F_0l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0l[1]); - Ghat_F_0_l[2] = 0.7905694150420947*(alphaDrSurf_l[1]*F_0l[11]+alphaDrSurf_l[0]*F_0l[10]+alphaDrSurf_l[3]*F_0l[9]+alphaDrSurf_l[2]*F_0l[8])+0.6123724356957944*(alphaDrSurf_l[1]*F_0l[7]+alphaDrSurf_l[0]*F_0l[6]+alphaDrSurf_l[3]*F_0l[5])+0.3535533905932737*(alphaDrSurf_l[1]*F_0l[4]+F_0l[1]*alphaDrSurf_l[3])+0.6123724356957944*alphaDrSurf_l[2]*F_0l[3]+0.3535533905932737*(F_0l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0l[2]); - Ghat_F_0_l[3] = 0.7905694150420947*(alphaDrSurf_l[0]*F_0l[11]+alphaDrSurf_l[1]*F_0l[10]+alphaDrSurf_l[2]*F_0l[9]+alphaDrSurf_l[3]*F_0l[8])+0.6123724356957944*(alphaDrSurf_l[0]*F_0l[7]+alphaDrSurf_l[1]*F_0l[6]+alphaDrSurf_l[2]*F_0l[5])+0.3535533905932737*alphaDrSurf_l[0]*F_0l[4]+0.6123724356957944*F_0l[3]*alphaDrSurf_l[3]+0.3535533905932737*(F_0l[0]*alphaDrSurf_l[3]+F_0l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0l[2]); - Ghat_G_1_l[0] = 0.7905694150420947*(alphaDrSurf_l[3]*G_1l[11]+alphaDrSurf_l[2]*G_1l[10]+alphaDrSurf_l[1]*G_1l[9]+alphaDrSurf_l[0]*G_1l[8])+0.6123724356957944*(alphaDrSurf_l[3]*G_1l[7]+alphaDrSurf_l[2]*G_1l[6]+alphaDrSurf_l[1]*G_1l[5])+0.3535533905932737*alphaDrSurf_l[3]*G_1l[4]+0.6123724356957944*alphaDrSurf_l[0]*G_1l[3]+0.3535533905932737*(G_1l[2]*alphaDrSurf_l[2]+G_1l[1]*alphaDrSurf_l[1]+G_1l[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = 0.7905694150420947*(alphaDrSurf_l[2]*G_1l[11]+alphaDrSurf_l[3]*G_1l[10]+alphaDrSurf_l[0]*G_1l[9]+alphaDrSurf_l[1]*G_1l[8])+0.6123724356957944*(alphaDrSurf_l[2]*G_1l[7]+alphaDrSurf_l[3]*G_1l[6]+alphaDrSurf_l[0]*G_1l[5])+0.3535533905932737*(alphaDrSurf_l[2]*G_1l[4]+G_1l[2]*alphaDrSurf_l[3])+0.6123724356957944*alphaDrSurf_l[1]*G_1l[3]+0.3535533905932737*(G_1l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1l[1]); - Ghat_G_1_l[2] = 0.7905694150420947*(alphaDrSurf_l[1]*G_1l[11]+alphaDrSurf_l[0]*G_1l[10]+alphaDrSurf_l[3]*G_1l[9]+alphaDrSurf_l[2]*G_1l[8])+0.6123724356957944*(alphaDrSurf_l[1]*G_1l[7]+alphaDrSurf_l[0]*G_1l[6]+alphaDrSurf_l[3]*G_1l[5])+0.3535533905932737*(alphaDrSurf_l[1]*G_1l[4]+G_1l[1]*alphaDrSurf_l[3])+0.6123724356957944*alphaDrSurf_l[2]*G_1l[3]+0.3535533905932737*(G_1l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1l[2]); - Ghat_G_1_l[3] = 0.7905694150420947*(alphaDrSurf_l[0]*G_1l[11]+alphaDrSurf_l[1]*G_1l[10]+alphaDrSurf_l[2]*G_1l[9]+alphaDrSurf_l[3]*G_1l[8])+0.6123724356957944*(alphaDrSurf_l[0]*G_1l[7]+alphaDrSurf_l[1]*G_1l[6]+alphaDrSurf_l[2]*G_1l[5])+0.3535533905932737*alphaDrSurf_l[0]*G_1l[4]+0.6123724356957944*G_1l[3]*alphaDrSurf_l[3]+0.3535533905932737*(G_1l[0]*alphaDrSurf_l[3]+G_1l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1l[2]); + Ghat_F_0_l[0] = 0.5*(F_0_Upwind_l[3]*alphaDrSurf_l[3]+F_0_Upwind_l[2]*alphaDrSurf_l[2]+F_0_Upwind_l[1]*alphaDrSurf_l[1]+F_0_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_F_0_l[1] = 0.5*(F_0_Upwind_l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*F_0_Upwind_l[3]+F_0_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0_Upwind_l[1]); + Ghat_F_0_l[2] = 0.5*(F_0_Upwind_l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*F_0_Upwind_l[3]+F_0_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0_Upwind_l[2]); + Ghat_F_0_l[3] = 0.5*(F_0_Upwind_l[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*F_0_Upwind_l[3]+F_0_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0_Upwind_l[2]); + Ghat_G_1_l[0] = 0.5*(G_1_Upwind_l[3]*alphaDrSurf_l[3]+G_1_Upwind_l[2]*alphaDrSurf_l[2]+G_1_Upwind_l[1]*alphaDrSurf_l[1]+G_1_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_G_1_l[1] = 0.5*(G_1_Upwind_l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*G_1_Upwind_l[3]+G_1_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1_Upwind_l[1]); + Ghat_G_1_l[2] = 0.5*(G_1_Upwind_l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*G_1_Upwind_l[3]+G_1_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1_Upwind_l[2]); + Ghat_G_1_l[3] = 0.5*(G_1_Upwind_l[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*G_1_Upwind_l[3]+G_1_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1_Upwind_l[2]); + + Ghat_F_0_r[0] = 0.5*(F_0_Upwind_r[3]*alphaDrSurf_r[3]+F_0_Upwind_r[2]*alphaDrSurf_r[2]+F_0_Upwind_r[1]*alphaDrSurf_r[1]+F_0_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_F_0_r[1] = 0.5*(F_0_Upwind_r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*F_0_Upwind_r[3]+F_0_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0_Upwind_r[1]); + Ghat_F_0_r[2] = 0.5*(F_0_Upwind_r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*F_0_Upwind_r[3]+F_0_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0_Upwind_r[2]); + Ghat_F_0_r[3] = 0.5*(F_0_Upwind_r[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*F_0_Upwind_r[3]+F_0_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0_Upwind_r[2]); + Ghat_G_1_r[0] = 0.5*(G_1_Upwind_r[3]*alphaDrSurf_r[3]+G_1_Upwind_r[2]*alphaDrSurf_r[2]+G_1_Upwind_r[1]*alphaDrSurf_r[1]+G_1_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_G_1_r[1] = 0.5*(G_1_Upwind_r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*G_1_Upwind_r[3]+G_1_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1_Upwind_r[1]); + Ghat_G_1_r[2] = 0.5*(G_1_Upwind_r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*G_1_Upwind_r[3]+G_1_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1_Upwind_r[2]); + Ghat_G_1_r[3] = 0.5*(G_1_Upwind_r[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*G_1_Upwind_r[3]+G_1_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1_Upwind_r[2]); - } out_F_0[0] += (0.7071067811865475*Ghat_F_0_r[0]-0.7071067811865475*Ghat_F_0_l[0])*dv1par; out_F_0[1] += (0.7071067811865475*Ghat_F_0_r[1]-0.7071067811865475*Ghat_F_0_l[1])*dv1par; out_F_0[2] += (0.7071067811865475*Ghat_F_0_r[2]-0.7071067811865475*Ghat_F_0_l[2])*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2.c index 1f0de36ec..5f9c9ff56 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[3]: cell-center coordinates. - // dxv[3]: cell spacing. - // nu: collisionalities added (self and cross species collisionalities). - // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fl/fc/fr: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)] in left/center/right cells. + // out: Incremented output distribution functions in center cell. const double dv1par = 2.0/dxv[2]; const double dvpar = dxv[2], wvpar = w[2]; @@ -18,113 +21,214 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_2x1v_tensor_p2(const double *w, double *out_F_0 = &out[0]; double *out_G_1 = &out[27]; + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrSurf_l[9] = {0.0}; - alphaDrSurf_l[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf_l[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf_l[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; - alphaDrSurf_l[3] = nu[3]*wvpar-0.5*nu[3]*dvpar; - alphaDrSurf_l[4] = nu[4]*wvpar-0.5*nu[4]*dvpar; - alphaDrSurf_l[5] = nu[5]*wvpar-0.5*nu[5]*dvpar; - alphaDrSurf_l[6] = nu[6]*wvpar-0.5*nu[6]*dvpar; - alphaDrSurf_l[7] = nu[7]*wvpar-0.5*nu[7]*dvpar; - alphaDrSurf_l[8] = nu[8]*wvpar-0.5*nu[8]*dvpar; + alphaDrSurf_l[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_l[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_l[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf_l[3] = nuSum[3]*wvpar-0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; + alphaDrSurf_l[4] = nuSum[4]*wvpar-0.5*nuSum[4]*dvpar-1.0*sumNuUPar[4]; + alphaDrSurf_l[5] = nuSum[5]*wvpar-0.5*nuSum[5]*dvpar-1.0*sumNuUPar[5]; + alphaDrSurf_l[6] = nuSum[6]*wvpar-0.5*nuSum[6]*dvpar-1.0*sumNuUPar[6]; + alphaDrSurf_l[7] = nuSum[7]*wvpar-0.5*nuSum[7]*dvpar-1.0*sumNuUPar[7]; + alphaDrSurf_l[8] = nuSum[8]*wvpar-0.5*nuSum[8]*dvpar-1.0*sumNuUPar[8]; double alphaDrSurf_r[9] = {0.0}; - alphaDrSurf_r[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf_r[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf_r[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; - alphaDrSurf_r[3] = nu[3]*wvpar+0.5*nu[3]*dvpar; - alphaDrSurf_r[4] = nu[4]*wvpar+0.5*nu[4]*dvpar; - alphaDrSurf_r[5] = nu[5]*wvpar+0.5*nu[5]*dvpar; - alphaDrSurf_r[6] = nu[6]*wvpar+0.5*nu[6]*dvpar; - alphaDrSurf_r[7] = nu[7]*wvpar+0.5*nu[7]*dvpar; - alphaDrSurf_r[8] = nu[8]*wvpar+0.5*nu[8]*dvpar; - - double Ghat_F_0_r[9]; - double Ghat_F_0_l[9]; - double Ghat_G_1_r[9]; - double Ghat_G_1_l[9]; - if (wvpar>0) { - - Ghat_F_0_r[0] = 0.7905694150420947*(alphaDrSurf_r[8]*F_0r[26]+alphaDrSurf_r[7]*F_0r[25]+alphaDrSurf_r[6]*F_0r[24])-0.6123724356957944*alphaDrSurf_r[8]*F_0r[23]+0.7905694150420947*(alphaDrSurf_r[5]*F_0r[22]+alphaDrSurf_r[4]*F_0r[21])+0.3535533905932737*alphaDrSurf_r[8]*F_0r[20]+0.7905694150420947*alphaDrSurf_r[3]*F_0r[19]-0.6123724356957944*(alphaDrSurf_r[7]*F_0r[18]+alphaDrSurf_r[6]*F_0r[17])+0.7905694150420947*(alphaDrSurf_r[2]*F_0r[16]+alphaDrSurf_r[1]*F_0r[15])-0.6123724356957944*(alphaDrSurf_r[5]*F_0r[14]+alphaDrSurf_r[4]*F_0r[13])+0.3535533905932737*(alphaDrSurf_r[7]*F_0r[12]+alphaDrSurf_r[6]*F_0r[11])-0.6123724356957944*alphaDrSurf_r[3]*F_0r[10]+0.7905694150420947*alphaDrSurf_r[0]*F_0r[9]+0.3535533905932737*(alphaDrSurf_r[5]*F_0r[8]+alphaDrSurf_r[4]*F_0r[7])-0.6123724356957944*(alphaDrSurf_r[2]*F_0r[6]+alphaDrSurf_r[1]*F_0r[5])+0.3535533905932737*alphaDrSurf_r[3]*F_0r[4]-0.6123724356957944*alphaDrSurf_r[0]*F_0r[3]+0.3535533905932737*(F_0r[2]*alphaDrSurf_r[2]+F_0r[1]*alphaDrSurf_r[1]+F_0r[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = 0.7071067811865475*alphaDrSurf_r[7]*F_0r[26]+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*F_0r[25]+0.7071067811865475*alphaDrSurf_r[3]*F_0r[24]+alphaDrSurf_r[7]*(0.7905694150420947*F_0r[22]-0.5477225575051661*F_0r[23])+0.7071067811865475*alphaDrSurf_r[1]*F_0r[21]+0.3162277660168379*alphaDrSurf_r[7]*F_0r[20]+(0.7071067811865475*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*F_0r[19]+((-0.5477225575051661*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[5])*F_0r[18]+alphaDrSurf_r[3]*(0.7905694150420947*F_0r[16]-0.5477225575051661*F_0r[17])+(0.7071067811865475*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*F_0r[15]-0.6123724356957944*alphaDrSurf_r[7]*F_0r[14]-0.5477225575051661*alphaDrSurf_r[1]*F_0r[13]+(0.3162277660168379*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[5])*F_0r[12]+0.3162277660168379*alphaDrSurf_r[3]*F_0r[11]+((-0.5477225575051661*alphaDrSurf_r[6])-0.6123724356957944*alphaDrSurf_r[2])*F_0r[10]+0.7905694150420947*alphaDrSurf_r[1]*F_0r[9]+0.3535533905932737*alphaDrSurf_r[7]*F_0r[8]+0.3162277660168379*(alphaDrSurf_r[1]*F_0r[7]+F_0r[4]*alphaDrSurf_r[6])-0.6123724356957944*alphaDrSurf_r[3]*F_0r[6]+((-0.5477225575051661*alphaDrSurf_r[4])-0.6123724356957944*alphaDrSurf_r[0])*F_0r[5]+0.3162277660168379*F_0r[1]*alphaDrSurf_r[4]+0.3535533905932737*(alphaDrSurf_r[2]*F_0r[4]+F_0r[2]*alphaDrSurf_r[3])-0.6123724356957944*alphaDrSurf_r[1]*F_0r[3]+0.3535533905932737*(F_0r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0r[1]); - Ghat_F_0_r[2] = 0.7071067811865475*(alphaDrSurf_r[6]*F_0r[26]+alphaDrSurf_r[3]*F_0r[25])+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*F_0r[24]-0.5477225575051661*alphaDrSurf_r[6]*F_0r[23]+0.7071067811865475*alphaDrSurf_r[2]*F_0r[22]+alphaDrSurf_r[6]*(0.7905694150420947*F_0r[21]+0.3162277660168379*F_0r[20])+(0.7071067811865475*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*F_0r[19]-0.5477225575051661*alphaDrSurf_r[3]*F_0r[18]+((-0.5477225575051661*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[4])*F_0r[17]+0.7071067811865475*alphaDrSurf_r[5]*F_0r[16]+0.7905694150420947*(alphaDrSurf_r[0]*F_0r[16]+alphaDrSurf_r[3]*F_0r[15])-0.5477225575051661*alphaDrSurf_r[2]*F_0r[14]-0.6123724356957944*alphaDrSurf_r[6]*F_0r[13]+0.3162277660168379*alphaDrSurf_r[3]*F_0r[12]+(0.3162277660168379*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[4])*F_0r[11]+((-0.5477225575051661*alphaDrSurf_r[7])-0.6123724356957944*alphaDrSurf_r[1])*F_0r[10]+0.7905694150420947*alphaDrSurf_r[2]*F_0r[9]+0.3162277660168379*(alphaDrSurf_r[2]*F_0r[8]+F_0r[4]*alphaDrSurf_r[7])+0.3535533905932737*alphaDrSurf_r[6]*F_0r[7]+((-0.5477225575051661*alphaDrSurf_r[5])-0.6123724356957944*alphaDrSurf_r[0])*F_0r[6]+0.3162277660168379*F_0r[2]*alphaDrSurf_r[5]-0.6123724356957944*alphaDrSurf_r[3]*F_0r[5]+0.3535533905932737*(alphaDrSurf_r[1]*F_0r[4]+F_0r[1]*alphaDrSurf_r[3])-0.6123724356957944*alphaDrSurf_r[2]*F_0r[3]+0.3535533905932737*(F_0r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0r[2]); - Ghat_F_0_r[3] = 0.6324555320336759*alphaDrSurf_r[3]*F_0r[26]+(0.6324555320336759*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*F_0r[25]+(0.6324555320336759*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*F_0r[24]+alphaDrSurf_r[3]*((-0.4898979485566357*F_0r[23])+0.7071067811865475*(F_0r[22]+F_0r[21])+0.2828427124746191*F_0r[20])+(0.6324555320336759*alphaDrSurf_r[8]+0.7071067811865475*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.7905694150420947*alphaDrSurf_r[0])*F_0r[19]+((-0.4898979485566357*alphaDrSurf_r[6])-0.5477225575051661*alphaDrSurf_r[2])*F_0r[18]+((-0.4898979485566357*alphaDrSurf_r[7])-0.5477225575051661*alphaDrSurf_r[1])*F_0r[17]+(0.7071067811865475*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*F_0r[16]+(0.7071067811865475*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*F_0r[15]-0.5477225575051661*alphaDrSurf_r[3]*(F_0r[14]+F_0r[13])+(0.2828427124746191*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*F_0r[12]+(0.2828427124746191*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*F_0r[11]+((-0.4898979485566357*alphaDrSurf_r[8])-0.5477225575051661*(alphaDrSurf_r[5]+alphaDrSurf_r[4])-0.6123724356957944*alphaDrSurf_r[0])*F_0r[10]+0.7905694150420947*alphaDrSurf_r[3]*F_0r[9]+0.2828427124746191*F_0r[4]*alphaDrSurf_r[8]+0.3162277660168379*alphaDrSurf_r[3]*F_0r[8]-0.5477225575051661*F_0r[6]*alphaDrSurf_r[7]+0.3162277660168379*(F_0r[2]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*F_0r[7])+(0.3162277660168379*F_0r[1]-0.5477225575051661*F_0r[5])*alphaDrSurf_r[6]-0.6123724356957944*alphaDrSurf_r[1]*F_0r[6]+0.3162277660168379*F_0r[4]*alphaDrSurf_r[5]-0.6123724356957944*alphaDrSurf_r[2]*F_0r[5]+F_0r[4]*(0.3162277660168379*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])-0.6123724356957944*F_0r[3]*alphaDrSurf_r[3]+0.3535533905932737*(F_0r[0]*alphaDrSurf_r[3]+F_0r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0r[2]); - Ghat_F_0_r[4] = (0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*F_0r[26]+0.7071067811865475*alphaDrSurf_r[7]*F_0r[25]+(0.5050762722761053*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*F_0r[24]+((-0.3912303982179757*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[5])*F_0r[23]+0.7905694150420947*alphaDrSurf_r[8]*F_0r[22]+(0.5050762722761053*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*F_0r[21]+(0.2258769757263128*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[5])*F_0r[20]+0.7071067811865475*alphaDrSurf_r[3]*F_0r[19]-0.5477225575051661*alphaDrSurf_r[7]*F_0r[18]+((-0.3912303982179757*alphaDrSurf_r[6])-0.6123724356957944*alphaDrSurf_r[2])*F_0r[17]+0.7905694150420947*alphaDrSurf_r[6]*F_0r[16]+0.7071067811865475*alphaDrSurf_r[1]*F_0r[15]-0.6123724356957944*alphaDrSurf_r[8]*F_0r[14]+((-0.3912303982179757*alphaDrSurf_r[4])-0.6123724356957944*alphaDrSurf_r[0])*F_0r[13]+0.3162277660168379*alphaDrSurf_r[7]*F_0r[12]+(0.2258769757263128*alphaDrSurf_r[6]+0.3535533905932737*alphaDrSurf_r[2])*F_0r[11]-0.5477225575051661*alphaDrSurf_r[3]*F_0r[10]+0.7905694150420947*alphaDrSurf_r[4]*F_0r[9]+0.3535533905932737*F_0r[8]*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*F_0r[7]+(0.3535533905932737*F_0r[2]-0.6123724356957944*F_0r[6])*alphaDrSurf_r[6]-0.5477225575051661*alphaDrSurf_r[1]*F_0r[5]+(0.3535533905932737*F_0r[0]-0.6123724356957944*F_0r[3])*alphaDrSurf_r[4]+0.3162277660168379*(alphaDrSurf_r[3]*F_0r[4]+F_0r[1]*alphaDrSurf_r[1]); - Ghat_F_0_r[5] = (0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*F_0r[26]+(0.5050762722761053*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*F_0r[25]+0.7071067811865475*alphaDrSurf_r[6]*F_0r[24]+((-0.3912303982179757*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[4])*F_0r[23]+0.5050762722761053*alphaDrSurf_r[5]*F_0r[22]+0.7905694150420947*(alphaDrSurf_r[0]*F_0r[22]+alphaDrSurf_r[8]*F_0r[21])+(0.2258769757263128*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[4])*F_0r[20]+0.7071067811865475*alphaDrSurf_r[3]*F_0r[19]+((-0.3912303982179757*alphaDrSurf_r[7])-0.6123724356957944*alphaDrSurf_r[1])*F_0r[18]-0.5477225575051661*alphaDrSurf_r[6]*F_0r[17]+0.7071067811865475*alphaDrSurf_r[2]*F_0r[16]+0.7905694150420947*alphaDrSurf_r[7]*F_0r[15]-0.3912303982179757*alphaDrSurf_r[5]*F_0r[14]-0.6123724356957944*(alphaDrSurf_r[0]*F_0r[14]+alphaDrSurf_r[8]*F_0r[13])+(0.2258769757263128*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[1])*F_0r[12]+0.3162277660168379*alphaDrSurf_r[6]*F_0r[11]-0.5477225575051661*alphaDrSurf_r[3]*F_0r[10]+0.7905694150420947*alphaDrSurf_r[5]*F_0r[9]+0.3535533905932737*F_0r[7]*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[5]+0.3535533905932737*alphaDrSurf_r[0])*F_0r[8]+(0.3535533905932737*F_0r[1]-0.6123724356957944*F_0r[5])*alphaDrSurf_r[7]-0.5477225575051661*alphaDrSurf_r[2]*F_0r[6]+(0.3535533905932737*F_0r[0]-0.6123724356957944*F_0r[3])*alphaDrSurf_r[5]+0.3162277660168379*(alphaDrSurf_r[3]*F_0r[4]+F_0r[2]*alphaDrSurf_r[2]); - Ghat_F_0_r[6] = (0.4517539514526256*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*F_0r[26]+0.6324555320336759*alphaDrSurf_r[3]*F_0r[25]+(0.4517539514526256*alphaDrSurf_r[8]+0.7071067811865475*alphaDrSurf_r[5]+0.5050762722761053*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*F_0r[24]+((-0.3499271061118826*alphaDrSurf_r[6])-0.5477225575051661*alphaDrSurf_r[2])*F_0r[23]+0.7071067811865475*alphaDrSurf_r[6]*F_0r[22]+(0.5050762722761053*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*F_0r[21]+(0.2020305089104422*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*F_0r[20]+(0.6324555320336759*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*F_0r[19]-0.4898979485566357*alphaDrSurf_r[3]*F_0r[18]+((-0.3499271061118826*alphaDrSurf_r[8])-0.5477225575051661*alphaDrSurf_r[5]-0.3912303982179757*alphaDrSurf_r[4]-0.6123724356957944*alphaDrSurf_r[0])*F_0r[17]+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*F_0r[16]+0.7071067811865475*alphaDrSurf_r[3]*F_0r[15]-0.5477225575051661*alphaDrSurf_r[6]*F_0r[14]+((-0.3912303982179757*alphaDrSurf_r[6])-0.6123724356957944*alphaDrSurf_r[2])*F_0r[13]+0.2828427124746191*alphaDrSurf_r[3]*F_0r[12]+(0.2020305089104422*alphaDrSurf_r[8]+0.3162277660168379*alphaDrSurf_r[5]+0.2258769757263128*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*F_0r[11]+((-0.4898979485566357*alphaDrSurf_r[7])-0.5477225575051661*alphaDrSurf_r[1])*F_0r[10]+0.7905694150420947*alphaDrSurf_r[6]*F_0r[9]-0.5477225575051661*F_0r[6]*alphaDrSurf_r[8]+0.3162277660168379*(F_0r[2]*alphaDrSurf_r[8]+alphaDrSurf_r[6]*F_0r[8])+0.2828427124746191*F_0r[4]*alphaDrSurf_r[7]+(0.2258769757263128*alphaDrSurf_r[6]+0.3535533905932737*alphaDrSurf_r[2])*F_0r[7]+(0.3535533905932737*F_0r[0]-0.6123724356957944*F_0r[3])*alphaDrSurf_r[6]-0.6123724356957944*alphaDrSurf_r[4]*F_0r[6]-0.5477225575051661*alphaDrSurf_r[3]*F_0r[5]+0.3535533905932737*F_0r[2]*alphaDrSurf_r[4]+0.3162277660168379*(alphaDrSurf_r[1]*F_0r[4]+F_0r[1]*alphaDrSurf_r[3]); - Ghat_F_0_r[7] = (0.4517539514526256*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*F_0r[26]+(0.4517539514526256*alphaDrSurf_r[8]+0.5050762722761053*alphaDrSurf_r[5]+0.7071067811865475*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*F_0r[25]+0.6324555320336759*alphaDrSurf_r[3]*F_0r[24]+((-0.3499271061118826*alphaDrSurf_r[7])-0.5477225575051661*alphaDrSurf_r[1])*F_0r[23]+(0.5050762722761053*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*F_0r[22]+0.7071067811865475*alphaDrSurf_r[7]*F_0r[21]+(0.2020305089104422*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*F_0r[20]+(0.6324555320336759*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*F_0r[19]+((-0.3499271061118826*alphaDrSurf_r[8])-0.3912303982179757*alphaDrSurf_r[5]-0.5477225575051661*alphaDrSurf_r[4]-0.6123724356957944*alphaDrSurf_r[0])*F_0r[18]+alphaDrSurf_r[3]*(0.7071067811865475*F_0r[16]-0.4898979485566357*F_0r[17])+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*F_0r[15]+((-0.3912303982179757*alphaDrSurf_r[7])-0.6123724356957944*alphaDrSurf_r[1])*F_0r[14]-0.5477225575051661*alphaDrSurf_r[7]*F_0r[13]+(0.2020305089104422*alphaDrSurf_r[8]+0.2258769757263128*alphaDrSurf_r[5]+0.3162277660168379*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*F_0r[12]+0.2828427124746191*alphaDrSurf_r[3]*F_0r[11]+((-0.4898979485566357*alphaDrSurf_r[6])-0.5477225575051661*alphaDrSurf_r[2])*F_0r[10]+0.7905694150420947*alphaDrSurf_r[7]*F_0r[9]+(0.3162277660168379*F_0r[1]-0.5477225575051661*F_0r[5])*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[1])*F_0r[8]+(0.3162277660168379*F_0r[7]-0.6123724356957944*F_0r[3]+0.3535533905932737*F_0r[0])*alphaDrSurf_r[7]+0.2828427124746191*F_0r[4]*alphaDrSurf_r[6]-0.5477225575051661*alphaDrSurf_r[3]*F_0r[6]+(0.3535533905932737*F_0r[1]-0.6123724356957944*F_0r[5])*alphaDrSurf_r[5]+0.3162277660168379*(alphaDrSurf_r[2]*F_0r[4]+F_0r[2]*alphaDrSurf_r[3]); - Ghat_F_0_r[8] = (0.3226813938947327*alphaDrSurf_r[8]+0.5050762722761053*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.7905694150420947*alphaDrSurf_r[0])*F_0r[26]+(0.4517539514526256*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*F_0r[25]+(0.4517539514526256*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*F_0r[24]+((-0.249947932937059*alphaDrSurf_r[8])-0.3912303982179757*(alphaDrSurf_r[5]+alphaDrSurf_r[4])-0.6123724356957944*alphaDrSurf_r[0])*F_0r[23]+(0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*F_0r[22]+(0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*F_0r[21]+(0.1443075063646015*alphaDrSurf_r[8]+0.2258769757263128*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.3535533905932737*alphaDrSurf_r[0])*F_0r[20]+0.6324555320336759*alphaDrSurf_r[3]*F_0r[19]+((-0.3499271061118826*alphaDrSurf_r[7])-0.5477225575051661*alphaDrSurf_r[1])*F_0r[18]+((-0.3499271061118826*alphaDrSurf_r[6])-0.5477225575051661*alphaDrSurf_r[2])*F_0r[17]+0.7071067811865475*(alphaDrSurf_r[6]*F_0r[16]+alphaDrSurf_r[7]*F_0r[15])+((-0.3912303982179757*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[4])*F_0r[14]+((-0.3912303982179757*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[5])*F_0r[13]+(0.2020305089104422*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*F_0r[12]+(0.2020305089104422*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*F_0r[11]-0.4898979485566357*alphaDrSurf_r[3]*F_0r[10]+alphaDrSurf_r[8]*(0.7905694150420947*F_0r[9]+0.2258769757263128*(F_0r[8]+F_0r[7])-0.6123724356957944*F_0r[3])+0.3535533905932737*(F_0r[0]*alphaDrSurf_r[8]+alphaDrSurf_r[4]*F_0r[8])+(0.3162277660168379*F_0r[1]-0.5477225575051661*F_0r[5])*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[5]*F_0r[7]+(0.3162277660168379*F_0r[2]-0.5477225575051661*F_0r[6])*alphaDrSurf_r[6]+0.2828427124746191*alphaDrSurf_r[3]*F_0r[4]; - Ghat_G_1_r[0] = 0.7905694150420947*(alphaDrSurf_r[8]*G_1r[26]+alphaDrSurf_r[7]*G_1r[25]+alphaDrSurf_r[6]*G_1r[24])-0.6123724356957944*alphaDrSurf_r[8]*G_1r[23]+0.7905694150420947*(alphaDrSurf_r[5]*G_1r[22]+alphaDrSurf_r[4]*G_1r[21])+0.3535533905932737*alphaDrSurf_r[8]*G_1r[20]+0.7905694150420947*alphaDrSurf_r[3]*G_1r[19]-0.6123724356957944*(alphaDrSurf_r[7]*G_1r[18]+alphaDrSurf_r[6]*G_1r[17])+0.7905694150420947*(alphaDrSurf_r[2]*G_1r[16]+alphaDrSurf_r[1]*G_1r[15])-0.6123724356957944*(alphaDrSurf_r[5]*G_1r[14]+alphaDrSurf_r[4]*G_1r[13])+0.3535533905932737*(alphaDrSurf_r[7]*G_1r[12]+alphaDrSurf_r[6]*G_1r[11])-0.6123724356957944*alphaDrSurf_r[3]*G_1r[10]+0.7905694150420947*alphaDrSurf_r[0]*G_1r[9]+0.3535533905932737*(alphaDrSurf_r[5]*G_1r[8]+alphaDrSurf_r[4]*G_1r[7])-0.6123724356957944*(alphaDrSurf_r[2]*G_1r[6]+alphaDrSurf_r[1]*G_1r[5])+0.3535533905932737*alphaDrSurf_r[3]*G_1r[4]-0.6123724356957944*alphaDrSurf_r[0]*G_1r[3]+0.3535533905932737*(G_1r[2]*alphaDrSurf_r[2]+G_1r[1]*alphaDrSurf_r[1]+G_1r[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = 0.7071067811865475*alphaDrSurf_r[7]*G_1r[26]+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*G_1r[25]+0.7071067811865475*alphaDrSurf_r[3]*G_1r[24]+alphaDrSurf_r[7]*(0.7905694150420947*G_1r[22]-0.5477225575051661*G_1r[23])+0.7071067811865475*alphaDrSurf_r[1]*G_1r[21]+0.3162277660168379*alphaDrSurf_r[7]*G_1r[20]+(0.7071067811865475*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*G_1r[19]+((-0.5477225575051661*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[5])*G_1r[18]+alphaDrSurf_r[3]*(0.7905694150420947*G_1r[16]-0.5477225575051661*G_1r[17])+(0.7071067811865475*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*G_1r[15]-0.6123724356957944*alphaDrSurf_r[7]*G_1r[14]-0.5477225575051661*alphaDrSurf_r[1]*G_1r[13]+(0.3162277660168379*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[5])*G_1r[12]+0.3162277660168379*alphaDrSurf_r[3]*G_1r[11]+((-0.5477225575051661*alphaDrSurf_r[6])-0.6123724356957944*alphaDrSurf_r[2])*G_1r[10]+0.7905694150420947*alphaDrSurf_r[1]*G_1r[9]+0.3535533905932737*alphaDrSurf_r[7]*G_1r[8]+0.3162277660168379*(alphaDrSurf_r[1]*G_1r[7]+G_1r[4]*alphaDrSurf_r[6])-0.6123724356957944*alphaDrSurf_r[3]*G_1r[6]+((-0.5477225575051661*alphaDrSurf_r[4])-0.6123724356957944*alphaDrSurf_r[0])*G_1r[5]+0.3162277660168379*G_1r[1]*alphaDrSurf_r[4]+0.3535533905932737*(alphaDrSurf_r[2]*G_1r[4]+G_1r[2]*alphaDrSurf_r[3])-0.6123724356957944*alphaDrSurf_r[1]*G_1r[3]+0.3535533905932737*(G_1r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1r[1]); - Ghat_G_1_r[2] = 0.7071067811865475*(alphaDrSurf_r[6]*G_1r[26]+alphaDrSurf_r[3]*G_1r[25])+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*G_1r[24]-0.5477225575051661*alphaDrSurf_r[6]*G_1r[23]+0.7071067811865475*alphaDrSurf_r[2]*G_1r[22]+alphaDrSurf_r[6]*(0.7905694150420947*G_1r[21]+0.3162277660168379*G_1r[20])+(0.7071067811865475*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*G_1r[19]-0.5477225575051661*alphaDrSurf_r[3]*G_1r[18]+((-0.5477225575051661*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[4])*G_1r[17]+0.7071067811865475*alphaDrSurf_r[5]*G_1r[16]+0.7905694150420947*(alphaDrSurf_r[0]*G_1r[16]+alphaDrSurf_r[3]*G_1r[15])-0.5477225575051661*alphaDrSurf_r[2]*G_1r[14]-0.6123724356957944*alphaDrSurf_r[6]*G_1r[13]+0.3162277660168379*alphaDrSurf_r[3]*G_1r[12]+(0.3162277660168379*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[4])*G_1r[11]+((-0.5477225575051661*alphaDrSurf_r[7])-0.6123724356957944*alphaDrSurf_r[1])*G_1r[10]+0.7905694150420947*alphaDrSurf_r[2]*G_1r[9]+0.3162277660168379*(alphaDrSurf_r[2]*G_1r[8]+G_1r[4]*alphaDrSurf_r[7])+0.3535533905932737*alphaDrSurf_r[6]*G_1r[7]+((-0.5477225575051661*alphaDrSurf_r[5])-0.6123724356957944*alphaDrSurf_r[0])*G_1r[6]+0.3162277660168379*G_1r[2]*alphaDrSurf_r[5]-0.6123724356957944*alphaDrSurf_r[3]*G_1r[5]+0.3535533905932737*(alphaDrSurf_r[1]*G_1r[4]+G_1r[1]*alphaDrSurf_r[3])-0.6123724356957944*alphaDrSurf_r[2]*G_1r[3]+0.3535533905932737*(G_1r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1r[2]); - Ghat_G_1_r[3] = 0.6324555320336759*alphaDrSurf_r[3]*G_1r[26]+(0.6324555320336759*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*G_1r[25]+(0.6324555320336759*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*G_1r[24]+alphaDrSurf_r[3]*((-0.4898979485566357*G_1r[23])+0.7071067811865475*(G_1r[22]+G_1r[21])+0.2828427124746191*G_1r[20])+(0.6324555320336759*alphaDrSurf_r[8]+0.7071067811865475*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.7905694150420947*alphaDrSurf_r[0])*G_1r[19]+((-0.4898979485566357*alphaDrSurf_r[6])-0.5477225575051661*alphaDrSurf_r[2])*G_1r[18]+((-0.4898979485566357*alphaDrSurf_r[7])-0.5477225575051661*alphaDrSurf_r[1])*G_1r[17]+(0.7071067811865475*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*G_1r[16]+(0.7071067811865475*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*G_1r[15]-0.5477225575051661*alphaDrSurf_r[3]*(G_1r[14]+G_1r[13])+(0.2828427124746191*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*G_1r[12]+(0.2828427124746191*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*G_1r[11]+((-0.4898979485566357*alphaDrSurf_r[8])-0.5477225575051661*(alphaDrSurf_r[5]+alphaDrSurf_r[4])-0.6123724356957944*alphaDrSurf_r[0])*G_1r[10]+0.7905694150420947*alphaDrSurf_r[3]*G_1r[9]+0.2828427124746191*G_1r[4]*alphaDrSurf_r[8]+0.3162277660168379*alphaDrSurf_r[3]*G_1r[8]-0.5477225575051661*G_1r[6]*alphaDrSurf_r[7]+0.3162277660168379*(G_1r[2]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*G_1r[7])+(0.3162277660168379*G_1r[1]-0.5477225575051661*G_1r[5])*alphaDrSurf_r[6]-0.6123724356957944*alphaDrSurf_r[1]*G_1r[6]+0.3162277660168379*G_1r[4]*alphaDrSurf_r[5]-0.6123724356957944*alphaDrSurf_r[2]*G_1r[5]+G_1r[4]*(0.3162277660168379*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])-0.6123724356957944*G_1r[3]*alphaDrSurf_r[3]+0.3535533905932737*(G_1r[0]*alphaDrSurf_r[3]+G_1r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1r[2]); - Ghat_G_1_r[4] = (0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*G_1r[26]+0.7071067811865475*alphaDrSurf_r[7]*G_1r[25]+(0.5050762722761053*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*G_1r[24]+((-0.3912303982179757*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[5])*G_1r[23]+0.7905694150420947*alphaDrSurf_r[8]*G_1r[22]+(0.5050762722761053*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*G_1r[21]+(0.2258769757263128*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[5])*G_1r[20]+0.7071067811865475*alphaDrSurf_r[3]*G_1r[19]-0.5477225575051661*alphaDrSurf_r[7]*G_1r[18]+((-0.3912303982179757*alphaDrSurf_r[6])-0.6123724356957944*alphaDrSurf_r[2])*G_1r[17]+0.7905694150420947*alphaDrSurf_r[6]*G_1r[16]+0.7071067811865475*alphaDrSurf_r[1]*G_1r[15]-0.6123724356957944*alphaDrSurf_r[8]*G_1r[14]+((-0.3912303982179757*alphaDrSurf_r[4])-0.6123724356957944*alphaDrSurf_r[0])*G_1r[13]+0.3162277660168379*alphaDrSurf_r[7]*G_1r[12]+(0.2258769757263128*alphaDrSurf_r[6]+0.3535533905932737*alphaDrSurf_r[2])*G_1r[11]-0.5477225575051661*alphaDrSurf_r[3]*G_1r[10]+0.7905694150420947*alphaDrSurf_r[4]*G_1r[9]+0.3535533905932737*G_1r[8]*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*G_1r[7]+(0.3535533905932737*G_1r[2]-0.6123724356957944*G_1r[6])*alphaDrSurf_r[6]-0.5477225575051661*alphaDrSurf_r[1]*G_1r[5]+(0.3535533905932737*G_1r[0]-0.6123724356957944*G_1r[3])*alphaDrSurf_r[4]+0.3162277660168379*(alphaDrSurf_r[3]*G_1r[4]+G_1r[1]*alphaDrSurf_r[1]); - Ghat_G_1_r[5] = (0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*G_1r[26]+(0.5050762722761053*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*G_1r[25]+0.7071067811865475*alphaDrSurf_r[6]*G_1r[24]+((-0.3912303982179757*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[4])*G_1r[23]+0.5050762722761053*alphaDrSurf_r[5]*G_1r[22]+0.7905694150420947*(alphaDrSurf_r[0]*G_1r[22]+alphaDrSurf_r[8]*G_1r[21])+(0.2258769757263128*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[4])*G_1r[20]+0.7071067811865475*alphaDrSurf_r[3]*G_1r[19]+((-0.3912303982179757*alphaDrSurf_r[7])-0.6123724356957944*alphaDrSurf_r[1])*G_1r[18]-0.5477225575051661*alphaDrSurf_r[6]*G_1r[17]+0.7071067811865475*alphaDrSurf_r[2]*G_1r[16]+0.7905694150420947*alphaDrSurf_r[7]*G_1r[15]-0.3912303982179757*alphaDrSurf_r[5]*G_1r[14]-0.6123724356957944*(alphaDrSurf_r[0]*G_1r[14]+alphaDrSurf_r[8]*G_1r[13])+(0.2258769757263128*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[1])*G_1r[12]+0.3162277660168379*alphaDrSurf_r[6]*G_1r[11]-0.5477225575051661*alphaDrSurf_r[3]*G_1r[10]+0.7905694150420947*alphaDrSurf_r[5]*G_1r[9]+0.3535533905932737*G_1r[7]*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[5]+0.3535533905932737*alphaDrSurf_r[0])*G_1r[8]+(0.3535533905932737*G_1r[1]-0.6123724356957944*G_1r[5])*alphaDrSurf_r[7]-0.5477225575051661*alphaDrSurf_r[2]*G_1r[6]+(0.3535533905932737*G_1r[0]-0.6123724356957944*G_1r[3])*alphaDrSurf_r[5]+0.3162277660168379*(alphaDrSurf_r[3]*G_1r[4]+G_1r[2]*alphaDrSurf_r[2]); - Ghat_G_1_r[6] = (0.4517539514526256*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*G_1r[26]+0.6324555320336759*alphaDrSurf_r[3]*G_1r[25]+(0.4517539514526256*alphaDrSurf_r[8]+0.7071067811865475*alphaDrSurf_r[5]+0.5050762722761053*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*G_1r[24]+((-0.3499271061118826*alphaDrSurf_r[6])-0.5477225575051661*alphaDrSurf_r[2])*G_1r[23]+0.7071067811865475*alphaDrSurf_r[6]*G_1r[22]+(0.5050762722761053*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*G_1r[21]+(0.2020305089104422*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*G_1r[20]+(0.6324555320336759*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*G_1r[19]-0.4898979485566357*alphaDrSurf_r[3]*G_1r[18]+((-0.3499271061118826*alphaDrSurf_r[8])-0.5477225575051661*alphaDrSurf_r[5]-0.3912303982179757*alphaDrSurf_r[4]-0.6123724356957944*alphaDrSurf_r[0])*G_1r[17]+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*G_1r[16]+0.7071067811865475*alphaDrSurf_r[3]*G_1r[15]-0.5477225575051661*alphaDrSurf_r[6]*G_1r[14]+((-0.3912303982179757*alphaDrSurf_r[6])-0.6123724356957944*alphaDrSurf_r[2])*G_1r[13]+0.2828427124746191*alphaDrSurf_r[3]*G_1r[12]+(0.2020305089104422*alphaDrSurf_r[8]+0.3162277660168379*alphaDrSurf_r[5]+0.2258769757263128*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*G_1r[11]+((-0.4898979485566357*alphaDrSurf_r[7])-0.5477225575051661*alphaDrSurf_r[1])*G_1r[10]+0.7905694150420947*alphaDrSurf_r[6]*G_1r[9]-0.5477225575051661*G_1r[6]*alphaDrSurf_r[8]+0.3162277660168379*(G_1r[2]*alphaDrSurf_r[8]+alphaDrSurf_r[6]*G_1r[8])+0.2828427124746191*G_1r[4]*alphaDrSurf_r[7]+(0.2258769757263128*alphaDrSurf_r[6]+0.3535533905932737*alphaDrSurf_r[2])*G_1r[7]+(0.3535533905932737*G_1r[0]-0.6123724356957944*G_1r[3])*alphaDrSurf_r[6]-0.6123724356957944*alphaDrSurf_r[4]*G_1r[6]-0.5477225575051661*alphaDrSurf_r[3]*G_1r[5]+0.3535533905932737*G_1r[2]*alphaDrSurf_r[4]+0.3162277660168379*(alphaDrSurf_r[1]*G_1r[4]+G_1r[1]*alphaDrSurf_r[3]); - Ghat_G_1_r[7] = (0.4517539514526256*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*G_1r[26]+(0.4517539514526256*alphaDrSurf_r[8]+0.5050762722761053*alphaDrSurf_r[5]+0.7071067811865475*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*G_1r[25]+0.6324555320336759*alphaDrSurf_r[3]*G_1r[24]+((-0.3499271061118826*alphaDrSurf_r[7])-0.5477225575051661*alphaDrSurf_r[1])*G_1r[23]+(0.5050762722761053*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*G_1r[22]+0.7071067811865475*alphaDrSurf_r[7]*G_1r[21]+(0.2020305089104422*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*G_1r[20]+(0.6324555320336759*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*G_1r[19]+((-0.3499271061118826*alphaDrSurf_r[8])-0.3912303982179757*alphaDrSurf_r[5]-0.5477225575051661*alphaDrSurf_r[4]-0.6123724356957944*alphaDrSurf_r[0])*G_1r[18]+alphaDrSurf_r[3]*(0.7071067811865475*G_1r[16]-0.4898979485566357*G_1r[17])+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*G_1r[15]+((-0.3912303982179757*alphaDrSurf_r[7])-0.6123724356957944*alphaDrSurf_r[1])*G_1r[14]-0.5477225575051661*alphaDrSurf_r[7]*G_1r[13]+(0.2020305089104422*alphaDrSurf_r[8]+0.2258769757263128*alphaDrSurf_r[5]+0.3162277660168379*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*G_1r[12]+0.2828427124746191*alphaDrSurf_r[3]*G_1r[11]+((-0.4898979485566357*alphaDrSurf_r[6])-0.5477225575051661*alphaDrSurf_r[2])*G_1r[10]+0.7905694150420947*alphaDrSurf_r[7]*G_1r[9]+(0.3162277660168379*G_1r[1]-0.5477225575051661*G_1r[5])*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[1])*G_1r[8]+(0.3162277660168379*G_1r[7]-0.6123724356957944*G_1r[3]+0.3535533905932737*G_1r[0])*alphaDrSurf_r[7]+0.2828427124746191*G_1r[4]*alphaDrSurf_r[6]-0.5477225575051661*alphaDrSurf_r[3]*G_1r[6]+(0.3535533905932737*G_1r[1]-0.6123724356957944*G_1r[5])*alphaDrSurf_r[5]+0.3162277660168379*(alphaDrSurf_r[2]*G_1r[4]+G_1r[2]*alphaDrSurf_r[3]); - Ghat_G_1_r[8] = (0.3226813938947327*alphaDrSurf_r[8]+0.5050762722761053*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.7905694150420947*alphaDrSurf_r[0])*G_1r[26]+(0.4517539514526256*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*G_1r[25]+(0.4517539514526256*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*G_1r[24]+((-0.249947932937059*alphaDrSurf_r[8])-0.3912303982179757*(alphaDrSurf_r[5]+alphaDrSurf_r[4])-0.6123724356957944*alphaDrSurf_r[0])*G_1r[23]+(0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*G_1r[22]+(0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*G_1r[21]+(0.1443075063646015*alphaDrSurf_r[8]+0.2258769757263128*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.3535533905932737*alphaDrSurf_r[0])*G_1r[20]+0.6324555320336759*alphaDrSurf_r[3]*G_1r[19]+((-0.3499271061118826*alphaDrSurf_r[7])-0.5477225575051661*alphaDrSurf_r[1])*G_1r[18]+((-0.3499271061118826*alphaDrSurf_r[6])-0.5477225575051661*alphaDrSurf_r[2])*G_1r[17]+0.7071067811865475*(alphaDrSurf_r[6]*G_1r[16]+alphaDrSurf_r[7]*G_1r[15])+((-0.3912303982179757*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[4])*G_1r[14]+((-0.3912303982179757*alphaDrSurf_r[8])-0.6123724356957944*alphaDrSurf_r[5])*G_1r[13]+(0.2020305089104422*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*G_1r[12]+(0.2020305089104422*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*G_1r[11]-0.4898979485566357*alphaDrSurf_r[3]*G_1r[10]+alphaDrSurf_r[8]*(0.7905694150420947*G_1r[9]+0.2258769757263128*(G_1r[8]+G_1r[7])-0.6123724356957944*G_1r[3])+0.3535533905932737*(G_1r[0]*alphaDrSurf_r[8]+alphaDrSurf_r[4]*G_1r[8])+(0.3162277660168379*G_1r[1]-0.5477225575051661*G_1r[5])*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[5]*G_1r[7]+(0.3162277660168379*G_1r[2]-0.5477225575051661*G_1r[6])*alphaDrSurf_r[6]+0.2828427124746191*alphaDrSurf_r[3]*G_1r[4]; + alphaDrSurf_r[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_r[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_r[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf_r[3] = nuSum[3]*wvpar+0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; + alphaDrSurf_r[4] = nuSum[4]*wvpar+0.5*nuSum[4]*dvpar-1.0*sumNuUPar[4]; + alphaDrSurf_r[5] = nuSum[5]*wvpar+0.5*nuSum[5]*dvpar-1.0*sumNuUPar[5]; + alphaDrSurf_r[6] = nuSum[6]*wvpar+0.5*nuSum[6]*dvpar-1.0*sumNuUPar[6]; + alphaDrSurf_r[7] = nuSum[7]*wvpar+0.5*nuSum[7]*dvpar-1.0*sumNuUPar[7]; + alphaDrSurf_r[8] = nuSum[8]*wvpar+0.5*nuSum[8]*dvpar-1.0*sumNuUPar[8]; - Ghat_F_0_l[0] = 0.7905694150420947*(alphaDrSurf_l[8]*F_0c[26]+alphaDrSurf_l[7]*F_0c[25]+alphaDrSurf_l[6]*F_0c[24])-0.6123724356957944*alphaDrSurf_l[8]*F_0c[23]+0.7905694150420947*(alphaDrSurf_l[5]*F_0c[22]+alphaDrSurf_l[4]*F_0c[21])+0.3535533905932737*alphaDrSurf_l[8]*F_0c[20]+0.7905694150420947*alphaDrSurf_l[3]*F_0c[19]-0.6123724356957944*(alphaDrSurf_l[7]*F_0c[18]+alphaDrSurf_l[6]*F_0c[17])+0.7905694150420947*(alphaDrSurf_l[2]*F_0c[16]+alphaDrSurf_l[1]*F_0c[15])-0.6123724356957944*(alphaDrSurf_l[5]*F_0c[14]+alphaDrSurf_l[4]*F_0c[13])+0.3535533905932737*(alphaDrSurf_l[7]*F_0c[12]+alphaDrSurf_l[6]*F_0c[11])-0.6123724356957944*alphaDrSurf_l[3]*F_0c[10]+0.7905694150420947*alphaDrSurf_l[0]*F_0c[9]+0.3535533905932737*(alphaDrSurf_l[5]*F_0c[8]+alphaDrSurf_l[4]*F_0c[7])-0.6123724356957944*(alphaDrSurf_l[2]*F_0c[6]+alphaDrSurf_l[1]*F_0c[5])+0.3535533905932737*alphaDrSurf_l[3]*F_0c[4]-0.6123724356957944*alphaDrSurf_l[0]*F_0c[3]+0.3535533905932737*(F_0c[2]*alphaDrSurf_l[2]+F_0c[1]*alphaDrSurf_l[1]+F_0c[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = 0.7071067811865475*alphaDrSurf_l[7]*F_0c[26]+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*F_0c[25]+0.7071067811865475*alphaDrSurf_l[3]*F_0c[24]+alphaDrSurf_l[7]*(0.7905694150420947*F_0c[22]-0.5477225575051661*F_0c[23])+0.7071067811865475*alphaDrSurf_l[1]*F_0c[21]+0.3162277660168379*alphaDrSurf_l[7]*F_0c[20]+(0.7071067811865475*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*F_0c[19]+((-0.5477225575051661*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[5])*F_0c[18]+alphaDrSurf_l[3]*(0.7905694150420947*F_0c[16]-0.5477225575051661*F_0c[17])+(0.7071067811865475*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*F_0c[15]-0.6123724356957944*alphaDrSurf_l[7]*F_0c[14]-0.5477225575051661*alphaDrSurf_l[1]*F_0c[13]+(0.3162277660168379*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[5])*F_0c[12]+0.3162277660168379*alphaDrSurf_l[3]*F_0c[11]+((-0.5477225575051661*alphaDrSurf_l[6])-0.6123724356957944*alphaDrSurf_l[2])*F_0c[10]+0.7905694150420947*alphaDrSurf_l[1]*F_0c[9]+0.3535533905932737*alphaDrSurf_l[7]*F_0c[8]+0.3162277660168379*(alphaDrSurf_l[1]*F_0c[7]+F_0c[4]*alphaDrSurf_l[6])-0.6123724356957944*alphaDrSurf_l[3]*F_0c[6]+((-0.5477225575051661*alphaDrSurf_l[4])-0.6123724356957944*alphaDrSurf_l[0])*F_0c[5]+0.3162277660168379*F_0c[1]*alphaDrSurf_l[4]+0.3535533905932737*(alphaDrSurf_l[2]*F_0c[4]+F_0c[2]*alphaDrSurf_l[3])-0.6123724356957944*alphaDrSurf_l[1]*F_0c[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0c[1]); - Ghat_F_0_l[2] = 0.7071067811865475*(alphaDrSurf_l[6]*F_0c[26]+alphaDrSurf_l[3]*F_0c[25])+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*F_0c[24]-0.5477225575051661*alphaDrSurf_l[6]*F_0c[23]+0.7071067811865475*alphaDrSurf_l[2]*F_0c[22]+alphaDrSurf_l[6]*(0.7905694150420947*F_0c[21]+0.3162277660168379*F_0c[20])+(0.7071067811865475*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*F_0c[19]-0.5477225575051661*alphaDrSurf_l[3]*F_0c[18]+((-0.5477225575051661*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[4])*F_0c[17]+0.7071067811865475*alphaDrSurf_l[5]*F_0c[16]+0.7905694150420947*(alphaDrSurf_l[0]*F_0c[16]+alphaDrSurf_l[3]*F_0c[15])-0.5477225575051661*alphaDrSurf_l[2]*F_0c[14]-0.6123724356957944*alphaDrSurf_l[6]*F_0c[13]+0.3162277660168379*alphaDrSurf_l[3]*F_0c[12]+(0.3162277660168379*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[4])*F_0c[11]+((-0.5477225575051661*alphaDrSurf_l[7])-0.6123724356957944*alphaDrSurf_l[1])*F_0c[10]+0.7905694150420947*alphaDrSurf_l[2]*F_0c[9]+0.3162277660168379*(alphaDrSurf_l[2]*F_0c[8]+F_0c[4]*alphaDrSurf_l[7])+0.3535533905932737*alphaDrSurf_l[6]*F_0c[7]+((-0.5477225575051661*alphaDrSurf_l[5])-0.6123724356957944*alphaDrSurf_l[0])*F_0c[6]+0.3162277660168379*F_0c[2]*alphaDrSurf_l[5]-0.6123724356957944*alphaDrSurf_l[3]*F_0c[5]+0.3535533905932737*(alphaDrSurf_l[1]*F_0c[4]+F_0c[1]*alphaDrSurf_l[3])-0.6123724356957944*alphaDrSurf_l[2]*F_0c[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0c[2]); - Ghat_F_0_l[3] = 0.6324555320336759*alphaDrSurf_l[3]*F_0c[26]+(0.6324555320336759*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*F_0c[25]+(0.6324555320336759*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*F_0c[24]+alphaDrSurf_l[3]*((-0.4898979485566357*F_0c[23])+0.7071067811865475*(F_0c[22]+F_0c[21])+0.2828427124746191*F_0c[20])+(0.6324555320336759*alphaDrSurf_l[8]+0.7071067811865475*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.7905694150420947*alphaDrSurf_l[0])*F_0c[19]+((-0.4898979485566357*alphaDrSurf_l[6])-0.5477225575051661*alphaDrSurf_l[2])*F_0c[18]+((-0.4898979485566357*alphaDrSurf_l[7])-0.5477225575051661*alphaDrSurf_l[1])*F_0c[17]+(0.7071067811865475*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*F_0c[16]+(0.7071067811865475*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*F_0c[15]-0.5477225575051661*alphaDrSurf_l[3]*(F_0c[14]+F_0c[13])+(0.2828427124746191*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*F_0c[12]+(0.2828427124746191*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*F_0c[11]+((-0.4898979485566357*alphaDrSurf_l[8])-0.5477225575051661*(alphaDrSurf_l[5]+alphaDrSurf_l[4])-0.6123724356957944*alphaDrSurf_l[0])*F_0c[10]+0.7905694150420947*alphaDrSurf_l[3]*F_0c[9]+0.2828427124746191*F_0c[4]*alphaDrSurf_l[8]+0.3162277660168379*alphaDrSurf_l[3]*F_0c[8]-0.5477225575051661*F_0c[6]*alphaDrSurf_l[7]+0.3162277660168379*(F_0c[2]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*F_0c[7])+(0.3162277660168379*F_0c[1]-0.5477225575051661*F_0c[5])*alphaDrSurf_l[6]-0.6123724356957944*alphaDrSurf_l[1]*F_0c[6]+0.3162277660168379*F_0c[4]*alphaDrSurf_l[5]-0.6123724356957944*alphaDrSurf_l[2]*F_0c[5]+F_0c[4]*(0.3162277660168379*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])-0.6123724356957944*F_0c[3]*alphaDrSurf_l[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_l[3]+F_0c[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0c[2]); - Ghat_F_0_l[4] = (0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*F_0c[26]+0.7071067811865475*alphaDrSurf_l[7]*F_0c[25]+(0.5050762722761053*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*F_0c[24]+((-0.3912303982179757*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[5])*F_0c[23]+0.7905694150420947*alphaDrSurf_l[8]*F_0c[22]+(0.5050762722761053*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*F_0c[21]+(0.2258769757263128*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[5])*F_0c[20]+0.7071067811865475*alphaDrSurf_l[3]*F_0c[19]-0.5477225575051661*alphaDrSurf_l[7]*F_0c[18]+((-0.3912303982179757*alphaDrSurf_l[6])-0.6123724356957944*alphaDrSurf_l[2])*F_0c[17]+0.7905694150420947*alphaDrSurf_l[6]*F_0c[16]+0.7071067811865475*alphaDrSurf_l[1]*F_0c[15]-0.6123724356957944*alphaDrSurf_l[8]*F_0c[14]+((-0.3912303982179757*alphaDrSurf_l[4])-0.6123724356957944*alphaDrSurf_l[0])*F_0c[13]+0.3162277660168379*alphaDrSurf_l[7]*F_0c[12]+(0.2258769757263128*alphaDrSurf_l[6]+0.3535533905932737*alphaDrSurf_l[2])*F_0c[11]-0.5477225575051661*alphaDrSurf_l[3]*F_0c[10]+0.7905694150420947*alphaDrSurf_l[4]*F_0c[9]+0.3535533905932737*F_0c[8]*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*F_0c[7]+(0.3535533905932737*F_0c[2]-0.6123724356957944*F_0c[6])*alphaDrSurf_l[6]-0.5477225575051661*alphaDrSurf_l[1]*F_0c[5]+(0.3535533905932737*F_0c[0]-0.6123724356957944*F_0c[3])*alphaDrSurf_l[4]+0.3162277660168379*(alphaDrSurf_l[3]*F_0c[4]+F_0c[1]*alphaDrSurf_l[1]); - Ghat_F_0_l[5] = (0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*F_0c[26]+(0.5050762722761053*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*F_0c[25]+0.7071067811865475*alphaDrSurf_l[6]*F_0c[24]+((-0.3912303982179757*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[4])*F_0c[23]+0.5050762722761053*alphaDrSurf_l[5]*F_0c[22]+0.7905694150420947*(alphaDrSurf_l[0]*F_0c[22]+alphaDrSurf_l[8]*F_0c[21])+(0.2258769757263128*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[4])*F_0c[20]+0.7071067811865475*alphaDrSurf_l[3]*F_0c[19]+((-0.3912303982179757*alphaDrSurf_l[7])-0.6123724356957944*alphaDrSurf_l[1])*F_0c[18]-0.5477225575051661*alphaDrSurf_l[6]*F_0c[17]+0.7071067811865475*alphaDrSurf_l[2]*F_0c[16]+0.7905694150420947*alphaDrSurf_l[7]*F_0c[15]-0.3912303982179757*alphaDrSurf_l[5]*F_0c[14]-0.6123724356957944*(alphaDrSurf_l[0]*F_0c[14]+alphaDrSurf_l[8]*F_0c[13])+(0.2258769757263128*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[1])*F_0c[12]+0.3162277660168379*alphaDrSurf_l[6]*F_0c[11]-0.5477225575051661*alphaDrSurf_l[3]*F_0c[10]+0.7905694150420947*alphaDrSurf_l[5]*F_0c[9]+0.3535533905932737*F_0c[7]*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[5]+0.3535533905932737*alphaDrSurf_l[0])*F_0c[8]+(0.3535533905932737*F_0c[1]-0.6123724356957944*F_0c[5])*alphaDrSurf_l[7]-0.5477225575051661*alphaDrSurf_l[2]*F_0c[6]+(0.3535533905932737*F_0c[0]-0.6123724356957944*F_0c[3])*alphaDrSurf_l[5]+0.3162277660168379*(alphaDrSurf_l[3]*F_0c[4]+F_0c[2]*alphaDrSurf_l[2]); - Ghat_F_0_l[6] = (0.4517539514526256*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*F_0c[26]+0.6324555320336759*alphaDrSurf_l[3]*F_0c[25]+(0.4517539514526256*alphaDrSurf_l[8]+0.7071067811865475*alphaDrSurf_l[5]+0.5050762722761053*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*F_0c[24]+((-0.3499271061118826*alphaDrSurf_l[6])-0.5477225575051661*alphaDrSurf_l[2])*F_0c[23]+0.7071067811865475*alphaDrSurf_l[6]*F_0c[22]+(0.5050762722761053*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*F_0c[21]+(0.2020305089104422*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*F_0c[20]+(0.6324555320336759*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*F_0c[19]-0.4898979485566357*alphaDrSurf_l[3]*F_0c[18]+((-0.3499271061118826*alphaDrSurf_l[8])-0.5477225575051661*alphaDrSurf_l[5]-0.3912303982179757*alphaDrSurf_l[4]-0.6123724356957944*alphaDrSurf_l[0])*F_0c[17]+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*F_0c[16]+0.7071067811865475*alphaDrSurf_l[3]*F_0c[15]-0.5477225575051661*alphaDrSurf_l[6]*F_0c[14]+((-0.3912303982179757*alphaDrSurf_l[6])-0.6123724356957944*alphaDrSurf_l[2])*F_0c[13]+0.2828427124746191*alphaDrSurf_l[3]*F_0c[12]+(0.2020305089104422*alphaDrSurf_l[8]+0.3162277660168379*alphaDrSurf_l[5]+0.2258769757263128*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*F_0c[11]+((-0.4898979485566357*alphaDrSurf_l[7])-0.5477225575051661*alphaDrSurf_l[1])*F_0c[10]+0.7905694150420947*alphaDrSurf_l[6]*F_0c[9]-0.5477225575051661*F_0c[6]*alphaDrSurf_l[8]+0.3162277660168379*(F_0c[2]*alphaDrSurf_l[8]+alphaDrSurf_l[6]*F_0c[8])+0.2828427124746191*F_0c[4]*alphaDrSurf_l[7]+(0.2258769757263128*alphaDrSurf_l[6]+0.3535533905932737*alphaDrSurf_l[2])*F_0c[7]+(0.3535533905932737*F_0c[0]-0.6123724356957944*F_0c[3])*alphaDrSurf_l[6]-0.6123724356957944*alphaDrSurf_l[4]*F_0c[6]-0.5477225575051661*alphaDrSurf_l[3]*F_0c[5]+0.3535533905932737*F_0c[2]*alphaDrSurf_l[4]+0.3162277660168379*(alphaDrSurf_l[1]*F_0c[4]+F_0c[1]*alphaDrSurf_l[3]); - Ghat_F_0_l[7] = (0.4517539514526256*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*F_0c[26]+(0.4517539514526256*alphaDrSurf_l[8]+0.5050762722761053*alphaDrSurf_l[5]+0.7071067811865475*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*F_0c[25]+0.6324555320336759*alphaDrSurf_l[3]*F_0c[24]+((-0.3499271061118826*alphaDrSurf_l[7])-0.5477225575051661*alphaDrSurf_l[1])*F_0c[23]+(0.5050762722761053*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*F_0c[22]+0.7071067811865475*alphaDrSurf_l[7]*F_0c[21]+(0.2020305089104422*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*F_0c[20]+(0.6324555320336759*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*F_0c[19]+((-0.3499271061118826*alphaDrSurf_l[8])-0.3912303982179757*alphaDrSurf_l[5]-0.5477225575051661*alphaDrSurf_l[4]-0.6123724356957944*alphaDrSurf_l[0])*F_0c[18]+alphaDrSurf_l[3]*(0.7071067811865475*F_0c[16]-0.4898979485566357*F_0c[17])+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*F_0c[15]+((-0.3912303982179757*alphaDrSurf_l[7])-0.6123724356957944*alphaDrSurf_l[1])*F_0c[14]-0.5477225575051661*alphaDrSurf_l[7]*F_0c[13]+(0.2020305089104422*alphaDrSurf_l[8]+0.2258769757263128*alphaDrSurf_l[5]+0.3162277660168379*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*F_0c[12]+0.2828427124746191*alphaDrSurf_l[3]*F_0c[11]+((-0.4898979485566357*alphaDrSurf_l[6])-0.5477225575051661*alphaDrSurf_l[2])*F_0c[10]+0.7905694150420947*alphaDrSurf_l[7]*F_0c[9]+(0.3162277660168379*F_0c[1]-0.5477225575051661*F_0c[5])*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[1])*F_0c[8]+(0.3162277660168379*F_0c[7]-0.6123724356957944*F_0c[3]+0.3535533905932737*F_0c[0])*alphaDrSurf_l[7]+0.2828427124746191*F_0c[4]*alphaDrSurf_l[6]-0.5477225575051661*alphaDrSurf_l[3]*F_0c[6]+(0.3535533905932737*F_0c[1]-0.6123724356957944*F_0c[5])*alphaDrSurf_l[5]+0.3162277660168379*(alphaDrSurf_l[2]*F_0c[4]+F_0c[2]*alphaDrSurf_l[3]); - Ghat_F_0_l[8] = (0.3226813938947327*alphaDrSurf_l[8]+0.5050762722761053*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.7905694150420947*alphaDrSurf_l[0])*F_0c[26]+(0.4517539514526256*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*F_0c[25]+(0.4517539514526256*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*F_0c[24]+((-0.249947932937059*alphaDrSurf_l[8])-0.3912303982179757*(alphaDrSurf_l[5]+alphaDrSurf_l[4])-0.6123724356957944*alphaDrSurf_l[0])*F_0c[23]+(0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*F_0c[22]+(0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*F_0c[21]+(0.1443075063646015*alphaDrSurf_l[8]+0.2258769757263128*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.3535533905932737*alphaDrSurf_l[0])*F_0c[20]+0.6324555320336759*alphaDrSurf_l[3]*F_0c[19]+((-0.3499271061118826*alphaDrSurf_l[7])-0.5477225575051661*alphaDrSurf_l[1])*F_0c[18]+((-0.3499271061118826*alphaDrSurf_l[6])-0.5477225575051661*alphaDrSurf_l[2])*F_0c[17]+0.7071067811865475*(alphaDrSurf_l[6]*F_0c[16]+alphaDrSurf_l[7]*F_0c[15])+((-0.3912303982179757*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[4])*F_0c[14]+((-0.3912303982179757*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[5])*F_0c[13]+(0.2020305089104422*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*F_0c[12]+(0.2020305089104422*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*F_0c[11]-0.4898979485566357*alphaDrSurf_l[3]*F_0c[10]+alphaDrSurf_l[8]*(0.7905694150420947*F_0c[9]+0.2258769757263128*(F_0c[8]+F_0c[7])-0.6123724356957944*F_0c[3])+0.3535533905932737*(F_0c[0]*alphaDrSurf_l[8]+alphaDrSurf_l[4]*F_0c[8])+(0.3162277660168379*F_0c[1]-0.5477225575051661*F_0c[5])*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[5]*F_0c[7]+(0.3162277660168379*F_0c[2]-0.5477225575051661*F_0c[6])*alphaDrSurf_l[6]+0.2828427124746191*alphaDrSurf_l[3]*F_0c[4]; - Ghat_G_1_l[0] = 0.7905694150420947*(alphaDrSurf_l[8]*G_1c[26]+alphaDrSurf_l[7]*G_1c[25]+alphaDrSurf_l[6]*G_1c[24])-0.6123724356957944*alphaDrSurf_l[8]*G_1c[23]+0.7905694150420947*(alphaDrSurf_l[5]*G_1c[22]+alphaDrSurf_l[4]*G_1c[21])+0.3535533905932737*alphaDrSurf_l[8]*G_1c[20]+0.7905694150420947*alphaDrSurf_l[3]*G_1c[19]-0.6123724356957944*(alphaDrSurf_l[7]*G_1c[18]+alphaDrSurf_l[6]*G_1c[17])+0.7905694150420947*(alphaDrSurf_l[2]*G_1c[16]+alphaDrSurf_l[1]*G_1c[15])-0.6123724356957944*(alphaDrSurf_l[5]*G_1c[14]+alphaDrSurf_l[4]*G_1c[13])+0.3535533905932737*(alphaDrSurf_l[7]*G_1c[12]+alphaDrSurf_l[6]*G_1c[11])-0.6123724356957944*alphaDrSurf_l[3]*G_1c[10]+0.7905694150420947*alphaDrSurf_l[0]*G_1c[9]+0.3535533905932737*(alphaDrSurf_l[5]*G_1c[8]+alphaDrSurf_l[4]*G_1c[7])-0.6123724356957944*(alphaDrSurf_l[2]*G_1c[6]+alphaDrSurf_l[1]*G_1c[5])+0.3535533905932737*alphaDrSurf_l[3]*G_1c[4]-0.6123724356957944*alphaDrSurf_l[0]*G_1c[3]+0.3535533905932737*(G_1c[2]*alphaDrSurf_l[2]+G_1c[1]*alphaDrSurf_l[1]+G_1c[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = 0.7071067811865475*alphaDrSurf_l[7]*G_1c[26]+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*G_1c[25]+0.7071067811865475*alphaDrSurf_l[3]*G_1c[24]+alphaDrSurf_l[7]*(0.7905694150420947*G_1c[22]-0.5477225575051661*G_1c[23])+0.7071067811865475*alphaDrSurf_l[1]*G_1c[21]+0.3162277660168379*alphaDrSurf_l[7]*G_1c[20]+(0.7071067811865475*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*G_1c[19]+((-0.5477225575051661*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[5])*G_1c[18]+alphaDrSurf_l[3]*(0.7905694150420947*G_1c[16]-0.5477225575051661*G_1c[17])+(0.7071067811865475*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*G_1c[15]-0.6123724356957944*alphaDrSurf_l[7]*G_1c[14]-0.5477225575051661*alphaDrSurf_l[1]*G_1c[13]+(0.3162277660168379*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[5])*G_1c[12]+0.3162277660168379*alphaDrSurf_l[3]*G_1c[11]+((-0.5477225575051661*alphaDrSurf_l[6])-0.6123724356957944*alphaDrSurf_l[2])*G_1c[10]+0.7905694150420947*alphaDrSurf_l[1]*G_1c[9]+0.3535533905932737*alphaDrSurf_l[7]*G_1c[8]+0.3162277660168379*(alphaDrSurf_l[1]*G_1c[7]+G_1c[4]*alphaDrSurf_l[6])-0.6123724356957944*alphaDrSurf_l[3]*G_1c[6]+((-0.5477225575051661*alphaDrSurf_l[4])-0.6123724356957944*alphaDrSurf_l[0])*G_1c[5]+0.3162277660168379*G_1c[1]*alphaDrSurf_l[4]+0.3535533905932737*(alphaDrSurf_l[2]*G_1c[4]+G_1c[2]*alphaDrSurf_l[3])-0.6123724356957944*alphaDrSurf_l[1]*G_1c[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1c[1]); - Ghat_G_1_l[2] = 0.7071067811865475*(alphaDrSurf_l[6]*G_1c[26]+alphaDrSurf_l[3]*G_1c[25])+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*G_1c[24]-0.5477225575051661*alphaDrSurf_l[6]*G_1c[23]+0.7071067811865475*alphaDrSurf_l[2]*G_1c[22]+alphaDrSurf_l[6]*(0.7905694150420947*G_1c[21]+0.3162277660168379*G_1c[20])+(0.7071067811865475*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*G_1c[19]-0.5477225575051661*alphaDrSurf_l[3]*G_1c[18]+((-0.5477225575051661*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[4])*G_1c[17]+0.7071067811865475*alphaDrSurf_l[5]*G_1c[16]+0.7905694150420947*(alphaDrSurf_l[0]*G_1c[16]+alphaDrSurf_l[3]*G_1c[15])-0.5477225575051661*alphaDrSurf_l[2]*G_1c[14]-0.6123724356957944*alphaDrSurf_l[6]*G_1c[13]+0.3162277660168379*alphaDrSurf_l[3]*G_1c[12]+(0.3162277660168379*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[4])*G_1c[11]+((-0.5477225575051661*alphaDrSurf_l[7])-0.6123724356957944*alphaDrSurf_l[1])*G_1c[10]+0.7905694150420947*alphaDrSurf_l[2]*G_1c[9]+0.3162277660168379*(alphaDrSurf_l[2]*G_1c[8]+G_1c[4]*alphaDrSurf_l[7])+0.3535533905932737*alphaDrSurf_l[6]*G_1c[7]+((-0.5477225575051661*alphaDrSurf_l[5])-0.6123724356957944*alphaDrSurf_l[0])*G_1c[6]+0.3162277660168379*G_1c[2]*alphaDrSurf_l[5]-0.6123724356957944*alphaDrSurf_l[3]*G_1c[5]+0.3535533905932737*(alphaDrSurf_l[1]*G_1c[4]+G_1c[1]*alphaDrSurf_l[3])-0.6123724356957944*alphaDrSurf_l[2]*G_1c[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1c[2]); - Ghat_G_1_l[3] = 0.6324555320336759*alphaDrSurf_l[3]*G_1c[26]+(0.6324555320336759*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*G_1c[25]+(0.6324555320336759*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*G_1c[24]+alphaDrSurf_l[3]*((-0.4898979485566357*G_1c[23])+0.7071067811865475*(G_1c[22]+G_1c[21])+0.2828427124746191*G_1c[20])+(0.6324555320336759*alphaDrSurf_l[8]+0.7071067811865475*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.7905694150420947*alphaDrSurf_l[0])*G_1c[19]+((-0.4898979485566357*alphaDrSurf_l[6])-0.5477225575051661*alphaDrSurf_l[2])*G_1c[18]+((-0.4898979485566357*alphaDrSurf_l[7])-0.5477225575051661*alphaDrSurf_l[1])*G_1c[17]+(0.7071067811865475*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*G_1c[16]+(0.7071067811865475*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*G_1c[15]-0.5477225575051661*alphaDrSurf_l[3]*(G_1c[14]+G_1c[13])+(0.2828427124746191*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*G_1c[12]+(0.2828427124746191*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*G_1c[11]+((-0.4898979485566357*alphaDrSurf_l[8])-0.5477225575051661*(alphaDrSurf_l[5]+alphaDrSurf_l[4])-0.6123724356957944*alphaDrSurf_l[0])*G_1c[10]+0.7905694150420947*alphaDrSurf_l[3]*G_1c[9]+0.2828427124746191*G_1c[4]*alphaDrSurf_l[8]+0.3162277660168379*alphaDrSurf_l[3]*G_1c[8]-0.5477225575051661*G_1c[6]*alphaDrSurf_l[7]+0.3162277660168379*(G_1c[2]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*G_1c[7])+(0.3162277660168379*G_1c[1]-0.5477225575051661*G_1c[5])*alphaDrSurf_l[6]-0.6123724356957944*alphaDrSurf_l[1]*G_1c[6]+0.3162277660168379*G_1c[4]*alphaDrSurf_l[5]-0.6123724356957944*alphaDrSurf_l[2]*G_1c[5]+G_1c[4]*(0.3162277660168379*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])-0.6123724356957944*G_1c[3]*alphaDrSurf_l[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_l[3]+G_1c[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1c[2]); - Ghat_G_1_l[4] = (0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*G_1c[26]+0.7071067811865475*alphaDrSurf_l[7]*G_1c[25]+(0.5050762722761053*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*G_1c[24]+((-0.3912303982179757*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[5])*G_1c[23]+0.7905694150420947*alphaDrSurf_l[8]*G_1c[22]+(0.5050762722761053*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*G_1c[21]+(0.2258769757263128*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[5])*G_1c[20]+0.7071067811865475*alphaDrSurf_l[3]*G_1c[19]-0.5477225575051661*alphaDrSurf_l[7]*G_1c[18]+((-0.3912303982179757*alphaDrSurf_l[6])-0.6123724356957944*alphaDrSurf_l[2])*G_1c[17]+0.7905694150420947*alphaDrSurf_l[6]*G_1c[16]+0.7071067811865475*alphaDrSurf_l[1]*G_1c[15]-0.6123724356957944*alphaDrSurf_l[8]*G_1c[14]+((-0.3912303982179757*alphaDrSurf_l[4])-0.6123724356957944*alphaDrSurf_l[0])*G_1c[13]+0.3162277660168379*alphaDrSurf_l[7]*G_1c[12]+(0.2258769757263128*alphaDrSurf_l[6]+0.3535533905932737*alphaDrSurf_l[2])*G_1c[11]-0.5477225575051661*alphaDrSurf_l[3]*G_1c[10]+0.7905694150420947*alphaDrSurf_l[4]*G_1c[9]+0.3535533905932737*G_1c[8]*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*G_1c[7]+(0.3535533905932737*G_1c[2]-0.6123724356957944*G_1c[6])*alphaDrSurf_l[6]-0.5477225575051661*alphaDrSurf_l[1]*G_1c[5]+(0.3535533905932737*G_1c[0]-0.6123724356957944*G_1c[3])*alphaDrSurf_l[4]+0.3162277660168379*(alphaDrSurf_l[3]*G_1c[4]+G_1c[1]*alphaDrSurf_l[1]); - Ghat_G_1_l[5] = (0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*G_1c[26]+(0.5050762722761053*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*G_1c[25]+0.7071067811865475*alphaDrSurf_l[6]*G_1c[24]+((-0.3912303982179757*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[4])*G_1c[23]+0.5050762722761053*alphaDrSurf_l[5]*G_1c[22]+0.7905694150420947*(alphaDrSurf_l[0]*G_1c[22]+alphaDrSurf_l[8]*G_1c[21])+(0.2258769757263128*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[4])*G_1c[20]+0.7071067811865475*alphaDrSurf_l[3]*G_1c[19]+((-0.3912303982179757*alphaDrSurf_l[7])-0.6123724356957944*alphaDrSurf_l[1])*G_1c[18]-0.5477225575051661*alphaDrSurf_l[6]*G_1c[17]+0.7071067811865475*alphaDrSurf_l[2]*G_1c[16]+0.7905694150420947*alphaDrSurf_l[7]*G_1c[15]-0.3912303982179757*alphaDrSurf_l[5]*G_1c[14]-0.6123724356957944*(alphaDrSurf_l[0]*G_1c[14]+alphaDrSurf_l[8]*G_1c[13])+(0.2258769757263128*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[1])*G_1c[12]+0.3162277660168379*alphaDrSurf_l[6]*G_1c[11]-0.5477225575051661*alphaDrSurf_l[3]*G_1c[10]+0.7905694150420947*alphaDrSurf_l[5]*G_1c[9]+0.3535533905932737*G_1c[7]*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[5]+0.3535533905932737*alphaDrSurf_l[0])*G_1c[8]+(0.3535533905932737*G_1c[1]-0.6123724356957944*G_1c[5])*alphaDrSurf_l[7]-0.5477225575051661*alphaDrSurf_l[2]*G_1c[6]+(0.3535533905932737*G_1c[0]-0.6123724356957944*G_1c[3])*alphaDrSurf_l[5]+0.3162277660168379*(alphaDrSurf_l[3]*G_1c[4]+G_1c[2]*alphaDrSurf_l[2]); - Ghat_G_1_l[6] = (0.4517539514526256*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*G_1c[26]+0.6324555320336759*alphaDrSurf_l[3]*G_1c[25]+(0.4517539514526256*alphaDrSurf_l[8]+0.7071067811865475*alphaDrSurf_l[5]+0.5050762722761053*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*G_1c[24]+((-0.3499271061118826*alphaDrSurf_l[6])-0.5477225575051661*alphaDrSurf_l[2])*G_1c[23]+0.7071067811865475*alphaDrSurf_l[6]*G_1c[22]+(0.5050762722761053*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*G_1c[21]+(0.2020305089104422*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*G_1c[20]+(0.6324555320336759*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*G_1c[19]-0.4898979485566357*alphaDrSurf_l[3]*G_1c[18]+((-0.3499271061118826*alphaDrSurf_l[8])-0.5477225575051661*alphaDrSurf_l[5]-0.3912303982179757*alphaDrSurf_l[4]-0.6123724356957944*alphaDrSurf_l[0])*G_1c[17]+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*G_1c[16]+0.7071067811865475*alphaDrSurf_l[3]*G_1c[15]-0.5477225575051661*alphaDrSurf_l[6]*G_1c[14]+((-0.3912303982179757*alphaDrSurf_l[6])-0.6123724356957944*alphaDrSurf_l[2])*G_1c[13]+0.2828427124746191*alphaDrSurf_l[3]*G_1c[12]+(0.2020305089104422*alphaDrSurf_l[8]+0.3162277660168379*alphaDrSurf_l[5]+0.2258769757263128*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*G_1c[11]+((-0.4898979485566357*alphaDrSurf_l[7])-0.5477225575051661*alphaDrSurf_l[1])*G_1c[10]+0.7905694150420947*alphaDrSurf_l[6]*G_1c[9]-0.5477225575051661*G_1c[6]*alphaDrSurf_l[8]+0.3162277660168379*(G_1c[2]*alphaDrSurf_l[8]+alphaDrSurf_l[6]*G_1c[8])+0.2828427124746191*G_1c[4]*alphaDrSurf_l[7]+(0.2258769757263128*alphaDrSurf_l[6]+0.3535533905932737*alphaDrSurf_l[2])*G_1c[7]+(0.3535533905932737*G_1c[0]-0.6123724356957944*G_1c[3])*alphaDrSurf_l[6]-0.6123724356957944*alphaDrSurf_l[4]*G_1c[6]-0.5477225575051661*alphaDrSurf_l[3]*G_1c[5]+0.3535533905932737*G_1c[2]*alphaDrSurf_l[4]+0.3162277660168379*(alphaDrSurf_l[1]*G_1c[4]+G_1c[1]*alphaDrSurf_l[3]); - Ghat_G_1_l[7] = (0.4517539514526256*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*G_1c[26]+(0.4517539514526256*alphaDrSurf_l[8]+0.5050762722761053*alphaDrSurf_l[5]+0.7071067811865475*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*G_1c[25]+0.6324555320336759*alphaDrSurf_l[3]*G_1c[24]+((-0.3499271061118826*alphaDrSurf_l[7])-0.5477225575051661*alphaDrSurf_l[1])*G_1c[23]+(0.5050762722761053*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*G_1c[22]+0.7071067811865475*alphaDrSurf_l[7]*G_1c[21]+(0.2020305089104422*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*G_1c[20]+(0.6324555320336759*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*G_1c[19]+((-0.3499271061118826*alphaDrSurf_l[8])-0.3912303982179757*alphaDrSurf_l[5]-0.5477225575051661*alphaDrSurf_l[4]-0.6123724356957944*alphaDrSurf_l[0])*G_1c[18]+alphaDrSurf_l[3]*(0.7071067811865475*G_1c[16]-0.4898979485566357*G_1c[17])+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*G_1c[15]+((-0.3912303982179757*alphaDrSurf_l[7])-0.6123724356957944*alphaDrSurf_l[1])*G_1c[14]-0.5477225575051661*alphaDrSurf_l[7]*G_1c[13]+(0.2020305089104422*alphaDrSurf_l[8]+0.2258769757263128*alphaDrSurf_l[5]+0.3162277660168379*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*G_1c[12]+0.2828427124746191*alphaDrSurf_l[3]*G_1c[11]+((-0.4898979485566357*alphaDrSurf_l[6])-0.5477225575051661*alphaDrSurf_l[2])*G_1c[10]+0.7905694150420947*alphaDrSurf_l[7]*G_1c[9]+(0.3162277660168379*G_1c[1]-0.5477225575051661*G_1c[5])*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[1])*G_1c[8]+(0.3162277660168379*G_1c[7]-0.6123724356957944*G_1c[3]+0.3535533905932737*G_1c[0])*alphaDrSurf_l[7]+0.2828427124746191*G_1c[4]*alphaDrSurf_l[6]-0.5477225575051661*alphaDrSurf_l[3]*G_1c[6]+(0.3535533905932737*G_1c[1]-0.6123724356957944*G_1c[5])*alphaDrSurf_l[5]+0.3162277660168379*(alphaDrSurf_l[2]*G_1c[4]+G_1c[2]*alphaDrSurf_l[3]); - Ghat_G_1_l[8] = (0.3226813938947327*alphaDrSurf_l[8]+0.5050762722761053*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.7905694150420947*alphaDrSurf_l[0])*G_1c[26]+(0.4517539514526256*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*G_1c[25]+(0.4517539514526256*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*G_1c[24]+((-0.249947932937059*alphaDrSurf_l[8])-0.3912303982179757*(alphaDrSurf_l[5]+alphaDrSurf_l[4])-0.6123724356957944*alphaDrSurf_l[0])*G_1c[23]+(0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*G_1c[22]+(0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*G_1c[21]+(0.1443075063646015*alphaDrSurf_l[8]+0.2258769757263128*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.3535533905932737*alphaDrSurf_l[0])*G_1c[20]+0.6324555320336759*alphaDrSurf_l[3]*G_1c[19]+((-0.3499271061118826*alphaDrSurf_l[7])-0.5477225575051661*alphaDrSurf_l[1])*G_1c[18]+((-0.3499271061118826*alphaDrSurf_l[6])-0.5477225575051661*alphaDrSurf_l[2])*G_1c[17]+0.7071067811865475*(alphaDrSurf_l[6]*G_1c[16]+alphaDrSurf_l[7]*G_1c[15])+((-0.3912303982179757*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[4])*G_1c[14]+((-0.3912303982179757*alphaDrSurf_l[8])-0.6123724356957944*alphaDrSurf_l[5])*G_1c[13]+(0.2020305089104422*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*G_1c[12]+(0.2020305089104422*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*G_1c[11]-0.4898979485566357*alphaDrSurf_l[3]*G_1c[10]+alphaDrSurf_l[8]*(0.7905694150420947*G_1c[9]+0.2258769757263128*(G_1c[8]+G_1c[7])-0.6123724356957944*G_1c[3])+0.3535533905932737*(G_1c[0]*alphaDrSurf_l[8]+alphaDrSurf_l[4]*G_1c[8])+(0.3162277660168379*G_1c[1]-0.5477225575051661*G_1c[5])*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[5]*G_1c[7]+(0.3162277660168379*G_1c[2]-0.5477225575051661*G_1c[6])*alphaDrSurf_l[6]+0.2828427124746191*alphaDrSurf_l[3]*G_1c[4]; + double F_0_UpwindQuad_l[9] = {0.0}; + double F_0_UpwindQuad_r[9] = {0.0}; + double F_0_Upwind_l[9] = {0.0}; + double F_0_Upwind_r[9] = {0.0}; + double Ghat_F_0_l[9] = {0.0}; + double Ghat_F_0_r[9] = {0.0}; + double G_1_UpwindQuad_l[9] = {0.0}; + double G_1_UpwindQuad_r[9] = {0.0}; + double G_1_Upwind_l[9] = {0.0}; + double G_1_Upwind_r[9] = {0.0}; + double Ghat_G_1_l[9] = {0.0}; + double Ghat_G_1_r[9] = {0.0}; + if (0.4*alphaDrSurf_l[8]-0.5999999999999995*alphaDrSurf_l[7]-0.5999999999999999*alphaDrSurf_l[6]+0.4472135954999579*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.9*alphaDrSurf_l[3]-0.6708203932499369*(alphaDrSurf_l[2]+alphaDrSurf_l[1])+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[0] = tensor_3x_p2_surfx3_eval_quad_node_0_r(F_0l); + G_1_UpwindQuad_l[0] = tensor_3x_p2_surfx3_eval_quad_node_0_r(G_1l); + } else { + F_0_UpwindQuad_l[0] = tensor_3x_p2_surfx3_eval_quad_node_0_l(F_0c); + G_1_UpwindQuad_l[0] = tensor_3x_p2_surfx3_eval_quad_node_0_l(G_1c); + } + if (0.4*alphaDrSurf_r[8]-0.5999999999999995*alphaDrSurf_r[7]-0.5999999999999999*alphaDrSurf_r[6]+0.4472135954999579*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.9*alphaDrSurf_r[3]-0.6708203932499369*(alphaDrSurf_r[2]+alphaDrSurf_r[1])+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[0] = tensor_3x_p2_surfx3_eval_quad_node_0_r(F_0c); + G_1_UpwindQuad_r[0] = tensor_3x_p2_surfx3_eval_quad_node_0_r(G_1c); + } else { + F_0_UpwindQuad_r[0] = tensor_3x_p2_surfx3_eval_quad_node_0_l(F_0r); + G_1_UpwindQuad_r[0] = tensor_3x_p2_surfx3_eval_quad_node_0_l(G_1r); + } + if ((-0.5*alphaDrSurf_l[8])+0.75*alphaDrSurf_l[7]-0.5590169943749475*alphaDrSurf_l[5]+0.4472135954999579*alphaDrSurf_l[4]-0.6708203932499369*alphaDrSurf_l[1]+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[1] = tensor_3x_p2_surfx3_eval_quad_node_1_r(F_0l); + G_1_UpwindQuad_l[1] = tensor_3x_p2_surfx3_eval_quad_node_1_r(G_1l); + } else { + F_0_UpwindQuad_l[1] = tensor_3x_p2_surfx3_eval_quad_node_1_l(F_0c); + G_1_UpwindQuad_l[1] = tensor_3x_p2_surfx3_eval_quad_node_1_l(G_1c); + } + if ((-0.5*alphaDrSurf_r[8])+0.75*alphaDrSurf_r[7]-0.5590169943749475*alphaDrSurf_r[5]+0.4472135954999579*alphaDrSurf_r[4]-0.6708203932499369*alphaDrSurf_r[1]+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[1] = tensor_3x_p2_surfx3_eval_quad_node_1_r(F_0c); + G_1_UpwindQuad_r[1] = tensor_3x_p2_surfx3_eval_quad_node_1_r(G_1c); + } else { + F_0_UpwindQuad_r[1] = tensor_3x_p2_surfx3_eval_quad_node_1_l(F_0r); + G_1_UpwindQuad_r[1] = tensor_3x_p2_surfx3_eval_quad_node_1_l(G_1r); + } + if (0.4*alphaDrSurf_l[8]-0.5999999999999995*alphaDrSurf_l[7]+0.5999999999999999*alphaDrSurf_l[6]+0.4472135954999579*(alphaDrSurf_l[5]+alphaDrSurf_l[4])-0.9*alphaDrSurf_l[3]+0.6708203932499369*alphaDrSurf_l[2]-0.6708203932499369*alphaDrSurf_l[1]+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[2] = tensor_3x_p2_surfx3_eval_quad_node_2_r(F_0l); + G_1_UpwindQuad_l[2] = tensor_3x_p2_surfx3_eval_quad_node_2_r(G_1l); + } else { + F_0_UpwindQuad_l[2] = tensor_3x_p2_surfx3_eval_quad_node_2_l(F_0c); + G_1_UpwindQuad_l[2] = tensor_3x_p2_surfx3_eval_quad_node_2_l(G_1c); + } + if (0.4*alphaDrSurf_r[8]-0.5999999999999995*alphaDrSurf_r[7]+0.5999999999999999*alphaDrSurf_r[6]+0.4472135954999579*(alphaDrSurf_r[5]+alphaDrSurf_r[4])-0.9*alphaDrSurf_r[3]+0.6708203932499369*alphaDrSurf_r[2]-0.6708203932499369*alphaDrSurf_r[1]+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[2] = tensor_3x_p2_surfx3_eval_quad_node_2_r(F_0c); + G_1_UpwindQuad_r[2] = tensor_3x_p2_surfx3_eval_quad_node_2_r(G_1c); + } else { + F_0_UpwindQuad_r[2] = tensor_3x_p2_surfx3_eval_quad_node_2_l(F_0r); + G_1_UpwindQuad_r[2] = tensor_3x_p2_surfx3_eval_quad_node_2_l(G_1r); + } + if ((-0.5*alphaDrSurf_l[8])+0.75*alphaDrSurf_l[6]+0.4472135954999579*alphaDrSurf_l[5]-0.5590169943749475*alphaDrSurf_l[4]-0.6708203932499369*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[3] = tensor_3x_p2_surfx3_eval_quad_node_3_r(F_0l); + G_1_UpwindQuad_l[3] = tensor_3x_p2_surfx3_eval_quad_node_3_r(G_1l); + } else { + F_0_UpwindQuad_l[3] = tensor_3x_p2_surfx3_eval_quad_node_3_l(F_0c); + G_1_UpwindQuad_l[3] = tensor_3x_p2_surfx3_eval_quad_node_3_l(G_1c); + } + if ((-0.5*alphaDrSurf_r[8])+0.75*alphaDrSurf_r[6]+0.4472135954999579*alphaDrSurf_r[5]-0.5590169943749475*alphaDrSurf_r[4]-0.6708203932499369*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[3] = tensor_3x_p2_surfx3_eval_quad_node_3_r(F_0c); + G_1_UpwindQuad_r[3] = tensor_3x_p2_surfx3_eval_quad_node_3_r(G_1c); + } else { + F_0_UpwindQuad_r[3] = tensor_3x_p2_surfx3_eval_quad_node_3_l(F_0r); + G_1_UpwindQuad_r[3] = tensor_3x_p2_surfx3_eval_quad_node_3_l(G_1r); + } + if (0.625*alphaDrSurf_l[8]-0.5590169943749475*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[4] = tensor_3x_p2_surfx3_eval_quad_node_4_r(F_0l); + G_1_UpwindQuad_l[4] = tensor_3x_p2_surfx3_eval_quad_node_4_r(G_1l); + } else { + F_0_UpwindQuad_l[4] = tensor_3x_p2_surfx3_eval_quad_node_4_l(F_0c); + G_1_UpwindQuad_l[4] = tensor_3x_p2_surfx3_eval_quad_node_4_l(G_1c); + } + if (0.625*alphaDrSurf_r[8]-0.5590169943749475*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[4] = tensor_3x_p2_surfx3_eval_quad_node_4_r(F_0c); + G_1_UpwindQuad_r[4] = tensor_3x_p2_surfx3_eval_quad_node_4_r(G_1c); + } else { + F_0_UpwindQuad_r[4] = tensor_3x_p2_surfx3_eval_quad_node_4_l(F_0r); + G_1_UpwindQuad_r[4] = tensor_3x_p2_surfx3_eval_quad_node_4_l(G_1r); + } + if ((-0.5*alphaDrSurf_l[8])-0.75*alphaDrSurf_l[6]+0.4472135954999579*alphaDrSurf_l[5]-0.5590169943749475*alphaDrSurf_l[4]+0.6708203932499369*alphaDrSurf_l[2]+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[5] = tensor_3x_p2_surfx3_eval_quad_node_5_r(F_0l); + G_1_UpwindQuad_l[5] = tensor_3x_p2_surfx3_eval_quad_node_5_r(G_1l); + } else { + F_0_UpwindQuad_l[5] = tensor_3x_p2_surfx3_eval_quad_node_5_l(F_0c); + G_1_UpwindQuad_l[5] = tensor_3x_p2_surfx3_eval_quad_node_5_l(G_1c); + } + if ((-0.5*alphaDrSurf_r[8])-0.75*alphaDrSurf_r[6]+0.4472135954999579*alphaDrSurf_r[5]-0.5590169943749475*alphaDrSurf_r[4]+0.6708203932499369*alphaDrSurf_r[2]+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[5] = tensor_3x_p2_surfx3_eval_quad_node_5_r(F_0c); + G_1_UpwindQuad_r[5] = tensor_3x_p2_surfx3_eval_quad_node_5_r(G_1c); + } else { + F_0_UpwindQuad_r[5] = tensor_3x_p2_surfx3_eval_quad_node_5_l(F_0r); + G_1_UpwindQuad_r[5] = tensor_3x_p2_surfx3_eval_quad_node_5_l(G_1r); + } + if (0.4*alphaDrSurf_l[8]+0.5999999999999995*alphaDrSurf_l[7]-0.5999999999999999*alphaDrSurf_l[6]+0.4472135954999579*(alphaDrSurf_l[5]+alphaDrSurf_l[4])-0.9*alphaDrSurf_l[3]-0.6708203932499369*alphaDrSurf_l[2]+0.6708203932499369*alphaDrSurf_l[1]+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[6] = tensor_3x_p2_surfx3_eval_quad_node_6_r(F_0l); + G_1_UpwindQuad_l[6] = tensor_3x_p2_surfx3_eval_quad_node_6_r(G_1l); + } else { + F_0_UpwindQuad_l[6] = tensor_3x_p2_surfx3_eval_quad_node_6_l(F_0c); + G_1_UpwindQuad_l[6] = tensor_3x_p2_surfx3_eval_quad_node_6_l(G_1c); + } + if (0.4*alphaDrSurf_r[8]+0.5999999999999995*alphaDrSurf_r[7]-0.5999999999999999*alphaDrSurf_r[6]+0.4472135954999579*(alphaDrSurf_r[5]+alphaDrSurf_r[4])-0.9*alphaDrSurf_r[3]-0.6708203932499369*alphaDrSurf_r[2]+0.6708203932499369*alphaDrSurf_r[1]+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[6] = tensor_3x_p2_surfx3_eval_quad_node_6_r(F_0c); + G_1_UpwindQuad_r[6] = tensor_3x_p2_surfx3_eval_quad_node_6_r(G_1c); + } else { + F_0_UpwindQuad_r[6] = tensor_3x_p2_surfx3_eval_quad_node_6_l(F_0r); + G_1_UpwindQuad_r[6] = tensor_3x_p2_surfx3_eval_quad_node_6_l(G_1r); + } + if ((-0.5*alphaDrSurf_l[8])-0.75*alphaDrSurf_l[7]-0.5590169943749475*alphaDrSurf_l[5]+0.4472135954999579*alphaDrSurf_l[4]+0.6708203932499369*alphaDrSurf_l[1]+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[7] = tensor_3x_p2_surfx3_eval_quad_node_7_r(F_0l); + G_1_UpwindQuad_l[7] = tensor_3x_p2_surfx3_eval_quad_node_7_r(G_1l); + } else { + F_0_UpwindQuad_l[7] = tensor_3x_p2_surfx3_eval_quad_node_7_l(F_0c); + G_1_UpwindQuad_l[7] = tensor_3x_p2_surfx3_eval_quad_node_7_l(G_1c); + } + if ((-0.5*alphaDrSurf_r[8])-0.75*alphaDrSurf_r[7]-0.5590169943749475*alphaDrSurf_r[5]+0.4472135954999579*alphaDrSurf_r[4]+0.6708203932499369*alphaDrSurf_r[1]+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[7] = tensor_3x_p2_surfx3_eval_quad_node_7_r(F_0c); + G_1_UpwindQuad_r[7] = tensor_3x_p2_surfx3_eval_quad_node_7_r(G_1c); + } else { + F_0_UpwindQuad_r[7] = tensor_3x_p2_surfx3_eval_quad_node_7_l(F_0r); + G_1_UpwindQuad_r[7] = tensor_3x_p2_surfx3_eval_quad_node_7_l(G_1r); + } + if (0.4*alphaDrSurf_l[8]+0.5999999999999995*alphaDrSurf_l[7]+0.5999999999999999*alphaDrSurf_l[6]+0.4472135954999579*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.9*alphaDrSurf_l[3]+0.6708203932499369*(alphaDrSurf_l[2]+alphaDrSurf_l[1])+0.5*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[8] = tensor_3x_p2_surfx3_eval_quad_node_8_r(F_0l); + G_1_UpwindQuad_l[8] = tensor_3x_p2_surfx3_eval_quad_node_8_r(G_1l); } else { + F_0_UpwindQuad_l[8] = tensor_3x_p2_surfx3_eval_quad_node_8_l(F_0c); + G_1_UpwindQuad_l[8] = tensor_3x_p2_surfx3_eval_quad_node_8_l(G_1c); + } + if (0.4*alphaDrSurf_r[8]+0.5999999999999995*alphaDrSurf_r[7]+0.5999999999999999*alphaDrSurf_r[6]+0.4472135954999579*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.9*alphaDrSurf_r[3]+0.6708203932499369*(alphaDrSurf_r[2]+alphaDrSurf_r[1])+0.5*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[8] = tensor_3x_p2_surfx3_eval_quad_node_8_r(F_0c); + G_1_UpwindQuad_r[8] = tensor_3x_p2_surfx3_eval_quad_node_8_r(G_1c); + } else { + F_0_UpwindQuad_r[8] = tensor_3x_p2_surfx3_eval_quad_node_8_l(F_0r); + G_1_UpwindQuad_r[8] = tensor_3x_p2_surfx3_eval_quad_node_8_l(G_1r); + } - Ghat_F_0_r[0] = 0.7905694150420947*(alphaDrSurf_r[8]*F_0c[26]+alphaDrSurf_r[7]*F_0c[25]+alphaDrSurf_r[6]*F_0c[24])+0.6123724356957944*alphaDrSurf_r[8]*F_0c[23]+0.7905694150420947*(alphaDrSurf_r[5]*F_0c[22]+alphaDrSurf_r[4]*F_0c[21])+0.3535533905932737*alphaDrSurf_r[8]*F_0c[20]+0.7905694150420947*alphaDrSurf_r[3]*F_0c[19]+0.6123724356957944*(alphaDrSurf_r[7]*F_0c[18]+alphaDrSurf_r[6]*F_0c[17])+0.7905694150420947*(alphaDrSurf_r[2]*F_0c[16]+alphaDrSurf_r[1]*F_0c[15])+0.6123724356957944*(alphaDrSurf_r[5]*F_0c[14]+alphaDrSurf_r[4]*F_0c[13])+0.3535533905932737*(alphaDrSurf_r[7]*F_0c[12]+alphaDrSurf_r[6]*F_0c[11])+0.6123724356957944*alphaDrSurf_r[3]*F_0c[10]+0.7905694150420947*alphaDrSurf_r[0]*F_0c[9]+0.3535533905932737*(alphaDrSurf_r[5]*F_0c[8]+alphaDrSurf_r[4]*F_0c[7])+0.6123724356957944*(alphaDrSurf_r[2]*F_0c[6]+alphaDrSurf_r[1]*F_0c[5])+0.3535533905932737*alphaDrSurf_r[3]*F_0c[4]+0.6123724356957944*alphaDrSurf_r[0]*F_0c[3]+0.3535533905932737*(F_0c[2]*alphaDrSurf_r[2]+F_0c[1]*alphaDrSurf_r[1]+F_0c[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = 0.7071067811865475*alphaDrSurf_r[7]*F_0c[26]+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*F_0c[25]+0.7071067811865475*alphaDrSurf_r[3]*F_0c[24]+alphaDrSurf_r[7]*(0.5477225575051661*F_0c[23]+0.7905694150420947*F_0c[22])+0.7071067811865475*alphaDrSurf_r[1]*F_0c[21]+0.3162277660168379*alphaDrSurf_r[7]*F_0c[20]+(0.7071067811865475*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*F_0c[19]+(0.5477225575051661*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[5])*F_0c[18]+alphaDrSurf_r[3]*(0.5477225575051661*F_0c[17]+0.7905694150420947*F_0c[16])+(0.7071067811865475*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*F_0c[15]+0.6123724356957944*alphaDrSurf_r[7]*F_0c[14]+0.5477225575051661*alphaDrSurf_r[1]*F_0c[13]+(0.3162277660168379*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[5])*F_0c[12]+0.3162277660168379*alphaDrSurf_r[3]*F_0c[11]+(0.5477225575051661*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[2])*F_0c[10]+0.7905694150420947*alphaDrSurf_r[1]*F_0c[9]+0.3535533905932737*alphaDrSurf_r[7]*F_0c[8]+0.3162277660168379*(alphaDrSurf_r[1]*F_0c[7]+F_0c[4]*alphaDrSurf_r[6])+0.6123724356957944*alphaDrSurf_r[3]*F_0c[6]+(0.5477225575051661*alphaDrSurf_r[4]+0.6123724356957944*alphaDrSurf_r[0])*F_0c[5]+0.3162277660168379*F_0c[1]*alphaDrSurf_r[4]+0.3535533905932737*(alphaDrSurf_r[2]*F_0c[4]+F_0c[2]*alphaDrSurf_r[3])+0.6123724356957944*alphaDrSurf_r[1]*F_0c[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0c[1]); - Ghat_F_0_r[2] = 0.7071067811865475*(alphaDrSurf_r[6]*F_0c[26]+alphaDrSurf_r[3]*F_0c[25])+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*F_0c[24]+0.5477225575051661*alphaDrSurf_r[6]*F_0c[23]+0.7071067811865475*alphaDrSurf_r[2]*F_0c[22]+alphaDrSurf_r[6]*(0.7905694150420947*F_0c[21]+0.3162277660168379*F_0c[20])+(0.7071067811865475*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*F_0c[19]+0.5477225575051661*alphaDrSurf_r[3]*F_0c[18]+(0.5477225575051661*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[4])*F_0c[17]+0.7071067811865475*alphaDrSurf_r[5]*F_0c[16]+0.7905694150420947*(alphaDrSurf_r[0]*F_0c[16]+alphaDrSurf_r[3]*F_0c[15])+0.5477225575051661*alphaDrSurf_r[2]*F_0c[14]+0.6123724356957944*alphaDrSurf_r[6]*F_0c[13]+0.3162277660168379*alphaDrSurf_r[3]*F_0c[12]+(0.3162277660168379*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[4])*F_0c[11]+(0.5477225575051661*alphaDrSurf_r[7]+0.6123724356957944*alphaDrSurf_r[1])*F_0c[10]+0.7905694150420947*alphaDrSurf_r[2]*F_0c[9]+0.3162277660168379*(alphaDrSurf_r[2]*F_0c[8]+F_0c[4]*alphaDrSurf_r[7])+0.3535533905932737*alphaDrSurf_r[6]*F_0c[7]+(0.5477225575051661*alphaDrSurf_r[5]+0.6123724356957944*alphaDrSurf_r[0])*F_0c[6]+0.3162277660168379*F_0c[2]*alphaDrSurf_r[5]+0.6123724356957944*alphaDrSurf_r[3]*F_0c[5]+0.3535533905932737*(alphaDrSurf_r[1]*F_0c[4]+F_0c[1]*alphaDrSurf_r[3])+0.6123724356957944*alphaDrSurf_r[2]*F_0c[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0c[2]); - Ghat_F_0_r[3] = 0.6324555320336759*alphaDrSurf_r[3]*F_0c[26]+(0.6324555320336759*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*F_0c[25]+(0.6324555320336759*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*F_0c[24]+alphaDrSurf_r[3]*(0.4898979485566357*F_0c[23]+0.7071067811865475*(F_0c[22]+F_0c[21])+0.2828427124746191*F_0c[20])+(0.6324555320336759*alphaDrSurf_r[8]+0.7071067811865475*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.7905694150420947*alphaDrSurf_r[0])*F_0c[19]+(0.4898979485566357*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[2])*F_0c[18]+(0.4898979485566357*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[1])*F_0c[17]+(0.7071067811865475*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*F_0c[16]+(0.7071067811865475*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*F_0c[15]+0.5477225575051661*alphaDrSurf_r[3]*(F_0c[14]+F_0c[13])+(0.2828427124746191*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*F_0c[12]+(0.2828427124746191*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*F_0c[11]+(0.4898979485566357*alphaDrSurf_r[8]+0.5477225575051661*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.6123724356957944*alphaDrSurf_r[0])*F_0c[10]+0.7905694150420947*alphaDrSurf_r[3]*F_0c[9]+0.2828427124746191*F_0c[4]*alphaDrSurf_r[8]+0.3162277660168379*alphaDrSurf_r[3]*F_0c[8]+0.5477225575051661*F_0c[6]*alphaDrSurf_r[7]+0.3162277660168379*(F_0c[2]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*F_0c[7])+(0.5477225575051661*F_0c[5]+0.3162277660168379*F_0c[1])*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[1]*F_0c[6]+0.3162277660168379*F_0c[4]*alphaDrSurf_r[5]+0.6123724356957944*alphaDrSurf_r[2]*F_0c[5]+F_0c[4]*(0.3162277660168379*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])+0.6123724356957944*F_0c[3]*alphaDrSurf_r[3]+0.3535533905932737*(F_0c[0]*alphaDrSurf_r[3]+F_0c[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0c[2]); - Ghat_F_0_r[4] = (0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*F_0c[26]+0.7071067811865475*alphaDrSurf_r[7]*F_0c[25]+(0.5050762722761053*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*F_0c[24]+(0.3912303982179757*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[5])*F_0c[23]+0.7905694150420947*alphaDrSurf_r[8]*F_0c[22]+(0.5050762722761053*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*F_0c[21]+(0.2258769757263128*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[5])*F_0c[20]+0.7071067811865475*alphaDrSurf_r[3]*F_0c[19]+0.5477225575051661*alphaDrSurf_r[7]*F_0c[18]+(0.3912303982179757*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[2])*F_0c[17]+0.7905694150420947*alphaDrSurf_r[6]*F_0c[16]+0.7071067811865475*alphaDrSurf_r[1]*F_0c[15]+0.6123724356957944*alphaDrSurf_r[8]*F_0c[14]+(0.3912303982179757*alphaDrSurf_r[4]+0.6123724356957944*alphaDrSurf_r[0])*F_0c[13]+0.3162277660168379*alphaDrSurf_r[7]*F_0c[12]+(0.2258769757263128*alphaDrSurf_r[6]+0.3535533905932737*alphaDrSurf_r[2])*F_0c[11]+0.5477225575051661*alphaDrSurf_r[3]*F_0c[10]+0.7905694150420947*alphaDrSurf_r[4]*F_0c[9]+0.3535533905932737*F_0c[8]*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*F_0c[7]+(0.6123724356957944*F_0c[6]+0.3535533905932737*F_0c[2])*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[1]*F_0c[5]+(0.6123724356957944*F_0c[3]+0.3535533905932737*F_0c[0])*alphaDrSurf_r[4]+0.3162277660168379*(alphaDrSurf_r[3]*F_0c[4]+F_0c[1]*alphaDrSurf_r[1]); - Ghat_F_0_r[5] = (0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*F_0c[26]+(0.5050762722761053*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*F_0c[25]+0.7071067811865475*alphaDrSurf_r[6]*F_0c[24]+(0.3912303982179757*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[4])*F_0c[23]+0.5050762722761053*alphaDrSurf_r[5]*F_0c[22]+0.7905694150420947*(alphaDrSurf_r[0]*F_0c[22]+alphaDrSurf_r[8]*F_0c[21])+(0.2258769757263128*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[4])*F_0c[20]+0.7071067811865475*alphaDrSurf_r[3]*F_0c[19]+(0.3912303982179757*alphaDrSurf_r[7]+0.6123724356957944*alphaDrSurf_r[1])*F_0c[18]+0.5477225575051661*alphaDrSurf_r[6]*F_0c[17]+0.7071067811865475*alphaDrSurf_r[2]*F_0c[16]+0.7905694150420947*alphaDrSurf_r[7]*F_0c[15]+0.3912303982179757*alphaDrSurf_r[5]*F_0c[14]+0.6123724356957944*(alphaDrSurf_r[0]*F_0c[14]+alphaDrSurf_r[8]*F_0c[13])+(0.2258769757263128*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[1])*F_0c[12]+0.3162277660168379*alphaDrSurf_r[6]*F_0c[11]+0.5477225575051661*alphaDrSurf_r[3]*F_0c[10]+0.7905694150420947*alphaDrSurf_r[5]*F_0c[9]+0.3535533905932737*F_0c[7]*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[5]+0.3535533905932737*alphaDrSurf_r[0])*F_0c[8]+(0.6123724356957944*F_0c[5]+0.3535533905932737*F_0c[1])*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[2]*F_0c[6]+(0.6123724356957944*F_0c[3]+0.3535533905932737*F_0c[0])*alphaDrSurf_r[5]+0.3162277660168379*(alphaDrSurf_r[3]*F_0c[4]+F_0c[2]*alphaDrSurf_r[2]); - Ghat_F_0_r[6] = (0.4517539514526256*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*F_0c[26]+0.6324555320336759*alphaDrSurf_r[3]*F_0c[25]+(0.4517539514526256*alphaDrSurf_r[8]+0.7071067811865475*alphaDrSurf_r[5]+0.5050762722761053*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*F_0c[24]+(0.3499271061118826*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[2])*F_0c[23]+0.7071067811865475*alphaDrSurf_r[6]*F_0c[22]+(0.5050762722761053*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*F_0c[21]+(0.2020305089104422*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*F_0c[20]+(0.6324555320336759*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*F_0c[19]+0.4898979485566357*alphaDrSurf_r[3]*F_0c[18]+(0.3499271061118826*alphaDrSurf_r[8]+0.5477225575051661*alphaDrSurf_r[5]+0.3912303982179757*alphaDrSurf_r[4]+0.6123724356957944*alphaDrSurf_r[0])*F_0c[17]+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*F_0c[16]+0.7071067811865475*alphaDrSurf_r[3]*F_0c[15]+0.5477225575051661*alphaDrSurf_r[6]*F_0c[14]+(0.3912303982179757*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[2])*F_0c[13]+0.2828427124746191*alphaDrSurf_r[3]*F_0c[12]+(0.2020305089104422*alphaDrSurf_r[8]+0.3162277660168379*alphaDrSurf_r[5]+0.2258769757263128*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*F_0c[11]+(0.4898979485566357*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[1])*F_0c[10]+0.7905694150420947*alphaDrSurf_r[6]*F_0c[9]+0.5477225575051661*F_0c[6]*alphaDrSurf_r[8]+0.3162277660168379*(F_0c[2]*alphaDrSurf_r[8]+alphaDrSurf_r[6]*F_0c[8])+0.2828427124746191*F_0c[4]*alphaDrSurf_r[7]+(0.2258769757263128*alphaDrSurf_r[6]+0.3535533905932737*alphaDrSurf_r[2])*F_0c[7]+(0.6123724356957944*F_0c[3]+0.3535533905932737*F_0c[0])*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[4]*F_0c[6]+0.5477225575051661*alphaDrSurf_r[3]*F_0c[5]+0.3535533905932737*F_0c[2]*alphaDrSurf_r[4]+0.3162277660168379*(alphaDrSurf_r[1]*F_0c[4]+F_0c[1]*alphaDrSurf_r[3]); - Ghat_F_0_r[7] = (0.4517539514526256*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*F_0c[26]+(0.4517539514526256*alphaDrSurf_r[8]+0.5050762722761053*alphaDrSurf_r[5]+0.7071067811865475*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*F_0c[25]+0.6324555320336759*alphaDrSurf_r[3]*F_0c[24]+(0.3499271061118826*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[1])*F_0c[23]+(0.5050762722761053*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*F_0c[22]+0.7071067811865475*alphaDrSurf_r[7]*F_0c[21]+(0.2020305089104422*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*F_0c[20]+(0.6324555320336759*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*F_0c[19]+(0.3499271061118826*alphaDrSurf_r[8]+0.3912303982179757*alphaDrSurf_r[5]+0.5477225575051661*alphaDrSurf_r[4]+0.6123724356957944*alphaDrSurf_r[0])*F_0c[18]+alphaDrSurf_r[3]*(0.4898979485566357*F_0c[17]+0.7071067811865475*F_0c[16])+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*F_0c[15]+(0.3912303982179757*alphaDrSurf_r[7]+0.6123724356957944*alphaDrSurf_r[1])*F_0c[14]+0.5477225575051661*alphaDrSurf_r[7]*F_0c[13]+(0.2020305089104422*alphaDrSurf_r[8]+0.2258769757263128*alphaDrSurf_r[5]+0.3162277660168379*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*F_0c[12]+0.2828427124746191*alphaDrSurf_r[3]*F_0c[11]+(0.4898979485566357*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[2])*F_0c[10]+0.7905694150420947*alphaDrSurf_r[7]*F_0c[9]+(0.5477225575051661*F_0c[5]+0.3162277660168379*F_0c[1])*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[1])*F_0c[8]+(0.3162277660168379*F_0c[7]+0.6123724356957944*F_0c[3]+0.3535533905932737*F_0c[0])*alphaDrSurf_r[7]+0.2828427124746191*F_0c[4]*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[3]*F_0c[6]+(0.6123724356957944*F_0c[5]+0.3535533905932737*F_0c[1])*alphaDrSurf_r[5]+0.3162277660168379*(alphaDrSurf_r[2]*F_0c[4]+F_0c[2]*alphaDrSurf_r[3]); - Ghat_F_0_r[8] = (0.3226813938947327*alphaDrSurf_r[8]+0.5050762722761053*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.7905694150420947*alphaDrSurf_r[0])*F_0c[26]+(0.4517539514526256*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*F_0c[25]+(0.4517539514526256*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*F_0c[24]+(0.249947932937059*alphaDrSurf_r[8]+0.3912303982179757*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.6123724356957944*alphaDrSurf_r[0])*F_0c[23]+(0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*F_0c[22]+(0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*F_0c[21]+(0.1443075063646015*alphaDrSurf_r[8]+0.2258769757263128*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.3535533905932737*alphaDrSurf_r[0])*F_0c[20]+0.6324555320336759*alphaDrSurf_r[3]*F_0c[19]+(0.3499271061118826*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[1])*F_0c[18]+(0.3499271061118826*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[2])*F_0c[17]+0.7071067811865475*(alphaDrSurf_r[6]*F_0c[16]+alphaDrSurf_r[7]*F_0c[15])+(0.3912303982179757*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[4])*F_0c[14]+(0.3912303982179757*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[5])*F_0c[13]+(0.2020305089104422*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*F_0c[12]+(0.2020305089104422*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*F_0c[11]+0.4898979485566357*alphaDrSurf_r[3]*F_0c[10]+alphaDrSurf_r[8]*(0.7905694150420947*F_0c[9]+0.2258769757263128*(F_0c[8]+F_0c[7])+0.6123724356957944*F_0c[3])+0.3535533905932737*(F_0c[0]*alphaDrSurf_r[8]+alphaDrSurf_r[4]*F_0c[8])+(0.5477225575051661*F_0c[5]+0.3162277660168379*F_0c[1])*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[5]*F_0c[7]+(0.5477225575051661*F_0c[6]+0.3162277660168379*F_0c[2])*alphaDrSurf_r[6]+0.2828427124746191*alphaDrSurf_r[3]*F_0c[4]; - Ghat_G_1_r[0] = 0.7905694150420947*(alphaDrSurf_r[8]*G_1c[26]+alphaDrSurf_r[7]*G_1c[25]+alphaDrSurf_r[6]*G_1c[24])+0.6123724356957944*alphaDrSurf_r[8]*G_1c[23]+0.7905694150420947*(alphaDrSurf_r[5]*G_1c[22]+alphaDrSurf_r[4]*G_1c[21])+0.3535533905932737*alphaDrSurf_r[8]*G_1c[20]+0.7905694150420947*alphaDrSurf_r[3]*G_1c[19]+0.6123724356957944*(alphaDrSurf_r[7]*G_1c[18]+alphaDrSurf_r[6]*G_1c[17])+0.7905694150420947*(alphaDrSurf_r[2]*G_1c[16]+alphaDrSurf_r[1]*G_1c[15])+0.6123724356957944*(alphaDrSurf_r[5]*G_1c[14]+alphaDrSurf_r[4]*G_1c[13])+0.3535533905932737*(alphaDrSurf_r[7]*G_1c[12]+alphaDrSurf_r[6]*G_1c[11])+0.6123724356957944*alphaDrSurf_r[3]*G_1c[10]+0.7905694150420947*alphaDrSurf_r[0]*G_1c[9]+0.3535533905932737*(alphaDrSurf_r[5]*G_1c[8]+alphaDrSurf_r[4]*G_1c[7])+0.6123724356957944*(alphaDrSurf_r[2]*G_1c[6]+alphaDrSurf_r[1]*G_1c[5])+0.3535533905932737*alphaDrSurf_r[3]*G_1c[4]+0.6123724356957944*alphaDrSurf_r[0]*G_1c[3]+0.3535533905932737*(G_1c[2]*alphaDrSurf_r[2]+G_1c[1]*alphaDrSurf_r[1]+G_1c[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = 0.7071067811865475*alphaDrSurf_r[7]*G_1c[26]+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*G_1c[25]+0.7071067811865475*alphaDrSurf_r[3]*G_1c[24]+alphaDrSurf_r[7]*(0.5477225575051661*G_1c[23]+0.7905694150420947*G_1c[22])+0.7071067811865475*alphaDrSurf_r[1]*G_1c[21]+0.3162277660168379*alphaDrSurf_r[7]*G_1c[20]+(0.7071067811865475*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*G_1c[19]+(0.5477225575051661*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[5])*G_1c[18]+alphaDrSurf_r[3]*(0.5477225575051661*G_1c[17]+0.7905694150420947*G_1c[16])+(0.7071067811865475*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*G_1c[15]+0.6123724356957944*alphaDrSurf_r[7]*G_1c[14]+0.5477225575051661*alphaDrSurf_r[1]*G_1c[13]+(0.3162277660168379*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[5])*G_1c[12]+0.3162277660168379*alphaDrSurf_r[3]*G_1c[11]+(0.5477225575051661*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[2])*G_1c[10]+0.7905694150420947*alphaDrSurf_r[1]*G_1c[9]+0.3535533905932737*alphaDrSurf_r[7]*G_1c[8]+0.3162277660168379*(alphaDrSurf_r[1]*G_1c[7]+G_1c[4]*alphaDrSurf_r[6])+0.6123724356957944*alphaDrSurf_r[3]*G_1c[6]+(0.5477225575051661*alphaDrSurf_r[4]+0.6123724356957944*alphaDrSurf_r[0])*G_1c[5]+0.3162277660168379*G_1c[1]*alphaDrSurf_r[4]+0.3535533905932737*(alphaDrSurf_r[2]*G_1c[4]+G_1c[2]*alphaDrSurf_r[3])+0.6123724356957944*alphaDrSurf_r[1]*G_1c[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1c[1]); - Ghat_G_1_r[2] = 0.7071067811865475*(alphaDrSurf_r[6]*G_1c[26]+alphaDrSurf_r[3]*G_1c[25])+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*G_1c[24]+0.5477225575051661*alphaDrSurf_r[6]*G_1c[23]+0.7071067811865475*alphaDrSurf_r[2]*G_1c[22]+alphaDrSurf_r[6]*(0.7905694150420947*G_1c[21]+0.3162277660168379*G_1c[20])+(0.7071067811865475*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*G_1c[19]+0.5477225575051661*alphaDrSurf_r[3]*G_1c[18]+(0.5477225575051661*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[4])*G_1c[17]+0.7071067811865475*alphaDrSurf_r[5]*G_1c[16]+0.7905694150420947*(alphaDrSurf_r[0]*G_1c[16]+alphaDrSurf_r[3]*G_1c[15])+0.5477225575051661*alphaDrSurf_r[2]*G_1c[14]+0.6123724356957944*alphaDrSurf_r[6]*G_1c[13]+0.3162277660168379*alphaDrSurf_r[3]*G_1c[12]+(0.3162277660168379*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[4])*G_1c[11]+(0.5477225575051661*alphaDrSurf_r[7]+0.6123724356957944*alphaDrSurf_r[1])*G_1c[10]+0.7905694150420947*alphaDrSurf_r[2]*G_1c[9]+0.3162277660168379*(alphaDrSurf_r[2]*G_1c[8]+G_1c[4]*alphaDrSurf_r[7])+0.3535533905932737*alphaDrSurf_r[6]*G_1c[7]+(0.5477225575051661*alphaDrSurf_r[5]+0.6123724356957944*alphaDrSurf_r[0])*G_1c[6]+0.3162277660168379*G_1c[2]*alphaDrSurf_r[5]+0.6123724356957944*alphaDrSurf_r[3]*G_1c[5]+0.3535533905932737*(alphaDrSurf_r[1]*G_1c[4]+G_1c[1]*alphaDrSurf_r[3])+0.6123724356957944*alphaDrSurf_r[2]*G_1c[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1c[2]); - Ghat_G_1_r[3] = 0.6324555320336759*alphaDrSurf_r[3]*G_1c[26]+(0.6324555320336759*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*G_1c[25]+(0.6324555320336759*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*G_1c[24]+alphaDrSurf_r[3]*(0.4898979485566357*G_1c[23]+0.7071067811865475*(G_1c[22]+G_1c[21])+0.2828427124746191*G_1c[20])+(0.6324555320336759*alphaDrSurf_r[8]+0.7071067811865475*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.7905694150420947*alphaDrSurf_r[0])*G_1c[19]+(0.4898979485566357*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[2])*G_1c[18]+(0.4898979485566357*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[1])*G_1c[17]+(0.7071067811865475*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*G_1c[16]+(0.7071067811865475*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*G_1c[15]+0.5477225575051661*alphaDrSurf_r[3]*(G_1c[14]+G_1c[13])+(0.2828427124746191*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*G_1c[12]+(0.2828427124746191*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*G_1c[11]+(0.4898979485566357*alphaDrSurf_r[8]+0.5477225575051661*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.6123724356957944*alphaDrSurf_r[0])*G_1c[10]+0.7905694150420947*alphaDrSurf_r[3]*G_1c[9]+0.2828427124746191*G_1c[4]*alphaDrSurf_r[8]+0.3162277660168379*alphaDrSurf_r[3]*G_1c[8]+0.5477225575051661*G_1c[6]*alphaDrSurf_r[7]+0.3162277660168379*(G_1c[2]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*G_1c[7])+(0.5477225575051661*G_1c[5]+0.3162277660168379*G_1c[1])*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[1]*G_1c[6]+0.3162277660168379*G_1c[4]*alphaDrSurf_r[5]+0.6123724356957944*alphaDrSurf_r[2]*G_1c[5]+G_1c[4]*(0.3162277660168379*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])+0.6123724356957944*G_1c[3]*alphaDrSurf_r[3]+0.3535533905932737*(G_1c[0]*alphaDrSurf_r[3]+G_1c[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1c[2]); - Ghat_G_1_r[4] = (0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*G_1c[26]+0.7071067811865475*alphaDrSurf_r[7]*G_1c[25]+(0.5050762722761053*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*G_1c[24]+(0.3912303982179757*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[5])*G_1c[23]+0.7905694150420947*alphaDrSurf_r[8]*G_1c[22]+(0.5050762722761053*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*G_1c[21]+(0.2258769757263128*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[5])*G_1c[20]+0.7071067811865475*alphaDrSurf_r[3]*G_1c[19]+0.5477225575051661*alphaDrSurf_r[7]*G_1c[18]+(0.3912303982179757*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[2])*G_1c[17]+0.7905694150420947*alphaDrSurf_r[6]*G_1c[16]+0.7071067811865475*alphaDrSurf_r[1]*G_1c[15]+0.6123724356957944*alphaDrSurf_r[8]*G_1c[14]+(0.3912303982179757*alphaDrSurf_r[4]+0.6123724356957944*alphaDrSurf_r[0])*G_1c[13]+0.3162277660168379*alphaDrSurf_r[7]*G_1c[12]+(0.2258769757263128*alphaDrSurf_r[6]+0.3535533905932737*alphaDrSurf_r[2])*G_1c[11]+0.5477225575051661*alphaDrSurf_r[3]*G_1c[10]+0.7905694150420947*alphaDrSurf_r[4]*G_1c[9]+0.3535533905932737*G_1c[8]*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*G_1c[7]+(0.6123724356957944*G_1c[6]+0.3535533905932737*G_1c[2])*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[1]*G_1c[5]+(0.6123724356957944*G_1c[3]+0.3535533905932737*G_1c[0])*alphaDrSurf_r[4]+0.3162277660168379*(alphaDrSurf_r[3]*G_1c[4]+G_1c[1]*alphaDrSurf_r[1]); - Ghat_G_1_r[5] = (0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*G_1c[26]+(0.5050762722761053*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*G_1c[25]+0.7071067811865475*alphaDrSurf_r[6]*G_1c[24]+(0.3912303982179757*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[4])*G_1c[23]+0.5050762722761053*alphaDrSurf_r[5]*G_1c[22]+0.7905694150420947*(alphaDrSurf_r[0]*G_1c[22]+alphaDrSurf_r[8]*G_1c[21])+(0.2258769757263128*alphaDrSurf_r[8]+0.3535533905932737*alphaDrSurf_r[4])*G_1c[20]+0.7071067811865475*alphaDrSurf_r[3]*G_1c[19]+(0.3912303982179757*alphaDrSurf_r[7]+0.6123724356957944*alphaDrSurf_r[1])*G_1c[18]+0.5477225575051661*alphaDrSurf_r[6]*G_1c[17]+0.7071067811865475*alphaDrSurf_r[2]*G_1c[16]+0.7905694150420947*alphaDrSurf_r[7]*G_1c[15]+0.3912303982179757*alphaDrSurf_r[5]*G_1c[14]+0.6123724356957944*(alphaDrSurf_r[0]*G_1c[14]+alphaDrSurf_r[8]*G_1c[13])+(0.2258769757263128*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[1])*G_1c[12]+0.3162277660168379*alphaDrSurf_r[6]*G_1c[11]+0.5477225575051661*alphaDrSurf_r[3]*G_1c[10]+0.7905694150420947*alphaDrSurf_r[5]*G_1c[9]+0.3535533905932737*G_1c[7]*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[5]+0.3535533905932737*alphaDrSurf_r[0])*G_1c[8]+(0.6123724356957944*G_1c[5]+0.3535533905932737*G_1c[1])*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[2]*G_1c[6]+(0.6123724356957944*G_1c[3]+0.3535533905932737*G_1c[0])*alphaDrSurf_r[5]+0.3162277660168379*(alphaDrSurf_r[3]*G_1c[4]+G_1c[2]*alphaDrSurf_r[2]); - Ghat_G_1_r[6] = (0.4517539514526256*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*G_1c[26]+0.6324555320336759*alphaDrSurf_r[3]*G_1c[25]+(0.4517539514526256*alphaDrSurf_r[8]+0.7071067811865475*alphaDrSurf_r[5]+0.5050762722761053*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*G_1c[24]+(0.3499271061118826*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[2])*G_1c[23]+0.7071067811865475*alphaDrSurf_r[6]*G_1c[22]+(0.5050762722761053*alphaDrSurf_r[6]+0.7905694150420947*alphaDrSurf_r[2])*G_1c[21]+(0.2020305089104422*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*G_1c[20]+(0.6324555320336759*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*G_1c[19]+0.4898979485566357*alphaDrSurf_r[3]*G_1c[18]+(0.3499271061118826*alphaDrSurf_r[8]+0.5477225575051661*alphaDrSurf_r[5]+0.3912303982179757*alphaDrSurf_r[4]+0.6123724356957944*alphaDrSurf_r[0])*G_1c[17]+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*G_1c[16]+0.7071067811865475*alphaDrSurf_r[3]*G_1c[15]+0.5477225575051661*alphaDrSurf_r[6]*G_1c[14]+(0.3912303982179757*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[2])*G_1c[13]+0.2828427124746191*alphaDrSurf_r[3]*G_1c[12]+(0.2020305089104422*alphaDrSurf_r[8]+0.3162277660168379*alphaDrSurf_r[5]+0.2258769757263128*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*G_1c[11]+(0.4898979485566357*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[1])*G_1c[10]+0.7905694150420947*alphaDrSurf_r[6]*G_1c[9]+0.5477225575051661*G_1c[6]*alphaDrSurf_r[8]+0.3162277660168379*(G_1c[2]*alphaDrSurf_r[8]+alphaDrSurf_r[6]*G_1c[8])+0.2828427124746191*G_1c[4]*alphaDrSurf_r[7]+(0.2258769757263128*alphaDrSurf_r[6]+0.3535533905932737*alphaDrSurf_r[2])*G_1c[7]+(0.6123724356957944*G_1c[3]+0.3535533905932737*G_1c[0])*alphaDrSurf_r[6]+0.6123724356957944*alphaDrSurf_r[4]*G_1c[6]+0.5477225575051661*alphaDrSurf_r[3]*G_1c[5]+0.3535533905932737*G_1c[2]*alphaDrSurf_r[4]+0.3162277660168379*(alphaDrSurf_r[1]*G_1c[4]+G_1c[1]*alphaDrSurf_r[3]); - Ghat_G_1_r[7] = (0.4517539514526256*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*G_1c[26]+(0.4517539514526256*alphaDrSurf_r[8]+0.5050762722761053*alphaDrSurf_r[5]+0.7071067811865475*alphaDrSurf_r[4]+0.7905694150420947*alphaDrSurf_r[0])*G_1c[25]+0.6324555320336759*alphaDrSurf_r[3]*G_1c[24]+(0.3499271061118826*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[1])*G_1c[23]+(0.5050762722761053*alphaDrSurf_r[7]+0.7905694150420947*alphaDrSurf_r[1])*G_1c[22]+0.7071067811865475*alphaDrSurf_r[7]*G_1c[21]+(0.2020305089104422*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*G_1c[20]+(0.6324555320336759*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*G_1c[19]+(0.3499271061118826*alphaDrSurf_r[8]+0.3912303982179757*alphaDrSurf_r[5]+0.5477225575051661*alphaDrSurf_r[4]+0.6123724356957944*alphaDrSurf_r[0])*G_1c[18]+alphaDrSurf_r[3]*(0.4898979485566357*G_1c[17]+0.7071067811865475*G_1c[16])+(0.7071067811865475*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*G_1c[15]+(0.3912303982179757*alphaDrSurf_r[7]+0.6123724356957944*alphaDrSurf_r[1])*G_1c[14]+0.5477225575051661*alphaDrSurf_r[7]*G_1c[13]+(0.2020305089104422*alphaDrSurf_r[8]+0.2258769757263128*alphaDrSurf_r[5]+0.3162277660168379*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[0])*G_1c[12]+0.2828427124746191*alphaDrSurf_r[3]*G_1c[11]+(0.4898979485566357*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[2])*G_1c[10]+0.7905694150420947*alphaDrSurf_r[7]*G_1c[9]+(0.5477225575051661*G_1c[5]+0.3162277660168379*G_1c[1])*alphaDrSurf_r[8]+(0.2258769757263128*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[1])*G_1c[8]+(0.3162277660168379*G_1c[7]+0.6123724356957944*G_1c[3]+0.3535533905932737*G_1c[0])*alphaDrSurf_r[7]+0.2828427124746191*G_1c[4]*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[3]*G_1c[6]+(0.6123724356957944*G_1c[5]+0.3535533905932737*G_1c[1])*alphaDrSurf_r[5]+0.3162277660168379*(alphaDrSurf_r[2]*G_1c[4]+G_1c[2]*alphaDrSurf_r[3]); - Ghat_G_1_r[8] = (0.3226813938947327*alphaDrSurf_r[8]+0.5050762722761053*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.7905694150420947*alphaDrSurf_r[0])*G_1c[26]+(0.4517539514526256*alphaDrSurf_r[7]+0.7071067811865475*alphaDrSurf_r[1])*G_1c[25]+(0.4517539514526256*alphaDrSurf_r[6]+0.7071067811865475*alphaDrSurf_r[2])*G_1c[24]+(0.249947932937059*alphaDrSurf_r[8]+0.3912303982179757*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.6123724356957944*alphaDrSurf_r[0])*G_1c[23]+(0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[4])*G_1c[22]+(0.5050762722761053*alphaDrSurf_r[8]+0.7905694150420947*alphaDrSurf_r[5])*G_1c[21]+(0.1443075063646015*alphaDrSurf_r[8]+0.2258769757263128*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.3535533905932737*alphaDrSurf_r[0])*G_1c[20]+0.6324555320336759*alphaDrSurf_r[3]*G_1c[19]+(0.3499271061118826*alphaDrSurf_r[7]+0.5477225575051661*alphaDrSurf_r[1])*G_1c[18]+(0.3499271061118826*alphaDrSurf_r[6]+0.5477225575051661*alphaDrSurf_r[2])*G_1c[17]+0.7071067811865475*(alphaDrSurf_r[6]*G_1c[16]+alphaDrSurf_r[7]*G_1c[15])+(0.3912303982179757*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[4])*G_1c[14]+(0.3912303982179757*alphaDrSurf_r[8]+0.6123724356957944*alphaDrSurf_r[5])*G_1c[13]+(0.2020305089104422*alphaDrSurf_r[7]+0.3162277660168379*alphaDrSurf_r[1])*G_1c[12]+(0.2020305089104422*alphaDrSurf_r[6]+0.3162277660168379*alphaDrSurf_r[2])*G_1c[11]+0.4898979485566357*alphaDrSurf_r[3]*G_1c[10]+alphaDrSurf_r[8]*(0.7905694150420947*G_1c[9]+0.2258769757263128*(G_1c[8]+G_1c[7])+0.6123724356957944*G_1c[3])+0.3535533905932737*(G_1c[0]*alphaDrSurf_r[8]+alphaDrSurf_r[4]*G_1c[8])+(0.5477225575051661*G_1c[5]+0.3162277660168379*G_1c[1])*alphaDrSurf_r[7]+0.3535533905932737*alphaDrSurf_r[5]*G_1c[7]+(0.5477225575051661*G_1c[6]+0.3162277660168379*G_1c[2])*alphaDrSurf_r[6]+0.2828427124746191*alphaDrSurf_r[3]*G_1c[4]; + // Project tensor nodal quadrature basis back onto modal basis. + tensor_3x_p2_upwind_quad_to_modal(F_0_UpwindQuad_l, F_0_Upwind_l); + tensor_3x_p2_upwind_quad_to_modal(F_0_UpwindQuad_r, F_0_Upwind_r); + tensor_3x_p2_upwind_quad_to_modal(G_1_UpwindQuad_l, G_1_Upwind_l); + tensor_3x_p2_upwind_quad_to_modal(G_1_UpwindQuad_r, G_1_Upwind_r); - Ghat_F_0_l[0] = 0.7905694150420947*(alphaDrSurf_l[8]*F_0l[26]+alphaDrSurf_l[7]*F_0l[25]+alphaDrSurf_l[6]*F_0l[24])+0.6123724356957944*alphaDrSurf_l[8]*F_0l[23]+0.7905694150420947*(alphaDrSurf_l[5]*F_0l[22]+alphaDrSurf_l[4]*F_0l[21])+0.3535533905932737*alphaDrSurf_l[8]*F_0l[20]+0.7905694150420947*alphaDrSurf_l[3]*F_0l[19]+0.6123724356957944*(alphaDrSurf_l[7]*F_0l[18]+alphaDrSurf_l[6]*F_0l[17])+0.7905694150420947*(alphaDrSurf_l[2]*F_0l[16]+alphaDrSurf_l[1]*F_0l[15])+0.6123724356957944*(alphaDrSurf_l[5]*F_0l[14]+alphaDrSurf_l[4]*F_0l[13])+0.3535533905932737*(alphaDrSurf_l[7]*F_0l[12]+alphaDrSurf_l[6]*F_0l[11])+0.6123724356957944*alphaDrSurf_l[3]*F_0l[10]+0.7905694150420947*alphaDrSurf_l[0]*F_0l[9]+0.3535533905932737*(alphaDrSurf_l[5]*F_0l[8]+alphaDrSurf_l[4]*F_0l[7])+0.6123724356957944*(alphaDrSurf_l[2]*F_0l[6]+alphaDrSurf_l[1]*F_0l[5])+0.3535533905932737*alphaDrSurf_l[3]*F_0l[4]+0.6123724356957944*alphaDrSurf_l[0]*F_0l[3]+0.3535533905932737*(F_0l[2]*alphaDrSurf_l[2]+F_0l[1]*alphaDrSurf_l[1]+F_0l[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = 0.7071067811865475*alphaDrSurf_l[7]*F_0l[26]+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*F_0l[25]+0.7071067811865475*alphaDrSurf_l[3]*F_0l[24]+alphaDrSurf_l[7]*(0.5477225575051661*F_0l[23]+0.7905694150420947*F_0l[22])+0.7071067811865475*alphaDrSurf_l[1]*F_0l[21]+0.3162277660168379*alphaDrSurf_l[7]*F_0l[20]+(0.7071067811865475*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*F_0l[19]+(0.5477225575051661*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[5])*F_0l[18]+alphaDrSurf_l[3]*(0.5477225575051661*F_0l[17]+0.7905694150420947*F_0l[16])+(0.7071067811865475*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*F_0l[15]+0.6123724356957944*alphaDrSurf_l[7]*F_0l[14]+0.5477225575051661*alphaDrSurf_l[1]*F_0l[13]+(0.3162277660168379*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[5])*F_0l[12]+0.3162277660168379*alphaDrSurf_l[3]*F_0l[11]+(0.5477225575051661*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[2])*F_0l[10]+0.7905694150420947*alphaDrSurf_l[1]*F_0l[9]+0.3535533905932737*alphaDrSurf_l[7]*F_0l[8]+0.3162277660168379*(alphaDrSurf_l[1]*F_0l[7]+F_0l[4]*alphaDrSurf_l[6])+0.6123724356957944*alphaDrSurf_l[3]*F_0l[6]+(0.5477225575051661*alphaDrSurf_l[4]+0.6123724356957944*alphaDrSurf_l[0])*F_0l[5]+0.3162277660168379*F_0l[1]*alphaDrSurf_l[4]+0.3535533905932737*(alphaDrSurf_l[2]*F_0l[4]+F_0l[2]*alphaDrSurf_l[3])+0.6123724356957944*alphaDrSurf_l[1]*F_0l[3]+0.3535533905932737*(F_0l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0l[1]); - Ghat_F_0_l[2] = 0.7071067811865475*(alphaDrSurf_l[6]*F_0l[26]+alphaDrSurf_l[3]*F_0l[25])+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*F_0l[24]+0.5477225575051661*alphaDrSurf_l[6]*F_0l[23]+0.7071067811865475*alphaDrSurf_l[2]*F_0l[22]+alphaDrSurf_l[6]*(0.7905694150420947*F_0l[21]+0.3162277660168379*F_0l[20])+(0.7071067811865475*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*F_0l[19]+0.5477225575051661*alphaDrSurf_l[3]*F_0l[18]+(0.5477225575051661*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[4])*F_0l[17]+0.7071067811865475*alphaDrSurf_l[5]*F_0l[16]+0.7905694150420947*(alphaDrSurf_l[0]*F_0l[16]+alphaDrSurf_l[3]*F_0l[15])+0.5477225575051661*alphaDrSurf_l[2]*F_0l[14]+0.6123724356957944*alphaDrSurf_l[6]*F_0l[13]+0.3162277660168379*alphaDrSurf_l[3]*F_0l[12]+(0.3162277660168379*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[4])*F_0l[11]+(0.5477225575051661*alphaDrSurf_l[7]+0.6123724356957944*alphaDrSurf_l[1])*F_0l[10]+0.7905694150420947*alphaDrSurf_l[2]*F_0l[9]+0.3162277660168379*(alphaDrSurf_l[2]*F_0l[8]+F_0l[4]*alphaDrSurf_l[7])+0.3535533905932737*alphaDrSurf_l[6]*F_0l[7]+(0.5477225575051661*alphaDrSurf_l[5]+0.6123724356957944*alphaDrSurf_l[0])*F_0l[6]+0.3162277660168379*F_0l[2]*alphaDrSurf_l[5]+0.6123724356957944*alphaDrSurf_l[3]*F_0l[5]+0.3535533905932737*(alphaDrSurf_l[1]*F_0l[4]+F_0l[1]*alphaDrSurf_l[3])+0.6123724356957944*alphaDrSurf_l[2]*F_0l[3]+0.3535533905932737*(F_0l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0l[2]); - Ghat_F_0_l[3] = 0.6324555320336759*alphaDrSurf_l[3]*F_0l[26]+(0.6324555320336759*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*F_0l[25]+(0.6324555320336759*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*F_0l[24]+alphaDrSurf_l[3]*(0.4898979485566357*F_0l[23]+0.7071067811865475*(F_0l[22]+F_0l[21])+0.2828427124746191*F_0l[20])+(0.6324555320336759*alphaDrSurf_l[8]+0.7071067811865475*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.7905694150420947*alphaDrSurf_l[0])*F_0l[19]+(0.4898979485566357*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[2])*F_0l[18]+(0.4898979485566357*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[1])*F_0l[17]+(0.7071067811865475*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*F_0l[16]+(0.7071067811865475*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*F_0l[15]+0.5477225575051661*alphaDrSurf_l[3]*(F_0l[14]+F_0l[13])+(0.2828427124746191*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*F_0l[12]+(0.2828427124746191*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*F_0l[11]+(0.4898979485566357*alphaDrSurf_l[8]+0.5477225575051661*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.6123724356957944*alphaDrSurf_l[0])*F_0l[10]+0.7905694150420947*alphaDrSurf_l[3]*F_0l[9]+0.2828427124746191*F_0l[4]*alphaDrSurf_l[8]+0.3162277660168379*alphaDrSurf_l[3]*F_0l[8]+0.5477225575051661*F_0l[6]*alphaDrSurf_l[7]+0.3162277660168379*(F_0l[2]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*F_0l[7])+(0.5477225575051661*F_0l[5]+0.3162277660168379*F_0l[1])*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[1]*F_0l[6]+0.3162277660168379*F_0l[4]*alphaDrSurf_l[5]+0.6123724356957944*alphaDrSurf_l[2]*F_0l[5]+F_0l[4]*(0.3162277660168379*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])+0.6123724356957944*F_0l[3]*alphaDrSurf_l[3]+0.3535533905932737*(F_0l[0]*alphaDrSurf_l[3]+F_0l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0l[2]); - Ghat_F_0_l[4] = (0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*F_0l[26]+0.7071067811865475*alphaDrSurf_l[7]*F_0l[25]+(0.5050762722761053*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*F_0l[24]+(0.3912303982179757*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[5])*F_0l[23]+0.7905694150420947*alphaDrSurf_l[8]*F_0l[22]+(0.5050762722761053*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*F_0l[21]+(0.2258769757263128*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[5])*F_0l[20]+0.7071067811865475*alphaDrSurf_l[3]*F_0l[19]+0.5477225575051661*alphaDrSurf_l[7]*F_0l[18]+(0.3912303982179757*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[2])*F_0l[17]+0.7905694150420947*alphaDrSurf_l[6]*F_0l[16]+0.7071067811865475*alphaDrSurf_l[1]*F_0l[15]+0.6123724356957944*alphaDrSurf_l[8]*F_0l[14]+(0.3912303982179757*alphaDrSurf_l[4]+0.6123724356957944*alphaDrSurf_l[0])*F_0l[13]+0.3162277660168379*alphaDrSurf_l[7]*F_0l[12]+(0.2258769757263128*alphaDrSurf_l[6]+0.3535533905932737*alphaDrSurf_l[2])*F_0l[11]+0.5477225575051661*alphaDrSurf_l[3]*F_0l[10]+0.7905694150420947*alphaDrSurf_l[4]*F_0l[9]+0.3535533905932737*F_0l[8]*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*F_0l[7]+(0.6123724356957944*F_0l[6]+0.3535533905932737*F_0l[2])*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[1]*F_0l[5]+(0.6123724356957944*F_0l[3]+0.3535533905932737*F_0l[0])*alphaDrSurf_l[4]+0.3162277660168379*(alphaDrSurf_l[3]*F_0l[4]+F_0l[1]*alphaDrSurf_l[1]); - Ghat_F_0_l[5] = (0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*F_0l[26]+(0.5050762722761053*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*F_0l[25]+0.7071067811865475*alphaDrSurf_l[6]*F_0l[24]+(0.3912303982179757*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[4])*F_0l[23]+0.5050762722761053*alphaDrSurf_l[5]*F_0l[22]+0.7905694150420947*(alphaDrSurf_l[0]*F_0l[22]+alphaDrSurf_l[8]*F_0l[21])+(0.2258769757263128*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[4])*F_0l[20]+0.7071067811865475*alphaDrSurf_l[3]*F_0l[19]+(0.3912303982179757*alphaDrSurf_l[7]+0.6123724356957944*alphaDrSurf_l[1])*F_0l[18]+0.5477225575051661*alphaDrSurf_l[6]*F_0l[17]+0.7071067811865475*alphaDrSurf_l[2]*F_0l[16]+0.7905694150420947*alphaDrSurf_l[7]*F_0l[15]+0.3912303982179757*alphaDrSurf_l[5]*F_0l[14]+0.6123724356957944*(alphaDrSurf_l[0]*F_0l[14]+alphaDrSurf_l[8]*F_0l[13])+(0.2258769757263128*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[1])*F_0l[12]+0.3162277660168379*alphaDrSurf_l[6]*F_0l[11]+0.5477225575051661*alphaDrSurf_l[3]*F_0l[10]+0.7905694150420947*alphaDrSurf_l[5]*F_0l[9]+0.3535533905932737*F_0l[7]*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[5]+0.3535533905932737*alphaDrSurf_l[0])*F_0l[8]+(0.6123724356957944*F_0l[5]+0.3535533905932737*F_0l[1])*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[2]*F_0l[6]+(0.6123724356957944*F_0l[3]+0.3535533905932737*F_0l[0])*alphaDrSurf_l[5]+0.3162277660168379*(alphaDrSurf_l[3]*F_0l[4]+F_0l[2]*alphaDrSurf_l[2]); - Ghat_F_0_l[6] = (0.4517539514526256*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*F_0l[26]+0.6324555320336759*alphaDrSurf_l[3]*F_0l[25]+(0.4517539514526256*alphaDrSurf_l[8]+0.7071067811865475*alphaDrSurf_l[5]+0.5050762722761053*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*F_0l[24]+(0.3499271061118826*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[2])*F_0l[23]+0.7071067811865475*alphaDrSurf_l[6]*F_0l[22]+(0.5050762722761053*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*F_0l[21]+(0.2020305089104422*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*F_0l[20]+(0.6324555320336759*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*F_0l[19]+0.4898979485566357*alphaDrSurf_l[3]*F_0l[18]+(0.3499271061118826*alphaDrSurf_l[8]+0.5477225575051661*alphaDrSurf_l[5]+0.3912303982179757*alphaDrSurf_l[4]+0.6123724356957944*alphaDrSurf_l[0])*F_0l[17]+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*F_0l[16]+0.7071067811865475*alphaDrSurf_l[3]*F_0l[15]+0.5477225575051661*alphaDrSurf_l[6]*F_0l[14]+(0.3912303982179757*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[2])*F_0l[13]+0.2828427124746191*alphaDrSurf_l[3]*F_0l[12]+(0.2020305089104422*alphaDrSurf_l[8]+0.3162277660168379*alphaDrSurf_l[5]+0.2258769757263128*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*F_0l[11]+(0.4898979485566357*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[1])*F_0l[10]+0.7905694150420947*alphaDrSurf_l[6]*F_0l[9]+0.5477225575051661*F_0l[6]*alphaDrSurf_l[8]+0.3162277660168379*(F_0l[2]*alphaDrSurf_l[8]+alphaDrSurf_l[6]*F_0l[8])+0.2828427124746191*F_0l[4]*alphaDrSurf_l[7]+(0.2258769757263128*alphaDrSurf_l[6]+0.3535533905932737*alphaDrSurf_l[2])*F_0l[7]+(0.6123724356957944*F_0l[3]+0.3535533905932737*F_0l[0])*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[4]*F_0l[6]+0.5477225575051661*alphaDrSurf_l[3]*F_0l[5]+0.3535533905932737*F_0l[2]*alphaDrSurf_l[4]+0.3162277660168379*(alphaDrSurf_l[1]*F_0l[4]+F_0l[1]*alphaDrSurf_l[3]); - Ghat_F_0_l[7] = (0.4517539514526256*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*F_0l[26]+(0.4517539514526256*alphaDrSurf_l[8]+0.5050762722761053*alphaDrSurf_l[5]+0.7071067811865475*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*F_0l[25]+0.6324555320336759*alphaDrSurf_l[3]*F_0l[24]+(0.3499271061118826*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[1])*F_0l[23]+(0.5050762722761053*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*F_0l[22]+0.7071067811865475*alphaDrSurf_l[7]*F_0l[21]+(0.2020305089104422*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*F_0l[20]+(0.6324555320336759*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*F_0l[19]+(0.3499271061118826*alphaDrSurf_l[8]+0.3912303982179757*alphaDrSurf_l[5]+0.5477225575051661*alphaDrSurf_l[4]+0.6123724356957944*alphaDrSurf_l[0])*F_0l[18]+alphaDrSurf_l[3]*(0.4898979485566357*F_0l[17]+0.7071067811865475*F_0l[16])+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*F_0l[15]+(0.3912303982179757*alphaDrSurf_l[7]+0.6123724356957944*alphaDrSurf_l[1])*F_0l[14]+0.5477225575051661*alphaDrSurf_l[7]*F_0l[13]+(0.2020305089104422*alphaDrSurf_l[8]+0.2258769757263128*alphaDrSurf_l[5]+0.3162277660168379*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*F_0l[12]+0.2828427124746191*alphaDrSurf_l[3]*F_0l[11]+(0.4898979485566357*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[2])*F_0l[10]+0.7905694150420947*alphaDrSurf_l[7]*F_0l[9]+(0.5477225575051661*F_0l[5]+0.3162277660168379*F_0l[1])*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[1])*F_0l[8]+(0.3162277660168379*F_0l[7]+0.6123724356957944*F_0l[3]+0.3535533905932737*F_0l[0])*alphaDrSurf_l[7]+0.2828427124746191*F_0l[4]*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[3]*F_0l[6]+(0.6123724356957944*F_0l[5]+0.3535533905932737*F_0l[1])*alphaDrSurf_l[5]+0.3162277660168379*(alphaDrSurf_l[2]*F_0l[4]+F_0l[2]*alphaDrSurf_l[3]); - Ghat_F_0_l[8] = (0.3226813938947327*alphaDrSurf_l[8]+0.5050762722761053*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.7905694150420947*alphaDrSurf_l[0])*F_0l[26]+(0.4517539514526256*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*F_0l[25]+(0.4517539514526256*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*F_0l[24]+(0.249947932937059*alphaDrSurf_l[8]+0.3912303982179757*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.6123724356957944*alphaDrSurf_l[0])*F_0l[23]+(0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*F_0l[22]+(0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*F_0l[21]+(0.1443075063646015*alphaDrSurf_l[8]+0.2258769757263128*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.3535533905932737*alphaDrSurf_l[0])*F_0l[20]+0.6324555320336759*alphaDrSurf_l[3]*F_0l[19]+(0.3499271061118826*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[1])*F_0l[18]+(0.3499271061118826*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[2])*F_0l[17]+0.7071067811865475*(alphaDrSurf_l[6]*F_0l[16]+alphaDrSurf_l[7]*F_0l[15])+(0.3912303982179757*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[4])*F_0l[14]+(0.3912303982179757*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[5])*F_0l[13]+(0.2020305089104422*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*F_0l[12]+(0.2020305089104422*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*F_0l[11]+0.4898979485566357*alphaDrSurf_l[3]*F_0l[10]+alphaDrSurf_l[8]*(0.7905694150420947*F_0l[9]+0.2258769757263128*(F_0l[8]+F_0l[7])+0.6123724356957944*F_0l[3])+0.3535533905932737*(F_0l[0]*alphaDrSurf_l[8]+alphaDrSurf_l[4]*F_0l[8])+(0.5477225575051661*F_0l[5]+0.3162277660168379*F_0l[1])*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[5]*F_0l[7]+(0.5477225575051661*F_0l[6]+0.3162277660168379*F_0l[2])*alphaDrSurf_l[6]+0.2828427124746191*alphaDrSurf_l[3]*F_0l[4]; - Ghat_G_1_l[0] = 0.7905694150420947*(alphaDrSurf_l[8]*G_1l[26]+alphaDrSurf_l[7]*G_1l[25]+alphaDrSurf_l[6]*G_1l[24])+0.6123724356957944*alphaDrSurf_l[8]*G_1l[23]+0.7905694150420947*(alphaDrSurf_l[5]*G_1l[22]+alphaDrSurf_l[4]*G_1l[21])+0.3535533905932737*alphaDrSurf_l[8]*G_1l[20]+0.7905694150420947*alphaDrSurf_l[3]*G_1l[19]+0.6123724356957944*(alphaDrSurf_l[7]*G_1l[18]+alphaDrSurf_l[6]*G_1l[17])+0.7905694150420947*(alphaDrSurf_l[2]*G_1l[16]+alphaDrSurf_l[1]*G_1l[15])+0.6123724356957944*(alphaDrSurf_l[5]*G_1l[14]+alphaDrSurf_l[4]*G_1l[13])+0.3535533905932737*(alphaDrSurf_l[7]*G_1l[12]+alphaDrSurf_l[6]*G_1l[11])+0.6123724356957944*alphaDrSurf_l[3]*G_1l[10]+0.7905694150420947*alphaDrSurf_l[0]*G_1l[9]+0.3535533905932737*(alphaDrSurf_l[5]*G_1l[8]+alphaDrSurf_l[4]*G_1l[7])+0.6123724356957944*(alphaDrSurf_l[2]*G_1l[6]+alphaDrSurf_l[1]*G_1l[5])+0.3535533905932737*alphaDrSurf_l[3]*G_1l[4]+0.6123724356957944*alphaDrSurf_l[0]*G_1l[3]+0.3535533905932737*(G_1l[2]*alphaDrSurf_l[2]+G_1l[1]*alphaDrSurf_l[1]+G_1l[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = 0.7071067811865475*alphaDrSurf_l[7]*G_1l[26]+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*G_1l[25]+0.7071067811865475*alphaDrSurf_l[3]*G_1l[24]+alphaDrSurf_l[7]*(0.5477225575051661*G_1l[23]+0.7905694150420947*G_1l[22])+0.7071067811865475*alphaDrSurf_l[1]*G_1l[21]+0.3162277660168379*alphaDrSurf_l[7]*G_1l[20]+(0.7071067811865475*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*G_1l[19]+(0.5477225575051661*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[5])*G_1l[18]+alphaDrSurf_l[3]*(0.5477225575051661*G_1l[17]+0.7905694150420947*G_1l[16])+(0.7071067811865475*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*G_1l[15]+0.6123724356957944*alphaDrSurf_l[7]*G_1l[14]+0.5477225575051661*alphaDrSurf_l[1]*G_1l[13]+(0.3162277660168379*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[5])*G_1l[12]+0.3162277660168379*alphaDrSurf_l[3]*G_1l[11]+(0.5477225575051661*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[2])*G_1l[10]+0.7905694150420947*alphaDrSurf_l[1]*G_1l[9]+0.3535533905932737*alphaDrSurf_l[7]*G_1l[8]+0.3162277660168379*(alphaDrSurf_l[1]*G_1l[7]+G_1l[4]*alphaDrSurf_l[6])+0.6123724356957944*alphaDrSurf_l[3]*G_1l[6]+(0.5477225575051661*alphaDrSurf_l[4]+0.6123724356957944*alphaDrSurf_l[0])*G_1l[5]+0.3162277660168379*G_1l[1]*alphaDrSurf_l[4]+0.3535533905932737*(alphaDrSurf_l[2]*G_1l[4]+G_1l[2]*alphaDrSurf_l[3])+0.6123724356957944*alphaDrSurf_l[1]*G_1l[3]+0.3535533905932737*(G_1l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1l[1]); - Ghat_G_1_l[2] = 0.7071067811865475*(alphaDrSurf_l[6]*G_1l[26]+alphaDrSurf_l[3]*G_1l[25])+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*G_1l[24]+0.5477225575051661*alphaDrSurf_l[6]*G_1l[23]+0.7071067811865475*alphaDrSurf_l[2]*G_1l[22]+alphaDrSurf_l[6]*(0.7905694150420947*G_1l[21]+0.3162277660168379*G_1l[20])+(0.7071067811865475*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*G_1l[19]+0.5477225575051661*alphaDrSurf_l[3]*G_1l[18]+(0.5477225575051661*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[4])*G_1l[17]+0.7071067811865475*alphaDrSurf_l[5]*G_1l[16]+0.7905694150420947*(alphaDrSurf_l[0]*G_1l[16]+alphaDrSurf_l[3]*G_1l[15])+0.5477225575051661*alphaDrSurf_l[2]*G_1l[14]+0.6123724356957944*alphaDrSurf_l[6]*G_1l[13]+0.3162277660168379*alphaDrSurf_l[3]*G_1l[12]+(0.3162277660168379*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[4])*G_1l[11]+(0.5477225575051661*alphaDrSurf_l[7]+0.6123724356957944*alphaDrSurf_l[1])*G_1l[10]+0.7905694150420947*alphaDrSurf_l[2]*G_1l[9]+0.3162277660168379*(alphaDrSurf_l[2]*G_1l[8]+G_1l[4]*alphaDrSurf_l[7])+0.3535533905932737*alphaDrSurf_l[6]*G_1l[7]+(0.5477225575051661*alphaDrSurf_l[5]+0.6123724356957944*alphaDrSurf_l[0])*G_1l[6]+0.3162277660168379*G_1l[2]*alphaDrSurf_l[5]+0.6123724356957944*alphaDrSurf_l[3]*G_1l[5]+0.3535533905932737*(alphaDrSurf_l[1]*G_1l[4]+G_1l[1]*alphaDrSurf_l[3])+0.6123724356957944*alphaDrSurf_l[2]*G_1l[3]+0.3535533905932737*(G_1l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1l[2]); - Ghat_G_1_l[3] = 0.6324555320336759*alphaDrSurf_l[3]*G_1l[26]+(0.6324555320336759*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*G_1l[25]+(0.6324555320336759*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*G_1l[24]+alphaDrSurf_l[3]*(0.4898979485566357*G_1l[23]+0.7071067811865475*(G_1l[22]+G_1l[21])+0.2828427124746191*G_1l[20])+(0.6324555320336759*alphaDrSurf_l[8]+0.7071067811865475*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.7905694150420947*alphaDrSurf_l[0])*G_1l[19]+(0.4898979485566357*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[2])*G_1l[18]+(0.4898979485566357*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[1])*G_1l[17]+(0.7071067811865475*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*G_1l[16]+(0.7071067811865475*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*G_1l[15]+0.5477225575051661*alphaDrSurf_l[3]*(G_1l[14]+G_1l[13])+(0.2828427124746191*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*G_1l[12]+(0.2828427124746191*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*G_1l[11]+(0.4898979485566357*alphaDrSurf_l[8]+0.5477225575051661*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.6123724356957944*alphaDrSurf_l[0])*G_1l[10]+0.7905694150420947*alphaDrSurf_l[3]*G_1l[9]+0.2828427124746191*G_1l[4]*alphaDrSurf_l[8]+0.3162277660168379*alphaDrSurf_l[3]*G_1l[8]+0.5477225575051661*G_1l[6]*alphaDrSurf_l[7]+0.3162277660168379*(G_1l[2]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*G_1l[7])+(0.5477225575051661*G_1l[5]+0.3162277660168379*G_1l[1])*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[1]*G_1l[6]+0.3162277660168379*G_1l[4]*alphaDrSurf_l[5]+0.6123724356957944*alphaDrSurf_l[2]*G_1l[5]+G_1l[4]*(0.3162277660168379*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])+0.6123724356957944*G_1l[3]*alphaDrSurf_l[3]+0.3535533905932737*(G_1l[0]*alphaDrSurf_l[3]+G_1l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1l[2]); - Ghat_G_1_l[4] = (0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*G_1l[26]+0.7071067811865475*alphaDrSurf_l[7]*G_1l[25]+(0.5050762722761053*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*G_1l[24]+(0.3912303982179757*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[5])*G_1l[23]+0.7905694150420947*alphaDrSurf_l[8]*G_1l[22]+(0.5050762722761053*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*G_1l[21]+(0.2258769757263128*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[5])*G_1l[20]+0.7071067811865475*alphaDrSurf_l[3]*G_1l[19]+0.5477225575051661*alphaDrSurf_l[7]*G_1l[18]+(0.3912303982179757*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[2])*G_1l[17]+0.7905694150420947*alphaDrSurf_l[6]*G_1l[16]+0.7071067811865475*alphaDrSurf_l[1]*G_1l[15]+0.6123724356957944*alphaDrSurf_l[8]*G_1l[14]+(0.3912303982179757*alphaDrSurf_l[4]+0.6123724356957944*alphaDrSurf_l[0])*G_1l[13]+0.3162277660168379*alphaDrSurf_l[7]*G_1l[12]+(0.2258769757263128*alphaDrSurf_l[6]+0.3535533905932737*alphaDrSurf_l[2])*G_1l[11]+0.5477225575051661*alphaDrSurf_l[3]*G_1l[10]+0.7905694150420947*alphaDrSurf_l[4]*G_1l[9]+0.3535533905932737*G_1l[8]*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*G_1l[7]+(0.6123724356957944*G_1l[6]+0.3535533905932737*G_1l[2])*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[1]*G_1l[5]+(0.6123724356957944*G_1l[3]+0.3535533905932737*G_1l[0])*alphaDrSurf_l[4]+0.3162277660168379*(alphaDrSurf_l[3]*G_1l[4]+G_1l[1]*alphaDrSurf_l[1]); - Ghat_G_1_l[5] = (0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*G_1l[26]+(0.5050762722761053*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*G_1l[25]+0.7071067811865475*alphaDrSurf_l[6]*G_1l[24]+(0.3912303982179757*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[4])*G_1l[23]+0.5050762722761053*alphaDrSurf_l[5]*G_1l[22]+0.7905694150420947*(alphaDrSurf_l[0]*G_1l[22]+alphaDrSurf_l[8]*G_1l[21])+(0.2258769757263128*alphaDrSurf_l[8]+0.3535533905932737*alphaDrSurf_l[4])*G_1l[20]+0.7071067811865475*alphaDrSurf_l[3]*G_1l[19]+(0.3912303982179757*alphaDrSurf_l[7]+0.6123724356957944*alphaDrSurf_l[1])*G_1l[18]+0.5477225575051661*alphaDrSurf_l[6]*G_1l[17]+0.7071067811865475*alphaDrSurf_l[2]*G_1l[16]+0.7905694150420947*alphaDrSurf_l[7]*G_1l[15]+0.3912303982179757*alphaDrSurf_l[5]*G_1l[14]+0.6123724356957944*(alphaDrSurf_l[0]*G_1l[14]+alphaDrSurf_l[8]*G_1l[13])+(0.2258769757263128*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[1])*G_1l[12]+0.3162277660168379*alphaDrSurf_l[6]*G_1l[11]+0.5477225575051661*alphaDrSurf_l[3]*G_1l[10]+0.7905694150420947*alphaDrSurf_l[5]*G_1l[9]+0.3535533905932737*G_1l[7]*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[5]+0.3535533905932737*alphaDrSurf_l[0])*G_1l[8]+(0.6123724356957944*G_1l[5]+0.3535533905932737*G_1l[1])*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[2]*G_1l[6]+(0.6123724356957944*G_1l[3]+0.3535533905932737*G_1l[0])*alphaDrSurf_l[5]+0.3162277660168379*(alphaDrSurf_l[3]*G_1l[4]+G_1l[2]*alphaDrSurf_l[2]); - Ghat_G_1_l[6] = (0.4517539514526256*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*G_1l[26]+0.6324555320336759*alphaDrSurf_l[3]*G_1l[25]+(0.4517539514526256*alphaDrSurf_l[8]+0.7071067811865475*alphaDrSurf_l[5]+0.5050762722761053*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*G_1l[24]+(0.3499271061118826*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[2])*G_1l[23]+0.7071067811865475*alphaDrSurf_l[6]*G_1l[22]+(0.5050762722761053*alphaDrSurf_l[6]+0.7905694150420947*alphaDrSurf_l[2])*G_1l[21]+(0.2020305089104422*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*G_1l[20]+(0.6324555320336759*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*G_1l[19]+0.4898979485566357*alphaDrSurf_l[3]*G_1l[18]+(0.3499271061118826*alphaDrSurf_l[8]+0.5477225575051661*alphaDrSurf_l[5]+0.3912303982179757*alphaDrSurf_l[4]+0.6123724356957944*alphaDrSurf_l[0])*G_1l[17]+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*G_1l[16]+0.7071067811865475*alphaDrSurf_l[3]*G_1l[15]+0.5477225575051661*alphaDrSurf_l[6]*G_1l[14]+(0.3912303982179757*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[2])*G_1l[13]+0.2828427124746191*alphaDrSurf_l[3]*G_1l[12]+(0.2020305089104422*alphaDrSurf_l[8]+0.3162277660168379*alphaDrSurf_l[5]+0.2258769757263128*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*G_1l[11]+(0.4898979485566357*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[1])*G_1l[10]+0.7905694150420947*alphaDrSurf_l[6]*G_1l[9]+0.5477225575051661*G_1l[6]*alphaDrSurf_l[8]+0.3162277660168379*(G_1l[2]*alphaDrSurf_l[8]+alphaDrSurf_l[6]*G_1l[8])+0.2828427124746191*G_1l[4]*alphaDrSurf_l[7]+(0.2258769757263128*alphaDrSurf_l[6]+0.3535533905932737*alphaDrSurf_l[2])*G_1l[7]+(0.6123724356957944*G_1l[3]+0.3535533905932737*G_1l[0])*alphaDrSurf_l[6]+0.6123724356957944*alphaDrSurf_l[4]*G_1l[6]+0.5477225575051661*alphaDrSurf_l[3]*G_1l[5]+0.3535533905932737*G_1l[2]*alphaDrSurf_l[4]+0.3162277660168379*(alphaDrSurf_l[1]*G_1l[4]+G_1l[1]*alphaDrSurf_l[3]); - Ghat_G_1_l[7] = (0.4517539514526256*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*G_1l[26]+(0.4517539514526256*alphaDrSurf_l[8]+0.5050762722761053*alphaDrSurf_l[5]+0.7071067811865475*alphaDrSurf_l[4]+0.7905694150420947*alphaDrSurf_l[0])*G_1l[25]+0.6324555320336759*alphaDrSurf_l[3]*G_1l[24]+(0.3499271061118826*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[1])*G_1l[23]+(0.5050762722761053*alphaDrSurf_l[7]+0.7905694150420947*alphaDrSurf_l[1])*G_1l[22]+0.7071067811865475*alphaDrSurf_l[7]*G_1l[21]+(0.2020305089104422*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*G_1l[20]+(0.6324555320336759*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*G_1l[19]+(0.3499271061118826*alphaDrSurf_l[8]+0.3912303982179757*alphaDrSurf_l[5]+0.5477225575051661*alphaDrSurf_l[4]+0.6123724356957944*alphaDrSurf_l[0])*G_1l[18]+alphaDrSurf_l[3]*(0.4898979485566357*G_1l[17]+0.7071067811865475*G_1l[16])+(0.7071067811865475*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*G_1l[15]+(0.3912303982179757*alphaDrSurf_l[7]+0.6123724356957944*alphaDrSurf_l[1])*G_1l[14]+0.5477225575051661*alphaDrSurf_l[7]*G_1l[13]+(0.2020305089104422*alphaDrSurf_l[8]+0.2258769757263128*alphaDrSurf_l[5]+0.3162277660168379*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[0])*G_1l[12]+0.2828427124746191*alphaDrSurf_l[3]*G_1l[11]+(0.4898979485566357*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[2])*G_1l[10]+0.7905694150420947*alphaDrSurf_l[7]*G_1l[9]+(0.5477225575051661*G_1l[5]+0.3162277660168379*G_1l[1])*alphaDrSurf_l[8]+(0.2258769757263128*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[1])*G_1l[8]+(0.3162277660168379*G_1l[7]+0.6123724356957944*G_1l[3]+0.3535533905932737*G_1l[0])*alphaDrSurf_l[7]+0.2828427124746191*G_1l[4]*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[3]*G_1l[6]+(0.6123724356957944*G_1l[5]+0.3535533905932737*G_1l[1])*alphaDrSurf_l[5]+0.3162277660168379*(alphaDrSurf_l[2]*G_1l[4]+G_1l[2]*alphaDrSurf_l[3]); - Ghat_G_1_l[8] = (0.3226813938947327*alphaDrSurf_l[8]+0.5050762722761053*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.7905694150420947*alphaDrSurf_l[0])*G_1l[26]+(0.4517539514526256*alphaDrSurf_l[7]+0.7071067811865475*alphaDrSurf_l[1])*G_1l[25]+(0.4517539514526256*alphaDrSurf_l[6]+0.7071067811865475*alphaDrSurf_l[2])*G_1l[24]+(0.249947932937059*alphaDrSurf_l[8]+0.3912303982179757*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.6123724356957944*alphaDrSurf_l[0])*G_1l[23]+(0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[4])*G_1l[22]+(0.5050762722761053*alphaDrSurf_l[8]+0.7905694150420947*alphaDrSurf_l[5])*G_1l[21]+(0.1443075063646015*alphaDrSurf_l[8]+0.2258769757263128*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.3535533905932737*alphaDrSurf_l[0])*G_1l[20]+0.6324555320336759*alphaDrSurf_l[3]*G_1l[19]+(0.3499271061118826*alphaDrSurf_l[7]+0.5477225575051661*alphaDrSurf_l[1])*G_1l[18]+(0.3499271061118826*alphaDrSurf_l[6]+0.5477225575051661*alphaDrSurf_l[2])*G_1l[17]+0.7071067811865475*(alphaDrSurf_l[6]*G_1l[16]+alphaDrSurf_l[7]*G_1l[15])+(0.3912303982179757*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[4])*G_1l[14]+(0.3912303982179757*alphaDrSurf_l[8]+0.6123724356957944*alphaDrSurf_l[5])*G_1l[13]+(0.2020305089104422*alphaDrSurf_l[7]+0.3162277660168379*alphaDrSurf_l[1])*G_1l[12]+(0.2020305089104422*alphaDrSurf_l[6]+0.3162277660168379*alphaDrSurf_l[2])*G_1l[11]+0.4898979485566357*alphaDrSurf_l[3]*G_1l[10]+alphaDrSurf_l[8]*(0.7905694150420947*G_1l[9]+0.2258769757263128*(G_1l[8]+G_1l[7])+0.6123724356957944*G_1l[3])+0.3535533905932737*(G_1l[0]*alphaDrSurf_l[8]+alphaDrSurf_l[4]*G_1l[8])+(0.5477225575051661*G_1l[5]+0.3162277660168379*G_1l[1])*alphaDrSurf_l[7]+0.3535533905932737*alphaDrSurf_l[5]*G_1l[7]+(0.5477225575051661*G_1l[6]+0.3162277660168379*G_1l[2])*alphaDrSurf_l[6]+0.2828427124746191*alphaDrSurf_l[3]*G_1l[4]; + Ghat_F_0_l[0] = 0.5*(F_0_Upwind_l[8]*alphaDrSurf_l[8]+F_0_Upwind_l[7]*alphaDrSurf_l[7]+F_0_Upwind_l[6]*alphaDrSurf_l[6]+F_0_Upwind_l[5]*alphaDrSurf_l[5]+F_0_Upwind_l[4]*alphaDrSurf_l[4]+F_0_Upwind_l[3]*alphaDrSurf_l[3]+F_0_Upwind_l[2]*alphaDrSurf_l[2]+F_0_Upwind_l[1]*alphaDrSurf_l[1]+F_0_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_F_0_l[1] = 0.4472135954999579*(F_0_Upwind_l[7]*alphaDrSurf_l[8]+alphaDrSurf_l[7]*F_0_Upwind_l[8])+0.5*(F_0_Upwind_l[5]*alphaDrSurf_l[7]+alphaDrSurf_l[5]*F_0_Upwind_l[7])+0.4472135954999579*(F_0_Upwind_l[3]*alphaDrSurf_l[6]+alphaDrSurf_l[3]*F_0_Upwind_l[6]+F_0_Upwind_l[1]*alphaDrSurf_l[4]+alphaDrSurf_l[1]*F_0_Upwind_l[4])+0.5*(F_0_Upwind_l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*F_0_Upwind_l[3]+F_0_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0_Upwind_l[1]); + Ghat_F_0_l[2] = 0.4472135954999579*(F_0_Upwind_l[6]*alphaDrSurf_l[8]+alphaDrSurf_l[6]*F_0_Upwind_l[8]+F_0_Upwind_l[3]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*F_0_Upwind_l[7])+0.5*(F_0_Upwind_l[4]*alphaDrSurf_l[6]+alphaDrSurf_l[4]*F_0_Upwind_l[6])+0.4472135954999579*(F_0_Upwind_l[2]*alphaDrSurf_l[5]+alphaDrSurf_l[2]*F_0_Upwind_l[5])+0.5*(F_0_Upwind_l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*F_0_Upwind_l[3]+F_0_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0_Upwind_l[2]); + Ghat_F_0_l[3] = 0.4*(F_0_Upwind_l[3]*alphaDrSurf_l[8]+alphaDrSurf_l[3]*F_0_Upwind_l[8])+(0.4*F_0_Upwind_l[6]+0.4472135954999579*F_0_Upwind_l[2])*alphaDrSurf_l[7]+0.4*alphaDrSurf_l[6]*F_0_Upwind_l[7]+0.4472135954999579*(alphaDrSurf_l[2]*F_0_Upwind_l[7]+F_0_Upwind_l[1]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*F_0_Upwind_l[6]+F_0_Upwind_l[3]*alphaDrSurf_l[5]+alphaDrSurf_l[3]*F_0_Upwind_l[5]+F_0_Upwind_l[3]*alphaDrSurf_l[4]+alphaDrSurf_l[3]*F_0_Upwind_l[4])+0.5*(F_0_Upwind_l[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*F_0_Upwind_l[3]+F_0_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0_Upwind_l[2]); + Ghat_F_0_l[4] = 0.31943828249997*F_0_Upwind_l[8]*alphaDrSurf_l[8]+0.5*(F_0_Upwind_l[5]*alphaDrSurf_l[8]+alphaDrSurf_l[5]*F_0_Upwind_l[8])+0.4472135954999579*F_0_Upwind_l[7]*alphaDrSurf_l[7]+0.31943828249997*F_0_Upwind_l[6]*alphaDrSurf_l[6]+0.5*(F_0_Upwind_l[2]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*F_0_Upwind_l[6])+0.31943828249997*F_0_Upwind_l[4]*alphaDrSurf_l[4]+0.5*(F_0_Upwind_l[0]*alphaDrSurf_l[4]+alphaDrSurf_l[0]*F_0_Upwind_l[4])+0.4472135954999579*(F_0_Upwind_l[3]*alphaDrSurf_l[3]+F_0_Upwind_l[1]*alphaDrSurf_l[1]); + Ghat_F_0_l[5] = 0.31943828249997*F_0_Upwind_l[8]*alphaDrSurf_l[8]+0.5*(F_0_Upwind_l[4]*alphaDrSurf_l[8]+alphaDrSurf_l[4]*F_0_Upwind_l[8])+0.31943828249997*F_0_Upwind_l[7]*alphaDrSurf_l[7]+0.5*(F_0_Upwind_l[1]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*F_0_Upwind_l[7])+0.4472135954999579*F_0_Upwind_l[6]*alphaDrSurf_l[6]+0.31943828249997*F_0_Upwind_l[5]*alphaDrSurf_l[5]+0.5*(F_0_Upwind_l[0]*alphaDrSurf_l[5]+alphaDrSurf_l[0]*F_0_Upwind_l[5])+0.4472135954999579*(F_0_Upwind_l[3]*alphaDrSurf_l[3]+F_0_Upwind_l[2]*alphaDrSurf_l[2]); + Ghat_F_0_l[6] = (0.2857142857142857*F_0_Upwind_l[6]+0.4472135954999579*F_0_Upwind_l[2])*alphaDrSurf_l[8]+(0.2857142857142857*alphaDrSurf_l[6]+0.4472135954999579*alphaDrSurf_l[2])*F_0_Upwind_l[8]+0.4*(F_0_Upwind_l[3]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*F_0_Upwind_l[7])+(0.4472135954999579*F_0_Upwind_l[5]+0.31943828249997*F_0_Upwind_l[4]+0.5*F_0_Upwind_l[0])*alphaDrSurf_l[6]+(0.4472135954999579*alphaDrSurf_l[5]+0.31943828249997*alphaDrSurf_l[4])*F_0_Upwind_l[6]+0.5*(alphaDrSurf_l[0]*F_0_Upwind_l[6]+F_0_Upwind_l[2]*alphaDrSurf_l[4]+alphaDrSurf_l[2]*F_0_Upwind_l[4])+0.4472135954999579*(F_0_Upwind_l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*F_0_Upwind_l[3]); + Ghat_F_0_l[7] = (0.2857142857142857*F_0_Upwind_l[7]+0.4472135954999579*F_0_Upwind_l[1])*alphaDrSurf_l[8]+(0.2857142857142857*alphaDrSurf_l[7]+0.4472135954999579*alphaDrSurf_l[1])*F_0_Upwind_l[8]+(0.31943828249997*F_0_Upwind_l[5]+0.4472135954999579*F_0_Upwind_l[4]+0.5*F_0_Upwind_l[0])*alphaDrSurf_l[7]+(0.31943828249997*alphaDrSurf_l[5]+0.4472135954999579*alphaDrSurf_l[4]+0.5*alphaDrSurf_l[0])*F_0_Upwind_l[7]+0.4*(F_0_Upwind_l[3]*alphaDrSurf_l[6]+alphaDrSurf_l[3]*F_0_Upwind_l[6])+0.5*(F_0_Upwind_l[1]*alphaDrSurf_l[5]+alphaDrSurf_l[1]*F_0_Upwind_l[5])+0.4472135954999579*(F_0_Upwind_l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*F_0_Upwind_l[3]); + Ghat_F_0_l[8] = (0.2040816326530612*F_0_Upwind_l[8]+0.31943828249997*(F_0_Upwind_l[5]+F_0_Upwind_l[4])+0.5*F_0_Upwind_l[0])*alphaDrSurf_l[8]+(0.31943828249997*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.5*alphaDrSurf_l[0])*F_0_Upwind_l[8]+0.2857142857142857*F_0_Upwind_l[7]*alphaDrSurf_l[7]+0.4472135954999579*(F_0_Upwind_l[1]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*F_0_Upwind_l[7])+0.2857142857142857*F_0_Upwind_l[6]*alphaDrSurf_l[6]+0.4472135954999579*(F_0_Upwind_l[2]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*F_0_Upwind_l[6])+0.5*(F_0_Upwind_l[4]*alphaDrSurf_l[5]+alphaDrSurf_l[4]*F_0_Upwind_l[5])+0.4*F_0_Upwind_l[3]*alphaDrSurf_l[3]; + Ghat_G_1_l[0] = 0.5*(G_1_Upwind_l[8]*alphaDrSurf_l[8]+G_1_Upwind_l[7]*alphaDrSurf_l[7]+G_1_Upwind_l[6]*alphaDrSurf_l[6]+G_1_Upwind_l[5]*alphaDrSurf_l[5]+G_1_Upwind_l[4]*alphaDrSurf_l[4]+G_1_Upwind_l[3]*alphaDrSurf_l[3]+G_1_Upwind_l[2]*alphaDrSurf_l[2]+G_1_Upwind_l[1]*alphaDrSurf_l[1]+G_1_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_G_1_l[1] = 0.4472135954999579*(G_1_Upwind_l[7]*alphaDrSurf_l[8]+alphaDrSurf_l[7]*G_1_Upwind_l[8])+0.5*(G_1_Upwind_l[5]*alphaDrSurf_l[7]+alphaDrSurf_l[5]*G_1_Upwind_l[7])+0.4472135954999579*(G_1_Upwind_l[3]*alphaDrSurf_l[6]+alphaDrSurf_l[3]*G_1_Upwind_l[6]+G_1_Upwind_l[1]*alphaDrSurf_l[4]+alphaDrSurf_l[1]*G_1_Upwind_l[4])+0.5*(G_1_Upwind_l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*G_1_Upwind_l[3]+G_1_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1_Upwind_l[1]); + Ghat_G_1_l[2] = 0.4472135954999579*(G_1_Upwind_l[6]*alphaDrSurf_l[8]+alphaDrSurf_l[6]*G_1_Upwind_l[8]+G_1_Upwind_l[3]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*G_1_Upwind_l[7])+0.5*(G_1_Upwind_l[4]*alphaDrSurf_l[6]+alphaDrSurf_l[4]*G_1_Upwind_l[6])+0.4472135954999579*(G_1_Upwind_l[2]*alphaDrSurf_l[5]+alphaDrSurf_l[2]*G_1_Upwind_l[5])+0.5*(G_1_Upwind_l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*G_1_Upwind_l[3]+G_1_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1_Upwind_l[2]); + Ghat_G_1_l[3] = 0.4*(G_1_Upwind_l[3]*alphaDrSurf_l[8]+alphaDrSurf_l[3]*G_1_Upwind_l[8])+(0.4*G_1_Upwind_l[6]+0.4472135954999579*G_1_Upwind_l[2])*alphaDrSurf_l[7]+0.4*alphaDrSurf_l[6]*G_1_Upwind_l[7]+0.4472135954999579*(alphaDrSurf_l[2]*G_1_Upwind_l[7]+G_1_Upwind_l[1]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*G_1_Upwind_l[6]+G_1_Upwind_l[3]*alphaDrSurf_l[5]+alphaDrSurf_l[3]*G_1_Upwind_l[5]+G_1_Upwind_l[3]*alphaDrSurf_l[4]+alphaDrSurf_l[3]*G_1_Upwind_l[4])+0.5*(G_1_Upwind_l[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*G_1_Upwind_l[3]+G_1_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1_Upwind_l[2]); + Ghat_G_1_l[4] = 0.31943828249997*G_1_Upwind_l[8]*alphaDrSurf_l[8]+0.5*(G_1_Upwind_l[5]*alphaDrSurf_l[8]+alphaDrSurf_l[5]*G_1_Upwind_l[8])+0.4472135954999579*G_1_Upwind_l[7]*alphaDrSurf_l[7]+0.31943828249997*G_1_Upwind_l[6]*alphaDrSurf_l[6]+0.5*(G_1_Upwind_l[2]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*G_1_Upwind_l[6])+0.31943828249997*G_1_Upwind_l[4]*alphaDrSurf_l[4]+0.5*(G_1_Upwind_l[0]*alphaDrSurf_l[4]+alphaDrSurf_l[0]*G_1_Upwind_l[4])+0.4472135954999579*(G_1_Upwind_l[3]*alphaDrSurf_l[3]+G_1_Upwind_l[1]*alphaDrSurf_l[1]); + Ghat_G_1_l[5] = 0.31943828249997*G_1_Upwind_l[8]*alphaDrSurf_l[8]+0.5*(G_1_Upwind_l[4]*alphaDrSurf_l[8]+alphaDrSurf_l[4]*G_1_Upwind_l[8])+0.31943828249997*G_1_Upwind_l[7]*alphaDrSurf_l[7]+0.5*(G_1_Upwind_l[1]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*G_1_Upwind_l[7])+0.4472135954999579*G_1_Upwind_l[6]*alphaDrSurf_l[6]+0.31943828249997*G_1_Upwind_l[5]*alphaDrSurf_l[5]+0.5*(G_1_Upwind_l[0]*alphaDrSurf_l[5]+alphaDrSurf_l[0]*G_1_Upwind_l[5])+0.4472135954999579*(G_1_Upwind_l[3]*alphaDrSurf_l[3]+G_1_Upwind_l[2]*alphaDrSurf_l[2]); + Ghat_G_1_l[6] = (0.2857142857142857*G_1_Upwind_l[6]+0.4472135954999579*G_1_Upwind_l[2])*alphaDrSurf_l[8]+(0.2857142857142857*alphaDrSurf_l[6]+0.4472135954999579*alphaDrSurf_l[2])*G_1_Upwind_l[8]+0.4*(G_1_Upwind_l[3]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*G_1_Upwind_l[7])+(0.4472135954999579*G_1_Upwind_l[5]+0.31943828249997*G_1_Upwind_l[4]+0.5*G_1_Upwind_l[0])*alphaDrSurf_l[6]+(0.4472135954999579*alphaDrSurf_l[5]+0.31943828249997*alphaDrSurf_l[4])*G_1_Upwind_l[6]+0.5*(alphaDrSurf_l[0]*G_1_Upwind_l[6]+G_1_Upwind_l[2]*alphaDrSurf_l[4]+alphaDrSurf_l[2]*G_1_Upwind_l[4])+0.4472135954999579*(G_1_Upwind_l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*G_1_Upwind_l[3]); + Ghat_G_1_l[7] = (0.2857142857142857*G_1_Upwind_l[7]+0.4472135954999579*G_1_Upwind_l[1])*alphaDrSurf_l[8]+(0.2857142857142857*alphaDrSurf_l[7]+0.4472135954999579*alphaDrSurf_l[1])*G_1_Upwind_l[8]+(0.31943828249997*G_1_Upwind_l[5]+0.4472135954999579*G_1_Upwind_l[4]+0.5*G_1_Upwind_l[0])*alphaDrSurf_l[7]+(0.31943828249997*alphaDrSurf_l[5]+0.4472135954999579*alphaDrSurf_l[4]+0.5*alphaDrSurf_l[0])*G_1_Upwind_l[7]+0.4*(G_1_Upwind_l[3]*alphaDrSurf_l[6]+alphaDrSurf_l[3]*G_1_Upwind_l[6])+0.5*(G_1_Upwind_l[1]*alphaDrSurf_l[5]+alphaDrSurf_l[1]*G_1_Upwind_l[5])+0.4472135954999579*(G_1_Upwind_l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*G_1_Upwind_l[3]); + Ghat_G_1_l[8] = (0.2040816326530612*G_1_Upwind_l[8]+0.31943828249997*(G_1_Upwind_l[5]+G_1_Upwind_l[4])+0.5*G_1_Upwind_l[0])*alphaDrSurf_l[8]+(0.31943828249997*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.5*alphaDrSurf_l[0])*G_1_Upwind_l[8]+0.2857142857142857*G_1_Upwind_l[7]*alphaDrSurf_l[7]+0.4472135954999579*(G_1_Upwind_l[1]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*G_1_Upwind_l[7])+0.2857142857142857*G_1_Upwind_l[6]*alphaDrSurf_l[6]+0.4472135954999579*(G_1_Upwind_l[2]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*G_1_Upwind_l[6])+0.5*(G_1_Upwind_l[4]*alphaDrSurf_l[5]+alphaDrSurf_l[4]*G_1_Upwind_l[5])+0.4*G_1_Upwind_l[3]*alphaDrSurf_l[3]; + + Ghat_F_0_r[0] = 0.5*(F_0_Upwind_r[8]*alphaDrSurf_r[8]+F_0_Upwind_r[7]*alphaDrSurf_r[7]+F_0_Upwind_r[6]*alphaDrSurf_r[6]+F_0_Upwind_r[5]*alphaDrSurf_r[5]+F_0_Upwind_r[4]*alphaDrSurf_r[4]+F_0_Upwind_r[3]*alphaDrSurf_r[3]+F_0_Upwind_r[2]*alphaDrSurf_r[2]+F_0_Upwind_r[1]*alphaDrSurf_r[1]+F_0_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_F_0_r[1] = 0.4472135954999579*(F_0_Upwind_r[7]*alphaDrSurf_r[8]+alphaDrSurf_r[7]*F_0_Upwind_r[8])+0.5*(F_0_Upwind_r[5]*alphaDrSurf_r[7]+alphaDrSurf_r[5]*F_0_Upwind_r[7])+0.4472135954999579*(F_0_Upwind_r[3]*alphaDrSurf_r[6]+alphaDrSurf_r[3]*F_0_Upwind_r[6]+F_0_Upwind_r[1]*alphaDrSurf_r[4]+alphaDrSurf_r[1]*F_0_Upwind_r[4])+0.5*(F_0_Upwind_r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*F_0_Upwind_r[3]+F_0_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0_Upwind_r[1]); + Ghat_F_0_r[2] = 0.4472135954999579*(F_0_Upwind_r[6]*alphaDrSurf_r[8]+alphaDrSurf_r[6]*F_0_Upwind_r[8]+F_0_Upwind_r[3]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*F_0_Upwind_r[7])+0.5*(F_0_Upwind_r[4]*alphaDrSurf_r[6]+alphaDrSurf_r[4]*F_0_Upwind_r[6])+0.4472135954999579*(F_0_Upwind_r[2]*alphaDrSurf_r[5]+alphaDrSurf_r[2]*F_0_Upwind_r[5])+0.5*(F_0_Upwind_r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*F_0_Upwind_r[3]+F_0_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0_Upwind_r[2]); + Ghat_F_0_r[3] = 0.4*(F_0_Upwind_r[3]*alphaDrSurf_r[8]+alphaDrSurf_r[3]*F_0_Upwind_r[8])+(0.4*F_0_Upwind_r[6]+0.4472135954999579*F_0_Upwind_r[2])*alphaDrSurf_r[7]+0.4*alphaDrSurf_r[6]*F_0_Upwind_r[7]+0.4472135954999579*(alphaDrSurf_r[2]*F_0_Upwind_r[7]+F_0_Upwind_r[1]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*F_0_Upwind_r[6]+F_0_Upwind_r[3]*alphaDrSurf_r[5]+alphaDrSurf_r[3]*F_0_Upwind_r[5]+F_0_Upwind_r[3]*alphaDrSurf_r[4]+alphaDrSurf_r[3]*F_0_Upwind_r[4])+0.5*(F_0_Upwind_r[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*F_0_Upwind_r[3]+F_0_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0_Upwind_r[2]); + Ghat_F_0_r[4] = 0.31943828249997*F_0_Upwind_r[8]*alphaDrSurf_r[8]+0.5*(F_0_Upwind_r[5]*alphaDrSurf_r[8]+alphaDrSurf_r[5]*F_0_Upwind_r[8])+0.4472135954999579*F_0_Upwind_r[7]*alphaDrSurf_r[7]+0.31943828249997*F_0_Upwind_r[6]*alphaDrSurf_r[6]+0.5*(F_0_Upwind_r[2]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*F_0_Upwind_r[6])+0.31943828249997*F_0_Upwind_r[4]*alphaDrSurf_r[4]+0.5*(F_0_Upwind_r[0]*alphaDrSurf_r[4]+alphaDrSurf_r[0]*F_0_Upwind_r[4])+0.4472135954999579*(F_0_Upwind_r[3]*alphaDrSurf_r[3]+F_0_Upwind_r[1]*alphaDrSurf_r[1]); + Ghat_F_0_r[5] = 0.31943828249997*F_0_Upwind_r[8]*alphaDrSurf_r[8]+0.5*(F_0_Upwind_r[4]*alphaDrSurf_r[8]+alphaDrSurf_r[4]*F_0_Upwind_r[8])+0.31943828249997*F_0_Upwind_r[7]*alphaDrSurf_r[7]+0.5*(F_0_Upwind_r[1]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*F_0_Upwind_r[7])+0.4472135954999579*F_0_Upwind_r[6]*alphaDrSurf_r[6]+0.31943828249997*F_0_Upwind_r[5]*alphaDrSurf_r[5]+0.5*(F_0_Upwind_r[0]*alphaDrSurf_r[5]+alphaDrSurf_r[0]*F_0_Upwind_r[5])+0.4472135954999579*(F_0_Upwind_r[3]*alphaDrSurf_r[3]+F_0_Upwind_r[2]*alphaDrSurf_r[2]); + Ghat_F_0_r[6] = (0.2857142857142857*F_0_Upwind_r[6]+0.4472135954999579*F_0_Upwind_r[2])*alphaDrSurf_r[8]+(0.2857142857142857*alphaDrSurf_r[6]+0.4472135954999579*alphaDrSurf_r[2])*F_0_Upwind_r[8]+0.4*(F_0_Upwind_r[3]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*F_0_Upwind_r[7])+(0.4472135954999579*F_0_Upwind_r[5]+0.31943828249997*F_0_Upwind_r[4]+0.5*F_0_Upwind_r[0])*alphaDrSurf_r[6]+(0.4472135954999579*alphaDrSurf_r[5]+0.31943828249997*alphaDrSurf_r[4])*F_0_Upwind_r[6]+0.5*(alphaDrSurf_r[0]*F_0_Upwind_r[6]+F_0_Upwind_r[2]*alphaDrSurf_r[4]+alphaDrSurf_r[2]*F_0_Upwind_r[4])+0.4472135954999579*(F_0_Upwind_r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*F_0_Upwind_r[3]); + Ghat_F_0_r[7] = (0.2857142857142857*F_0_Upwind_r[7]+0.4472135954999579*F_0_Upwind_r[1])*alphaDrSurf_r[8]+(0.2857142857142857*alphaDrSurf_r[7]+0.4472135954999579*alphaDrSurf_r[1])*F_0_Upwind_r[8]+(0.31943828249997*F_0_Upwind_r[5]+0.4472135954999579*F_0_Upwind_r[4]+0.5*F_0_Upwind_r[0])*alphaDrSurf_r[7]+(0.31943828249997*alphaDrSurf_r[5]+0.4472135954999579*alphaDrSurf_r[4]+0.5*alphaDrSurf_r[0])*F_0_Upwind_r[7]+0.4*(F_0_Upwind_r[3]*alphaDrSurf_r[6]+alphaDrSurf_r[3]*F_0_Upwind_r[6])+0.5*(F_0_Upwind_r[1]*alphaDrSurf_r[5]+alphaDrSurf_r[1]*F_0_Upwind_r[5])+0.4472135954999579*(F_0_Upwind_r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*F_0_Upwind_r[3]); + Ghat_F_0_r[8] = (0.2040816326530612*F_0_Upwind_r[8]+0.31943828249997*(F_0_Upwind_r[5]+F_0_Upwind_r[4])+0.5*F_0_Upwind_r[0])*alphaDrSurf_r[8]+(0.31943828249997*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.5*alphaDrSurf_r[0])*F_0_Upwind_r[8]+0.2857142857142857*F_0_Upwind_r[7]*alphaDrSurf_r[7]+0.4472135954999579*(F_0_Upwind_r[1]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*F_0_Upwind_r[7])+0.2857142857142857*F_0_Upwind_r[6]*alphaDrSurf_r[6]+0.4472135954999579*(F_0_Upwind_r[2]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*F_0_Upwind_r[6])+0.5*(F_0_Upwind_r[4]*alphaDrSurf_r[5]+alphaDrSurf_r[4]*F_0_Upwind_r[5])+0.4*F_0_Upwind_r[3]*alphaDrSurf_r[3]; + Ghat_G_1_r[0] = 0.5*(G_1_Upwind_r[8]*alphaDrSurf_r[8]+G_1_Upwind_r[7]*alphaDrSurf_r[7]+G_1_Upwind_r[6]*alphaDrSurf_r[6]+G_1_Upwind_r[5]*alphaDrSurf_r[5]+G_1_Upwind_r[4]*alphaDrSurf_r[4]+G_1_Upwind_r[3]*alphaDrSurf_r[3]+G_1_Upwind_r[2]*alphaDrSurf_r[2]+G_1_Upwind_r[1]*alphaDrSurf_r[1]+G_1_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_G_1_r[1] = 0.4472135954999579*(G_1_Upwind_r[7]*alphaDrSurf_r[8]+alphaDrSurf_r[7]*G_1_Upwind_r[8])+0.5*(G_1_Upwind_r[5]*alphaDrSurf_r[7]+alphaDrSurf_r[5]*G_1_Upwind_r[7])+0.4472135954999579*(G_1_Upwind_r[3]*alphaDrSurf_r[6]+alphaDrSurf_r[3]*G_1_Upwind_r[6]+G_1_Upwind_r[1]*alphaDrSurf_r[4]+alphaDrSurf_r[1]*G_1_Upwind_r[4])+0.5*(G_1_Upwind_r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*G_1_Upwind_r[3]+G_1_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1_Upwind_r[1]); + Ghat_G_1_r[2] = 0.4472135954999579*(G_1_Upwind_r[6]*alphaDrSurf_r[8]+alphaDrSurf_r[6]*G_1_Upwind_r[8]+G_1_Upwind_r[3]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*G_1_Upwind_r[7])+0.5*(G_1_Upwind_r[4]*alphaDrSurf_r[6]+alphaDrSurf_r[4]*G_1_Upwind_r[6])+0.4472135954999579*(G_1_Upwind_r[2]*alphaDrSurf_r[5]+alphaDrSurf_r[2]*G_1_Upwind_r[5])+0.5*(G_1_Upwind_r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*G_1_Upwind_r[3]+G_1_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1_Upwind_r[2]); + Ghat_G_1_r[3] = 0.4*(G_1_Upwind_r[3]*alphaDrSurf_r[8]+alphaDrSurf_r[3]*G_1_Upwind_r[8])+(0.4*G_1_Upwind_r[6]+0.4472135954999579*G_1_Upwind_r[2])*alphaDrSurf_r[7]+0.4*alphaDrSurf_r[6]*G_1_Upwind_r[7]+0.4472135954999579*(alphaDrSurf_r[2]*G_1_Upwind_r[7]+G_1_Upwind_r[1]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*G_1_Upwind_r[6]+G_1_Upwind_r[3]*alphaDrSurf_r[5]+alphaDrSurf_r[3]*G_1_Upwind_r[5]+G_1_Upwind_r[3]*alphaDrSurf_r[4]+alphaDrSurf_r[3]*G_1_Upwind_r[4])+0.5*(G_1_Upwind_r[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*G_1_Upwind_r[3]+G_1_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1_Upwind_r[2]); + Ghat_G_1_r[4] = 0.31943828249997*G_1_Upwind_r[8]*alphaDrSurf_r[8]+0.5*(G_1_Upwind_r[5]*alphaDrSurf_r[8]+alphaDrSurf_r[5]*G_1_Upwind_r[8])+0.4472135954999579*G_1_Upwind_r[7]*alphaDrSurf_r[7]+0.31943828249997*G_1_Upwind_r[6]*alphaDrSurf_r[6]+0.5*(G_1_Upwind_r[2]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*G_1_Upwind_r[6])+0.31943828249997*G_1_Upwind_r[4]*alphaDrSurf_r[4]+0.5*(G_1_Upwind_r[0]*alphaDrSurf_r[4]+alphaDrSurf_r[0]*G_1_Upwind_r[4])+0.4472135954999579*(G_1_Upwind_r[3]*alphaDrSurf_r[3]+G_1_Upwind_r[1]*alphaDrSurf_r[1]); + Ghat_G_1_r[5] = 0.31943828249997*G_1_Upwind_r[8]*alphaDrSurf_r[8]+0.5*(G_1_Upwind_r[4]*alphaDrSurf_r[8]+alphaDrSurf_r[4]*G_1_Upwind_r[8])+0.31943828249997*G_1_Upwind_r[7]*alphaDrSurf_r[7]+0.5*(G_1_Upwind_r[1]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*G_1_Upwind_r[7])+0.4472135954999579*G_1_Upwind_r[6]*alphaDrSurf_r[6]+0.31943828249997*G_1_Upwind_r[5]*alphaDrSurf_r[5]+0.5*(G_1_Upwind_r[0]*alphaDrSurf_r[5]+alphaDrSurf_r[0]*G_1_Upwind_r[5])+0.4472135954999579*(G_1_Upwind_r[3]*alphaDrSurf_r[3]+G_1_Upwind_r[2]*alphaDrSurf_r[2]); + Ghat_G_1_r[6] = (0.2857142857142857*G_1_Upwind_r[6]+0.4472135954999579*G_1_Upwind_r[2])*alphaDrSurf_r[8]+(0.2857142857142857*alphaDrSurf_r[6]+0.4472135954999579*alphaDrSurf_r[2])*G_1_Upwind_r[8]+0.4*(G_1_Upwind_r[3]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*G_1_Upwind_r[7])+(0.4472135954999579*G_1_Upwind_r[5]+0.31943828249997*G_1_Upwind_r[4]+0.5*G_1_Upwind_r[0])*alphaDrSurf_r[6]+(0.4472135954999579*alphaDrSurf_r[5]+0.31943828249997*alphaDrSurf_r[4])*G_1_Upwind_r[6]+0.5*(alphaDrSurf_r[0]*G_1_Upwind_r[6]+G_1_Upwind_r[2]*alphaDrSurf_r[4]+alphaDrSurf_r[2]*G_1_Upwind_r[4])+0.4472135954999579*(G_1_Upwind_r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*G_1_Upwind_r[3]); + Ghat_G_1_r[7] = (0.2857142857142857*G_1_Upwind_r[7]+0.4472135954999579*G_1_Upwind_r[1])*alphaDrSurf_r[8]+(0.2857142857142857*alphaDrSurf_r[7]+0.4472135954999579*alphaDrSurf_r[1])*G_1_Upwind_r[8]+(0.31943828249997*G_1_Upwind_r[5]+0.4472135954999579*G_1_Upwind_r[4]+0.5*G_1_Upwind_r[0])*alphaDrSurf_r[7]+(0.31943828249997*alphaDrSurf_r[5]+0.4472135954999579*alphaDrSurf_r[4]+0.5*alphaDrSurf_r[0])*G_1_Upwind_r[7]+0.4*(G_1_Upwind_r[3]*alphaDrSurf_r[6]+alphaDrSurf_r[3]*G_1_Upwind_r[6])+0.5*(G_1_Upwind_r[1]*alphaDrSurf_r[5]+alphaDrSurf_r[1]*G_1_Upwind_r[5])+0.4472135954999579*(G_1_Upwind_r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*G_1_Upwind_r[3]); + Ghat_G_1_r[8] = (0.2040816326530612*G_1_Upwind_r[8]+0.31943828249997*(G_1_Upwind_r[5]+G_1_Upwind_r[4])+0.5*G_1_Upwind_r[0])*alphaDrSurf_r[8]+(0.31943828249997*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.5*alphaDrSurf_r[0])*G_1_Upwind_r[8]+0.2857142857142857*G_1_Upwind_r[7]*alphaDrSurf_r[7]+0.4472135954999579*(G_1_Upwind_r[1]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*G_1_Upwind_r[7])+0.2857142857142857*G_1_Upwind_r[6]*alphaDrSurf_r[6]+0.4472135954999579*(G_1_Upwind_r[2]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*G_1_Upwind_r[6])+0.5*(G_1_Upwind_r[4]*alphaDrSurf_r[5]+alphaDrSurf_r[4]*G_1_Upwind_r[5])+0.4*G_1_Upwind_r[3]*alphaDrSurf_r[3]; - } out_F_0[0] += (0.7071067811865475*Ghat_F_0_r[0]-0.7071067811865475*Ghat_F_0_l[0])*dv1par; out_F_0[1] += (0.7071067811865475*Ghat_F_0_r[1]-0.7071067811865475*Ghat_F_0_l[1])*dv1par; out_F_0[2] += (0.7071067811865475*Ghat_F_0_r[2]-0.7071067811865475*Ghat_F_0_l[2])*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1.c index 7330109f9..dbce69c40 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1.c @@ -1,11 +1,14 @@ -#include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) +#include +#include +#include +GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out) { - // w[4]: cell-center coordinates. - // dxv[4]: cell spacing. - // nu: collisionalities added (self and cross species collisionalities). - // fl/fc/fr: Input Distribution function [F_0, T_perp G = T_perp (F_1 - F_0)] in left/center/right cells - // out: incremented distribution function in cell + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // fl/fc/fr: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)] in left/center/right cells. + // out: Incremented output distribution functions in center cell. const double dv1par = 2.0/dxv[3]; const double dvpar = dxv[3], wvpar = w[3]; @@ -18,103 +21,194 @@ GKYL_CU_DH double lbo_vlasov_pkpm_drag_surfvpar_3x1v_ser_p1(const double *w, con double *out_F_0 = &out[0]; double *out_G_1 = &out[24]; + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrSurf_l[8] = {0.0}; - alphaDrSurf_l[0] = nu[0]*wvpar-0.5*nu[0]*dvpar; - alphaDrSurf_l[1] = nu[1]*wvpar-0.5*nu[1]*dvpar; - alphaDrSurf_l[2] = nu[2]*wvpar-0.5*nu[2]*dvpar; - alphaDrSurf_l[3] = nu[3]*wvpar-0.5*nu[3]*dvpar; - alphaDrSurf_l[4] = nu[4]*wvpar-0.5*nu[4]*dvpar; - alphaDrSurf_l[5] = nu[5]*wvpar-0.5*nu[5]*dvpar; - alphaDrSurf_l[6] = nu[6]*wvpar-0.5*nu[6]*dvpar; - alphaDrSurf_l[7] = nu[7]*wvpar-0.5*nu[7]*dvpar; + alphaDrSurf_l[0] = nuSum[0]*wvpar-0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_l[1] = nuSum[1]*wvpar-0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_l[2] = nuSum[2]*wvpar-0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf_l[3] = nuSum[3]*wvpar-0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; + alphaDrSurf_l[4] = nuSum[4]*wvpar-0.5*nuSum[4]*dvpar-1.0*sumNuUPar[4]; + alphaDrSurf_l[5] = nuSum[5]*wvpar-0.5*nuSum[5]*dvpar-1.0*sumNuUPar[5]; + alphaDrSurf_l[6] = nuSum[6]*wvpar-0.5*nuSum[6]*dvpar-1.0*sumNuUPar[6]; + alphaDrSurf_l[7] = nuSum[7]*wvpar-0.5*nuSum[7]*dvpar-1.0*sumNuUPar[7]; double alphaDrSurf_r[8] = {0.0}; - alphaDrSurf_r[0] = nu[0]*wvpar+0.5*nu[0]*dvpar; - alphaDrSurf_r[1] = nu[1]*wvpar+0.5*nu[1]*dvpar; - alphaDrSurf_r[2] = nu[2]*wvpar+0.5*nu[2]*dvpar; - alphaDrSurf_r[3] = nu[3]*wvpar+0.5*nu[3]*dvpar; - alphaDrSurf_r[4] = nu[4]*wvpar+0.5*nu[4]*dvpar; - alphaDrSurf_r[5] = nu[5]*wvpar+0.5*nu[5]*dvpar; - alphaDrSurf_r[6] = nu[6]*wvpar+0.5*nu[6]*dvpar; - alphaDrSurf_r[7] = nu[7]*wvpar+0.5*nu[7]*dvpar; - - double Ghat_F_0_r[8]; - double Ghat_F_0_l[8]; - double Ghat_G_1_r[8]; - double Ghat_G_1_l[8]; - if (wvpar>0) { - - Ghat_F_0_r[0] = 0.5590169943749475*(alphaDrSurf_r[7]*F_0r[23]+alphaDrSurf_r[6]*F_0r[22]+alphaDrSurf_r[5]*F_0r[21]+alphaDrSurf_r[4]*F_0r[20]+alphaDrSurf_r[3]*F_0r[19]+alphaDrSurf_r[2]*F_0r[18]+alphaDrSurf_r[1]*F_0r[17]+alphaDrSurf_r[0]*F_0r[16])-0.4330127018922193*(alphaDrSurf_r[7]*F_0r[15]+alphaDrSurf_r[6]*F_0r[14]+alphaDrSurf_r[5]*F_0r[13]+alphaDrSurf_r[4]*F_0r[12])+0.25*alphaDrSurf_r[7]*F_0r[11]-0.4330127018922193*(alphaDrSurf_r[3]*F_0r[10]+alphaDrSurf_r[2]*F_0r[9]+alphaDrSurf_r[1]*F_0r[8])+0.25*(alphaDrSurf_r[6]*F_0r[7]+alphaDrSurf_r[5]*F_0r[6]+alphaDrSurf_r[4]*F_0r[5])-0.4330127018922193*alphaDrSurf_r[0]*F_0r[4]+0.25*(F_0r[3]*alphaDrSurf_r[3]+F_0r[2]*alphaDrSurf_r[2]+F_0r[1]*alphaDrSurf_r[1]+F_0r[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = 0.5590169943749475*(alphaDrSurf_r[6]*F_0r[23]+alphaDrSurf_r[7]*F_0r[22]+alphaDrSurf_r[3]*F_0r[21]+alphaDrSurf_r[2]*F_0r[20]+alphaDrSurf_r[5]*F_0r[19]+alphaDrSurf_r[4]*F_0r[18]+alphaDrSurf_r[0]*F_0r[17]+alphaDrSurf_r[1]*F_0r[16])-0.4330127018922193*(alphaDrSurf_r[6]*F_0r[15]+alphaDrSurf_r[7]*F_0r[14]+alphaDrSurf_r[3]*F_0r[13]+alphaDrSurf_r[2]*F_0r[12])+0.25*alphaDrSurf_r[6]*F_0r[11]-0.4330127018922193*(alphaDrSurf_r[5]*F_0r[10]+alphaDrSurf_r[4]*F_0r[9]+alphaDrSurf_r[0]*F_0r[8])+0.25*(F_0r[7]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*F_0r[6]+F_0r[3]*alphaDrSurf_r[5]+alphaDrSurf_r[2]*F_0r[5]+F_0r[2]*alphaDrSurf_r[4])-0.4330127018922193*alphaDrSurf_r[1]*F_0r[4]+0.25*(F_0r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0r[1]); - Ghat_F_0_r[2] = 0.5590169943749475*(alphaDrSurf_r[5]*F_0r[23]+alphaDrSurf_r[3]*F_0r[22]+alphaDrSurf_r[7]*F_0r[21]+alphaDrSurf_r[1]*F_0r[20]+alphaDrSurf_r[6]*F_0r[19]+alphaDrSurf_r[0]*F_0r[18]+alphaDrSurf_r[4]*F_0r[17]+alphaDrSurf_r[2]*F_0r[16])-0.4330127018922193*(alphaDrSurf_r[5]*F_0r[15]+alphaDrSurf_r[3]*F_0r[14]+alphaDrSurf_r[7]*F_0r[13]+alphaDrSurf_r[1]*F_0r[12])+0.25*alphaDrSurf_r[5]*F_0r[11]-0.4330127018922193*(alphaDrSurf_r[6]*F_0r[10]+alphaDrSurf_r[0]*F_0r[9]+alphaDrSurf_r[4]*F_0r[8])+0.25*(F_0r[6]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*F_0r[7]+F_0r[3]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*F_0r[5]+F_0r[1]*alphaDrSurf_r[4])-0.4330127018922193*alphaDrSurf_r[2]*F_0r[4]+0.25*(F_0r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0r[2]); - Ghat_F_0_r[3] = 0.5590169943749475*(alphaDrSurf_r[4]*F_0r[23]+alphaDrSurf_r[2]*F_0r[22]+alphaDrSurf_r[1]*F_0r[21]+alphaDrSurf_r[7]*F_0r[20]+alphaDrSurf_r[0]*F_0r[19]+alphaDrSurf_r[6]*F_0r[18]+alphaDrSurf_r[5]*F_0r[17]+alphaDrSurf_r[3]*F_0r[16])-0.4330127018922193*(alphaDrSurf_r[4]*F_0r[15]+alphaDrSurf_r[2]*F_0r[14]+alphaDrSurf_r[1]*F_0r[13]+alphaDrSurf_r[7]*F_0r[12])+0.25*alphaDrSurf_r[4]*F_0r[11]-0.4330127018922193*(alphaDrSurf_r[0]*F_0r[10]+alphaDrSurf_r[6]*F_0r[9]+alphaDrSurf_r[5]*F_0r[8])+0.25*(F_0r[5]*alphaDrSurf_r[7]+alphaDrSurf_r[2]*F_0r[7]+F_0r[2]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*F_0r[6]+F_0r[1]*alphaDrSurf_r[5])-0.4330127018922193*alphaDrSurf_r[3]*F_0r[4]+0.25*(F_0r[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*F_0r[3]); - Ghat_F_0_r[4] = 0.5590169943749475*(alphaDrSurf_r[3]*F_0r[23]+alphaDrSurf_r[5]*F_0r[22]+alphaDrSurf_r[6]*F_0r[21]+alphaDrSurf_r[0]*F_0r[20]+alphaDrSurf_r[7]*F_0r[19]+alphaDrSurf_r[1]*F_0r[18]+alphaDrSurf_r[2]*F_0r[17]+alphaDrSurf_r[4]*F_0r[16])-0.4330127018922193*(alphaDrSurf_r[3]*F_0r[15]+alphaDrSurf_r[5]*F_0r[14]+alphaDrSurf_r[6]*F_0r[13]+alphaDrSurf_r[0]*F_0r[12])+0.25*alphaDrSurf_r[3]*F_0r[11]-0.4330127018922193*(alphaDrSurf_r[7]*F_0r[10]+alphaDrSurf_r[1]*F_0r[9]+alphaDrSurf_r[2]*F_0r[8])+0.25*(F_0r[3]*alphaDrSurf_r[7]+alphaDrSurf_r[5]*F_0r[7]+F_0r[6]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*F_0r[5])-0.4330127018922193*F_0r[4]*alphaDrSurf_r[4]+0.25*(F_0r[0]*alphaDrSurf_r[4]+F_0r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0r[2]); - Ghat_F_0_r[5] = 0.5590169943749475*(alphaDrSurf_r[2]*F_0r[23]+alphaDrSurf_r[4]*F_0r[22]+alphaDrSurf_r[0]*F_0r[21]+alphaDrSurf_r[6]*F_0r[20]+alphaDrSurf_r[1]*F_0r[19]+alphaDrSurf_r[7]*F_0r[18]+alphaDrSurf_r[3]*F_0r[17]+alphaDrSurf_r[5]*F_0r[16])-0.4330127018922193*(alphaDrSurf_r[2]*F_0r[15]+alphaDrSurf_r[4]*F_0r[14]+alphaDrSurf_r[0]*F_0r[13]+alphaDrSurf_r[6]*F_0r[12])+0.25*alphaDrSurf_r[2]*F_0r[11]-0.4330127018922193*(alphaDrSurf_r[1]*F_0r[10]+alphaDrSurf_r[7]*F_0r[9]+alphaDrSurf_r[3]*F_0r[8])+0.25*(F_0r[2]*alphaDrSurf_r[7]+alphaDrSurf_r[4]*F_0r[7]+F_0r[5]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*F_0r[6])-0.4330127018922193*F_0r[4]*alphaDrSurf_r[5]+0.25*(F_0r[0]*alphaDrSurf_r[5]+F_0r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*F_0r[3]); - Ghat_F_0_r[6] = 0.5590169943749475*(alphaDrSurf_r[1]*F_0r[23]+alphaDrSurf_r[0]*F_0r[22]+alphaDrSurf_r[4]*F_0r[21]+alphaDrSurf_r[5]*F_0r[20]+alphaDrSurf_r[2]*F_0r[19]+alphaDrSurf_r[3]*F_0r[18]+alphaDrSurf_r[7]*F_0r[17]+alphaDrSurf_r[6]*F_0r[16])-0.4330127018922193*(alphaDrSurf_r[1]*F_0r[15]+alphaDrSurf_r[0]*F_0r[14]+alphaDrSurf_r[4]*F_0r[13]+alphaDrSurf_r[5]*F_0r[12])+0.25*alphaDrSurf_r[1]*F_0r[11]-0.4330127018922193*(alphaDrSurf_r[2]*F_0r[10]+alphaDrSurf_r[3]*F_0r[9]+alphaDrSurf_r[7]*F_0r[8])+0.25*(F_0r[1]*alphaDrSurf_r[7]+alphaDrSurf_r[0]*F_0r[7])-0.4330127018922193*F_0r[4]*alphaDrSurf_r[6]+0.25*(F_0r[0]*alphaDrSurf_r[6]+alphaDrSurf_r[4]*F_0r[6]+F_0r[5]*alphaDrSurf_r[5]+F_0r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*F_0r[3]); - Ghat_F_0_r[7] = 0.5590169943749475*(alphaDrSurf_r[0]*F_0r[23]+alphaDrSurf_r[1]*F_0r[22]+alphaDrSurf_r[2]*F_0r[21]+alphaDrSurf_r[3]*F_0r[20]+alphaDrSurf_r[4]*F_0r[19]+alphaDrSurf_r[5]*F_0r[18]+alphaDrSurf_r[6]*F_0r[17]+alphaDrSurf_r[7]*F_0r[16])-0.4330127018922193*(alphaDrSurf_r[0]*F_0r[15]+alphaDrSurf_r[1]*F_0r[14]+alphaDrSurf_r[2]*F_0r[13]+alphaDrSurf_r[3]*F_0r[12])+0.25*alphaDrSurf_r[0]*F_0r[11]-0.4330127018922193*(alphaDrSurf_r[4]*F_0r[10]+alphaDrSurf_r[5]*F_0r[9]+alphaDrSurf_r[6]*F_0r[8]+F_0r[4]*alphaDrSurf_r[7])+0.25*(F_0r[0]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*F_0r[7]+F_0r[1]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*F_0r[6]+F_0r[2]*alphaDrSurf_r[5]+alphaDrSurf_r[3]*F_0r[5]+F_0r[3]*alphaDrSurf_r[4]); - Ghat_G_1_r[0] = 0.5590169943749475*(alphaDrSurf_r[7]*G_1r[23]+alphaDrSurf_r[6]*G_1r[22]+alphaDrSurf_r[5]*G_1r[21]+alphaDrSurf_r[4]*G_1r[20]+alphaDrSurf_r[3]*G_1r[19]+alphaDrSurf_r[2]*G_1r[18]+alphaDrSurf_r[1]*G_1r[17]+alphaDrSurf_r[0]*G_1r[16])-0.4330127018922193*(alphaDrSurf_r[7]*G_1r[15]+alphaDrSurf_r[6]*G_1r[14]+alphaDrSurf_r[5]*G_1r[13]+alphaDrSurf_r[4]*G_1r[12])+0.25*alphaDrSurf_r[7]*G_1r[11]-0.4330127018922193*(alphaDrSurf_r[3]*G_1r[10]+alphaDrSurf_r[2]*G_1r[9]+alphaDrSurf_r[1]*G_1r[8])+0.25*(alphaDrSurf_r[6]*G_1r[7]+alphaDrSurf_r[5]*G_1r[6]+alphaDrSurf_r[4]*G_1r[5])-0.4330127018922193*alphaDrSurf_r[0]*G_1r[4]+0.25*(G_1r[3]*alphaDrSurf_r[3]+G_1r[2]*alphaDrSurf_r[2]+G_1r[1]*alphaDrSurf_r[1]+G_1r[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = 0.5590169943749475*(alphaDrSurf_r[6]*G_1r[23]+alphaDrSurf_r[7]*G_1r[22]+alphaDrSurf_r[3]*G_1r[21]+alphaDrSurf_r[2]*G_1r[20]+alphaDrSurf_r[5]*G_1r[19]+alphaDrSurf_r[4]*G_1r[18]+alphaDrSurf_r[0]*G_1r[17]+alphaDrSurf_r[1]*G_1r[16])-0.4330127018922193*(alphaDrSurf_r[6]*G_1r[15]+alphaDrSurf_r[7]*G_1r[14]+alphaDrSurf_r[3]*G_1r[13]+alphaDrSurf_r[2]*G_1r[12])+0.25*alphaDrSurf_r[6]*G_1r[11]-0.4330127018922193*(alphaDrSurf_r[5]*G_1r[10]+alphaDrSurf_r[4]*G_1r[9]+alphaDrSurf_r[0]*G_1r[8])+0.25*(G_1r[7]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*G_1r[6]+G_1r[3]*alphaDrSurf_r[5]+alphaDrSurf_r[2]*G_1r[5]+G_1r[2]*alphaDrSurf_r[4])-0.4330127018922193*alphaDrSurf_r[1]*G_1r[4]+0.25*(G_1r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1r[1]); - Ghat_G_1_r[2] = 0.5590169943749475*(alphaDrSurf_r[5]*G_1r[23]+alphaDrSurf_r[3]*G_1r[22]+alphaDrSurf_r[7]*G_1r[21]+alphaDrSurf_r[1]*G_1r[20]+alphaDrSurf_r[6]*G_1r[19]+alphaDrSurf_r[0]*G_1r[18]+alphaDrSurf_r[4]*G_1r[17]+alphaDrSurf_r[2]*G_1r[16])-0.4330127018922193*(alphaDrSurf_r[5]*G_1r[15]+alphaDrSurf_r[3]*G_1r[14]+alphaDrSurf_r[7]*G_1r[13]+alphaDrSurf_r[1]*G_1r[12])+0.25*alphaDrSurf_r[5]*G_1r[11]-0.4330127018922193*(alphaDrSurf_r[6]*G_1r[10]+alphaDrSurf_r[0]*G_1r[9]+alphaDrSurf_r[4]*G_1r[8])+0.25*(G_1r[6]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*G_1r[7]+G_1r[3]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*G_1r[5]+G_1r[1]*alphaDrSurf_r[4])-0.4330127018922193*alphaDrSurf_r[2]*G_1r[4]+0.25*(G_1r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1r[2]); - Ghat_G_1_r[3] = 0.5590169943749475*(alphaDrSurf_r[4]*G_1r[23]+alphaDrSurf_r[2]*G_1r[22]+alphaDrSurf_r[1]*G_1r[21]+alphaDrSurf_r[7]*G_1r[20]+alphaDrSurf_r[0]*G_1r[19]+alphaDrSurf_r[6]*G_1r[18]+alphaDrSurf_r[5]*G_1r[17]+alphaDrSurf_r[3]*G_1r[16])-0.4330127018922193*(alphaDrSurf_r[4]*G_1r[15]+alphaDrSurf_r[2]*G_1r[14]+alphaDrSurf_r[1]*G_1r[13]+alphaDrSurf_r[7]*G_1r[12])+0.25*alphaDrSurf_r[4]*G_1r[11]-0.4330127018922193*(alphaDrSurf_r[0]*G_1r[10]+alphaDrSurf_r[6]*G_1r[9]+alphaDrSurf_r[5]*G_1r[8])+0.25*(G_1r[5]*alphaDrSurf_r[7]+alphaDrSurf_r[2]*G_1r[7]+G_1r[2]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*G_1r[6]+G_1r[1]*alphaDrSurf_r[5])-0.4330127018922193*alphaDrSurf_r[3]*G_1r[4]+0.25*(G_1r[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*G_1r[3]); - Ghat_G_1_r[4] = 0.5590169943749475*(alphaDrSurf_r[3]*G_1r[23]+alphaDrSurf_r[5]*G_1r[22]+alphaDrSurf_r[6]*G_1r[21]+alphaDrSurf_r[0]*G_1r[20]+alphaDrSurf_r[7]*G_1r[19]+alphaDrSurf_r[1]*G_1r[18]+alphaDrSurf_r[2]*G_1r[17]+alphaDrSurf_r[4]*G_1r[16])-0.4330127018922193*(alphaDrSurf_r[3]*G_1r[15]+alphaDrSurf_r[5]*G_1r[14]+alphaDrSurf_r[6]*G_1r[13]+alphaDrSurf_r[0]*G_1r[12])+0.25*alphaDrSurf_r[3]*G_1r[11]-0.4330127018922193*(alphaDrSurf_r[7]*G_1r[10]+alphaDrSurf_r[1]*G_1r[9]+alphaDrSurf_r[2]*G_1r[8])+0.25*(G_1r[3]*alphaDrSurf_r[7]+alphaDrSurf_r[5]*G_1r[7]+G_1r[6]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*G_1r[5])-0.4330127018922193*G_1r[4]*alphaDrSurf_r[4]+0.25*(G_1r[0]*alphaDrSurf_r[4]+G_1r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1r[2]); - Ghat_G_1_r[5] = 0.5590169943749475*(alphaDrSurf_r[2]*G_1r[23]+alphaDrSurf_r[4]*G_1r[22]+alphaDrSurf_r[0]*G_1r[21]+alphaDrSurf_r[6]*G_1r[20]+alphaDrSurf_r[1]*G_1r[19]+alphaDrSurf_r[7]*G_1r[18]+alphaDrSurf_r[3]*G_1r[17]+alphaDrSurf_r[5]*G_1r[16])-0.4330127018922193*(alphaDrSurf_r[2]*G_1r[15]+alphaDrSurf_r[4]*G_1r[14]+alphaDrSurf_r[0]*G_1r[13]+alphaDrSurf_r[6]*G_1r[12])+0.25*alphaDrSurf_r[2]*G_1r[11]-0.4330127018922193*(alphaDrSurf_r[1]*G_1r[10]+alphaDrSurf_r[7]*G_1r[9]+alphaDrSurf_r[3]*G_1r[8])+0.25*(G_1r[2]*alphaDrSurf_r[7]+alphaDrSurf_r[4]*G_1r[7]+G_1r[5]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*G_1r[6])-0.4330127018922193*G_1r[4]*alphaDrSurf_r[5]+0.25*(G_1r[0]*alphaDrSurf_r[5]+G_1r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*G_1r[3]); - Ghat_G_1_r[6] = 0.5590169943749475*(alphaDrSurf_r[1]*G_1r[23]+alphaDrSurf_r[0]*G_1r[22]+alphaDrSurf_r[4]*G_1r[21]+alphaDrSurf_r[5]*G_1r[20]+alphaDrSurf_r[2]*G_1r[19]+alphaDrSurf_r[3]*G_1r[18]+alphaDrSurf_r[7]*G_1r[17]+alphaDrSurf_r[6]*G_1r[16])-0.4330127018922193*(alphaDrSurf_r[1]*G_1r[15]+alphaDrSurf_r[0]*G_1r[14]+alphaDrSurf_r[4]*G_1r[13]+alphaDrSurf_r[5]*G_1r[12])+0.25*alphaDrSurf_r[1]*G_1r[11]-0.4330127018922193*(alphaDrSurf_r[2]*G_1r[10]+alphaDrSurf_r[3]*G_1r[9]+alphaDrSurf_r[7]*G_1r[8])+0.25*(G_1r[1]*alphaDrSurf_r[7]+alphaDrSurf_r[0]*G_1r[7])-0.4330127018922193*G_1r[4]*alphaDrSurf_r[6]+0.25*(G_1r[0]*alphaDrSurf_r[6]+alphaDrSurf_r[4]*G_1r[6]+G_1r[5]*alphaDrSurf_r[5]+G_1r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*G_1r[3]); - Ghat_G_1_r[7] = 0.5590169943749475*(alphaDrSurf_r[0]*G_1r[23]+alphaDrSurf_r[1]*G_1r[22]+alphaDrSurf_r[2]*G_1r[21]+alphaDrSurf_r[3]*G_1r[20]+alphaDrSurf_r[4]*G_1r[19]+alphaDrSurf_r[5]*G_1r[18]+alphaDrSurf_r[6]*G_1r[17]+alphaDrSurf_r[7]*G_1r[16])-0.4330127018922193*(alphaDrSurf_r[0]*G_1r[15]+alphaDrSurf_r[1]*G_1r[14]+alphaDrSurf_r[2]*G_1r[13]+alphaDrSurf_r[3]*G_1r[12])+0.25*alphaDrSurf_r[0]*G_1r[11]-0.4330127018922193*(alphaDrSurf_r[4]*G_1r[10]+alphaDrSurf_r[5]*G_1r[9]+alphaDrSurf_r[6]*G_1r[8]+G_1r[4]*alphaDrSurf_r[7])+0.25*(G_1r[0]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*G_1r[7]+G_1r[1]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*G_1r[6]+G_1r[2]*alphaDrSurf_r[5]+alphaDrSurf_r[3]*G_1r[5]+G_1r[3]*alphaDrSurf_r[4]); + alphaDrSurf_r[0] = nuSum[0]*wvpar+0.5*nuSum[0]*dvpar-1.0*sumNuUPar[0]; + alphaDrSurf_r[1] = nuSum[1]*wvpar+0.5*nuSum[1]*dvpar-1.0*sumNuUPar[1]; + alphaDrSurf_r[2] = nuSum[2]*wvpar+0.5*nuSum[2]*dvpar-1.0*sumNuUPar[2]; + alphaDrSurf_r[3] = nuSum[3]*wvpar+0.5*nuSum[3]*dvpar-1.0*sumNuUPar[3]; + alphaDrSurf_r[4] = nuSum[4]*wvpar+0.5*nuSum[4]*dvpar-1.0*sumNuUPar[4]; + alphaDrSurf_r[5] = nuSum[5]*wvpar+0.5*nuSum[5]*dvpar-1.0*sumNuUPar[5]; + alphaDrSurf_r[6] = nuSum[6]*wvpar+0.5*nuSum[6]*dvpar-1.0*sumNuUPar[6]; + alphaDrSurf_r[7] = nuSum[7]*wvpar+0.5*nuSum[7]*dvpar-1.0*sumNuUPar[7]; - Ghat_F_0_l[0] = 0.5590169943749475*(alphaDrSurf_l[7]*F_0c[23]+alphaDrSurf_l[6]*F_0c[22]+alphaDrSurf_l[5]*F_0c[21]+alphaDrSurf_l[4]*F_0c[20]+alphaDrSurf_l[3]*F_0c[19]+alphaDrSurf_l[2]*F_0c[18]+alphaDrSurf_l[1]*F_0c[17]+alphaDrSurf_l[0]*F_0c[16])-0.4330127018922193*(alphaDrSurf_l[7]*F_0c[15]+alphaDrSurf_l[6]*F_0c[14]+alphaDrSurf_l[5]*F_0c[13]+alphaDrSurf_l[4]*F_0c[12])+0.25*alphaDrSurf_l[7]*F_0c[11]-0.4330127018922193*(alphaDrSurf_l[3]*F_0c[10]+alphaDrSurf_l[2]*F_0c[9]+alphaDrSurf_l[1]*F_0c[8])+0.25*(alphaDrSurf_l[6]*F_0c[7]+alphaDrSurf_l[5]*F_0c[6]+alphaDrSurf_l[4]*F_0c[5])-0.4330127018922193*alphaDrSurf_l[0]*F_0c[4]+0.25*(F_0c[3]*alphaDrSurf_l[3]+F_0c[2]*alphaDrSurf_l[2]+F_0c[1]*alphaDrSurf_l[1]+F_0c[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = 0.5590169943749475*(alphaDrSurf_l[6]*F_0c[23]+alphaDrSurf_l[7]*F_0c[22]+alphaDrSurf_l[3]*F_0c[21]+alphaDrSurf_l[2]*F_0c[20]+alphaDrSurf_l[5]*F_0c[19]+alphaDrSurf_l[4]*F_0c[18]+alphaDrSurf_l[0]*F_0c[17]+alphaDrSurf_l[1]*F_0c[16])-0.4330127018922193*(alphaDrSurf_l[6]*F_0c[15]+alphaDrSurf_l[7]*F_0c[14]+alphaDrSurf_l[3]*F_0c[13]+alphaDrSurf_l[2]*F_0c[12])+0.25*alphaDrSurf_l[6]*F_0c[11]-0.4330127018922193*(alphaDrSurf_l[5]*F_0c[10]+alphaDrSurf_l[4]*F_0c[9]+alphaDrSurf_l[0]*F_0c[8])+0.25*(F_0c[7]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*F_0c[6]+F_0c[3]*alphaDrSurf_l[5]+alphaDrSurf_l[2]*F_0c[5]+F_0c[2]*alphaDrSurf_l[4])-0.4330127018922193*alphaDrSurf_l[1]*F_0c[4]+0.25*(F_0c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0c[1]); - Ghat_F_0_l[2] = 0.5590169943749475*(alphaDrSurf_l[5]*F_0c[23]+alphaDrSurf_l[3]*F_0c[22]+alphaDrSurf_l[7]*F_0c[21]+alphaDrSurf_l[1]*F_0c[20]+alphaDrSurf_l[6]*F_0c[19]+alphaDrSurf_l[0]*F_0c[18]+alphaDrSurf_l[4]*F_0c[17]+alphaDrSurf_l[2]*F_0c[16])-0.4330127018922193*(alphaDrSurf_l[5]*F_0c[15]+alphaDrSurf_l[3]*F_0c[14]+alphaDrSurf_l[7]*F_0c[13]+alphaDrSurf_l[1]*F_0c[12])+0.25*alphaDrSurf_l[5]*F_0c[11]-0.4330127018922193*(alphaDrSurf_l[6]*F_0c[10]+alphaDrSurf_l[0]*F_0c[9]+alphaDrSurf_l[4]*F_0c[8])+0.25*(F_0c[6]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*F_0c[7]+F_0c[3]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*F_0c[5]+F_0c[1]*alphaDrSurf_l[4])-0.4330127018922193*alphaDrSurf_l[2]*F_0c[4]+0.25*(F_0c[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0c[2]); - Ghat_F_0_l[3] = 0.5590169943749475*(alphaDrSurf_l[4]*F_0c[23]+alphaDrSurf_l[2]*F_0c[22]+alphaDrSurf_l[1]*F_0c[21]+alphaDrSurf_l[7]*F_0c[20]+alphaDrSurf_l[0]*F_0c[19]+alphaDrSurf_l[6]*F_0c[18]+alphaDrSurf_l[5]*F_0c[17]+alphaDrSurf_l[3]*F_0c[16])-0.4330127018922193*(alphaDrSurf_l[4]*F_0c[15]+alphaDrSurf_l[2]*F_0c[14]+alphaDrSurf_l[1]*F_0c[13]+alphaDrSurf_l[7]*F_0c[12])+0.25*alphaDrSurf_l[4]*F_0c[11]-0.4330127018922193*(alphaDrSurf_l[0]*F_0c[10]+alphaDrSurf_l[6]*F_0c[9]+alphaDrSurf_l[5]*F_0c[8])+0.25*(F_0c[5]*alphaDrSurf_l[7]+alphaDrSurf_l[2]*F_0c[7]+F_0c[2]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*F_0c[6]+F_0c[1]*alphaDrSurf_l[5])-0.4330127018922193*alphaDrSurf_l[3]*F_0c[4]+0.25*(F_0c[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*F_0c[3]); - Ghat_F_0_l[4] = 0.5590169943749475*(alphaDrSurf_l[3]*F_0c[23]+alphaDrSurf_l[5]*F_0c[22]+alphaDrSurf_l[6]*F_0c[21]+alphaDrSurf_l[0]*F_0c[20]+alphaDrSurf_l[7]*F_0c[19]+alphaDrSurf_l[1]*F_0c[18]+alphaDrSurf_l[2]*F_0c[17]+alphaDrSurf_l[4]*F_0c[16])-0.4330127018922193*(alphaDrSurf_l[3]*F_0c[15]+alphaDrSurf_l[5]*F_0c[14]+alphaDrSurf_l[6]*F_0c[13]+alphaDrSurf_l[0]*F_0c[12])+0.25*alphaDrSurf_l[3]*F_0c[11]-0.4330127018922193*(alphaDrSurf_l[7]*F_0c[10]+alphaDrSurf_l[1]*F_0c[9]+alphaDrSurf_l[2]*F_0c[8])+0.25*(F_0c[3]*alphaDrSurf_l[7]+alphaDrSurf_l[5]*F_0c[7]+F_0c[6]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*F_0c[5])-0.4330127018922193*F_0c[4]*alphaDrSurf_l[4]+0.25*(F_0c[0]*alphaDrSurf_l[4]+F_0c[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0c[2]); - Ghat_F_0_l[5] = 0.5590169943749475*(alphaDrSurf_l[2]*F_0c[23]+alphaDrSurf_l[4]*F_0c[22]+alphaDrSurf_l[0]*F_0c[21]+alphaDrSurf_l[6]*F_0c[20]+alphaDrSurf_l[1]*F_0c[19]+alphaDrSurf_l[7]*F_0c[18]+alphaDrSurf_l[3]*F_0c[17]+alphaDrSurf_l[5]*F_0c[16])-0.4330127018922193*(alphaDrSurf_l[2]*F_0c[15]+alphaDrSurf_l[4]*F_0c[14]+alphaDrSurf_l[0]*F_0c[13]+alphaDrSurf_l[6]*F_0c[12])+0.25*alphaDrSurf_l[2]*F_0c[11]-0.4330127018922193*(alphaDrSurf_l[1]*F_0c[10]+alphaDrSurf_l[7]*F_0c[9]+alphaDrSurf_l[3]*F_0c[8])+0.25*(F_0c[2]*alphaDrSurf_l[7]+alphaDrSurf_l[4]*F_0c[7]+F_0c[5]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*F_0c[6])-0.4330127018922193*F_0c[4]*alphaDrSurf_l[5]+0.25*(F_0c[0]*alphaDrSurf_l[5]+F_0c[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*F_0c[3]); - Ghat_F_0_l[6] = 0.5590169943749475*(alphaDrSurf_l[1]*F_0c[23]+alphaDrSurf_l[0]*F_0c[22]+alphaDrSurf_l[4]*F_0c[21]+alphaDrSurf_l[5]*F_0c[20]+alphaDrSurf_l[2]*F_0c[19]+alphaDrSurf_l[3]*F_0c[18]+alphaDrSurf_l[7]*F_0c[17]+alphaDrSurf_l[6]*F_0c[16])-0.4330127018922193*(alphaDrSurf_l[1]*F_0c[15]+alphaDrSurf_l[0]*F_0c[14]+alphaDrSurf_l[4]*F_0c[13]+alphaDrSurf_l[5]*F_0c[12])+0.25*alphaDrSurf_l[1]*F_0c[11]-0.4330127018922193*(alphaDrSurf_l[2]*F_0c[10]+alphaDrSurf_l[3]*F_0c[9]+alphaDrSurf_l[7]*F_0c[8])+0.25*(F_0c[1]*alphaDrSurf_l[7]+alphaDrSurf_l[0]*F_0c[7])-0.4330127018922193*F_0c[4]*alphaDrSurf_l[6]+0.25*(F_0c[0]*alphaDrSurf_l[6]+alphaDrSurf_l[4]*F_0c[6]+F_0c[5]*alphaDrSurf_l[5]+F_0c[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*F_0c[3]); - Ghat_F_0_l[7] = 0.5590169943749475*(alphaDrSurf_l[0]*F_0c[23]+alphaDrSurf_l[1]*F_0c[22]+alphaDrSurf_l[2]*F_0c[21]+alphaDrSurf_l[3]*F_0c[20]+alphaDrSurf_l[4]*F_0c[19]+alphaDrSurf_l[5]*F_0c[18]+alphaDrSurf_l[6]*F_0c[17]+alphaDrSurf_l[7]*F_0c[16])-0.4330127018922193*(alphaDrSurf_l[0]*F_0c[15]+alphaDrSurf_l[1]*F_0c[14]+alphaDrSurf_l[2]*F_0c[13]+alphaDrSurf_l[3]*F_0c[12])+0.25*alphaDrSurf_l[0]*F_0c[11]-0.4330127018922193*(alphaDrSurf_l[4]*F_0c[10]+alphaDrSurf_l[5]*F_0c[9]+alphaDrSurf_l[6]*F_0c[8]+F_0c[4]*alphaDrSurf_l[7])+0.25*(F_0c[0]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*F_0c[7]+F_0c[1]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*F_0c[6]+F_0c[2]*alphaDrSurf_l[5]+alphaDrSurf_l[3]*F_0c[5]+F_0c[3]*alphaDrSurf_l[4]); - Ghat_G_1_l[0] = 0.5590169943749475*(alphaDrSurf_l[7]*G_1c[23]+alphaDrSurf_l[6]*G_1c[22]+alphaDrSurf_l[5]*G_1c[21]+alphaDrSurf_l[4]*G_1c[20]+alphaDrSurf_l[3]*G_1c[19]+alphaDrSurf_l[2]*G_1c[18]+alphaDrSurf_l[1]*G_1c[17]+alphaDrSurf_l[0]*G_1c[16])-0.4330127018922193*(alphaDrSurf_l[7]*G_1c[15]+alphaDrSurf_l[6]*G_1c[14]+alphaDrSurf_l[5]*G_1c[13]+alphaDrSurf_l[4]*G_1c[12])+0.25*alphaDrSurf_l[7]*G_1c[11]-0.4330127018922193*(alphaDrSurf_l[3]*G_1c[10]+alphaDrSurf_l[2]*G_1c[9]+alphaDrSurf_l[1]*G_1c[8])+0.25*(alphaDrSurf_l[6]*G_1c[7]+alphaDrSurf_l[5]*G_1c[6]+alphaDrSurf_l[4]*G_1c[5])-0.4330127018922193*alphaDrSurf_l[0]*G_1c[4]+0.25*(G_1c[3]*alphaDrSurf_l[3]+G_1c[2]*alphaDrSurf_l[2]+G_1c[1]*alphaDrSurf_l[1]+G_1c[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = 0.5590169943749475*(alphaDrSurf_l[6]*G_1c[23]+alphaDrSurf_l[7]*G_1c[22]+alphaDrSurf_l[3]*G_1c[21]+alphaDrSurf_l[2]*G_1c[20]+alphaDrSurf_l[5]*G_1c[19]+alphaDrSurf_l[4]*G_1c[18]+alphaDrSurf_l[0]*G_1c[17]+alphaDrSurf_l[1]*G_1c[16])-0.4330127018922193*(alphaDrSurf_l[6]*G_1c[15]+alphaDrSurf_l[7]*G_1c[14]+alphaDrSurf_l[3]*G_1c[13]+alphaDrSurf_l[2]*G_1c[12])+0.25*alphaDrSurf_l[6]*G_1c[11]-0.4330127018922193*(alphaDrSurf_l[5]*G_1c[10]+alphaDrSurf_l[4]*G_1c[9]+alphaDrSurf_l[0]*G_1c[8])+0.25*(G_1c[7]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*G_1c[6]+G_1c[3]*alphaDrSurf_l[5]+alphaDrSurf_l[2]*G_1c[5]+G_1c[2]*alphaDrSurf_l[4])-0.4330127018922193*alphaDrSurf_l[1]*G_1c[4]+0.25*(G_1c[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1c[1]); - Ghat_G_1_l[2] = 0.5590169943749475*(alphaDrSurf_l[5]*G_1c[23]+alphaDrSurf_l[3]*G_1c[22]+alphaDrSurf_l[7]*G_1c[21]+alphaDrSurf_l[1]*G_1c[20]+alphaDrSurf_l[6]*G_1c[19]+alphaDrSurf_l[0]*G_1c[18]+alphaDrSurf_l[4]*G_1c[17]+alphaDrSurf_l[2]*G_1c[16])-0.4330127018922193*(alphaDrSurf_l[5]*G_1c[15]+alphaDrSurf_l[3]*G_1c[14]+alphaDrSurf_l[7]*G_1c[13]+alphaDrSurf_l[1]*G_1c[12])+0.25*alphaDrSurf_l[5]*G_1c[11]-0.4330127018922193*(alphaDrSurf_l[6]*G_1c[10]+alphaDrSurf_l[0]*G_1c[9]+alphaDrSurf_l[4]*G_1c[8])+0.25*(G_1c[6]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*G_1c[7]+G_1c[3]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*G_1c[5]+G_1c[1]*alphaDrSurf_l[4])-0.4330127018922193*alphaDrSurf_l[2]*G_1c[4]+0.25*(G_1c[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1c[2]); - Ghat_G_1_l[3] = 0.5590169943749475*(alphaDrSurf_l[4]*G_1c[23]+alphaDrSurf_l[2]*G_1c[22]+alphaDrSurf_l[1]*G_1c[21]+alphaDrSurf_l[7]*G_1c[20]+alphaDrSurf_l[0]*G_1c[19]+alphaDrSurf_l[6]*G_1c[18]+alphaDrSurf_l[5]*G_1c[17]+alphaDrSurf_l[3]*G_1c[16])-0.4330127018922193*(alphaDrSurf_l[4]*G_1c[15]+alphaDrSurf_l[2]*G_1c[14]+alphaDrSurf_l[1]*G_1c[13]+alphaDrSurf_l[7]*G_1c[12])+0.25*alphaDrSurf_l[4]*G_1c[11]-0.4330127018922193*(alphaDrSurf_l[0]*G_1c[10]+alphaDrSurf_l[6]*G_1c[9]+alphaDrSurf_l[5]*G_1c[8])+0.25*(G_1c[5]*alphaDrSurf_l[7]+alphaDrSurf_l[2]*G_1c[7]+G_1c[2]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*G_1c[6]+G_1c[1]*alphaDrSurf_l[5])-0.4330127018922193*alphaDrSurf_l[3]*G_1c[4]+0.25*(G_1c[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*G_1c[3]); - Ghat_G_1_l[4] = 0.5590169943749475*(alphaDrSurf_l[3]*G_1c[23]+alphaDrSurf_l[5]*G_1c[22]+alphaDrSurf_l[6]*G_1c[21]+alphaDrSurf_l[0]*G_1c[20]+alphaDrSurf_l[7]*G_1c[19]+alphaDrSurf_l[1]*G_1c[18]+alphaDrSurf_l[2]*G_1c[17]+alphaDrSurf_l[4]*G_1c[16])-0.4330127018922193*(alphaDrSurf_l[3]*G_1c[15]+alphaDrSurf_l[5]*G_1c[14]+alphaDrSurf_l[6]*G_1c[13]+alphaDrSurf_l[0]*G_1c[12])+0.25*alphaDrSurf_l[3]*G_1c[11]-0.4330127018922193*(alphaDrSurf_l[7]*G_1c[10]+alphaDrSurf_l[1]*G_1c[9]+alphaDrSurf_l[2]*G_1c[8])+0.25*(G_1c[3]*alphaDrSurf_l[7]+alphaDrSurf_l[5]*G_1c[7]+G_1c[6]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*G_1c[5])-0.4330127018922193*G_1c[4]*alphaDrSurf_l[4]+0.25*(G_1c[0]*alphaDrSurf_l[4]+G_1c[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1c[2]); - Ghat_G_1_l[5] = 0.5590169943749475*(alphaDrSurf_l[2]*G_1c[23]+alphaDrSurf_l[4]*G_1c[22]+alphaDrSurf_l[0]*G_1c[21]+alphaDrSurf_l[6]*G_1c[20]+alphaDrSurf_l[1]*G_1c[19]+alphaDrSurf_l[7]*G_1c[18]+alphaDrSurf_l[3]*G_1c[17]+alphaDrSurf_l[5]*G_1c[16])-0.4330127018922193*(alphaDrSurf_l[2]*G_1c[15]+alphaDrSurf_l[4]*G_1c[14]+alphaDrSurf_l[0]*G_1c[13]+alphaDrSurf_l[6]*G_1c[12])+0.25*alphaDrSurf_l[2]*G_1c[11]-0.4330127018922193*(alphaDrSurf_l[1]*G_1c[10]+alphaDrSurf_l[7]*G_1c[9]+alphaDrSurf_l[3]*G_1c[8])+0.25*(G_1c[2]*alphaDrSurf_l[7]+alphaDrSurf_l[4]*G_1c[7]+G_1c[5]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*G_1c[6])-0.4330127018922193*G_1c[4]*alphaDrSurf_l[5]+0.25*(G_1c[0]*alphaDrSurf_l[5]+G_1c[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*G_1c[3]); - Ghat_G_1_l[6] = 0.5590169943749475*(alphaDrSurf_l[1]*G_1c[23]+alphaDrSurf_l[0]*G_1c[22]+alphaDrSurf_l[4]*G_1c[21]+alphaDrSurf_l[5]*G_1c[20]+alphaDrSurf_l[2]*G_1c[19]+alphaDrSurf_l[3]*G_1c[18]+alphaDrSurf_l[7]*G_1c[17]+alphaDrSurf_l[6]*G_1c[16])-0.4330127018922193*(alphaDrSurf_l[1]*G_1c[15]+alphaDrSurf_l[0]*G_1c[14]+alphaDrSurf_l[4]*G_1c[13]+alphaDrSurf_l[5]*G_1c[12])+0.25*alphaDrSurf_l[1]*G_1c[11]-0.4330127018922193*(alphaDrSurf_l[2]*G_1c[10]+alphaDrSurf_l[3]*G_1c[9]+alphaDrSurf_l[7]*G_1c[8])+0.25*(G_1c[1]*alphaDrSurf_l[7]+alphaDrSurf_l[0]*G_1c[7])-0.4330127018922193*G_1c[4]*alphaDrSurf_l[6]+0.25*(G_1c[0]*alphaDrSurf_l[6]+alphaDrSurf_l[4]*G_1c[6]+G_1c[5]*alphaDrSurf_l[5]+G_1c[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*G_1c[3]); - Ghat_G_1_l[7] = 0.5590169943749475*(alphaDrSurf_l[0]*G_1c[23]+alphaDrSurf_l[1]*G_1c[22]+alphaDrSurf_l[2]*G_1c[21]+alphaDrSurf_l[3]*G_1c[20]+alphaDrSurf_l[4]*G_1c[19]+alphaDrSurf_l[5]*G_1c[18]+alphaDrSurf_l[6]*G_1c[17]+alphaDrSurf_l[7]*G_1c[16])-0.4330127018922193*(alphaDrSurf_l[0]*G_1c[15]+alphaDrSurf_l[1]*G_1c[14]+alphaDrSurf_l[2]*G_1c[13]+alphaDrSurf_l[3]*G_1c[12])+0.25*alphaDrSurf_l[0]*G_1c[11]-0.4330127018922193*(alphaDrSurf_l[4]*G_1c[10]+alphaDrSurf_l[5]*G_1c[9]+alphaDrSurf_l[6]*G_1c[8]+G_1c[4]*alphaDrSurf_l[7])+0.25*(G_1c[0]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*G_1c[7]+G_1c[1]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*G_1c[6]+G_1c[2]*alphaDrSurf_l[5]+alphaDrSurf_l[3]*G_1c[5]+G_1c[3]*alphaDrSurf_l[4]); + double F_0_UpwindQuad_l[8] = {0.0}; + double F_0_UpwindQuad_r[8] = {0.0}; + double F_0_Upwind_l[8] = {0.0}; + double F_0_Upwind_r[8] = {0.0}; + double Ghat_F_0_l[8] = {0.0}; + double Ghat_F_0_r[8] = {0.0}; + double G_1_UpwindQuad_l[8] = {0.0}; + double G_1_UpwindQuad_r[8] = {0.0}; + double G_1_Upwind_l[8] = {0.0}; + double G_1_Upwind_r[8] = {0.0}; + double Ghat_G_1_l[8] = {0.0}; + double Ghat_G_1_r[8] = {0.0}; + if ((-0.3535533905932737*alphaDrSurf_l[7])+0.3535533905932737*(alphaDrSurf_l[6]+alphaDrSurf_l[5]+alphaDrSurf_l[4])-0.3535533905932737*(alphaDrSurf_l[3]+alphaDrSurf_l[2]+alphaDrSurf_l[1])+0.3535533905932737*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_r(F_0l); + G_1_UpwindQuad_l[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_r(G_1l); + } else { + F_0_UpwindQuad_l[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_l(F_0c); + G_1_UpwindQuad_l[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_l(G_1c); + } + if ((-0.3535533905932737*alphaDrSurf_r[7])+0.3535533905932737*(alphaDrSurf_r[6]+alphaDrSurf_r[5]+alphaDrSurf_r[4])-0.3535533905932737*(alphaDrSurf_r[3]+alphaDrSurf_r[2]+alphaDrSurf_r[1])+0.3535533905932737*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_r(F_0c); + G_1_UpwindQuad_r[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_r(G_1c); + } else { + F_0_UpwindQuad_r[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_l(F_0r); + G_1_UpwindQuad_r[0] = hyb_3x1v_p1_surfx4_eval_quad_node_0_l(G_1r); + } + if (0.3535533905932737*alphaDrSurf_l[7]-0.3535533905932737*(alphaDrSurf_l[6]+alphaDrSurf_l[5])+0.3535533905932737*(alphaDrSurf_l[4]+alphaDrSurf_l[3])-0.3535533905932737*(alphaDrSurf_l[2]+alphaDrSurf_l[1])+0.3535533905932737*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_r(F_0l); + G_1_UpwindQuad_l[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_r(G_1l); + } else { + F_0_UpwindQuad_l[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_l(F_0c); + G_1_UpwindQuad_l[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_l(G_1c); + } + if (0.3535533905932737*alphaDrSurf_r[7]-0.3535533905932737*(alphaDrSurf_r[6]+alphaDrSurf_r[5])+0.3535533905932737*(alphaDrSurf_r[4]+alphaDrSurf_r[3])-0.3535533905932737*(alphaDrSurf_r[2]+alphaDrSurf_r[1])+0.3535533905932737*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_r(F_0c); + G_1_UpwindQuad_r[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_r(G_1c); + } else { + F_0_UpwindQuad_r[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_l(F_0r); + G_1_UpwindQuad_r[1] = hyb_3x1v_p1_surfx4_eval_quad_node_1_l(G_1r); + } + if (0.3535533905932737*alphaDrSurf_l[7]-0.3535533905932737*alphaDrSurf_l[6]+0.3535533905932737*alphaDrSurf_l[5]-0.3535533905932737*(alphaDrSurf_l[4]+alphaDrSurf_l[3])+0.3535533905932737*alphaDrSurf_l[2]-0.3535533905932737*alphaDrSurf_l[1]+0.3535533905932737*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_r(F_0l); + G_1_UpwindQuad_l[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_r(G_1l); + } else { + F_0_UpwindQuad_l[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_l(F_0c); + G_1_UpwindQuad_l[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_l(G_1c); + } + if (0.3535533905932737*alphaDrSurf_r[7]-0.3535533905932737*alphaDrSurf_r[6]+0.3535533905932737*alphaDrSurf_r[5]-0.3535533905932737*(alphaDrSurf_r[4]+alphaDrSurf_r[3])+0.3535533905932737*alphaDrSurf_r[2]-0.3535533905932737*alphaDrSurf_r[1]+0.3535533905932737*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_r(F_0c); + G_1_UpwindQuad_r[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_r(G_1c); + } else { + F_0_UpwindQuad_r[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_l(F_0r); + G_1_UpwindQuad_r[2] = hyb_3x1v_p1_surfx4_eval_quad_node_2_l(G_1r); + } + if ((-0.3535533905932737*alphaDrSurf_l[7])+0.3535533905932737*alphaDrSurf_l[6]-0.3535533905932737*(alphaDrSurf_l[5]+alphaDrSurf_l[4])+0.3535533905932737*(alphaDrSurf_l[3]+alphaDrSurf_l[2])-0.3535533905932737*alphaDrSurf_l[1]+0.3535533905932737*alphaDrSurf_l[0] < 0) { + F_0_UpwindQuad_l[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_r(F_0l); + G_1_UpwindQuad_l[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_r(G_1l); + } else { + F_0_UpwindQuad_l[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_l(F_0c); + G_1_UpwindQuad_l[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_l(G_1c); + } + if ((-0.3535533905932737*alphaDrSurf_r[7])+0.3535533905932737*alphaDrSurf_r[6]-0.3535533905932737*(alphaDrSurf_r[5]+alphaDrSurf_r[4])+0.3535533905932737*(alphaDrSurf_r[3]+alphaDrSurf_r[2])-0.3535533905932737*alphaDrSurf_r[1]+0.3535533905932737*alphaDrSurf_r[0] < 0) { + F_0_UpwindQuad_r[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_r(F_0c); + G_1_UpwindQuad_r[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_r(G_1c); + } else { + F_0_UpwindQuad_r[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_l(F_0r); + G_1_UpwindQuad_r[3] = hyb_3x1v_p1_surfx4_eval_quad_node_3_l(G_1r); + } + if (0.3535533905932737*(alphaDrSurf_l[7]+alphaDrSurf_l[6])-0.3535533905932737*(alphaDrSurf_l[5]+alphaDrSurf_l[4]+alphaDrSurf_l[3]+alphaDrSurf_l[2])+0.3535533905932737*(alphaDrSurf_l[1]+alphaDrSurf_l[0]) < 0) { + F_0_UpwindQuad_l[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_r(F_0l); + G_1_UpwindQuad_l[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_r(G_1l); + } else { + F_0_UpwindQuad_l[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_l(F_0c); + G_1_UpwindQuad_l[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_l(G_1c); + } + if (0.3535533905932737*(alphaDrSurf_r[7]+alphaDrSurf_r[6])-0.3535533905932737*(alphaDrSurf_r[5]+alphaDrSurf_r[4]+alphaDrSurf_r[3]+alphaDrSurf_r[2])+0.3535533905932737*(alphaDrSurf_r[1]+alphaDrSurf_r[0]) < 0) { + F_0_UpwindQuad_r[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_r(F_0c); + G_1_UpwindQuad_r[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_r(G_1c); + } else { + F_0_UpwindQuad_r[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_l(F_0r); + G_1_UpwindQuad_r[4] = hyb_3x1v_p1_surfx4_eval_quad_node_4_l(G_1r); + } + if ((-0.3535533905932737*(alphaDrSurf_l[7]+alphaDrSurf_l[6]))+0.3535533905932737*alphaDrSurf_l[5]-0.3535533905932737*alphaDrSurf_l[4]+0.3535533905932737*alphaDrSurf_l[3]-0.3535533905932737*alphaDrSurf_l[2]+0.3535533905932737*(alphaDrSurf_l[1]+alphaDrSurf_l[0]) < 0) { + F_0_UpwindQuad_l[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_r(F_0l); + G_1_UpwindQuad_l[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_r(G_1l); + } else { + F_0_UpwindQuad_l[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_l(F_0c); + G_1_UpwindQuad_l[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_l(G_1c); + } + if ((-0.3535533905932737*(alphaDrSurf_r[7]+alphaDrSurf_r[6]))+0.3535533905932737*alphaDrSurf_r[5]-0.3535533905932737*alphaDrSurf_r[4]+0.3535533905932737*alphaDrSurf_r[3]-0.3535533905932737*alphaDrSurf_r[2]+0.3535533905932737*(alphaDrSurf_r[1]+alphaDrSurf_r[0]) < 0) { + F_0_UpwindQuad_r[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_r(F_0c); + G_1_UpwindQuad_r[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_r(G_1c); + } else { + F_0_UpwindQuad_r[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_l(F_0r); + G_1_UpwindQuad_r[5] = hyb_3x1v_p1_surfx4_eval_quad_node_5_l(G_1r); + } + if ((-0.3535533905932737*(alphaDrSurf_l[7]+alphaDrSurf_l[6]+alphaDrSurf_l[5]))+0.3535533905932737*alphaDrSurf_l[4]-0.3535533905932737*alphaDrSurf_l[3]+0.3535533905932737*(alphaDrSurf_l[2]+alphaDrSurf_l[1]+alphaDrSurf_l[0]) < 0) { + F_0_UpwindQuad_l[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_r(F_0l); + G_1_UpwindQuad_l[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_r(G_1l); } else { + F_0_UpwindQuad_l[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_l(F_0c); + G_1_UpwindQuad_l[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_l(G_1c); + } + if ((-0.3535533905932737*(alphaDrSurf_r[7]+alphaDrSurf_r[6]+alphaDrSurf_r[5]))+0.3535533905932737*alphaDrSurf_r[4]-0.3535533905932737*alphaDrSurf_r[3]+0.3535533905932737*(alphaDrSurf_r[2]+alphaDrSurf_r[1]+alphaDrSurf_r[0]) < 0) { + F_0_UpwindQuad_r[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_r(F_0c); + G_1_UpwindQuad_r[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_r(G_1c); + } else { + F_0_UpwindQuad_r[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_l(F_0r); + G_1_UpwindQuad_r[6] = hyb_3x1v_p1_surfx4_eval_quad_node_6_l(G_1r); + } + if (0.3535533905932737*(alphaDrSurf_l[7]+alphaDrSurf_l[6]+alphaDrSurf_l[5]+alphaDrSurf_l[4]+alphaDrSurf_l[3]+alphaDrSurf_l[2]+alphaDrSurf_l[1]+alphaDrSurf_l[0]) < 0) { + F_0_UpwindQuad_l[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_r(F_0l); + G_1_UpwindQuad_l[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_r(G_1l); + } else { + F_0_UpwindQuad_l[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_l(F_0c); + G_1_UpwindQuad_l[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_l(G_1c); + } + if (0.3535533905932737*(alphaDrSurf_r[7]+alphaDrSurf_r[6]+alphaDrSurf_r[5]+alphaDrSurf_r[4]+alphaDrSurf_r[3]+alphaDrSurf_r[2]+alphaDrSurf_r[1]+alphaDrSurf_r[0]) < 0) { + F_0_UpwindQuad_r[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_r(F_0c); + G_1_UpwindQuad_r[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_r(G_1c); + } else { + F_0_UpwindQuad_r[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_l(F_0r); + G_1_UpwindQuad_r[7] = hyb_3x1v_p1_surfx4_eval_quad_node_7_l(G_1r); + } - Ghat_F_0_r[0] = 0.5590169943749475*(alphaDrSurf_r[7]*F_0c[23]+alphaDrSurf_r[6]*F_0c[22]+alphaDrSurf_r[5]*F_0c[21]+alphaDrSurf_r[4]*F_0c[20]+alphaDrSurf_r[3]*F_0c[19]+alphaDrSurf_r[2]*F_0c[18]+alphaDrSurf_r[1]*F_0c[17]+alphaDrSurf_r[0]*F_0c[16])+0.4330127018922193*(alphaDrSurf_r[7]*F_0c[15]+alphaDrSurf_r[6]*F_0c[14]+alphaDrSurf_r[5]*F_0c[13]+alphaDrSurf_r[4]*F_0c[12])+0.25*alphaDrSurf_r[7]*F_0c[11]+0.4330127018922193*(alphaDrSurf_r[3]*F_0c[10]+alphaDrSurf_r[2]*F_0c[9]+alphaDrSurf_r[1]*F_0c[8])+0.25*(alphaDrSurf_r[6]*F_0c[7]+alphaDrSurf_r[5]*F_0c[6]+alphaDrSurf_r[4]*F_0c[5])+0.4330127018922193*alphaDrSurf_r[0]*F_0c[4]+0.25*(F_0c[3]*alphaDrSurf_r[3]+F_0c[2]*alphaDrSurf_r[2]+F_0c[1]*alphaDrSurf_r[1]+F_0c[0]*alphaDrSurf_r[0]); - Ghat_F_0_r[1] = 0.5590169943749475*(alphaDrSurf_r[6]*F_0c[23]+alphaDrSurf_r[7]*F_0c[22]+alphaDrSurf_r[3]*F_0c[21]+alphaDrSurf_r[2]*F_0c[20]+alphaDrSurf_r[5]*F_0c[19]+alphaDrSurf_r[4]*F_0c[18]+alphaDrSurf_r[0]*F_0c[17]+alphaDrSurf_r[1]*F_0c[16])+0.4330127018922193*(alphaDrSurf_r[6]*F_0c[15]+alphaDrSurf_r[7]*F_0c[14]+alphaDrSurf_r[3]*F_0c[13]+alphaDrSurf_r[2]*F_0c[12])+0.25*alphaDrSurf_r[6]*F_0c[11]+0.4330127018922193*(alphaDrSurf_r[5]*F_0c[10]+alphaDrSurf_r[4]*F_0c[9]+alphaDrSurf_r[0]*F_0c[8])+0.25*(F_0c[7]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*F_0c[6]+F_0c[3]*alphaDrSurf_r[5]+alphaDrSurf_r[2]*F_0c[5]+F_0c[2]*alphaDrSurf_r[4])+0.4330127018922193*alphaDrSurf_r[1]*F_0c[4]+0.25*(F_0c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0c[1]); - Ghat_F_0_r[2] = 0.5590169943749475*(alphaDrSurf_r[5]*F_0c[23]+alphaDrSurf_r[3]*F_0c[22]+alphaDrSurf_r[7]*F_0c[21]+alphaDrSurf_r[1]*F_0c[20]+alphaDrSurf_r[6]*F_0c[19]+alphaDrSurf_r[0]*F_0c[18]+alphaDrSurf_r[4]*F_0c[17]+alphaDrSurf_r[2]*F_0c[16])+0.4330127018922193*(alphaDrSurf_r[5]*F_0c[15]+alphaDrSurf_r[3]*F_0c[14]+alphaDrSurf_r[7]*F_0c[13]+alphaDrSurf_r[1]*F_0c[12])+0.25*alphaDrSurf_r[5]*F_0c[11]+0.4330127018922193*(alphaDrSurf_r[6]*F_0c[10]+alphaDrSurf_r[0]*F_0c[9]+alphaDrSurf_r[4]*F_0c[8])+0.25*(F_0c[6]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*F_0c[7]+F_0c[3]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*F_0c[5]+F_0c[1]*alphaDrSurf_r[4])+0.4330127018922193*alphaDrSurf_r[2]*F_0c[4]+0.25*(F_0c[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0c[2]); - Ghat_F_0_r[3] = 0.5590169943749475*(alphaDrSurf_r[4]*F_0c[23]+alphaDrSurf_r[2]*F_0c[22]+alphaDrSurf_r[1]*F_0c[21]+alphaDrSurf_r[7]*F_0c[20]+alphaDrSurf_r[0]*F_0c[19]+alphaDrSurf_r[6]*F_0c[18]+alphaDrSurf_r[5]*F_0c[17]+alphaDrSurf_r[3]*F_0c[16])+0.4330127018922193*(alphaDrSurf_r[4]*F_0c[15]+alphaDrSurf_r[2]*F_0c[14]+alphaDrSurf_r[1]*F_0c[13]+alphaDrSurf_r[7]*F_0c[12])+0.25*alphaDrSurf_r[4]*F_0c[11]+0.4330127018922193*(alphaDrSurf_r[0]*F_0c[10]+alphaDrSurf_r[6]*F_0c[9]+alphaDrSurf_r[5]*F_0c[8])+0.25*(F_0c[5]*alphaDrSurf_r[7]+alphaDrSurf_r[2]*F_0c[7]+F_0c[2]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*F_0c[6]+F_0c[1]*alphaDrSurf_r[5])+0.4330127018922193*alphaDrSurf_r[3]*F_0c[4]+0.25*(F_0c[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*F_0c[3]); - Ghat_F_0_r[4] = 0.5590169943749475*(alphaDrSurf_r[3]*F_0c[23]+alphaDrSurf_r[5]*F_0c[22]+alphaDrSurf_r[6]*F_0c[21]+alphaDrSurf_r[0]*F_0c[20]+alphaDrSurf_r[7]*F_0c[19]+alphaDrSurf_r[1]*F_0c[18]+alphaDrSurf_r[2]*F_0c[17]+alphaDrSurf_r[4]*F_0c[16])+0.4330127018922193*(alphaDrSurf_r[3]*F_0c[15]+alphaDrSurf_r[5]*F_0c[14]+alphaDrSurf_r[6]*F_0c[13]+alphaDrSurf_r[0]*F_0c[12])+0.25*alphaDrSurf_r[3]*F_0c[11]+0.4330127018922193*(alphaDrSurf_r[7]*F_0c[10]+alphaDrSurf_r[1]*F_0c[9]+alphaDrSurf_r[2]*F_0c[8])+0.25*(F_0c[3]*alphaDrSurf_r[7]+alphaDrSurf_r[5]*F_0c[7]+F_0c[6]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*F_0c[5])+0.4330127018922193*F_0c[4]*alphaDrSurf_r[4]+0.25*(F_0c[0]*alphaDrSurf_r[4]+F_0c[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0c[2]); - Ghat_F_0_r[5] = 0.5590169943749475*(alphaDrSurf_r[2]*F_0c[23]+alphaDrSurf_r[4]*F_0c[22]+alphaDrSurf_r[0]*F_0c[21]+alphaDrSurf_r[6]*F_0c[20]+alphaDrSurf_r[1]*F_0c[19]+alphaDrSurf_r[7]*F_0c[18]+alphaDrSurf_r[3]*F_0c[17]+alphaDrSurf_r[5]*F_0c[16])+0.4330127018922193*(alphaDrSurf_r[2]*F_0c[15]+alphaDrSurf_r[4]*F_0c[14]+alphaDrSurf_r[0]*F_0c[13]+alphaDrSurf_r[6]*F_0c[12])+0.25*alphaDrSurf_r[2]*F_0c[11]+0.4330127018922193*(alphaDrSurf_r[1]*F_0c[10]+alphaDrSurf_r[7]*F_0c[9]+alphaDrSurf_r[3]*F_0c[8])+0.25*(F_0c[2]*alphaDrSurf_r[7]+alphaDrSurf_r[4]*F_0c[7]+F_0c[5]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*F_0c[6])+0.4330127018922193*F_0c[4]*alphaDrSurf_r[5]+0.25*(F_0c[0]*alphaDrSurf_r[5]+F_0c[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*F_0c[3]); - Ghat_F_0_r[6] = 0.5590169943749475*(alphaDrSurf_r[1]*F_0c[23]+alphaDrSurf_r[0]*F_0c[22]+alphaDrSurf_r[4]*F_0c[21]+alphaDrSurf_r[5]*F_0c[20]+alphaDrSurf_r[2]*F_0c[19]+alphaDrSurf_r[3]*F_0c[18]+alphaDrSurf_r[7]*F_0c[17]+alphaDrSurf_r[6]*F_0c[16])+0.4330127018922193*(alphaDrSurf_r[1]*F_0c[15]+alphaDrSurf_r[0]*F_0c[14]+alphaDrSurf_r[4]*F_0c[13]+alphaDrSurf_r[5]*F_0c[12])+0.25*alphaDrSurf_r[1]*F_0c[11]+0.4330127018922193*(alphaDrSurf_r[2]*F_0c[10]+alphaDrSurf_r[3]*F_0c[9]+alphaDrSurf_r[7]*F_0c[8])+0.25*(F_0c[1]*alphaDrSurf_r[7]+alphaDrSurf_r[0]*F_0c[7])+0.4330127018922193*F_0c[4]*alphaDrSurf_r[6]+0.25*(F_0c[0]*alphaDrSurf_r[6]+alphaDrSurf_r[4]*F_0c[6]+F_0c[5]*alphaDrSurf_r[5]+F_0c[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*F_0c[3]); - Ghat_F_0_r[7] = 0.5590169943749475*(alphaDrSurf_r[0]*F_0c[23]+alphaDrSurf_r[1]*F_0c[22]+alphaDrSurf_r[2]*F_0c[21]+alphaDrSurf_r[3]*F_0c[20]+alphaDrSurf_r[4]*F_0c[19]+alphaDrSurf_r[5]*F_0c[18]+alphaDrSurf_r[6]*F_0c[17]+alphaDrSurf_r[7]*F_0c[16])+0.4330127018922193*(alphaDrSurf_r[0]*F_0c[15]+alphaDrSurf_r[1]*F_0c[14]+alphaDrSurf_r[2]*F_0c[13]+alphaDrSurf_r[3]*F_0c[12])+0.25*alphaDrSurf_r[0]*F_0c[11]+0.4330127018922193*(alphaDrSurf_r[4]*F_0c[10]+alphaDrSurf_r[5]*F_0c[9]+alphaDrSurf_r[6]*F_0c[8]+F_0c[4]*alphaDrSurf_r[7])+0.25*(F_0c[0]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*F_0c[7]+F_0c[1]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*F_0c[6]+F_0c[2]*alphaDrSurf_r[5]+alphaDrSurf_r[3]*F_0c[5]+F_0c[3]*alphaDrSurf_r[4]); - Ghat_G_1_r[0] = 0.5590169943749475*(alphaDrSurf_r[7]*G_1c[23]+alphaDrSurf_r[6]*G_1c[22]+alphaDrSurf_r[5]*G_1c[21]+alphaDrSurf_r[4]*G_1c[20]+alphaDrSurf_r[3]*G_1c[19]+alphaDrSurf_r[2]*G_1c[18]+alphaDrSurf_r[1]*G_1c[17]+alphaDrSurf_r[0]*G_1c[16])+0.4330127018922193*(alphaDrSurf_r[7]*G_1c[15]+alphaDrSurf_r[6]*G_1c[14]+alphaDrSurf_r[5]*G_1c[13]+alphaDrSurf_r[4]*G_1c[12])+0.25*alphaDrSurf_r[7]*G_1c[11]+0.4330127018922193*(alphaDrSurf_r[3]*G_1c[10]+alphaDrSurf_r[2]*G_1c[9]+alphaDrSurf_r[1]*G_1c[8])+0.25*(alphaDrSurf_r[6]*G_1c[7]+alphaDrSurf_r[5]*G_1c[6]+alphaDrSurf_r[4]*G_1c[5])+0.4330127018922193*alphaDrSurf_r[0]*G_1c[4]+0.25*(G_1c[3]*alphaDrSurf_r[3]+G_1c[2]*alphaDrSurf_r[2]+G_1c[1]*alphaDrSurf_r[1]+G_1c[0]*alphaDrSurf_r[0]); - Ghat_G_1_r[1] = 0.5590169943749475*(alphaDrSurf_r[6]*G_1c[23]+alphaDrSurf_r[7]*G_1c[22]+alphaDrSurf_r[3]*G_1c[21]+alphaDrSurf_r[2]*G_1c[20]+alphaDrSurf_r[5]*G_1c[19]+alphaDrSurf_r[4]*G_1c[18]+alphaDrSurf_r[0]*G_1c[17]+alphaDrSurf_r[1]*G_1c[16])+0.4330127018922193*(alphaDrSurf_r[6]*G_1c[15]+alphaDrSurf_r[7]*G_1c[14]+alphaDrSurf_r[3]*G_1c[13]+alphaDrSurf_r[2]*G_1c[12])+0.25*alphaDrSurf_r[6]*G_1c[11]+0.4330127018922193*(alphaDrSurf_r[5]*G_1c[10]+alphaDrSurf_r[4]*G_1c[9]+alphaDrSurf_r[0]*G_1c[8])+0.25*(G_1c[7]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*G_1c[6]+G_1c[3]*alphaDrSurf_r[5]+alphaDrSurf_r[2]*G_1c[5]+G_1c[2]*alphaDrSurf_r[4])+0.4330127018922193*alphaDrSurf_r[1]*G_1c[4]+0.25*(G_1c[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1c[1]); - Ghat_G_1_r[2] = 0.5590169943749475*(alphaDrSurf_r[5]*G_1c[23]+alphaDrSurf_r[3]*G_1c[22]+alphaDrSurf_r[7]*G_1c[21]+alphaDrSurf_r[1]*G_1c[20]+alphaDrSurf_r[6]*G_1c[19]+alphaDrSurf_r[0]*G_1c[18]+alphaDrSurf_r[4]*G_1c[17]+alphaDrSurf_r[2]*G_1c[16])+0.4330127018922193*(alphaDrSurf_r[5]*G_1c[15]+alphaDrSurf_r[3]*G_1c[14]+alphaDrSurf_r[7]*G_1c[13]+alphaDrSurf_r[1]*G_1c[12])+0.25*alphaDrSurf_r[5]*G_1c[11]+0.4330127018922193*(alphaDrSurf_r[6]*G_1c[10]+alphaDrSurf_r[0]*G_1c[9]+alphaDrSurf_r[4]*G_1c[8])+0.25*(G_1c[6]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*G_1c[7]+G_1c[3]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*G_1c[5]+G_1c[1]*alphaDrSurf_r[4])+0.4330127018922193*alphaDrSurf_r[2]*G_1c[4]+0.25*(G_1c[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1c[2]); - Ghat_G_1_r[3] = 0.5590169943749475*(alphaDrSurf_r[4]*G_1c[23]+alphaDrSurf_r[2]*G_1c[22]+alphaDrSurf_r[1]*G_1c[21]+alphaDrSurf_r[7]*G_1c[20]+alphaDrSurf_r[0]*G_1c[19]+alphaDrSurf_r[6]*G_1c[18]+alphaDrSurf_r[5]*G_1c[17]+alphaDrSurf_r[3]*G_1c[16])+0.4330127018922193*(alphaDrSurf_r[4]*G_1c[15]+alphaDrSurf_r[2]*G_1c[14]+alphaDrSurf_r[1]*G_1c[13]+alphaDrSurf_r[7]*G_1c[12])+0.25*alphaDrSurf_r[4]*G_1c[11]+0.4330127018922193*(alphaDrSurf_r[0]*G_1c[10]+alphaDrSurf_r[6]*G_1c[9]+alphaDrSurf_r[5]*G_1c[8])+0.25*(G_1c[5]*alphaDrSurf_r[7]+alphaDrSurf_r[2]*G_1c[7]+G_1c[2]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*G_1c[6]+G_1c[1]*alphaDrSurf_r[5])+0.4330127018922193*alphaDrSurf_r[3]*G_1c[4]+0.25*(G_1c[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*G_1c[3]); - Ghat_G_1_r[4] = 0.5590169943749475*(alphaDrSurf_r[3]*G_1c[23]+alphaDrSurf_r[5]*G_1c[22]+alphaDrSurf_r[6]*G_1c[21]+alphaDrSurf_r[0]*G_1c[20]+alphaDrSurf_r[7]*G_1c[19]+alphaDrSurf_r[1]*G_1c[18]+alphaDrSurf_r[2]*G_1c[17]+alphaDrSurf_r[4]*G_1c[16])+0.4330127018922193*(alphaDrSurf_r[3]*G_1c[15]+alphaDrSurf_r[5]*G_1c[14]+alphaDrSurf_r[6]*G_1c[13]+alphaDrSurf_r[0]*G_1c[12])+0.25*alphaDrSurf_r[3]*G_1c[11]+0.4330127018922193*(alphaDrSurf_r[7]*G_1c[10]+alphaDrSurf_r[1]*G_1c[9]+alphaDrSurf_r[2]*G_1c[8])+0.25*(G_1c[3]*alphaDrSurf_r[7]+alphaDrSurf_r[5]*G_1c[7]+G_1c[6]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*G_1c[5])+0.4330127018922193*G_1c[4]*alphaDrSurf_r[4]+0.25*(G_1c[0]*alphaDrSurf_r[4]+G_1c[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1c[2]); - Ghat_G_1_r[5] = 0.5590169943749475*(alphaDrSurf_r[2]*G_1c[23]+alphaDrSurf_r[4]*G_1c[22]+alphaDrSurf_r[0]*G_1c[21]+alphaDrSurf_r[6]*G_1c[20]+alphaDrSurf_r[1]*G_1c[19]+alphaDrSurf_r[7]*G_1c[18]+alphaDrSurf_r[3]*G_1c[17]+alphaDrSurf_r[5]*G_1c[16])+0.4330127018922193*(alphaDrSurf_r[2]*G_1c[15]+alphaDrSurf_r[4]*G_1c[14]+alphaDrSurf_r[0]*G_1c[13]+alphaDrSurf_r[6]*G_1c[12])+0.25*alphaDrSurf_r[2]*G_1c[11]+0.4330127018922193*(alphaDrSurf_r[1]*G_1c[10]+alphaDrSurf_r[7]*G_1c[9]+alphaDrSurf_r[3]*G_1c[8])+0.25*(G_1c[2]*alphaDrSurf_r[7]+alphaDrSurf_r[4]*G_1c[7]+G_1c[5]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*G_1c[6])+0.4330127018922193*G_1c[4]*alphaDrSurf_r[5]+0.25*(G_1c[0]*alphaDrSurf_r[5]+G_1c[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*G_1c[3]); - Ghat_G_1_r[6] = 0.5590169943749475*(alphaDrSurf_r[1]*G_1c[23]+alphaDrSurf_r[0]*G_1c[22]+alphaDrSurf_r[4]*G_1c[21]+alphaDrSurf_r[5]*G_1c[20]+alphaDrSurf_r[2]*G_1c[19]+alphaDrSurf_r[3]*G_1c[18]+alphaDrSurf_r[7]*G_1c[17]+alphaDrSurf_r[6]*G_1c[16])+0.4330127018922193*(alphaDrSurf_r[1]*G_1c[15]+alphaDrSurf_r[0]*G_1c[14]+alphaDrSurf_r[4]*G_1c[13]+alphaDrSurf_r[5]*G_1c[12])+0.25*alphaDrSurf_r[1]*G_1c[11]+0.4330127018922193*(alphaDrSurf_r[2]*G_1c[10]+alphaDrSurf_r[3]*G_1c[9]+alphaDrSurf_r[7]*G_1c[8])+0.25*(G_1c[1]*alphaDrSurf_r[7]+alphaDrSurf_r[0]*G_1c[7])+0.4330127018922193*G_1c[4]*alphaDrSurf_r[6]+0.25*(G_1c[0]*alphaDrSurf_r[6]+alphaDrSurf_r[4]*G_1c[6]+G_1c[5]*alphaDrSurf_r[5]+G_1c[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*G_1c[3]); - Ghat_G_1_r[7] = 0.5590169943749475*(alphaDrSurf_r[0]*G_1c[23]+alphaDrSurf_r[1]*G_1c[22]+alphaDrSurf_r[2]*G_1c[21]+alphaDrSurf_r[3]*G_1c[20]+alphaDrSurf_r[4]*G_1c[19]+alphaDrSurf_r[5]*G_1c[18]+alphaDrSurf_r[6]*G_1c[17]+alphaDrSurf_r[7]*G_1c[16])+0.4330127018922193*(alphaDrSurf_r[0]*G_1c[15]+alphaDrSurf_r[1]*G_1c[14]+alphaDrSurf_r[2]*G_1c[13]+alphaDrSurf_r[3]*G_1c[12])+0.25*alphaDrSurf_r[0]*G_1c[11]+0.4330127018922193*(alphaDrSurf_r[4]*G_1c[10]+alphaDrSurf_r[5]*G_1c[9]+alphaDrSurf_r[6]*G_1c[8]+G_1c[4]*alphaDrSurf_r[7])+0.25*(G_1c[0]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*G_1c[7]+G_1c[1]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*G_1c[6]+G_1c[2]*alphaDrSurf_r[5]+alphaDrSurf_r[3]*G_1c[5]+G_1c[3]*alphaDrSurf_r[4]); + // Project tensor nodal quadrature basis back onto modal basis. + hyb_3x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad_l, F_0_Upwind_l); + hyb_3x1v_p1_vdir_upwind_quad_to_modal(F_0_UpwindQuad_r, F_0_Upwind_r); + hyb_3x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad_l, G_1_Upwind_l); + hyb_3x1v_p1_vdir_upwind_quad_to_modal(G_1_UpwindQuad_r, G_1_Upwind_r); - Ghat_F_0_l[0] = 0.5590169943749475*(alphaDrSurf_l[7]*F_0l[23]+alphaDrSurf_l[6]*F_0l[22]+alphaDrSurf_l[5]*F_0l[21]+alphaDrSurf_l[4]*F_0l[20]+alphaDrSurf_l[3]*F_0l[19]+alphaDrSurf_l[2]*F_0l[18]+alphaDrSurf_l[1]*F_0l[17]+alphaDrSurf_l[0]*F_0l[16])+0.4330127018922193*(alphaDrSurf_l[7]*F_0l[15]+alphaDrSurf_l[6]*F_0l[14]+alphaDrSurf_l[5]*F_0l[13]+alphaDrSurf_l[4]*F_0l[12])+0.25*alphaDrSurf_l[7]*F_0l[11]+0.4330127018922193*(alphaDrSurf_l[3]*F_0l[10]+alphaDrSurf_l[2]*F_0l[9]+alphaDrSurf_l[1]*F_0l[8])+0.25*(alphaDrSurf_l[6]*F_0l[7]+alphaDrSurf_l[5]*F_0l[6]+alphaDrSurf_l[4]*F_0l[5])+0.4330127018922193*alphaDrSurf_l[0]*F_0l[4]+0.25*(F_0l[3]*alphaDrSurf_l[3]+F_0l[2]*alphaDrSurf_l[2]+F_0l[1]*alphaDrSurf_l[1]+F_0l[0]*alphaDrSurf_l[0]); - Ghat_F_0_l[1] = 0.5590169943749475*(alphaDrSurf_l[6]*F_0l[23]+alphaDrSurf_l[7]*F_0l[22]+alphaDrSurf_l[3]*F_0l[21]+alphaDrSurf_l[2]*F_0l[20]+alphaDrSurf_l[5]*F_0l[19]+alphaDrSurf_l[4]*F_0l[18]+alphaDrSurf_l[0]*F_0l[17]+alphaDrSurf_l[1]*F_0l[16])+0.4330127018922193*(alphaDrSurf_l[6]*F_0l[15]+alphaDrSurf_l[7]*F_0l[14]+alphaDrSurf_l[3]*F_0l[13]+alphaDrSurf_l[2]*F_0l[12])+0.25*alphaDrSurf_l[6]*F_0l[11]+0.4330127018922193*(alphaDrSurf_l[5]*F_0l[10]+alphaDrSurf_l[4]*F_0l[9]+alphaDrSurf_l[0]*F_0l[8])+0.25*(F_0l[7]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*F_0l[6]+F_0l[3]*alphaDrSurf_l[5]+alphaDrSurf_l[2]*F_0l[5]+F_0l[2]*alphaDrSurf_l[4])+0.4330127018922193*alphaDrSurf_l[1]*F_0l[4]+0.25*(F_0l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0l[1]); - Ghat_F_0_l[2] = 0.5590169943749475*(alphaDrSurf_l[5]*F_0l[23]+alphaDrSurf_l[3]*F_0l[22]+alphaDrSurf_l[7]*F_0l[21]+alphaDrSurf_l[1]*F_0l[20]+alphaDrSurf_l[6]*F_0l[19]+alphaDrSurf_l[0]*F_0l[18]+alphaDrSurf_l[4]*F_0l[17]+alphaDrSurf_l[2]*F_0l[16])+0.4330127018922193*(alphaDrSurf_l[5]*F_0l[15]+alphaDrSurf_l[3]*F_0l[14]+alphaDrSurf_l[7]*F_0l[13]+alphaDrSurf_l[1]*F_0l[12])+0.25*alphaDrSurf_l[5]*F_0l[11]+0.4330127018922193*(alphaDrSurf_l[6]*F_0l[10]+alphaDrSurf_l[0]*F_0l[9]+alphaDrSurf_l[4]*F_0l[8])+0.25*(F_0l[6]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*F_0l[7]+F_0l[3]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*F_0l[5]+F_0l[1]*alphaDrSurf_l[4])+0.4330127018922193*alphaDrSurf_l[2]*F_0l[4]+0.25*(F_0l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0l[2]); - Ghat_F_0_l[3] = 0.5590169943749475*(alphaDrSurf_l[4]*F_0l[23]+alphaDrSurf_l[2]*F_0l[22]+alphaDrSurf_l[1]*F_0l[21]+alphaDrSurf_l[7]*F_0l[20]+alphaDrSurf_l[0]*F_0l[19]+alphaDrSurf_l[6]*F_0l[18]+alphaDrSurf_l[5]*F_0l[17]+alphaDrSurf_l[3]*F_0l[16])+0.4330127018922193*(alphaDrSurf_l[4]*F_0l[15]+alphaDrSurf_l[2]*F_0l[14]+alphaDrSurf_l[1]*F_0l[13]+alphaDrSurf_l[7]*F_0l[12])+0.25*alphaDrSurf_l[4]*F_0l[11]+0.4330127018922193*(alphaDrSurf_l[0]*F_0l[10]+alphaDrSurf_l[6]*F_0l[9]+alphaDrSurf_l[5]*F_0l[8])+0.25*(F_0l[5]*alphaDrSurf_l[7]+alphaDrSurf_l[2]*F_0l[7]+F_0l[2]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*F_0l[6]+F_0l[1]*alphaDrSurf_l[5])+0.4330127018922193*alphaDrSurf_l[3]*F_0l[4]+0.25*(F_0l[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*F_0l[3]); - Ghat_F_0_l[4] = 0.5590169943749475*(alphaDrSurf_l[3]*F_0l[23]+alphaDrSurf_l[5]*F_0l[22]+alphaDrSurf_l[6]*F_0l[21]+alphaDrSurf_l[0]*F_0l[20]+alphaDrSurf_l[7]*F_0l[19]+alphaDrSurf_l[1]*F_0l[18]+alphaDrSurf_l[2]*F_0l[17]+alphaDrSurf_l[4]*F_0l[16])+0.4330127018922193*(alphaDrSurf_l[3]*F_0l[15]+alphaDrSurf_l[5]*F_0l[14]+alphaDrSurf_l[6]*F_0l[13]+alphaDrSurf_l[0]*F_0l[12])+0.25*alphaDrSurf_l[3]*F_0l[11]+0.4330127018922193*(alphaDrSurf_l[7]*F_0l[10]+alphaDrSurf_l[1]*F_0l[9]+alphaDrSurf_l[2]*F_0l[8])+0.25*(F_0l[3]*alphaDrSurf_l[7]+alphaDrSurf_l[5]*F_0l[7]+F_0l[6]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*F_0l[5])+0.4330127018922193*F_0l[4]*alphaDrSurf_l[4]+0.25*(F_0l[0]*alphaDrSurf_l[4]+F_0l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0l[2]); - Ghat_F_0_l[5] = 0.5590169943749475*(alphaDrSurf_l[2]*F_0l[23]+alphaDrSurf_l[4]*F_0l[22]+alphaDrSurf_l[0]*F_0l[21]+alphaDrSurf_l[6]*F_0l[20]+alphaDrSurf_l[1]*F_0l[19]+alphaDrSurf_l[7]*F_0l[18]+alphaDrSurf_l[3]*F_0l[17]+alphaDrSurf_l[5]*F_0l[16])+0.4330127018922193*(alphaDrSurf_l[2]*F_0l[15]+alphaDrSurf_l[4]*F_0l[14]+alphaDrSurf_l[0]*F_0l[13]+alphaDrSurf_l[6]*F_0l[12])+0.25*alphaDrSurf_l[2]*F_0l[11]+0.4330127018922193*(alphaDrSurf_l[1]*F_0l[10]+alphaDrSurf_l[7]*F_0l[9]+alphaDrSurf_l[3]*F_0l[8])+0.25*(F_0l[2]*alphaDrSurf_l[7]+alphaDrSurf_l[4]*F_0l[7]+F_0l[5]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*F_0l[6])+0.4330127018922193*F_0l[4]*alphaDrSurf_l[5]+0.25*(F_0l[0]*alphaDrSurf_l[5]+F_0l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*F_0l[3]); - Ghat_F_0_l[6] = 0.5590169943749475*(alphaDrSurf_l[1]*F_0l[23]+alphaDrSurf_l[0]*F_0l[22]+alphaDrSurf_l[4]*F_0l[21]+alphaDrSurf_l[5]*F_0l[20]+alphaDrSurf_l[2]*F_0l[19]+alphaDrSurf_l[3]*F_0l[18]+alphaDrSurf_l[7]*F_0l[17]+alphaDrSurf_l[6]*F_0l[16])+0.4330127018922193*(alphaDrSurf_l[1]*F_0l[15]+alphaDrSurf_l[0]*F_0l[14]+alphaDrSurf_l[4]*F_0l[13]+alphaDrSurf_l[5]*F_0l[12])+0.25*alphaDrSurf_l[1]*F_0l[11]+0.4330127018922193*(alphaDrSurf_l[2]*F_0l[10]+alphaDrSurf_l[3]*F_0l[9]+alphaDrSurf_l[7]*F_0l[8])+0.25*(F_0l[1]*alphaDrSurf_l[7]+alphaDrSurf_l[0]*F_0l[7])+0.4330127018922193*F_0l[4]*alphaDrSurf_l[6]+0.25*(F_0l[0]*alphaDrSurf_l[6]+alphaDrSurf_l[4]*F_0l[6]+F_0l[5]*alphaDrSurf_l[5]+F_0l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*F_0l[3]); - Ghat_F_0_l[7] = 0.5590169943749475*(alphaDrSurf_l[0]*F_0l[23]+alphaDrSurf_l[1]*F_0l[22]+alphaDrSurf_l[2]*F_0l[21]+alphaDrSurf_l[3]*F_0l[20]+alphaDrSurf_l[4]*F_0l[19]+alphaDrSurf_l[5]*F_0l[18]+alphaDrSurf_l[6]*F_0l[17]+alphaDrSurf_l[7]*F_0l[16])+0.4330127018922193*(alphaDrSurf_l[0]*F_0l[15]+alphaDrSurf_l[1]*F_0l[14]+alphaDrSurf_l[2]*F_0l[13]+alphaDrSurf_l[3]*F_0l[12])+0.25*alphaDrSurf_l[0]*F_0l[11]+0.4330127018922193*(alphaDrSurf_l[4]*F_0l[10]+alphaDrSurf_l[5]*F_0l[9]+alphaDrSurf_l[6]*F_0l[8]+F_0l[4]*alphaDrSurf_l[7])+0.25*(F_0l[0]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*F_0l[7]+F_0l[1]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*F_0l[6]+F_0l[2]*alphaDrSurf_l[5]+alphaDrSurf_l[3]*F_0l[5]+F_0l[3]*alphaDrSurf_l[4]); - Ghat_G_1_l[0] = 0.5590169943749475*(alphaDrSurf_l[7]*G_1l[23]+alphaDrSurf_l[6]*G_1l[22]+alphaDrSurf_l[5]*G_1l[21]+alphaDrSurf_l[4]*G_1l[20]+alphaDrSurf_l[3]*G_1l[19]+alphaDrSurf_l[2]*G_1l[18]+alphaDrSurf_l[1]*G_1l[17]+alphaDrSurf_l[0]*G_1l[16])+0.4330127018922193*(alphaDrSurf_l[7]*G_1l[15]+alphaDrSurf_l[6]*G_1l[14]+alphaDrSurf_l[5]*G_1l[13]+alphaDrSurf_l[4]*G_1l[12])+0.25*alphaDrSurf_l[7]*G_1l[11]+0.4330127018922193*(alphaDrSurf_l[3]*G_1l[10]+alphaDrSurf_l[2]*G_1l[9]+alphaDrSurf_l[1]*G_1l[8])+0.25*(alphaDrSurf_l[6]*G_1l[7]+alphaDrSurf_l[5]*G_1l[6]+alphaDrSurf_l[4]*G_1l[5])+0.4330127018922193*alphaDrSurf_l[0]*G_1l[4]+0.25*(G_1l[3]*alphaDrSurf_l[3]+G_1l[2]*alphaDrSurf_l[2]+G_1l[1]*alphaDrSurf_l[1]+G_1l[0]*alphaDrSurf_l[0]); - Ghat_G_1_l[1] = 0.5590169943749475*(alphaDrSurf_l[6]*G_1l[23]+alphaDrSurf_l[7]*G_1l[22]+alphaDrSurf_l[3]*G_1l[21]+alphaDrSurf_l[2]*G_1l[20]+alphaDrSurf_l[5]*G_1l[19]+alphaDrSurf_l[4]*G_1l[18]+alphaDrSurf_l[0]*G_1l[17]+alphaDrSurf_l[1]*G_1l[16])+0.4330127018922193*(alphaDrSurf_l[6]*G_1l[15]+alphaDrSurf_l[7]*G_1l[14]+alphaDrSurf_l[3]*G_1l[13]+alphaDrSurf_l[2]*G_1l[12])+0.25*alphaDrSurf_l[6]*G_1l[11]+0.4330127018922193*(alphaDrSurf_l[5]*G_1l[10]+alphaDrSurf_l[4]*G_1l[9]+alphaDrSurf_l[0]*G_1l[8])+0.25*(G_1l[7]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*G_1l[6]+G_1l[3]*alphaDrSurf_l[5]+alphaDrSurf_l[2]*G_1l[5]+G_1l[2]*alphaDrSurf_l[4])+0.4330127018922193*alphaDrSurf_l[1]*G_1l[4]+0.25*(G_1l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1l[1]); - Ghat_G_1_l[2] = 0.5590169943749475*(alphaDrSurf_l[5]*G_1l[23]+alphaDrSurf_l[3]*G_1l[22]+alphaDrSurf_l[7]*G_1l[21]+alphaDrSurf_l[1]*G_1l[20]+alphaDrSurf_l[6]*G_1l[19]+alphaDrSurf_l[0]*G_1l[18]+alphaDrSurf_l[4]*G_1l[17]+alphaDrSurf_l[2]*G_1l[16])+0.4330127018922193*(alphaDrSurf_l[5]*G_1l[15]+alphaDrSurf_l[3]*G_1l[14]+alphaDrSurf_l[7]*G_1l[13]+alphaDrSurf_l[1]*G_1l[12])+0.25*alphaDrSurf_l[5]*G_1l[11]+0.4330127018922193*(alphaDrSurf_l[6]*G_1l[10]+alphaDrSurf_l[0]*G_1l[9]+alphaDrSurf_l[4]*G_1l[8])+0.25*(G_1l[6]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*G_1l[7]+G_1l[3]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*G_1l[5]+G_1l[1]*alphaDrSurf_l[4])+0.4330127018922193*alphaDrSurf_l[2]*G_1l[4]+0.25*(G_1l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1l[2]); - Ghat_G_1_l[3] = 0.5590169943749475*(alphaDrSurf_l[4]*G_1l[23]+alphaDrSurf_l[2]*G_1l[22]+alphaDrSurf_l[1]*G_1l[21]+alphaDrSurf_l[7]*G_1l[20]+alphaDrSurf_l[0]*G_1l[19]+alphaDrSurf_l[6]*G_1l[18]+alphaDrSurf_l[5]*G_1l[17]+alphaDrSurf_l[3]*G_1l[16])+0.4330127018922193*(alphaDrSurf_l[4]*G_1l[15]+alphaDrSurf_l[2]*G_1l[14]+alphaDrSurf_l[1]*G_1l[13]+alphaDrSurf_l[7]*G_1l[12])+0.25*alphaDrSurf_l[4]*G_1l[11]+0.4330127018922193*(alphaDrSurf_l[0]*G_1l[10]+alphaDrSurf_l[6]*G_1l[9]+alphaDrSurf_l[5]*G_1l[8])+0.25*(G_1l[5]*alphaDrSurf_l[7]+alphaDrSurf_l[2]*G_1l[7]+G_1l[2]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*G_1l[6]+G_1l[1]*alphaDrSurf_l[5])+0.4330127018922193*alphaDrSurf_l[3]*G_1l[4]+0.25*(G_1l[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*G_1l[3]); - Ghat_G_1_l[4] = 0.5590169943749475*(alphaDrSurf_l[3]*G_1l[23]+alphaDrSurf_l[5]*G_1l[22]+alphaDrSurf_l[6]*G_1l[21]+alphaDrSurf_l[0]*G_1l[20]+alphaDrSurf_l[7]*G_1l[19]+alphaDrSurf_l[1]*G_1l[18]+alphaDrSurf_l[2]*G_1l[17]+alphaDrSurf_l[4]*G_1l[16])+0.4330127018922193*(alphaDrSurf_l[3]*G_1l[15]+alphaDrSurf_l[5]*G_1l[14]+alphaDrSurf_l[6]*G_1l[13]+alphaDrSurf_l[0]*G_1l[12])+0.25*alphaDrSurf_l[3]*G_1l[11]+0.4330127018922193*(alphaDrSurf_l[7]*G_1l[10]+alphaDrSurf_l[1]*G_1l[9]+alphaDrSurf_l[2]*G_1l[8])+0.25*(G_1l[3]*alphaDrSurf_l[7]+alphaDrSurf_l[5]*G_1l[7]+G_1l[6]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*G_1l[5])+0.4330127018922193*G_1l[4]*alphaDrSurf_l[4]+0.25*(G_1l[0]*alphaDrSurf_l[4]+G_1l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1l[2]); - Ghat_G_1_l[5] = 0.5590169943749475*(alphaDrSurf_l[2]*G_1l[23]+alphaDrSurf_l[4]*G_1l[22]+alphaDrSurf_l[0]*G_1l[21]+alphaDrSurf_l[6]*G_1l[20]+alphaDrSurf_l[1]*G_1l[19]+alphaDrSurf_l[7]*G_1l[18]+alphaDrSurf_l[3]*G_1l[17]+alphaDrSurf_l[5]*G_1l[16])+0.4330127018922193*(alphaDrSurf_l[2]*G_1l[15]+alphaDrSurf_l[4]*G_1l[14]+alphaDrSurf_l[0]*G_1l[13]+alphaDrSurf_l[6]*G_1l[12])+0.25*alphaDrSurf_l[2]*G_1l[11]+0.4330127018922193*(alphaDrSurf_l[1]*G_1l[10]+alphaDrSurf_l[7]*G_1l[9]+alphaDrSurf_l[3]*G_1l[8])+0.25*(G_1l[2]*alphaDrSurf_l[7]+alphaDrSurf_l[4]*G_1l[7]+G_1l[5]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*G_1l[6])+0.4330127018922193*G_1l[4]*alphaDrSurf_l[5]+0.25*(G_1l[0]*alphaDrSurf_l[5]+G_1l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*G_1l[3]); - Ghat_G_1_l[6] = 0.5590169943749475*(alphaDrSurf_l[1]*G_1l[23]+alphaDrSurf_l[0]*G_1l[22]+alphaDrSurf_l[4]*G_1l[21]+alphaDrSurf_l[5]*G_1l[20]+alphaDrSurf_l[2]*G_1l[19]+alphaDrSurf_l[3]*G_1l[18]+alphaDrSurf_l[7]*G_1l[17]+alphaDrSurf_l[6]*G_1l[16])+0.4330127018922193*(alphaDrSurf_l[1]*G_1l[15]+alphaDrSurf_l[0]*G_1l[14]+alphaDrSurf_l[4]*G_1l[13]+alphaDrSurf_l[5]*G_1l[12])+0.25*alphaDrSurf_l[1]*G_1l[11]+0.4330127018922193*(alphaDrSurf_l[2]*G_1l[10]+alphaDrSurf_l[3]*G_1l[9]+alphaDrSurf_l[7]*G_1l[8])+0.25*(G_1l[1]*alphaDrSurf_l[7]+alphaDrSurf_l[0]*G_1l[7])+0.4330127018922193*G_1l[4]*alphaDrSurf_l[6]+0.25*(G_1l[0]*alphaDrSurf_l[6]+alphaDrSurf_l[4]*G_1l[6]+G_1l[5]*alphaDrSurf_l[5]+G_1l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*G_1l[3]); - Ghat_G_1_l[7] = 0.5590169943749475*(alphaDrSurf_l[0]*G_1l[23]+alphaDrSurf_l[1]*G_1l[22]+alphaDrSurf_l[2]*G_1l[21]+alphaDrSurf_l[3]*G_1l[20]+alphaDrSurf_l[4]*G_1l[19]+alphaDrSurf_l[5]*G_1l[18]+alphaDrSurf_l[6]*G_1l[17]+alphaDrSurf_l[7]*G_1l[16])+0.4330127018922193*(alphaDrSurf_l[0]*G_1l[15]+alphaDrSurf_l[1]*G_1l[14]+alphaDrSurf_l[2]*G_1l[13]+alphaDrSurf_l[3]*G_1l[12])+0.25*alphaDrSurf_l[0]*G_1l[11]+0.4330127018922193*(alphaDrSurf_l[4]*G_1l[10]+alphaDrSurf_l[5]*G_1l[9]+alphaDrSurf_l[6]*G_1l[8]+G_1l[4]*alphaDrSurf_l[7])+0.25*(G_1l[0]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*G_1l[7]+G_1l[1]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*G_1l[6]+G_1l[2]*alphaDrSurf_l[5]+alphaDrSurf_l[3]*G_1l[5]+G_1l[3]*alphaDrSurf_l[4]); + Ghat_F_0_l[0] = 0.3535533905932737*(F_0_Upwind_l[7]*alphaDrSurf_l[7]+F_0_Upwind_l[6]*alphaDrSurf_l[6]+F_0_Upwind_l[5]*alphaDrSurf_l[5]+F_0_Upwind_l[4]*alphaDrSurf_l[4]+F_0_Upwind_l[3]*alphaDrSurf_l[3]+F_0_Upwind_l[2]*alphaDrSurf_l[2]+F_0_Upwind_l[1]*alphaDrSurf_l[1]+F_0_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_F_0_l[1] = 0.3535533905932737*(F_0_Upwind_l[6]*alphaDrSurf_l[7]+alphaDrSurf_l[6]*F_0_Upwind_l[7]+F_0_Upwind_l[3]*alphaDrSurf_l[5]+alphaDrSurf_l[3]*F_0_Upwind_l[5]+F_0_Upwind_l[2]*alphaDrSurf_l[4]+alphaDrSurf_l[2]*F_0_Upwind_l[4]+F_0_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*F_0_Upwind_l[1]); + Ghat_F_0_l[2] = 0.3535533905932737*(F_0_Upwind_l[5]*alphaDrSurf_l[7]+alphaDrSurf_l[5]*F_0_Upwind_l[7]+F_0_Upwind_l[3]*alphaDrSurf_l[6]+alphaDrSurf_l[3]*F_0_Upwind_l[6]+F_0_Upwind_l[1]*alphaDrSurf_l[4]+alphaDrSurf_l[1]*F_0_Upwind_l[4]+F_0_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*F_0_Upwind_l[2]); + Ghat_F_0_l[3] = 0.3535533905932737*(F_0_Upwind_l[4]*alphaDrSurf_l[7]+alphaDrSurf_l[4]*F_0_Upwind_l[7]+F_0_Upwind_l[2]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*F_0_Upwind_l[6]+F_0_Upwind_l[1]*alphaDrSurf_l[5]+alphaDrSurf_l[1]*F_0_Upwind_l[5]+F_0_Upwind_l[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*F_0_Upwind_l[3]); + Ghat_F_0_l[4] = 0.3535533905932737*(F_0_Upwind_l[3]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*F_0_Upwind_l[7]+F_0_Upwind_l[5]*alphaDrSurf_l[6]+alphaDrSurf_l[5]*F_0_Upwind_l[6]+F_0_Upwind_l[0]*alphaDrSurf_l[4]+alphaDrSurf_l[0]*F_0_Upwind_l[4]+F_0_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*F_0_Upwind_l[2]); + Ghat_F_0_l[5] = 0.3535533905932737*(F_0_Upwind_l[2]*alphaDrSurf_l[7]+alphaDrSurf_l[2]*F_0_Upwind_l[7]+F_0_Upwind_l[4]*alphaDrSurf_l[6]+alphaDrSurf_l[4]*F_0_Upwind_l[6]+F_0_Upwind_l[0]*alphaDrSurf_l[5]+alphaDrSurf_l[0]*F_0_Upwind_l[5]+F_0_Upwind_l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*F_0_Upwind_l[3]); + Ghat_F_0_l[6] = 0.3535533905932737*(F_0_Upwind_l[1]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*F_0_Upwind_l[7]+F_0_Upwind_l[0]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*F_0_Upwind_l[6]+F_0_Upwind_l[4]*alphaDrSurf_l[5]+alphaDrSurf_l[4]*F_0_Upwind_l[5]+F_0_Upwind_l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*F_0_Upwind_l[3]); + Ghat_F_0_l[7] = 0.3535533905932737*(F_0_Upwind_l[0]*alphaDrSurf_l[7]+alphaDrSurf_l[0]*F_0_Upwind_l[7]+F_0_Upwind_l[1]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*F_0_Upwind_l[6]+F_0_Upwind_l[2]*alphaDrSurf_l[5]+alphaDrSurf_l[2]*F_0_Upwind_l[5]+F_0_Upwind_l[3]*alphaDrSurf_l[4]+alphaDrSurf_l[3]*F_0_Upwind_l[4]); + Ghat_G_1_l[0] = 0.3535533905932737*(G_1_Upwind_l[7]*alphaDrSurf_l[7]+G_1_Upwind_l[6]*alphaDrSurf_l[6]+G_1_Upwind_l[5]*alphaDrSurf_l[5]+G_1_Upwind_l[4]*alphaDrSurf_l[4]+G_1_Upwind_l[3]*alphaDrSurf_l[3]+G_1_Upwind_l[2]*alphaDrSurf_l[2]+G_1_Upwind_l[1]*alphaDrSurf_l[1]+G_1_Upwind_l[0]*alphaDrSurf_l[0]); + Ghat_G_1_l[1] = 0.3535533905932737*(G_1_Upwind_l[6]*alphaDrSurf_l[7]+alphaDrSurf_l[6]*G_1_Upwind_l[7]+G_1_Upwind_l[3]*alphaDrSurf_l[5]+alphaDrSurf_l[3]*G_1_Upwind_l[5]+G_1_Upwind_l[2]*alphaDrSurf_l[4]+alphaDrSurf_l[2]*G_1_Upwind_l[4]+G_1_Upwind_l[0]*alphaDrSurf_l[1]+alphaDrSurf_l[0]*G_1_Upwind_l[1]); + Ghat_G_1_l[2] = 0.3535533905932737*(G_1_Upwind_l[5]*alphaDrSurf_l[7]+alphaDrSurf_l[5]*G_1_Upwind_l[7]+G_1_Upwind_l[3]*alphaDrSurf_l[6]+alphaDrSurf_l[3]*G_1_Upwind_l[6]+G_1_Upwind_l[1]*alphaDrSurf_l[4]+alphaDrSurf_l[1]*G_1_Upwind_l[4]+G_1_Upwind_l[0]*alphaDrSurf_l[2]+alphaDrSurf_l[0]*G_1_Upwind_l[2]); + Ghat_G_1_l[3] = 0.3535533905932737*(G_1_Upwind_l[4]*alphaDrSurf_l[7]+alphaDrSurf_l[4]*G_1_Upwind_l[7]+G_1_Upwind_l[2]*alphaDrSurf_l[6]+alphaDrSurf_l[2]*G_1_Upwind_l[6]+G_1_Upwind_l[1]*alphaDrSurf_l[5]+alphaDrSurf_l[1]*G_1_Upwind_l[5]+G_1_Upwind_l[0]*alphaDrSurf_l[3]+alphaDrSurf_l[0]*G_1_Upwind_l[3]); + Ghat_G_1_l[4] = 0.3535533905932737*(G_1_Upwind_l[3]*alphaDrSurf_l[7]+alphaDrSurf_l[3]*G_1_Upwind_l[7]+G_1_Upwind_l[5]*alphaDrSurf_l[6]+alphaDrSurf_l[5]*G_1_Upwind_l[6]+G_1_Upwind_l[0]*alphaDrSurf_l[4]+alphaDrSurf_l[0]*G_1_Upwind_l[4]+G_1_Upwind_l[1]*alphaDrSurf_l[2]+alphaDrSurf_l[1]*G_1_Upwind_l[2]); + Ghat_G_1_l[5] = 0.3535533905932737*(G_1_Upwind_l[2]*alphaDrSurf_l[7]+alphaDrSurf_l[2]*G_1_Upwind_l[7]+G_1_Upwind_l[4]*alphaDrSurf_l[6]+alphaDrSurf_l[4]*G_1_Upwind_l[6]+G_1_Upwind_l[0]*alphaDrSurf_l[5]+alphaDrSurf_l[0]*G_1_Upwind_l[5]+G_1_Upwind_l[1]*alphaDrSurf_l[3]+alphaDrSurf_l[1]*G_1_Upwind_l[3]); + Ghat_G_1_l[6] = 0.3535533905932737*(G_1_Upwind_l[1]*alphaDrSurf_l[7]+alphaDrSurf_l[1]*G_1_Upwind_l[7]+G_1_Upwind_l[0]*alphaDrSurf_l[6]+alphaDrSurf_l[0]*G_1_Upwind_l[6]+G_1_Upwind_l[4]*alphaDrSurf_l[5]+alphaDrSurf_l[4]*G_1_Upwind_l[5]+G_1_Upwind_l[2]*alphaDrSurf_l[3]+alphaDrSurf_l[2]*G_1_Upwind_l[3]); + Ghat_G_1_l[7] = 0.3535533905932737*(G_1_Upwind_l[0]*alphaDrSurf_l[7]+alphaDrSurf_l[0]*G_1_Upwind_l[7]+G_1_Upwind_l[1]*alphaDrSurf_l[6]+alphaDrSurf_l[1]*G_1_Upwind_l[6]+G_1_Upwind_l[2]*alphaDrSurf_l[5]+alphaDrSurf_l[2]*G_1_Upwind_l[5]+G_1_Upwind_l[3]*alphaDrSurf_l[4]+alphaDrSurf_l[3]*G_1_Upwind_l[4]); + + Ghat_F_0_r[0] = 0.3535533905932737*(F_0_Upwind_r[7]*alphaDrSurf_r[7]+F_0_Upwind_r[6]*alphaDrSurf_r[6]+F_0_Upwind_r[5]*alphaDrSurf_r[5]+F_0_Upwind_r[4]*alphaDrSurf_r[4]+F_0_Upwind_r[3]*alphaDrSurf_r[3]+F_0_Upwind_r[2]*alphaDrSurf_r[2]+F_0_Upwind_r[1]*alphaDrSurf_r[1]+F_0_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_F_0_r[1] = 0.3535533905932737*(F_0_Upwind_r[6]*alphaDrSurf_r[7]+alphaDrSurf_r[6]*F_0_Upwind_r[7]+F_0_Upwind_r[3]*alphaDrSurf_r[5]+alphaDrSurf_r[3]*F_0_Upwind_r[5]+F_0_Upwind_r[2]*alphaDrSurf_r[4]+alphaDrSurf_r[2]*F_0_Upwind_r[4]+F_0_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*F_0_Upwind_r[1]); + Ghat_F_0_r[2] = 0.3535533905932737*(F_0_Upwind_r[5]*alphaDrSurf_r[7]+alphaDrSurf_r[5]*F_0_Upwind_r[7]+F_0_Upwind_r[3]*alphaDrSurf_r[6]+alphaDrSurf_r[3]*F_0_Upwind_r[6]+F_0_Upwind_r[1]*alphaDrSurf_r[4]+alphaDrSurf_r[1]*F_0_Upwind_r[4]+F_0_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*F_0_Upwind_r[2]); + Ghat_F_0_r[3] = 0.3535533905932737*(F_0_Upwind_r[4]*alphaDrSurf_r[7]+alphaDrSurf_r[4]*F_0_Upwind_r[7]+F_0_Upwind_r[2]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*F_0_Upwind_r[6]+F_0_Upwind_r[1]*alphaDrSurf_r[5]+alphaDrSurf_r[1]*F_0_Upwind_r[5]+F_0_Upwind_r[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*F_0_Upwind_r[3]); + Ghat_F_0_r[4] = 0.3535533905932737*(F_0_Upwind_r[3]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*F_0_Upwind_r[7]+F_0_Upwind_r[5]*alphaDrSurf_r[6]+alphaDrSurf_r[5]*F_0_Upwind_r[6]+F_0_Upwind_r[0]*alphaDrSurf_r[4]+alphaDrSurf_r[0]*F_0_Upwind_r[4]+F_0_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*F_0_Upwind_r[2]); + Ghat_F_0_r[5] = 0.3535533905932737*(F_0_Upwind_r[2]*alphaDrSurf_r[7]+alphaDrSurf_r[2]*F_0_Upwind_r[7]+F_0_Upwind_r[4]*alphaDrSurf_r[6]+alphaDrSurf_r[4]*F_0_Upwind_r[6]+F_0_Upwind_r[0]*alphaDrSurf_r[5]+alphaDrSurf_r[0]*F_0_Upwind_r[5]+F_0_Upwind_r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*F_0_Upwind_r[3]); + Ghat_F_0_r[6] = 0.3535533905932737*(F_0_Upwind_r[1]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*F_0_Upwind_r[7]+F_0_Upwind_r[0]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*F_0_Upwind_r[6]+F_0_Upwind_r[4]*alphaDrSurf_r[5]+alphaDrSurf_r[4]*F_0_Upwind_r[5]+F_0_Upwind_r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*F_0_Upwind_r[3]); + Ghat_F_0_r[7] = 0.3535533905932737*(F_0_Upwind_r[0]*alphaDrSurf_r[7]+alphaDrSurf_r[0]*F_0_Upwind_r[7]+F_0_Upwind_r[1]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*F_0_Upwind_r[6]+F_0_Upwind_r[2]*alphaDrSurf_r[5]+alphaDrSurf_r[2]*F_0_Upwind_r[5]+F_0_Upwind_r[3]*alphaDrSurf_r[4]+alphaDrSurf_r[3]*F_0_Upwind_r[4]); + Ghat_G_1_r[0] = 0.3535533905932737*(G_1_Upwind_r[7]*alphaDrSurf_r[7]+G_1_Upwind_r[6]*alphaDrSurf_r[6]+G_1_Upwind_r[5]*alphaDrSurf_r[5]+G_1_Upwind_r[4]*alphaDrSurf_r[4]+G_1_Upwind_r[3]*alphaDrSurf_r[3]+G_1_Upwind_r[2]*alphaDrSurf_r[2]+G_1_Upwind_r[1]*alphaDrSurf_r[1]+G_1_Upwind_r[0]*alphaDrSurf_r[0]); + Ghat_G_1_r[1] = 0.3535533905932737*(G_1_Upwind_r[6]*alphaDrSurf_r[7]+alphaDrSurf_r[6]*G_1_Upwind_r[7]+G_1_Upwind_r[3]*alphaDrSurf_r[5]+alphaDrSurf_r[3]*G_1_Upwind_r[5]+G_1_Upwind_r[2]*alphaDrSurf_r[4]+alphaDrSurf_r[2]*G_1_Upwind_r[4]+G_1_Upwind_r[0]*alphaDrSurf_r[1]+alphaDrSurf_r[0]*G_1_Upwind_r[1]); + Ghat_G_1_r[2] = 0.3535533905932737*(G_1_Upwind_r[5]*alphaDrSurf_r[7]+alphaDrSurf_r[5]*G_1_Upwind_r[7]+G_1_Upwind_r[3]*alphaDrSurf_r[6]+alphaDrSurf_r[3]*G_1_Upwind_r[6]+G_1_Upwind_r[1]*alphaDrSurf_r[4]+alphaDrSurf_r[1]*G_1_Upwind_r[4]+G_1_Upwind_r[0]*alphaDrSurf_r[2]+alphaDrSurf_r[0]*G_1_Upwind_r[2]); + Ghat_G_1_r[3] = 0.3535533905932737*(G_1_Upwind_r[4]*alphaDrSurf_r[7]+alphaDrSurf_r[4]*G_1_Upwind_r[7]+G_1_Upwind_r[2]*alphaDrSurf_r[6]+alphaDrSurf_r[2]*G_1_Upwind_r[6]+G_1_Upwind_r[1]*alphaDrSurf_r[5]+alphaDrSurf_r[1]*G_1_Upwind_r[5]+G_1_Upwind_r[0]*alphaDrSurf_r[3]+alphaDrSurf_r[0]*G_1_Upwind_r[3]); + Ghat_G_1_r[4] = 0.3535533905932737*(G_1_Upwind_r[3]*alphaDrSurf_r[7]+alphaDrSurf_r[3]*G_1_Upwind_r[7]+G_1_Upwind_r[5]*alphaDrSurf_r[6]+alphaDrSurf_r[5]*G_1_Upwind_r[6]+G_1_Upwind_r[0]*alphaDrSurf_r[4]+alphaDrSurf_r[0]*G_1_Upwind_r[4]+G_1_Upwind_r[1]*alphaDrSurf_r[2]+alphaDrSurf_r[1]*G_1_Upwind_r[2]); + Ghat_G_1_r[5] = 0.3535533905932737*(G_1_Upwind_r[2]*alphaDrSurf_r[7]+alphaDrSurf_r[2]*G_1_Upwind_r[7]+G_1_Upwind_r[4]*alphaDrSurf_r[6]+alphaDrSurf_r[4]*G_1_Upwind_r[6]+G_1_Upwind_r[0]*alphaDrSurf_r[5]+alphaDrSurf_r[0]*G_1_Upwind_r[5]+G_1_Upwind_r[1]*alphaDrSurf_r[3]+alphaDrSurf_r[1]*G_1_Upwind_r[3]); + Ghat_G_1_r[6] = 0.3535533905932737*(G_1_Upwind_r[1]*alphaDrSurf_r[7]+alphaDrSurf_r[1]*G_1_Upwind_r[7]+G_1_Upwind_r[0]*alphaDrSurf_r[6]+alphaDrSurf_r[0]*G_1_Upwind_r[6]+G_1_Upwind_r[4]*alphaDrSurf_r[5]+alphaDrSurf_r[4]*G_1_Upwind_r[5]+G_1_Upwind_r[2]*alphaDrSurf_r[3]+alphaDrSurf_r[2]*G_1_Upwind_r[3]); + Ghat_G_1_r[7] = 0.3535533905932737*(G_1_Upwind_r[0]*alphaDrSurf_r[7]+alphaDrSurf_r[0]*G_1_Upwind_r[7]+G_1_Upwind_r[1]*alphaDrSurf_r[6]+alphaDrSurf_r[1]*G_1_Upwind_r[6]+G_1_Upwind_r[2]*alphaDrSurf_r[5]+alphaDrSurf_r[2]*G_1_Upwind_r[5]+G_1_Upwind_r[3]*alphaDrSurf_r[4]+alphaDrSurf_r[3]*G_1_Upwind_r[4]); - } out_F_0[0] += (0.7071067811865475*Ghat_F_0_r[0]-0.7071067811865475*Ghat_F_0_l[0])*dv1par; out_F_0[1] += (0.7071067811865475*Ghat_F_0_r[1]-0.7071067811865475*Ghat_F_0_l[1])*dv1par; out_F_0[2] += (0.7071067811865475*Ghat_F_0_r[2]-0.7071067811865475*Ghat_F_0_l[2])*dv1par; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1.c index 8d9498ef0..879af0a02 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1.c @@ -1,23 +1,26 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nu: collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvpar = 2.0/dxv[1]; const double dvpar = dxv[1], wvpar = w[1]; const double *F_0 = &f[0]; const double *G_1 = &f[6]; double *out_F_0 = &out[0]; double *out_G_1 = &out[6]; + + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrag[6]; - // Expand rdvpar*(nu*vx) in phase basis. - alphaDrag[0] = -1.414213562373095*nu[0]*rdvpar*wvpar; - alphaDrag[1] = -1.414213562373095*nu[1]*rdvpar*wvpar; - alphaDrag[2] = -0.408248290463863*nu[0]*dvpar*rdvpar; - alphaDrag[3] = -0.408248290463863*nu[1]*dvpar*rdvpar; + alphaDrag[0] = rdvpar*(1.414213562373095*sumNuUPar[0]-1.414213562373095*nuSum[0]*wvpar); + alphaDrag[1] = rdvpar*(1.414213562373095*sumNuUPar[1]-1.414213562373095*nuSum[1]*wvpar); + alphaDrag[2] = -0.408248290463863*nuSum[0]*dvpar*rdvpar; + alphaDrag[3] = -0.408248290463863*nuSum[1]*dvpar*rdvpar; out_F_0[2] += 0.8660254037844386*F_0[3]*alphaDrag[3]+0.8660254037844386*F_0[2]*alphaDrag[2]+0.8660254037844386*F_0[1]*alphaDrag[1]+0.8660254037844386*F_0[0]*alphaDrag[0]; out_F_0[3] += 0.8660254037844386*F_0[2]*alphaDrag[3]+0.8660254037844386*alphaDrag[2]*F_0[3]+0.8660254037844386*F_0[0]*alphaDrag[1]+0.8660254037844386*alphaDrag[0]*F_0[1]; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2.c index b4dc67e5a..9ce6bcd22 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2.c @@ -1,25 +1,28 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nu: collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvpar = 2.0/dxv[1]; const double dvpar = dxv[1], wvpar = w[1]; const double *F_0 = &f[0]; const double *G_1 = &f[8]; double *out_F_0 = &out[0]; double *out_G_1 = &out[8]; + + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrag[8]; - // Expand rdvpar*(nu*vx) in phase basis. - alphaDrag[0] = -1.414213562373095*nu[0]*rdvpar*wvpar; - alphaDrag[1] = -1.414213562373095*nu[1]*rdvpar*wvpar; - alphaDrag[2] = -0.408248290463863*nu[0]*dvpar*rdvpar; - alphaDrag[3] = -0.408248290463863*nu[1]*dvpar*rdvpar; - alphaDrag[4] = -1.414213562373095*nu[2]*rdvpar*wvpar; - alphaDrag[6] = -0.408248290463863*nu[2]*dvpar*rdvpar; + alphaDrag[0] = rdvpar*(1.414213562373095*sumNuUPar[0]-1.414213562373095*nuSum[0]*wvpar); + alphaDrag[1] = rdvpar*(1.414213562373095*sumNuUPar[1]-1.414213562373095*nuSum[1]*wvpar); + alphaDrag[2] = -0.408248290463863*nuSum[0]*dvpar*rdvpar; + alphaDrag[3] = -0.408248290463863*nuSum[1]*dvpar*rdvpar; + alphaDrag[4] = rdvpar*(1.414213562373095*sumNuUPar[2]-1.414213562373095*nuSum[2]*wvpar); + alphaDrag[6] = -0.408248290463863*nuSum[2]*dvpar*rdvpar; out_F_0[2] += 0.8660254037844386*F_0[6]*alphaDrag[6]+0.8660254037844386*F_0[4]*alphaDrag[4]+0.8660254037844386*F_0[3]*alphaDrag[3]+0.8660254037844386*F_0[2]*alphaDrag[2]+0.8660254037844386*F_0[1]*alphaDrag[1]+0.8660254037844386*F_0[0]*alphaDrag[0]; out_F_0[3] += 0.7745966692414834*F_0[3]*alphaDrag[6]+0.7745966692414834*alphaDrag[3]*F_0[6]+0.7745966692414833*F_0[1]*alphaDrag[4]+0.7745966692414833*alphaDrag[1]*F_0[4]+0.8660254037844386*F_0[2]*alphaDrag[3]+0.8660254037844386*alphaDrag[2]*F_0[3]+0.8660254037844386*F_0[0]*alphaDrag[1]+0.8660254037844386*alphaDrag[0]*F_0[1]; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2.c index 725a5b454..ae1a1e97a 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2.c @@ -1,25 +1,28 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[2]: Cell-center coordinates. - // dxv[2]: Cell spacing. - // nu: collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvpar = 2.0/dxv[1]; const double dvpar = dxv[1], wvpar = w[1]; const double *F_0 = &f[0]; const double *G_1 = &f[9]; double *out_F_0 = &out[0]; double *out_G_1 = &out[9]; + + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrag[9]; - // Expand rdvpar*(nu*vx) in phase basis. - alphaDrag[0] = -1.414213562373095*nu[0]*rdvpar*wvpar; - alphaDrag[1] = -1.414213562373095*nu[1]*rdvpar*wvpar; - alphaDrag[2] = -0.408248290463863*nu[0]*dvpar*rdvpar; - alphaDrag[3] = -0.408248290463863*nu[1]*dvpar*rdvpar; - alphaDrag[4] = -1.414213562373095*nu[2]*rdvpar*wvpar; - alphaDrag[6] = -0.408248290463863*nu[2]*dvpar*rdvpar; + alphaDrag[0] = rdvpar*(1.414213562373095*sumNuUPar[0]-1.414213562373095*nuSum[0]*wvpar); + alphaDrag[1] = rdvpar*(1.414213562373095*sumNuUPar[1]-1.414213562373095*nuSum[1]*wvpar); + alphaDrag[2] = -0.408248290463863*nuSum[0]*dvpar*rdvpar; + alphaDrag[3] = -0.408248290463863*nuSum[1]*dvpar*rdvpar; + alphaDrag[4] = rdvpar*(1.414213562373095*sumNuUPar[2]-1.414213562373095*nuSum[2]*wvpar); + alphaDrag[6] = -0.408248290463863*nuSum[2]*dvpar*rdvpar; out_F_0[2] += 0.8660254037844386*F_0[6]*alphaDrag[6]+0.8660254037844386*F_0[4]*alphaDrag[4]+0.8660254037844386*F_0[3]*alphaDrag[3]+0.8660254037844386*F_0[2]*alphaDrag[2]+0.8660254037844386*F_0[1]*alphaDrag[1]+0.8660254037844386*F_0[0]*alphaDrag[0]; out_F_0[3] += 0.7745966692414834*F_0[3]*alphaDrag[6]+0.7745966692414834*alphaDrag[3]*F_0[6]+0.7745966692414833*F_0[1]*alphaDrag[4]+0.7745966692414833*alphaDrag[1]*F_0[4]+0.8660254037844386*F_0[2]*alphaDrag[3]+0.8660254037844386*alphaDrag[2]*F_0[3]+0.8660254037844386*F_0[0]*alphaDrag[1]+0.8660254037844386*alphaDrag[0]*F_0[1]; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1.c index fdbc7ab23..ffe86e97d 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1.c @@ -1,27 +1,30 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[3]: Cell-center coordinates. - // dxv[3]: Cell spacing. - // nu: collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvpar = 2.0/dxv[2]; const double dvpar = dxv[2], wvpar = w[2]; const double *F_0 = &f[0]; const double *G_1 = &f[12]; double *out_F_0 = &out[0]; double *out_G_1 = &out[12]; + + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrag[12]; - // Expand rdvpar*(nu*vx) in phase basis. - alphaDrag[0] = -1.414213562373095*nu[0]*rdvpar*wvpar; - alphaDrag[1] = -1.414213562373095*nu[1]*rdvpar*wvpar; - alphaDrag[2] = -1.414213562373095*nu[2]*rdvpar*wvpar; - alphaDrag[3] = -0.408248290463863*nu[0]*dvpar*rdvpar; - alphaDrag[4] = -1.414213562373095*nu[3]*rdvpar*wvpar; - alphaDrag[5] = -0.408248290463863*nu[1]*dvpar*rdvpar; - alphaDrag[6] = -0.408248290463863*nu[2]*dvpar*rdvpar; - alphaDrag[7] = -0.408248290463863*nu[3]*dvpar*rdvpar; + alphaDrag[0] = rdvpar*(1.414213562373095*sumNuUPar[0]-1.414213562373095*nuSum[0]*wvpar); + alphaDrag[1] = rdvpar*(1.414213562373095*sumNuUPar[1]-1.414213562373095*nuSum[1]*wvpar); + alphaDrag[2] = rdvpar*(1.414213562373095*sumNuUPar[2]-1.414213562373095*nuSum[2]*wvpar); + alphaDrag[3] = -0.408248290463863*nuSum[0]*dvpar*rdvpar; + alphaDrag[4] = rdvpar*(1.414213562373095*sumNuUPar[3]-1.414213562373095*nuSum[3]*wvpar); + alphaDrag[5] = -0.408248290463863*nuSum[1]*dvpar*rdvpar; + alphaDrag[6] = -0.408248290463863*nuSum[2]*dvpar*rdvpar; + alphaDrag[7] = -0.408248290463863*nuSum[3]*dvpar*rdvpar; out_F_0[3] += 0.6123724356957944*F_0[7]*alphaDrag[7]+0.6123724356957944*F_0[6]*alphaDrag[6]+0.6123724356957944*F_0[5]*alphaDrag[5]+0.6123724356957944*F_0[4]*alphaDrag[4]+0.6123724356957944*F_0[3]*alphaDrag[3]+0.6123724356957944*F_0[2]*alphaDrag[2]+0.6123724356957944*F_0[1]*alphaDrag[1]+0.6123724356957944*F_0[0]*alphaDrag[0]; out_F_0[5] += 0.6123724356957944*F_0[6]*alphaDrag[7]+0.6123724356957944*alphaDrag[6]*F_0[7]+0.6123724356957944*F_0[3]*alphaDrag[5]+0.6123724356957944*alphaDrag[3]*F_0[5]+0.6123724356957944*F_0[2]*alphaDrag[4]+0.6123724356957944*alphaDrag[2]*F_0[4]+0.6123724356957944*F_0[0]*alphaDrag[1]+0.6123724356957944*alphaDrag[0]*F_0[1]; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2.c index e81a86d86..7d8397bd1 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2.c @@ -1,37 +1,40 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[3]: Cell-center coordinates. - // dxv[3]: Cell spacing. - // nu: collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvpar = 2.0/dxv[2]; const double dvpar = dxv[2], wvpar = w[2]; const double *F_0 = &f[0]; const double *G_1 = &f[27]; double *out_F_0 = &out[0]; double *out_G_1 = &out[27]; + + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrag[27]; - // Expand rdvpar*(nu*vx) in phase basis. - alphaDrag[0] = -1.414213562373095*nu[0]*rdvpar*wvpar; - alphaDrag[1] = -1.414213562373095*nu[1]*rdvpar*wvpar; - alphaDrag[2] = -1.414213562373095*nu[2]*rdvpar*wvpar; - alphaDrag[3] = -0.408248290463863*nu[0]*dvpar*rdvpar; - alphaDrag[4] = -1.414213562373095*nu[3]*rdvpar*wvpar; - alphaDrag[5] = -0.408248290463863*nu[1]*dvpar*rdvpar; - alphaDrag[6] = -0.408248290463863*nu[2]*dvpar*rdvpar; - alphaDrag[7] = -1.414213562373095*nu[4]*rdvpar*wvpar; - alphaDrag[8] = -1.414213562373095*nu[5]*rdvpar*wvpar; - alphaDrag[10] = -0.408248290463863*nu[3]*dvpar*rdvpar; - alphaDrag[11] = -1.414213562373095*nu[6]*rdvpar*wvpar; - alphaDrag[12] = -1.414213562373095*nu[7]*rdvpar*wvpar; - alphaDrag[13] = -0.408248290463863*nu[4]*dvpar*rdvpar; - alphaDrag[14] = -0.408248290463863*nu[5]*dvpar*rdvpar; - alphaDrag[17] = -0.408248290463863*nu[6]*dvpar*rdvpar; - alphaDrag[18] = -0.408248290463863*nu[7]*dvpar*rdvpar; - alphaDrag[20] = -1.414213562373095*nu[8]*rdvpar*wvpar; - alphaDrag[23] = -0.408248290463863*nu[8]*dvpar*rdvpar; + alphaDrag[0] = rdvpar*(1.414213562373095*sumNuUPar[0]-1.414213562373095*nuSum[0]*wvpar); + alphaDrag[1] = rdvpar*(1.414213562373095*sumNuUPar[1]-1.414213562373095*nuSum[1]*wvpar); + alphaDrag[2] = rdvpar*(1.414213562373095*sumNuUPar[2]-1.414213562373095*nuSum[2]*wvpar); + alphaDrag[3] = -0.408248290463863*nuSum[0]*dvpar*rdvpar; + alphaDrag[4] = rdvpar*(1.414213562373095*sumNuUPar[3]-1.414213562373095*nuSum[3]*wvpar); + alphaDrag[5] = -0.408248290463863*nuSum[1]*dvpar*rdvpar; + alphaDrag[6] = -0.408248290463863*nuSum[2]*dvpar*rdvpar; + alphaDrag[7] = rdvpar*(1.414213562373095*sumNuUPar[4]-1.414213562373095*nuSum[4]*wvpar); + alphaDrag[8] = rdvpar*(1.414213562373095*sumNuUPar[5]-1.414213562373095*nuSum[5]*wvpar); + alphaDrag[10] = -0.408248290463863*nuSum[3]*dvpar*rdvpar; + alphaDrag[11] = rdvpar*(1.414213562373095*sumNuUPar[6]-1.414213562373095*nuSum[6]*wvpar); + alphaDrag[12] = rdvpar*(1.414213562373095*sumNuUPar[7]-1.414213562373095*nuSum[7]*wvpar); + alphaDrag[13] = -0.408248290463863*nuSum[4]*dvpar*rdvpar; + alphaDrag[14] = -0.408248290463863*nuSum[5]*dvpar*rdvpar; + alphaDrag[17] = -0.408248290463863*nuSum[6]*dvpar*rdvpar; + alphaDrag[18] = -0.408248290463863*nuSum[7]*dvpar*rdvpar; + alphaDrag[20] = rdvpar*(1.414213562373095*sumNuUPar[8]-1.414213562373095*nuSum[8]*wvpar); + alphaDrag[23] = -0.408248290463863*nuSum[8]*dvpar*rdvpar; out_F_0[3] += 0.6123724356957944*F_0[23]*alphaDrag[23]+0.6123724356957944*F_0[20]*alphaDrag[20]+0.6123724356957944*F_0[18]*alphaDrag[18]+0.6123724356957944*F_0[17]*alphaDrag[17]+0.6123724356957944*F_0[14]*alphaDrag[14]+0.6123724356957944*F_0[13]*alphaDrag[13]+0.6123724356957944*F_0[12]*alphaDrag[12]+0.6123724356957944*F_0[11]*alphaDrag[11]+0.6123724356957944*F_0[10]*alphaDrag[10]+0.6123724356957944*F_0[8]*alphaDrag[8]+0.6123724356957944*F_0[7]*alphaDrag[7]+0.6123724356957944*F_0[6]*alphaDrag[6]+0.6123724356957944*F_0[5]*alphaDrag[5]+0.6123724356957944*F_0[4]*alphaDrag[4]+0.6123724356957944*F_0[3]*alphaDrag[3]+0.6123724356957944*F_0[2]*alphaDrag[2]+0.6123724356957944*F_0[1]*alphaDrag[1]+0.6123724356957944*F_0[0]*alphaDrag[0]; out_F_0[5] += 0.5477225575051661*F_0[18]*alphaDrag[23]+0.5477225575051661*alphaDrag[18]*F_0[23]+0.5477225575051661*F_0[12]*alphaDrag[20]+0.5477225575051661*alphaDrag[12]*F_0[20]+0.6123724356957944*F_0[14]*alphaDrag[18]+0.6123724356957944*alphaDrag[14]*F_0[18]+0.5477225575051661*F_0[10]*alphaDrag[17]+0.5477225575051661*alphaDrag[10]*F_0[17]+0.5477225575051661*F_0[5]*alphaDrag[13]+0.5477225575051661*alphaDrag[5]*F_0[13]+0.6123724356957944*F_0[8]*alphaDrag[12]+0.6123724356957944*alphaDrag[8]*F_0[12]+0.5477225575051661*F_0[4]*alphaDrag[11]+0.5477225575051661*alphaDrag[4]*F_0[11]+0.6123724356957944*F_0[6]*alphaDrag[10]+0.6123724356957944*alphaDrag[6]*F_0[10]+0.5477225575051661*F_0[1]*alphaDrag[7]+0.5477225575051661*alphaDrag[1]*F_0[7]+0.6123724356957944*F_0[3]*alphaDrag[5]+0.6123724356957944*alphaDrag[3]*F_0[5]+0.6123724356957944*F_0[2]*alphaDrag[4]+0.6123724356957944*alphaDrag[2]*F_0[4]+0.6123724356957944*F_0[0]*alphaDrag[1]+0.6123724356957944*alphaDrag[0]*F_0[1]; diff --git a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1.c b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1.c index 49f48501e..6d7ec39c6 100644 --- a/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1.c +++ b/kernels/pkpm/lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1.c @@ -1,35 +1,38 @@ #include -GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1(const double *w, const double *dxv, const double *nu, const double *f, double* GKYL_RESTRICT out) +GKYL_CU_DH double lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1(const double *w, const double *dxv, const double *nuSum, const double *nuPrimMomsSum, const double *f, double* GKYL_RESTRICT out) { - // w[4]: Cell-center coordinates. - // dxv[4]: Cell spacing. - // nu: collisionality. - // f: Input distribution function. - // out: Incremented output + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // nuSum: Collisionalities added (self and cross species collisionalities). + // nuPrimMomsSum: Sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // f: Input distribution functions [F_0, T_perp/m G_1 = T_perp/m (F_0 - F_1)]. + // out: Incremented output distribution functions. const double rdvpar = 2.0/dxv[3]; const double dvpar = dxv[3], wvpar = w[3]; const double *F_0 = &f[0]; const double *G_1 = &f[24]; double *out_F_0 = &out[0]; double *out_G_1 = &out[24]; + + const double *sumNuUPar = &nuPrimMomsSum[0]; + double alphaDrag[24]; - // Expand rdvpar*(nu*vx) in phase basis. - alphaDrag[0] = -1.414213562373095*nu[0]*rdvpar*wvpar; - alphaDrag[1] = -1.414213562373095*nu[1]*rdvpar*wvpar; - alphaDrag[2] = -1.414213562373095*nu[2]*rdvpar*wvpar; - alphaDrag[3] = -1.414213562373095*nu[3]*rdvpar*wvpar; - alphaDrag[4] = -0.408248290463863*nu[0]*dvpar*rdvpar; - alphaDrag[5] = -1.414213562373095*nu[4]*rdvpar*wvpar; - alphaDrag[6] = -1.414213562373095*nu[5]*rdvpar*wvpar; - alphaDrag[7] = -1.414213562373095*nu[6]*rdvpar*wvpar; - alphaDrag[8] = -0.408248290463863*nu[1]*dvpar*rdvpar; - alphaDrag[9] = -0.408248290463863*nu[2]*dvpar*rdvpar; - alphaDrag[10] = -0.408248290463863*nu[3]*dvpar*rdvpar; - alphaDrag[11] = -1.414213562373095*nu[7]*rdvpar*wvpar; - alphaDrag[12] = -0.408248290463863*nu[4]*dvpar*rdvpar; - alphaDrag[13] = -0.408248290463863*nu[5]*dvpar*rdvpar; - alphaDrag[14] = -0.408248290463863*nu[6]*dvpar*rdvpar; - alphaDrag[15] = -0.408248290463863*nu[7]*dvpar*rdvpar; + alphaDrag[0] = rdvpar*(1.414213562373095*sumNuUPar[0]-1.414213562373095*nuSum[0]*wvpar); + alphaDrag[1] = rdvpar*(1.414213562373095*sumNuUPar[1]-1.414213562373095*nuSum[1]*wvpar); + alphaDrag[2] = rdvpar*(1.414213562373095*sumNuUPar[2]-1.414213562373095*nuSum[2]*wvpar); + alphaDrag[3] = rdvpar*(1.414213562373095*sumNuUPar[3]-1.414213562373095*nuSum[3]*wvpar); + alphaDrag[4] = -0.408248290463863*nuSum[0]*dvpar*rdvpar; + alphaDrag[5] = rdvpar*(1.414213562373095*sumNuUPar[4]-1.414213562373095*nuSum[4]*wvpar); + alphaDrag[6] = rdvpar*(1.414213562373095*sumNuUPar[5]-1.414213562373095*nuSum[5]*wvpar); + alphaDrag[7] = rdvpar*(1.414213562373095*sumNuUPar[6]-1.414213562373095*nuSum[6]*wvpar); + alphaDrag[8] = -0.408248290463863*nuSum[1]*dvpar*rdvpar; + alphaDrag[9] = -0.408248290463863*nuSum[2]*dvpar*rdvpar; + alphaDrag[10] = -0.408248290463863*nuSum[3]*dvpar*rdvpar; + alphaDrag[11] = rdvpar*(1.414213562373095*sumNuUPar[7]-1.414213562373095*nuSum[7]*wvpar); + alphaDrag[12] = -0.408248290463863*nuSum[4]*dvpar*rdvpar; + alphaDrag[13] = -0.408248290463863*nuSum[5]*dvpar*rdvpar; + alphaDrag[14] = -0.408248290463863*nuSum[6]*dvpar*rdvpar; + alphaDrag[15] = -0.408248290463863*nuSum[7]*dvpar*rdvpar; out_F_0[4] += 0.4330127018922193*F_0[15]*alphaDrag[15]+0.4330127018922193*F_0[14]*alphaDrag[14]+0.4330127018922193*F_0[13]*alphaDrag[13]+0.4330127018922193*F_0[12]*alphaDrag[12]+0.4330127018922193*F_0[11]*alphaDrag[11]+0.4330127018922193*F_0[10]*alphaDrag[10]+0.4330127018922193*F_0[9]*alphaDrag[9]+0.4330127018922193*F_0[8]*alphaDrag[8]+0.4330127018922193*F_0[7]*alphaDrag[7]+0.4330127018922193*F_0[6]*alphaDrag[6]+0.4330127018922193*F_0[5]*alphaDrag[5]+0.4330127018922193*F_0[4]*alphaDrag[4]+0.4330127018922193*F_0[3]*alphaDrag[3]+0.4330127018922193*F_0[2]*alphaDrag[2]+0.4330127018922193*F_0[1]*alphaDrag[1]+0.4330127018922193*F_0[0]*alphaDrag[0]; out_F_0[8] += 0.4330127018922193*F_0[14]*alphaDrag[15]+0.4330127018922193*alphaDrag[14]*F_0[15]+0.4330127018922193*F_0[10]*alphaDrag[13]+0.4330127018922193*alphaDrag[10]*F_0[13]+0.4330127018922193*F_0[9]*alphaDrag[12]+0.4330127018922193*alphaDrag[9]*F_0[12]+0.4330127018922193*F_0[7]*alphaDrag[11]+0.4330127018922193*alphaDrag[7]*F_0[11]+0.4330127018922193*F_0[4]*alphaDrag[8]+0.4330127018922193*alphaDrag[4]*F_0[8]+0.4330127018922193*F_0[3]*alphaDrag[6]+0.4330127018922193*alphaDrag[3]*F_0[6]+0.4330127018922193*F_0[2]*alphaDrag[5]+0.4330127018922193*alphaDrag[2]*F_0[5]+0.4330127018922193*F_0[0]*alphaDrag[1]+0.4330127018922193*alphaDrag[0]*F_0[1]; diff --git a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p1.c b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p1.c index a213d2ea2..cec4912a8 100644 --- a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p1.c +++ b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p1.c @@ -6,15 +6,19 @@ GKYL_CU_DH void mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p1(const int *idx, enum gkyl_ // dxv[2]: cell length in each direction. // mass: species mass. // fIn[6]: distribution function at lower/upper velocity boundaries. - // out: int dS of vf^(vmax)_(vmin). + // out: int dS of f^(vmax)_(vmin) and vf^(vmax)_(vmin). if (edge == GKYL_VX_LOWER) { - out[0] += vBoundary[0]*((-1.58113883008419*fIn[4])+1.224744871391589*fIn[2]-0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[0]*((-1.58113883008419*fIn[5])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[1])*mass; + out[0] += ((-1.58113883008419*fIn[4])+1.224744871391589*fIn[2]-0.7071067811865475*fIn[0])*mass; + out[1] += ((-1.58113883008419*fIn[5])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[1])*mass; + out[2] += out[0]*vBoundary[0]; + out[3] += vBoundary[0]*out[1]; } else if (edge == GKYL_VX_UPPER) { - out[0] += vBoundary[1]*(1.58113883008419*fIn[4]+1.224744871391589*fIn[2]+0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[1]*(1.58113883008419*fIn[5]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[1])*mass; + out[0] += (1.58113883008419*fIn[4]+1.224744871391589*fIn[2]+0.7071067811865475*fIn[0])*mass; + out[1] += (1.58113883008419*fIn[5]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[1])*mass; + out[2] += out[0]*vBoundary[1]; + out[3] += out[1]*vBoundary[1]; } } diff --git a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p2.c b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p2.c index 8473d2720..5c3575109 100644 --- a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p2.c +++ b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p2.c @@ -6,17 +6,23 @@ GKYL_CU_DH void mom_bcorr_lbo_vlasov_pkpm_1x1v_ser_p2(const int *idx, enum gkyl_ // dxv[2]: cell length in each direction. // mass: species mass. // fIn[8]: distribution function at lower/upper velocity boundaries. - // out: int dS of vf^(vmax)_(vmin). + // out: int dS of f^(vmax)_(vmin) and vf^(vmax)_(vmin). if (edge == GKYL_VX_LOWER) { - out[0] += vBoundary[0]*((-1.58113883008419*fIn[5])+1.224744871391589*fIn[2]-0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[0]*((-1.58113883008419*fIn[7])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[0]*(1.224744871391589*fIn[6]-0.7071067811865475*fIn[4])*mass; + out[0] += ((-1.58113883008419*fIn[5])+1.224744871391589*fIn[2]-0.7071067811865475*fIn[0])*mass; + out[1] += ((-1.58113883008419*fIn[7])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[1])*mass; + out[2] += (1.224744871391589*fIn[6]-0.7071067811865475*fIn[4])*mass; + out[3] += out[0]*vBoundary[0]; + out[4] += vBoundary[0]*out[1]; + out[5] += vBoundary[0]*out[2]; } else if (edge == GKYL_VX_UPPER) { - out[0] += vBoundary[1]*(1.58113883008419*fIn[5]+1.224744871391589*fIn[2]+0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[1]*(1.58113883008419*fIn[7]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[1]*(1.224744871391589*fIn[6]+0.7071067811865475*fIn[4])*mass; + out[0] += (1.58113883008419*fIn[5]+1.224744871391589*fIn[2]+0.7071067811865475*fIn[0])*mass; + out[1] += (1.58113883008419*fIn[7]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[1])*mass; + out[2] += (1.224744871391589*fIn[6]+0.7071067811865475*fIn[4])*mass; + out[3] += out[0]*vBoundary[1]; + out[4] += out[1]*vBoundary[1]; + out[5] += vBoundary[1]*out[2]; } } diff --git a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_tensor_p2.c b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_tensor_p2.c index 5ec5c7d99..8fe19b01f 100644 --- a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_tensor_p2.c +++ b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_1x1v_tensor_p2.c @@ -6,17 +6,23 @@ GKYL_CU_DH void mom_bcorr_lbo_vlasov_pkpm_1x1v_tensor_p2(const int *idx, enum gk // dxv[2]: cell length in each direction. // mass: species mass. // fIn[9]: distribution function at lower/upper velocity boundaries. - // out: int dS of vf^(vmax)_(vmin). + // out: int dS of f^(vmax)_(vmin) and vf^(vmax)_(vmin). if (edge == GKYL_VX_LOWER) { - out[0] += vBoundary[0]*((-1.58113883008419*fIn[5])+1.224744871391589*fIn[2]-0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[0]*((-1.58113883008419*fIn[7])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[0]*((-1.58113883008419*fIn[8])+1.224744871391589*fIn[6]-0.7071067811865475*fIn[4])*mass; + out[0] += ((-1.58113883008419*fIn[5])+1.224744871391589*fIn[2]-0.7071067811865475*fIn[0])*mass; + out[1] += ((-1.58113883008419*fIn[7])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[1])*mass; + out[2] += ((-1.58113883008419*fIn[8])+1.224744871391589*fIn[6]-0.7071067811865475*fIn[4])*mass; + out[3] += out[0]*vBoundary[0]; + out[4] += vBoundary[0]*out[1]; + out[5] += vBoundary[0]*out[2]; } else if (edge == GKYL_VX_UPPER) { - out[0] += vBoundary[1]*(1.58113883008419*fIn[5]+1.224744871391589*fIn[2]+0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[1]*(1.58113883008419*fIn[7]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[1]*(1.58113883008419*fIn[8]+1.224744871391589*fIn[6]+0.7071067811865475*fIn[4])*mass; + out[0] += (1.58113883008419*fIn[5]+1.224744871391589*fIn[2]+0.7071067811865475*fIn[0])*mass; + out[1] += (1.58113883008419*fIn[7]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[1])*mass; + out[2] += (1.58113883008419*fIn[8]+1.224744871391589*fIn[6]+0.7071067811865475*fIn[4])*mass; + out[3] += out[0]*vBoundary[1]; + out[4] += out[1]*vBoundary[1]; + out[5] += vBoundary[1]*out[2]; } } diff --git a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_2x1v_ser_p1.c b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_2x1v_ser_p1.c index 9c279f808..de335ac94 100644 --- a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_2x1v_ser_p1.c +++ b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_2x1v_ser_p1.c @@ -6,19 +6,27 @@ GKYL_CU_DH void mom_bcorr_lbo_vlasov_pkpm_2x1v_ser_p1(const int *idx, enum gkyl_ // dxv[3]: cell length in each direction. // mass: species mass. // fIn[12]: distribution function at lower/upper velocity boundaries. - // out: int dS of vf^(vmax)_(vmin). + // out: int dS of f^(vmax)_(vmin) and vf^(vmax)_(vmin). if (edge == GKYL_VX_LOWER) { - out[0] += vBoundary[0]*((-1.58113883008419*fIn[8])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[0]*((-1.58113883008419*fIn[9])+1.224744871391589*fIn[5]-0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[0]*((-1.58113883008419*fIn[10])+1.224744871391589*fIn[6]-0.7071067811865475*fIn[2])*mass; - out[3] += vBoundary[0]*((-1.58113883008419*fIn[11])+1.224744871391589*fIn[7]-0.7071067811865475*fIn[4])*mass; + out[0] += ((-1.58113883008419*fIn[8])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[0])*mass; + out[1] += ((-1.58113883008419*fIn[9])+1.224744871391589*fIn[5]-0.7071067811865475*fIn[1])*mass; + out[2] += ((-1.58113883008419*fIn[10])+1.224744871391589*fIn[6]-0.7071067811865475*fIn[2])*mass; + out[3] += ((-1.58113883008419*fIn[11])+1.224744871391589*fIn[7]-0.7071067811865475*fIn[4])*mass; + out[4] += out[0]*vBoundary[0]; + out[5] += vBoundary[0]*out[1]; + out[6] += vBoundary[0]*out[2]; + out[7] += vBoundary[0]*out[3]; } else if (edge == GKYL_VX_UPPER) { - out[0] += vBoundary[1]*(1.58113883008419*fIn[8]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[1]*(1.58113883008419*fIn[9]+1.224744871391589*fIn[5]+0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[1]*(1.58113883008419*fIn[10]+1.224744871391589*fIn[6]+0.7071067811865475*fIn[2])*mass; - out[3] += vBoundary[1]*(1.58113883008419*fIn[11]+1.224744871391589*fIn[7]+0.7071067811865475*fIn[4])*mass; + out[0] += (1.58113883008419*fIn[8]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[0])*mass; + out[1] += (1.58113883008419*fIn[9]+1.224744871391589*fIn[5]+0.7071067811865475*fIn[1])*mass; + out[2] += (1.58113883008419*fIn[10]+1.224744871391589*fIn[6]+0.7071067811865475*fIn[2])*mass; + out[3] += (1.58113883008419*fIn[11]+1.224744871391589*fIn[7]+0.7071067811865475*fIn[4])*mass; + out[4] += out[0]*vBoundary[1]; + out[5] += out[1]*vBoundary[1]; + out[6] += vBoundary[1]*out[2]; + out[7] += vBoundary[1]*out[3]; } } diff --git a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_2x1v_tensor_p2.c b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_2x1v_tensor_p2.c index 9b73bc7ae..549fc9ec2 100644 --- a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_2x1v_tensor_p2.c +++ b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_2x1v_tensor_p2.c @@ -6,29 +6,47 @@ GKYL_CU_DH void mom_bcorr_lbo_vlasov_pkpm_2x1v_tensor_p2(const int *idx, enum gk // dxv[3]: cell length in each direction. // mass: species mass. // fIn[27]: distribution function at lower/upper velocity boundaries. - // out: int dS of vf^(vmax)_(vmin). + // out: int dS of f^(vmax)_(vmin) and vf^(vmax)_(vmin). if (edge == GKYL_VX_LOWER) { - out[0] += vBoundary[0]*((-1.58113883008419*fIn[9])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[0]*((-1.58113883008419*fIn[15])+1.224744871391589*fIn[5]-0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[0]*((-1.58113883008419*fIn[16])+1.224744871391589*fIn[6]-0.7071067811865475*fIn[2])*mass; - out[3] += vBoundary[0]*((-1.58113883008419*fIn[19])+1.224744871391589*fIn[10]-0.7071067811865475*fIn[4])*mass; - out[4] += vBoundary[0]*((-1.58113883008419*fIn[21])+1.224744871391589*fIn[13]-0.7071067811865475*fIn[7])*mass; - out[5] += vBoundary[0]*((-1.58113883008419*fIn[22])+1.224744871391589*fIn[14]-0.7071067811865475*fIn[8])*mass; - out[6] += vBoundary[0]*((-1.58113883008419*fIn[24])+1.224744871391589*fIn[17]-0.7071067811865475*fIn[11])*mass; - out[7] += vBoundary[0]*((-1.58113883008419*fIn[25])+1.224744871391589*fIn[18]-0.7071067811865475*fIn[12])*mass; - out[8] += vBoundary[0]*((-1.58113883008419*fIn[26])+1.224744871391589*fIn[23]-0.7071067811865475*fIn[20])*mass; + out[0] += ((-1.58113883008419*fIn[9])+1.224744871391589*fIn[3]-0.7071067811865475*fIn[0])*mass; + out[1] += ((-1.58113883008419*fIn[15])+1.224744871391589*fIn[5]-0.7071067811865475*fIn[1])*mass; + out[2] += ((-1.58113883008419*fIn[16])+1.224744871391589*fIn[6]-0.7071067811865475*fIn[2])*mass; + out[3] += ((-1.58113883008419*fIn[19])+1.224744871391589*fIn[10]-0.7071067811865475*fIn[4])*mass; + out[4] += ((-1.58113883008419*fIn[21])+1.224744871391589*fIn[13]-0.7071067811865475*fIn[7])*mass; + out[5] += ((-1.58113883008419*fIn[22])+1.224744871391589*fIn[14]-0.7071067811865475*fIn[8])*mass; + out[6] += ((-1.58113883008419*fIn[24])+1.224744871391589*fIn[17]-0.7071067811865475*fIn[11])*mass; + out[7] += ((-1.58113883008419*fIn[25])+1.224744871391589*fIn[18]-0.7071067811865475*fIn[12])*mass; + out[8] += ((-1.58113883008419*fIn[26])+1.224744871391589*fIn[23]-0.7071067811865475*fIn[20])*mass; + out[9] += out[0]*vBoundary[0]; + out[10] += vBoundary[0]*out[1]; + out[11] += vBoundary[0]*out[2]; + out[12] += vBoundary[0]*out[3]; + out[13] += vBoundary[0]*out[4]; + out[14] += vBoundary[0]*out[5]; + out[15] += vBoundary[0]*out[6]; + out[16] += vBoundary[0]*out[7]; + out[17] += vBoundary[0]*out[8]; } else if (edge == GKYL_VX_UPPER) { - out[0] += vBoundary[1]*(1.58113883008419*fIn[9]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[1]*(1.58113883008419*fIn[15]+1.224744871391589*fIn[5]+0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[1]*(1.58113883008419*fIn[16]+1.224744871391589*fIn[6]+0.7071067811865475*fIn[2])*mass; - out[3] += vBoundary[1]*(1.58113883008419*fIn[19]+1.224744871391589*fIn[10]+0.7071067811865475*fIn[4])*mass; - out[4] += vBoundary[1]*(1.58113883008419*fIn[21]+1.224744871391589*fIn[13]+0.7071067811865475*fIn[7])*mass; - out[5] += vBoundary[1]*(1.58113883008419*fIn[22]+1.224744871391589*fIn[14]+0.7071067811865475*fIn[8])*mass; - out[6] += vBoundary[1]*(1.58113883008419*fIn[24]+1.224744871391589*fIn[17]+0.7071067811865475*fIn[11])*mass; - out[7] += vBoundary[1]*(1.58113883008419*fIn[25]+1.224744871391589*fIn[18]+0.7071067811865475*fIn[12])*mass; - out[8] += vBoundary[1]*(1.58113883008419*fIn[26]+1.224744871391589*fIn[23]+0.7071067811865475*fIn[20])*mass; + out[0] += (1.58113883008419*fIn[9]+1.224744871391589*fIn[3]+0.7071067811865475*fIn[0])*mass; + out[1] += (1.58113883008419*fIn[15]+1.224744871391589*fIn[5]+0.7071067811865475*fIn[1])*mass; + out[2] += (1.58113883008419*fIn[16]+1.224744871391589*fIn[6]+0.7071067811865475*fIn[2])*mass; + out[3] += (1.58113883008419*fIn[19]+1.224744871391589*fIn[10]+0.7071067811865475*fIn[4])*mass; + out[4] += (1.58113883008419*fIn[21]+1.224744871391589*fIn[13]+0.7071067811865475*fIn[7])*mass; + out[5] += (1.58113883008419*fIn[22]+1.224744871391589*fIn[14]+0.7071067811865475*fIn[8])*mass; + out[6] += (1.58113883008419*fIn[24]+1.224744871391589*fIn[17]+0.7071067811865475*fIn[11])*mass; + out[7] += (1.58113883008419*fIn[25]+1.224744871391589*fIn[18]+0.7071067811865475*fIn[12])*mass; + out[8] += (1.58113883008419*fIn[26]+1.224744871391589*fIn[23]+0.7071067811865475*fIn[20])*mass; + out[9] += out[0]*vBoundary[1]; + out[10] += out[1]*vBoundary[1]; + out[11] += vBoundary[1]*out[2]; + out[12] += vBoundary[1]*out[3]; + out[13] += vBoundary[1]*out[4]; + out[14] += vBoundary[1]*out[5]; + out[15] += vBoundary[1]*out[6]; + out[16] += vBoundary[1]*out[7]; + out[17] += vBoundary[1]*out[8]; } } diff --git a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_3x1v_ser_p1.c b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_3x1v_ser_p1.c index c8e5034f9..12f8bfcd0 100644 --- a/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_3x1v_ser_p1.c +++ b/kernels/pkpm/mom_bcorr_lbo_vlasov_pkpm_3x1v_ser_p1.c @@ -6,27 +6,43 @@ GKYL_CU_DH void mom_bcorr_lbo_vlasov_pkpm_3x1v_ser_p1(const int *idx, enum gkyl_ // dxv[4]: cell length in each direction. // mass: species mass. // fIn[24]: distribution function at lower/upper velocity boundaries. - // out: int dS of vf^(vmax)_(vmin). + // out: int dS of f^(vmax)_(vmin) and vf^(vmax)_(vmin). if (edge == GKYL_VX_LOWER) { - out[0] += vBoundary[0]*((-1.58113883008419*fIn[16])+1.224744871391589*fIn[4]-0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[0]*((-1.58113883008419*fIn[17])+1.224744871391589*fIn[8]-0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[0]*((-1.58113883008419*fIn[18])+1.224744871391589*fIn[9]-0.7071067811865475*fIn[2])*mass; - out[3] += vBoundary[0]*((-1.58113883008419*fIn[19])+1.224744871391589*fIn[10]-0.7071067811865475*fIn[3])*mass; - out[4] += vBoundary[0]*((-1.58113883008419*fIn[20])+1.224744871391589*fIn[12]-0.7071067811865475*fIn[5])*mass; - out[5] += vBoundary[0]*((-1.58113883008419*fIn[21])+1.224744871391589*fIn[13]-0.7071067811865475*fIn[6])*mass; - out[6] += vBoundary[0]*((-1.58113883008419*fIn[22])+1.224744871391589*fIn[14]-0.7071067811865475*fIn[7])*mass; - out[7] += vBoundary[0]*((-1.58113883008419*fIn[23])+1.224744871391589*fIn[15]-0.7071067811865475*fIn[11])*mass; + out[0] += ((-1.58113883008419*fIn[16])+1.224744871391589*fIn[4]-0.7071067811865475*fIn[0])*mass; + out[1] += ((-1.58113883008419*fIn[17])+1.224744871391589*fIn[8]-0.7071067811865475*fIn[1])*mass; + out[2] += ((-1.58113883008419*fIn[18])+1.224744871391589*fIn[9]-0.7071067811865475*fIn[2])*mass; + out[3] += ((-1.58113883008419*fIn[19])+1.224744871391589*fIn[10]-0.7071067811865475*fIn[3])*mass; + out[4] += ((-1.58113883008419*fIn[20])+1.224744871391589*fIn[12]-0.7071067811865475*fIn[5])*mass; + out[5] += ((-1.58113883008419*fIn[21])+1.224744871391589*fIn[13]-0.7071067811865475*fIn[6])*mass; + out[6] += ((-1.58113883008419*fIn[22])+1.224744871391589*fIn[14]-0.7071067811865475*fIn[7])*mass; + out[7] += ((-1.58113883008419*fIn[23])+1.224744871391589*fIn[15]-0.7071067811865475*fIn[11])*mass; + out[8] += out[0]*vBoundary[0]; + out[9] += vBoundary[0]*out[1]; + out[10] += vBoundary[0]*out[2]; + out[11] += vBoundary[0]*out[3]; + out[12] += vBoundary[0]*out[4]; + out[13] += vBoundary[0]*out[5]; + out[14] += vBoundary[0]*out[6]; + out[15] += vBoundary[0]*out[7]; } else if (edge == GKYL_VX_UPPER) { - out[0] += vBoundary[1]*(1.58113883008419*fIn[16]+1.224744871391589*fIn[4]+0.7071067811865475*fIn[0])*mass; - out[1] += vBoundary[1]*(1.58113883008419*fIn[17]+1.224744871391589*fIn[8]+0.7071067811865475*fIn[1])*mass; - out[2] += vBoundary[1]*(1.58113883008419*fIn[18]+1.224744871391589*fIn[9]+0.7071067811865475*fIn[2])*mass; - out[3] += vBoundary[1]*(1.58113883008419*fIn[19]+1.224744871391589*fIn[10]+0.7071067811865475*fIn[3])*mass; - out[4] += vBoundary[1]*(1.58113883008419*fIn[20]+1.224744871391589*fIn[12]+0.7071067811865475*fIn[5])*mass; - out[5] += vBoundary[1]*(1.58113883008419*fIn[21]+1.224744871391589*fIn[13]+0.7071067811865475*fIn[6])*mass; - out[6] += vBoundary[1]*(1.58113883008419*fIn[22]+1.224744871391589*fIn[14]+0.7071067811865475*fIn[7])*mass; - out[7] += vBoundary[1]*(1.58113883008419*fIn[23]+1.224744871391589*fIn[15]+0.7071067811865475*fIn[11])*mass; + out[0] += (1.58113883008419*fIn[16]+1.224744871391589*fIn[4]+0.7071067811865475*fIn[0])*mass; + out[1] += (1.58113883008419*fIn[17]+1.224744871391589*fIn[8]+0.7071067811865475*fIn[1])*mass; + out[2] += (1.58113883008419*fIn[18]+1.224744871391589*fIn[9]+0.7071067811865475*fIn[2])*mass; + out[3] += (1.58113883008419*fIn[19]+1.224744871391589*fIn[10]+0.7071067811865475*fIn[3])*mass; + out[4] += (1.58113883008419*fIn[20]+1.224744871391589*fIn[12]+0.7071067811865475*fIn[5])*mass; + out[5] += (1.58113883008419*fIn[21]+1.224744871391589*fIn[13]+0.7071067811865475*fIn[6])*mass; + out[6] += (1.58113883008419*fIn[22]+1.224744871391589*fIn[14]+0.7071067811865475*fIn[7])*mass; + out[7] += (1.58113883008419*fIn[23]+1.224744871391589*fIn[15]+0.7071067811865475*fIn[11])*mass; + out[8] += out[0]*vBoundary[1]; + out[9] += out[1]*vBoundary[1]; + out[10] += vBoundary[1]*out[2]; + out[11] += vBoundary[1]*out[3]; + out[12] += vBoundary[1]*out[4]; + out[13] += vBoundary[1]*out[5]; + out[14] += vBoundary[1]*out[6]; + out[15] += vBoundary[1]*out[7]; } } diff --git a/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c b/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c index 98347da3c..00b684106 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c +++ b/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p1.c @@ -13,6 +13,8 @@ GKYL_CU_DH void mom_vlasov_pkpm_1x1v_ser_p1(const double *w, const double *dxv, out[3] += mass*volFact*(1.414213562373095*F_0[1]*wvpar_sq+0.8164965809277261*F_0[3]*dvpar*wvpar+0.105409255338946*F_0[5]*dvpar_sq+0.1178511301977579*F_0[1]*dvpar_sq); out[4] += 1.414213562373095*G_1[0]*mass*volFact; out[5] += 1.414213562373095*G_1[1]*mass*volFact; + out[6] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[2]*dvpar); + out[7] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[3]*dvpar); } GKYL_CU_DH void mom_vlasov_pkpm_diag_1x1v_ser_p1(const double *w, const double *dxv, const int *idx, double mass, const double *f, double* GKYL_RESTRICT out) { diff --git a/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c b/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c index 4c6e5a5a6..45f2f514d 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c +++ b/kernels/pkpm/mom_vlasov_pkpm_1x1v_ser_p2.c @@ -16,6 +16,9 @@ GKYL_CU_DH void mom_vlasov_pkpm_1x1v_ser_p2(const double *w, const double *dxv, out[6] += 1.414213562373095*G_1[0]*mass*volFact; out[7] += 1.414213562373095*G_1[1]*mass*volFact; out[8] += 1.414213562373095*G_1[4]*mass*volFact; + out[9] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[2]*dvpar); + out[10] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[3]*dvpar); + out[11] += mass*volFact*(1.414213562373095*F_0[4]*wvpar+0.408248290463863*F_0[6]*dvpar); } GKYL_CU_DH void mom_vlasov_pkpm_diag_1x1v_ser_p2(const double *w, const double *dxv, const int *idx, double mass, const double *f, double* GKYL_RESTRICT out) { diff --git a/kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c b/kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c index cb633c929..1a6e2c9ef 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c +++ b/kernels/pkpm/mom_vlasov_pkpm_1x1v_tensor_p2.c @@ -16,6 +16,9 @@ GKYL_CU_DH void mom_vlasov_pkpm_1x1v_tensor_p2(const double *w, const double *dx out[6] += 1.414213562373095*G_1[0]*mass*volFact; out[7] += 1.414213562373095*G_1[1]*mass*volFact; out[8] += 1.414213562373095*G_1[4]*mass*volFact; + out[9] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[2]*dvpar); + out[10] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[3]*dvpar); + out[11] += mass*volFact*(1.414213562373095*F_0[4]*wvpar+0.408248290463863*F_0[6]*dvpar); } GKYL_CU_DH void mom_vlasov_pkpm_diag_1x1v_tensor_p2(const double *w, const double *dxv, const int *idx, double mass, const double *f, double* GKYL_RESTRICT out) { diff --git a/kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c b/kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c index 76dda887d..289e3b50b 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c +++ b/kernels/pkpm/mom_vlasov_pkpm_2x1v_ser_p1.c @@ -19,6 +19,10 @@ GKYL_CU_DH void mom_vlasov_pkpm_2x1v_ser_p1(const double *w, const double *dxv, out[9] += 1.414213562373095*G_1[1]*mass*volFact; out[10] += 1.414213562373095*G_1[2]*mass*volFact; out[11] += 1.414213562373095*G_1[4]*mass*volFact; + out[12] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[3]*dvpar); + out[13] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[5]*dvpar); + out[14] += mass*volFact*(1.414213562373095*F_0[2]*wvpar+0.408248290463863*F_0[6]*dvpar); + out[15] += mass*volFact*(1.414213562373095*F_0[4]*wvpar+0.408248290463863*F_0[7]*dvpar); } GKYL_CU_DH void mom_vlasov_pkpm_diag_2x1v_ser_p1(const double *w, const double *dxv, const int *idx, double mass, const double *f, double* GKYL_RESTRICT out) { diff --git a/kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c b/kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c index 8b1290b71..d3c7a0c89 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c +++ b/kernels/pkpm/mom_vlasov_pkpm_2x1v_tensor_p2.c @@ -34,6 +34,15 @@ GKYL_CU_DH void mom_vlasov_pkpm_2x1v_tensor_p2(const double *w, const double *dx out[24] += 1.414213562373095*G_1[11]*mass*volFact; out[25] += 1.414213562373095*G_1[12]*mass*volFact; out[26] += 1.414213562373095*G_1[20]*mass*volFact; + out[27] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[3]*dvpar); + out[28] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[5]*dvpar); + out[29] += mass*volFact*(1.414213562373095*F_0[2]*wvpar+0.408248290463863*F_0[6]*dvpar); + out[30] += mass*volFact*(1.414213562373095*F_0[4]*wvpar+0.408248290463863*F_0[10]*dvpar); + out[31] += mass*volFact*(1.414213562373095*F_0[7]*wvpar+0.408248290463863*F_0[13]*dvpar); + out[32] += mass*volFact*(1.414213562373095*F_0[8]*wvpar+0.408248290463863*F_0[14]*dvpar); + out[33] += mass*volFact*(1.414213562373095*F_0[11]*wvpar+0.408248290463863*F_0[17]*dvpar); + out[34] += mass*volFact*(1.414213562373095*F_0[12]*wvpar+0.408248290463863*F_0[18]*dvpar); + out[35] += mass*volFact*(1.414213562373095*F_0[20]*wvpar+0.408248290463863*F_0[23]*dvpar); } GKYL_CU_DH void mom_vlasov_pkpm_diag_2x1v_tensor_p2(const double *w, const double *dxv, const int *idx, double mass, const double *f, double* GKYL_RESTRICT out) { diff --git a/kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c b/kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c index c33dcd069..0d3f7be56 100644 --- a/kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c +++ b/kernels/pkpm/mom_vlasov_pkpm_3x1v_ser_p1.c @@ -31,6 +31,14 @@ GKYL_CU_DH void mom_vlasov_pkpm_3x1v_ser_p1(const double *w, const double *dxv, out[21] += 1.414213562373095*G_1[6]*mass*volFact; out[22] += 1.414213562373095*G_1[7]*mass*volFact; out[23] += 1.414213562373095*G_1[11]*mass*volFact; + out[24] += mass*volFact*(1.414213562373095*F_0[0]*wvpar+0.408248290463863*F_0[4]*dvpar); + out[25] += mass*volFact*(1.414213562373095*F_0[1]*wvpar+0.408248290463863*F_0[8]*dvpar); + out[26] += mass*volFact*(1.414213562373095*F_0[2]*wvpar+0.408248290463863*F_0[9]*dvpar); + out[27] += mass*volFact*(1.414213562373095*F_0[3]*wvpar+0.408248290463863*F_0[10]*dvpar); + out[28] += mass*volFact*(1.414213562373095*F_0[5]*wvpar+0.408248290463863*F_0[12]*dvpar); + out[29] += mass*volFact*(1.414213562373095*F_0[6]*wvpar+0.408248290463863*F_0[13]*dvpar); + out[30] += mass*volFact*(1.414213562373095*F_0[7]*wvpar+0.408248290463863*F_0[14]*dvpar); + out[31] += mass*volFact*(1.414213562373095*F_0[11]*wvpar+0.408248290463863*F_0[15]*dvpar); } GKYL_CU_DH void mom_vlasov_pkpm_diag_3x1v_ser_p1(const double *w, const double *dxv, const int *idx, double mass, const double *f, double* GKYL_RESTRICT out) { diff --git a/kernels/pkpm/pkpm_dist_mirror_force_1x1v_ser_p1.c b/kernels/pkpm/pkpm_dist_mirror_force_1x1v_ser_p1.c index e3aa094d5..8a35c8e06 100644 --- a/kernels/pkpm/pkpm_dist_mirror_force_1x1v_ser_p1.c +++ b/kernels/pkpm/pkpm_dist_mirror_force_1x1v_ser_p1.c @@ -1,22 +1,22 @@ #include GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_ser_p1(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1) { - // w[NDIM]: Cell-center coordinates. - // dxv[NDIM]: Cell spacing. - // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. - // nu_vthsq: Input nu*vth^2. - // div_b: Input volume expansion of div(b). - // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. - // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. - // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. - // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), - // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. - // First output is mirror force source, second output is vperp characteristics source. - // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // nu_prim_moms_sum: Input sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // div_b: Input volume expansion of div(b). + // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. + // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. + // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. + // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), + // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. + // First output is mirror force source, second output is vperp characteristics source. + // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. const double dvpar = dxv[1], wvpar = w[1]; const double *T_perp_over_m = &pkpm_prim[8]; @@ -35,6 +35,8 @@ GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_ser_p1(const double *w, const double const double *G_1 = &f[6]; const double *F_2 = &F_k_p_1[0]; + const double *nu_vtsq_sum = &nu_prim_moms_sum[2]; + double *out_G_1_mirror = &g_dist_source[0]; double *out_G_1_vperp = &g_dist_source[6]; double *out_F_1 = &F_k_m_1[0]; @@ -72,12 +74,12 @@ GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_ser_p1(const double *w, const double out_G_1_mirror[4] = 1.414213562373095*T_perp_over_m[1]*tmp_T_perp_g_dist[5]+1.414213562373095*T_perp_over_m[0]*tmp_T_perp_g_dist[4]; out_G_1_mirror[5] = 1.414213562373095*T_perp_over_m[0]*tmp_T_perp_g_dist[5]+1.414213562373095*T_perp_over_m[1]*tmp_T_perp_g_dist[4]; - out_G_1_vperp[0] = 0.5*G_1[3]*alpha_G_1_source[3]+0.5*G_1[2]*alpha_G_1_source[2]+1.414213562373095*F_0[1]*nu_vthsq[1]+0.5*G_1[1]*alpha_G_1_source[1]+1.414213562373095*F_0[0]*nu_vthsq[0]+0.5*G_1[0]*alpha_G_1_source[0]; - out_G_1_vperp[1] = 0.5*G_1[2]*alpha_G_1_source[3]+0.5*alpha_G_1_source[2]*G_1[3]+1.414213562373095*F_0[0]*nu_vthsq[1]+0.5*G_1[0]*alpha_G_1_source[1]+0.5*alpha_G_1_source[0]*G_1[1]+1.414213562373095*nu_vthsq[0]*F_0[1]; - out_G_1_vperp[2] = 0.447213595499958*alpha_G_1_source[3]*G_1[5]+0.4472135954999579*alpha_G_1_source[2]*G_1[4]+0.5*G_1[1]*alpha_G_1_source[3]+0.5*alpha_G_1_source[1]*G_1[3]+1.414213562373095*nu_vthsq[1]*F_0[3]+0.5*G_1[0]*alpha_G_1_source[2]+0.5*alpha_G_1_source[0]*G_1[2]+1.414213562373095*nu_vthsq[0]*F_0[2]; - out_G_1_vperp[3] = 0.447213595499958*alpha_G_1_source[2]*G_1[5]+0.4472135954999579*alpha_G_1_source[3]*G_1[4]+0.5*G_1[0]*alpha_G_1_source[3]+0.5*alpha_G_1_source[0]*G_1[3]+1.414213562373095*nu_vthsq[0]*F_0[3]+0.5*G_1[1]*alpha_G_1_source[2]+0.5*alpha_G_1_source[1]*G_1[2]+1.414213562373095*nu_vthsq[1]*F_0[2]; - out_G_1_vperp[4] = 0.5000000000000001*alpha_G_1_source[1]*G_1[5]+1.414213562373095*nu_vthsq[1]*F_0[5]+0.5*alpha_G_1_source[0]*G_1[4]+1.414213562373095*nu_vthsq[0]*F_0[4]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+0.4472135954999579*G_1[2]*alpha_G_1_source[2]; - out_G_1_vperp[5] = 0.5*alpha_G_1_source[0]*G_1[5]+1.414213562373095*nu_vthsq[0]*F_0[5]+0.5000000000000001*alpha_G_1_source[1]*G_1[4]+1.414213562373095*nu_vthsq[1]*F_0[4]+0.447213595499958*G_1[2]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[2]*G_1[3]; + out_G_1_vperp[0] = 0.5*G_1[3]*alpha_G_1_source[3]+0.5*G_1[2]*alpha_G_1_source[2]+1.414213562373095*F_0[1]*nu_vtsq_sum[1]+0.5*G_1[1]*alpha_G_1_source[1]+1.414213562373095*F_0[0]*nu_vtsq_sum[0]+0.5*G_1[0]*alpha_G_1_source[0]; + out_G_1_vperp[1] = 0.5*G_1[2]*alpha_G_1_source[3]+0.5*alpha_G_1_source[2]*G_1[3]+1.414213562373095*F_0[0]*nu_vtsq_sum[1]+0.5*G_1[0]*alpha_G_1_source[1]+0.5*alpha_G_1_source[0]*G_1[1]+1.414213562373095*nu_vtsq_sum[0]*F_0[1]; + out_G_1_vperp[2] = 0.447213595499958*alpha_G_1_source[3]*G_1[5]+0.4472135954999579*alpha_G_1_source[2]*G_1[4]+0.5*G_1[1]*alpha_G_1_source[3]+0.5*alpha_G_1_source[1]*G_1[3]+1.414213562373095*nu_vtsq_sum[1]*F_0[3]+0.5*G_1[0]*alpha_G_1_source[2]+0.5*alpha_G_1_source[0]*G_1[2]+1.414213562373095*nu_vtsq_sum[0]*F_0[2]; + out_G_1_vperp[3] = 0.447213595499958*alpha_G_1_source[2]*G_1[5]+0.4472135954999579*alpha_G_1_source[3]*G_1[4]+0.5*G_1[0]*alpha_G_1_source[3]+0.5*alpha_G_1_source[0]*G_1[3]+1.414213562373095*nu_vtsq_sum[0]*F_0[3]+0.5*G_1[1]*alpha_G_1_source[2]+0.5*alpha_G_1_source[1]*G_1[2]+1.414213562373095*nu_vtsq_sum[1]*F_0[2]; + out_G_1_vperp[4] = 0.5000000000000001*alpha_G_1_source[1]*G_1[5]+1.414213562373095*nu_vtsq_sum[1]*F_0[5]+0.5*alpha_G_1_source[0]*G_1[4]+1.414213562373095*nu_vtsq_sum[0]*F_0[4]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+0.4472135954999579*G_1[2]*alpha_G_1_source[2]; + out_G_1_vperp[5] = 0.5*alpha_G_1_source[0]*G_1[5]+1.414213562373095*nu_vtsq_sum[0]*F_0[5]+0.5000000000000001*alpha_G_1_source[1]*G_1[4]+1.414213562373095*nu_vtsq_sum[1]*F_0[4]+0.447213595499958*G_1[2]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[2]*G_1[3]; tmp_F_0_m_F_1[0] = 0.7071067811865475*G_1[1]*T_perp_over_m_inv[1]+0.7071067811865475*G_1[0]*T_perp_over_m_inv[0]; tmp_F_0_m_F_1[1] = 0.7071067811865475*G_1[0]*T_perp_over_m_inv[1]+0.7071067811865475*T_perp_over_m_inv[0]*G_1[1]; diff --git a/kernels/pkpm/pkpm_dist_mirror_force_1x1v_ser_p2.c b/kernels/pkpm/pkpm_dist_mirror_force_1x1v_ser_p2.c index 006c2f08d..b95552e29 100644 --- a/kernels/pkpm/pkpm_dist_mirror_force_1x1v_ser_p2.c +++ b/kernels/pkpm/pkpm_dist_mirror_force_1x1v_ser_p2.c @@ -1,22 +1,22 @@ #include GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_ser_p2(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1) { - // w[NDIM]: Cell-center coordinates. - // dxv[NDIM]: Cell spacing. - // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. - // nu_vthsq: Input nu*vth^2. - // div_b: Input volume expansion of div(b). - // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. - // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. - // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. - // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), - // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. - // First output is mirror force source, second output is vperp characteristics source. - // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // nu_prim_moms_sum: Input sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // div_b: Input volume expansion of div(b). + // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. + // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. + // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. + // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), + // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. + // First output is mirror force source, second output is vperp characteristics source. + // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. const double dvpar = dxv[1], wvpar = w[1]; const double *T_perp_over_m = &pkpm_prim[12]; @@ -37,6 +37,8 @@ GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_ser_p2(const double *w, const double const double *G_1 = &f[8]; const double *F_2 = &F_k_p_1[0]; + const double *nu_vtsq_sum = &nu_prim_moms_sum[3]; + double *out_G_1_mirror = &g_dist_source[0]; double *out_G_1_vperp = &g_dist_source[8]; double *out_F_1 = &F_k_m_1[0]; @@ -82,14 +84,14 @@ GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_ser_p2(const double *w, const double out_G_1_mirror[6] = 0.9035079029052515*T_perp_over_m[2]*tmp_T_perp_g_dist[6]+1.414213562373095*T_perp_over_m[0]*tmp_T_perp_g_dist[6]+1.264911064067352*T_perp_over_m[1]*tmp_T_perp_g_dist[3]+1.414213562373095*T_perp_over_m[2]*tmp_T_perp_g_dist[2]; out_G_1_mirror[7] = 1.264911064067352*T_perp_over_m[2]*tmp_T_perp_g_dist[7]+1.414213562373095*T_perp_over_m[0]*tmp_T_perp_g_dist[7]+1.414213562373095*T_perp_over_m[1]*tmp_T_perp_g_dist[5]; - out_G_1_vperp[0] = 0.5*G_1[6]*alpha_G_1_source[6]+0.5*G_1[4]*alpha_G_1_source[4]+1.414213562373095*nu_vthsq[2]*F_0[4]+0.5*G_1[3]*alpha_G_1_source[3]+0.5*G_1[2]*alpha_G_1_source[2]+1.414213562373095*F_0[1]*nu_vthsq[1]+0.5*G_1[1]*alpha_G_1_source[1]+1.414213562373095*F_0[0]*nu_vthsq[0]+0.5*G_1[0]*alpha_G_1_source[0]; - out_G_1_vperp[1] = 0.447213595499958*G_1[3]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[3]*G_1[6]+0.4472135954999579*G_1[1]*alpha_G_1_source[4]+0.4472135954999579*alpha_G_1_source[1]*G_1[4]+1.264911064067352*nu_vthsq[1]*F_0[4]+0.5*G_1[2]*alpha_G_1_source[3]+0.5*alpha_G_1_source[2]*G_1[3]+1.264911064067352*F_0[1]*nu_vthsq[2]+1.414213562373095*F_0[0]*nu_vthsq[1]+0.5*G_1[0]*alpha_G_1_source[1]+0.5*alpha_G_1_source[0]*G_1[1]+1.414213562373095*nu_vthsq[0]*F_0[1]; - out_G_1_vperp[2] = 0.447213595499958*alpha_G_1_source[3]*G_1[7]+0.5000000000000001*G_1[4]*alpha_G_1_source[6]+0.5000000000000001*alpha_G_1_source[4]*G_1[6]+1.414213562373095*nu_vthsq[2]*F_0[6]+0.4472135954999579*alpha_G_1_source[2]*G_1[5]+0.5*G_1[1]*alpha_G_1_source[3]+0.5*alpha_G_1_source[1]*G_1[3]+1.414213562373095*nu_vthsq[1]*F_0[3]+0.5*G_1[0]*alpha_G_1_source[2]+0.5*alpha_G_1_source[0]*G_1[2]+1.414213562373095*nu_vthsq[0]*F_0[2]; - out_G_1_vperp[3] = 0.4*alpha_G_1_source[6]*G_1[7]+0.447213595499958*alpha_G_1_source[2]*G_1[7]+0.447213595499958*G_1[1]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[1]*G_1[6]+1.264911064067352*nu_vthsq[1]*F_0[6]+0.4472135954999579*alpha_G_1_source[3]*G_1[5]+0.4472135954999579*G_1[3]*alpha_G_1_source[4]+0.4472135954999579*alpha_G_1_source[3]*G_1[4]+0.5*G_1[0]*alpha_G_1_source[3]+0.5*alpha_G_1_source[0]*G_1[3]+1.264911064067352*nu_vthsq[2]*F_0[3]+1.414213562373095*nu_vthsq[0]*F_0[3]+0.5*G_1[1]*alpha_G_1_source[2]+0.5*alpha_G_1_source[1]*G_1[2]+1.414213562373095*nu_vthsq[1]*F_0[2]; - out_G_1_vperp[4] = 0.31943828249997*G_1[6]*alpha_G_1_source[6]+0.5000000000000001*G_1[2]*alpha_G_1_source[6]+0.5000000000000001*alpha_G_1_source[2]*G_1[6]+0.31943828249997*G_1[4]*alpha_G_1_source[4]+0.5*G_1[0]*alpha_G_1_source[4]+0.5*alpha_G_1_source[0]*G_1[4]+0.9035079029052515*nu_vthsq[2]*F_0[4]+1.414213562373095*nu_vthsq[0]*F_0[4]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+1.414213562373095*F_0[0]*nu_vthsq[2]+1.264911064067352*F_0[1]*nu_vthsq[1]+0.4472135954999579*G_1[1]*alpha_G_1_source[1]; - out_G_1_vperp[5] = 0.5000000000000001*alpha_G_1_source[1]*G_1[7]+1.414213562373095*nu_vthsq[1]*F_0[7]+0.4472135954999579*G_1[6]*alpha_G_1_source[6]+0.5*alpha_G_1_source[0]*G_1[5]+1.414213562373095*nu_vthsq[0]*F_0[5]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+0.4472135954999579*G_1[2]*alpha_G_1_source[2]; - out_G_1_vperp[6] = 0.4*alpha_G_1_source[3]*G_1[7]+0.4472135954999579*G_1[5]*alpha_G_1_source[6]+0.31943828249997*G_1[4]*alpha_G_1_source[6]+0.5*G_1[0]*alpha_G_1_source[6]+0.31943828249997*alpha_G_1_source[4]*G_1[6]+0.5*alpha_G_1_source[0]*G_1[6]+0.9035079029052515*nu_vthsq[2]*F_0[6]+1.414213562373095*nu_vthsq[0]*F_0[6]+0.5000000000000001*G_1[2]*alpha_G_1_source[4]+0.5000000000000001*alpha_G_1_source[2]*G_1[4]+0.447213595499958*G_1[1]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[1]*G_1[3]+1.264911064067352*nu_vthsq[1]*F_0[3]+1.414213562373095*F_0[2]*nu_vthsq[2]; - out_G_1_vperp[7] = 0.4472135954999579*alpha_G_1_source[4]*G_1[7]+0.5*alpha_G_1_source[0]*G_1[7]+1.264911064067352*nu_vthsq[2]*F_0[7]+1.414213562373095*nu_vthsq[0]*F_0[7]+0.4*G_1[3]*alpha_G_1_source[6]+0.4*alpha_G_1_source[3]*G_1[6]+0.5000000000000001*alpha_G_1_source[1]*G_1[5]+1.414213562373095*nu_vthsq[1]*F_0[5]+0.447213595499958*G_1[2]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[2]*G_1[3]; + out_G_1_vperp[0] = 0.5*G_1[6]*alpha_G_1_source[6]+0.5*G_1[4]*alpha_G_1_source[4]+1.414213562373095*nu_vtsq_sum[2]*F_0[4]+0.5*G_1[3]*alpha_G_1_source[3]+0.5*G_1[2]*alpha_G_1_source[2]+1.414213562373095*F_0[1]*nu_vtsq_sum[1]+0.5*G_1[1]*alpha_G_1_source[1]+1.414213562373095*F_0[0]*nu_vtsq_sum[0]+0.5*G_1[0]*alpha_G_1_source[0]; + out_G_1_vperp[1] = 0.447213595499958*G_1[3]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[3]*G_1[6]+0.4472135954999579*G_1[1]*alpha_G_1_source[4]+0.4472135954999579*alpha_G_1_source[1]*G_1[4]+1.264911064067352*nu_vtsq_sum[1]*F_0[4]+0.5*G_1[2]*alpha_G_1_source[3]+0.5*alpha_G_1_source[2]*G_1[3]+1.264911064067352*F_0[1]*nu_vtsq_sum[2]+1.414213562373095*F_0[0]*nu_vtsq_sum[1]+0.5*G_1[0]*alpha_G_1_source[1]+0.5*alpha_G_1_source[0]*G_1[1]+1.414213562373095*nu_vtsq_sum[0]*F_0[1]; + out_G_1_vperp[2] = 0.447213595499958*alpha_G_1_source[3]*G_1[7]+0.5000000000000001*G_1[4]*alpha_G_1_source[6]+0.5000000000000001*alpha_G_1_source[4]*G_1[6]+1.414213562373095*nu_vtsq_sum[2]*F_0[6]+0.4472135954999579*alpha_G_1_source[2]*G_1[5]+0.5*G_1[1]*alpha_G_1_source[3]+0.5*alpha_G_1_source[1]*G_1[3]+1.414213562373095*nu_vtsq_sum[1]*F_0[3]+0.5*G_1[0]*alpha_G_1_source[2]+0.5*alpha_G_1_source[0]*G_1[2]+1.414213562373095*nu_vtsq_sum[0]*F_0[2]; + out_G_1_vperp[3] = 0.4*alpha_G_1_source[6]*G_1[7]+0.447213595499958*alpha_G_1_source[2]*G_1[7]+0.447213595499958*G_1[1]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[1]*G_1[6]+1.264911064067352*nu_vtsq_sum[1]*F_0[6]+0.4472135954999579*alpha_G_1_source[3]*G_1[5]+0.4472135954999579*G_1[3]*alpha_G_1_source[4]+0.4472135954999579*alpha_G_1_source[3]*G_1[4]+0.5*G_1[0]*alpha_G_1_source[3]+0.5*alpha_G_1_source[0]*G_1[3]+1.264911064067352*nu_vtsq_sum[2]*F_0[3]+1.414213562373095*nu_vtsq_sum[0]*F_0[3]+0.5*G_1[1]*alpha_G_1_source[2]+0.5*alpha_G_1_source[1]*G_1[2]+1.414213562373095*nu_vtsq_sum[1]*F_0[2]; + out_G_1_vperp[4] = 0.31943828249997*G_1[6]*alpha_G_1_source[6]+0.5000000000000001*G_1[2]*alpha_G_1_source[6]+0.5000000000000001*alpha_G_1_source[2]*G_1[6]+0.31943828249997*G_1[4]*alpha_G_1_source[4]+0.5*G_1[0]*alpha_G_1_source[4]+0.5*alpha_G_1_source[0]*G_1[4]+0.9035079029052515*nu_vtsq_sum[2]*F_0[4]+1.414213562373095*nu_vtsq_sum[0]*F_0[4]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+1.414213562373095*F_0[0]*nu_vtsq_sum[2]+1.264911064067352*F_0[1]*nu_vtsq_sum[1]+0.4472135954999579*G_1[1]*alpha_G_1_source[1]; + out_G_1_vperp[5] = 0.5000000000000001*alpha_G_1_source[1]*G_1[7]+1.414213562373095*nu_vtsq_sum[1]*F_0[7]+0.4472135954999579*G_1[6]*alpha_G_1_source[6]+0.5*alpha_G_1_source[0]*G_1[5]+1.414213562373095*nu_vtsq_sum[0]*F_0[5]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+0.4472135954999579*G_1[2]*alpha_G_1_source[2]; + out_G_1_vperp[6] = 0.4*alpha_G_1_source[3]*G_1[7]+0.4472135954999579*G_1[5]*alpha_G_1_source[6]+0.31943828249997*G_1[4]*alpha_G_1_source[6]+0.5*G_1[0]*alpha_G_1_source[6]+0.31943828249997*alpha_G_1_source[4]*G_1[6]+0.5*alpha_G_1_source[0]*G_1[6]+0.9035079029052515*nu_vtsq_sum[2]*F_0[6]+1.414213562373095*nu_vtsq_sum[0]*F_0[6]+0.5000000000000001*G_1[2]*alpha_G_1_source[4]+0.5000000000000001*alpha_G_1_source[2]*G_1[4]+0.447213595499958*G_1[1]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[1]*G_1[3]+1.264911064067352*nu_vtsq_sum[1]*F_0[3]+1.414213562373095*F_0[2]*nu_vtsq_sum[2]; + out_G_1_vperp[7] = 0.4472135954999579*alpha_G_1_source[4]*G_1[7]+0.5*alpha_G_1_source[0]*G_1[7]+1.264911064067352*nu_vtsq_sum[2]*F_0[7]+1.414213562373095*nu_vtsq_sum[0]*F_0[7]+0.4*G_1[3]*alpha_G_1_source[6]+0.4*alpha_G_1_source[3]*G_1[6]+0.5000000000000001*alpha_G_1_source[1]*G_1[5]+1.414213562373095*nu_vtsq_sum[1]*F_0[5]+0.447213595499958*G_1[2]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[2]*G_1[3]; tmp_F_0_m_F_1[0] = 0.7071067811865475*T_perp_over_m_inv[2]*G_1[4]+0.7071067811865475*G_1[1]*T_perp_over_m_inv[1]+0.7071067811865475*G_1[0]*T_perp_over_m_inv[0]; tmp_F_0_m_F_1[1] = 0.6324555320336759*T_perp_over_m_inv[1]*G_1[4]+0.6324555320336759*G_1[1]*T_perp_over_m_inv[2]+0.7071067811865475*G_1[0]*T_perp_over_m_inv[1]+0.7071067811865475*T_perp_over_m_inv[0]*G_1[1]; diff --git a/kernels/pkpm/pkpm_dist_mirror_force_1x1v_tensor_p2.c b/kernels/pkpm/pkpm_dist_mirror_force_1x1v_tensor_p2.c index 623b784c2..e888bd72d 100644 --- a/kernels/pkpm/pkpm_dist_mirror_force_1x1v_tensor_p2.c +++ b/kernels/pkpm/pkpm_dist_mirror_force_1x1v_tensor_p2.c @@ -1,22 +1,22 @@ #include GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_tensor_p2(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1) { - // w[NDIM]: Cell-center coordinates. - // dxv[NDIM]: Cell spacing. - // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. - // nu_vthsq: Input nu*vth^2. - // div_b: Input volume expansion of div(b). - // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. - // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. - // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. - // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), - // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. - // First output is mirror force source, second output is vperp characteristics source. - // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // nu_prim_moms_sum: Input sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // div_b: Input volume expansion of div(b). + // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. + // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. + // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. + // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), + // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. + // First output is mirror force source, second output is vperp characteristics source. + // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. const double dvpar = dxv[1], wvpar = w[1]; const double *T_perp_over_m = &pkpm_prim[12]; @@ -37,6 +37,8 @@ GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_tensor_p2(const double *w, const dou const double *G_1 = &f[9]; const double *F_2 = &F_k_p_1[0]; + const double *nu_vtsq_sum = &nu_prim_moms_sum[3]; + double *out_G_1_mirror = &g_dist_source[0]; double *out_G_1_vperp = &g_dist_source[9]; double *out_F_1 = &F_k_m_1[0]; @@ -86,15 +88,15 @@ GKYL_CU_DH void pkpm_dist_mirror_force_1x1v_tensor_p2(const double *w, const dou out_G_1_mirror[7] = 1.264911064067352*T_perp_over_m[1]*tmp_T_perp_g_dist[8]+1.264911064067352*T_perp_over_m[2]*tmp_T_perp_g_dist[7]+1.414213562373095*T_perp_over_m[0]*tmp_T_perp_g_dist[7]+1.414213562373095*T_perp_over_m[1]*tmp_T_perp_g_dist[5]; out_G_1_mirror[8] = 0.9035079029052515*T_perp_over_m[2]*tmp_T_perp_g_dist[8]+1.414213562373095*T_perp_over_m[0]*tmp_T_perp_g_dist[8]+1.264911064067352*T_perp_over_m[1]*tmp_T_perp_g_dist[7]+1.414213562373095*T_perp_over_m[2]*tmp_T_perp_g_dist[5]; - out_G_1_vperp[0] = 0.5*G_1[6]*alpha_G_1_source[6]+0.5*G_1[4]*alpha_G_1_source[4]+1.414213562373095*nu_vthsq[2]*F_0[4]+0.5*G_1[3]*alpha_G_1_source[3]+0.5*G_1[2]*alpha_G_1_source[2]+1.414213562373095*F_0[1]*nu_vthsq[1]+0.5*G_1[1]*alpha_G_1_source[1]+1.414213562373095*F_0[0]*nu_vthsq[0]+0.5*G_1[0]*alpha_G_1_source[0]; - out_G_1_vperp[1] = 0.447213595499958*G_1[3]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[3]*G_1[6]+0.4472135954999579*G_1[1]*alpha_G_1_source[4]+0.4472135954999579*alpha_G_1_source[1]*G_1[4]+1.264911064067352*nu_vthsq[1]*F_0[4]+0.5*G_1[2]*alpha_G_1_source[3]+0.5*alpha_G_1_source[2]*G_1[3]+1.264911064067352*F_0[1]*nu_vthsq[2]+1.414213562373095*F_0[0]*nu_vthsq[1]+0.5*G_1[0]*alpha_G_1_source[1]+0.5*alpha_G_1_source[0]*G_1[1]+1.414213562373095*nu_vthsq[0]*F_0[1]; - out_G_1_vperp[2] = 0.447213595499958*alpha_G_1_source[6]*G_1[8]+0.447213595499958*alpha_G_1_source[3]*G_1[7]+0.5000000000000001*G_1[4]*alpha_G_1_source[6]+0.5000000000000001*alpha_G_1_source[4]*G_1[6]+1.414213562373095*nu_vthsq[2]*F_0[6]+0.4472135954999579*alpha_G_1_source[2]*G_1[5]+0.5*G_1[1]*alpha_G_1_source[3]+0.5*alpha_G_1_source[1]*G_1[3]+1.414213562373095*nu_vthsq[1]*F_0[3]+0.5*G_1[0]*alpha_G_1_source[2]+0.5*alpha_G_1_source[0]*G_1[2]+1.414213562373095*nu_vthsq[0]*F_0[2]; - out_G_1_vperp[3] = 0.4*alpha_G_1_source[3]*G_1[8]+0.4*alpha_G_1_source[6]*G_1[7]+0.447213595499958*alpha_G_1_source[2]*G_1[7]+0.447213595499958*G_1[1]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[1]*G_1[6]+1.264911064067352*nu_vthsq[1]*F_0[6]+0.4472135954999579*alpha_G_1_source[3]*G_1[5]+0.4472135954999579*G_1[3]*alpha_G_1_source[4]+0.4472135954999579*alpha_G_1_source[3]*G_1[4]+0.5*G_1[0]*alpha_G_1_source[3]+0.5*alpha_G_1_source[0]*G_1[3]+1.264911064067352*nu_vthsq[2]*F_0[3]+1.414213562373095*nu_vthsq[0]*F_0[3]+0.5*G_1[1]*alpha_G_1_source[2]+0.5*alpha_G_1_source[1]*G_1[2]+1.414213562373095*nu_vthsq[1]*F_0[2]; - out_G_1_vperp[4] = 0.31943828249997*G_1[6]*alpha_G_1_source[6]+0.5000000000000001*G_1[2]*alpha_G_1_source[6]+0.5000000000000001*alpha_G_1_source[2]*G_1[6]+0.31943828249997*G_1[4]*alpha_G_1_source[4]+0.5*G_1[0]*alpha_G_1_source[4]+0.5*alpha_G_1_source[0]*G_1[4]+0.9035079029052515*nu_vthsq[2]*F_0[4]+1.414213562373095*nu_vthsq[0]*F_0[4]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+1.414213562373095*F_0[0]*nu_vthsq[2]+1.264911064067352*F_0[1]*nu_vthsq[1]+0.4472135954999579*G_1[1]*alpha_G_1_source[1]; - out_G_1_vperp[5] = 0.5*alpha_G_1_source[4]*G_1[8]+1.414213562373095*nu_vthsq[2]*F_0[8]+0.5000000000000001*alpha_G_1_source[1]*G_1[7]+1.414213562373095*nu_vthsq[1]*F_0[7]+0.4472135954999579*G_1[6]*alpha_G_1_source[6]+0.5*alpha_G_1_source[0]*G_1[5]+1.414213562373095*nu_vthsq[0]*F_0[5]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+0.4472135954999579*G_1[2]*alpha_G_1_source[2]; - out_G_1_vperp[6] = 0.2857142857142857*alpha_G_1_source[6]*G_1[8]+0.447213595499958*alpha_G_1_source[2]*G_1[8]+0.4*alpha_G_1_source[3]*G_1[7]+0.4472135954999579*G_1[5]*alpha_G_1_source[6]+0.31943828249997*G_1[4]*alpha_G_1_source[6]+0.5*G_1[0]*alpha_G_1_source[6]+0.31943828249997*alpha_G_1_source[4]*G_1[6]+0.5*alpha_G_1_source[0]*G_1[6]+0.9035079029052515*nu_vthsq[2]*F_0[6]+1.414213562373095*nu_vthsq[0]*F_0[6]+0.5000000000000001*G_1[2]*alpha_G_1_source[4]+0.5000000000000001*alpha_G_1_source[2]*G_1[4]+0.447213595499958*G_1[1]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[1]*G_1[3]+1.264911064067352*nu_vthsq[1]*F_0[3]+1.414213562373095*F_0[2]*nu_vthsq[2]; - out_G_1_vperp[7] = 0.447213595499958*alpha_G_1_source[1]*G_1[8]+1.264911064067352*nu_vthsq[1]*F_0[8]+0.4472135954999579*alpha_G_1_source[4]*G_1[7]+0.5*alpha_G_1_source[0]*G_1[7]+1.264911064067352*nu_vthsq[2]*F_0[7]+1.414213562373095*nu_vthsq[0]*F_0[7]+0.4*G_1[3]*alpha_G_1_source[6]+0.4*alpha_G_1_source[3]*G_1[6]+0.5000000000000001*alpha_G_1_source[1]*G_1[5]+1.414213562373095*nu_vthsq[1]*F_0[5]+0.447213595499958*G_1[2]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[2]*G_1[3]; - out_G_1_vperp[8] = 0.31943828249997*alpha_G_1_source[4]*G_1[8]+0.5*alpha_G_1_source[0]*G_1[8]+0.9035079029052515*nu_vthsq[2]*F_0[8]+1.414213562373095*nu_vthsq[0]*F_0[8]+0.447213595499958*alpha_G_1_source[1]*G_1[7]+1.264911064067352*nu_vthsq[1]*F_0[7]+0.2857142857142857*G_1[6]*alpha_G_1_source[6]+0.447213595499958*G_1[2]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[2]*G_1[6]+0.5*alpha_G_1_source[4]*G_1[5]+1.414213562373095*nu_vthsq[2]*F_0[5]+0.4*G_1[3]*alpha_G_1_source[3]; + out_G_1_vperp[0] = 0.5*G_1[6]*alpha_G_1_source[6]+0.5*G_1[4]*alpha_G_1_source[4]+1.414213562373095*nu_vtsq_sum[2]*F_0[4]+0.5*G_1[3]*alpha_G_1_source[3]+0.5*G_1[2]*alpha_G_1_source[2]+1.414213562373095*F_0[1]*nu_vtsq_sum[1]+0.5*G_1[1]*alpha_G_1_source[1]+1.414213562373095*F_0[0]*nu_vtsq_sum[0]+0.5*G_1[0]*alpha_G_1_source[0]; + out_G_1_vperp[1] = 0.447213595499958*G_1[3]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[3]*G_1[6]+0.4472135954999579*G_1[1]*alpha_G_1_source[4]+0.4472135954999579*alpha_G_1_source[1]*G_1[4]+1.264911064067352*nu_vtsq_sum[1]*F_0[4]+0.5*G_1[2]*alpha_G_1_source[3]+0.5*alpha_G_1_source[2]*G_1[3]+1.264911064067352*F_0[1]*nu_vtsq_sum[2]+1.414213562373095*F_0[0]*nu_vtsq_sum[1]+0.5*G_1[0]*alpha_G_1_source[1]+0.5*alpha_G_1_source[0]*G_1[1]+1.414213562373095*nu_vtsq_sum[0]*F_0[1]; + out_G_1_vperp[2] = 0.447213595499958*alpha_G_1_source[6]*G_1[8]+0.447213595499958*alpha_G_1_source[3]*G_1[7]+0.5000000000000001*G_1[4]*alpha_G_1_source[6]+0.5000000000000001*alpha_G_1_source[4]*G_1[6]+1.414213562373095*nu_vtsq_sum[2]*F_0[6]+0.4472135954999579*alpha_G_1_source[2]*G_1[5]+0.5*G_1[1]*alpha_G_1_source[3]+0.5*alpha_G_1_source[1]*G_1[3]+1.414213562373095*nu_vtsq_sum[1]*F_0[3]+0.5*G_1[0]*alpha_G_1_source[2]+0.5*alpha_G_1_source[0]*G_1[2]+1.414213562373095*nu_vtsq_sum[0]*F_0[2]; + out_G_1_vperp[3] = 0.4*alpha_G_1_source[3]*G_1[8]+0.4*alpha_G_1_source[6]*G_1[7]+0.447213595499958*alpha_G_1_source[2]*G_1[7]+0.447213595499958*G_1[1]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[1]*G_1[6]+1.264911064067352*nu_vtsq_sum[1]*F_0[6]+0.4472135954999579*alpha_G_1_source[3]*G_1[5]+0.4472135954999579*G_1[3]*alpha_G_1_source[4]+0.4472135954999579*alpha_G_1_source[3]*G_1[4]+0.5*G_1[0]*alpha_G_1_source[3]+0.5*alpha_G_1_source[0]*G_1[3]+1.264911064067352*nu_vtsq_sum[2]*F_0[3]+1.414213562373095*nu_vtsq_sum[0]*F_0[3]+0.5*G_1[1]*alpha_G_1_source[2]+0.5*alpha_G_1_source[1]*G_1[2]+1.414213562373095*nu_vtsq_sum[1]*F_0[2]; + out_G_1_vperp[4] = 0.31943828249997*G_1[6]*alpha_G_1_source[6]+0.5000000000000001*G_1[2]*alpha_G_1_source[6]+0.5000000000000001*alpha_G_1_source[2]*G_1[6]+0.31943828249997*G_1[4]*alpha_G_1_source[4]+0.5*G_1[0]*alpha_G_1_source[4]+0.5*alpha_G_1_source[0]*G_1[4]+0.9035079029052515*nu_vtsq_sum[2]*F_0[4]+1.414213562373095*nu_vtsq_sum[0]*F_0[4]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+1.414213562373095*F_0[0]*nu_vtsq_sum[2]+1.264911064067352*F_0[1]*nu_vtsq_sum[1]+0.4472135954999579*G_1[1]*alpha_G_1_source[1]; + out_G_1_vperp[5] = 0.5*alpha_G_1_source[4]*G_1[8]+1.414213562373095*nu_vtsq_sum[2]*F_0[8]+0.5000000000000001*alpha_G_1_source[1]*G_1[7]+1.414213562373095*nu_vtsq_sum[1]*F_0[7]+0.4472135954999579*G_1[6]*alpha_G_1_source[6]+0.5*alpha_G_1_source[0]*G_1[5]+1.414213562373095*nu_vtsq_sum[0]*F_0[5]+0.4472135954999579*G_1[3]*alpha_G_1_source[3]+0.4472135954999579*G_1[2]*alpha_G_1_source[2]; + out_G_1_vperp[6] = 0.2857142857142857*alpha_G_1_source[6]*G_1[8]+0.447213595499958*alpha_G_1_source[2]*G_1[8]+0.4*alpha_G_1_source[3]*G_1[7]+0.4472135954999579*G_1[5]*alpha_G_1_source[6]+0.31943828249997*G_1[4]*alpha_G_1_source[6]+0.5*G_1[0]*alpha_G_1_source[6]+0.31943828249997*alpha_G_1_source[4]*G_1[6]+0.5*alpha_G_1_source[0]*G_1[6]+0.9035079029052515*nu_vtsq_sum[2]*F_0[6]+1.414213562373095*nu_vtsq_sum[0]*F_0[6]+0.5000000000000001*G_1[2]*alpha_G_1_source[4]+0.5000000000000001*alpha_G_1_source[2]*G_1[4]+0.447213595499958*G_1[1]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[1]*G_1[3]+1.264911064067352*nu_vtsq_sum[1]*F_0[3]+1.414213562373095*F_0[2]*nu_vtsq_sum[2]; + out_G_1_vperp[7] = 0.447213595499958*alpha_G_1_source[1]*G_1[8]+1.264911064067352*nu_vtsq_sum[1]*F_0[8]+0.4472135954999579*alpha_G_1_source[4]*G_1[7]+0.5*alpha_G_1_source[0]*G_1[7]+1.264911064067352*nu_vtsq_sum[2]*F_0[7]+1.414213562373095*nu_vtsq_sum[0]*F_0[7]+0.4*G_1[3]*alpha_G_1_source[6]+0.4*alpha_G_1_source[3]*G_1[6]+0.5000000000000001*alpha_G_1_source[1]*G_1[5]+1.414213562373095*nu_vtsq_sum[1]*F_0[5]+0.447213595499958*G_1[2]*alpha_G_1_source[3]+0.447213595499958*alpha_G_1_source[2]*G_1[3]; + out_G_1_vperp[8] = 0.31943828249997*alpha_G_1_source[4]*G_1[8]+0.5*alpha_G_1_source[0]*G_1[8]+0.9035079029052515*nu_vtsq_sum[2]*F_0[8]+1.414213562373095*nu_vtsq_sum[0]*F_0[8]+0.447213595499958*alpha_G_1_source[1]*G_1[7]+1.264911064067352*nu_vtsq_sum[1]*F_0[7]+0.2857142857142857*G_1[6]*alpha_G_1_source[6]+0.447213595499958*G_1[2]*alpha_G_1_source[6]+0.447213595499958*alpha_G_1_source[2]*G_1[6]+0.5*alpha_G_1_source[4]*G_1[5]+1.414213562373095*nu_vtsq_sum[2]*F_0[5]+0.4*G_1[3]*alpha_G_1_source[3]; tmp_F_0_m_F_1[0] = 0.7071067811865475*T_perp_over_m_inv[2]*G_1[4]+0.7071067811865475*G_1[1]*T_perp_over_m_inv[1]+0.7071067811865475*G_1[0]*T_perp_over_m_inv[0]; tmp_F_0_m_F_1[1] = 0.6324555320336759*T_perp_over_m_inv[1]*G_1[4]+0.6324555320336759*G_1[1]*T_perp_over_m_inv[2]+0.7071067811865475*G_1[0]*T_perp_over_m_inv[1]+0.7071067811865475*T_perp_over_m_inv[0]*G_1[1]; diff --git a/kernels/pkpm/pkpm_dist_mirror_force_2x1v_ser_p1.c b/kernels/pkpm/pkpm_dist_mirror_force_2x1v_ser_p1.c index 3ea5aca71..709219e93 100644 --- a/kernels/pkpm/pkpm_dist_mirror_force_2x1v_ser_p1.c +++ b/kernels/pkpm/pkpm_dist_mirror_force_2x1v_ser_p1.c @@ -1,22 +1,22 @@ #include GKYL_CU_DH void pkpm_dist_mirror_force_2x1v_ser_p1(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1) { - // w[NDIM]: Cell-center coordinates. - // dxv[NDIM]: Cell spacing. - // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. - // nu_vthsq: Input nu*vth^2. - // div_b: Input volume expansion of div(b). - // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. - // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. - // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. - // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), - // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. - // First output is mirror force source, second output is vperp characteristics source. - // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // nu_prim_moms_sum: Input sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // div_b: Input volume expansion of div(b). + // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. + // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. + // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. + // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), + // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. + // First output is mirror force source, second output is vperp characteristics source. + // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. const double dvpar = dxv[2], wvpar = w[2]; const double *T_perp_over_m = &pkpm_prim[16]; @@ -39,6 +39,8 @@ GKYL_CU_DH void pkpm_dist_mirror_force_2x1v_ser_p1(const double *w, const double const double *G_1 = &f[12]; const double *F_2 = &F_k_p_1[0]; + const double *nu_vtsq_sum = &nu_prim_moms_sum[4]; + double *out_G_1_mirror = &g_dist_source[0]; double *out_G_1_vperp = &g_dist_source[12]; double *out_F_1 = &F_k_m_1[0]; @@ -100,18 +102,18 @@ GKYL_CU_DH void pkpm_dist_mirror_force_2x1v_ser_p1(const double *w, const double out_G_1_mirror[10] = 1.0*T_perp_over_m[1]*tmp_T_perp_g_dist[11]+T_perp_over_m[0]*tmp_T_perp_g_dist[10]+T_perp_over_m[3]*tmp_T_perp_g_dist[9]+1.0*T_perp_over_m[2]*tmp_T_perp_g_dist[8]; out_G_1_mirror[11] = T_perp_over_m[0]*tmp_T_perp_g_dist[11]+1.0*T_perp_over_m[1]*tmp_T_perp_g_dist[10]+1.0*T_perp_over_m[2]*tmp_T_perp_g_dist[9]+T_perp_over_m[3]*tmp_T_perp_g_dist[8]; - out_G_1_vperp[0] = 0.3535533905932737*G_1[7]*alpha_G_1_source[7]+0.3535533905932737*G_1[6]*alpha_G_1_source[6]+0.3535533905932737*G_1[5]*alpha_G_1_source[5]+0.3535533905932737*G_1[4]*alpha_G_1_source[4]+nu_vthsq[3]*F_0[4]+0.3535533905932737*G_1[3]*alpha_G_1_source[3]+F_0[2]*nu_vthsq[2]+0.3535533905932737*G_1[2]*alpha_G_1_source[2]+F_0[1]*nu_vthsq[1]+0.3535533905932737*G_1[1]*alpha_G_1_source[1]+F_0[0]*nu_vthsq[0]+0.3535533905932737*G_1[0]*alpha_G_1_source[0]; - out_G_1_vperp[1] = 0.3535533905932737*G_1[6]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[6]*G_1[7]+0.3535533905932737*G_1[3]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[3]*G_1[5]+0.3535533905932737*G_1[2]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[2]*G_1[4]+nu_vthsq[2]*F_0[4]+F_0[2]*nu_vthsq[3]+F_0[0]*nu_vthsq[1]+0.3535533905932737*G_1[0]*alpha_G_1_source[1]+0.3535533905932737*alpha_G_1_source[0]*G_1[1]+nu_vthsq[0]*F_0[1]; - out_G_1_vperp[2] = 0.3535533905932737*G_1[5]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[5]*G_1[7]+0.3535533905932737*G_1[3]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[3]*G_1[6]+0.3535533905932737*G_1[1]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[1]*G_1[4]+nu_vthsq[1]*F_0[4]+F_0[1]*nu_vthsq[3]+F_0[0]*nu_vthsq[2]+0.3535533905932737*G_1[0]*alpha_G_1_source[2]+0.3535533905932737*alpha_G_1_source[0]*G_1[2]+nu_vthsq[0]*F_0[2]; - out_G_1_vperp[3] = 0.3162277660168379*alpha_G_1_source[7]*G_1[11]+0.3162277660168379*alpha_G_1_source[6]*G_1[10]+0.3162277660168379*alpha_G_1_source[5]*G_1[9]+0.3162277660168379*alpha_G_1_source[3]*G_1[8]+0.3535533905932737*G_1[4]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[4]*G_1[7]+nu_vthsq[3]*F_0[7]+0.3535533905932737*G_1[2]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[2]*G_1[6]+nu_vthsq[2]*F_0[6]+0.3535533905932737*G_1[1]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[1]*G_1[5]+nu_vthsq[1]*F_0[5]+0.3535533905932737*G_1[0]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[0]*G_1[3]+nu_vthsq[0]*F_0[3]; - out_G_1_vperp[4] = 0.3535533905932737*G_1[3]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[3]*G_1[7]+0.3535533905932737*G_1[5]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[5]*G_1[6]+0.3535533905932737*G_1[0]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[0]*G_1[4]+nu_vthsq[0]*F_0[4]+F_0[0]*nu_vthsq[3]+F_0[1]*nu_vthsq[2]+0.3535533905932737*G_1[1]*alpha_G_1_source[2]+0.3535533905932737*alpha_G_1_source[1]*G_1[2]+nu_vthsq[1]*F_0[2]; - out_G_1_vperp[5] = 0.3162277660168379*alpha_G_1_source[6]*G_1[11]+0.3162277660168379*alpha_G_1_source[7]*G_1[10]+0.3162277660168379*alpha_G_1_source[3]*G_1[9]+0.3162277660168379*alpha_G_1_source[5]*G_1[8]+0.3535533905932737*G_1[2]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[2]*G_1[7]+nu_vthsq[2]*F_0[7]+0.3535533905932737*G_1[4]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[4]*G_1[6]+nu_vthsq[3]*F_0[6]+0.3535533905932737*G_1[0]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[0]*G_1[5]+nu_vthsq[0]*F_0[5]+0.3535533905932737*G_1[1]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[1]*G_1[3]+nu_vthsq[1]*F_0[3]; - out_G_1_vperp[6] = 0.3162277660168379*alpha_G_1_source[5]*G_1[11]+0.3162277660168379*alpha_G_1_source[3]*G_1[10]+0.3162277660168379*alpha_G_1_source[7]*G_1[9]+0.3162277660168379*alpha_G_1_source[6]*G_1[8]+0.3535533905932737*G_1[1]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[1]*G_1[7]+nu_vthsq[1]*F_0[7]+0.3535533905932737*G_1[0]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[0]*G_1[6]+nu_vthsq[0]*F_0[6]+0.3535533905932737*G_1[4]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[4]*G_1[5]+nu_vthsq[3]*F_0[5]+0.3535533905932737*G_1[2]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[2]*G_1[3]+nu_vthsq[2]*F_0[3]; - out_G_1_vperp[7] = 0.3162277660168379*alpha_G_1_source[3]*G_1[11]+0.3162277660168379*alpha_G_1_source[5]*G_1[10]+0.3162277660168379*alpha_G_1_source[6]*G_1[9]+0.3162277660168379*alpha_G_1_source[7]*G_1[8]+0.3535533905932737*G_1[0]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[0]*G_1[7]+nu_vthsq[0]*F_0[7]+0.3535533905932737*G_1[1]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[1]*G_1[6]+nu_vthsq[1]*F_0[6]+0.3535533905932737*G_1[2]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[2]*G_1[5]+nu_vthsq[2]*F_0[5]+0.3535533905932737*G_1[3]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[3]*G_1[4]+F_0[3]*nu_vthsq[3]; - out_G_1_vperp[8] = 0.3535533905932737*alpha_G_1_source[4]*G_1[11]+nu_vthsq[3]*F_0[11]+0.3535533905932737*alpha_G_1_source[2]*G_1[10]+1.0*nu_vthsq[2]*F_0[10]+0.3535533905932737*alpha_G_1_source[1]*G_1[9]+1.0*nu_vthsq[1]*F_0[9]+0.3535533905932737*alpha_G_1_source[0]*G_1[8]+nu_vthsq[0]*F_0[8]+0.3162277660168379*G_1[7]*alpha_G_1_source[7]+0.3162277660168379*G_1[6]*alpha_G_1_source[6]+0.3162277660168379*G_1[5]*alpha_G_1_source[5]+0.3162277660168379*G_1[3]*alpha_G_1_source[3]; - out_G_1_vperp[9] = 0.3535533905932737*alpha_G_1_source[2]*G_1[11]+1.0*nu_vthsq[2]*F_0[11]+0.3535533905932737*alpha_G_1_source[4]*G_1[10]+nu_vthsq[3]*F_0[10]+0.3535533905932737*alpha_G_1_source[0]*G_1[9]+nu_vthsq[0]*F_0[9]+0.3535533905932737*alpha_G_1_source[1]*G_1[8]+1.0*nu_vthsq[1]*F_0[8]+0.3162277660168379*G_1[6]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[6]*G_1[7]+0.3162277660168379*G_1[3]*alpha_G_1_source[5]+0.3162277660168379*alpha_G_1_source[3]*G_1[5]; - out_G_1_vperp[10] = 0.3535533905932737*alpha_G_1_source[1]*G_1[11]+1.0*nu_vthsq[1]*F_0[11]+0.3535533905932737*alpha_G_1_source[0]*G_1[10]+nu_vthsq[0]*F_0[10]+0.3535533905932737*alpha_G_1_source[4]*G_1[9]+nu_vthsq[3]*F_0[9]+0.3535533905932737*alpha_G_1_source[2]*G_1[8]+1.0*nu_vthsq[2]*F_0[8]+0.3162277660168379*G_1[5]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[5]*G_1[7]+0.3162277660168379*G_1[3]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[3]*G_1[6]; - out_G_1_vperp[11] = 0.3535533905932737*alpha_G_1_source[0]*G_1[11]+nu_vthsq[0]*F_0[11]+0.3535533905932737*alpha_G_1_source[1]*G_1[10]+1.0*nu_vthsq[1]*F_0[10]+0.3535533905932737*alpha_G_1_source[2]*G_1[9]+1.0*nu_vthsq[2]*F_0[9]+0.3535533905932737*alpha_G_1_source[4]*G_1[8]+nu_vthsq[3]*F_0[8]+0.3162277660168379*G_1[3]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[3]*G_1[7]+0.3162277660168379*G_1[5]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[5]*G_1[6]; + out_G_1_vperp[0] = 0.3535533905932737*G_1[7]*alpha_G_1_source[7]+0.3535533905932737*G_1[6]*alpha_G_1_source[6]+0.3535533905932737*G_1[5]*alpha_G_1_source[5]+0.3535533905932737*G_1[4]*alpha_G_1_source[4]+nu_vtsq_sum[3]*F_0[4]+0.3535533905932737*G_1[3]*alpha_G_1_source[3]+F_0[2]*nu_vtsq_sum[2]+0.3535533905932737*G_1[2]*alpha_G_1_source[2]+F_0[1]*nu_vtsq_sum[1]+0.3535533905932737*G_1[1]*alpha_G_1_source[1]+F_0[0]*nu_vtsq_sum[0]+0.3535533905932737*G_1[0]*alpha_G_1_source[0]; + out_G_1_vperp[1] = 0.3535533905932737*G_1[6]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[6]*G_1[7]+0.3535533905932737*G_1[3]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[3]*G_1[5]+0.3535533905932737*G_1[2]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[2]*G_1[4]+nu_vtsq_sum[2]*F_0[4]+F_0[2]*nu_vtsq_sum[3]+F_0[0]*nu_vtsq_sum[1]+0.3535533905932737*G_1[0]*alpha_G_1_source[1]+0.3535533905932737*alpha_G_1_source[0]*G_1[1]+nu_vtsq_sum[0]*F_0[1]; + out_G_1_vperp[2] = 0.3535533905932737*G_1[5]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[5]*G_1[7]+0.3535533905932737*G_1[3]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[3]*G_1[6]+0.3535533905932737*G_1[1]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[1]*G_1[4]+nu_vtsq_sum[1]*F_0[4]+F_0[1]*nu_vtsq_sum[3]+F_0[0]*nu_vtsq_sum[2]+0.3535533905932737*G_1[0]*alpha_G_1_source[2]+0.3535533905932737*alpha_G_1_source[0]*G_1[2]+nu_vtsq_sum[0]*F_0[2]; + out_G_1_vperp[3] = 0.3162277660168379*alpha_G_1_source[7]*G_1[11]+0.3162277660168379*alpha_G_1_source[6]*G_1[10]+0.3162277660168379*alpha_G_1_source[5]*G_1[9]+0.3162277660168379*alpha_G_1_source[3]*G_1[8]+0.3535533905932737*G_1[4]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[4]*G_1[7]+nu_vtsq_sum[3]*F_0[7]+0.3535533905932737*G_1[2]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[2]*G_1[6]+nu_vtsq_sum[2]*F_0[6]+0.3535533905932737*G_1[1]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[1]*G_1[5]+nu_vtsq_sum[1]*F_0[5]+0.3535533905932737*G_1[0]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[0]*G_1[3]+nu_vtsq_sum[0]*F_0[3]; + out_G_1_vperp[4] = 0.3535533905932737*G_1[3]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[3]*G_1[7]+0.3535533905932737*G_1[5]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[5]*G_1[6]+0.3535533905932737*G_1[0]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[0]*G_1[4]+nu_vtsq_sum[0]*F_0[4]+F_0[0]*nu_vtsq_sum[3]+F_0[1]*nu_vtsq_sum[2]+0.3535533905932737*G_1[1]*alpha_G_1_source[2]+0.3535533905932737*alpha_G_1_source[1]*G_1[2]+nu_vtsq_sum[1]*F_0[2]; + out_G_1_vperp[5] = 0.3162277660168379*alpha_G_1_source[6]*G_1[11]+0.3162277660168379*alpha_G_1_source[7]*G_1[10]+0.3162277660168379*alpha_G_1_source[3]*G_1[9]+0.3162277660168379*alpha_G_1_source[5]*G_1[8]+0.3535533905932737*G_1[2]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[2]*G_1[7]+nu_vtsq_sum[2]*F_0[7]+0.3535533905932737*G_1[4]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[4]*G_1[6]+nu_vtsq_sum[3]*F_0[6]+0.3535533905932737*G_1[0]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[0]*G_1[5]+nu_vtsq_sum[0]*F_0[5]+0.3535533905932737*G_1[1]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[1]*G_1[3]+nu_vtsq_sum[1]*F_0[3]; + out_G_1_vperp[6] = 0.3162277660168379*alpha_G_1_source[5]*G_1[11]+0.3162277660168379*alpha_G_1_source[3]*G_1[10]+0.3162277660168379*alpha_G_1_source[7]*G_1[9]+0.3162277660168379*alpha_G_1_source[6]*G_1[8]+0.3535533905932737*G_1[1]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[1]*G_1[7]+nu_vtsq_sum[1]*F_0[7]+0.3535533905932737*G_1[0]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[0]*G_1[6]+nu_vtsq_sum[0]*F_0[6]+0.3535533905932737*G_1[4]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[4]*G_1[5]+nu_vtsq_sum[3]*F_0[5]+0.3535533905932737*G_1[2]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[2]*G_1[3]+nu_vtsq_sum[2]*F_0[3]; + out_G_1_vperp[7] = 0.3162277660168379*alpha_G_1_source[3]*G_1[11]+0.3162277660168379*alpha_G_1_source[5]*G_1[10]+0.3162277660168379*alpha_G_1_source[6]*G_1[9]+0.3162277660168379*alpha_G_1_source[7]*G_1[8]+0.3535533905932737*G_1[0]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[0]*G_1[7]+nu_vtsq_sum[0]*F_0[7]+0.3535533905932737*G_1[1]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[1]*G_1[6]+nu_vtsq_sum[1]*F_0[6]+0.3535533905932737*G_1[2]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[2]*G_1[5]+nu_vtsq_sum[2]*F_0[5]+0.3535533905932737*G_1[3]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[3]*G_1[4]+F_0[3]*nu_vtsq_sum[3]; + out_G_1_vperp[8] = 0.3535533905932737*alpha_G_1_source[4]*G_1[11]+nu_vtsq_sum[3]*F_0[11]+0.3535533905932737*alpha_G_1_source[2]*G_1[10]+1.0*nu_vtsq_sum[2]*F_0[10]+0.3535533905932737*alpha_G_1_source[1]*G_1[9]+1.0*nu_vtsq_sum[1]*F_0[9]+0.3535533905932737*alpha_G_1_source[0]*G_1[8]+nu_vtsq_sum[0]*F_0[8]+0.3162277660168379*G_1[7]*alpha_G_1_source[7]+0.3162277660168379*G_1[6]*alpha_G_1_source[6]+0.3162277660168379*G_1[5]*alpha_G_1_source[5]+0.3162277660168379*G_1[3]*alpha_G_1_source[3]; + out_G_1_vperp[9] = 0.3535533905932737*alpha_G_1_source[2]*G_1[11]+1.0*nu_vtsq_sum[2]*F_0[11]+0.3535533905932737*alpha_G_1_source[4]*G_1[10]+nu_vtsq_sum[3]*F_0[10]+0.3535533905932737*alpha_G_1_source[0]*G_1[9]+nu_vtsq_sum[0]*F_0[9]+0.3535533905932737*alpha_G_1_source[1]*G_1[8]+1.0*nu_vtsq_sum[1]*F_0[8]+0.3162277660168379*G_1[6]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[6]*G_1[7]+0.3162277660168379*G_1[3]*alpha_G_1_source[5]+0.3162277660168379*alpha_G_1_source[3]*G_1[5]; + out_G_1_vperp[10] = 0.3535533905932737*alpha_G_1_source[1]*G_1[11]+1.0*nu_vtsq_sum[1]*F_0[11]+0.3535533905932737*alpha_G_1_source[0]*G_1[10]+nu_vtsq_sum[0]*F_0[10]+0.3535533905932737*alpha_G_1_source[4]*G_1[9]+nu_vtsq_sum[3]*F_0[9]+0.3535533905932737*alpha_G_1_source[2]*G_1[8]+1.0*nu_vtsq_sum[2]*F_0[8]+0.3162277660168379*G_1[5]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[5]*G_1[7]+0.3162277660168379*G_1[3]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[3]*G_1[6]; + out_G_1_vperp[11] = 0.3535533905932737*alpha_G_1_source[0]*G_1[11]+nu_vtsq_sum[0]*F_0[11]+0.3535533905932737*alpha_G_1_source[1]*G_1[10]+1.0*nu_vtsq_sum[1]*F_0[10]+0.3535533905932737*alpha_G_1_source[2]*G_1[9]+1.0*nu_vtsq_sum[2]*F_0[9]+0.3535533905932737*alpha_G_1_source[4]*G_1[8]+nu_vtsq_sum[3]*F_0[8]+0.3162277660168379*G_1[3]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[3]*G_1[7]+0.3162277660168379*G_1[5]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[5]*G_1[6]; tmp_F_0_m_F_1[0] = 0.5*T_perp_over_m_inv[3]*G_1[4]+0.5*G_1[2]*T_perp_over_m_inv[2]+0.5*G_1[1]*T_perp_over_m_inv[1]+0.5*G_1[0]*T_perp_over_m_inv[0]; tmp_F_0_m_F_1[1] = 0.5*T_perp_over_m_inv[2]*G_1[4]+0.5*G_1[2]*T_perp_over_m_inv[3]+0.5*G_1[0]*T_perp_over_m_inv[1]+0.5*T_perp_over_m_inv[0]*G_1[1]; diff --git a/kernels/pkpm/pkpm_dist_mirror_force_2x1v_tensor_p2.c b/kernels/pkpm/pkpm_dist_mirror_force_2x1v_tensor_p2.c index 93aff0e6e..95b88e065 100644 --- a/kernels/pkpm/pkpm_dist_mirror_force_2x1v_tensor_p2.c +++ b/kernels/pkpm/pkpm_dist_mirror_force_2x1v_tensor_p2.c @@ -1,22 +1,22 @@ #include GKYL_CU_DH void pkpm_dist_mirror_force_2x1v_tensor_p2(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1) { - // w[NDIM]: Cell-center coordinates. - // dxv[NDIM]: Cell spacing. - // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. - // nu_vthsq: Input nu*vth^2. - // div_b: Input volume expansion of div(b). - // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. - // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. - // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. - // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), - // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. - // First output is mirror force source, second output is vperp characteristics source. - // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // nu_prim_moms_sum: Input sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // div_b: Input volume expansion of div(b). + // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. + // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. + // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. + // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), + // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. + // First output is mirror force source, second output is vperp characteristics source. + // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. const double dvpar = dxv[2], wvpar = w[2]; const double *T_perp_over_m = &pkpm_prim[36]; @@ -49,6 +49,8 @@ GKYL_CU_DH void pkpm_dist_mirror_force_2x1v_tensor_p2(const double *w, const dou const double *G_1 = &f[27]; const double *F_2 = &F_k_p_1[0]; + const double *nu_vtsq_sum = &nu_prim_moms_sum[9]; + double *out_G_1_mirror = &g_dist_source[0]; double *out_G_1_vperp = &g_dist_source[27]; double *out_F_1 = &F_k_m_1[0]; @@ -170,33 +172,33 @@ GKYL_CU_DH void pkpm_dist_mirror_force_2x1v_tensor_p2(const double *w, const dou out_G_1_mirror[25] = 0.5714285714285715*T_perp_over_m[7]*tmp_T_perp_g_dist[26]+0.8944271909999159*T_perp_over_m[1]*tmp_T_perp_g_dist[26]+0.5714285714285714*T_perp_over_m[8]*tmp_T_perp_g_dist[25]+0.6388765649999399*T_perp_over_m[5]*tmp_T_perp_g_dist[25]+0.8944271909999159*T_perp_over_m[4]*tmp_T_perp_g_dist[25]+T_perp_over_m[0]*tmp_T_perp_g_dist[25]+0.8*T_perp_over_m[3]*tmp_T_perp_g_dist[24]+0.63887656499994*T_perp_over_m[7]*tmp_T_perp_g_dist[22]+T_perp_over_m[1]*tmp_T_perp_g_dist[22]+0.8944271909999161*T_perp_over_m[7]*tmp_T_perp_g_dist[21]+0.8*T_perp_over_m[6]*tmp_T_perp_g_dist[19]+0.8944271909999159*T_perp_over_m[2]*tmp_T_perp_g_dist[19]+0.8944271909999161*T_perp_over_m[3]*tmp_T_perp_g_dist[16]+0.8944271909999161*T_perp_over_m[8]*tmp_T_perp_g_dist[15]+1.0*T_perp_over_m[5]*tmp_T_perp_g_dist[15]+1.0*T_perp_over_m[7]*tmp_T_perp_g_dist[9]; out_G_1_mirror[26] = 0.4081632653061225*T_perp_over_m[8]*tmp_T_perp_g_dist[26]+0.6388765649999399*T_perp_over_m[5]*tmp_T_perp_g_dist[26]+0.6388765649999399*T_perp_over_m[4]*tmp_T_perp_g_dist[26]+T_perp_over_m[0]*tmp_T_perp_g_dist[26]+0.5714285714285715*T_perp_over_m[7]*tmp_T_perp_g_dist[25]+0.8944271909999159*T_perp_over_m[1]*tmp_T_perp_g_dist[25]+0.5714285714285715*T_perp_over_m[6]*tmp_T_perp_g_dist[24]+0.8944271909999159*T_perp_over_m[2]*tmp_T_perp_g_dist[24]+0.6388765649999399*T_perp_over_m[8]*tmp_T_perp_g_dist[22]+T_perp_over_m[4]*tmp_T_perp_g_dist[22]+0.6388765649999399*T_perp_over_m[8]*tmp_T_perp_g_dist[21]+T_perp_over_m[5]*tmp_T_perp_g_dist[21]+0.8*T_perp_over_m[3]*tmp_T_perp_g_dist[19]+0.8944271909999159*T_perp_over_m[6]*tmp_T_perp_g_dist[16]+0.8944271909999159*T_perp_over_m[7]*tmp_T_perp_g_dist[15]+T_perp_over_m[8]*tmp_T_perp_g_dist[9]; - out_G_1_vperp[0] = 0.3535533905932737*G_1[23]*alpha_G_1_source[23]+0.3535533905932737*G_1[20]*alpha_G_1_source[20]+nu_vthsq[8]*F_0[20]+0.3535533905932737*G_1[18]*alpha_G_1_source[18]+0.3535533905932737*G_1[17]*alpha_G_1_source[17]+0.3535533905932737*G_1[14]*alpha_G_1_source[14]+0.3535533905932737*G_1[13]*alpha_G_1_source[13]+0.3535533905932737*G_1[12]*alpha_G_1_source[12]+nu_vthsq[7]*F_0[12]+0.3535533905932737*G_1[11]*alpha_G_1_source[11]+nu_vthsq[6]*F_0[11]+0.3535533905932737*G_1[10]*alpha_G_1_source[10]+0.3535533905932737*G_1[8]*alpha_G_1_source[8]+nu_vthsq[5]*F_0[8]+0.3535533905932737*G_1[7]*alpha_G_1_source[7]+nu_vthsq[4]*F_0[7]+0.3535533905932737*G_1[6]*alpha_G_1_source[6]+0.3535533905932737*G_1[5]*alpha_G_1_source[5]+0.3535533905932737*G_1[4]*alpha_G_1_source[4]+nu_vthsq[3]*F_0[4]+0.3535533905932737*G_1[3]*alpha_G_1_source[3]+F_0[2]*nu_vthsq[2]+0.3535533905932737*G_1[2]*alpha_G_1_source[2]+F_0[1]*nu_vthsq[1]+0.3535533905932737*G_1[1]*alpha_G_1_source[1]+F_0[0]*nu_vthsq[0]+0.3535533905932737*G_1[0]*alpha_G_1_source[0]; - out_G_1_vperp[1] = 0.3162277660168379*G_1[18]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[18]*G_1[23]+0.3162277660168379*G_1[12]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[12]*G_1[20]+0.8944271909999161*nu_vthsq[7]*F_0[20]+0.3535533905932737*G_1[14]*alpha_G_1_source[18]+0.3535533905932737*alpha_G_1_source[14]*G_1[18]+0.3162277660168379*G_1[10]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[10]*G_1[17]+0.3162277660168379*G_1[5]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[5]*G_1[13]+0.3535533905932737*G_1[8]*alpha_G_1_source[12]+0.3535533905932737*alpha_G_1_source[8]*G_1[12]+0.8944271909999161*nu_vthsq[8]*F_0[12]+1.0*nu_vthsq[5]*F_0[12]+0.3162277660168379*G_1[4]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[4]*G_1[11]+0.8944271909999161*nu_vthsq[3]*F_0[11]+0.3535533905932737*G_1[6]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[6]*G_1[10]+1.0*nu_vthsq[7]*F_0[8]+0.3162277660168379*G_1[1]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[1]*G_1[7]+0.8944271909999159*nu_vthsq[1]*F_0[7]+0.8944271909999161*F_0[4]*nu_vthsq[6]+0.3535533905932737*G_1[3]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[3]*G_1[5]+0.8944271909999159*F_0[1]*nu_vthsq[4]+0.3535533905932737*G_1[2]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[2]*G_1[4]+nu_vthsq[2]*F_0[4]+F_0[2]*nu_vthsq[3]+F_0[0]*nu_vthsq[1]+0.3535533905932737*G_1[0]*alpha_G_1_source[1]+0.3535533905932737*alpha_G_1_source[0]*G_1[1]+nu_vthsq[0]*F_0[1]; - out_G_1_vperp[2] = 0.3162277660168379*G_1[17]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[17]*G_1[23]+0.3162277660168379*G_1[11]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[11]*G_1[20]+0.8944271909999161*nu_vthsq[6]*F_0[20]+0.3162277660168379*G_1[10]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[10]*G_1[18]+0.3535533905932737*G_1[13]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[13]*G_1[17]+0.3162277660168379*G_1[6]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[6]*G_1[14]+0.3162277660168379*G_1[4]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[4]*G_1[12]+0.8944271909999161*nu_vthsq[3]*F_0[12]+0.3535533905932737*G_1[7]*alpha_G_1_source[11]+0.3535533905932737*alpha_G_1_source[7]*G_1[11]+0.8944271909999161*nu_vthsq[8]*F_0[11]+1.0*nu_vthsq[4]*F_0[11]+0.3535533905932737*G_1[5]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[5]*G_1[10]+0.3162277660168379*G_1[2]*alpha_G_1_source[8]+0.3162277660168379*alpha_G_1_source[2]*G_1[8]+0.8944271909999159*nu_vthsq[2]*F_0[8]+0.8944271909999161*F_0[4]*nu_vthsq[7]+1.0*nu_vthsq[6]*F_0[7]+0.3535533905932737*G_1[3]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[3]*G_1[6]+0.8944271909999159*F_0[2]*nu_vthsq[5]+0.3535533905932737*G_1[1]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[1]*G_1[4]+nu_vthsq[1]*F_0[4]+F_0[1]*nu_vthsq[3]+F_0[0]*nu_vthsq[2]+0.3535533905932737*G_1[0]*alpha_G_1_source[2]+0.3535533905932737*alpha_G_1_source[0]*G_1[2]+nu_vthsq[0]*F_0[2]; - out_G_1_vperp[3] = 0.3162277660168379*alpha_G_1_source[23]*G_1[26]+0.3162277660168379*alpha_G_1_source[18]*G_1[25]+0.3162277660168379*alpha_G_1_source[17]*G_1[24]+0.3535533905932737*G_1[20]*alpha_G_1_source[23]+0.3535533905932737*alpha_G_1_source[20]*G_1[23]+nu_vthsq[8]*F_0[23]+0.3162277660168379*alpha_G_1_source[14]*G_1[22]+0.3162277660168379*alpha_G_1_source[13]*G_1[21]+0.3162277660168379*alpha_G_1_source[10]*G_1[19]+0.3535533905932737*G_1[12]*alpha_G_1_source[18]+0.3535533905932737*alpha_G_1_source[12]*G_1[18]+1.0*nu_vthsq[7]*F_0[18]+0.3535533905932737*G_1[11]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[11]*G_1[17]+1.0*nu_vthsq[6]*F_0[17]+0.3162277660168379*alpha_G_1_source[6]*G_1[16]+0.3162277660168379*alpha_G_1_source[5]*G_1[15]+0.3535533905932737*G_1[8]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[8]*G_1[14]+1.0*nu_vthsq[5]*F_0[14]+0.3535533905932737*G_1[7]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[7]*G_1[13]+1.0*nu_vthsq[4]*F_0[13]+0.3535533905932737*G_1[4]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[4]*G_1[10]+nu_vthsq[3]*F_0[10]+0.3162277660168379*alpha_G_1_source[3]*G_1[9]+0.3535533905932737*G_1[2]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[2]*G_1[6]+nu_vthsq[2]*F_0[6]+0.3535533905932737*G_1[1]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[1]*G_1[5]+nu_vthsq[1]*F_0[5]+0.3535533905932737*G_1[0]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[0]*G_1[3]+nu_vthsq[0]*F_0[3]; - out_G_1_vperp[4] = 0.2828427124746191*G_1[10]*alpha_G_1_source[23]+0.2828427124746191*alpha_G_1_source[10]*G_1[23]+0.2828427124746191*G_1[4]*alpha_G_1_source[20]+0.2828427124746191*alpha_G_1_source[4]*G_1[20]+0.8*nu_vthsq[3]*F_0[20]+0.2828427124746191*G_1[17]*alpha_G_1_source[18]+0.3162277660168379*G_1[6]*alpha_G_1_source[18]+0.2828427124746191*alpha_G_1_source[17]*G_1[18]+0.3162277660168379*alpha_G_1_source[6]*G_1[18]+0.3162277660168379*G_1[5]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[5]*G_1[17]+0.3162277660168379*G_1[10]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[10]*G_1[14]+0.3162277660168379*G_1[10]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[10]*G_1[13]+0.2828427124746191*G_1[11]*alpha_G_1_source[12]+0.3162277660168379*G_1[2]*alpha_G_1_source[12]+0.2828427124746191*alpha_G_1_source[11]*G_1[12]+0.3162277660168379*alpha_G_1_source[2]*G_1[12]+0.8*nu_vthsq[6]*F_0[12]+0.8944271909999161*nu_vthsq[2]*F_0[12]+0.3162277660168379*G_1[1]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[1]*G_1[11]+0.8*nu_vthsq[7]*F_0[11]+0.8944271909999161*nu_vthsq[1]*F_0[11]+0.3535533905932737*G_1[3]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[3]*G_1[10]+0.8*F_0[4]*nu_vthsq[8]+0.3162277660168379*G_1[4]*alpha_G_1_source[8]+0.3162277660168379*alpha_G_1_source[4]*G_1[8]+0.8944271909999159*nu_vthsq[3]*F_0[8]+0.8944271909999161*F_0[2]*nu_vthsq[7]+0.3162277660168379*G_1[4]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[4]*G_1[7]+0.8944271909999159*nu_vthsq[3]*F_0[7]+0.8944271909999161*F_0[1]*nu_vthsq[6]+0.3535533905932737*G_1[5]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[5]*G_1[6]+0.8944271909999159*F_0[4]*nu_vthsq[5]+0.8944271909999159*F_0[4]*nu_vthsq[4]+0.3535533905932737*G_1[0]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[0]*G_1[4]+nu_vthsq[0]*F_0[4]+F_0[0]*nu_vthsq[3]+F_0[1]*nu_vthsq[2]+0.3535533905932737*G_1[1]*alpha_G_1_source[2]+0.3535533905932737*alpha_G_1_source[1]*G_1[2]+nu_vthsq[1]*F_0[2]; - out_G_1_vperp[5] = 0.2828427124746191*alpha_G_1_source[18]*G_1[26]+0.2828427124746191*alpha_G_1_source[23]*G_1[25]+0.3162277660168379*alpha_G_1_source[14]*G_1[25]+0.2828427124746191*alpha_G_1_source[10]*G_1[24]+0.3162277660168379*G_1[12]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[12]*G_1[23]+0.8944271909999161*nu_vthsq[7]*F_0[23]+0.3162277660168379*alpha_G_1_source[18]*G_1[22]+0.2828427124746191*alpha_G_1_source[5]*G_1[21]+0.3162277660168379*G_1[18]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[18]*G_1[20]+0.2828427124746191*alpha_G_1_source[17]*G_1[19]+0.3162277660168379*alpha_G_1_source[6]*G_1[19]+0.3535533905932737*G_1[8]*alpha_G_1_source[18]+0.3535533905932737*alpha_G_1_source[8]*G_1[18]+0.8944271909999159*nu_vthsq[8]*F_0[18]+nu_vthsq[5]*F_0[18]+0.3162277660168379*G_1[4]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[4]*G_1[17]+0.8944271909999159*nu_vthsq[3]*F_0[17]+0.3162277660168379*alpha_G_1_source[10]*G_1[16]+0.2828427124746191*alpha_G_1_source[13]*G_1[15]+0.3162277660168379*alpha_G_1_source[3]*G_1[15]+0.3535533905932737*G_1[12]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[12]*G_1[14]+nu_vthsq[7]*F_0[14]+0.3162277660168379*G_1[1]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[1]*G_1[13]+0.8944271909999161*nu_vthsq[1]*F_0[13]+0.3162277660168379*G_1[10]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[10]*G_1[11]+0.3535533905932737*G_1[2]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[2]*G_1[10]+0.8944271909999161*nu_vthsq[6]*F_0[10]+nu_vthsq[2]*F_0[10]+0.3162277660168379*alpha_G_1_source[5]*G_1[9]+0.3162277660168379*G_1[5]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[5]*G_1[7]+0.3535533905932737*G_1[4]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[4]*G_1[6]+nu_vthsq[3]*F_0[6]+0.3535533905932737*G_1[0]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[0]*G_1[5]+0.8944271909999159*nu_vthsq[4]*F_0[5]+nu_vthsq[0]*F_0[5]+0.3535533905932737*G_1[1]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[1]*G_1[3]+nu_vthsq[1]*F_0[3]; - out_G_1_vperp[6] = 0.2828427124746191*alpha_G_1_source[17]*G_1[26]+0.2828427124746191*alpha_G_1_source[10]*G_1[25]+0.2828427124746191*alpha_G_1_source[23]*G_1[24]+0.3162277660168379*alpha_G_1_source[13]*G_1[24]+0.3162277660168379*G_1[11]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[11]*G_1[23]+0.8944271909999161*nu_vthsq[6]*F_0[23]+0.2828427124746191*alpha_G_1_source[6]*G_1[22]+0.3162277660168379*alpha_G_1_source[17]*G_1[21]+0.3162277660168379*G_1[17]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[17]*G_1[20]+0.2828427124746191*alpha_G_1_source[18]*G_1[19]+0.3162277660168379*alpha_G_1_source[5]*G_1[19]+0.3162277660168379*G_1[4]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[4]*G_1[18]+0.8944271909999159*nu_vthsq[3]*F_0[18]+0.3535533905932737*G_1[7]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[7]*G_1[17]+0.8944271909999159*nu_vthsq[8]*F_0[17]+nu_vthsq[4]*F_0[17]+0.2828427124746191*alpha_G_1_source[14]*G_1[16]+0.3162277660168379*alpha_G_1_source[3]*G_1[16]+0.3162277660168379*alpha_G_1_source[10]*G_1[15]+0.3162277660168379*G_1[2]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[2]*G_1[14]+0.8944271909999161*nu_vthsq[2]*F_0[14]+0.3535533905932737*G_1[11]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[11]*G_1[13]+nu_vthsq[6]*F_0[13]+0.3162277660168379*G_1[10]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[10]*G_1[12]+0.3535533905932737*G_1[1]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[1]*G_1[10]+0.8944271909999161*nu_vthsq[7]*F_0[10]+nu_vthsq[1]*F_0[10]+0.3162277660168379*alpha_G_1_source[6]*G_1[9]+0.3162277660168379*G_1[6]*alpha_G_1_source[8]+0.3162277660168379*alpha_G_1_source[6]*G_1[8]+0.3535533905932737*G_1[0]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[0]*G_1[6]+0.8944271909999159*nu_vthsq[5]*F_0[6]+nu_vthsq[0]*F_0[6]+0.3535533905932737*G_1[4]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[4]*G_1[5]+nu_vthsq[3]*F_0[5]+0.3535533905932737*G_1[2]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[2]*G_1[3]+nu_vthsq[2]*F_0[3]; - out_G_1_vperp[7] = 0.2258769757263128*G_1[23]*alpha_G_1_source[23]+0.3535533905932737*G_1[14]*alpha_G_1_source[23]+0.3535533905932737*alpha_G_1_source[14]*G_1[23]+0.2258769757263128*G_1[20]*alpha_G_1_source[20]+0.3535533905932737*G_1[8]*alpha_G_1_source[20]+0.3535533905932737*alpha_G_1_source[8]*G_1[20]+0.6388765649999399*nu_vthsq[8]*F_0[20]+nu_vthsq[5]*F_0[20]+0.3162277660168379*G_1[18]*alpha_G_1_source[18]+0.2258769757263128*G_1[17]*alpha_G_1_source[17]+0.3535533905932737*G_1[6]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[6]*G_1[17]+0.2258769757263128*G_1[13]*alpha_G_1_source[13]+0.3535533905932737*G_1[3]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[3]*G_1[13]+0.3162277660168379*G_1[12]*alpha_G_1_source[12]+0.8944271909999159*nu_vthsq[7]*F_0[12]+0.2258769757263128*G_1[11]*alpha_G_1_source[11]+0.3535533905932737*G_1[2]*alpha_G_1_source[11]+0.3535533905932737*alpha_G_1_source[2]*G_1[11]+0.6388765649999399*nu_vthsq[6]*F_0[11]+1.0*nu_vthsq[2]*F_0[11]+0.3162277660168379*G_1[10]*alpha_G_1_source[10]+F_0[8]*nu_vthsq[8]+0.2258769757263128*G_1[7]*alpha_G_1_source[7]+0.3535533905932737*G_1[0]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[0]*G_1[7]+0.6388765649999399*nu_vthsq[4]*F_0[7]+nu_vthsq[0]*F_0[7]+1.0*F_0[2]*nu_vthsq[6]+0.3162277660168379*G_1[5]*alpha_G_1_source[5]+F_0[0]*nu_vthsq[4]+0.3162277660168379*G_1[4]*alpha_G_1_source[4]+0.8944271909999159*nu_vthsq[3]*F_0[4]+0.8944271909999159*F_0[1]*nu_vthsq[1]+0.3162277660168379*G_1[1]*alpha_G_1_source[1]; - out_G_1_vperp[8] = 0.2258769757263128*G_1[23]*alpha_G_1_source[23]+0.3535533905932737*G_1[13]*alpha_G_1_source[23]+0.3535533905932737*alpha_G_1_source[13]*G_1[23]+0.2258769757263128*G_1[20]*alpha_G_1_source[20]+0.3535533905932737*G_1[7]*alpha_G_1_source[20]+0.3535533905932737*alpha_G_1_source[7]*G_1[20]+0.6388765649999399*nu_vthsq[8]*F_0[20]+nu_vthsq[4]*F_0[20]+0.2258769757263128*G_1[18]*alpha_G_1_source[18]+0.3535533905932737*G_1[5]*alpha_G_1_source[18]+0.3535533905932737*alpha_G_1_source[5]*G_1[18]+0.3162277660168379*G_1[17]*alpha_G_1_source[17]+0.2258769757263128*G_1[14]*alpha_G_1_source[14]+0.3535533905932737*G_1[3]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[3]*G_1[14]+0.2258769757263128*G_1[12]*alpha_G_1_source[12]+0.3535533905932737*G_1[1]*alpha_G_1_source[12]+0.3535533905932737*alpha_G_1_source[1]*G_1[12]+0.6388765649999399*nu_vthsq[7]*F_0[12]+1.0*nu_vthsq[1]*F_0[12]+0.3162277660168379*G_1[11]*alpha_G_1_source[11]+0.8944271909999159*nu_vthsq[6]*F_0[11]+0.3162277660168379*G_1[10]*alpha_G_1_source[10]+F_0[7]*nu_vthsq[8]+0.2258769757263128*G_1[8]*alpha_G_1_source[8]+0.3535533905932737*G_1[0]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[0]*G_1[8]+0.6388765649999399*nu_vthsq[5]*F_0[8]+nu_vthsq[0]*F_0[8]+1.0*F_0[1]*nu_vthsq[7]+0.3162277660168379*G_1[6]*alpha_G_1_source[6]+F_0[0]*nu_vthsq[5]+0.3162277660168379*G_1[4]*alpha_G_1_source[4]+0.8944271909999159*nu_vthsq[3]*F_0[4]+0.8944271909999159*F_0[2]*nu_vthsq[2]+0.3162277660168379*G_1[2]*alpha_G_1_source[2]; - out_G_1_vperp[9] = 0.3535533905932737*alpha_G_1_source[20]*G_1[26]+nu_vthsq[8]*F_0[26]+0.3535533905932737*alpha_G_1_source[12]*G_1[25]+1.0*nu_vthsq[7]*F_0[25]+0.3535533905932737*alpha_G_1_source[11]*G_1[24]+1.0*nu_vthsq[6]*F_0[24]+0.3162277660168379*G_1[23]*alpha_G_1_source[23]+0.3535533905932737*alpha_G_1_source[8]*G_1[22]+nu_vthsq[5]*F_0[22]+0.3535533905932737*alpha_G_1_source[7]*G_1[21]+nu_vthsq[4]*F_0[21]+0.3535533905932737*alpha_G_1_source[4]*G_1[19]+nu_vthsq[3]*F_0[19]+0.3162277660168379*G_1[18]*alpha_G_1_source[18]+0.3162277660168379*G_1[17]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[2]*G_1[16]+1.0*nu_vthsq[2]*F_0[16]+0.3535533905932737*alpha_G_1_source[1]*G_1[15]+1.0*nu_vthsq[1]*F_0[15]+0.3162277660168379*G_1[14]*alpha_G_1_source[14]+0.3162277660168379*G_1[13]*alpha_G_1_source[13]+0.3162277660168379*G_1[10]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[0]*G_1[9]+nu_vthsq[0]*F_0[9]+0.3162277660168379*G_1[6]*alpha_G_1_source[6]+0.3162277660168379*G_1[5]*alpha_G_1_source[5]+0.3162277660168379*G_1[3]*alpha_G_1_source[3]; - out_G_1_vperp[10] = 0.2529822128134704*alpha_G_1_source[10]*G_1[26]+0.2529822128134704*alpha_G_1_source[17]*G_1[25]+0.2828427124746191*alpha_G_1_source[6]*G_1[25]+0.2529822128134704*alpha_G_1_source[18]*G_1[24]+0.2828427124746191*alpha_G_1_source[5]*G_1[24]+0.2529822128134704*G_1[19]*alpha_G_1_source[23]+0.2828427124746191*G_1[4]*alpha_G_1_source[23]+0.2828427124746191*alpha_G_1_source[4]*G_1[23]+0.8*nu_vthsq[3]*F_0[23]+0.2828427124746191*alpha_G_1_source[10]*G_1[22]+0.2828427124746191*alpha_G_1_source[10]*G_1[21]+0.2828427124746191*G_1[10]*alpha_G_1_source[20]+0.2828427124746191*alpha_G_1_source[10]*G_1[20]+0.282842712474619*alpha_G_1_source[14]*G_1[19]+0.282842712474619*alpha_G_1_source[13]*G_1[19]+0.3162277660168379*alpha_G_1_source[3]*G_1[19]+0.282842712474619*G_1[16]*alpha_G_1_source[18]+0.282842712474619*G_1[11]*alpha_G_1_source[18]+0.3162277660168379*G_1[2]*alpha_G_1_source[18]+0.282842712474619*alpha_G_1_source[11]*G_1[18]+0.3162277660168379*alpha_G_1_source[2]*G_1[18]+0.8*nu_vthsq[6]*F_0[18]+0.8944271909999159*nu_vthsq[2]*F_0[18]+0.282842712474619*G_1[15]*alpha_G_1_source[17]+0.282842712474619*G_1[12]*alpha_G_1_source[17]+0.3162277660168379*G_1[1]*alpha_G_1_source[17]+0.282842712474619*alpha_G_1_source[12]*G_1[17]+0.3162277660168379*alpha_G_1_source[1]*G_1[17]+0.8*nu_vthsq[7]*F_0[17]+0.8944271909999159*nu_vthsq[1]*F_0[17]+0.3162277660168379*alpha_G_1_source[5]*G_1[16]+0.3162277660168379*alpha_G_1_source[6]*G_1[15]+0.3162277660168379*G_1[4]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[4]*G_1[14]+0.8944271909999161*nu_vthsq[3]*F_0[14]+0.3162277660168379*G_1[4]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[4]*G_1[13]+0.8944271909999161*nu_vthsq[3]*F_0[13]+0.3162277660168379*G_1[6]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[6]*G_1[12]+0.3162277660168379*G_1[5]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[5]*G_1[11]+0.3162277660168379*G_1[9]*alpha_G_1_source[10]+0.3162277660168379*G_1[8]*alpha_G_1_source[10]+0.3162277660168379*G_1[7]*alpha_G_1_source[10]+0.3535533905932737*G_1[0]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[8]*G_1[10]+0.3162277660168379*alpha_G_1_source[7]*G_1[10]+0.3535533905932737*alpha_G_1_source[0]*G_1[10]+0.8*nu_vthsq[8]*F_0[10]+0.8944271909999159*nu_vthsq[5]*F_0[10]+0.8944271909999159*nu_vthsq[4]*F_0[10]+nu_vthsq[0]*F_0[10]+0.8944271909999161*F_0[6]*nu_vthsq[7]+0.8944271909999161*F_0[5]*nu_vthsq[6]+0.3535533905932737*G_1[1]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[1]*G_1[6]+nu_vthsq[1]*F_0[6]+0.3535533905932737*G_1[2]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[2]*G_1[5]+nu_vthsq[2]*F_0[5]+0.3535533905932737*G_1[3]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[3]*G_1[4]+F_0[3]*nu_vthsq[3]; - out_G_1_vperp[11] = 0.2020305089104422*G_1[17]*alpha_G_1_source[23]+0.3162277660168379*G_1[6]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[17]*G_1[23]+0.3162277660168379*alpha_G_1_source[6]*G_1[23]+0.2020305089104422*G_1[11]*alpha_G_1_source[20]+0.3162277660168379*G_1[2]*alpha_G_1_source[20]+0.2020305089104422*alpha_G_1_source[11]*G_1[20]+0.3162277660168379*alpha_G_1_source[2]*G_1[20]+0.5714285714285714*nu_vthsq[6]*F_0[20]+0.8944271909999161*nu_vthsq[2]*F_0[20]+0.282842712474619*G_1[10]*alpha_G_1_source[18]+0.282842712474619*alpha_G_1_source[10]*G_1[18]+0.3162277660168379*G_1[14]*alpha_G_1_source[17]+0.2258769757263128*G_1[13]*alpha_G_1_source[17]+0.3535533905932737*G_1[3]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[14]*G_1[17]+0.2258769757263128*alpha_G_1_source[13]*G_1[17]+0.3535533905932737*alpha_G_1_source[3]*G_1[17]+0.3535533905932737*G_1[6]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[6]*G_1[13]+0.2828427124746191*G_1[4]*alpha_G_1_source[12]+0.2828427124746191*alpha_G_1_source[4]*G_1[12]+0.8*nu_vthsq[3]*F_0[12]+0.3162277660168379*G_1[8]*alpha_G_1_source[11]+0.2258769757263128*G_1[7]*alpha_G_1_source[11]+0.3535533905932737*G_1[0]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[8]*G_1[11]+0.2258769757263128*alpha_G_1_source[7]*G_1[11]+0.3535533905932737*alpha_G_1_source[0]*G_1[11]+0.5714285714285714*nu_vthsq[8]*F_0[11]+0.8944271909999159*nu_vthsq[5]*F_0[11]+0.6388765649999399*nu_vthsq[4]*F_0[11]+nu_vthsq[0]*F_0[11]+0.3162277660168379*G_1[5]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[5]*G_1[10]+0.8944271909999161*F_0[2]*nu_vthsq[8]+0.8944271909999159*nu_vthsq[6]*F_0[8]+0.8*F_0[4]*nu_vthsq[7]+0.3535533905932737*G_1[2]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[2]*G_1[7]+0.6388765649999399*nu_vthsq[6]*F_0[7]+1.0*nu_vthsq[2]*F_0[7]+F_0[0]*nu_vthsq[6]+1.0*F_0[2]*nu_vthsq[4]+0.3162277660168379*G_1[1]*alpha_G_1_source[4]+0.3162277660168379*alpha_G_1_source[1]*G_1[4]+0.8944271909999161*nu_vthsq[1]*F_0[4]+0.8944271909999161*F_0[1]*nu_vthsq[3]; - out_G_1_vperp[12] = 0.2020305089104422*G_1[18]*alpha_G_1_source[23]+0.3162277660168379*G_1[5]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[18]*G_1[23]+0.3162277660168379*alpha_G_1_source[5]*G_1[23]+0.2020305089104422*G_1[12]*alpha_G_1_source[20]+0.3162277660168379*G_1[1]*alpha_G_1_source[20]+0.2020305089104422*alpha_G_1_source[12]*G_1[20]+0.3162277660168379*alpha_G_1_source[1]*G_1[20]+0.5714285714285714*nu_vthsq[7]*F_0[20]+0.8944271909999161*nu_vthsq[1]*F_0[20]+0.2258769757263128*G_1[14]*alpha_G_1_source[18]+0.3162277660168379*G_1[13]*alpha_G_1_source[18]+0.3535533905932737*G_1[3]*alpha_G_1_source[18]+0.2258769757263128*alpha_G_1_source[14]*G_1[18]+0.3162277660168379*alpha_G_1_source[13]*G_1[18]+0.3535533905932737*alpha_G_1_source[3]*G_1[18]+0.282842712474619*G_1[10]*alpha_G_1_source[17]+0.282842712474619*alpha_G_1_source[10]*G_1[17]+0.3535533905932737*G_1[5]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[5]*G_1[14]+0.2258769757263128*G_1[8]*alpha_G_1_source[12]+0.3162277660168379*G_1[7]*alpha_G_1_source[12]+0.3535533905932737*G_1[0]*alpha_G_1_source[12]+0.2258769757263128*alpha_G_1_source[8]*G_1[12]+0.3162277660168379*alpha_G_1_source[7]*G_1[12]+0.3535533905932737*alpha_G_1_source[0]*G_1[12]+0.5714285714285714*nu_vthsq[8]*F_0[12]+0.6388765649999399*nu_vthsq[5]*F_0[12]+0.8944271909999159*nu_vthsq[4]*F_0[12]+nu_vthsq[0]*F_0[12]+0.2828427124746191*G_1[4]*alpha_G_1_source[11]+0.2828427124746191*alpha_G_1_source[4]*G_1[11]+0.8*nu_vthsq[3]*F_0[11]+0.3162277660168379*G_1[6]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[6]*G_1[10]+0.8944271909999161*F_0[1]*nu_vthsq[8]+0.3535533905932737*G_1[1]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[1]*G_1[8]+0.6388765649999399*nu_vthsq[7]*F_0[8]+1.0*nu_vthsq[1]*F_0[8]+0.8944271909999159*F_0[7]*nu_vthsq[7]+F_0[0]*nu_vthsq[7]+0.8*F_0[4]*nu_vthsq[6]+1.0*F_0[1]*nu_vthsq[5]+0.3162277660168379*G_1[2]*alpha_G_1_source[4]+0.3162277660168379*alpha_G_1_source[2]*G_1[4]+0.8944271909999161*nu_vthsq[2]*F_0[4]+0.8944271909999161*F_0[2]*nu_vthsq[3]; - out_G_1_vperp[13] = 0.2020305089104422*alpha_G_1_source[23]*G_1[26]+0.3162277660168379*alpha_G_1_source[14]*G_1[26]+0.282842712474619*alpha_G_1_source[18]*G_1[25]+0.2020305089104422*alpha_G_1_source[17]*G_1[24]+0.3162277660168379*alpha_G_1_source[6]*G_1[24]+0.3162277660168379*G_1[22]*alpha_G_1_source[23]+0.2258769757263128*G_1[20]*alpha_G_1_source[23]+0.3535533905932737*G_1[8]*alpha_G_1_source[23]+0.2258769757263128*alpha_G_1_source[20]*G_1[23]+0.3535533905932737*alpha_G_1_source[8]*G_1[23]+0.63887656499994*nu_vthsq[8]*F_0[23]+1.0*nu_vthsq[5]*F_0[23]+0.2020305089104422*alpha_G_1_source[13]*G_1[21]+0.3162277660168379*alpha_G_1_source[3]*G_1[21]+0.3535533905932737*G_1[14]*alpha_G_1_source[20]+0.3535533905932737*alpha_G_1_source[14]*G_1[20]+0.282842712474619*alpha_G_1_source[10]*G_1[19]+0.3162277660168379*G_1[12]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[12]*G_1[18]+0.8944271909999159*nu_vthsq[7]*F_0[18]+0.3162277660168379*G_1[16]*alpha_G_1_source[17]+0.2258769757263128*G_1[11]*alpha_G_1_source[17]+0.3535533905932737*G_1[2]*alpha_G_1_source[17]+0.2258769757263128*alpha_G_1_source[11]*G_1[17]+0.3535533905932737*alpha_G_1_source[2]*G_1[17]+0.6388765649999399*nu_vthsq[6]*F_0[17]+1.0*nu_vthsq[2]*F_0[17]+0.2828427124746191*alpha_G_1_source[5]*G_1[15]+nu_vthsq[8]*F_0[14]+0.3162277660168379*G_1[9]*alpha_G_1_source[13]+0.2258769757263128*G_1[7]*alpha_G_1_source[13]+0.3535533905932737*G_1[0]*alpha_G_1_source[13]+0.2258769757263128*alpha_G_1_source[7]*G_1[13]+0.3535533905932737*alpha_G_1_source[0]*G_1[13]+0.6388765649999399*nu_vthsq[4]*F_0[13]+nu_vthsq[0]*F_0[13]+0.3535533905932737*G_1[6]*alpha_G_1_source[11]+0.3535533905932737*alpha_G_1_source[6]*G_1[11]+0.3162277660168379*G_1[4]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[4]*G_1[10]+0.8944271909999161*nu_vthsq[3]*F_0[10]+0.3535533905932737*G_1[3]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[3]*G_1[7]+F_0[6]*nu_vthsq[6]+0.3162277660168379*G_1[1]*alpha_G_1_source[5]+0.3162277660168379*alpha_G_1_source[1]*G_1[5]+0.8944271909999161*nu_vthsq[1]*F_0[5]+1.0*F_0[3]*nu_vthsq[4]; - out_G_1_vperp[14] = 0.2020305089104422*alpha_G_1_source[23]*G_1[26]+0.3162277660168379*alpha_G_1_source[13]*G_1[26]+0.2020305089104422*alpha_G_1_source[18]*G_1[25]+0.3162277660168379*alpha_G_1_source[5]*G_1[25]+0.282842712474619*alpha_G_1_source[17]*G_1[24]+0.3162277660168379*G_1[21]*alpha_G_1_source[23]+0.2258769757263128*G_1[20]*alpha_G_1_source[23]+0.3535533905932737*G_1[7]*alpha_G_1_source[23]+0.2258769757263128*alpha_G_1_source[20]*G_1[23]+0.3535533905932737*alpha_G_1_source[7]*G_1[23]+0.63887656499994*nu_vthsq[8]*F_0[23]+1.0*nu_vthsq[4]*F_0[23]+0.2020305089104422*alpha_G_1_source[14]*G_1[22]+0.3162277660168379*alpha_G_1_source[3]*G_1[22]+0.3535533905932737*G_1[13]*alpha_G_1_source[20]+0.3535533905932737*alpha_G_1_source[13]*G_1[20]+0.282842712474619*alpha_G_1_source[10]*G_1[19]+0.3162277660168379*G_1[15]*alpha_G_1_source[18]+0.2258769757263128*G_1[12]*alpha_G_1_source[18]+0.3535533905932737*G_1[1]*alpha_G_1_source[18]+0.2258769757263128*alpha_G_1_source[12]*G_1[18]+0.3535533905932737*alpha_G_1_source[1]*G_1[18]+0.6388765649999399*nu_vthsq[7]*F_0[18]+1.0*nu_vthsq[1]*F_0[18]+0.3162277660168379*G_1[11]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[11]*G_1[17]+0.8944271909999159*nu_vthsq[6]*F_0[17]+0.2828427124746191*alpha_G_1_source[6]*G_1[16]+0.3162277660168379*G_1[9]*alpha_G_1_source[14]+0.2258769757263128*G_1[8]*alpha_G_1_source[14]+0.3535533905932737*G_1[0]*alpha_G_1_source[14]+0.2258769757263128*alpha_G_1_source[8]*G_1[14]+0.3535533905932737*alpha_G_1_source[0]*G_1[14]+0.6388765649999399*nu_vthsq[5]*F_0[14]+nu_vthsq[0]*F_0[14]+nu_vthsq[8]*F_0[13]+0.3535533905932737*G_1[5]*alpha_G_1_source[12]+0.3535533905932737*alpha_G_1_source[5]*G_1[12]+0.3162277660168379*G_1[4]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[4]*G_1[10]+0.8944271909999161*nu_vthsq[3]*F_0[10]+0.3535533905932737*G_1[3]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[3]*G_1[8]+F_0[5]*nu_vthsq[7]+0.3162277660168379*G_1[2]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[2]*G_1[6]+0.8944271909999161*nu_vthsq[2]*F_0[6]+1.0*F_0[3]*nu_vthsq[5]; - out_G_1_vperp[15] = 0.3162277660168379*alpha_G_1_source[12]*G_1[26]+0.8944271909999159*nu_vthsq[7]*F_0[26]+0.3162277660168379*alpha_G_1_source[20]*G_1[25]+0.3535533905932737*alpha_G_1_source[8]*G_1[25]+0.8944271909999161*nu_vthsq[8]*F_0[25]+1.0*nu_vthsq[5]*F_0[25]+0.3162277660168379*alpha_G_1_source[4]*G_1[24]+0.8944271909999161*nu_vthsq[3]*F_0[24]+0.282842712474619*G_1[18]*alpha_G_1_source[23]+0.282842712474619*alpha_G_1_source[18]*G_1[23]+0.3535533905932737*alpha_G_1_source[12]*G_1[22]+nu_vthsq[7]*F_0[22]+0.3162277660168379*alpha_G_1_source[1]*G_1[21]+0.8944271909999161*nu_vthsq[1]*F_0[21]+0.3162277660168379*alpha_G_1_source[11]*G_1[19]+0.3535533905932737*alpha_G_1_source[2]*G_1[19]+0.8944271909999159*nu_vthsq[6]*F_0[19]+1.0*nu_vthsq[2]*F_0[19]+0.3162277660168379*G_1[14]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[14]*G_1[18]+0.282842712474619*G_1[10]*alpha_G_1_source[17]+0.282842712474619*alpha_G_1_source[10]*G_1[17]+0.3535533905932737*alpha_G_1_source[4]*G_1[16]+nu_vthsq[3]*F_0[16]+0.3162277660168379*alpha_G_1_source[7]*G_1[15]+0.3535533905932737*alpha_G_1_source[0]*G_1[15]+0.8944271909999159*nu_vthsq[4]*F_0[15]+nu_vthsq[0]*F_0[15]+0.2828427124746191*G_1[5]*alpha_G_1_source[13]+0.2828427124746191*alpha_G_1_source[5]*G_1[13]+0.3162277660168379*G_1[6]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[6]*G_1[10]+0.3535533905932737*alpha_G_1_source[1]*G_1[9]+1.0*nu_vthsq[1]*F_0[9]+0.3162277660168379*G_1[3]*alpha_G_1_source[5]+0.3162277660168379*alpha_G_1_source[3]*G_1[5]; - out_G_1_vperp[16] = 0.3162277660168379*alpha_G_1_source[11]*G_1[26]+0.8944271909999159*nu_vthsq[6]*F_0[26]+0.3162277660168379*alpha_G_1_source[4]*G_1[25]+0.8944271909999161*nu_vthsq[3]*F_0[25]+0.3162277660168379*alpha_G_1_source[20]*G_1[24]+0.3535533905932737*alpha_G_1_source[7]*G_1[24]+0.8944271909999161*nu_vthsq[8]*F_0[24]+1.0*nu_vthsq[4]*F_0[24]+0.282842712474619*G_1[17]*alpha_G_1_source[23]+0.282842712474619*alpha_G_1_source[17]*G_1[23]+0.3162277660168379*alpha_G_1_source[2]*G_1[22]+0.8944271909999161*nu_vthsq[2]*F_0[22]+0.3535533905932737*alpha_G_1_source[11]*G_1[21]+nu_vthsq[6]*F_0[21]+0.3162277660168379*alpha_G_1_source[12]*G_1[19]+0.3535533905932737*alpha_G_1_source[1]*G_1[19]+0.8944271909999159*nu_vthsq[7]*F_0[19]+1.0*nu_vthsq[1]*F_0[19]+0.282842712474619*G_1[10]*alpha_G_1_source[18]+0.282842712474619*alpha_G_1_source[10]*G_1[18]+0.3162277660168379*G_1[13]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[13]*G_1[17]+0.3162277660168379*alpha_G_1_source[8]*G_1[16]+0.3535533905932737*alpha_G_1_source[0]*G_1[16]+0.8944271909999159*nu_vthsq[5]*F_0[16]+nu_vthsq[0]*F_0[16]+0.3535533905932737*alpha_G_1_source[4]*G_1[15]+nu_vthsq[3]*F_0[15]+0.2828427124746191*G_1[6]*alpha_G_1_source[14]+0.2828427124746191*alpha_G_1_source[6]*G_1[14]+0.3162277660168379*G_1[5]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[5]*G_1[10]+0.3535533905932737*alpha_G_1_source[2]*G_1[9]+1.0*nu_vthsq[2]*F_0[9]+0.3162277660168379*G_1[3]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[3]*G_1[6]; - out_G_1_vperp[17] = 0.1807015805810503*alpha_G_1_source[17]*G_1[26]+0.2828427124746191*alpha_G_1_source[6]*G_1[26]+0.2529822128134704*alpha_G_1_source[10]*G_1[25]+0.1807015805810503*alpha_G_1_source[23]*G_1[24]+0.282842712474619*alpha_G_1_source[14]*G_1[24]+0.2020305089104422*alpha_G_1_source[13]*G_1[24]+0.3162277660168379*alpha_G_1_source[3]*G_1[24]+0.282842712474619*G_1[16]*alpha_G_1_source[23]+0.2020305089104422*G_1[11]*alpha_G_1_source[23]+0.3162277660168379*G_1[2]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[11]*G_1[23]+0.3162277660168379*alpha_G_1_source[2]*G_1[23]+0.5714285714285715*nu_vthsq[6]*F_0[23]+0.8944271909999159*nu_vthsq[2]*F_0[23]+0.2828427124746191*alpha_G_1_source[17]*G_1[22]+0.2020305089104422*alpha_G_1_source[17]*G_1[21]+0.3162277660168379*alpha_G_1_source[6]*G_1[21]+0.2020305089104422*G_1[17]*alpha_G_1_source[20]+0.3162277660168379*G_1[6]*alpha_G_1_source[20]+0.2020305089104422*alpha_G_1_source[17]*G_1[20]+0.3162277660168379*alpha_G_1_source[6]*G_1[20]+0.2529822128134704*alpha_G_1_source[18]*G_1[19]+0.2828427124746191*alpha_G_1_source[5]*G_1[19]+0.2828427124746191*G_1[4]*alpha_G_1_source[18]+0.2828427124746191*alpha_G_1_source[4]*G_1[18]+0.8*nu_vthsq[3]*F_0[18]+0.3162277660168379*G_1[9]*alpha_G_1_source[17]+0.3162277660168379*G_1[8]*alpha_G_1_source[17]+0.2258769757263128*G_1[7]*alpha_G_1_source[17]+0.3535533905932737*G_1[0]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[8]*G_1[17]+0.2258769757263128*alpha_G_1_source[7]*G_1[17]+0.3535533905932737*alpha_G_1_source[0]*G_1[17]+0.5714285714285714*nu_vthsq[8]*F_0[17]+0.8944271909999159*nu_vthsq[5]*F_0[17]+0.6388765649999399*nu_vthsq[4]*F_0[17]+nu_vthsq[0]*F_0[17]+0.3162277660168379*alpha_G_1_source[13]*G_1[16]+0.282842712474619*alpha_G_1_source[10]*G_1[15]+0.3162277660168379*G_1[11]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[11]*G_1[14]+0.8944271909999159*nu_vthsq[6]*F_0[14]+0.2258769757263128*G_1[11]*alpha_G_1_source[13]+0.3535533905932737*G_1[2]*alpha_G_1_source[13]+0.2258769757263128*alpha_G_1_source[11]*G_1[13]+0.3535533905932737*alpha_G_1_source[2]*G_1[13]+0.6388765649999399*nu_vthsq[6]*F_0[13]+1.0*nu_vthsq[2]*F_0[13]+0.282842712474619*G_1[10]*alpha_G_1_source[12]+0.282842712474619*alpha_G_1_source[10]*G_1[12]+0.3535533905932737*G_1[3]*alpha_G_1_source[11]+0.3535533905932737*alpha_G_1_source[3]*G_1[11]+0.3162277660168379*G_1[1]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[1]*G_1[10]+0.8*nu_vthsq[7]*F_0[10]+0.8944271909999159*nu_vthsq[1]*F_0[10]+0.8944271909999159*F_0[6]*nu_vthsq[8]+0.3535533905932737*G_1[6]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[6]*G_1[7]+1.0*F_0[3]*nu_vthsq[6]+nu_vthsq[4]*F_0[6]+0.3162277660168379*G_1[4]*alpha_G_1_source[5]+0.3162277660168379*alpha_G_1_source[4]*G_1[5]+0.8944271909999159*nu_vthsq[3]*F_0[5]; - out_G_1_vperp[18] = 0.1807015805810503*alpha_G_1_source[18]*G_1[26]+0.2828427124746191*alpha_G_1_source[5]*G_1[26]+0.1807015805810503*alpha_G_1_source[23]*G_1[25]+0.2020305089104422*alpha_G_1_source[14]*G_1[25]+0.282842712474619*alpha_G_1_source[13]*G_1[25]+0.3162277660168379*alpha_G_1_source[3]*G_1[25]+0.2529822128134704*alpha_G_1_source[10]*G_1[24]+0.282842712474619*G_1[15]*alpha_G_1_source[23]+0.2020305089104422*G_1[12]*alpha_G_1_source[23]+0.3162277660168379*G_1[1]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[12]*G_1[23]+0.3162277660168379*alpha_G_1_source[1]*G_1[23]+0.5714285714285715*nu_vthsq[7]*F_0[23]+0.8944271909999159*nu_vthsq[1]*F_0[23]+0.2020305089104422*alpha_G_1_source[18]*G_1[22]+0.3162277660168379*alpha_G_1_source[5]*G_1[22]+0.2828427124746191*alpha_G_1_source[18]*G_1[21]+0.2020305089104422*G_1[18]*alpha_G_1_source[20]+0.3162277660168379*G_1[5]*alpha_G_1_source[20]+0.2020305089104422*alpha_G_1_source[18]*G_1[20]+0.3162277660168379*alpha_G_1_source[5]*G_1[20]+0.2529822128134704*alpha_G_1_source[17]*G_1[19]+0.2828427124746191*alpha_G_1_source[6]*G_1[19]+0.3162277660168379*G_1[9]*alpha_G_1_source[18]+0.2258769757263128*G_1[8]*alpha_G_1_source[18]+0.3162277660168379*G_1[7]*alpha_G_1_source[18]+0.3535533905932737*G_1[0]*alpha_G_1_source[18]+0.2258769757263128*alpha_G_1_source[8]*G_1[18]+0.3162277660168379*alpha_G_1_source[7]*G_1[18]+0.3535533905932737*alpha_G_1_source[0]*G_1[18]+0.5714285714285714*nu_vthsq[8]*F_0[18]+0.6388765649999399*nu_vthsq[5]*F_0[18]+0.8944271909999159*nu_vthsq[4]*F_0[18]+nu_vthsq[0]*F_0[18]+0.2828427124746191*G_1[4]*alpha_G_1_source[17]+0.2828427124746191*alpha_G_1_source[4]*G_1[17]+0.8*nu_vthsq[3]*F_0[17]+0.282842712474619*alpha_G_1_source[10]*G_1[16]+0.3162277660168379*alpha_G_1_source[14]*G_1[15]+0.2258769757263128*G_1[12]*alpha_G_1_source[14]+0.3535533905932737*G_1[1]*alpha_G_1_source[14]+0.2258769757263128*alpha_G_1_source[12]*G_1[14]+0.3535533905932737*alpha_G_1_source[1]*G_1[14]+0.6388765649999399*nu_vthsq[7]*F_0[14]+1.0*nu_vthsq[1]*F_0[14]+0.3162277660168379*G_1[12]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[12]*G_1[13]+0.8944271909999159*nu_vthsq[7]*F_0[13]+0.3535533905932737*G_1[3]*alpha_G_1_source[12]+0.3535533905932737*alpha_G_1_source[3]*G_1[12]+0.282842712474619*G_1[10]*alpha_G_1_source[11]+0.282842712474619*alpha_G_1_source[10]*G_1[11]+0.3162277660168379*G_1[2]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[2]*G_1[10]+0.8*nu_vthsq[6]*F_0[10]+0.8944271909999159*nu_vthsq[2]*F_0[10]+0.8944271909999159*F_0[5]*nu_vthsq[8]+0.3535533905932737*G_1[5]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[5]*G_1[8]+1.0*F_0[3]*nu_vthsq[7]+0.3162277660168379*G_1[4]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[4]*G_1[6]+0.8944271909999159*nu_vthsq[3]*F_0[6]+F_0[5]*nu_vthsq[5]; - out_G_1_vperp[19] = 0.2828427124746191*alpha_G_1_source[4]*G_1[26]+0.8*nu_vthsq[3]*F_0[26]+0.282842712474619*alpha_G_1_source[11]*G_1[25]+0.3162277660168379*alpha_G_1_source[2]*G_1[25]+0.8*nu_vthsq[6]*F_0[25]+0.8944271909999159*nu_vthsq[2]*F_0[25]+0.282842712474619*alpha_G_1_source[12]*G_1[24]+0.3162277660168379*alpha_G_1_source[1]*G_1[24]+0.8*nu_vthsq[7]*F_0[24]+0.8944271909999159*nu_vthsq[1]*F_0[24]+0.2529822128134704*G_1[10]*alpha_G_1_source[23]+0.2529822128134704*alpha_G_1_source[10]*G_1[23]+0.3162277660168379*alpha_G_1_source[4]*G_1[22]+0.8944271909999159*nu_vthsq[3]*F_0[22]+0.3162277660168379*alpha_G_1_source[4]*G_1[21]+0.8944271909999159*nu_vthsq[3]*F_0[21]+0.2828427124746191*G_1[19]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[8]*G_1[19]+0.3162277660168379*alpha_G_1_source[7]*G_1[19]+0.3535533905932737*alpha_G_1_source[0]*G_1[19]+0.8*nu_vthsq[8]*F_0[19]+0.8944271909999159*nu_vthsq[5]*F_0[19]+0.8944271909999159*nu_vthsq[4]*F_0[19]+nu_vthsq[0]*F_0[19]+0.2529822128134704*G_1[17]*alpha_G_1_source[18]+0.2828427124746191*G_1[6]*alpha_G_1_source[18]+0.2529822128134704*alpha_G_1_source[17]*G_1[18]+0.2828427124746191*alpha_G_1_source[6]*G_1[18]+0.2828427124746191*G_1[5]*alpha_G_1_source[17]+0.2828427124746191*alpha_G_1_source[5]*G_1[17]+0.3162277660168379*alpha_G_1_source[12]*G_1[16]+0.3535533905932737*alpha_G_1_source[1]*G_1[16]+0.8944271909999159*nu_vthsq[7]*F_0[16]+1.0*nu_vthsq[1]*F_0[16]+0.3162277660168379*alpha_G_1_source[11]*G_1[15]+0.3535533905932737*alpha_G_1_source[2]*G_1[15]+0.8944271909999159*nu_vthsq[6]*F_0[15]+1.0*nu_vthsq[2]*F_0[15]+0.282842712474619*G_1[10]*alpha_G_1_source[14]+0.282842712474619*alpha_G_1_source[10]*G_1[14]+0.282842712474619*G_1[10]*alpha_G_1_source[13]+0.282842712474619*alpha_G_1_source[10]*G_1[13]+0.3162277660168379*G_1[3]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[3]*G_1[10]+0.3535533905932737*alpha_G_1_source[4]*G_1[9]+nu_vthsq[3]*F_0[9]+0.3162277660168379*G_1[5]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[5]*G_1[6]; - out_G_1_vperp[20] = 0.1443075063646015*G_1[23]*alpha_G_1_source[23]+0.2258769757263128*G_1[14]*alpha_G_1_source[23]+0.2258769757263128*G_1[13]*alpha_G_1_source[23]+0.3535533905932737*G_1[3]*alpha_G_1_source[23]+0.2258769757263128*alpha_G_1_source[14]*G_1[23]+0.2258769757263128*alpha_G_1_source[13]*G_1[23]+0.3535533905932737*alpha_G_1_source[3]*G_1[23]+0.1443075063646015*G_1[20]*alpha_G_1_source[20]+0.2258769757263128*G_1[8]*alpha_G_1_source[20]+0.2258769757263128*G_1[7]*alpha_G_1_source[20]+0.3535533905932737*G_1[0]*alpha_G_1_source[20]+0.2258769757263128*alpha_G_1_source[8]*G_1[20]+0.2258769757263128*alpha_G_1_source[7]*G_1[20]+0.3535533905932737*alpha_G_1_source[0]*G_1[20]+0.4081632653061225*nu_vthsq[8]*F_0[20]+0.6388765649999399*nu_vthsq[5]*F_0[20]+0.6388765649999399*nu_vthsq[4]*F_0[20]+nu_vthsq[0]*F_0[20]+0.2020305089104422*G_1[18]*alpha_G_1_source[18]+0.3162277660168379*G_1[5]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[5]*G_1[18]+0.2020305089104422*G_1[17]*alpha_G_1_source[17]+0.3162277660168379*G_1[6]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[6]*G_1[17]+0.3535533905932737*G_1[13]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[13]*G_1[14]+0.2020305089104422*G_1[12]*alpha_G_1_source[12]+0.3162277660168379*G_1[1]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[1]*G_1[12]+0.5714285714285714*nu_vthsq[7]*F_0[12]+0.8944271909999161*nu_vthsq[1]*F_0[12]+0.2020305089104422*G_1[11]*alpha_G_1_source[11]+0.3162277660168379*G_1[2]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[2]*G_1[11]+0.5714285714285714*nu_vthsq[6]*F_0[11]+0.8944271909999161*nu_vthsq[2]*F_0[11]+0.2828427124746191*G_1[10]*alpha_G_1_source[10]+0.6388765649999399*F_0[8]*nu_vthsq[8]+0.6388765649999399*F_0[7]*nu_vthsq[8]+F_0[0]*nu_vthsq[8]+0.3535533905932737*G_1[7]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[7]*G_1[8]+nu_vthsq[4]*F_0[8]+0.8944271909999161*F_0[1]*nu_vthsq[7]+nu_vthsq[5]*F_0[7]+0.8944271909999161*F_0[2]*nu_vthsq[6]+0.2828427124746191*G_1[4]*alpha_G_1_source[4]+0.8*nu_vthsq[3]*F_0[4]; - out_G_1_vperp[21] = 0.2258769757263128*alpha_G_1_source[20]*G_1[26]+0.3535533905932737*alpha_G_1_source[8]*G_1[26]+0.6388765649999399*nu_vthsq[8]*F_0[26]+nu_vthsq[5]*F_0[26]+0.3162277660168379*alpha_G_1_source[12]*G_1[25]+0.8944271909999161*nu_vthsq[7]*F_0[25]+0.2258769757263128*alpha_G_1_source[11]*G_1[24]+0.3535533905932737*alpha_G_1_source[2]*G_1[24]+0.63887656499994*nu_vthsq[6]*F_0[24]+nu_vthsq[2]*F_0[24]+0.2020305089104422*G_1[23]*alpha_G_1_source[23]+0.3162277660168379*G_1[14]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[14]*G_1[23]+0.3535533905932737*alpha_G_1_source[20]*G_1[22]+nu_vthsq[8]*F_0[22]+0.2258769757263128*alpha_G_1_source[7]*G_1[21]+0.3535533905932737*alpha_G_1_source[0]*G_1[21]+0.6388765649999399*nu_vthsq[4]*F_0[21]+nu_vthsq[0]*F_0[21]+0.3162277660168379*alpha_G_1_source[4]*G_1[19]+0.8944271909999159*nu_vthsq[3]*F_0[19]+0.2828427124746191*G_1[18]*alpha_G_1_source[18]+0.2020305089104422*G_1[17]*alpha_G_1_source[17]+0.3162277660168379*G_1[6]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[6]*G_1[17]+0.3535533905932737*alpha_G_1_source[11]*G_1[16]+nu_vthsq[6]*F_0[16]+0.3162277660168379*alpha_G_1_source[1]*G_1[15]+0.8944271909999161*nu_vthsq[1]*F_0[15]+0.2020305089104422*G_1[13]*alpha_G_1_source[13]+0.3162277660168379*G_1[3]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[3]*G_1[13]+0.2828427124746191*G_1[10]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[7]*G_1[9]+nu_vthsq[4]*F_0[9]+0.2828427124746191*G_1[5]*alpha_G_1_source[5]; - out_G_1_vperp[22] = 0.2258769757263128*alpha_G_1_source[20]*G_1[26]+0.3535533905932737*alpha_G_1_source[7]*G_1[26]+0.6388765649999399*nu_vthsq[8]*F_0[26]+nu_vthsq[4]*F_0[26]+0.2258769757263128*alpha_G_1_source[12]*G_1[25]+0.3535533905932737*alpha_G_1_source[1]*G_1[25]+0.63887656499994*nu_vthsq[7]*F_0[25]+nu_vthsq[1]*F_0[25]+0.3162277660168379*alpha_G_1_source[11]*G_1[24]+0.8944271909999161*nu_vthsq[6]*F_0[24]+0.2020305089104422*G_1[23]*alpha_G_1_source[23]+0.3162277660168379*G_1[13]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[13]*G_1[23]+0.2258769757263128*alpha_G_1_source[8]*G_1[22]+0.3535533905932737*alpha_G_1_source[0]*G_1[22]+0.6388765649999399*nu_vthsq[5]*F_0[22]+nu_vthsq[0]*F_0[22]+0.3535533905932737*alpha_G_1_source[20]*G_1[21]+nu_vthsq[8]*F_0[21]+0.3162277660168379*alpha_G_1_source[4]*G_1[19]+0.8944271909999159*nu_vthsq[3]*F_0[19]+0.2020305089104422*G_1[18]*alpha_G_1_source[18]+0.3162277660168379*G_1[5]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[5]*G_1[18]+0.2828427124746191*G_1[17]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[2]*G_1[16]+0.8944271909999161*nu_vthsq[2]*F_0[16]+0.3535533905932737*alpha_G_1_source[12]*G_1[15]+nu_vthsq[7]*F_0[15]+0.2020305089104422*G_1[14]*alpha_G_1_source[14]+0.3162277660168379*G_1[3]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[3]*G_1[14]+0.2828427124746191*G_1[10]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[8]*G_1[9]+nu_vthsq[5]*F_0[9]+0.2828427124746191*G_1[6]*alpha_G_1_source[6]; - out_G_1_vperp[23] = 0.1290725575578931*alpha_G_1_source[23]*G_1[26]+0.2020305089104422*alpha_G_1_source[14]*G_1[26]+0.2020305089104422*alpha_G_1_source[13]*G_1[26]+0.3162277660168379*alpha_G_1_source[3]*G_1[26]+0.1807015805810503*alpha_G_1_source[18]*G_1[25]+0.2828427124746191*alpha_G_1_source[5]*G_1[25]+0.1807015805810503*alpha_G_1_source[17]*G_1[24]+0.2828427124746191*alpha_G_1_source[6]*G_1[24]+0.2020305089104422*G_1[22]*alpha_G_1_source[23]+0.2020305089104422*G_1[21]*alpha_G_1_source[23]+0.1443075063646015*G_1[20]*alpha_G_1_source[23]+0.3162277660168379*G_1[9]*alpha_G_1_source[23]+0.2258769757263128*G_1[8]*alpha_G_1_source[23]+0.2258769757263128*G_1[7]*alpha_G_1_source[23]+0.3535533905932737*G_1[0]*alpha_G_1_source[23]+0.1443075063646015*alpha_G_1_source[20]*G_1[23]+0.2258769757263128*alpha_G_1_source[8]*G_1[23]+0.2258769757263128*alpha_G_1_source[7]*G_1[23]+0.3535533905932737*alpha_G_1_source[0]*G_1[23]+0.4081632653061225*nu_vthsq[8]*F_0[23]+0.6388765649999399*nu_vthsq[5]*F_0[23]+0.6388765649999399*nu_vthsq[4]*F_0[23]+nu_vthsq[0]*F_0[23]+0.3162277660168379*alpha_G_1_source[13]*G_1[22]+0.3162277660168379*alpha_G_1_source[14]*G_1[21]+0.2258769757263128*G_1[14]*alpha_G_1_source[20]+0.2258769757263128*G_1[13]*alpha_G_1_source[20]+0.3535533905932737*G_1[3]*alpha_G_1_source[20]+0.2258769757263128*alpha_G_1_source[14]*G_1[20]+0.2258769757263128*alpha_G_1_source[13]*G_1[20]+0.3535533905932737*alpha_G_1_source[3]*G_1[20]+0.2529822128134704*alpha_G_1_source[10]*G_1[19]+0.282842712474619*G_1[15]*alpha_G_1_source[18]+0.2020305089104422*G_1[12]*alpha_G_1_source[18]+0.3162277660168379*G_1[1]*alpha_G_1_source[18]+0.2020305089104422*alpha_G_1_source[12]*G_1[18]+0.3162277660168379*alpha_G_1_source[1]*G_1[18]+0.5714285714285715*nu_vthsq[7]*F_0[18]+0.8944271909999159*nu_vthsq[1]*F_0[18]+0.282842712474619*G_1[16]*alpha_G_1_source[17]+0.2020305089104422*G_1[11]*alpha_G_1_source[17]+0.3162277660168379*G_1[2]*alpha_G_1_source[17]+0.2020305089104422*alpha_G_1_source[11]*G_1[17]+0.3162277660168379*alpha_G_1_source[2]*G_1[17]+0.5714285714285715*nu_vthsq[6]*F_0[17]+0.8944271909999159*nu_vthsq[2]*F_0[17]+0.3535533905932737*G_1[7]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[7]*G_1[14]+0.63887656499994*nu_vthsq[8]*F_0[14]+1.0*nu_vthsq[4]*F_0[14]+0.3535533905932737*G_1[8]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[8]*G_1[13]+0.63887656499994*nu_vthsq[8]*F_0[13]+1.0*nu_vthsq[5]*F_0[13]+0.3162277660168379*G_1[5]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[5]*G_1[12]+0.3162277660168379*G_1[6]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[6]*G_1[11]+0.2828427124746191*G_1[4]*alpha_G_1_source[10]+0.2828427124746191*alpha_G_1_source[4]*G_1[10]+0.8*nu_vthsq[3]*F_0[10]+F_0[3]*nu_vthsq[8]+0.8944271909999161*F_0[5]*nu_vthsq[7]+0.8944271909999161*F_0[6]*nu_vthsq[6]; - out_G_1_vperp[24] = 0.2020305089104422*alpha_G_1_source[11]*G_1[26]+0.3162277660168379*alpha_G_1_source[2]*G_1[26]+0.5714285714285715*nu_vthsq[6]*F_0[26]+0.8944271909999159*nu_vthsq[2]*F_0[26]+0.2828427124746191*alpha_G_1_source[4]*G_1[25]+0.8*nu_vthsq[3]*F_0[25]+0.2020305089104422*alpha_G_1_source[20]*G_1[24]+0.3162277660168379*alpha_G_1_source[8]*G_1[24]+0.2258769757263128*alpha_G_1_source[7]*G_1[24]+0.3535533905932737*alpha_G_1_source[0]*G_1[24]+0.5714285714285714*nu_vthsq[8]*F_0[24]+0.8944271909999159*nu_vthsq[5]*F_0[24]+0.6388765649999399*nu_vthsq[4]*F_0[24]+nu_vthsq[0]*F_0[24]+0.1807015805810503*G_1[17]*alpha_G_1_source[23]+0.2828427124746191*G_1[6]*alpha_G_1_source[23]+0.1807015805810503*alpha_G_1_source[17]*G_1[23]+0.2828427124746191*alpha_G_1_source[6]*G_1[23]+0.3162277660168379*alpha_G_1_source[11]*G_1[22]+0.8944271909999161*nu_vthsq[6]*F_0[22]+0.2258769757263128*alpha_G_1_source[11]*G_1[21]+0.3535533905932737*alpha_G_1_source[2]*G_1[21]+0.63887656499994*nu_vthsq[6]*F_0[21]+nu_vthsq[2]*F_0[21]+0.3162277660168379*G_1[16]*alpha_G_1_source[20]+0.282842712474619*alpha_G_1_source[12]*G_1[19]+0.3162277660168379*alpha_G_1_source[1]*G_1[19]+0.8*nu_vthsq[7]*F_0[19]+0.8944271909999159*nu_vthsq[1]*F_0[19]+0.2529822128134704*G_1[10]*alpha_G_1_source[18]+0.2529822128134704*alpha_G_1_source[10]*G_1[18]+0.282842712474619*G_1[14]*alpha_G_1_source[17]+0.2020305089104422*G_1[13]*alpha_G_1_source[17]+0.3162277660168379*G_1[3]*alpha_G_1_source[17]+0.282842712474619*alpha_G_1_source[14]*G_1[17]+0.2020305089104422*alpha_G_1_source[13]*G_1[17]+0.3162277660168379*alpha_G_1_source[3]*G_1[17]+0.3535533905932737*alpha_G_1_source[7]*G_1[16]+0.8944271909999161*nu_vthsq[8]*F_0[16]+1.0*nu_vthsq[4]*F_0[16]+0.3162277660168379*alpha_G_1_source[4]*G_1[15]+0.8944271909999161*nu_vthsq[3]*F_0[15]+0.3162277660168379*G_1[6]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[6]*G_1[13]+0.3535533905932737*G_1[9]*alpha_G_1_source[11]+0.2828427124746191*G_1[5]*alpha_G_1_source[10]+0.2828427124746191*alpha_G_1_source[5]*G_1[10]+1.0*nu_vthsq[6]*F_0[9]; - out_G_1_vperp[25] = 0.2020305089104422*alpha_G_1_source[12]*G_1[26]+0.3162277660168379*alpha_G_1_source[1]*G_1[26]+0.5714285714285715*nu_vthsq[7]*F_0[26]+0.8944271909999159*nu_vthsq[1]*F_0[26]+0.2020305089104422*alpha_G_1_source[20]*G_1[25]+0.2258769757263128*alpha_G_1_source[8]*G_1[25]+0.3162277660168379*alpha_G_1_source[7]*G_1[25]+0.3535533905932737*alpha_G_1_source[0]*G_1[25]+0.5714285714285714*nu_vthsq[8]*F_0[25]+0.6388765649999399*nu_vthsq[5]*F_0[25]+0.8944271909999159*nu_vthsq[4]*F_0[25]+nu_vthsq[0]*F_0[25]+0.2828427124746191*alpha_G_1_source[4]*G_1[24]+0.8*nu_vthsq[3]*F_0[24]+0.1807015805810503*G_1[18]*alpha_G_1_source[23]+0.2828427124746191*G_1[5]*alpha_G_1_source[23]+0.1807015805810503*alpha_G_1_source[18]*G_1[23]+0.2828427124746191*alpha_G_1_source[5]*G_1[23]+0.2258769757263128*alpha_G_1_source[12]*G_1[22]+0.3535533905932737*alpha_G_1_source[1]*G_1[22]+0.63887656499994*nu_vthsq[7]*F_0[22]+nu_vthsq[1]*F_0[22]+0.3162277660168379*alpha_G_1_source[12]*G_1[21]+0.8944271909999161*nu_vthsq[7]*F_0[21]+0.3162277660168379*G_1[15]*alpha_G_1_source[20]+0.282842712474619*alpha_G_1_source[11]*G_1[19]+0.3162277660168379*alpha_G_1_source[2]*G_1[19]+0.8*nu_vthsq[6]*F_0[19]+0.8944271909999159*nu_vthsq[2]*F_0[19]+0.2020305089104422*G_1[14]*alpha_G_1_source[18]+0.282842712474619*G_1[13]*alpha_G_1_source[18]+0.3162277660168379*G_1[3]*alpha_G_1_source[18]+0.2020305089104422*alpha_G_1_source[14]*G_1[18]+0.282842712474619*alpha_G_1_source[13]*G_1[18]+0.3162277660168379*alpha_G_1_source[3]*G_1[18]+0.2529822128134704*G_1[10]*alpha_G_1_source[17]+0.2529822128134704*alpha_G_1_source[10]*G_1[17]+0.3162277660168379*alpha_G_1_source[4]*G_1[16]+0.8944271909999161*nu_vthsq[3]*F_0[16]+0.3535533905932737*alpha_G_1_source[8]*G_1[15]+0.8944271909999161*nu_vthsq[8]*F_0[15]+1.0*nu_vthsq[5]*F_0[15]+0.3162277660168379*G_1[5]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[5]*G_1[14]+0.3535533905932737*G_1[9]*alpha_G_1_source[12]+0.2828427124746191*G_1[6]*alpha_G_1_source[10]+0.2828427124746191*alpha_G_1_source[6]*G_1[10]+1.0*nu_vthsq[7]*F_0[9]; - out_G_1_vperp[26] = 0.1443075063646015*alpha_G_1_source[20]*G_1[26]+0.2258769757263128*alpha_G_1_source[8]*G_1[26]+0.2258769757263128*alpha_G_1_source[7]*G_1[26]+0.3535533905932737*alpha_G_1_source[0]*G_1[26]+0.4081632653061225*nu_vthsq[8]*F_0[26]+0.6388765649999399*nu_vthsq[5]*F_0[26]+0.6388765649999399*nu_vthsq[4]*F_0[26]+nu_vthsq[0]*F_0[26]+0.2020305089104422*alpha_G_1_source[12]*G_1[25]+0.3162277660168379*alpha_G_1_source[1]*G_1[25]+0.5714285714285715*nu_vthsq[7]*F_0[25]+0.8944271909999159*nu_vthsq[1]*F_0[25]+0.2020305089104422*alpha_G_1_source[11]*G_1[24]+0.3162277660168379*alpha_G_1_source[2]*G_1[24]+0.5714285714285715*nu_vthsq[6]*F_0[24]+0.8944271909999159*nu_vthsq[2]*F_0[24]+0.1290725575578931*G_1[23]*alpha_G_1_source[23]+0.2020305089104422*G_1[14]*alpha_G_1_source[23]+0.2020305089104422*G_1[13]*alpha_G_1_source[23]+0.3162277660168379*G_1[3]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[14]*G_1[23]+0.2020305089104422*alpha_G_1_source[13]*G_1[23]+0.3162277660168379*alpha_G_1_source[3]*G_1[23]+0.2258769757263128*alpha_G_1_source[20]*G_1[22]+0.3535533905932737*alpha_G_1_source[7]*G_1[22]+0.6388765649999399*nu_vthsq[8]*F_0[22]+nu_vthsq[4]*F_0[22]+0.2258769757263128*alpha_G_1_source[20]*G_1[21]+0.3535533905932737*alpha_G_1_source[8]*G_1[21]+0.6388765649999399*nu_vthsq[8]*F_0[21]+nu_vthsq[5]*F_0[21]+0.3535533905932737*G_1[9]*alpha_G_1_source[20]+0.2828427124746191*alpha_G_1_source[4]*G_1[19]+0.8*nu_vthsq[3]*F_0[19]+0.1807015805810503*G_1[18]*alpha_G_1_source[18]+0.2828427124746191*G_1[5]*alpha_G_1_source[18]+0.2828427124746191*alpha_G_1_source[5]*G_1[18]+0.1807015805810503*G_1[17]*alpha_G_1_source[17]+0.2828427124746191*G_1[6]*alpha_G_1_source[17]+0.2828427124746191*alpha_G_1_source[6]*G_1[17]+0.3162277660168379*alpha_G_1_source[11]*G_1[16]+0.8944271909999159*nu_vthsq[6]*F_0[16]+0.3162277660168379*alpha_G_1_source[12]*G_1[15]+0.8944271909999159*nu_vthsq[7]*F_0[15]+0.3162277660168379*G_1[13]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[13]*G_1[14]+0.2529822128134704*G_1[10]*alpha_G_1_source[10]+nu_vthsq[8]*F_0[9]; + out_G_1_vperp[0] = 0.3535533905932737*G_1[23]*alpha_G_1_source[23]+0.3535533905932737*G_1[20]*alpha_G_1_source[20]+nu_vtsq_sum[8]*F_0[20]+0.3535533905932737*G_1[18]*alpha_G_1_source[18]+0.3535533905932737*G_1[17]*alpha_G_1_source[17]+0.3535533905932737*G_1[14]*alpha_G_1_source[14]+0.3535533905932737*G_1[13]*alpha_G_1_source[13]+0.3535533905932737*G_1[12]*alpha_G_1_source[12]+nu_vtsq_sum[7]*F_0[12]+0.3535533905932737*G_1[11]*alpha_G_1_source[11]+nu_vtsq_sum[6]*F_0[11]+0.3535533905932737*G_1[10]*alpha_G_1_source[10]+0.3535533905932737*G_1[8]*alpha_G_1_source[8]+nu_vtsq_sum[5]*F_0[8]+0.3535533905932737*G_1[7]*alpha_G_1_source[7]+nu_vtsq_sum[4]*F_0[7]+0.3535533905932737*G_1[6]*alpha_G_1_source[6]+0.3535533905932737*G_1[5]*alpha_G_1_source[5]+0.3535533905932737*G_1[4]*alpha_G_1_source[4]+nu_vtsq_sum[3]*F_0[4]+0.3535533905932737*G_1[3]*alpha_G_1_source[3]+F_0[2]*nu_vtsq_sum[2]+0.3535533905932737*G_1[2]*alpha_G_1_source[2]+F_0[1]*nu_vtsq_sum[1]+0.3535533905932737*G_1[1]*alpha_G_1_source[1]+F_0[0]*nu_vtsq_sum[0]+0.3535533905932737*G_1[0]*alpha_G_1_source[0]; + out_G_1_vperp[1] = 0.3162277660168379*G_1[18]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[18]*G_1[23]+0.3162277660168379*G_1[12]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[12]*G_1[20]+0.8944271909999161*nu_vtsq_sum[7]*F_0[20]+0.3535533905932737*G_1[14]*alpha_G_1_source[18]+0.3535533905932737*alpha_G_1_source[14]*G_1[18]+0.3162277660168379*G_1[10]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[10]*G_1[17]+0.3162277660168379*G_1[5]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[5]*G_1[13]+0.3535533905932737*G_1[8]*alpha_G_1_source[12]+0.3535533905932737*alpha_G_1_source[8]*G_1[12]+0.8944271909999161*nu_vtsq_sum[8]*F_0[12]+1.0*nu_vtsq_sum[5]*F_0[12]+0.3162277660168379*G_1[4]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[4]*G_1[11]+0.8944271909999161*nu_vtsq_sum[3]*F_0[11]+0.3535533905932737*G_1[6]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[6]*G_1[10]+1.0*nu_vtsq_sum[7]*F_0[8]+0.3162277660168379*G_1[1]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[1]*G_1[7]+0.8944271909999159*nu_vtsq_sum[1]*F_0[7]+0.8944271909999161*F_0[4]*nu_vtsq_sum[6]+0.3535533905932737*G_1[3]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[3]*G_1[5]+0.8944271909999159*F_0[1]*nu_vtsq_sum[4]+0.3535533905932737*G_1[2]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[2]*G_1[4]+nu_vtsq_sum[2]*F_0[4]+F_0[2]*nu_vtsq_sum[3]+F_0[0]*nu_vtsq_sum[1]+0.3535533905932737*G_1[0]*alpha_G_1_source[1]+0.3535533905932737*alpha_G_1_source[0]*G_1[1]+nu_vtsq_sum[0]*F_0[1]; + out_G_1_vperp[2] = 0.3162277660168379*G_1[17]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[17]*G_1[23]+0.3162277660168379*G_1[11]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[11]*G_1[20]+0.8944271909999161*nu_vtsq_sum[6]*F_0[20]+0.3162277660168379*G_1[10]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[10]*G_1[18]+0.3535533905932737*G_1[13]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[13]*G_1[17]+0.3162277660168379*G_1[6]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[6]*G_1[14]+0.3162277660168379*G_1[4]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[4]*G_1[12]+0.8944271909999161*nu_vtsq_sum[3]*F_0[12]+0.3535533905932737*G_1[7]*alpha_G_1_source[11]+0.3535533905932737*alpha_G_1_source[7]*G_1[11]+0.8944271909999161*nu_vtsq_sum[8]*F_0[11]+1.0*nu_vtsq_sum[4]*F_0[11]+0.3535533905932737*G_1[5]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[5]*G_1[10]+0.3162277660168379*G_1[2]*alpha_G_1_source[8]+0.3162277660168379*alpha_G_1_source[2]*G_1[8]+0.8944271909999159*nu_vtsq_sum[2]*F_0[8]+0.8944271909999161*F_0[4]*nu_vtsq_sum[7]+1.0*nu_vtsq_sum[6]*F_0[7]+0.3535533905932737*G_1[3]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[3]*G_1[6]+0.8944271909999159*F_0[2]*nu_vtsq_sum[5]+0.3535533905932737*G_1[1]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[1]*G_1[4]+nu_vtsq_sum[1]*F_0[4]+F_0[1]*nu_vtsq_sum[3]+F_0[0]*nu_vtsq_sum[2]+0.3535533905932737*G_1[0]*alpha_G_1_source[2]+0.3535533905932737*alpha_G_1_source[0]*G_1[2]+nu_vtsq_sum[0]*F_0[2]; + out_G_1_vperp[3] = 0.3162277660168379*alpha_G_1_source[23]*G_1[26]+0.3162277660168379*alpha_G_1_source[18]*G_1[25]+0.3162277660168379*alpha_G_1_source[17]*G_1[24]+0.3535533905932737*G_1[20]*alpha_G_1_source[23]+0.3535533905932737*alpha_G_1_source[20]*G_1[23]+nu_vtsq_sum[8]*F_0[23]+0.3162277660168379*alpha_G_1_source[14]*G_1[22]+0.3162277660168379*alpha_G_1_source[13]*G_1[21]+0.3162277660168379*alpha_G_1_source[10]*G_1[19]+0.3535533905932737*G_1[12]*alpha_G_1_source[18]+0.3535533905932737*alpha_G_1_source[12]*G_1[18]+1.0*nu_vtsq_sum[7]*F_0[18]+0.3535533905932737*G_1[11]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[11]*G_1[17]+1.0*nu_vtsq_sum[6]*F_0[17]+0.3162277660168379*alpha_G_1_source[6]*G_1[16]+0.3162277660168379*alpha_G_1_source[5]*G_1[15]+0.3535533905932737*G_1[8]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[8]*G_1[14]+1.0*nu_vtsq_sum[5]*F_0[14]+0.3535533905932737*G_1[7]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[7]*G_1[13]+1.0*nu_vtsq_sum[4]*F_0[13]+0.3535533905932737*G_1[4]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[4]*G_1[10]+nu_vtsq_sum[3]*F_0[10]+0.3162277660168379*alpha_G_1_source[3]*G_1[9]+0.3535533905932737*G_1[2]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[2]*G_1[6]+nu_vtsq_sum[2]*F_0[6]+0.3535533905932737*G_1[1]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[1]*G_1[5]+nu_vtsq_sum[1]*F_0[5]+0.3535533905932737*G_1[0]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[0]*G_1[3]+nu_vtsq_sum[0]*F_0[3]; + out_G_1_vperp[4] = 0.2828427124746191*G_1[10]*alpha_G_1_source[23]+0.2828427124746191*alpha_G_1_source[10]*G_1[23]+0.2828427124746191*G_1[4]*alpha_G_1_source[20]+0.2828427124746191*alpha_G_1_source[4]*G_1[20]+0.8*nu_vtsq_sum[3]*F_0[20]+0.2828427124746191*G_1[17]*alpha_G_1_source[18]+0.3162277660168379*G_1[6]*alpha_G_1_source[18]+0.2828427124746191*alpha_G_1_source[17]*G_1[18]+0.3162277660168379*alpha_G_1_source[6]*G_1[18]+0.3162277660168379*G_1[5]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[5]*G_1[17]+0.3162277660168379*G_1[10]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[10]*G_1[14]+0.3162277660168379*G_1[10]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[10]*G_1[13]+0.2828427124746191*G_1[11]*alpha_G_1_source[12]+0.3162277660168379*G_1[2]*alpha_G_1_source[12]+0.2828427124746191*alpha_G_1_source[11]*G_1[12]+0.3162277660168379*alpha_G_1_source[2]*G_1[12]+0.8*nu_vtsq_sum[6]*F_0[12]+0.8944271909999161*nu_vtsq_sum[2]*F_0[12]+0.3162277660168379*G_1[1]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[1]*G_1[11]+0.8*nu_vtsq_sum[7]*F_0[11]+0.8944271909999161*nu_vtsq_sum[1]*F_0[11]+0.3535533905932737*G_1[3]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[3]*G_1[10]+0.8*F_0[4]*nu_vtsq_sum[8]+0.3162277660168379*G_1[4]*alpha_G_1_source[8]+0.3162277660168379*alpha_G_1_source[4]*G_1[8]+0.8944271909999159*nu_vtsq_sum[3]*F_0[8]+0.8944271909999161*F_0[2]*nu_vtsq_sum[7]+0.3162277660168379*G_1[4]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[4]*G_1[7]+0.8944271909999159*nu_vtsq_sum[3]*F_0[7]+0.8944271909999161*F_0[1]*nu_vtsq_sum[6]+0.3535533905932737*G_1[5]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[5]*G_1[6]+0.8944271909999159*F_0[4]*nu_vtsq_sum[5]+0.8944271909999159*F_0[4]*nu_vtsq_sum[4]+0.3535533905932737*G_1[0]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[0]*G_1[4]+nu_vtsq_sum[0]*F_0[4]+F_0[0]*nu_vtsq_sum[3]+F_0[1]*nu_vtsq_sum[2]+0.3535533905932737*G_1[1]*alpha_G_1_source[2]+0.3535533905932737*alpha_G_1_source[1]*G_1[2]+nu_vtsq_sum[1]*F_0[2]; + out_G_1_vperp[5] = 0.2828427124746191*alpha_G_1_source[18]*G_1[26]+0.2828427124746191*alpha_G_1_source[23]*G_1[25]+0.3162277660168379*alpha_G_1_source[14]*G_1[25]+0.2828427124746191*alpha_G_1_source[10]*G_1[24]+0.3162277660168379*G_1[12]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[12]*G_1[23]+0.8944271909999161*nu_vtsq_sum[7]*F_0[23]+0.3162277660168379*alpha_G_1_source[18]*G_1[22]+0.2828427124746191*alpha_G_1_source[5]*G_1[21]+0.3162277660168379*G_1[18]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[18]*G_1[20]+0.2828427124746191*alpha_G_1_source[17]*G_1[19]+0.3162277660168379*alpha_G_1_source[6]*G_1[19]+0.3535533905932737*G_1[8]*alpha_G_1_source[18]+0.3535533905932737*alpha_G_1_source[8]*G_1[18]+0.8944271909999159*nu_vtsq_sum[8]*F_0[18]+nu_vtsq_sum[5]*F_0[18]+0.3162277660168379*G_1[4]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[4]*G_1[17]+0.8944271909999159*nu_vtsq_sum[3]*F_0[17]+0.3162277660168379*alpha_G_1_source[10]*G_1[16]+0.2828427124746191*alpha_G_1_source[13]*G_1[15]+0.3162277660168379*alpha_G_1_source[3]*G_1[15]+0.3535533905932737*G_1[12]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[12]*G_1[14]+nu_vtsq_sum[7]*F_0[14]+0.3162277660168379*G_1[1]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[1]*G_1[13]+0.8944271909999161*nu_vtsq_sum[1]*F_0[13]+0.3162277660168379*G_1[10]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[10]*G_1[11]+0.3535533905932737*G_1[2]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[2]*G_1[10]+0.8944271909999161*nu_vtsq_sum[6]*F_0[10]+nu_vtsq_sum[2]*F_0[10]+0.3162277660168379*alpha_G_1_source[5]*G_1[9]+0.3162277660168379*G_1[5]*alpha_G_1_source[7]+0.3162277660168379*alpha_G_1_source[5]*G_1[7]+0.3535533905932737*G_1[4]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[4]*G_1[6]+nu_vtsq_sum[3]*F_0[6]+0.3535533905932737*G_1[0]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[0]*G_1[5]+0.8944271909999159*nu_vtsq_sum[4]*F_0[5]+nu_vtsq_sum[0]*F_0[5]+0.3535533905932737*G_1[1]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[1]*G_1[3]+nu_vtsq_sum[1]*F_0[3]; + out_G_1_vperp[6] = 0.2828427124746191*alpha_G_1_source[17]*G_1[26]+0.2828427124746191*alpha_G_1_source[10]*G_1[25]+0.2828427124746191*alpha_G_1_source[23]*G_1[24]+0.3162277660168379*alpha_G_1_source[13]*G_1[24]+0.3162277660168379*G_1[11]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[11]*G_1[23]+0.8944271909999161*nu_vtsq_sum[6]*F_0[23]+0.2828427124746191*alpha_G_1_source[6]*G_1[22]+0.3162277660168379*alpha_G_1_source[17]*G_1[21]+0.3162277660168379*G_1[17]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[17]*G_1[20]+0.2828427124746191*alpha_G_1_source[18]*G_1[19]+0.3162277660168379*alpha_G_1_source[5]*G_1[19]+0.3162277660168379*G_1[4]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[4]*G_1[18]+0.8944271909999159*nu_vtsq_sum[3]*F_0[18]+0.3535533905932737*G_1[7]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[7]*G_1[17]+0.8944271909999159*nu_vtsq_sum[8]*F_0[17]+nu_vtsq_sum[4]*F_0[17]+0.2828427124746191*alpha_G_1_source[14]*G_1[16]+0.3162277660168379*alpha_G_1_source[3]*G_1[16]+0.3162277660168379*alpha_G_1_source[10]*G_1[15]+0.3162277660168379*G_1[2]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[2]*G_1[14]+0.8944271909999161*nu_vtsq_sum[2]*F_0[14]+0.3535533905932737*G_1[11]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[11]*G_1[13]+nu_vtsq_sum[6]*F_0[13]+0.3162277660168379*G_1[10]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[10]*G_1[12]+0.3535533905932737*G_1[1]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[1]*G_1[10]+0.8944271909999161*nu_vtsq_sum[7]*F_0[10]+nu_vtsq_sum[1]*F_0[10]+0.3162277660168379*alpha_G_1_source[6]*G_1[9]+0.3162277660168379*G_1[6]*alpha_G_1_source[8]+0.3162277660168379*alpha_G_1_source[6]*G_1[8]+0.3535533905932737*G_1[0]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[0]*G_1[6]+0.8944271909999159*nu_vtsq_sum[5]*F_0[6]+nu_vtsq_sum[0]*F_0[6]+0.3535533905932737*G_1[4]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[4]*G_1[5]+nu_vtsq_sum[3]*F_0[5]+0.3535533905932737*G_1[2]*alpha_G_1_source[3]+0.3535533905932737*alpha_G_1_source[2]*G_1[3]+nu_vtsq_sum[2]*F_0[3]; + out_G_1_vperp[7] = 0.2258769757263128*G_1[23]*alpha_G_1_source[23]+0.3535533905932737*G_1[14]*alpha_G_1_source[23]+0.3535533905932737*alpha_G_1_source[14]*G_1[23]+0.2258769757263128*G_1[20]*alpha_G_1_source[20]+0.3535533905932737*G_1[8]*alpha_G_1_source[20]+0.3535533905932737*alpha_G_1_source[8]*G_1[20]+0.6388765649999399*nu_vtsq_sum[8]*F_0[20]+nu_vtsq_sum[5]*F_0[20]+0.3162277660168379*G_1[18]*alpha_G_1_source[18]+0.2258769757263128*G_1[17]*alpha_G_1_source[17]+0.3535533905932737*G_1[6]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[6]*G_1[17]+0.2258769757263128*G_1[13]*alpha_G_1_source[13]+0.3535533905932737*G_1[3]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[3]*G_1[13]+0.3162277660168379*G_1[12]*alpha_G_1_source[12]+0.8944271909999159*nu_vtsq_sum[7]*F_0[12]+0.2258769757263128*G_1[11]*alpha_G_1_source[11]+0.3535533905932737*G_1[2]*alpha_G_1_source[11]+0.3535533905932737*alpha_G_1_source[2]*G_1[11]+0.6388765649999399*nu_vtsq_sum[6]*F_0[11]+1.0*nu_vtsq_sum[2]*F_0[11]+0.3162277660168379*G_1[10]*alpha_G_1_source[10]+F_0[8]*nu_vtsq_sum[8]+0.2258769757263128*G_1[7]*alpha_G_1_source[7]+0.3535533905932737*G_1[0]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[0]*G_1[7]+0.6388765649999399*nu_vtsq_sum[4]*F_0[7]+nu_vtsq_sum[0]*F_0[7]+1.0*F_0[2]*nu_vtsq_sum[6]+0.3162277660168379*G_1[5]*alpha_G_1_source[5]+F_0[0]*nu_vtsq_sum[4]+0.3162277660168379*G_1[4]*alpha_G_1_source[4]+0.8944271909999159*nu_vtsq_sum[3]*F_0[4]+0.8944271909999159*F_0[1]*nu_vtsq_sum[1]+0.3162277660168379*G_1[1]*alpha_G_1_source[1]; + out_G_1_vperp[8] = 0.2258769757263128*G_1[23]*alpha_G_1_source[23]+0.3535533905932737*G_1[13]*alpha_G_1_source[23]+0.3535533905932737*alpha_G_1_source[13]*G_1[23]+0.2258769757263128*G_1[20]*alpha_G_1_source[20]+0.3535533905932737*G_1[7]*alpha_G_1_source[20]+0.3535533905932737*alpha_G_1_source[7]*G_1[20]+0.6388765649999399*nu_vtsq_sum[8]*F_0[20]+nu_vtsq_sum[4]*F_0[20]+0.2258769757263128*G_1[18]*alpha_G_1_source[18]+0.3535533905932737*G_1[5]*alpha_G_1_source[18]+0.3535533905932737*alpha_G_1_source[5]*G_1[18]+0.3162277660168379*G_1[17]*alpha_G_1_source[17]+0.2258769757263128*G_1[14]*alpha_G_1_source[14]+0.3535533905932737*G_1[3]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[3]*G_1[14]+0.2258769757263128*G_1[12]*alpha_G_1_source[12]+0.3535533905932737*G_1[1]*alpha_G_1_source[12]+0.3535533905932737*alpha_G_1_source[1]*G_1[12]+0.6388765649999399*nu_vtsq_sum[7]*F_0[12]+1.0*nu_vtsq_sum[1]*F_0[12]+0.3162277660168379*G_1[11]*alpha_G_1_source[11]+0.8944271909999159*nu_vtsq_sum[6]*F_0[11]+0.3162277660168379*G_1[10]*alpha_G_1_source[10]+F_0[7]*nu_vtsq_sum[8]+0.2258769757263128*G_1[8]*alpha_G_1_source[8]+0.3535533905932737*G_1[0]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[0]*G_1[8]+0.6388765649999399*nu_vtsq_sum[5]*F_0[8]+nu_vtsq_sum[0]*F_0[8]+1.0*F_0[1]*nu_vtsq_sum[7]+0.3162277660168379*G_1[6]*alpha_G_1_source[6]+F_0[0]*nu_vtsq_sum[5]+0.3162277660168379*G_1[4]*alpha_G_1_source[4]+0.8944271909999159*nu_vtsq_sum[3]*F_0[4]+0.8944271909999159*F_0[2]*nu_vtsq_sum[2]+0.3162277660168379*G_1[2]*alpha_G_1_source[2]; + out_G_1_vperp[9] = 0.3535533905932737*alpha_G_1_source[20]*G_1[26]+nu_vtsq_sum[8]*F_0[26]+0.3535533905932737*alpha_G_1_source[12]*G_1[25]+1.0*nu_vtsq_sum[7]*F_0[25]+0.3535533905932737*alpha_G_1_source[11]*G_1[24]+1.0*nu_vtsq_sum[6]*F_0[24]+0.3162277660168379*G_1[23]*alpha_G_1_source[23]+0.3535533905932737*alpha_G_1_source[8]*G_1[22]+nu_vtsq_sum[5]*F_0[22]+0.3535533905932737*alpha_G_1_source[7]*G_1[21]+nu_vtsq_sum[4]*F_0[21]+0.3535533905932737*alpha_G_1_source[4]*G_1[19]+nu_vtsq_sum[3]*F_0[19]+0.3162277660168379*G_1[18]*alpha_G_1_source[18]+0.3162277660168379*G_1[17]*alpha_G_1_source[17]+0.3535533905932737*alpha_G_1_source[2]*G_1[16]+1.0*nu_vtsq_sum[2]*F_0[16]+0.3535533905932737*alpha_G_1_source[1]*G_1[15]+1.0*nu_vtsq_sum[1]*F_0[15]+0.3162277660168379*G_1[14]*alpha_G_1_source[14]+0.3162277660168379*G_1[13]*alpha_G_1_source[13]+0.3162277660168379*G_1[10]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[0]*G_1[9]+nu_vtsq_sum[0]*F_0[9]+0.3162277660168379*G_1[6]*alpha_G_1_source[6]+0.3162277660168379*G_1[5]*alpha_G_1_source[5]+0.3162277660168379*G_1[3]*alpha_G_1_source[3]; + out_G_1_vperp[10] = 0.2529822128134704*alpha_G_1_source[10]*G_1[26]+0.2529822128134704*alpha_G_1_source[17]*G_1[25]+0.2828427124746191*alpha_G_1_source[6]*G_1[25]+0.2529822128134704*alpha_G_1_source[18]*G_1[24]+0.2828427124746191*alpha_G_1_source[5]*G_1[24]+0.2529822128134704*G_1[19]*alpha_G_1_source[23]+0.2828427124746191*G_1[4]*alpha_G_1_source[23]+0.2828427124746191*alpha_G_1_source[4]*G_1[23]+0.8*nu_vtsq_sum[3]*F_0[23]+0.2828427124746191*alpha_G_1_source[10]*G_1[22]+0.2828427124746191*alpha_G_1_source[10]*G_1[21]+0.2828427124746191*G_1[10]*alpha_G_1_source[20]+0.2828427124746191*alpha_G_1_source[10]*G_1[20]+0.282842712474619*alpha_G_1_source[14]*G_1[19]+0.282842712474619*alpha_G_1_source[13]*G_1[19]+0.3162277660168379*alpha_G_1_source[3]*G_1[19]+0.282842712474619*G_1[16]*alpha_G_1_source[18]+0.282842712474619*G_1[11]*alpha_G_1_source[18]+0.3162277660168379*G_1[2]*alpha_G_1_source[18]+0.282842712474619*alpha_G_1_source[11]*G_1[18]+0.3162277660168379*alpha_G_1_source[2]*G_1[18]+0.8*nu_vtsq_sum[6]*F_0[18]+0.8944271909999159*nu_vtsq_sum[2]*F_0[18]+0.282842712474619*G_1[15]*alpha_G_1_source[17]+0.282842712474619*G_1[12]*alpha_G_1_source[17]+0.3162277660168379*G_1[1]*alpha_G_1_source[17]+0.282842712474619*alpha_G_1_source[12]*G_1[17]+0.3162277660168379*alpha_G_1_source[1]*G_1[17]+0.8*nu_vtsq_sum[7]*F_0[17]+0.8944271909999159*nu_vtsq_sum[1]*F_0[17]+0.3162277660168379*alpha_G_1_source[5]*G_1[16]+0.3162277660168379*alpha_G_1_source[6]*G_1[15]+0.3162277660168379*G_1[4]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[4]*G_1[14]+0.8944271909999161*nu_vtsq_sum[3]*F_0[14]+0.3162277660168379*G_1[4]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[4]*G_1[13]+0.8944271909999161*nu_vtsq_sum[3]*F_0[13]+0.3162277660168379*G_1[6]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[6]*G_1[12]+0.3162277660168379*G_1[5]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[5]*G_1[11]+0.3162277660168379*G_1[9]*alpha_G_1_source[10]+0.3162277660168379*G_1[8]*alpha_G_1_source[10]+0.3162277660168379*G_1[7]*alpha_G_1_source[10]+0.3535533905932737*G_1[0]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[8]*G_1[10]+0.3162277660168379*alpha_G_1_source[7]*G_1[10]+0.3535533905932737*alpha_G_1_source[0]*G_1[10]+0.8*nu_vtsq_sum[8]*F_0[10]+0.8944271909999159*nu_vtsq_sum[5]*F_0[10]+0.8944271909999159*nu_vtsq_sum[4]*F_0[10]+nu_vtsq_sum[0]*F_0[10]+0.8944271909999161*F_0[6]*nu_vtsq_sum[7]+0.8944271909999161*F_0[5]*nu_vtsq_sum[6]+0.3535533905932737*G_1[1]*alpha_G_1_source[6]+0.3535533905932737*alpha_G_1_source[1]*G_1[6]+nu_vtsq_sum[1]*F_0[6]+0.3535533905932737*G_1[2]*alpha_G_1_source[5]+0.3535533905932737*alpha_G_1_source[2]*G_1[5]+nu_vtsq_sum[2]*F_0[5]+0.3535533905932737*G_1[3]*alpha_G_1_source[4]+0.3535533905932737*alpha_G_1_source[3]*G_1[4]+F_0[3]*nu_vtsq_sum[3]; + out_G_1_vperp[11] = 0.2020305089104422*G_1[17]*alpha_G_1_source[23]+0.3162277660168379*G_1[6]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[17]*G_1[23]+0.3162277660168379*alpha_G_1_source[6]*G_1[23]+0.2020305089104422*G_1[11]*alpha_G_1_source[20]+0.3162277660168379*G_1[2]*alpha_G_1_source[20]+0.2020305089104422*alpha_G_1_source[11]*G_1[20]+0.3162277660168379*alpha_G_1_source[2]*G_1[20]+0.5714285714285714*nu_vtsq_sum[6]*F_0[20]+0.8944271909999161*nu_vtsq_sum[2]*F_0[20]+0.282842712474619*G_1[10]*alpha_G_1_source[18]+0.282842712474619*alpha_G_1_source[10]*G_1[18]+0.3162277660168379*G_1[14]*alpha_G_1_source[17]+0.2258769757263128*G_1[13]*alpha_G_1_source[17]+0.3535533905932737*G_1[3]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[14]*G_1[17]+0.2258769757263128*alpha_G_1_source[13]*G_1[17]+0.3535533905932737*alpha_G_1_source[3]*G_1[17]+0.3535533905932737*G_1[6]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[6]*G_1[13]+0.2828427124746191*G_1[4]*alpha_G_1_source[12]+0.2828427124746191*alpha_G_1_source[4]*G_1[12]+0.8*nu_vtsq_sum[3]*F_0[12]+0.3162277660168379*G_1[8]*alpha_G_1_source[11]+0.2258769757263128*G_1[7]*alpha_G_1_source[11]+0.3535533905932737*G_1[0]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[8]*G_1[11]+0.2258769757263128*alpha_G_1_source[7]*G_1[11]+0.3535533905932737*alpha_G_1_source[0]*G_1[11]+0.5714285714285714*nu_vtsq_sum[8]*F_0[11]+0.8944271909999159*nu_vtsq_sum[5]*F_0[11]+0.6388765649999399*nu_vtsq_sum[4]*F_0[11]+nu_vtsq_sum[0]*F_0[11]+0.3162277660168379*G_1[5]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[5]*G_1[10]+0.8944271909999161*F_0[2]*nu_vtsq_sum[8]+0.8944271909999159*nu_vtsq_sum[6]*F_0[8]+0.8*F_0[4]*nu_vtsq_sum[7]+0.3535533905932737*G_1[2]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[2]*G_1[7]+0.6388765649999399*nu_vtsq_sum[6]*F_0[7]+1.0*nu_vtsq_sum[2]*F_0[7]+F_0[0]*nu_vtsq_sum[6]+1.0*F_0[2]*nu_vtsq_sum[4]+0.3162277660168379*G_1[1]*alpha_G_1_source[4]+0.3162277660168379*alpha_G_1_source[1]*G_1[4]+0.8944271909999161*nu_vtsq_sum[1]*F_0[4]+0.8944271909999161*F_0[1]*nu_vtsq_sum[3]; + out_G_1_vperp[12] = 0.2020305089104422*G_1[18]*alpha_G_1_source[23]+0.3162277660168379*G_1[5]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[18]*G_1[23]+0.3162277660168379*alpha_G_1_source[5]*G_1[23]+0.2020305089104422*G_1[12]*alpha_G_1_source[20]+0.3162277660168379*G_1[1]*alpha_G_1_source[20]+0.2020305089104422*alpha_G_1_source[12]*G_1[20]+0.3162277660168379*alpha_G_1_source[1]*G_1[20]+0.5714285714285714*nu_vtsq_sum[7]*F_0[20]+0.8944271909999161*nu_vtsq_sum[1]*F_0[20]+0.2258769757263128*G_1[14]*alpha_G_1_source[18]+0.3162277660168379*G_1[13]*alpha_G_1_source[18]+0.3535533905932737*G_1[3]*alpha_G_1_source[18]+0.2258769757263128*alpha_G_1_source[14]*G_1[18]+0.3162277660168379*alpha_G_1_source[13]*G_1[18]+0.3535533905932737*alpha_G_1_source[3]*G_1[18]+0.282842712474619*G_1[10]*alpha_G_1_source[17]+0.282842712474619*alpha_G_1_source[10]*G_1[17]+0.3535533905932737*G_1[5]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[5]*G_1[14]+0.2258769757263128*G_1[8]*alpha_G_1_source[12]+0.3162277660168379*G_1[7]*alpha_G_1_source[12]+0.3535533905932737*G_1[0]*alpha_G_1_source[12]+0.2258769757263128*alpha_G_1_source[8]*G_1[12]+0.3162277660168379*alpha_G_1_source[7]*G_1[12]+0.3535533905932737*alpha_G_1_source[0]*G_1[12]+0.5714285714285714*nu_vtsq_sum[8]*F_0[12]+0.6388765649999399*nu_vtsq_sum[5]*F_0[12]+0.8944271909999159*nu_vtsq_sum[4]*F_0[12]+nu_vtsq_sum[0]*F_0[12]+0.2828427124746191*G_1[4]*alpha_G_1_source[11]+0.2828427124746191*alpha_G_1_source[4]*G_1[11]+0.8*nu_vtsq_sum[3]*F_0[11]+0.3162277660168379*G_1[6]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[6]*G_1[10]+0.8944271909999161*F_0[1]*nu_vtsq_sum[8]+0.3535533905932737*G_1[1]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[1]*G_1[8]+0.6388765649999399*nu_vtsq_sum[7]*F_0[8]+1.0*nu_vtsq_sum[1]*F_0[8]+0.8944271909999159*F_0[7]*nu_vtsq_sum[7]+F_0[0]*nu_vtsq_sum[7]+0.8*F_0[4]*nu_vtsq_sum[6]+1.0*F_0[1]*nu_vtsq_sum[5]+0.3162277660168379*G_1[2]*alpha_G_1_source[4]+0.3162277660168379*alpha_G_1_source[2]*G_1[4]+0.8944271909999161*nu_vtsq_sum[2]*F_0[4]+0.8944271909999161*F_0[2]*nu_vtsq_sum[3]; + out_G_1_vperp[13] = 0.2020305089104422*alpha_G_1_source[23]*G_1[26]+0.3162277660168379*alpha_G_1_source[14]*G_1[26]+0.282842712474619*alpha_G_1_source[18]*G_1[25]+0.2020305089104422*alpha_G_1_source[17]*G_1[24]+0.3162277660168379*alpha_G_1_source[6]*G_1[24]+0.3162277660168379*G_1[22]*alpha_G_1_source[23]+0.2258769757263128*G_1[20]*alpha_G_1_source[23]+0.3535533905932737*G_1[8]*alpha_G_1_source[23]+0.2258769757263128*alpha_G_1_source[20]*G_1[23]+0.3535533905932737*alpha_G_1_source[8]*G_1[23]+0.63887656499994*nu_vtsq_sum[8]*F_0[23]+1.0*nu_vtsq_sum[5]*F_0[23]+0.2020305089104422*alpha_G_1_source[13]*G_1[21]+0.3162277660168379*alpha_G_1_source[3]*G_1[21]+0.3535533905932737*G_1[14]*alpha_G_1_source[20]+0.3535533905932737*alpha_G_1_source[14]*G_1[20]+0.282842712474619*alpha_G_1_source[10]*G_1[19]+0.3162277660168379*G_1[12]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[12]*G_1[18]+0.8944271909999159*nu_vtsq_sum[7]*F_0[18]+0.3162277660168379*G_1[16]*alpha_G_1_source[17]+0.2258769757263128*G_1[11]*alpha_G_1_source[17]+0.3535533905932737*G_1[2]*alpha_G_1_source[17]+0.2258769757263128*alpha_G_1_source[11]*G_1[17]+0.3535533905932737*alpha_G_1_source[2]*G_1[17]+0.6388765649999399*nu_vtsq_sum[6]*F_0[17]+1.0*nu_vtsq_sum[2]*F_0[17]+0.2828427124746191*alpha_G_1_source[5]*G_1[15]+nu_vtsq_sum[8]*F_0[14]+0.3162277660168379*G_1[9]*alpha_G_1_source[13]+0.2258769757263128*G_1[7]*alpha_G_1_source[13]+0.3535533905932737*G_1[0]*alpha_G_1_source[13]+0.2258769757263128*alpha_G_1_source[7]*G_1[13]+0.3535533905932737*alpha_G_1_source[0]*G_1[13]+0.6388765649999399*nu_vtsq_sum[4]*F_0[13]+nu_vtsq_sum[0]*F_0[13]+0.3535533905932737*G_1[6]*alpha_G_1_source[11]+0.3535533905932737*alpha_G_1_source[6]*G_1[11]+0.3162277660168379*G_1[4]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[4]*G_1[10]+0.8944271909999161*nu_vtsq_sum[3]*F_0[10]+0.3535533905932737*G_1[3]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[3]*G_1[7]+F_0[6]*nu_vtsq_sum[6]+0.3162277660168379*G_1[1]*alpha_G_1_source[5]+0.3162277660168379*alpha_G_1_source[1]*G_1[5]+0.8944271909999161*nu_vtsq_sum[1]*F_0[5]+1.0*F_0[3]*nu_vtsq_sum[4]; + out_G_1_vperp[14] = 0.2020305089104422*alpha_G_1_source[23]*G_1[26]+0.3162277660168379*alpha_G_1_source[13]*G_1[26]+0.2020305089104422*alpha_G_1_source[18]*G_1[25]+0.3162277660168379*alpha_G_1_source[5]*G_1[25]+0.282842712474619*alpha_G_1_source[17]*G_1[24]+0.3162277660168379*G_1[21]*alpha_G_1_source[23]+0.2258769757263128*G_1[20]*alpha_G_1_source[23]+0.3535533905932737*G_1[7]*alpha_G_1_source[23]+0.2258769757263128*alpha_G_1_source[20]*G_1[23]+0.3535533905932737*alpha_G_1_source[7]*G_1[23]+0.63887656499994*nu_vtsq_sum[8]*F_0[23]+1.0*nu_vtsq_sum[4]*F_0[23]+0.2020305089104422*alpha_G_1_source[14]*G_1[22]+0.3162277660168379*alpha_G_1_source[3]*G_1[22]+0.3535533905932737*G_1[13]*alpha_G_1_source[20]+0.3535533905932737*alpha_G_1_source[13]*G_1[20]+0.282842712474619*alpha_G_1_source[10]*G_1[19]+0.3162277660168379*G_1[15]*alpha_G_1_source[18]+0.2258769757263128*G_1[12]*alpha_G_1_source[18]+0.3535533905932737*G_1[1]*alpha_G_1_source[18]+0.2258769757263128*alpha_G_1_source[12]*G_1[18]+0.3535533905932737*alpha_G_1_source[1]*G_1[18]+0.6388765649999399*nu_vtsq_sum[7]*F_0[18]+1.0*nu_vtsq_sum[1]*F_0[18]+0.3162277660168379*G_1[11]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[11]*G_1[17]+0.8944271909999159*nu_vtsq_sum[6]*F_0[17]+0.2828427124746191*alpha_G_1_source[6]*G_1[16]+0.3162277660168379*G_1[9]*alpha_G_1_source[14]+0.2258769757263128*G_1[8]*alpha_G_1_source[14]+0.3535533905932737*G_1[0]*alpha_G_1_source[14]+0.2258769757263128*alpha_G_1_source[8]*G_1[14]+0.3535533905932737*alpha_G_1_source[0]*G_1[14]+0.6388765649999399*nu_vtsq_sum[5]*F_0[14]+nu_vtsq_sum[0]*F_0[14]+nu_vtsq_sum[8]*F_0[13]+0.3535533905932737*G_1[5]*alpha_G_1_source[12]+0.3535533905932737*alpha_G_1_source[5]*G_1[12]+0.3162277660168379*G_1[4]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[4]*G_1[10]+0.8944271909999161*nu_vtsq_sum[3]*F_0[10]+0.3535533905932737*G_1[3]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[3]*G_1[8]+F_0[5]*nu_vtsq_sum[7]+0.3162277660168379*G_1[2]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[2]*G_1[6]+0.8944271909999161*nu_vtsq_sum[2]*F_0[6]+1.0*F_0[3]*nu_vtsq_sum[5]; + out_G_1_vperp[15] = 0.3162277660168379*alpha_G_1_source[12]*G_1[26]+0.8944271909999159*nu_vtsq_sum[7]*F_0[26]+0.3162277660168379*alpha_G_1_source[20]*G_1[25]+0.3535533905932737*alpha_G_1_source[8]*G_1[25]+0.8944271909999161*nu_vtsq_sum[8]*F_0[25]+1.0*nu_vtsq_sum[5]*F_0[25]+0.3162277660168379*alpha_G_1_source[4]*G_1[24]+0.8944271909999161*nu_vtsq_sum[3]*F_0[24]+0.282842712474619*G_1[18]*alpha_G_1_source[23]+0.282842712474619*alpha_G_1_source[18]*G_1[23]+0.3535533905932737*alpha_G_1_source[12]*G_1[22]+nu_vtsq_sum[7]*F_0[22]+0.3162277660168379*alpha_G_1_source[1]*G_1[21]+0.8944271909999161*nu_vtsq_sum[1]*F_0[21]+0.3162277660168379*alpha_G_1_source[11]*G_1[19]+0.3535533905932737*alpha_G_1_source[2]*G_1[19]+0.8944271909999159*nu_vtsq_sum[6]*F_0[19]+1.0*nu_vtsq_sum[2]*F_0[19]+0.3162277660168379*G_1[14]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[14]*G_1[18]+0.282842712474619*G_1[10]*alpha_G_1_source[17]+0.282842712474619*alpha_G_1_source[10]*G_1[17]+0.3535533905932737*alpha_G_1_source[4]*G_1[16]+nu_vtsq_sum[3]*F_0[16]+0.3162277660168379*alpha_G_1_source[7]*G_1[15]+0.3535533905932737*alpha_G_1_source[0]*G_1[15]+0.8944271909999159*nu_vtsq_sum[4]*F_0[15]+nu_vtsq_sum[0]*F_0[15]+0.2828427124746191*G_1[5]*alpha_G_1_source[13]+0.2828427124746191*alpha_G_1_source[5]*G_1[13]+0.3162277660168379*G_1[6]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[6]*G_1[10]+0.3535533905932737*alpha_G_1_source[1]*G_1[9]+1.0*nu_vtsq_sum[1]*F_0[9]+0.3162277660168379*G_1[3]*alpha_G_1_source[5]+0.3162277660168379*alpha_G_1_source[3]*G_1[5]; + out_G_1_vperp[16] = 0.3162277660168379*alpha_G_1_source[11]*G_1[26]+0.8944271909999159*nu_vtsq_sum[6]*F_0[26]+0.3162277660168379*alpha_G_1_source[4]*G_1[25]+0.8944271909999161*nu_vtsq_sum[3]*F_0[25]+0.3162277660168379*alpha_G_1_source[20]*G_1[24]+0.3535533905932737*alpha_G_1_source[7]*G_1[24]+0.8944271909999161*nu_vtsq_sum[8]*F_0[24]+1.0*nu_vtsq_sum[4]*F_0[24]+0.282842712474619*G_1[17]*alpha_G_1_source[23]+0.282842712474619*alpha_G_1_source[17]*G_1[23]+0.3162277660168379*alpha_G_1_source[2]*G_1[22]+0.8944271909999161*nu_vtsq_sum[2]*F_0[22]+0.3535533905932737*alpha_G_1_source[11]*G_1[21]+nu_vtsq_sum[6]*F_0[21]+0.3162277660168379*alpha_G_1_source[12]*G_1[19]+0.3535533905932737*alpha_G_1_source[1]*G_1[19]+0.8944271909999159*nu_vtsq_sum[7]*F_0[19]+1.0*nu_vtsq_sum[1]*F_0[19]+0.282842712474619*G_1[10]*alpha_G_1_source[18]+0.282842712474619*alpha_G_1_source[10]*G_1[18]+0.3162277660168379*G_1[13]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[13]*G_1[17]+0.3162277660168379*alpha_G_1_source[8]*G_1[16]+0.3535533905932737*alpha_G_1_source[0]*G_1[16]+0.8944271909999159*nu_vtsq_sum[5]*F_0[16]+nu_vtsq_sum[0]*F_0[16]+0.3535533905932737*alpha_G_1_source[4]*G_1[15]+nu_vtsq_sum[3]*F_0[15]+0.2828427124746191*G_1[6]*alpha_G_1_source[14]+0.2828427124746191*alpha_G_1_source[6]*G_1[14]+0.3162277660168379*G_1[5]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[5]*G_1[10]+0.3535533905932737*alpha_G_1_source[2]*G_1[9]+1.0*nu_vtsq_sum[2]*F_0[9]+0.3162277660168379*G_1[3]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[3]*G_1[6]; + out_G_1_vperp[17] = 0.1807015805810503*alpha_G_1_source[17]*G_1[26]+0.2828427124746191*alpha_G_1_source[6]*G_1[26]+0.2529822128134704*alpha_G_1_source[10]*G_1[25]+0.1807015805810503*alpha_G_1_source[23]*G_1[24]+0.282842712474619*alpha_G_1_source[14]*G_1[24]+0.2020305089104422*alpha_G_1_source[13]*G_1[24]+0.3162277660168379*alpha_G_1_source[3]*G_1[24]+0.282842712474619*G_1[16]*alpha_G_1_source[23]+0.2020305089104422*G_1[11]*alpha_G_1_source[23]+0.3162277660168379*G_1[2]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[11]*G_1[23]+0.3162277660168379*alpha_G_1_source[2]*G_1[23]+0.5714285714285715*nu_vtsq_sum[6]*F_0[23]+0.8944271909999159*nu_vtsq_sum[2]*F_0[23]+0.2828427124746191*alpha_G_1_source[17]*G_1[22]+0.2020305089104422*alpha_G_1_source[17]*G_1[21]+0.3162277660168379*alpha_G_1_source[6]*G_1[21]+0.2020305089104422*G_1[17]*alpha_G_1_source[20]+0.3162277660168379*G_1[6]*alpha_G_1_source[20]+0.2020305089104422*alpha_G_1_source[17]*G_1[20]+0.3162277660168379*alpha_G_1_source[6]*G_1[20]+0.2529822128134704*alpha_G_1_source[18]*G_1[19]+0.2828427124746191*alpha_G_1_source[5]*G_1[19]+0.2828427124746191*G_1[4]*alpha_G_1_source[18]+0.2828427124746191*alpha_G_1_source[4]*G_1[18]+0.8*nu_vtsq_sum[3]*F_0[18]+0.3162277660168379*G_1[9]*alpha_G_1_source[17]+0.3162277660168379*G_1[8]*alpha_G_1_source[17]+0.2258769757263128*G_1[7]*alpha_G_1_source[17]+0.3535533905932737*G_1[0]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[8]*G_1[17]+0.2258769757263128*alpha_G_1_source[7]*G_1[17]+0.3535533905932737*alpha_G_1_source[0]*G_1[17]+0.5714285714285714*nu_vtsq_sum[8]*F_0[17]+0.8944271909999159*nu_vtsq_sum[5]*F_0[17]+0.6388765649999399*nu_vtsq_sum[4]*F_0[17]+nu_vtsq_sum[0]*F_0[17]+0.3162277660168379*alpha_G_1_source[13]*G_1[16]+0.282842712474619*alpha_G_1_source[10]*G_1[15]+0.3162277660168379*G_1[11]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[11]*G_1[14]+0.8944271909999159*nu_vtsq_sum[6]*F_0[14]+0.2258769757263128*G_1[11]*alpha_G_1_source[13]+0.3535533905932737*G_1[2]*alpha_G_1_source[13]+0.2258769757263128*alpha_G_1_source[11]*G_1[13]+0.3535533905932737*alpha_G_1_source[2]*G_1[13]+0.6388765649999399*nu_vtsq_sum[6]*F_0[13]+1.0*nu_vtsq_sum[2]*F_0[13]+0.282842712474619*G_1[10]*alpha_G_1_source[12]+0.282842712474619*alpha_G_1_source[10]*G_1[12]+0.3535533905932737*G_1[3]*alpha_G_1_source[11]+0.3535533905932737*alpha_G_1_source[3]*G_1[11]+0.3162277660168379*G_1[1]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[1]*G_1[10]+0.8*nu_vtsq_sum[7]*F_0[10]+0.8944271909999159*nu_vtsq_sum[1]*F_0[10]+0.8944271909999159*F_0[6]*nu_vtsq_sum[8]+0.3535533905932737*G_1[6]*alpha_G_1_source[7]+0.3535533905932737*alpha_G_1_source[6]*G_1[7]+1.0*F_0[3]*nu_vtsq_sum[6]+nu_vtsq_sum[4]*F_0[6]+0.3162277660168379*G_1[4]*alpha_G_1_source[5]+0.3162277660168379*alpha_G_1_source[4]*G_1[5]+0.8944271909999159*nu_vtsq_sum[3]*F_0[5]; + out_G_1_vperp[18] = 0.1807015805810503*alpha_G_1_source[18]*G_1[26]+0.2828427124746191*alpha_G_1_source[5]*G_1[26]+0.1807015805810503*alpha_G_1_source[23]*G_1[25]+0.2020305089104422*alpha_G_1_source[14]*G_1[25]+0.282842712474619*alpha_G_1_source[13]*G_1[25]+0.3162277660168379*alpha_G_1_source[3]*G_1[25]+0.2529822128134704*alpha_G_1_source[10]*G_1[24]+0.282842712474619*G_1[15]*alpha_G_1_source[23]+0.2020305089104422*G_1[12]*alpha_G_1_source[23]+0.3162277660168379*G_1[1]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[12]*G_1[23]+0.3162277660168379*alpha_G_1_source[1]*G_1[23]+0.5714285714285715*nu_vtsq_sum[7]*F_0[23]+0.8944271909999159*nu_vtsq_sum[1]*F_0[23]+0.2020305089104422*alpha_G_1_source[18]*G_1[22]+0.3162277660168379*alpha_G_1_source[5]*G_1[22]+0.2828427124746191*alpha_G_1_source[18]*G_1[21]+0.2020305089104422*G_1[18]*alpha_G_1_source[20]+0.3162277660168379*G_1[5]*alpha_G_1_source[20]+0.2020305089104422*alpha_G_1_source[18]*G_1[20]+0.3162277660168379*alpha_G_1_source[5]*G_1[20]+0.2529822128134704*alpha_G_1_source[17]*G_1[19]+0.2828427124746191*alpha_G_1_source[6]*G_1[19]+0.3162277660168379*G_1[9]*alpha_G_1_source[18]+0.2258769757263128*G_1[8]*alpha_G_1_source[18]+0.3162277660168379*G_1[7]*alpha_G_1_source[18]+0.3535533905932737*G_1[0]*alpha_G_1_source[18]+0.2258769757263128*alpha_G_1_source[8]*G_1[18]+0.3162277660168379*alpha_G_1_source[7]*G_1[18]+0.3535533905932737*alpha_G_1_source[0]*G_1[18]+0.5714285714285714*nu_vtsq_sum[8]*F_0[18]+0.6388765649999399*nu_vtsq_sum[5]*F_0[18]+0.8944271909999159*nu_vtsq_sum[4]*F_0[18]+nu_vtsq_sum[0]*F_0[18]+0.2828427124746191*G_1[4]*alpha_G_1_source[17]+0.2828427124746191*alpha_G_1_source[4]*G_1[17]+0.8*nu_vtsq_sum[3]*F_0[17]+0.282842712474619*alpha_G_1_source[10]*G_1[16]+0.3162277660168379*alpha_G_1_source[14]*G_1[15]+0.2258769757263128*G_1[12]*alpha_G_1_source[14]+0.3535533905932737*G_1[1]*alpha_G_1_source[14]+0.2258769757263128*alpha_G_1_source[12]*G_1[14]+0.3535533905932737*alpha_G_1_source[1]*G_1[14]+0.6388765649999399*nu_vtsq_sum[7]*F_0[14]+1.0*nu_vtsq_sum[1]*F_0[14]+0.3162277660168379*G_1[12]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[12]*G_1[13]+0.8944271909999159*nu_vtsq_sum[7]*F_0[13]+0.3535533905932737*G_1[3]*alpha_G_1_source[12]+0.3535533905932737*alpha_G_1_source[3]*G_1[12]+0.282842712474619*G_1[10]*alpha_G_1_source[11]+0.282842712474619*alpha_G_1_source[10]*G_1[11]+0.3162277660168379*G_1[2]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[2]*G_1[10]+0.8*nu_vtsq_sum[6]*F_0[10]+0.8944271909999159*nu_vtsq_sum[2]*F_0[10]+0.8944271909999159*F_0[5]*nu_vtsq_sum[8]+0.3535533905932737*G_1[5]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[5]*G_1[8]+1.0*F_0[3]*nu_vtsq_sum[7]+0.3162277660168379*G_1[4]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[4]*G_1[6]+0.8944271909999159*nu_vtsq_sum[3]*F_0[6]+F_0[5]*nu_vtsq_sum[5]; + out_G_1_vperp[19] = 0.2828427124746191*alpha_G_1_source[4]*G_1[26]+0.8*nu_vtsq_sum[3]*F_0[26]+0.282842712474619*alpha_G_1_source[11]*G_1[25]+0.3162277660168379*alpha_G_1_source[2]*G_1[25]+0.8*nu_vtsq_sum[6]*F_0[25]+0.8944271909999159*nu_vtsq_sum[2]*F_0[25]+0.282842712474619*alpha_G_1_source[12]*G_1[24]+0.3162277660168379*alpha_G_1_source[1]*G_1[24]+0.8*nu_vtsq_sum[7]*F_0[24]+0.8944271909999159*nu_vtsq_sum[1]*F_0[24]+0.2529822128134704*G_1[10]*alpha_G_1_source[23]+0.2529822128134704*alpha_G_1_source[10]*G_1[23]+0.3162277660168379*alpha_G_1_source[4]*G_1[22]+0.8944271909999159*nu_vtsq_sum[3]*F_0[22]+0.3162277660168379*alpha_G_1_source[4]*G_1[21]+0.8944271909999159*nu_vtsq_sum[3]*F_0[21]+0.2828427124746191*G_1[19]*alpha_G_1_source[20]+0.3162277660168379*alpha_G_1_source[8]*G_1[19]+0.3162277660168379*alpha_G_1_source[7]*G_1[19]+0.3535533905932737*alpha_G_1_source[0]*G_1[19]+0.8*nu_vtsq_sum[8]*F_0[19]+0.8944271909999159*nu_vtsq_sum[5]*F_0[19]+0.8944271909999159*nu_vtsq_sum[4]*F_0[19]+nu_vtsq_sum[0]*F_0[19]+0.2529822128134704*G_1[17]*alpha_G_1_source[18]+0.2828427124746191*G_1[6]*alpha_G_1_source[18]+0.2529822128134704*alpha_G_1_source[17]*G_1[18]+0.2828427124746191*alpha_G_1_source[6]*G_1[18]+0.2828427124746191*G_1[5]*alpha_G_1_source[17]+0.2828427124746191*alpha_G_1_source[5]*G_1[17]+0.3162277660168379*alpha_G_1_source[12]*G_1[16]+0.3535533905932737*alpha_G_1_source[1]*G_1[16]+0.8944271909999159*nu_vtsq_sum[7]*F_0[16]+1.0*nu_vtsq_sum[1]*F_0[16]+0.3162277660168379*alpha_G_1_source[11]*G_1[15]+0.3535533905932737*alpha_G_1_source[2]*G_1[15]+0.8944271909999159*nu_vtsq_sum[6]*F_0[15]+1.0*nu_vtsq_sum[2]*F_0[15]+0.282842712474619*G_1[10]*alpha_G_1_source[14]+0.282842712474619*alpha_G_1_source[10]*G_1[14]+0.282842712474619*G_1[10]*alpha_G_1_source[13]+0.282842712474619*alpha_G_1_source[10]*G_1[13]+0.3162277660168379*G_1[3]*alpha_G_1_source[10]+0.3162277660168379*alpha_G_1_source[3]*G_1[10]+0.3535533905932737*alpha_G_1_source[4]*G_1[9]+nu_vtsq_sum[3]*F_0[9]+0.3162277660168379*G_1[5]*alpha_G_1_source[6]+0.3162277660168379*alpha_G_1_source[5]*G_1[6]; + out_G_1_vperp[20] = 0.1443075063646015*G_1[23]*alpha_G_1_source[23]+0.2258769757263128*G_1[14]*alpha_G_1_source[23]+0.2258769757263128*G_1[13]*alpha_G_1_source[23]+0.3535533905932737*G_1[3]*alpha_G_1_source[23]+0.2258769757263128*alpha_G_1_source[14]*G_1[23]+0.2258769757263128*alpha_G_1_source[13]*G_1[23]+0.3535533905932737*alpha_G_1_source[3]*G_1[23]+0.1443075063646015*G_1[20]*alpha_G_1_source[20]+0.2258769757263128*G_1[8]*alpha_G_1_source[20]+0.2258769757263128*G_1[7]*alpha_G_1_source[20]+0.3535533905932737*G_1[0]*alpha_G_1_source[20]+0.2258769757263128*alpha_G_1_source[8]*G_1[20]+0.2258769757263128*alpha_G_1_source[7]*G_1[20]+0.3535533905932737*alpha_G_1_source[0]*G_1[20]+0.4081632653061225*nu_vtsq_sum[8]*F_0[20]+0.6388765649999399*nu_vtsq_sum[5]*F_0[20]+0.6388765649999399*nu_vtsq_sum[4]*F_0[20]+nu_vtsq_sum[0]*F_0[20]+0.2020305089104422*G_1[18]*alpha_G_1_source[18]+0.3162277660168379*G_1[5]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[5]*G_1[18]+0.2020305089104422*G_1[17]*alpha_G_1_source[17]+0.3162277660168379*G_1[6]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[6]*G_1[17]+0.3535533905932737*G_1[13]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[13]*G_1[14]+0.2020305089104422*G_1[12]*alpha_G_1_source[12]+0.3162277660168379*G_1[1]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[1]*G_1[12]+0.5714285714285714*nu_vtsq_sum[7]*F_0[12]+0.8944271909999161*nu_vtsq_sum[1]*F_0[12]+0.2020305089104422*G_1[11]*alpha_G_1_source[11]+0.3162277660168379*G_1[2]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[2]*G_1[11]+0.5714285714285714*nu_vtsq_sum[6]*F_0[11]+0.8944271909999161*nu_vtsq_sum[2]*F_0[11]+0.2828427124746191*G_1[10]*alpha_G_1_source[10]+0.6388765649999399*F_0[8]*nu_vtsq_sum[8]+0.6388765649999399*F_0[7]*nu_vtsq_sum[8]+F_0[0]*nu_vtsq_sum[8]+0.3535533905932737*G_1[7]*alpha_G_1_source[8]+0.3535533905932737*alpha_G_1_source[7]*G_1[8]+nu_vtsq_sum[4]*F_0[8]+0.8944271909999161*F_0[1]*nu_vtsq_sum[7]+nu_vtsq_sum[5]*F_0[7]+0.8944271909999161*F_0[2]*nu_vtsq_sum[6]+0.2828427124746191*G_1[4]*alpha_G_1_source[4]+0.8*nu_vtsq_sum[3]*F_0[4]; + out_G_1_vperp[21] = 0.2258769757263128*alpha_G_1_source[20]*G_1[26]+0.3535533905932737*alpha_G_1_source[8]*G_1[26]+0.6388765649999399*nu_vtsq_sum[8]*F_0[26]+nu_vtsq_sum[5]*F_0[26]+0.3162277660168379*alpha_G_1_source[12]*G_1[25]+0.8944271909999161*nu_vtsq_sum[7]*F_0[25]+0.2258769757263128*alpha_G_1_source[11]*G_1[24]+0.3535533905932737*alpha_G_1_source[2]*G_1[24]+0.63887656499994*nu_vtsq_sum[6]*F_0[24]+nu_vtsq_sum[2]*F_0[24]+0.2020305089104422*G_1[23]*alpha_G_1_source[23]+0.3162277660168379*G_1[14]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[14]*G_1[23]+0.3535533905932737*alpha_G_1_source[20]*G_1[22]+nu_vtsq_sum[8]*F_0[22]+0.2258769757263128*alpha_G_1_source[7]*G_1[21]+0.3535533905932737*alpha_G_1_source[0]*G_1[21]+0.6388765649999399*nu_vtsq_sum[4]*F_0[21]+nu_vtsq_sum[0]*F_0[21]+0.3162277660168379*alpha_G_1_source[4]*G_1[19]+0.8944271909999159*nu_vtsq_sum[3]*F_0[19]+0.2828427124746191*G_1[18]*alpha_G_1_source[18]+0.2020305089104422*G_1[17]*alpha_G_1_source[17]+0.3162277660168379*G_1[6]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[6]*G_1[17]+0.3535533905932737*alpha_G_1_source[11]*G_1[16]+nu_vtsq_sum[6]*F_0[16]+0.3162277660168379*alpha_G_1_source[1]*G_1[15]+0.8944271909999161*nu_vtsq_sum[1]*F_0[15]+0.2020305089104422*G_1[13]*alpha_G_1_source[13]+0.3162277660168379*G_1[3]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[3]*G_1[13]+0.2828427124746191*G_1[10]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[7]*G_1[9]+nu_vtsq_sum[4]*F_0[9]+0.2828427124746191*G_1[5]*alpha_G_1_source[5]; + out_G_1_vperp[22] = 0.2258769757263128*alpha_G_1_source[20]*G_1[26]+0.3535533905932737*alpha_G_1_source[7]*G_1[26]+0.6388765649999399*nu_vtsq_sum[8]*F_0[26]+nu_vtsq_sum[4]*F_0[26]+0.2258769757263128*alpha_G_1_source[12]*G_1[25]+0.3535533905932737*alpha_G_1_source[1]*G_1[25]+0.63887656499994*nu_vtsq_sum[7]*F_0[25]+nu_vtsq_sum[1]*F_0[25]+0.3162277660168379*alpha_G_1_source[11]*G_1[24]+0.8944271909999161*nu_vtsq_sum[6]*F_0[24]+0.2020305089104422*G_1[23]*alpha_G_1_source[23]+0.3162277660168379*G_1[13]*alpha_G_1_source[23]+0.3162277660168379*alpha_G_1_source[13]*G_1[23]+0.2258769757263128*alpha_G_1_source[8]*G_1[22]+0.3535533905932737*alpha_G_1_source[0]*G_1[22]+0.6388765649999399*nu_vtsq_sum[5]*F_0[22]+nu_vtsq_sum[0]*F_0[22]+0.3535533905932737*alpha_G_1_source[20]*G_1[21]+nu_vtsq_sum[8]*F_0[21]+0.3162277660168379*alpha_G_1_source[4]*G_1[19]+0.8944271909999159*nu_vtsq_sum[3]*F_0[19]+0.2020305089104422*G_1[18]*alpha_G_1_source[18]+0.3162277660168379*G_1[5]*alpha_G_1_source[18]+0.3162277660168379*alpha_G_1_source[5]*G_1[18]+0.2828427124746191*G_1[17]*alpha_G_1_source[17]+0.3162277660168379*alpha_G_1_source[2]*G_1[16]+0.8944271909999161*nu_vtsq_sum[2]*F_0[16]+0.3535533905932737*alpha_G_1_source[12]*G_1[15]+nu_vtsq_sum[7]*F_0[15]+0.2020305089104422*G_1[14]*alpha_G_1_source[14]+0.3162277660168379*G_1[3]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[3]*G_1[14]+0.2828427124746191*G_1[10]*alpha_G_1_source[10]+0.3535533905932737*alpha_G_1_source[8]*G_1[9]+nu_vtsq_sum[5]*F_0[9]+0.2828427124746191*G_1[6]*alpha_G_1_source[6]; + out_G_1_vperp[23] = 0.1290725575578931*alpha_G_1_source[23]*G_1[26]+0.2020305089104422*alpha_G_1_source[14]*G_1[26]+0.2020305089104422*alpha_G_1_source[13]*G_1[26]+0.3162277660168379*alpha_G_1_source[3]*G_1[26]+0.1807015805810503*alpha_G_1_source[18]*G_1[25]+0.2828427124746191*alpha_G_1_source[5]*G_1[25]+0.1807015805810503*alpha_G_1_source[17]*G_1[24]+0.2828427124746191*alpha_G_1_source[6]*G_1[24]+0.2020305089104422*G_1[22]*alpha_G_1_source[23]+0.2020305089104422*G_1[21]*alpha_G_1_source[23]+0.1443075063646015*G_1[20]*alpha_G_1_source[23]+0.3162277660168379*G_1[9]*alpha_G_1_source[23]+0.2258769757263128*G_1[8]*alpha_G_1_source[23]+0.2258769757263128*G_1[7]*alpha_G_1_source[23]+0.3535533905932737*G_1[0]*alpha_G_1_source[23]+0.1443075063646015*alpha_G_1_source[20]*G_1[23]+0.2258769757263128*alpha_G_1_source[8]*G_1[23]+0.2258769757263128*alpha_G_1_source[7]*G_1[23]+0.3535533905932737*alpha_G_1_source[0]*G_1[23]+0.4081632653061225*nu_vtsq_sum[8]*F_0[23]+0.6388765649999399*nu_vtsq_sum[5]*F_0[23]+0.6388765649999399*nu_vtsq_sum[4]*F_0[23]+nu_vtsq_sum[0]*F_0[23]+0.3162277660168379*alpha_G_1_source[13]*G_1[22]+0.3162277660168379*alpha_G_1_source[14]*G_1[21]+0.2258769757263128*G_1[14]*alpha_G_1_source[20]+0.2258769757263128*G_1[13]*alpha_G_1_source[20]+0.3535533905932737*G_1[3]*alpha_G_1_source[20]+0.2258769757263128*alpha_G_1_source[14]*G_1[20]+0.2258769757263128*alpha_G_1_source[13]*G_1[20]+0.3535533905932737*alpha_G_1_source[3]*G_1[20]+0.2529822128134704*alpha_G_1_source[10]*G_1[19]+0.282842712474619*G_1[15]*alpha_G_1_source[18]+0.2020305089104422*G_1[12]*alpha_G_1_source[18]+0.3162277660168379*G_1[1]*alpha_G_1_source[18]+0.2020305089104422*alpha_G_1_source[12]*G_1[18]+0.3162277660168379*alpha_G_1_source[1]*G_1[18]+0.5714285714285715*nu_vtsq_sum[7]*F_0[18]+0.8944271909999159*nu_vtsq_sum[1]*F_0[18]+0.282842712474619*G_1[16]*alpha_G_1_source[17]+0.2020305089104422*G_1[11]*alpha_G_1_source[17]+0.3162277660168379*G_1[2]*alpha_G_1_source[17]+0.2020305089104422*alpha_G_1_source[11]*G_1[17]+0.3162277660168379*alpha_G_1_source[2]*G_1[17]+0.5714285714285715*nu_vtsq_sum[6]*F_0[17]+0.8944271909999159*nu_vtsq_sum[2]*F_0[17]+0.3535533905932737*G_1[7]*alpha_G_1_source[14]+0.3535533905932737*alpha_G_1_source[7]*G_1[14]+0.63887656499994*nu_vtsq_sum[8]*F_0[14]+1.0*nu_vtsq_sum[4]*F_0[14]+0.3535533905932737*G_1[8]*alpha_G_1_source[13]+0.3535533905932737*alpha_G_1_source[8]*G_1[13]+0.63887656499994*nu_vtsq_sum[8]*F_0[13]+1.0*nu_vtsq_sum[5]*F_0[13]+0.3162277660168379*G_1[5]*alpha_G_1_source[12]+0.3162277660168379*alpha_G_1_source[5]*G_1[12]+0.3162277660168379*G_1[6]*alpha_G_1_source[11]+0.3162277660168379*alpha_G_1_source[6]*G_1[11]+0.2828427124746191*G_1[4]*alpha_G_1_source[10]+0.2828427124746191*alpha_G_1_source[4]*G_1[10]+0.8*nu_vtsq_sum[3]*F_0[10]+F_0[3]*nu_vtsq_sum[8]+0.8944271909999161*F_0[5]*nu_vtsq_sum[7]+0.8944271909999161*F_0[6]*nu_vtsq_sum[6]; + out_G_1_vperp[24] = 0.2020305089104422*alpha_G_1_source[11]*G_1[26]+0.3162277660168379*alpha_G_1_source[2]*G_1[26]+0.5714285714285715*nu_vtsq_sum[6]*F_0[26]+0.8944271909999159*nu_vtsq_sum[2]*F_0[26]+0.2828427124746191*alpha_G_1_source[4]*G_1[25]+0.8*nu_vtsq_sum[3]*F_0[25]+0.2020305089104422*alpha_G_1_source[20]*G_1[24]+0.3162277660168379*alpha_G_1_source[8]*G_1[24]+0.2258769757263128*alpha_G_1_source[7]*G_1[24]+0.3535533905932737*alpha_G_1_source[0]*G_1[24]+0.5714285714285714*nu_vtsq_sum[8]*F_0[24]+0.8944271909999159*nu_vtsq_sum[5]*F_0[24]+0.6388765649999399*nu_vtsq_sum[4]*F_0[24]+nu_vtsq_sum[0]*F_0[24]+0.1807015805810503*G_1[17]*alpha_G_1_source[23]+0.2828427124746191*G_1[6]*alpha_G_1_source[23]+0.1807015805810503*alpha_G_1_source[17]*G_1[23]+0.2828427124746191*alpha_G_1_source[6]*G_1[23]+0.3162277660168379*alpha_G_1_source[11]*G_1[22]+0.8944271909999161*nu_vtsq_sum[6]*F_0[22]+0.2258769757263128*alpha_G_1_source[11]*G_1[21]+0.3535533905932737*alpha_G_1_source[2]*G_1[21]+0.63887656499994*nu_vtsq_sum[6]*F_0[21]+nu_vtsq_sum[2]*F_0[21]+0.3162277660168379*G_1[16]*alpha_G_1_source[20]+0.282842712474619*alpha_G_1_source[12]*G_1[19]+0.3162277660168379*alpha_G_1_source[1]*G_1[19]+0.8*nu_vtsq_sum[7]*F_0[19]+0.8944271909999159*nu_vtsq_sum[1]*F_0[19]+0.2529822128134704*G_1[10]*alpha_G_1_source[18]+0.2529822128134704*alpha_G_1_source[10]*G_1[18]+0.282842712474619*G_1[14]*alpha_G_1_source[17]+0.2020305089104422*G_1[13]*alpha_G_1_source[17]+0.3162277660168379*G_1[3]*alpha_G_1_source[17]+0.282842712474619*alpha_G_1_source[14]*G_1[17]+0.2020305089104422*alpha_G_1_source[13]*G_1[17]+0.3162277660168379*alpha_G_1_source[3]*G_1[17]+0.3535533905932737*alpha_G_1_source[7]*G_1[16]+0.8944271909999161*nu_vtsq_sum[8]*F_0[16]+1.0*nu_vtsq_sum[4]*F_0[16]+0.3162277660168379*alpha_G_1_source[4]*G_1[15]+0.8944271909999161*nu_vtsq_sum[3]*F_0[15]+0.3162277660168379*G_1[6]*alpha_G_1_source[13]+0.3162277660168379*alpha_G_1_source[6]*G_1[13]+0.3535533905932737*G_1[9]*alpha_G_1_source[11]+0.2828427124746191*G_1[5]*alpha_G_1_source[10]+0.2828427124746191*alpha_G_1_source[5]*G_1[10]+1.0*nu_vtsq_sum[6]*F_0[9]; + out_G_1_vperp[25] = 0.2020305089104422*alpha_G_1_source[12]*G_1[26]+0.3162277660168379*alpha_G_1_source[1]*G_1[26]+0.5714285714285715*nu_vtsq_sum[7]*F_0[26]+0.8944271909999159*nu_vtsq_sum[1]*F_0[26]+0.2020305089104422*alpha_G_1_source[20]*G_1[25]+0.2258769757263128*alpha_G_1_source[8]*G_1[25]+0.3162277660168379*alpha_G_1_source[7]*G_1[25]+0.3535533905932737*alpha_G_1_source[0]*G_1[25]+0.5714285714285714*nu_vtsq_sum[8]*F_0[25]+0.6388765649999399*nu_vtsq_sum[5]*F_0[25]+0.8944271909999159*nu_vtsq_sum[4]*F_0[25]+nu_vtsq_sum[0]*F_0[25]+0.2828427124746191*alpha_G_1_source[4]*G_1[24]+0.8*nu_vtsq_sum[3]*F_0[24]+0.1807015805810503*G_1[18]*alpha_G_1_source[23]+0.2828427124746191*G_1[5]*alpha_G_1_source[23]+0.1807015805810503*alpha_G_1_source[18]*G_1[23]+0.2828427124746191*alpha_G_1_source[5]*G_1[23]+0.2258769757263128*alpha_G_1_source[12]*G_1[22]+0.3535533905932737*alpha_G_1_source[1]*G_1[22]+0.63887656499994*nu_vtsq_sum[7]*F_0[22]+nu_vtsq_sum[1]*F_0[22]+0.3162277660168379*alpha_G_1_source[12]*G_1[21]+0.8944271909999161*nu_vtsq_sum[7]*F_0[21]+0.3162277660168379*G_1[15]*alpha_G_1_source[20]+0.282842712474619*alpha_G_1_source[11]*G_1[19]+0.3162277660168379*alpha_G_1_source[2]*G_1[19]+0.8*nu_vtsq_sum[6]*F_0[19]+0.8944271909999159*nu_vtsq_sum[2]*F_0[19]+0.2020305089104422*G_1[14]*alpha_G_1_source[18]+0.282842712474619*G_1[13]*alpha_G_1_source[18]+0.3162277660168379*G_1[3]*alpha_G_1_source[18]+0.2020305089104422*alpha_G_1_source[14]*G_1[18]+0.282842712474619*alpha_G_1_source[13]*G_1[18]+0.3162277660168379*alpha_G_1_source[3]*G_1[18]+0.2529822128134704*G_1[10]*alpha_G_1_source[17]+0.2529822128134704*alpha_G_1_source[10]*G_1[17]+0.3162277660168379*alpha_G_1_source[4]*G_1[16]+0.8944271909999161*nu_vtsq_sum[3]*F_0[16]+0.3535533905932737*alpha_G_1_source[8]*G_1[15]+0.8944271909999161*nu_vtsq_sum[8]*F_0[15]+1.0*nu_vtsq_sum[5]*F_0[15]+0.3162277660168379*G_1[5]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[5]*G_1[14]+0.3535533905932737*G_1[9]*alpha_G_1_source[12]+0.2828427124746191*G_1[6]*alpha_G_1_source[10]+0.2828427124746191*alpha_G_1_source[6]*G_1[10]+1.0*nu_vtsq_sum[7]*F_0[9]; + out_G_1_vperp[26] = 0.1443075063646015*alpha_G_1_source[20]*G_1[26]+0.2258769757263128*alpha_G_1_source[8]*G_1[26]+0.2258769757263128*alpha_G_1_source[7]*G_1[26]+0.3535533905932737*alpha_G_1_source[0]*G_1[26]+0.4081632653061225*nu_vtsq_sum[8]*F_0[26]+0.6388765649999399*nu_vtsq_sum[5]*F_0[26]+0.6388765649999399*nu_vtsq_sum[4]*F_0[26]+nu_vtsq_sum[0]*F_0[26]+0.2020305089104422*alpha_G_1_source[12]*G_1[25]+0.3162277660168379*alpha_G_1_source[1]*G_1[25]+0.5714285714285715*nu_vtsq_sum[7]*F_0[25]+0.8944271909999159*nu_vtsq_sum[1]*F_0[25]+0.2020305089104422*alpha_G_1_source[11]*G_1[24]+0.3162277660168379*alpha_G_1_source[2]*G_1[24]+0.5714285714285715*nu_vtsq_sum[6]*F_0[24]+0.8944271909999159*nu_vtsq_sum[2]*F_0[24]+0.1290725575578931*G_1[23]*alpha_G_1_source[23]+0.2020305089104422*G_1[14]*alpha_G_1_source[23]+0.2020305089104422*G_1[13]*alpha_G_1_source[23]+0.3162277660168379*G_1[3]*alpha_G_1_source[23]+0.2020305089104422*alpha_G_1_source[14]*G_1[23]+0.2020305089104422*alpha_G_1_source[13]*G_1[23]+0.3162277660168379*alpha_G_1_source[3]*G_1[23]+0.2258769757263128*alpha_G_1_source[20]*G_1[22]+0.3535533905932737*alpha_G_1_source[7]*G_1[22]+0.6388765649999399*nu_vtsq_sum[8]*F_0[22]+nu_vtsq_sum[4]*F_0[22]+0.2258769757263128*alpha_G_1_source[20]*G_1[21]+0.3535533905932737*alpha_G_1_source[8]*G_1[21]+0.6388765649999399*nu_vtsq_sum[8]*F_0[21]+nu_vtsq_sum[5]*F_0[21]+0.3535533905932737*G_1[9]*alpha_G_1_source[20]+0.2828427124746191*alpha_G_1_source[4]*G_1[19]+0.8*nu_vtsq_sum[3]*F_0[19]+0.1807015805810503*G_1[18]*alpha_G_1_source[18]+0.2828427124746191*G_1[5]*alpha_G_1_source[18]+0.2828427124746191*alpha_G_1_source[5]*G_1[18]+0.1807015805810503*G_1[17]*alpha_G_1_source[17]+0.2828427124746191*G_1[6]*alpha_G_1_source[17]+0.2828427124746191*alpha_G_1_source[6]*G_1[17]+0.3162277660168379*alpha_G_1_source[11]*G_1[16]+0.8944271909999159*nu_vtsq_sum[6]*F_0[16]+0.3162277660168379*alpha_G_1_source[12]*G_1[15]+0.8944271909999159*nu_vtsq_sum[7]*F_0[15]+0.3162277660168379*G_1[13]*alpha_G_1_source[14]+0.3162277660168379*alpha_G_1_source[13]*G_1[14]+0.2529822128134704*G_1[10]*alpha_G_1_source[10]+nu_vtsq_sum[8]*F_0[9]; tmp_F_0_m_F_1[0] = 0.5*T_perp_over_m_inv[8]*G_1[20]+0.5*T_perp_over_m_inv[7]*G_1[12]+0.5*T_perp_over_m_inv[6]*G_1[11]+0.5*T_perp_over_m_inv[5]*G_1[8]+0.5*T_perp_over_m_inv[4]*G_1[7]+0.5*T_perp_over_m_inv[3]*G_1[4]+0.5*G_1[2]*T_perp_over_m_inv[2]+0.5*G_1[1]*T_perp_over_m_inv[1]+0.5*G_1[0]*T_perp_over_m_inv[0]; tmp_F_0_m_F_1[1] = 0.447213595499958*T_perp_over_m_inv[7]*G_1[20]+0.447213595499958*T_perp_over_m_inv[8]*G_1[12]+0.5000000000000001*T_perp_over_m_inv[5]*G_1[12]+0.447213595499958*T_perp_over_m_inv[3]*G_1[11]+0.5000000000000001*T_perp_over_m_inv[7]*G_1[8]+0.4472135954999579*T_perp_over_m_inv[1]*G_1[7]+0.447213595499958*G_1[4]*T_perp_over_m_inv[6]+0.4472135954999579*G_1[1]*T_perp_over_m_inv[4]+0.5*T_perp_over_m_inv[2]*G_1[4]+0.5*G_1[2]*T_perp_over_m_inv[3]+0.5*G_1[0]*T_perp_over_m_inv[1]+0.5*T_perp_over_m_inv[0]*G_1[1]; diff --git a/kernels/pkpm/pkpm_dist_mirror_force_3x1v_ser_p1.c b/kernels/pkpm/pkpm_dist_mirror_force_3x1v_ser_p1.c index 8eb61217d..df1f6f863 100644 --- a/kernels/pkpm/pkpm_dist_mirror_force_3x1v_ser_p1.c +++ b/kernels/pkpm/pkpm_dist_mirror_force_3x1v_ser_p1.c @@ -1,22 +1,22 @@ #include GKYL_CU_DH void pkpm_dist_mirror_force_3x1v_ser_p1(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1) { - // w[NDIM]: Cell-center coordinates. - // dxv[NDIM]: Cell spacing. - // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. - // nu_vthsq: Input nu*vth^2. - // div_b: Input volume expansion of div(b). - // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. - // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. - // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. - // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), - // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. - // First output is mirror force source, second output is vperp characteristics source. - // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. + // w[NDIM]: Cell-center coordinates. + // dxv[NDIM]: Cell spacing. + // pkpm_prim: Input primitive variables [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp]. + // nu_prim_moms_sum: Input sum of bulk velocities and thermal speeds (squared) times their respective collisionalities. + // div_b: Input volume expansion of div(b). + // pkpm_accel_vars: Input pkpm acceleration variables [T_perp/m*div(b), bb:grad(u), p_force, p_perp_source]. + // f: Input distribution functions [F_0, T_perp/m G = T_perp/m (F_0 - F_1)]. + // F_k_p_1: Input k+1 distribution function. F_2 expansion is the first NP coefficients. + // g_dist_source: Output [2.0*T_perp/m*(2.0*T_perp/m G + T_perp/m (F_2 - F_0)), + // (-vpar div(b) + bb:grad(u) - div(u) - 2 nu) T_perp/m G + 2 nu vth^2 F_0 ]. + // First output is mirror force source, second output is vperp characteristics source. + // F_k_m_1: Output k-1 distribution function. F_1 expansion is the first NP coefficients. const double dvpar = dxv[3], wvpar = w[3]; const double *T_perp_over_m = &pkpm_prim[32]; @@ -47,6 +47,8 @@ GKYL_CU_DH void pkpm_dist_mirror_force_3x1v_ser_p1(const double *w, const double const double *G_1 = &f[24]; const double *F_2 = &F_k_p_1[0]; + const double *nu_vtsq_sum = &nu_prim_moms_sum[8]; + double *out_G_1_mirror = &g_dist_source[0]; double *out_G_1_vperp = &g_dist_source[24]; double *out_F_1 = &F_k_m_1[0]; @@ -156,30 +158,30 @@ GKYL_CU_DH void pkpm_dist_mirror_force_3x1v_ser_p1(const double *w, const double out_G_1_mirror[22] = 0.7071067811865475*T_perp_over_m[1]*tmp_T_perp_g_dist[23]+0.7071067811865475*T_perp_over_m[0]*tmp_T_perp_g_dist[22]+0.7071067811865475*T_perp_over_m[4]*tmp_T_perp_g_dist[21]+0.7071067811865475*T_perp_over_m[5]*tmp_T_perp_g_dist[20]+0.7071067811865475*T_perp_over_m[2]*tmp_T_perp_g_dist[19]+0.7071067811865475*T_perp_over_m[3]*tmp_T_perp_g_dist[18]+0.7071067811865475*T_perp_over_m[7]*tmp_T_perp_g_dist[17]+0.7071067811865475*T_perp_over_m[6]*tmp_T_perp_g_dist[16]; out_G_1_mirror[23] = 0.7071067811865475*T_perp_over_m[0]*tmp_T_perp_g_dist[23]+0.7071067811865475*T_perp_over_m[1]*tmp_T_perp_g_dist[22]+0.7071067811865475*T_perp_over_m[2]*tmp_T_perp_g_dist[21]+0.7071067811865475*T_perp_over_m[3]*tmp_T_perp_g_dist[20]+0.7071067811865475*T_perp_over_m[4]*tmp_T_perp_g_dist[19]+0.7071067811865475*T_perp_over_m[5]*tmp_T_perp_g_dist[18]+0.7071067811865475*T_perp_over_m[6]*tmp_T_perp_g_dist[17]+0.7071067811865475*T_perp_over_m[7]*tmp_T_perp_g_dist[16]; - out_G_1_vperp[0] = 0.25*G_1[15]*alpha_G_1_source[15]+0.25*G_1[14]*alpha_G_1_source[14]+0.25*G_1[13]*alpha_G_1_source[13]+0.25*G_1[12]*alpha_G_1_source[12]+0.25*G_1[11]*alpha_G_1_source[11]+0.7071067811865475*nu_vthsq[7]*F_0[11]+0.25*G_1[10]*alpha_G_1_source[10]+0.25*G_1[9]*alpha_G_1_source[9]+0.25*G_1[8]*alpha_G_1_source[8]+0.25*G_1[7]*alpha_G_1_source[7]+0.7071067811865475*nu_vthsq[6]*F_0[7]+0.25*G_1[6]*alpha_G_1_source[6]+0.7071067811865475*nu_vthsq[5]*F_0[6]+0.25*G_1[5]*alpha_G_1_source[5]+0.7071067811865475*nu_vthsq[4]*F_0[5]+0.25*G_1[4]*alpha_G_1_source[4]+0.7071067811865475*F_0[3]*nu_vthsq[3]+0.25*G_1[3]*alpha_G_1_source[3]+0.7071067811865475*F_0[2]*nu_vthsq[2]+0.25*G_1[2]*alpha_G_1_source[2]+0.7071067811865475*F_0[1]*nu_vthsq[1]+0.25*G_1[1]*alpha_G_1_source[1]+0.7071067811865475*F_0[0]*nu_vthsq[0]+0.25*G_1[0]*alpha_G_1_source[0]; - out_G_1_vperp[1] = 0.25*G_1[14]*alpha_G_1_source[15]+0.25*alpha_G_1_source[14]*G_1[15]+0.25*G_1[10]*alpha_G_1_source[13]+0.25*alpha_G_1_source[10]*G_1[13]+0.25*G_1[9]*alpha_G_1_source[12]+0.25*alpha_G_1_source[9]*G_1[12]+0.25*G_1[7]*alpha_G_1_source[11]+0.25*alpha_G_1_source[7]*G_1[11]+0.7071067811865475*nu_vthsq[6]*F_0[11]+0.25*G_1[4]*alpha_G_1_source[8]+0.25*alpha_G_1_source[4]*G_1[8]+0.7071067811865475*F_0[7]*nu_vthsq[7]+0.25*G_1[3]*alpha_G_1_source[6]+0.25*alpha_G_1_source[3]*G_1[6]+0.7071067811865475*nu_vthsq[3]*F_0[6]+0.7071067811865475*F_0[3]*nu_vthsq[5]+0.25*G_1[2]*alpha_G_1_source[5]+0.25*alpha_G_1_source[2]*G_1[5]+0.7071067811865475*nu_vthsq[2]*F_0[5]+0.7071067811865475*F_0[2]*nu_vthsq[4]+0.7071067811865475*F_0[0]*nu_vthsq[1]+0.25*G_1[0]*alpha_G_1_source[1]+0.25*alpha_G_1_source[0]*G_1[1]+0.7071067811865475*nu_vthsq[0]*F_0[1]; - out_G_1_vperp[2] = 0.25*G_1[13]*alpha_G_1_source[15]+0.25*alpha_G_1_source[13]*G_1[15]+0.25*G_1[10]*alpha_G_1_source[14]+0.25*alpha_G_1_source[10]*G_1[14]+0.25*G_1[8]*alpha_G_1_source[12]+0.25*alpha_G_1_source[8]*G_1[12]+0.25*G_1[6]*alpha_G_1_source[11]+0.25*alpha_G_1_source[6]*G_1[11]+0.7071067811865475*nu_vthsq[5]*F_0[11]+0.25*G_1[4]*alpha_G_1_source[9]+0.25*alpha_G_1_source[4]*G_1[9]+0.7071067811865475*F_0[6]*nu_vthsq[7]+0.25*G_1[3]*alpha_G_1_source[7]+0.25*alpha_G_1_source[3]*G_1[7]+0.7071067811865475*nu_vthsq[3]*F_0[7]+0.7071067811865475*F_0[3]*nu_vthsq[6]+0.25*G_1[1]*alpha_G_1_source[5]+0.25*alpha_G_1_source[1]*G_1[5]+0.7071067811865475*nu_vthsq[1]*F_0[5]+0.7071067811865475*F_0[1]*nu_vthsq[4]+0.7071067811865475*F_0[0]*nu_vthsq[2]+0.25*G_1[0]*alpha_G_1_source[2]+0.25*alpha_G_1_source[0]*G_1[2]+0.7071067811865475*nu_vthsq[0]*F_0[2]; - out_G_1_vperp[3] = 0.25*G_1[12]*alpha_G_1_source[15]+0.25*alpha_G_1_source[12]*G_1[15]+0.25*G_1[9]*alpha_G_1_source[14]+0.25*alpha_G_1_source[9]*G_1[14]+0.25*G_1[8]*alpha_G_1_source[13]+0.25*alpha_G_1_source[8]*G_1[13]+0.25*G_1[5]*alpha_G_1_source[11]+0.25*alpha_G_1_source[5]*G_1[11]+0.7071067811865475*nu_vthsq[4]*F_0[11]+0.25*G_1[4]*alpha_G_1_source[10]+0.25*alpha_G_1_source[4]*G_1[10]+0.7071067811865475*F_0[5]*nu_vthsq[7]+0.25*G_1[2]*alpha_G_1_source[7]+0.25*alpha_G_1_source[2]*G_1[7]+0.7071067811865475*nu_vthsq[2]*F_0[7]+0.7071067811865475*F_0[2]*nu_vthsq[6]+0.25*G_1[1]*alpha_G_1_source[6]+0.25*alpha_G_1_source[1]*G_1[6]+0.7071067811865475*nu_vthsq[1]*F_0[6]+0.7071067811865475*F_0[1]*nu_vthsq[5]+0.7071067811865475*F_0[0]*nu_vthsq[3]+0.25*G_1[0]*alpha_G_1_source[3]+0.25*alpha_G_1_source[0]*G_1[3]+0.7071067811865475*nu_vthsq[0]*F_0[3]; - out_G_1_vperp[4] = 0.223606797749979*alpha_G_1_source[15]*G_1[23]+0.223606797749979*alpha_G_1_source[14]*G_1[22]+0.223606797749979*alpha_G_1_source[13]*G_1[21]+0.223606797749979*alpha_G_1_source[12]*G_1[20]+0.223606797749979*alpha_G_1_source[10]*G_1[19]+0.223606797749979*alpha_G_1_source[9]*G_1[18]+0.223606797749979*alpha_G_1_source[8]*G_1[17]+0.223606797749979*alpha_G_1_source[4]*G_1[16]+0.25*G_1[11]*alpha_G_1_source[15]+0.25*alpha_G_1_source[11]*G_1[15]+0.7071067811865475*nu_vthsq[7]*F_0[15]+0.25*G_1[7]*alpha_G_1_source[14]+0.25*alpha_G_1_source[7]*G_1[14]+0.7071067811865475*nu_vthsq[6]*F_0[14]+0.25*G_1[6]*alpha_G_1_source[13]+0.25*alpha_G_1_source[6]*G_1[13]+0.7071067811865475*nu_vthsq[5]*F_0[13]+0.25*G_1[5]*alpha_G_1_source[12]+0.25*alpha_G_1_source[5]*G_1[12]+0.7071067811865475*nu_vthsq[4]*F_0[12]+0.25*G_1[3]*alpha_G_1_source[10]+0.25*alpha_G_1_source[3]*G_1[10]+0.7071067811865475*nu_vthsq[3]*F_0[10]+0.25*G_1[2]*alpha_G_1_source[9]+0.25*alpha_G_1_source[2]*G_1[9]+0.7071067811865475*nu_vthsq[2]*F_0[9]+0.25*G_1[1]*alpha_G_1_source[8]+0.25*alpha_G_1_source[1]*G_1[8]+0.7071067811865475*nu_vthsq[1]*F_0[8]+0.25*G_1[0]*alpha_G_1_source[4]+0.25*alpha_G_1_source[0]*G_1[4]+0.7071067811865475*nu_vthsq[0]*F_0[4]; - out_G_1_vperp[5] = 0.25*G_1[10]*alpha_G_1_source[15]+0.25*alpha_G_1_source[10]*G_1[15]+0.25*G_1[13]*alpha_G_1_source[14]+0.25*alpha_G_1_source[13]*G_1[14]+0.25*G_1[4]*alpha_G_1_source[12]+0.25*alpha_G_1_source[4]*G_1[12]+0.25*G_1[3]*alpha_G_1_source[11]+0.25*alpha_G_1_source[3]*G_1[11]+0.7071067811865475*nu_vthsq[3]*F_0[11]+0.25*G_1[8]*alpha_G_1_source[9]+0.25*alpha_G_1_source[8]*G_1[9]+0.7071067811865475*F_0[3]*nu_vthsq[7]+0.25*G_1[6]*alpha_G_1_source[7]+0.25*alpha_G_1_source[6]*G_1[7]+0.7071067811865475*nu_vthsq[5]*F_0[7]+0.7071067811865475*F_0[6]*nu_vthsq[6]+0.25*G_1[0]*alpha_G_1_source[5]+0.25*alpha_G_1_source[0]*G_1[5]+0.7071067811865475*nu_vthsq[0]*F_0[5]+0.7071067811865475*F_0[0]*nu_vthsq[4]+0.7071067811865475*F_0[1]*nu_vthsq[2]+0.25*G_1[1]*alpha_G_1_source[2]+0.25*alpha_G_1_source[1]*G_1[2]+0.7071067811865475*nu_vthsq[1]*F_0[2]; - out_G_1_vperp[6] = 0.25*G_1[9]*alpha_G_1_source[15]+0.25*alpha_G_1_source[9]*G_1[15]+0.25*G_1[12]*alpha_G_1_source[14]+0.25*alpha_G_1_source[12]*G_1[14]+0.25*G_1[4]*alpha_G_1_source[13]+0.25*alpha_G_1_source[4]*G_1[13]+0.25*G_1[2]*alpha_G_1_source[11]+0.25*alpha_G_1_source[2]*G_1[11]+0.7071067811865475*nu_vthsq[2]*F_0[11]+0.25*G_1[8]*alpha_G_1_source[10]+0.25*alpha_G_1_source[8]*G_1[10]+0.7071067811865475*F_0[2]*nu_vthsq[7]+0.25*G_1[5]*alpha_G_1_source[7]+0.25*alpha_G_1_source[5]*G_1[7]+0.7071067811865475*nu_vthsq[4]*F_0[7]+0.7071067811865475*F_0[5]*nu_vthsq[6]+0.25*G_1[0]*alpha_G_1_source[6]+0.25*alpha_G_1_source[0]*G_1[6]+0.7071067811865475*nu_vthsq[0]*F_0[6]+0.7071067811865475*F_0[0]*nu_vthsq[5]+0.7071067811865475*F_0[1]*nu_vthsq[3]+0.25*G_1[1]*alpha_G_1_source[3]+0.25*alpha_G_1_source[1]*G_1[3]+0.7071067811865475*nu_vthsq[1]*F_0[3]; - out_G_1_vperp[7] = 0.25*G_1[8]*alpha_G_1_source[15]+0.25*alpha_G_1_source[8]*G_1[15]+0.25*G_1[4]*alpha_G_1_source[14]+0.25*alpha_G_1_source[4]*G_1[14]+0.25*G_1[12]*alpha_G_1_source[13]+0.25*alpha_G_1_source[12]*G_1[13]+0.25*G_1[1]*alpha_G_1_source[11]+0.25*alpha_G_1_source[1]*G_1[11]+0.7071067811865475*nu_vthsq[1]*F_0[11]+0.25*G_1[9]*alpha_G_1_source[10]+0.25*alpha_G_1_source[9]*G_1[10]+0.7071067811865475*F_0[1]*nu_vthsq[7]+0.25*G_1[0]*alpha_G_1_source[7]+0.25*alpha_G_1_source[0]*G_1[7]+0.7071067811865475*nu_vthsq[0]*F_0[7]+0.7071067811865475*F_0[0]*nu_vthsq[6]+0.25*G_1[5]*alpha_G_1_source[6]+0.25*alpha_G_1_source[5]*G_1[6]+0.7071067811865475*nu_vthsq[4]*F_0[6]+0.7071067811865475*F_0[5]*nu_vthsq[5]+0.7071067811865475*F_0[2]*nu_vthsq[3]+0.25*G_1[2]*alpha_G_1_source[3]+0.25*alpha_G_1_source[2]*G_1[3]+0.7071067811865475*nu_vthsq[2]*F_0[3]; - out_G_1_vperp[8] = 0.223606797749979*alpha_G_1_source[14]*G_1[23]+0.223606797749979*alpha_G_1_source[15]*G_1[22]+0.223606797749979*alpha_G_1_source[10]*G_1[21]+0.223606797749979*alpha_G_1_source[9]*G_1[20]+0.223606797749979*alpha_G_1_source[13]*G_1[19]+0.223606797749979*alpha_G_1_source[12]*G_1[18]+0.223606797749979*alpha_G_1_source[4]*G_1[17]+0.223606797749979*alpha_G_1_source[8]*G_1[16]+0.25*G_1[7]*alpha_G_1_source[15]+0.25*alpha_G_1_source[7]*G_1[15]+0.7071067811865475*nu_vthsq[6]*F_0[15]+0.25*G_1[11]*alpha_G_1_source[14]+0.25*alpha_G_1_source[11]*G_1[14]+0.7071067811865475*nu_vthsq[7]*F_0[14]+0.25*G_1[3]*alpha_G_1_source[13]+0.25*alpha_G_1_source[3]*G_1[13]+0.7071067811865475*nu_vthsq[3]*F_0[13]+0.25*G_1[2]*alpha_G_1_source[12]+0.25*alpha_G_1_source[2]*G_1[12]+0.7071067811865475*nu_vthsq[2]*F_0[12]+0.25*G_1[6]*alpha_G_1_source[10]+0.25*alpha_G_1_source[6]*G_1[10]+0.7071067811865475*nu_vthsq[5]*F_0[10]+0.25*G_1[5]*alpha_G_1_source[9]+0.25*alpha_G_1_source[5]*G_1[9]+0.7071067811865475*nu_vthsq[4]*F_0[9]+0.25*G_1[0]*alpha_G_1_source[8]+0.25*alpha_G_1_source[0]*G_1[8]+0.7071067811865475*nu_vthsq[0]*F_0[8]+0.25*G_1[1]*alpha_G_1_source[4]+0.25*alpha_G_1_source[1]*G_1[4]+0.7071067811865475*nu_vthsq[1]*F_0[4]; - out_G_1_vperp[9] = 0.223606797749979*alpha_G_1_source[13]*G_1[23]+0.223606797749979*alpha_G_1_source[10]*G_1[22]+0.223606797749979*alpha_G_1_source[15]*G_1[21]+0.223606797749979*alpha_G_1_source[8]*G_1[20]+0.223606797749979*alpha_G_1_source[14]*G_1[19]+0.223606797749979*alpha_G_1_source[4]*G_1[18]+0.223606797749979*alpha_G_1_source[12]*G_1[17]+0.223606797749979*alpha_G_1_source[9]*G_1[16]+0.25*G_1[6]*alpha_G_1_source[15]+0.25*alpha_G_1_source[6]*G_1[15]+0.7071067811865475*nu_vthsq[5]*F_0[15]+0.25*G_1[3]*alpha_G_1_source[14]+0.25*alpha_G_1_source[3]*G_1[14]+0.7071067811865475*nu_vthsq[3]*F_0[14]+0.25*G_1[11]*alpha_G_1_source[13]+0.25*alpha_G_1_source[11]*G_1[13]+0.7071067811865475*nu_vthsq[7]*F_0[13]+0.25*G_1[1]*alpha_G_1_source[12]+0.25*alpha_G_1_source[1]*G_1[12]+0.7071067811865475*nu_vthsq[1]*F_0[12]+0.25*G_1[7]*alpha_G_1_source[10]+0.25*alpha_G_1_source[7]*G_1[10]+0.7071067811865475*nu_vthsq[6]*F_0[10]+0.25*G_1[0]*alpha_G_1_source[9]+0.25*alpha_G_1_source[0]*G_1[9]+0.7071067811865475*nu_vthsq[0]*F_0[9]+0.25*G_1[5]*alpha_G_1_source[8]+0.25*alpha_G_1_source[5]*G_1[8]+0.7071067811865475*nu_vthsq[4]*F_0[8]+0.25*G_1[2]*alpha_G_1_source[4]+0.25*alpha_G_1_source[2]*G_1[4]+0.7071067811865475*nu_vthsq[2]*F_0[4]; - out_G_1_vperp[10] = 0.223606797749979*alpha_G_1_source[12]*G_1[23]+0.223606797749979*alpha_G_1_source[9]*G_1[22]+0.223606797749979*alpha_G_1_source[8]*G_1[21]+0.223606797749979*alpha_G_1_source[15]*G_1[20]+0.223606797749979*alpha_G_1_source[4]*G_1[19]+0.223606797749979*alpha_G_1_source[14]*G_1[18]+0.223606797749979*alpha_G_1_source[13]*G_1[17]+0.223606797749979*alpha_G_1_source[10]*G_1[16]+0.25*G_1[5]*alpha_G_1_source[15]+0.25*alpha_G_1_source[5]*G_1[15]+0.7071067811865475*nu_vthsq[4]*F_0[15]+0.25*G_1[2]*alpha_G_1_source[14]+0.25*alpha_G_1_source[2]*G_1[14]+0.7071067811865475*nu_vthsq[2]*F_0[14]+0.25*G_1[1]*alpha_G_1_source[13]+0.25*alpha_G_1_source[1]*G_1[13]+0.7071067811865475*nu_vthsq[1]*F_0[13]+0.25*G_1[11]*alpha_G_1_source[12]+0.25*alpha_G_1_source[11]*G_1[12]+0.7071067811865475*nu_vthsq[7]*F_0[12]+0.25*G_1[0]*alpha_G_1_source[10]+0.25*alpha_G_1_source[0]*G_1[10]+0.7071067811865475*nu_vthsq[0]*F_0[10]+0.25*G_1[7]*alpha_G_1_source[9]+0.25*alpha_G_1_source[7]*G_1[9]+0.7071067811865475*nu_vthsq[6]*F_0[9]+0.25*G_1[6]*alpha_G_1_source[8]+0.25*alpha_G_1_source[6]*G_1[8]+0.7071067811865475*nu_vthsq[5]*F_0[8]+0.25*G_1[3]*alpha_G_1_source[4]+0.25*alpha_G_1_source[3]*G_1[4]+0.7071067811865475*nu_vthsq[3]*F_0[4]; - out_G_1_vperp[11] = 0.25*G_1[4]*alpha_G_1_source[15]+0.25*alpha_G_1_source[4]*G_1[15]+0.25*G_1[8]*alpha_G_1_source[14]+0.25*alpha_G_1_source[8]*G_1[14]+0.25*G_1[9]*alpha_G_1_source[13]+0.25*alpha_G_1_source[9]*G_1[13]+0.25*G_1[10]*alpha_G_1_source[12]+0.25*alpha_G_1_source[10]*G_1[12]+0.25*G_1[0]*alpha_G_1_source[11]+0.25*alpha_G_1_source[0]*G_1[11]+0.7071067811865475*nu_vthsq[0]*F_0[11]+0.7071067811865475*F_0[0]*nu_vthsq[7]+0.25*G_1[1]*alpha_G_1_source[7]+0.25*alpha_G_1_source[1]*G_1[7]+0.7071067811865475*nu_vthsq[1]*F_0[7]+0.7071067811865475*F_0[1]*nu_vthsq[6]+0.25*G_1[2]*alpha_G_1_source[6]+0.25*alpha_G_1_source[2]*G_1[6]+0.7071067811865475*nu_vthsq[2]*F_0[6]+0.7071067811865475*F_0[2]*nu_vthsq[5]+0.25*G_1[3]*alpha_G_1_source[5]+0.25*alpha_G_1_source[3]*G_1[5]+0.7071067811865475*nu_vthsq[3]*F_0[5]+0.7071067811865475*F_0[3]*nu_vthsq[4]; - out_G_1_vperp[12] = 0.223606797749979*alpha_G_1_source[10]*G_1[23]+0.223606797749979*alpha_G_1_source[13]*G_1[22]+0.223606797749979*alpha_G_1_source[14]*G_1[21]+0.223606797749979*alpha_G_1_source[4]*G_1[20]+0.223606797749979*alpha_G_1_source[15]*G_1[19]+0.223606797749979*alpha_G_1_source[8]*G_1[18]+0.223606797749979*alpha_G_1_source[9]*G_1[17]+0.223606797749979*alpha_G_1_source[12]*G_1[16]+0.25*G_1[3]*alpha_G_1_source[15]+0.25*alpha_G_1_source[3]*G_1[15]+0.7071067811865475*nu_vthsq[3]*F_0[15]+0.25*G_1[6]*alpha_G_1_source[14]+0.25*alpha_G_1_source[6]*G_1[14]+0.7071067811865475*nu_vthsq[5]*F_0[14]+0.25*G_1[7]*alpha_G_1_source[13]+0.25*alpha_G_1_source[7]*G_1[13]+0.7071067811865475*nu_vthsq[6]*F_0[13]+0.25*G_1[0]*alpha_G_1_source[12]+0.25*alpha_G_1_source[0]*G_1[12]+0.7071067811865475*nu_vthsq[0]*F_0[12]+0.25*G_1[10]*alpha_G_1_source[11]+0.25*alpha_G_1_source[10]*G_1[11]+0.7071067811865475*nu_vthsq[7]*F_0[10]+0.25*G_1[1]*alpha_G_1_source[9]+0.25*alpha_G_1_source[1]*G_1[9]+0.7071067811865475*nu_vthsq[1]*F_0[9]+0.25*G_1[2]*alpha_G_1_source[8]+0.25*alpha_G_1_source[2]*G_1[8]+0.7071067811865475*nu_vthsq[2]*F_0[8]+0.25*G_1[4]*alpha_G_1_source[5]+0.25*alpha_G_1_source[4]*G_1[5]+0.7071067811865475*F_0[4]*nu_vthsq[4]; - out_G_1_vperp[13] = 0.223606797749979*alpha_G_1_source[9]*G_1[23]+0.223606797749979*alpha_G_1_source[12]*G_1[22]+0.223606797749979*alpha_G_1_source[4]*G_1[21]+0.223606797749979*alpha_G_1_source[14]*G_1[20]+0.223606797749979*alpha_G_1_source[8]*G_1[19]+0.223606797749979*alpha_G_1_source[15]*G_1[18]+0.223606797749979*alpha_G_1_source[10]*G_1[17]+0.223606797749979*alpha_G_1_source[13]*G_1[16]+0.25*G_1[2]*alpha_G_1_source[15]+0.25*alpha_G_1_source[2]*G_1[15]+0.7071067811865475*nu_vthsq[2]*F_0[15]+0.25*G_1[5]*alpha_G_1_source[14]+0.25*alpha_G_1_source[5]*G_1[14]+0.7071067811865475*nu_vthsq[4]*F_0[14]+0.25*G_1[0]*alpha_G_1_source[13]+0.25*alpha_G_1_source[0]*G_1[13]+0.7071067811865475*nu_vthsq[0]*F_0[13]+0.25*G_1[7]*alpha_G_1_source[12]+0.25*alpha_G_1_source[7]*G_1[12]+0.7071067811865475*nu_vthsq[6]*F_0[12]+0.25*G_1[9]*alpha_G_1_source[11]+0.25*alpha_G_1_source[9]*G_1[11]+0.25*G_1[1]*alpha_G_1_source[10]+0.25*alpha_G_1_source[1]*G_1[10]+0.7071067811865475*nu_vthsq[1]*F_0[10]+0.7071067811865475*nu_vthsq[7]*F_0[9]+0.25*G_1[3]*alpha_G_1_source[8]+0.25*alpha_G_1_source[3]*G_1[8]+0.7071067811865475*nu_vthsq[3]*F_0[8]+0.25*G_1[4]*alpha_G_1_source[6]+0.25*alpha_G_1_source[4]*G_1[6]+0.7071067811865475*F_0[4]*nu_vthsq[5]; - out_G_1_vperp[14] = 0.223606797749979*alpha_G_1_source[8]*G_1[23]+0.223606797749979*alpha_G_1_source[4]*G_1[22]+0.223606797749979*alpha_G_1_source[12]*G_1[21]+0.223606797749979*alpha_G_1_source[13]*G_1[20]+0.223606797749979*alpha_G_1_source[9]*G_1[19]+0.223606797749979*alpha_G_1_source[10]*G_1[18]+0.223606797749979*alpha_G_1_source[15]*G_1[17]+0.223606797749979*alpha_G_1_source[14]*G_1[16]+0.25*G_1[1]*alpha_G_1_source[15]+0.25*alpha_G_1_source[1]*G_1[15]+0.7071067811865475*nu_vthsq[1]*F_0[15]+0.25*G_1[0]*alpha_G_1_source[14]+0.25*alpha_G_1_source[0]*G_1[14]+0.7071067811865475*nu_vthsq[0]*F_0[14]+0.25*G_1[5]*alpha_G_1_source[13]+0.25*alpha_G_1_source[5]*G_1[13]+0.7071067811865475*nu_vthsq[4]*F_0[13]+0.25*G_1[6]*alpha_G_1_source[12]+0.25*alpha_G_1_source[6]*G_1[12]+0.7071067811865475*nu_vthsq[5]*F_0[12]+0.25*G_1[8]*alpha_G_1_source[11]+0.25*alpha_G_1_source[8]*G_1[11]+0.25*G_1[2]*alpha_G_1_source[10]+0.25*alpha_G_1_source[2]*G_1[10]+0.7071067811865475*nu_vthsq[2]*F_0[10]+0.25*G_1[3]*alpha_G_1_source[9]+0.25*alpha_G_1_source[3]*G_1[9]+0.7071067811865475*nu_vthsq[3]*F_0[9]+0.7071067811865475*nu_vthsq[7]*F_0[8]+0.25*G_1[4]*alpha_G_1_source[7]+0.25*alpha_G_1_source[4]*G_1[7]+0.7071067811865475*F_0[4]*nu_vthsq[6]; - out_G_1_vperp[15] = 0.223606797749979*alpha_G_1_source[4]*G_1[23]+0.223606797749979*alpha_G_1_source[8]*G_1[22]+0.223606797749979*alpha_G_1_source[9]*G_1[21]+0.223606797749979*alpha_G_1_source[10]*G_1[20]+0.223606797749979*alpha_G_1_source[12]*G_1[19]+0.223606797749979*alpha_G_1_source[13]*G_1[18]+0.223606797749979*alpha_G_1_source[14]*G_1[17]+0.223606797749979*alpha_G_1_source[15]*G_1[16]+0.25*G_1[0]*alpha_G_1_source[15]+0.25*alpha_G_1_source[0]*G_1[15]+0.7071067811865475*nu_vthsq[0]*F_0[15]+0.25*G_1[1]*alpha_G_1_source[14]+0.25*alpha_G_1_source[1]*G_1[14]+0.7071067811865475*nu_vthsq[1]*F_0[14]+0.25*G_1[2]*alpha_G_1_source[13]+0.25*alpha_G_1_source[2]*G_1[13]+0.7071067811865475*nu_vthsq[2]*F_0[13]+0.25*G_1[3]*alpha_G_1_source[12]+0.25*alpha_G_1_source[3]*G_1[12]+0.7071067811865475*nu_vthsq[3]*F_0[12]+0.25*G_1[4]*alpha_G_1_source[11]+0.25*alpha_G_1_source[4]*G_1[11]+0.25*G_1[5]*alpha_G_1_source[10]+0.25*alpha_G_1_source[5]*G_1[10]+0.7071067811865475*nu_vthsq[4]*F_0[10]+0.25*G_1[6]*alpha_G_1_source[9]+0.25*alpha_G_1_source[6]*G_1[9]+0.7071067811865475*nu_vthsq[5]*F_0[9]+0.25*G_1[7]*alpha_G_1_source[8]+0.25*alpha_G_1_source[7]*G_1[8]+0.7071067811865475*nu_vthsq[6]*F_0[8]+0.7071067811865475*F_0[4]*nu_vthsq[7]; - out_G_1_vperp[16] = 0.2500000000000001*alpha_G_1_source[11]*G_1[23]+0.7071067811865475*nu_vthsq[7]*F_0[23]+0.25*alpha_G_1_source[7]*G_1[22]+0.7071067811865475*nu_vthsq[6]*F_0[22]+0.25*alpha_G_1_source[6]*G_1[21]+0.7071067811865475*nu_vthsq[5]*F_0[21]+0.25*alpha_G_1_source[5]*G_1[20]+0.7071067811865475*nu_vthsq[4]*F_0[20]+0.2500000000000001*alpha_G_1_source[3]*G_1[19]+0.7071067811865475*nu_vthsq[3]*F_0[19]+0.2500000000000001*alpha_G_1_source[2]*G_1[18]+0.7071067811865475*nu_vthsq[2]*F_0[18]+0.2500000000000001*alpha_G_1_source[1]*G_1[17]+0.7071067811865475*nu_vthsq[1]*F_0[17]+0.25*alpha_G_1_source[0]*G_1[16]+0.7071067811865475*nu_vthsq[0]*F_0[16]+0.223606797749979*G_1[15]*alpha_G_1_source[15]+0.223606797749979*G_1[14]*alpha_G_1_source[14]+0.223606797749979*G_1[13]*alpha_G_1_source[13]+0.223606797749979*G_1[12]*alpha_G_1_source[12]+0.223606797749979*G_1[10]*alpha_G_1_source[10]+0.223606797749979*G_1[9]*alpha_G_1_source[9]+0.223606797749979*G_1[8]*alpha_G_1_source[8]+0.223606797749979*G_1[4]*alpha_G_1_source[4]; - out_G_1_vperp[17] = 0.25*alpha_G_1_source[7]*G_1[23]+0.7071067811865475*nu_vthsq[6]*F_0[23]+0.2500000000000001*alpha_G_1_source[11]*G_1[22]+0.7071067811865475*nu_vthsq[7]*F_0[22]+0.2500000000000001*alpha_G_1_source[3]*G_1[21]+0.7071067811865475*nu_vthsq[3]*F_0[21]+0.2500000000000001*alpha_G_1_source[2]*G_1[20]+0.7071067811865475*nu_vthsq[2]*F_0[20]+0.25*alpha_G_1_source[6]*G_1[19]+0.7071067811865475*nu_vthsq[5]*F_0[19]+0.25*alpha_G_1_source[5]*G_1[18]+0.7071067811865475*nu_vthsq[4]*F_0[18]+0.25*alpha_G_1_source[0]*G_1[17]+0.7071067811865475*nu_vthsq[0]*F_0[17]+0.2500000000000001*alpha_G_1_source[1]*G_1[16]+0.7071067811865475*nu_vthsq[1]*F_0[16]+0.223606797749979*G_1[14]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[14]*G_1[15]+0.223606797749979*G_1[10]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[10]*G_1[13]+0.223606797749979*G_1[9]*alpha_G_1_source[12]+0.223606797749979*alpha_G_1_source[9]*G_1[12]+0.223606797749979*G_1[4]*alpha_G_1_source[8]+0.223606797749979*alpha_G_1_source[4]*G_1[8]; - out_G_1_vperp[18] = 0.25*alpha_G_1_source[6]*G_1[23]+0.7071067811865475*nu_vthsq[5]*F_0[23]+0.2500000000000001*alpha_G_1_source[3]*G_1[22]+0.7071067811865475*nu_vthsq[3]*F_0[22]+0.2500000000000001*alpha_G_1_source[11]*G_1[21]+0.7071067811865475*nu_vthsq[7]*F_0[21]+0.2500000000000001*alpha_G_1_source[1]*G_1[20]+0.7071067811865475*nu_vthsq[1]*F_0[20]+0.25*alpha_G_1_source[7]*G_1[19]+0.7071067811865475*nu_vthsq[6]*F_0[19]+0.25*alpha_G_1_source[0]*G_1[18]+0.7071067811865475*nu_vthsq[0]*F_0[18]+0.25*alpha_G_1_source[5]*G_1[17]+0.7071067811865475*nu_vthsq[4]*F_0[17]+0.2500000000000001*alpha_G_1_source[2]*G_1[16]+0.7071067811865475*nu_vthsq[2]*F_0[16]+0.223606797749979*G_1[13]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[13]*G_1[15]+0.223606797749979*G_1[10]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[10]*G_1[14]+0.223606797749979*G_1[8]*alpha_G_1_source[12]+0.223606797749979*alpha_G_1_source[8]*G_1[12]+0.223606797749979*G_1[4]*alpha_G_1_source[9]+0.223606797749979*alpha_G_1_source[4]*G_1[9]; - out_G_1_vperp[19] = 0.25*alpha_G_1_source[5]*G_1[23]+0.7071067811865475*nu_vthsq[4]*F_0[23]+0.2500000000000001*alpha_G_1_source[2]*G_1[22]+0.7071067811865475*nu_vthsq[2]*F_0[22]+0.2500000000000001*alpha_G_1_source[1]*G_1[21]+0.7071067811865475*nu_vthsq[1]*F_0[21]+0.2500000000000001*alpha_G_1_source[11]*G_1[20]+0.7071067811865475*nu_vthsq[7]*F_0[20]+0.25*alpha_G_1_source[0]*G_1[19]+0.7071067811865475*nu_vthsq[0]*F_0[19]+0.25*alpha_G_1_source[7]*G_1[18]+0.7071067811865475*nu_vthsq[6]*F_0[18]+0.25*alpha_G_1_source[6]*G_1[17]+0.7071067811865475*nu_vthsq[5]*F_0[17]+0.2500000000000001*alpha_G_1_source[3]*G_1[16]+0.7071067811865475*nu_vthsq[3]*F_0[16]+0.223606797749979*G_1[12]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[12]*G_1[15]+0.223606797749979*G_1[9]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[9]*G_1[14]+0.223606797749979*G_1[8]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[8]*G_1[13]+0.223606797749979*G_1[4]*alpha_G_1_source[10]+0.223606797749979*alpha_G_1_source[4]*G_1[10]; - out_G_1_vperp[20] = 0.2500000000000001*alpha_G_1_source[3]*G_1[23]+0.7071067811865475*nu_vthsq[3]*F_0[23]+0.25*alpha_G_1_source[6]*G_1[22]+0.7071067811865475*nu_vthsq[5]*F_0[22]+0.25*alpha_G_1_source[7]*G_1[21]+0.7071067811865475*nu_vthsq[6]*F_0[21]+0.25*alpha_G_1_source[0]*G_1[20]+0.7071067811865475*nu_vthsq[0]*F_0[20]+0.2500000000000001*alpha_G_1_source[11]*G_1[19]+0.7071067811865475*nu_vthsq[7]*F_0[19]+0.2500000000000001*alpha_G_1_source[1]*G_1[18]+0.7071067811865475*nu_vthsq[1]*F_0[18]+0.2500000000000001*alpha_G_1_source[2]*G_1[17]+0.7071067811865475*nu_vthsq[2]*F_0[17]+0.25*alpha_G_1_source[5]*G_1[16]+0.7071067811865475*nu_vthsq[4]*F_0[16]+0.223606797749979*G_1[10]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[10]*G_1[15]+0.223606797749979*G_1[13]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[13]*G_1[14]+0.223606797749979*G_1[4]*alpha_G_1_source[12]+0.223606797749979*alpha_G_1_source[4]*G_1[12]+0.223606797749979*G_1[8]*alpha_G_1_source[9]+0.223606797749979*alpha_G_1_source[8]*G_1[9]; - out_G_1_vperp[21] = 0.2500000000000001*alpha_G_1_source[2]*G_1[23]+0.7071067811865475*nu_vthsq[2]*F_0[23]+0.25*alpha_G_1_source[5]*G_1[22]+0.7071067811865475*nu_vthsq[4]*F_0[22]+0.25*alpha_G_1_source[0]*G_1[21]+0.7071067811865475*nu_vthsq[0]*F_0[21]+0.25*alpha_G_1_source[7]*G_1[20]+0.7071067811865475*nu_vthsq[6]*F_0[20]+0.2500000000000001*alpha_G_1_source[1]*G_1[19]+0.7071067811865475*nu_vthsq[1]*F_0[19]+0.2500000000000001*alpha_G_1_source[11]*G_1[18]+0.7071067811865475*nu_vthsq[7]*F_0[18]+0.2500000000000001*alpha_G_1_source[3]*G_1[17]+0.7071067811865475*nu_vthsq[3]*F_0[17]+0.25*alpha_G_1_source[6]*G_1[16]+0.7071067811865475*nu_vthsq[5]*F_0[16]+0.223606797749979*G_1[9]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[9]*G_1[15]+0.223606797749979*G_1[12]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[12]*G_1[14]+0.223606797749979*G_1[4]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[4]*G_1[13]+0.223606797749979*G_1[8]*alpha_G_1_source[10]+0.223606797749979*alpha_G_1_source[8]*G_1[10]; - out_G_1_vperp[22] = 0.2500000000000001*alpha_G_1_source[1]*G_1[23]+0.7071067811865475*nu_vthsq[1]*F_0[23]+0.25*alpha_G_1_source[0]*G_1[22]+0.7071067811865475*nu_vthsq[0]*F_0[22]+0.25*alpha_G_1_source[5]*G_1[21]+0.7071067811865475*nu_vthsq[4]*F_0[21]+0.25*alpha_G_1_source[6]*G_1[20]+0.7071067811865475*nu_vthsq[5]*F_0[20]+0.2500000000000001*alpha_G_1_source[2]*G_1[19]+0.7071067811865475*nu_vthsq[2]*F_0[19]+0.2500000000000001*alpha_G_1_source[3]*G_1[18]+0.7071067811865475*nu_vthsq[3]*F_0[18]+0.2500000000000001*alpha_G_1_source[11]*G_1[17]+0.7071067811865475*nu_vthsq[7]*F_0[17]+0.25*alpha_G_1_source[7]*G_1[16]+0.7071067811865475*nu_vthsq[6]*F_0[16]+0.223606797749979*G_1[8]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[8]*G_1[15]+0.223606797749979*G_1[4]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[4]*G_1[14]+0.223606797749979*G_1[12]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[12]*G_1[13]+0.223606797749979*G_1[9]*alpha_G_1_source[10]+0.223606797749979*alpha_G_1_source[9]*G_1[10]; - out_G_1_vperp[23] = 0.25*alpha_G_1_source[0]*G_1[23]+0.7071067811865475*nu_vthsq[0]*F_0[23]+0.2500000000000001*alpha_G_1_source[1]*G_1[22]+0.7071067811865475*nu_vthsq[1]*F_0[22]+0.2500000000000001*alpha_G_1_source[2]*G_1[21]+0.7071067811865475*nu_vthsq[2]*F_0[21]+0.2500000000000001*alpha_G_1_source[3]*G_1[20]+0.7071067811865475*nu_vthsq[3]*F_0[20]+0.25*alpha_G_1_source[5]*G_1[19]+0.7071067811865475*nu_vthsq[4]*F_0[19]+0.25*alpha_G_1_source[6]*G_1[18]+0.7071067811865475*nu_vthsq[5]*F_0[18]+0.25*alpha_G_1_source[7]*G_1[17]+0.7071067811865475*nu_vthsq[6]*F_0[17]+0.2500000000000001*alpha_G_1_source[11]*G_1[16]+0.7071067811865475*nu_vthsq[7]*F_0[16]+0.223606797749979*G_1[4]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[4]*G_1[15]+0.223606797749979*G_1[8]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[8]*G_1[14]+0.223606797749979*G_1[9]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[9]*G_1[13]+0.223606797749979*G_1[10]*alpha_G_1_source[12]+0.223606797749979*alpha_G_1_source[10]*G_1[12]; + out_G_1_vperp[0] = 0.25*G_1[15]*alpha_G_1_source[15]+0.25*G_1[14]*alpha_G_1_source[14]+0.25*G_1[13]*alpha_G_1_source[13]+0.25*G_1[12]*alpha_G_1_source[12]+0.25*G_1[11]*alpha_G_1_source[11]+0.7071067811865475*nu_vtsq_sum[7]*F_0[11]+0.25*G_1[10]*alpha_G_1_source[10]+0.25*G_1[9]*alpha_G_1_source[9]+0.25*G_1[8]*alpha_G_1_source[8]+0.25*G_1[7]*alpha_G_1_source[7]+0.7071067811865475*nu_vtsq_sum[6]*F_0[7]+0.25*G_1[6]*alpha_G_1_source[6]+0.7071067811865475*nu_vtsq_sum[5]*F_0[6]+0.25*G_1[5]*alpha_G_1_source[5]+0.7071067811865475*nu_vtsq_sum[4]*F_0[5]+0.25*G_1[4]*alpha_G_1_source[4]+0.7071067811865475*F_0[3]*nu_vtsq_sum[3]+0.25*G_1[3]*alpha_G_1_source[3]+0.7071067811865475*F_0[2]*nu_vtsq_sum[2]+0.25*G_1[2]*alpha_G_1_source[2]+0.7071067811865475*F_0[1]*nu_vtsq_sum[1]+0.25*G_1[1]*alpha_G_1_source[1]+0.7071067811865475*F_0[0]*nu_vtsq_sum[0]+0.25*G_1[0]*alpha_G_1_source[0]; + out_G_1_vperp[1] = 0.25*G_1[14]*alpha_G_1_source[15]+0.25*alpha_G_1_source[14]*G_1[15]+0.25*G_1[10]*alpha_G_1_source[13]+0.25*alpha_G_1_source[10]*G_1[13]+0.25*G_1[9]*alpha_G_1_source[12]+0.25*alpha_G_1_source[9]*G_1[12]+0.25*G_1[7]*alpha_G_1_source[11]+0.25*alpha_G_1_source[7]*G_1[11]+0.7071067811865475*nu_vtsq_sum[6]*F_0[11]+0.25*G_1[4]*alpha_G_1_source[8]+0.25*alpha_G_1_source[4]*G_1[8]+0.7071067811865475*F_0[7]*nu_vtsq_sum[7]+0.25*G_1[3]*alpha_G_1_source[6]+0.25*alpha_G_1_source[3]*G_1[6]+0.7071067811865475*nu_vtsq_sum[3]*F_0[6]+0.7071067811865475*F_0[3]*nu_vtsq_sum[5]+0.25*G_1[2]*alpha_G_1_source[5]+0.25*alpha_G_1_source[2]*G_1[5]+0.7071067811865475*nu_vtsq_sum[2]*F_0[5]+0.7071067811865475*F_0[2]*nu_vtsq_sum[4]+0.7071067811865475*F_0[0]*nu_vtsq_sum[1]+0.25*G_1[0]*alpha_G_1_source[1]+0.25*alpha_G_1_source[0]*G_1[1]+0.7071067811865475*nu_vtsq_sum[0]*F_0[1]; + out_G_1_vperp[2] = 0.25*G_1[13]*alpha_G_1_source[15]+0.25*alpha_G_1_source[13]*G_1[15]+0.25*G_1[10]*alpha_G_1_source[14]+0.25*alpha_G_1_source[10]*G_1[14]+0.25*G_1[8]*alpha_G_1_source[12]+0.25*alpha_G_1_source[8]*G_1[12]+0.25*G_1[6]*alpha_G_1_source[11]+0.25*alpha_G_1_source[6]*G_1[11]+0.7071067811865475*nu_vtsq_sum[5]*F_0[11]+0.25*G_1[4]*alpha_G_1_source[9]+0.25*alpha_G_1_source[4]*G_1[9]+0.7071067811865475*F_0[6]*nu_vtsq_sum[7]+0.25*G_1[3]*alpha_G_1_source[7]+0.25*alpha_G_1_source[3]*G_1[7]+0.7071067811865475*nu_vtsq_sum[3]*F_0[7]+0.7071067811865475*F_0[3]*nu_vtsq_sum[6]+0.25*G_1[1]*alpha_G_1_source[5]+0.25*alpha_G_1_source[1]*G_1[5]+0.7071067811865475*nu_vtsq_sum[1]*F_0[5]+0.7071067811865475*F_0[1]*nu_vtsq_sum[4]+0.7071067811865475*F_0[0]*nu_vtsq_sum[2]+0.25*G_1[0]*alpha_G_1_source[2]+0.25*alpha_G_1_source[0]*G_1[2]+0.7071067811865475*nu_vtsq_sum[0]*F_0[2]; + out_G_1_vperp[3] = 0.25*G_1[12]*alpha_G_1_source[15]+0.25*alpha_G_1_source[12]*G_1[15]+0.25*G_1[9]*alpha_G_1_source[14]+0.25*alpha_G_1_source[9]*G_1[14]+0.25*G_1[8]*alpha_G_1_source[13]+0.25*alpha_G_1_source[8]*G_1[13]+0.25*G_1[5]*alpha_G_1_source[11]+0.25*alpha_G_1_source[5]*G_1[11]+0.7071067811865475*nu_vtsq_sum[4]*F_0[11]+0.25*G_1[4]*alpha_G_1_source[10]+0.25*alpha_G_1_source[4]*G_1[10]+0.7071067811865475*F_0[5]*nu_vtsq_sum[7]+0.25*G_1[2]*alpha_G_1_source[7]+0.25*alpha_G_1_source[2]*G_1[7]+0.7071067811865475*nu_vtsq_sum[2]*F_0[7]+0.7071067811865475*F_0[2]*nu_vtsq_sum[6]+0.25*G_1[1]*alpha_G_1_source[6]+0.25*alpha_G_1_source[1]*G_1[6]+0.7071067811865475*nu_vtsq_sum[1]*F_0[6]+0.7071067811865475*F_0[1]*nu_vtsq_sum[5]+0.7071067811865475*F_0[0]*nu_vtsq_sum[3]+0.25*G_1[0]*alpha_G_1_source[3]+0.25*alpha_G_1_source[0]*G_1[3]+0.7071067811865475*nu_vtsq_sum[0]*F_0[3]; + out_G_1_vperp[4] = 0.223606797749979*alpha_G_1_source[15]*G_1[23]+0.223606797749979*alpha_G_1_source[14]*G_1[22]+0.223606797749979*alpha_G_1_source[13]*G_1[21]+0.223606797749979*alpha_G_1_source[12]*G_1[20]+0.223606797749979*alpha_G_1_source[10]*G_1[19]+0.223606797749979*alpha_G_1_source[9]*G_1[18]+0.223606797749979*alpha_G_1_source[8]*G_1[17]+0.223606797749979*alpha_G_1_source[4]*G_1[16]+0.25*G_1[11]*alpha_G_1_source[15]+0.25*alpha_G_1_source[11]*G_1[15]+0.7071067811865475*nu_vtsq_sum[7]*F_0[15]+0.25*G_1[7]*alpha_G_1_source[14]+0.25*alpha_G_1_source[7]*G_1[14]+0.7071067811865475*nu_vtsq_sum[6]*F_0[14]+0.25*G_1[6]*alpha_G_1_source[13]+0.25*alpha_G_1_source[6]*G_1[13]+0.7071067811865475*nu_vtsq_sum[5]*F_0[13]+0.25*G_1[5]*alpha_G_1_source[12]+0.25*alpha_G_1_source[5]*G_1[12]+0.7071067811865475*nu_vtsq_sum[4]*F_0[12]+0.25*G_1[3]*alpha_G_1_source[10]+0.25*alpha_G_1_source[3]*G_1[10]+0.7071067811865475*nu_vtsq_sum[3]*F_0[10]+0.25*G_1[2]*alpha_G_1_source[9]+0.25*alpha_G_1_source[2]*G_1[9]+0.7071067811865475*nu_vtsq_sum[2]*F_0[9]+0.25*G_1[1]*alpha_G_1_source[8]+0.25*alpha_G_1_source[1]*G_1[8]+0.7071067811865475*nu_vtsq_sum[1]*F_0[8]+0.25*G_1[0]*alpha_G_1_source[4]+0.25*alpha_G_1_source[0]*G_1[4]+0.7071067811865475*nu_vtsq_sum[0]*F_0[4]; + out_G_1_vperp[5] = 0.25*G_1[10]*alpha_G_1_source[15]+0.25*alpha_G_1_source[10]*G_1[15]+0.25*G_1[13]*alpha_G_1_source[14]+0.25*alpha_G_1_source[13]*G_1[14]+0.25*G_1[4]*alpha_G_1_source[12]+0.25*alpha_G_1_source[4]*G_1[12]+0.25*G_1[3]*alpha_G_1_source[11]+0.25*alpha_G_1_source[3]*G_1[11]+0.7071067811865475*nu_vtsq_sum[3]*F_0[11]+0.25*G_1[8]*alpha_G_1_source[9]+0.25*alpha_G_1_source[8]*G_1[9]+0.7071067811865475*F_0[3]*nu_vtsq_sum[7]+0.25*G_1[6]*alpha_G_1_source[7]+0.25*alpha_G_1_source[6]*G_1[7]+0.7071067811865475*nu_vtsq_sum[5]*F_0[7]+0.7071067811865475*F_0[6]*nu_vtsq_sum[6]+0.25*G_1[0]*alpha_G_1_source[5]+0.25*alpha_G_1_source[0]*G_1[5]+0.7071067811865475*nu_vtsq_sum[0]*F_0[5]+0.7071067811865475*F_0[0]*nu_vtsq_sum[4]+0.7071067811865475*F_0[1]*nu_vtsq_sum[2]+0.25*G_1[1]*alpha_G_1_source[2]+0.25*alpha_G_1_source[1]*G_1[2]+0.7071067811865475*nu_vtsq_sum[1]*F_0[2]; + out_G_1_vperp[6] = 0.25*G_1[9]*alpha_G_1_source[15]+0.25*alpha_G_1_source[9]*G_1[15]+0.25*G_1[12]*alpha_G_1_source[14]+0.25*alpha_G_1_source[12]*G_1[14]+0.25*G_1[4]*alpha_G_1_source[13]+0.25*alpha_G_1_source[4]*G_1[13]+0.25*G_1[2]*alpha_G_1_source[11]+0.25*alpha_G_1_source[2]*G_1[11]+0.7071067811865475*nu_vtsq_sum[2]*F_0[11]+0.25*G_1[8]*alpha_G_1_source[10]+0.25*alpha_G_1_source[8]*G_1[10]+0.7071067811865475*F_0[2]*nu_vtsq_sum[7]+0.25*G_1[5]*alpha_G_1_source[7]+0.25*alpha_G_1_source[5]*G_1[7]+0.7071067811865475*nu_vtsq_sum[4]*F_0[7]+0.7071067811865475*F_0[5]*nu_vtsq_sum[6]+0.25*G_1[0]*alpha_G_1_source[6]+0.25*alpha_G_1_source[0]*G_1[6]+0.7071067811865475*nu_vtsq_sum[0]*F_0[6]+0.7071067811865475*F_0[0]*nu_vtsq_sum[5]+0.7071067811865475*F_0[1]*nu_vtsq_sum[3]+0.25*G_1[1]*alpha_G_1_source[3]+0.25*alpha_G_1_source[1]*G_1[3]+0.7071067811865475*nu_vtsq_sum[1]*F_0[3]; + out_G_1_vperp[7] = 0.25*G_1[8]*alpha_G_1_source[15]+0.25*alpha_G_1_source[8]*G_1[15]+0.25*G_1[4]*alpha_G_1_source[14]+0.25*alpha_G_1_source[4]*G_1[14]+0.25*G_1[12]*alpha_G_1_source[13]+0.25*alpha_G_1_source[12]*G_1[13]+0.25*G_1[1]*alpha_G_1_source[11]+0.25*alpha_G_1_source[1]*G_1[11]+0.7071067811865475*nu_vtsq_sum[1]*F_0[11]+0.25*G_1[9]*alpha_G_1_source[10]+0.25*alpha_G_1_source[9]*G_1[10]+0.7071067811865475*F_0[1]*nu_vtsq_sum[7]+0.25*G_1[0]*alpha_G_1_source[7]+0.25*alpha_G_1_source[0]*G_1[7]+0.7071067811865475*nu_vtsq_sum[0]*F_0[7]+0.7071067811865475*F_0[0]*nu_vtsq_sum[6]+0.25*G_1[5]*alpha_G_1_source[6]+0.25*alpha_G_1_source[5]*G_1[6]+0.7071067811865475*nu_vtsq_sum[4]*F_0[6]+0.7071067811865475*F_0[5]*nu_vtsq_sum[5]+0.7071067811865475*F_0[2]*nu_vtsq_sum[3]+0.25*G_1[2]*alpha_G_1_source[3]+0.25*alpha_G_1_source[2]*G_1[3]+0.7071067811865475*nu_vtsq_sum[2]*F_0[3]; + out_G_1_vperp[8] = 0.223606797749979*alpha_G_1_source[14]*G_1[23]+0.223606797749979*alpha_G_1_source[15]*G_1[22]+0.223606797749979*alpha_G_1_source[10]*G_1[21]+0.223606797749979*alpha_G_1_source[9]*G_1[20]+0.223606797749979*alpha_G_1_source[13]*G_1[19]+0.223606797749979*alpha_G_1_source[12]*G_1[18]+0.223606797749979*alpha_G_1_source[4]*G_1[17]+0.223606797749979*alpha_G_1_source[8]*G_1[16]+0.25*G_1[7]*alpha_G_1_source[15]+0.25*alpha_G_1_source[7]*G_1[15]+0.7071067811865475*nu_vtsq_sum[6]*F_0[15]+0.25*G_1[11]*alpha_G_1_source[14]+0.25*alpha_G_1_source[11]*G_1[14]+0.7071067811865475*nu_vtsq_sum[7]*F_0[14]+0.25*G_1[3]*alpha_G_1_source[13]+0.25*alpha_G_1_source[3]*G_1[13]+0.7071067811865475*nu_vtsq_sum[3]*F_0[13]+0.25*G_1[2]*alpha_G_1_source[12]+0.25*alpha_G_1_source[2]*G_1[12]+0.7071067811865475*nu_vtsq_sum[2]*F_0[12]+0.25*G_1[6]*alpha_G_1_source[10]+0.25*alpha_G_1_source[6]*G_1[10]+0.7071067811865475*nu_vtsq_sum[5]*F_0[10]+0.25*G_1[5]*alpha_G_1_source[9]+0.25*alpha_G_1_source[5]*G_1[9]+0.7071067811865475*nu_vtsq_sum[4]*F_0[9]+0.25*G_1[0]*alpha_G_1_source[8]+0.25*alpha_G_1_source[0]*G_1[8]+0.7071067811865475*nu_vtsq_sum[0]*F_0[8]+0.25*G_1[1]*alpha_G_1_source[4]+0.25*alpha_G_1_source[1]*G_1[4]+0.7071067811865475*nu_vtsq_sum[1]*F_0[4]; + out_G_1_vperp[9] = 0.223606797749979*alpha_G_1_source[13]*G_1[23]+0.223606797749979*alpha_G_1_source[10]*G_1[22]+0.223606797749979*alpha_G_1_source[15]*G_1[21]+0.223606797749979*alpha_G_1_source[8]*G_1[20]+0.223606797749979*alpha_G_1_source[14]*G_1[19]+0.223606797749979*alpha_G_1_source[4]*G_1[18]+0.223606797749979*alpha_G_1_source[12]*G_1[17]+0.223606797749979*alpha_G_1_source[9]*G_1[16]+0.25*G_1[6]*alpha_G_1_source[15]+0.25*alpha_G_1_source[6]*G_1[15]+0.7071067811865475*nu_vtsq_sum[5]*F_0[15]+0.25*G_1[3]*alpha_G_1_source[14]+0.25*alpha_G_1_source[3]*G_1[14]+0.7071067811865475*nu_vtsq_sum[3]*F_0[14]+0.25*G_1[11]*alpha_G_1_source[13]+0.25*alpha_G_1_source[11]*G_1[13]+0.7071067811865475*nu_vtsq_sum[7]*F_0[13]+0.25*G_1[1]*alpha_G_1_source[12]+0.25*alpha_G_1_source[1]*G_1[12]+0.7071067811865475*nu_vtsq_sum[1]*F_0[12]+0.25*G_1[7]*alpha_G_1_source[10]+0.25*alpha_G_1_source[7]*G_1[10]+0.7071067811865475*nu_vtsq_sum[6]*F_0[10]+0.25*G_1[0]*alpha_G_1_source[9]+0.25*alpha_G_1_source[0]*G_1[9]+0.7071067811865475*nu_vtsq_sum[0]*F_0[9]+0.25*G_1[5]*alpha_G_1_source[8]+0.25*alpha_G_1_source[5]*G_1[8]+0.7071067811865475*nu_vtsq_sum[4]*F_0[8]+0.25*G_1[2]*alpha_G_1_source[4]+0.25*alpha_G_1_source[2]*G_1[4]+0.7071067811865475*nu_vtsq_sum[2]*F_0[4]; + out_G_1_vperp[10] = 0.223606797749979*alpha_G_1_source[12]*G_1[23]+0.223606797749979*alpha_G_1_source[9]*G_1[22]+0.223606797749979*alpha_G_1_source[8]*G_1[21]+0.223606797749979*alpha_G_1_source[15]*G_1[20]+0.223606797749979*alpha_G_1_source[4]*G_1[19]+0.223606797749979*alpha_G_1_source[14]*G_1[18]+0.223606797749979*alpha_G_1_source[13]*G_1[17]+0.223606797749979*alpha_G_1_source[10]*G_1[16]+0.25*G_1[5]*alpha_G_1_source[15]+0.25*alpha_G_1_source[5]*G_1[15]+0.7071067811865475*nu_vtsq_sum[4]*F_0[15]+0.25*G_1[2]*alpha_G_1_source[14]+0.25*alpha_G_1_source[2]*G_1[14]+0.7071067811865475*nu_vtsq_sum[2]*F_0[14]+0.25*G_1[1]*alpha_G_1_source[13]+0.25*alpha_G_1_source[1]*G_1[13]+0.7071067811865475*nu_vtsq_sum[1]*F_0[13]+0.25*G_1[11]*alpha_G_1_source[12]+0.25*alpha_G_1_source[11]*G_1[12]+0.7071067811865475*nu_vtsq_sum[7]*F_0[12]+0.25*G_1[0]*alpha_G_1_source[10]+0.25*alpha_G_1_source[0]*G_1[10]+0.7071067811865475*nu_vtsq_sum[0]*F_0[10]+0.25*G_1[7]*alpha_G_1_source[9]+0.25*alpha_G_1_source[7]*G_1[9]+0.7071067811865475*nu_vtsq_sum[6]*F_0[9]+0.25*G_1[6]*alpha_G_1_source[8]+0.25*alpha_G_1_source[6]*G_1[8]+0.7071067811865475*nu_vtsq_sum[5]*F_0[8]+0.25*G_1[3]*alpha_G_1_source[4]+0.25*alpha_G_1_source[3]*G_1[4]+0.7071067811865475*nu_vtsq_sum[3]*F_0[4]; + out_G_1_vperp[11] = 0.25*G_1[4]*alpha_G_1_source[15]+0.25*alpha_G_1_source[4]*G_1[15]+0.25*G_1[8]*alpha_G_1_source[14]+0.25*alpha_G_1_source[8]*G_1[14]+0.25*G_1[9]*alpha_G_1_source[13]+0.25*alpha_G_1_source[9]*G_1[13]+0.25*G_1[10]*alpha_G_1_source[12]+0.25*alpha_G_1_source[10]*G_1[12]+0.25*G_1[0]*alpha_G_1_source[11]+0.25*alpha_G_1_source[0]*G_1[11]+0.7071067811865475*nu_vtsq_sum[0]*F_0[11]+0.7071067811865475*F_0[0]*nu_vtsq_sum[7]+0.25*G_1[1]*alpha_G_1_source[7]+0.25*alpha_G_1_source[1]*G_1[7]+0.7071067811865475*nu_vtsq_sum[1]*F_0[7]+0.7071067811865475*F_0[1]*nu_vtsq_sum[6]+0.25*G_1[2]*alpha_G_1_source[6]+0.25*alpha_G_1_source[2]*G_1[6]+0.7071067811865475*nu_vtsq_sum[2]*F_0[6]+0.7071067811865475*F_0[2]*nu_vtsq_sum[5]+0.25*G_1[3]*alpha_G_1_source[5]+0.25*alpha_G_1_source[3]*G_1[5]+0.7071067811865475*nu_vtsq_sum[3]*F_0[5]+0.7071067811865475*F_0[3]*nu_vtsq_sum[4]; + out_G_1_vperp[12] = 0.223606797749979*alpha_G_1_source[10]*G_1[23]+0.223606797749979*alpha_G_1_source[13]*G_1[22]+0.223606797749979*alpha_G_1_source[14]*G_1[21]+0.223606797749979*alpha_G_1_source[4]*G_1[20]+0.223606797749979*alpha_G_1_source[15]*G_1[19]+0.223606797749979*alpha_G_1_source[8]*G_1[18]+0.223606797749979*alpha_G_1_source[9]*G_1[17]+0.223606797749979*alpha_G_1_source[12]*G_1[16]+0.25*G_1[3]*alpha_G_1_source[15]+0.25*alpha_G_1_source[3]*G_1[15]+0.7071067811865475*nu_vtsq_sum[3]*F_0[15]+0.25*G_1[6]*alpha_G_1_source[14]+0.25*alpha_G_1_source[6]*G_1[14]+0.7071067811865475*nu_vtsq_sum[5]*F_0[14]+0.25*G_1[7]*alpha_G_1_source[13]+0.25*alpha_G_1_source[7]*G_1[13]+0.7071067811865475*nu_vtsq_sum[6]*F_0[13]+0.25*G_1[0]*alpha_G_1_source[12]+0.25*alpha_G_1_source[0]*G_1[12]+0.7071067811865475*nu_vtsq_sum[0]*F_0[12]+0.25*G_1[10]*alpha_G_1_source[11]+0.25*alpha_G_1_source[10]*G_1[11]+0.7071067811865475*nu_vtsq_sum[7]*F_0[10]+0.25*G_1[1]*alpha_G_1_source[9]+0.25*alpha_G_1_source[1]*G_1[9]+0.7071067811865475*nu_vtsq_sum[1]*F_0[9]+0.25*G_1[2]*alpha_G_1_source[8]+0.25*alpha_G_1_source[2]*G_1[8]+0.7071067811865475*nu_vtsq_sum[2]*F_0[8]+0.25*G_1[4]*alpha_G_1_source[5]+0.25*alpha_G_1_source[4]*G_1[5]+0.7071067811865475*F_0[4]*nu_vtsq_sum[4]; + out_G_1_vperp[13] = 0.223606797749979*alpha_G_1_source[9]*G_1[23]+0.223606797749979*alpha_G_1_source[12]*G_1[22]+0.223606797749979*alpha_G_1_source[4]*G_1[21]+0.223606797749979*alpha_G_1_source[14]*G_1[20]+0.223606797749979*alpha_G_1_source[8]*G_1[19]+0.223606797749979*alpha_G_1_source[15]*G_1[18]+0.223606797749979*alpha_G_1_source[10]*G_1[17]+0.223606797749979*alpha_G_1_source[13]*G_1[16]+0.25*G_1[2]*alpha_G_1_source[15]+0.25*alpha_G_1_source[2]*G_1[15]+0.7071067811865475*nu_vtsq_sum[2]*F_0[15]+0.25*G_1[5]*alpha_G_1_source[14]+0.25*alpha_G_1_source[5]*G_1[14]+0.7071067811865475*nu_vtsq_sum[4]*F_0[14]+0.25*G_1[0]*alpha_G_1_source[13]+0.25*alpha_G_1_source[0]*G_1[13]+0.7071067811865475*nu_vtsq_sum[0]*F_0[13]+0.25*G_1[7]*alpha_G_1_source[12]+0.25*alpha_G_1_source[7]*G_1[12]+0.7071067811865475*nu_vtsq_sum[6]*F_0[12]+0.25*G_1[9]*alpha_G_1_source[11]+0.25*alpha_G_1_source[9]*G_1[11]+0.25*G_1[1]*alpha_G_1_source[10]+0.25*alpha_G_1_source[1]*G_1[10]+0.7071067811865475*nu_vtsq_sum[1]*F_0[10]+0.7071067811865475*nu_vtsq_sum[7]*F_0[9]+0.25*G_1[3]*alpha_G_1_source[8]+0.25*alpha_G_1_source[3]*G_1[8]+0.7071067811865475*nu_vtsq_sum[3]*F_0[8]+0.25*G_1[4]*alpha_G_1_source[6]+0.25*alpha_G_1_source[4]*G_1[6]+0.7071067811865475*F_0[4]*nu_vtsq_sum[5]; + out_G_1_vperp[14] = 0.223606797749979*alpha_G_1_source[8]*G_1[23]+0.223606797749979*alpha_G_1_source[4]*G_1[22]+0.223606797749979*alpha_G_1_source[12]*G_1[21]+0.223606797749979*alpha_G_1_source[13]*G_1[20]+0.223606797749979*alpha_G_1_source[9]*G_1[19]+0.223606797749979*alpha_G_1_source[10]*G_1[18]+0.223606797749979*alpha_G_1_source[15]*G_1[17]+0.223606797749979*alpha_G_1_source[14]*G_1[16]+0.25*G_1[1]*alpha_G_1_source[15]+0.25*alpha_G_1_source[1]*G_1[15]+0.7071067811865475*nu_vtsq_sum[1]*F_0[15]+0.25*G_1[0]*alpha_G_1_source[14]+0.25*alpha_G_1_source[0]*G_1[14]+0.7071067811865475*nu_vtsq_sum[0]*F_0[14]+0.25*G_1[5]*alpha_G_1_source[13]+0.25*alpha_G_1_source[5]*G_1[13]+0.7071067811865475*nu_vtsq_sum[4]*F_0[13]+0.25*G_1[6]*alpha_G_1_source[12]+0.25*alpha_G_1_source[6]*G_1[12]+0.7071067811865475*nu_vtsq_sum[5]*F_0[12]+0.25*G_1[8]*alpha_G_1_source[11]+0.25*alpha_G_1_source[8]*G_1[11]+0.25*G_1[2]*alpha_G_1_source[10]+0.25*alpha_G_1_source[2]*G_1[10]+0.7071067811865475*nu_vtsq_sum[2]*F_0[10]+0.25*G_1[3]*alpha_G_1_source[9]+0.25*alpha_G_1_source[3]*G_1[9]+0.7071067811865475*nu_vtsq_sum[3]*F_0[9]+0.7071067811865475*nu_vtsq_sum[7]*F_0[8]+0.25*G_1[4]*alpha_G_1_source[7]+0.25*alpha_G_1_source[4]*G_1[7]+0.7071067811865475*F_0[4]*nu_vtsq_sum[6]; + out_G_1_vperp[15] = 0.223606797749979*alpha_G_1_source[4]*G_1[23]+0.223606797749979*alpha_G_1_source[8]*G_1[22]+0.223606797749979*alpha_G_1_source[9]*G_1[21]+0.223606797749979*alpha_G_1_source[10]*G_1[20]+0.223606797749979*alpha_G_1_source[12]*G_1[19]+0.223606797749979*alpha_G_1_source[13]*G_1[18]+0.223606797749979*alpha_G_1_source[14]*G_1[17]+0.223606797749979*alpha_G_1_source[15]*G_1[16]+0.25*G_1[0]*alpha_G_1_source[15]+0.25*alpha_G_1_source[0]*G_1[15]+0.7071067811865475*nu_vtsq_sum[0]*F_0[15]+0.25*G_1[1]*alpha_G_1_source[14]+0.25*alpha_G_1_source[1]*G_1[14]+0.7071067811865475*nu_vtsq_sum[1]*F_0[14]+0.25*G_1[2]*alpha_G_1_source[13]+0.25*alpha_G_1_source[2]*G_1[13]+0.7071067811865475*nu_vtsq_sum[2]*F_0[13]+0.25*G_1[3]*alpha_G_1_source[12]+0.25*alpha_G_1_source[3]*G_1[12]+0.7071067811865475*nu_vtsq_sum[3]*F_0[12]+0.25*G_1[4]*alpha_G_1_source[11]+0.25*alpha_G_1_source[4]*G_1[11]+0.25*G_1[5]*alpha_G_1_source[10]+0.25*alpha_G_1_source[5]*G_1[10]+0.7071067811865475*nu_vtsq_sum[4]*F_0[10]+0.25*G_1[6]*alpha_G_1_source[9]+0.25*alpha_G_1_source[6]*G_1[9]+0.7071067811865475*nu_vtsq_sum[5]*F_0[9]+0.25*G_1[7]*alpha_G_1_source[8]+0.25*alpha_G_1_source[7]*G_1[8]+0.7071067811865475*nu_vtsq_sum[6]*F_0[8]+0.7071067811865475*F_0[4]*nu_vtsq_sum[7]; + out_G_1_vperp[16] = 0.2500000000000001*alpha_G_1_source[11]*G_1[23]+0.7071067811865475*nu_vtsq_sum[7]*F_0[23]+0.25*alpha_G_1_source[7]*G_1[22]+0.7071067811865475*nu_vtsq_sum[6]*F_0[22]+0.25*alpha_G_1_source[6]*G_1[21]+0.7071067811865475*nu_vtsq_sum[5]*F_0[21]+0.25*alpha_G_1_source[5]*G_1[20]+0.7071067811865475*nu_vtsq_sum[4]*F_0[20]+0.2500000000000001*alpha_G_1_source[3]*G_1[19]+0.7071067811865475*nu_vtsq_sum[3]*F_0[19]+0.2500000000000001*alpha_G_1_source[2]*G_1[18]+0.7071067811865475*nu_vtsq_sum[2]*F_0[18]+0.2500000000000001*alpha_G_1_source[1]*G_1[17]+0.7071067811865475*nu_vtsq_sum[1]*F_0[17]+0.25*alpha_G_1_source[0]*G_1[16]+0.7071067811865475*nu_vtsq_sum[0]*F_0[16]+0.223606797749979*G_1[15]*alpha_G_1_source[15]+0.223606797749979*G_1[14]*alpha_G_1_source[14]+0.223606797749979*G_1[13]*alpha_G_1_source[13]+0.223606797749979*G_1[12]*alpha_G_1_source[12]+0.223606797749979*G_1[10]*alpha_G_1_source[10]+0.223606797749979*G_1[9]*alpha_G_1_source[9]+0.223606797749979*G_1[8]*alpha_G_1_source[8]+0.223606797749979*G_1[4]*alpha_G_1_source[4]; + out_G_1_vperp[17] = 0.25*alpha_G_1_source[7]*G_1[23]+0.7071067811865475*nu_vtsq_sum[6]*F_0[23]+0.2500000000000001*alpha_G_1_source[11]*G_1[22]+0.7071067811865475*nu_vtsq_sum[7]*F_0[22]+0.2500000000000001*alpha_G_1_source[3]*G_1[21]+0.7071067811865475*nu_vtsq_sum[3]*F_0[21]+0.2500000000000001*alpha_G_1_source[2]*G_1[20]+0.7071067811865475*nu_vtsq_sum[2]*F_0[20]+0.25*alpha_G_1_source[6]*G_1[19]+0.7071067811865475*nu_vtsq_sum[5]*F_0[19]+0.25*alpha_G_1_source[5]*G_1[18]+0.7071067811865475*nu_vtsq_sum[4]*F_0[18]+0.25*alpha_G_1_source[0]*G_1[17]+0.7071067811865475*nu_vtsq_sum[0]*F_0[17]+0.2500000000000001*alpha_G_1_source[1]*G_1[16]+0.7071067811865475*nu_vtsq_sum[1]*F_0[16]+0.223606797749979*G_1[14]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[14]*G_1[15]+0.223606797749979*G_1[10]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[10]*G_1[13]+0.223606797749979*G_1[9]*alpha_G_1_source[12]+0.223606797749979*alpha_G_1_source[9]*G_1[12]+0.223606797749979*G_1[4]*alpha_G_1_source[8]+0.223606797749979*alpha_G_1_source[4]*G_1[8]; + out_G_1_vperp[18] = 0.25*alpha_G_1_source[6]*G_1[23]+0.7071067811865475*nu_vtsq_sum[5]*F_0[23]+0.2500000000000001*alpha_G_1_source[3]*G_1[22]+0.7071067811865475*nu_vtsq_sum[3]*F_0[22]+0.2500000000000001*alpha_G_1_source[11]*G_1[21]+0.7071067811865475*nu_vtsq_sum[7]*F_0[21]+0.2500000000000001*alpha_G_1_source[1]*G_1[20]+0.7071067811865475*nu_vtsq_sum[1]*F_0[20]+0.25*alpha_G_1_source[7]*G_1[19]+0.7071067811865475*nu_vtsq_sum[6]*F_0[19]+0.25*alpha_G_1_source[0]*G_1[18]+0.7071067811865475*nu_vtsq_sum[0]*F_0[18]+0.25*alpha_G_1_source[5]*G_1[17]+0.7071067811865475*nu_vtsq_sum[4]*F_0[17]+0.2500000000000001*alpha_G_1_source[2]*G_1[16]+0.7071067811865475*nu_vtsq_sum[2]*F_0[16]+0.223606797749979*G_1[13]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[13]*G_1[15]+0.223606797749979*G_1[10]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[10]*G_1[14]+0.223606797749979*G_1[8]*alpha_G_1_source[12]+0.223606797749979*alpha_G_1_source[8]*G_1[12]+0.223606797749979*G_1[4]*alpha_G_1_source[9]+0.223606797749979*alpha_G_1_source[4]*G_1[9]; + out_G_1_vperp[19] = 0.25*alpha_G_1_source[5]*G_1[23]+0.7071067811865475*nu_vtsq_sum[4]*F_0[23]+0.2500000000000001*alpha_G_1_source[2]*G_1[22]+0.7071067811865475*nu_vtsq_sum[2]*F_0[22]+0.2500000000000001*alpha_G_1_source[1]*G_1[21]+0.7071067811865475*nu_vtsq_sum[1]*F_0[21]+0.2500000000000001*alpha_G_1_source[11]*G_1[20]+0.7071067811865475*nu_vtsq_sum[7]*F_0[20]+0.25*alpha_G_1_source[0]*G_1[19]+0.7071067811865475*nu_vtsq_sum[0]*F_0[19]+0.25*alpha_G_1_source[7]*G_1[18]+0.7071067811865475*nu_vtsq_sum[6]*F_0[18]+0.25*alpha_G_1_source[6]*G_1[17]+0.7071067811865475*nu_vtsq_sum[5]*F_0[17]+0.2500000000000001*alpha_G_1_source[3]*G_1[16]+0.7071067811865475*nu_vtsq_sum[3]*F_0[16]+0.223606797749979*G_1[12]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[12]*G_1[15]+0.223606797749979*G_1[9]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[9]*G_1[14]+0.223606797749979*G_1[8]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[8]*G_1[13]+0.223606797749979*G_1[4]*alpha_G_1_source[10]+0.223606797749979*alpha_G_1_source[4]*G_1[10]; + out_G_1_vperp[20] = 0.2500000000000001*alpha_G_1_source[3]*G_1[23]+0.7071067811865475*nu_vtsq_sum[3]*F_0[23]+0.25*alpha_G_1_source[6]*G_1[22]+0.7071067811865475*nu_vtsq_sum[5]*F_0[22]+0.25*alpha_G_1_source[7]*G_1[21]+0.7071067811865475*nu_vtsq_sum[6]*F_0[21]+0.25*alpha_G_1_source[0]*G_1[20]+0.7071067811865475*nu_vtsq_sum[0]*F_0[20]+0.2500000000000001*alpha_G_1_source[11]*G_1[19]+0.7071067811865475*nu_vtsq_sum[7]*F_0[19]+0.2500000000000001*alpha_G_1_source[1]*G_1[18]+0.7071067811865475*nu_vtsq_sum[1]*F_0[18]+0.2500000000000001*alpha_G_1_source[2]*G_1[17]+0.7071067811865475*nu_vtsq_sum[2]*F_0[17]+0.25*alpha_G_1_source[5]*G_1[16]+0.7071067811865475*nu_vtsq_sum[4]*F_0[16]+0.223606797749979*G_1[10]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[10]*G_1[15]+0.223606797749979*G_1[13]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[13]*G_1[14]+0.223606797749979*G_1[4]*alpha_G_1_source[12]+0.223606797749979*alpha_G_1_source[4]*G_1[12]+0.223606797749979*G_1[8]*alpha_G_1_source[9]+0.223606797749979*alpha_G_1_source[8]*G_1[9]; + out_G_1_vperp[21] = 0.2500000000000001*alpha_G_1_source[2]*G_1[23]+0.7071067811865475*nu_vtsq_sum[2]*F_0[23]+0.25*alpha_G_1_source[5]*G_1[22]+0.7071067811865475*nu_vtsq_sum[4]*F_0[22]+0.25*alpha_G_1_source[0]*G_1[21]+0.7071067811865475*nu_vtsq_sum[0]*F_0[21]+0.25*alpha_G_1_source[7]*G_1[20]+0.7071067811865475*nu_vtsq_sum[6]*F_0[20]+0.2500000000000001*alpha_G_1_source[1]*G_1[19]+0.7071067811865475*nu_vtsq_sum[1]*F_0[19]+0.2500000000000001*alpha_G_1_source[11]*G_1[18]+0.7071067811865475*nu_vtsq_sum[7]*F_0[18]+0.2500000000000001*alpha_G_1_source[3]*G_1[17]+0.7071067811865475*nu_vtsq_sum[3]*F_0[17]+0.25*alpha_G_1_source[6]*G_1[16]+0.7071067811865475*nu_vtsq_sum[5]*F_0[16]+0.223606797749979*G_1[9]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[9]*G_1[15]+0.223606797749979*G_1[12]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[12]*G_1[14]+0.223606797749979*G_1[4]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[4]*G_1[13]+0.223606797749979*G_1[8]*alpha_G_1_source[10]+0.223606797749979*alpha_G_1_source[8]*G_1[10]; + out_G_1_vperp[22] = 0.2500000000000001*alpha_G_1_source[1]*G_1[23]+0.7071067811865475*nu_vtsq_sum[1]*F_0[23]+0.25*alpha_G_1_source[0]*G_1[22]+0.7071067811865475*nu_vtsq_sum[0]*F_0[22]+0.25*alpha_G_1_source[5]*G_1[21]+0.7071067811865475*nu_vtsq_sum[4]*F_0[21]+0.25*alpha_G_1_source[6]*G_1[20]+0.7071067811865475*nu_vtsq_sum[5]*F_0[20]+0.2500000000000001*alpha_G_1_source[2]*G_1[19]+0.7071067811865475*nu_vtsq_sum[2]*F_0[19]+0.2500000000000001*alpha_G_1_source[3]*G_1[18]+0.7071067811865475*nu_vtsq_sum[3]*F_0[18]+0.2500000000000001*alpha_G_1_source[11]*G_1[17]+0.7071067811865475*nu_vtsq_sum[7]*F_0[17]+0.25*alpha_G_1_source[7]*G_1[16]+0.7071067811865475*nu_vtsq_sum[6]*F_0[16]+0.223606797749979*G_1[8]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[8]*G_1[15]+0.223606797749979*G_1[4]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[4]*G_1[14]+0.223606797749979*G_1[12]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[12]*G_1[13]+0.223606797749979*G_1[9]*alpha_G_1_source[10]+0.223606797749979*alpha_G_1_source[9]*G_1[10]; + out_G_1_vperp[23] = 0.25*alpha_G_1_source[0]*G_1[23]+0.7071067811865475*nu_vtsq_sum[0]*F_0[23]+0.2500000000000001*alpha_G_1_source[1]*G_1[22]+0.7071067811865475*nu_vtsq_sum[1]*F_0[22]+0.2500000000000001*alpha_G_1_source[2]*G_1[21]+0.7071067811865475*nu_vtsq_sum[2]*F_0[21]+0.2500000000000001*alpha_G_1_source[3]*G_1[20]+0.7071067811865475*nu_vtsq_sum[3]*F_0[20]+0.25*alpha_G_1_source[5]*G_1[19]+0.7071067811865475*nu_vtsq_sum[4]*F_0[19]+0.25*alpha_G_1_source[6]*G_1[18]+0.7071067811865475*nu_vtsq_sum[5]*F_0[18]+0.25*alpha_G_1_source[7]*G_1[17]+0.7071067811865475*nu_vtsq_sum[6]*F_0[17]+0.2500000000000001*alpha_G_1_source[11]*G_1[16]+0.7071067811865475*nu_vtsq_sum[7]*F_0[16]+0.223606797749979*G_1[4]*alpha_G_1_source[15]+0.223606797749979*alpha_G_1_source[4]*G_1[15]+0.223606797749979*G_1[8]*alpha_G_1_source[14]+0.223606797749979*alpha_G_1_source[8]*G_1[14]+0.223606797749979*G_1[9]*alpha_G_1_source[13]+0.223606797749979*alpha_G_1_source[9]*G_1[13]+0.223606797749979*G_1[10]*alpha_G_1_source[12]+0.223606797749979*alpha_G_1_source[10]*G_1[12]; tmp_F_0_m_F_1[0] = 0.3535533905932737*T_perp_over_m_inv[7]*G_1[11]+0.3535533905932737*T_perp_over_m_inv[6]*G_1[7]+0.3535533905932737*T_perp_over_m_inv[5]*G_1[6]+0.3535533905932737*T_perp_over_m_inv[4]*G_1[5]+0.3535533905932737*G_1[3]*T_perp_over_m_inv[3]+0.3535533905932737*G_1[2]*T_perp_over_m_inv[2]+0.3535533905932737*G_1[1]*T_perp_over_m_inv[1]+0.3535533905932737*G_1[0]*T_perp_over_m_inv[0]; tmp_F_0_m_F_1[1] = 0.3535533905932737*T_perp_over_m_inv[6]*G_1[11]+0.3535533905932737*G_1[7]*T_perp_over_m_inv[7]+0.3535533905932737*T_perp_over_m_inv[3]*G_1[6]+0.3535533905932737*G_1[3]*T_perp_over_m_inv[5]+0.3535533905932737*T_perp_over_m_inv[2]*G_1[5]+0.3535533905932737*G_1[2]*T_perp_over_m_inv[4]+0.3535533905932737*G_1[0]*T_perp_over_m_inv[1]+0.3535533905932737*T_perp_over_m_inv[0]*G_1[1]; diff --git a/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_ser_p1.c b/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_ser_p1.c index 98b57cf24..4c5f44abd 100644 --- a/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_ser_p1.c +++ b/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_ser_p1.c @@ -10,6 +10,7 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_1x1v_ser_p1(struct gkyl_mat *A, st const double *rho = &vlasov_pkpm_moms[0]; const double *p_parallel = &vlasov_pkpm_moms[2]; const double *p_perp = &vlasov_pkpm_moms[4]; + const double *M1 = &vlasov_pkpm_moms[6]; // If a corner value is below zero, use cell average. bool cellAvg = false; if (-0.5*(2.449489742783178*rho[1]-1.414213562373095*rho[0]) < 0) cellAvg = true; @@ -20,28 +21,60 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_1x1v_ser_p1(struct gkyl_mat *A, st if (0.5*(2.449489742783178*p_perp[1]+1.414213562373095*p_perp[0]) < 0) cellAvg = true; double m0r[2] = {0.0}; + double m1r[2] = {0.0}; + double cMr[2] = {0.0}; double cEr[2] = {0.0}; if (cellAvg) { m0r[0] = rho[0]; m0r[1] = 0.0; - cEr[0] = boundary_corrections[0]; - cEr[1] = 0.0; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); + m1r[0] = M1[0]; + m1r[1] = 0.0; + cMr[0] = boundary_corrections[0]; + cMr[1] = 0.0; + gkyl_mat_set(rhs,0,0,M1[0]); gkyl_mat_set(rhs,1,0,0.0); + cEr[0] = boundary_corrections[2]; + cEr[1] = 0.0; + gkyl_mat_set(rhs,2,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,3,0,0.0); } else { m0r[0] = rho[0]; m0r[1] = rho[1]; - cEr[0] = boundary_corrections[0]; - cEr[1] = boundary_corrections[1]; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); - gkyl_mat_set(rhs,1,0,2.0*p_perp[1]+p_parallel[1]); + m1r[0] = M1[0]; + m1r[1] = M1[1]; + cMr[0] = boundary_corrections[0]; + cMr[1] = boundary_corrections[1]; + gkyl_mat_set(rhs,0,0,M1[0]); + gkyl_mat_set(rhs,1,0,M1[1]); + cEr[0] = boundary_corrections[2]; + cEr[1] = boundary_corrections[3]; + gkyl_mat_set(rhs,2,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,3,0,2.0*p_perp[1]+p_parallel[1]); } + // ....... Block from weak multiply of u (correction to M1) and rho .......... // + gkyl_mat_set(A,0,0,0.7071067811865475*m0r[0]); + gkyl_mat_set(A,0,1,0.7071067811865475*m0r[1]); + gkyl_mat_set(A,1,0,0.7071067811865475*m0r[1]); + gkyl_mat_set(A,1,1,0.7071067811865475*m0r[0]); + + // ....... Block from correction to u (correction to M1).......... // + gkyl_mat_set(A,0,2,-0.7071067811865475*cMr[0]); + gkyl_mat_set(A,0,3,-0.7071067811865475*cMr[1]); + gkyl_mat_set(A,1,2,-0.7071067811865475*cMr[1]); + gkyl_mat_set(A,1,3,-0.7071067811865475*cMr[0]); + + // ....... Block from weak multiply of u (correction to M1) and M1 .......... // + gkyl_mat_set(A,2,0,0.7071067811865475*m1r[0]); + gkyl_mat_set(A,2,1,0.7071067811865475*m1r[1]); + gkyl_mat_set(A,3,0,0.7071067811865475*m1r[1]); + gkyl_mat_set(A,3,1,0.7071067811865475*m1r[0]); + // ....... Block from correction to vtSq .......... // - gkyl_mat_set(A,0,0,2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); - gkyl_mat_set(A,0,1,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); - gkyl_mat_set(A,1,0,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); - gkyl_mat_set(A,1,1,2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); + gkyl_mat_set(A,2,2,2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); + gkyl_mat_set(A,2,3,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); + gkyl_mat_set(A,3,2,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); + gkyl_mat_set(A,3,3,2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); } diff --git a/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_ser_p2.c b/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_ser_p2.c index 577353149..cf98e57ec 100644 --- a/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_ser_p2.c +++ b/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_ser_p2.c @@ -10,6 +10,7 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_1x1v_ser_p2(struct gkyl_mat *A, st const double *rho = &vlasov_pkpm_moms[0]; const double *p_parallel = &vlasov_pkpm_moms[3]; const double *p_perp = &vlasov_pkpm_moms[6]; + const double *M1 = &vlasov_pkpm_moms[9]; // If a corner value is below zero, use cell average. bool cellAvg = false; if (0.7071067811865475*(2.23606797749979*rho[2]-1.732050807568877*rho[1]+rho[0]) < 0) cellAvg = true; @@ -20,39 +21,92 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_1x1v_ser_p2(struct gkyl_mat *A, st if (0.7071067811865475*(2.23606797749979*p_perp[2]+1.732050807568877*p_perp[1]+p_perp[0]) < 0) cellAvg = true; double m0r[3] = {0.0}; + double m1r[3] = {0.0}; + double cMr[3] = {0.0}; double cEr[3] = {0.0}; if (cellAvg) { m0r[0] = rho[0]; m0r[1] = 0.0; m0r[2] = 0.0; - cEr[0] = boundary_corrections[0]; - cEr[1] = 0.0; - cEr[2] = 0.0; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); + m1r[0] = M1[0]; + m1r[1] = 0.0; + m1r[2] = 0.0; + cMr[0] = boundary_corrections[0]; + cMr[1] = 0.0; + cMr[2] = 0.0; + gkyl_mat_set(rhs,0,0,M1[0]); gkyl_mat_set(rhs,1,0,0.0); gkyl_mat_set(rhs,2,0,0.0); + cEr[0] = boundary_corrections[3]; + cEr[1] = 0.0; + cEr[2] = 0.0; + gkyl_mat_set(rhs,3,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,4,0,0.0); + gkyl_mat_set(rhs,5,0,0.0); } else { m0r[0] = rho[0]; m0r[1] = rho[1]; m0r[2] = rho[2]; - cEr[0] = boundary_corrections[0]; - cEr[1] = boundary_corrections[1]; - cEr[2] = boundary_corrections[2]; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); - gkyl_mat_set(rhs,1,0,2.0*p_perp[1]+p_parallel[1]); - gkyl_mat_set(rhs,2,0,2.0*p_perp[2]+p_parallel[2]); + m1r[0] = M1[0]; + m1r[1] = M1[1]; + m1r[2] = M1[2]; + cMr[0] = boundary_corrections[0]; + cMr[1] = boundary_corrections[1]; + cMr[2] = boundary_corrections[2]; + gkyl_mat_set(rhs,0,0,M1[0]); + gkyl_mat_set(rhs,1,0,M1[1]); + gkyl_mat_set(rhs,2,0,M1[2]); + cEr[0] = boundary_corrections[3]; + cEr[1] = boundary_corrections[4]; + cEr[2] = boundary_corrections[5]; + gkyl_mat_set(rhs,3,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,4,0,2.0*p_perp[1]+p_parallel[1]); + gkyl_mat_set(rhs,5,0,2.0*p_perp[2]+p_parallel[2]); } + // ....... Block from weak multiply of u (correction to M1) and rho .......... // + gkyl_mat_set(A,0,0,0.7071067811865475*m0r[0]); + gkyl_mat_set(A,0,1,0.7071067811865475*m0r[1]); + gkyl_mat_set(A,0,2,0.7071067811865475*m0r[2]); + gkyl_mat_set(A,1,0,0.7071067811865475*m0r[1]); + gkyl_mat_set(A,1,1,0.6324555320336759*m0r[2]+0.7071067811865475*m0r[0]); + gkyl_mat_set(A,1,2,0.6324555320336759*m0r[1]); + gkyl_mat_set(A,2,0,0.7071067811865475*m0r[2]); + gkyl_mat_set(A,2,1,0.6324555320336759*m0r[1]); + gkyl_mat_set(A,2,2,0.4517539514526256*m0r[2]+0.7071067811865475*m0r[0]); + + // ....... Block from correction to u (correction to M1).......... // + gkyl_mat_set(A,0,3,-0.7071067811865475*cMr[0]); + gkyl_mat_set(A,0,4,-0.7071067811865475*cMr[1]); + gkyl_mat_set(A,0,5,-0.7071067811865475*cMr[2]); + gkyl_mat_set(A,1,3,-0.7071067811865475*cMr[1]); + gkyl_mat_set(A,1,4,(-0.6324555320336759*cMr[2])-0.7071067811865475*cMr[0]); + gkyl_mat_set(A,1,5,-0.6324555320336759*cMr[1]); + gkyl_mat_set(A,2,3,-0.7071067811865475*cMr[2]); + gkyl_mat_set(A,2,4,-0.6324555320336759*cMr[1]); + gkyl_mat_set(A,2,5,(-0.4517539514526256*cMr[2])-0.7071067811865475*cMr[0]); + + // ....... Block from weak multiply of u (correction to M1) and M1 .......... // + gkyl_mat_set(A,3,0,0.7071067811865475*m1r[0]); + gkyl_mat_set(A,3,1,0.7071067811865475*m1r[1]); + gkyl_mat_set(A,3,2,0.7071067811865475*m1r[2]); + gkyl_mat_set(A,4,0,0.7071067811865475*m1r[1]); + gkyl_mat_set(A,4,1,0.6324555320336759*m1r[2]+0.7071067811865475*m1r[0]); + gkyl_mat_set(A,4,2,0.6324555320336759*m1r[1]); + gkyl_mat_set(A,5,0,0.7071067811865475*m1r[2]); + gkyl_mat_set(A,5,1,0.6324555320336759*m1r[1]); + gkyl_mat_set(A,5,2,0.4517539514526256*m1r[2]+0.7071067811865475*m1r[0]); + // ....... Block from correction to vtSq .......... // - gkyl_mat_set(A,0,0,2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); - gkyl_mat_set(A,0,1,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); - gkyl_mat_set(A,0,2,2.121320343559642*m0r[2]-0.7071067811865475*cEr[2]); - gkyl_mat_set(A,1,0,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); - gkyl_mat_set(A,1,1,1.897366596101028*m0r[2]-0.6324555320336759*cEr[2]+2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); - gkyl_mat_set(A,1,2,1.897366596101028*m0r[1]-0.6324555320336759*cEr[1]); - gkyl_mat_set(A,2,0,2.121320343559642*m0r[2]-0.7071067811865475*cEr[2]); - gkyl_mat_set(A,2,1,1.897366596101028*m0r[1]-0.6324555320336759*cEr[1]); - gkyl_mat_set(A,2,2,1.355261854357877*m0r[2]-0.4517539514526256*cEr[2]+2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); + gkyl_mat_set(A,3,3,2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); + gkyl_mat_set(A,3,4,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); + gkyl_mat_set(A,3,5,2.121320343559642*m0r[2]-0.7071067811865475*cEr[2]); + gkyl_mat_set(A,4,3,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); + gkyl_mat_set(A,4,4,1.897366596101028*m0r[2]-0.6324555320336759*cEr[2]+2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); + gkyl_mat_set(A,4,5,1.897366596101028*m0r[1]-0.6324555320336759*cEr[1]); + gkyl_mat_set(A,5,3,2.121320343559642*m0r[2]-0.7071067811865475*cEr[2]); + gkyl_mat_set(A,5,4,1.897366596101028*m0r[1]-0.6324555320336759*cEr[1]); + gkyl_mat_set(A,5,5,1.355261854357877*m0r[2]-0.4517539514526256*cEr[2]+2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); } diff --git a/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_tensor_p2.c b/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_tensor_p2.c index ea8f4f191..81ca2cb6b 100644 --- a/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_tensor_p2.c +++ b/kernels/pkpm/vlasov_pkpm_self_prim_moments_1x1v_tensor_p2.c @@ -10,6 +10,7 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_1x1v_tensor_p2(struct gkyl_mat *A, const double *rho = &vlasov_pkpm_moms[0]; const double *p_parallel = &vlasov_pkpm_moms[3]; const double *p_perp = &vlasov_pkpm_moms[6]; + const double *M1 = &vlasov_pkpm_moms[9]; // If a corner value is below zero, use cell average. bool cellAvg = false; if (0.7071067811865475*(2.23606797749979*rho[2]-1.732050807568877*rho[1]+rho[0]) < 0) cellAvg = true; @@ -20,39 +21,92 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_1x1v_tensor_p2(struct gkyl_mat *A, if (0.7071067811865475*(2.23606797749979*p_perp[2]+1.732050807568877*p_perp[1]+p_perp[0]) < 0) cellAvg = true; double m0r[3] = {0.0}; + double m1r[3] = {0.0}; + double cMr[3] = {0.0}; double cEr[3] = {0.0}; if (cellAvg) { m0r[0] = rho[0]; m0r[1] = 0.0; m0r[2] = 0.0; - cEr[0] = boundary_corrections[0]; - cEr[1] = 0.0; - cEr[2] = 0.0; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); + m1r[0] = M1[0]; + m1r[1] = 0.0; + m1r[2] = 0.0; + cMr[0] = boundary_corrections[0]; + cMr[1] = 0.0; + cMr[2] = 0.0; + gkyl_mat_set(rhs,0,0,M1[0]); gkyl_mat_set(rhs,1,0,0.0); gkyl_mat_set(rhs,2,0,0.0); + cEr[0] = boundary_corrections[3]; + cEr[1] = 0.0; + cEr[2] = 0.0; + gkyl_mat_set(rhs,3,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,4,0,0.0); + gkyl_mat_set(rhs,5,0,0.0); } else { m0r[0] = rho[0]; m0r[1] = rho[1]; m0r[2] = rho[2]; - cEr[0] = boundary_corrections[0]; - cEr[1] = boundary_corrections[1]; - cEr[2] = boundary_corrections[2]; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); - gkyl_mat_set(rhs,1,0,2.0*p_perp[1]+p_parallel[1]); - gkyl_mat_set(rhs,2,0,2.0*p_perp[2]+p_parallel[2]); + m1r[0] = M1[0]; + m1r[1] = M1[1]; + m1r[2] = M1[2]; + cMr[0] = boundary_corrections[0]; + cMr[1] = boundary_corrections[1]; + cMr[2] = boundary_corrections[2]; + gkyl_mat_set(rhs,0,0,M1[0]); + gkyl_mat_set(rhs,1,0,M1[1]); + gkyl_mat_set(rhs,2,0,M1[2]); + cEr[0] = boundary_corrections[3]; + cEr[1] = boundary_corrections[4]; + cEr[2] = boundary_corrections[5]; + gkyl_mat_set(rhs,3,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,4,0,2.0*p_perp[1]+p_parallel[1]); + gkyl_mat_set(rhs,5,0,2.0*p_perp[2]+p_parallel[2]); } + // ....... Block from weak multiply of u (correction to M1) and rho .......... // + gkyl_mat_set(A,0,0,0.7071067811865475*m0r[0]); + gkyl_mat_set(A,0,1,0.7071067811865475*m0r[1]); + gkyl_mat_set(A,0,2,0.7071067811865475*m0r[2]); + gkyl_mat_set(A,1,0,0.7071067811865475*m0r[1]); + gkyl_mat_set(A,1,1,0.6324555320336759*m0r[2]+0.7071067811865475*m0r[0]); + gkyl_mat_set(A,1,2,0.6324555320336759*m0r[1]); + gkyl_mat_set(A,2,0,0.7071067811865475*m0r[2]); + gkyl_mat_set(A,2,1,0.6324555320336759*m0r[1]); + gkyl_mat_set(A,2,2,0.4517539514526256*m0r[2]+0.7071067811865475*m0r[0]); + + // ....... Block from correction to u (correction to M1).......... // + gkyl_mat_set(A,0,3,-0.7071067811865475*cMr[0]); + gkyl_mat_set(A,0,4,-0.7071067811865475*cMr[1]); + gkyl_mat_set(A,0,5,-0.7071067811865475*cMr[2]); + gkyl_mat_set(A,1,3,-0.7071067811865475*cMr[1]); + gkyl_mat_set(A,1,4,(-0.6324555320336759*cMr[2])-0.7071067811865475*cMr[0]); + gkyl_mat_set(A,1,5,-0.6324555320336759*cMr[1]); + gkyl_mat_set(A,2,3,-0.7071067811865475*cMr[2]); + gkyl_mat_set(A,2,4,-0.6324555320336759*cMr[1]); + gkyl_mat_set(A,2,5,(-0.4517539514526256*cMr[2])-0.7071067811865475*cMr[0]); + + // ....... Block from weak multiply of u (correction to M1) and M1 .......... // + gkyl_mat_set(A,3,0,0.7071067811865475*m1r[0]); + gkyl_mat_set(A,3,1,0.7071067811865475*m1r[1]); + gkyl_mat_set(A,3,2,0.7071067811865475*m1r[2]); + gkyl_mat_set(A,4,0,0.7071067811865475*m1r[1]); + gkyl_mat_set(A,4,1,0.6324555320336759*m1r[2]+0.7071067811865475*m1r[0]); + gkyl_mat_set(A,4,2,0.6324555320336759*m1r[1]); + gkyl_mat_set(A,5,0,0.7071067811865475*m1r[2]); + gkyl_mat_set(A,5,1,0.6324555320336759*m1r[1]); + gkyl_mat_set(A,5,2,0.4517539514526256*m1r[2]+0.7071067811865475*m1r[0]); + // ....... Block from correction to vtSq .......... // - gkyl_mat_set(A,0,0,2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); - gkyl_mat_set(A,0,1,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); - gkyl_mat_set(A,0,2,2.121320343559642*m0r[2]-0.7071067811865475*cEr[2]); - gkyl_mat_set(A,1,0,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); - gkyl_mat_set(A,1,1,1.897366596101028*m0r[2]-0.6324555320336759*cEr[2]+2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); - gkyl_mat_set(A,1,2,1.897366596101028*m0r[1]-0.6324555320336759*cEr[1]); - gkyl_mat_set(A,2,0,2.121320343559642*m0r[2]-0.7071067811865475*cEr[2]); - gkyl_mat_set(A,2,1,1.897366596101028*m0r[1]-0.6324555320336759*cEr[1]); - gkyl_mat_set(A,2,2,1.355261854357877*m0r[2]-0.4517539514526256*cEr[2]+2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); + gkyl_mat_set(A,3,3,2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); + gkyl_mat_set(A,3,4,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); + gkyl_mat_set(A,3,5,2.121320343559642*m0r[2]-0.7071067811865475*cEr[2]); + gkyl_mat_set(A,4,3,2.121320343559642*m0r[1]-0.7071067811865475*cEr[1]); + gkyl_mat_set(A,4,4,1.897366596101028*m0r[2]-0.6324555320336759*cEr[2]+2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); + gkyl_mat_set(A,4,5,1.897366596101028*m0r[1]-0.6324555320336759*cEr[1]); + gkyl_mat_set(A,5,3,2.121320343559642*m0r[2]-0.7071067811865475*cEr[2]); + gkyl_mat_set(A,5,4,1.897366596101028*m0r[1]-0.6324555320336759*cEr[1]); + gkyl_mat_set(A,5,5,1.355261854357877*m0r[2]-0.4517539514526256*cEr[2]+2.121320343559642*m0r[0]-0.7071067811865475*cEr[0]); } diff --git a/kernels/pkpm/vlasov_pkpm_self_prim_moments_2x1v_ser_p1.c b/kernels/pkpm/vlasov_pkpm_self_prim_moments_2x1v_ser_p1.c index c51e32de1..6bc9ea874 100644 --- a/kernels/pkpm/vlasov_pkpm_self_prim_moments_2x1v_ser_p1.c +++ b/kernels/pkpm/vlasov_pkpm_self_prim_moments_2x1v_ser_p1.c @@ -10,6 +10,7 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_2x1v_ser_p1(struct gkyl_mat *A, st const double *rho = &vlasov_pkpm_moms[0]; const double *p_parallel = &vlasov_pkpm_moms[4]; const double *p_perp = &vlasov_pkpm_moms[8]; + const double *M1 = &vlasov_pkpm_moms[12]; // If a corner value is below zero, use cell average. bool cellAvg = false; if (0.5*(3.0*rho[3]-1.732050807568877*(rho[2]+rho[1])+rho[0]) < 0) cellAvg = true; @@ -26,52 +27,132 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_2x1v_ser_p1(struct gkyl_mat *A, st if (0.5*(3.0*p_perp[3]+1.732050807568877*(p_perp[2]+p_perp[1])+p_perp[0]) < 0) cellAvg = true; double m0r[4] = {0.0}; + double m1r[4] = {0.0}; + double cMr[4] = {0.0}; double cEr[4] = {0.0}; if (cellAvg) { m0r[0] = rho[0]; m0r[1] = 0.0; m0r[2] = 0.0; m0r[3] = 0.0; - cEr[0] = boundary_corrections[0]; - cEr[1] = 0.0; - cEr[2] = 0.0; - cEr[3] = 0.0; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); + m1r[0] = M1[0]; + m1r[1] = 0.0; + m1r[2] = 0.0; + m1r[3] = 0.0; + cMr[0] = boundary_corrections[0]; + cMr[1] = 0.0; + cMr[2] = 0.0; + cMr[3] = 0.0; + gkyl_mat_set(rhs,0,0,M1[0]); gkyl_mat_set(rhs,1,0,0.0); gkyl_mat_set(rhs,2,0,0.0); gkyl_mat_set(rhs,3,0,0.0); + cEr[0] = boundary_corrections[4]; + cEr[1] = 0.0; + cEr[2] = 0.0; + cEr[3] = 0.0; + gkyl_mat_set(rhs,4,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,5,0,0.0); + gkyl_mat_set(rhs,6,0,0.0); + gkyl_mat_set(rhs,7,0,0.0); } else { m0r[0] = rho[0]; m0r[1] = rho[1]; m0r[2] = rho[2]; m0r[3] = rho[3]; - cEr[0] = boundary_corrections[0]; - cEr[1] = boundary_corrections[1]; - cEr[2] = boundary_corrections[2]; - cEr[3] = boundary_corrections[3]; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); - gkyl_mat_set(rhs,1,0,2.0*p_perp[1]+p_parallel[1]); - gkyl_mat_set(rhs,2,0,2.0*p_perp[2]+p_parallel[2]); - gkyl_mat_set(rhs,3,0,2.0*p_perp[3]+p_parallel[3]); + m1r[0] = M1[0]; + m1r[1] = M1[1]; + m1r[2] = M1[2]; + m1r[3] = M1[3]; + cMr[0] = boundary_corrections[0]; + cMr[1] = boundary_corrections[1]; + cMr[2] = boundary_corrections[2]; + cMr[3] = boundary_corrections[3]; + gkyl_mat_set(rhs,0,0,M1[0]); + gkyl_mat_set(rhs,1,0,M1[1]); + gkyl_mat_set(rhs,2,0,M1[2]); + gkyl_mat_set(rhs,3,0,M1[3]); + cEr[0] = boundary_corrections[4]; + cEr[1] = boundary_corrections[5]; + cEr[2] = boundary_corrections[6]; + cEr[3] = boundary_corrections[7]; + gkyl_mat_set(rhs,4,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,5,0,2.0*p_perp[1]+p_parallel[1]); + gkyl_mat_set(rhs,6,0,2.0*p_perp[2]+p_parallel[2]); + gkyl_mat_set(rhs,7,0,2.0*p_perp[3]+p_parallel[3]); } + // ....... Block from weak multiply of u (correction to M1) and rho .......... // + gkyl_mat_set(A,0,0,0.5*m0r[0]); + gkyl_mat_set(A,0,1,0.5*m0r[1]); + gkyl_mat_set(A,0,2,0.5*m0r[2]); + gkyl_mat_set(A,0,3,0.5*m0r[3]); + gkyl_mat_set(A,1,0,0.5*m0r[1]); + gkyl_mat_set(A,1,1,0.5*m0r[0]); + gkyl_mat_set(A,1,2,0.5*m0r[3]); + gkyl_mat_set(A,1,3,0.5*m0r[2]); + gkyl_mat_set(A,2,0,0.5*m0r[2]); + gkyl_mat_set(A,2,1,0.5*m0r[3]); + gkyl_mat_set(A,2,2,0.5*m0r[0]); + gkyl_mat_set(A,2,3,0.5*m0r[1]); + gkyl_mat_set(A,3,0,0.5*m0r[3]); + gkyl_mat_set(A,3,1,0.5*m0r[2]); + gkyl_mat_set(A,3,2,0.5*m0r[1]); + gkyl_mat_set(A,3,3,0.5*m0r[0]); + + // ....... Block from correction to u (correction to M1).......... // + gkyl_mat_set(A,0,4,-0.5*cMr[0]); + gkyl_mat_set(A,0,5,-0.5*cMr[1]); + gkyl_mat_set(A,0,6,-0.5*cMr[2]); + gkyl_mat_set(A,0,7,-0.5*cMr[3]); + gkyl_mat_set(A,1,4,-0.5*cMr[1]); + gkyl_mat_set(A,1,5,-0.5*cMr[0]); + gkyl_mat_set(A,1,6,-0.5*cMr[3]); + gkyl_mat_set(A,1,7,-0.5*cMr[2]); + gkyl_mat_set(A,2,4,-0.5*cMr[2]); + gkyl_mat_set(A,2,5,-0.5*cMr[3]); + gkyl_mat_set(A,2,6,-0.5*cMr[0]); + gkyl_mat_set(A,2,7,-0.5*cMr[1]); + gkyl_mat_set(A,3,4,-0.5*cMr[3]); + gkyl_mat_set(A,3,5,-0.5*cMr[2]); + gkyl_mat_set(A,3,6,-0.5*cMr[1]); + gkyl_mat_set(A,3,7,-0.5*cMr[0]); + + // ....... Block from weak multiply of u (correction to M1) and M1 .......... // + gkyl_mat_set(A,4,0,0.5*m1r[0]); + gkyl_mat_set(A,4,1,0.5*m1r[1]); + gkyl_mat_set(A,4,2,0.5*m1r[2]); + gkyl_mat_set(A,4,3,0.5*m1r[3]); + gkyl_mat_set(A,5,0,0.5*m1r[1]); + gkyl_mat_set(A,5,1,0.5*m1r[0]); + gkyl_mat_set(A,5,2,0.5*m1r[3]); + gkyl_mat_set(A,5,3,0.5*m1r[2]); + gkyl_mat_set(A,6,0,0.5*m1r[2]); + gkyl_mat_set(A,6,1,0.5*m1r[3]); + gkyl_mat_set(A,6,2,0.5*m1r[0]); + gkyl_mat_set(A,6,3,0.5*m1r[1]); + gkyl_mat_set(A,7,0,0.5*m1r[3]); + gkyl_mat_set(A,7,1,0.5*m1r[2]); + gkyl_mat_set(A,7,2,0.5*m1r[1]); + gkyl_mat_set(A,7,3,0.5*m1r[0]); + // ....... Block from correction to vtSq .......... // - gkyl_mat_set(A,0,0,1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,0,1,1.5*m0r[1]-0.5*cEr[1]); - gkyl_mat_set(A,0,2,1.5*m0r[2]-0.5*cEr[2]); - gkyl_mat_set(A,0,3,1.5*m0r[3]-0.5*cEr[3]); - gkyl_mat_set(A,1,0,1.5*m0r[1]-0.5*cEr[1]); - gkyl_mat_set(A,1,1,1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,1,2,1.5*m0r[3]-0.5*cEr[3]); - gkyl_mat_set(A,1,3,1.5*m0r[2]-0.5*cEr[2]); - gkyl_mat_set(A,2,0,1.5*m0r[2]-0.5*cEr[2]); - gkyl_mat_set(A,2,1,1.5*m0r[3]-0.5*cEr[3]); - gkyl_mat_set(A,2,2,1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,2,3,1.5*m0r[1]-0.5*cEr[1]); - gkyl_mat_set(A,3,0,1.5*m0r[3]-0.5*cEr[3]); - gkyl_mat_set(A,3,1,1.5*m0r[2]-0.5*cEr[2]); - gkyl_mat_set(A,3,2,1.5*m0r[1]-0.5*cEr[1]); - gkyl_mat_set(A,3,3,1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,4,4,1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,4,5,1.5*m0r[1]-0.5*cEr[1]); + gkyl_mat_set(A,4,6,1.5*m0r[2]-0.5*cEr[2]); + gkyl_mat_set(A,4,7,1.5*m0r[3]-0.5*cEr[3]); + gkyl_mat_set(A,5,4,1.5*m0r[1]-0.5*cEr[1]); + gkyl_mat_set(A,5,5,1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,5,6,1.5*m0r[3]-0.5*cEr[3]); + gkyl_mat_set(A,5,7,1.5*m0r[2]-0.5*cEr[2]); + gkyl_mat_set(A,6,4,1.5*m0r[2]-0.5*cEr[2]); + gkyl_mat_set(A,6,5,1.5*m0r[3]-0.5*cEr[3]); + gkyl_mat_set(A,6,6,1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,6,7,1.5*m0r[1]-0.5*cEr[1]); + gkyl_mat_set(A,7,4,1.5*m0r[3]-0.5*cEr[3]); + gkyl_mat_set(A,7,5,1.5*m0r[2]-0.5*cEr[2]); + gkyl_mat_set(A,7,6,1.5*m0r[1]-0.5*cEr[1]); + gkyl_mat_set(A,7,7,1.5*m0r[0]-0.5*cEr[0]); } diff --git a/kernels/pkpm/vlasov_pkpm_self_prim_moments_2x1v_tensor_p2.c b/kernels/pkpm/vlasov_pkpm_self_prim_moments_2x1v_tensor_p2.c index e4ac94a0f..f0016c100 100644 --- a/kernels/pkpm/vlasov_pkpm_self_prim_moments_2x1v_tensor_p2.c +++ b/kernels/pkpm/vlasov_pkpm_self_prim_moments_2x1v_tensor_p2.c @@ -10,6 +10,7 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_2x1v_tensor_p2(struct gkyl_mat *A, const double *rho = &vlasov_pkpm_moms[0]; const double *p_parallel = &vlasov_pkpm_moms[9]; const double *p_perp = &vlasov_pkpm_moms[18]; + const double *M1 = &vlasov_pkpm_moms[27]; // If a corner value is below zero, use cell average. bool cellAvg = false; if (0.5*(5.0*rho[8]-3.872983346207417*(rho[7]+rho[6])+2.23606797749979*(rho[5]+rho[4])+3.0*rho[3]-1.732050807568877*(rho[2]+rho[1])+rho[0]) < 0) cellAvg = true; @@ -26,6 +27,8 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_2x1v_tensor_p2(struct gkyl_mat *A, if (0.5*(5.0*p_perp[8]+3.872983346207417*(p_perp[7]+p_perp[6])+2.23606797749979*(p_perp[5]+p_perp[4])+3.0*p_perp[3]+1.732050807568877*(p_perp[2]+p_perp[1])+p_perp[0]) < 0) cellAvg = true; double m0r[9] = {0.0}; + double m1r[9] = {0.0}; + double cMr[9] = {0.0}; double cEr[9] = {0.0}; if (cellAvg) { m0r[0] = rho[0]; @@ -37,16 +40,25 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_2x1v_tensor_p2(struct gkyl_mat *A, m0r[6] = 0.0; m0r[7] = 0.0; m0r[8] = 0.0; - cEr[0] = boundary_corrections[0]; - cEr[1] = 0.0; - cEr[2] = 0.0; - cEr[3] = 0.0; - cEr[4] = 0.0; - cEr[5] = 0.0; - cEr[6] = 0.0; - cEr[7] = 0.0; - cEr[8] = 0.0; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); + m1r[0] = M1[0]; + m1r[1] = 0.0; + m1r[2] = 0.0; + m1r[3] = 0.0; + m1r[4] = 0.0; + m1r[5] = 0.0; + m1r[6] = 0.0; + m1r[7] = 0.0; + m1r[8] = 0.0; + cMr[0] = boundary_corrections[0]; + cMr[1] = 0.0; + cMr[2] = 0.0; + cMr[3] = 0.0; + cMr[4] = 0.0; + cMr[5] = 0.0; + cMr[6] = 0.0; + cMr[7] = 0.0; + cMr[8] = 0.0; + gkyl_mat_set(rhs,0,0,M1[0]); gkyl_mat_set(rhs,1,0,0.0); gkyl_mat_set(rhs,2,0,0.0); gkyl_mat_set(rhs,3,0,0.0); @@ -55,6 +67,24 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_2x1v_tensor_p2(struct gkyl_mat *A, gkyl_mat_set(rhs,6,0,0.0); gkyl_mat_set(rhs,7,0,0.0); gkyl_mat_set(rhs,8,0,0.0); + cEr[0] = boundary_corrections[9]; + cEr[1] = 0.0; + cEr[2] = 0.0; + cEr[3] = 0.0; + cEr[4] = 0.0; + cEr[5] = 0.0; + cEr[6] = 0.0; + cEr[7] = 0.0; + cEr[8] = 0.0; + gkyl_mat_set(rhs,9,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,10,0,0.0); + gkyl_mat_set(rhs,11,0,0.0); + gkyl_mat_set(rhs,12,0,0.0); + gkyl_mat_set(rhs,13,0,0.0); + gkyl_mat_set(rhs,14,0,0.0); + gkyl_mat_set(rhs,15,0,0.0); + gkyl_mat_set(rhs,16,0,0.0); + gkyl_mat_set(rhs,17,0,0.0); } else { m0r[0] = rho[0]; m0r[1] = rho[1]; @@ -65,108 +95,384 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_2x1v_tensor_p2(struct gkyl_mat *A, m0r[6] = rho[6]; m0r[7] = rho[7]; m0r[8] = rho[8]; - cEr[0] = boundary_corrections[0]; - cEr[1] = boundary_corrections[1]; - cEr[2] = boundary_corrections[2]; - cEr[3] = boundary_corrections[3]; - cEr[4] = boundary_corrections[4]; - cEr[5] = boundary_corrections[5]; - cEr[6] = boundary_corrections[6]; - cEr[7] = boundary_corrections[7]; - cEr[8] = boundary_corrections[8]; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); - gkyl_mat_set(rhs,1,0,2.0*p_perp[1]+p_parallel[1]); - gkyl_mat_set(rhs,2,0,2.0*p_perp[2]+p_parallel[2]); - gkyl_mat_set(rhs,3,0,2.0*p_perp[3]+p_parallel[3]); - gkyl_mat_set(rhs,4,0,2.0*p_perp[4]+p_parallel[4]); - gkyl_mat_set(rhs,5,0,2.0*p_perp[5]+p_parallel[5]); - gkyl_mat_set(rhs,6,0,2.0*p_perp[6]+p_parallel[6]); - gkyl_mat_set(rhs,7,0,2.0*p_perp[7]+p_parallel[7]); - gkyl_mat_set(rhs,8,0,2.0*p_perp[8]+p_parallel[8]); + m1r[0] = M1[0]; + m1r[1] = M1[1]; + m1r[2] = M1[2]; + m1r[3] = M1[3]; + m1r[4] = M1[4]; + m1r[5] = M1[5]; + m1r[6] = M1[6]; + m1r[7] = M1[7]; + m1r[8] = M1[8]; + cMr[0] = boundary_corrections[0]; + cMr[1] = boundary_corrections[1]; + cMr[2] = boundary_corrections[2]; + cMr[3] = boundary_corrections[3]; + cMr[4] = boundary_corrections[4]; + cMr[5] = boundary_corrections[5]; + cMr[6] = boundary_corrections[6]; + cMr[7] = boundary_corrections[7]; + cMr[8] = boundary_corrections[8]; + gkyl_mat_set(rhs,0,0,M1[0]); + gkyl_mat_set(rhs,1,0,M1[1]); + gkyl_mat_set(rhs,2,0,M1[2]); + gkyl_mat_set(rhs,3,0,M1[3]); + gkyl_mat_set(rhs,4,0,M1[4]); + gkyl_mat_set(rhs,5,0,M1[5]); + gkyl_mat_set(rhs,6,0,M1[6]); + gkyl_mat_set(rhs,7,0,M1[7]); + gkyl_mat_set(rhs,8,0,M1[8]); + cEr[0] = boundary_corrections[9]; + cEr[1] = boundary_corrections[10]; + cEr[2] = boundary_corrections[11]; + cEr[3] = boundary_corrections[12]; + cEr[4] = boundary_corrections[13]; + cEr[5] = boundary_corrections[14]; + cEr[6] = boundary_corrections[15]; + cEr[7] = boundary_corrections[16]; + cEr[8] = boundary_corrections[17]; + gkyl_mat_set(rhs,9,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,10,0,2.0*p_perp[1]+p_parallel[1]); + gkyl_mat_set(rhs,11,0,2.0*p_perp[2]+p_parallel[2]); + gkyl_mat_set(rhs,12,0,2.0*p_perp[3]+p_parallel[3]); + gkyl_mat_set(rhs,13,0,2.0*p_perp[4]+p_parallel[4]); + gkyl_mat_set(rhs,14,0,2.0*p_perp[5]+p_parallel[5]); + gkyl_mat_set(rhs,15,0,2.0*p_perp[6]+p_parallel[6]); + gkyl_mat_set(rhs,16,0,2.0*p_perp[7]+p_parallel[7]); + gkyl_mat_set(rhs,17,0,2.0*p_perp[8]+p_parallel[8]); } + // ....... Block from weak multiply of u (correction to M1) and rho .......... // + gkyl_mat_set(A,0,0,0.5*m0r[0]); + gkyl_mat_set(A,0,1,0.5*m0r[1]); + gkyl_mat_set(A,0,2,0.5*m0r[2]); + gkyl_mat_set(A,0,3,0.5*m0r[3]); + gkyl_mat_set(A,0,4,0.5*m0r[4]); + gkyl_mat_set(A,0,5,0.5*m0r[5]); + gkyl_mat_set(A,0,6,0.5*m0r[6]); + gkyl_mat_set(A,0,7,0.5*m0r[7]); + gkyl_mat_set(A,0,8,0.5*m0r[8]); + gkyl_mat_set(A,1,0,0.5*m0r[1]); + gkyl_mat_set(A,1,1,0.4472135954999579*m0r[4]+0.5*m0r[0]); + gkyl_mat_set(A,1,2,0.5*m0r[3]); + gkyl_mat_set(A,1,3,0.447213595499958*m0r[6]+0.5*m0r[2]); + gkyl_mat_set(A,1,4,0.4472135954999579*m0r[1]); + gkyl_mat_set(A,1,5,0.5000000000000001*m0r[7]); + gkyl_mat_set(A,1,6,0.447213595499958*m0r[3]); + gkyl_mat_set(A,1,7,0.447213595499958*m0r[8]+0.5000000000000001*m0r[5]); + gkyl_mat_set(A,1,8,0.447213595499958*m0r[7]); + gkyl_mat_set(A,2,0,0.5*m0r[2]); + gkyl_mat_set(A,2,1,0.5*m0r[3]); + gkyl_mat_set(A,2,2,0.4472135954999579*m0r[5]+0.5*m0r[0]); + gkyl_mat_set(A,2,3,0.447213595499958*m0r[7]+0.5*m0r[1]); + gkyl_mat_set(A,2,4,0.5000000000000001*m0r[6]); + gkyl_mat_set(A,2,5,0.4472135954999579*m0r[2]); + gkyl_mat_set(A,2,6,0.447213595499958*m0r[8]+0.5000000000000001*m0r[4]); + gkyl_mat_set(A,2,7,0.447213595499958*m0r[3]); + gkyl_mat_set(A,2,8,0.447213595499958*m0r[6]); + gkyl_mat_set(A,3,0,0.5*m0r[3]); + gkyl_mat_set(A,3,1,0.447213595499958*m0r[6]+0.5*m0r[2]); + gkyl_mat_set(A,3,2,0.447213595499958*m0r[7]+0.5*m0r[1]); + gkyl_mat_set(A,3,3,0.4*m0r[8]+0.4472135954999579*m0r[5]+0.4472135954999579*m0r[4]+0.5*m0r[0]); + gkyl_mat_set(A,3,4,0.4472135954999579*m0r[3]); + gkyl_mat_set(A,3,5,0.4472135954999579*m0r[3]); + gkyl_mat_set(A,3,6,0.4*m0r[7]+0.447213595499958*m0r[1]); + gkyl_mat_set(A,3,7,0.4*m0r[6]+0.447213595499958*m0r[2]); + gkyl_mat_set(A,3,8,0.4*m0r[3]); + gkyl_mat_set(A,4,0,0.5*m0r[4]); + gkyl_mat_set(A,4,1,0.4472135954999579*m0r[1]); + gkyl_mat_set(A,4,2,0.5000000000000001*m0r[6]); + gkyl_mat_set(A,4,3,0.4472135954999579*m0r[3]); + gkyl_mat_set(A,4,4,0.31943828249997*m0r[4]+0.5*m0r[0]); + gkyl_mat_set(A,4,5,0.5*m0r[8]); + gkyl_mat_set(A,4,6,0.31943828249997*m0r[6]+0.5000000000000001*m0r[2]); + gkyl_mat_set(A,4,7,0.4472135954999579*m0r[7]); + gkyl_mat_set(A,4,8,0.31943828249997*m0r[8]+0.5*m0r[5]); + gkyl_mat_set(A,5,0,0.5*m0r[5]); + gkyl_mat_set(A,5,1,0.5000000000000001*m0r[7]); + gkyl_mat_set(A,5,2,0.4472135954999579*m0r[2]); + gkyl_mat_set(A,5,3,0.4472135954999579*m0r[3]); + gkyl_mat_set(A,5,4,0.5*m0r[8]); + gkyl_mat_set(A,5,5,0.31943828249997*m0r[5]+0.5*m0r[0]); + gkyl_mat_set(A,5,6,0.4472135954999579*m0r[6]); + gkyl_mat_set(A,5,7,0.31943828249997*m0r[7]+0.5000000000000001*m0r[1]); + gkyl_mat_set(A,5,8,0.31943828249997*m0r[8]+0.5*m0r[4]); + gkyl_mat_set(A,6,0,0.5*m0r[6]); + gkyl_mat_set(A,6,1,0.447213595499958*m0r[3]); + gkyl_mat_set(A,6,2,0.447213595499958*m0r[8]+0.5000000000000001*m0r[4]); + gkyl_mat_set(A,6,3,0.4*m0r[7]+0.447213595499958*m0r[1]); + gkyl_mat_set(A,6,4,0.31943828249997*m0r[6]+0.5000000000000001*m0r[2]); + gkyl_mat_set(A,6,5,0.4472135954999579*m0r[6]); + gkyl_mat_set(A,6,6,0.2857142857142857*m0r[8]+0.4472135954999579*m0r[5]+0.31943828249997*m0r[4]+0.5*m0r[0]); + gkyl_mat_set(A,6,7,0.4*m0r[3]); + gkyl_mat_set(A,6,8,0.2857142857142857*m0r[6]+0.447213595499958*m0r[2]); + gkyl_mat_set(A,7,0,0.5*m0r[7]); + gkyl_mat_set(A,7,1,0.447213595499958*m0r[8]+0.5000000000000001*m0r[5]); + gkyl_mat_set(A,7,2,0.447213595499958*m0r[3]); + gkyl_mat_set(A,7,3,0.4*m0r[6]+0.447213595499958*m0r[2]); + gkyl_mat_set(A,7,4,0.4472135954999579*m0r[7]); + gkyl_mat_set(A,7,5,0.31943828249997*m0r[7]+0.5000000000000001*m0r[1]); + gkyl_mat_set(A,7,6,0.4*m0r[3]); + gkyl_mat_set(A,7,7,0.2857142857142857*m0r[8]+0.31943828249997*m0r[5]+0.4472135954999579*m0r[4]+0.5*m0r[0]); + gkyl_mat_set(A,7,8,0.2857142857142857*m0r[7]+0.447213595499958*m0r[1]); + gkyl_mat_set(A,8,0,0.5*m0r[8]); + gkyl_mat_set(A,8,1,0.447213595499958*m0r[7]); + gkyl_mat_set(A,8,2,0.447213595499958*m0r[6]); + gkyl_mat_set(A,8,3,0.4*m0r[3]); + gkyl_mat_set(A,8,4,0.31943828249997*m0r[8]+0.5*m0r[5]); + gkyl_mat_set(A,8,5,0.31943828249997*m0r[8]+0.5*m0r[4]); + gkyl_mat_set(A,8,6,0.2857142857142857*m0r[6]+0.447213595499958*m0r[2]); + gkyl_mat_set(A,8,7,0.2857142857142857*m0r[7]+0.447213595499958*m0r[1]); + gkyl_mat_set(A,8,8,0.2040816326530612*m0r[8]+0.31943828249997*m0r[5]+0.31943828249997*m0r[4]+0.5*m0r[0]); + + // ....... Block from correction to u (correction to M1).......... // + gkyl_mat_set(A,0,9,-0.5*cMr[0]); + gkyl_mat_set(A,0,10,-0.5*cMr[1]); + gkyl_mat_set(A,0,11,-0.5*cMr[2]); + gkyl_mat_set(A,0,12,-0.5*cMr[3]); + gkyl_mat_set(A,0,13,-0.5*cMr[4]); + gkyl_mat_set(A,0,14,-0.5*cMr[5]); + gkyl_mat_set(A,0,15,-0.5*cMr[6]); + gkyl_mat_set(A,0,16,-0.5*cMr[7]); + gkyl_mat_set(A,0,17,-0.5*cMr[8]); + gkyl_mat_set(A,1,9,-0.5*cMr[1]); + gkyl_mat_set(A,1,10,(-0.4472135954999579*cMr[4])-0.5*cMr[0]); + gkyl_mat_set(A,1,11,-0.5*cMr[3]); + gkyl_mat_set(A,1,12,(-0.447213595499958*cMr[6])-0.5*cMr[2]); + gkyl_mat_set(A,1,13,-0.4472135954999579*cMr[1]); + gkyl_mat_set(A,1,14,-0.5000000000000001*cMr[7]); + gkyl_mat_set(A,1,15,-0.447213595499958*cMr[3]); + gkyl_mat_set(A,1,16,(-0.447213595499958*cMr[8])-0.5000000000000001*cMr[5]); + gkyl_mat_set(A,1,17,-0.447213595499958*cMr[7]); + gkyl_mat_set(A,2,9,-0.5*cMr[2]); + gkyl_mat_set(A,2,10,-0.5*cMr[3]); + gkyl_mat_set(A,2,11,(-0.4472135954999579*cMr[5])-0.5*cMr[0]); + gkyl_mat_set(A,2,12,(-0.447213595499958*cMr[7])-0.5*cMr[1]); + gkyl_mat_set(A,2,13,-0.5000000000000001*cMr[6]); + gkyl_mat_set(A,2,14,-0.4472135954999579*cMr[2]); + gkyl_mat_set(A,2,15,(-0.447213595499958*cMr[8])-0.5000000000000001*cMr[4]); + gkyl_mat_set(A,2,16,-0.447213595499958*cMr[3]); + gkyl_mat_set(A,2,17,-0.447213595499958*cMr[6]); + gkyl_mat_set(A,3,9,-0.5*cMr[3]); + gkyl_mat_set(A,3,10,(-0.447213595499958*cMr[6])-0.5*cMr[2]); + gkyl_mat_set(A,3,11,(-0.447213595499958*cMr[7])-0.5*cMr[1]); + gkyl_mat_set(A,3,12,(-0.4*cMr[8])-0.4472135954999579*cMr[5]-0.4472135954999579*cMr[4]-0.5*cMr[0]); + gkyl_mat_set(A,3,13,-0.4472135954999579*cMr[3]); + gkyl_mat_set(A,3,14,-0.4472135954999579*cMr[3]); + gkyl_mat_set(A,3,15,(-0.4*cMr[7])-0.447213595499958*cMr[1]); + gkyl_mat_set(A,3,16,(-0.4*cMr[6])-0.447213595499958*cMr[2]); + gkyl_mat_set(A,3,17,-0.4*cMr[3]); + gkyl_mat_set(A,4,9,-0.5*cMr[4]); + gkyl_mat_set(A,4,10,-0.4472135954999579*cMr[1]); + gkyl_mat_set(A,4,11,-0.5000000000000001*cMr[6]); + gkyl_mat_set(A,4,12,-0.4472135954999579*cMr[3]); + gkyl_mat_set(A,4,13,(-0.31943828249997*cMr[4])-0.5*cMr[0]); + gkyl_mat_set(A,4,14,-0.5*cMr[8]); + gkyl_mat_set(A,4,15,(-0.31943828249997*cMr[6])-0.5000000000000001*cMr[2]); + gkyl_mat_set(A,4,16,-0.4472135954999579*cMr[7]); + gkyl_mat_set(A,4,17,(-0.31943828249997*cMr[8])-0.5*cMr[5]); + gkyl_mat_set(A,5,9,-0.5*cMr[5]); + gkyl_mat_set(A,5,10,-0.5000000000000001*cMr[7]); + gkyl_mat_set(A,5,11,-0.4472135954999579*cMr[2]); + gkyl_mat_set(A,5,12,-0.4472135954999579*cMr[3]); + gkyl_mat_set(A,5,13,-0.5*cMr[8]); + gkyl_mat_set(A,5,14,(-0.31943828249997*cMr[5])-0.5*cMr[0]); + gkyl_mat_set(A,5,15,-0.4472135954999579*cMr[6]); + gkyl_mat_set(A,5,16,(-0.31943828249997*cMr[7])-0.5000000000000001*cMr[1]); + gkyl_mat_set(A,5,17,(-0.31943828249997*cMr[8])-0.5*cMr[4]); + gkyl_mat_set(A,6,9,-0.5*cMr[6]); + gkyl_mat_set(A,6,10,-0.447213595499958*cMr[3]); + gkyl_mat_set(A,6,11,(-0.447213595499958*cMr[8])-0.5000000000000001*cMr[4]); + gkyl_mat_set(A,6,12,(-0.4*cMr[7])-0.447213595499958*cMr[1]); + gkyl_mat_set(A,6,13,(-0.31943828249997*cMr[6])-0.5000000000000001*cMr[2]); + gkyl_mat_set(A,6,14,-0.4472135954999579*cMr[6]); + gkyl_mat_set(A,6,15,(-0.2857142857142857*cMr[8])-0.4472135954999579*cMr[5]-0.31943828249997*cMr[4]-0.5*cMr[0]); + gkyl_mat_set(A,6,16,-0.4*cMr[3]); + gkyl_mat_set(A,6,17,(-0.2857142857142857*cMr[6])-0.447213595499958*cMr[2]); + gkyl_mat_set(A,7,9,-0.5*cMr[7]); + gkyl_mat_set(A,7,10,(-0.447213595499958*cMr[8])-0.5000000000000001*cMr[5]); + gkyl_mat_set(A,7,11,-0.447213595499958*cMr[3]); + gkyl_mat_set(A,7,12,(-0.4*cMr[6])-0.447213595499958*cMr[2]); + gkyl_mat_set(A,7,13,-0.4472135954999579*cMr[7]); + gkyl_mat_set(A,7,14,(-0.31943828249997*cMr[7])-0.5000000000000001*cMr[1]); + gkyl_mat_set(A,7,15,-0.4*cMr[3]); + gkyl_mat_set(A,7,16,(-0.2857142857142857*cMr[8])-0.31943828249997*cMr[5]-0.4472135954999579*cMr[4]-0.5*cMr[0]); + gkyl_mat_set(A,7,17,(-0.2857142857142857*cMr[7])-0.447213595499958*cMr[1]); + gkyl_mat_set(A,8,9,-0.5*cMr[8]); + gkyl_mat_set(A,8,10,-0.447213595499958*cMr[7]); + gkyl_mat_set(A,8,11,-0.447213595499958*cMr[6]); + gkyl_mat_set(A,8,12,-0.4*cMr[3]); + gkyl_mat_set(A,8,13,(-0.31943828249997*cMr[8])-0.5*cMr[5]); + gkyl_mat_set(A,8,14,(-0.31943828249997*cMr[8])-0.5*cMr[4]); + gkyl_mat_set(A,8,15,(-0.2857142857142857*cMr[6])-0.447213595499958*cMr[2]); + gkyl_mat_set(A,8,16,(-0.2857142857142857*cMr[7])-0.447213595499958*cMr[1]); + gkyl_mat_set(A,8,17,(-0.2040816326530612*cMr[8])-0.31943828249997*cMr[5]-0.31943828249997*cMr[4]-0.5*cMr[0]); + + // ....... Block from weak multiply of u (correction to M1) and M1 .......... // + gkyl_mat_set(A,9,0,0.5*m1r[0]); + gkyl_mat_set(A,9,1,0.5*m1r[1]); + gkyl_mat_set(A,9,2,0.5*m1r[2]); + gkyl_mat_set(A,9,3,0.5*m1r[3]); + gkyl_mat_set(A,9,4,0.5*m1r[4]); + gkyl_mat_set(A,9,5,0.5*m1r[5]); + gkyl_mat_set(A,9,6,0.5*m1r[6]); + gkyl_mat_set(A,9,7,0.5*m1r[7]); + gkyl_mat_set(A,9,8,0.5*m1r[8]); + gkyl_mat_set(A,10,0,0.5*m1r[1]); + gkyl_mat_set(A,10,1,0.4472135954999579*m1r[4]+0.5*m1r[0]); + gkyl_mat_set(A,10,2,0.5*m1r[3]); + gkyl_mat_set(A,10,3,0.447213595499958*m1r[6]+0.5*m1r[2]); + gkyl_mat_set(A,10,4,0.4472135954999579*m1r[1]); + gkyl_mat_set(A,10,5,0.5000000000000001*m1r[7]); + gkyl_mat_set(A,10,6,0.447213595499958*m1r[3]); + gkyl_mat_set(A,10,7,0.447213595499958*m1r[8]+0.5000000000000001*m1r[5]); + gkyl_mat_set(A,10,8,0.447213595499958*m1r[7]); + gkyl_mat_set(A,11,0,0.5*m1r[2]); + gkyl_mat_set(A,11,1,0.5*m1r[3]); + gkyl_mat_set(A,11,2,0.4472135954999579*m1r[5]+0.5*m1r[0]); + gkyl_mat_set(A,11,3,0.447213595499958*m1r[7]+0.5*m1r[1]); + gkyl_mat_set(A,11,4,0.5000000000000001*m1r[6]); + gkyl_mat_set(A,11,5,0.4472135954999579*m1r[2]); + gkyl_mat_set(A,11,6,0.447213595499958*m1r[8]+0.5000000000000001*m1r[4]); + gkyl_mat_set(A,11,7,0.447213595499958*m1r[3]); + gkyl_mat_set(A,11,8,0.447213595499958*m1r[6]); + gkyl_mat_set(A,12,0,0.5*m1r[3]); + gkyl_mat_set(A,12,1,0.447213595499958*m1r[6]+0.5*m1r[2]); + gkyl_mat_set(A,12,2,0.447213595499958*m1r[7]+0.5*m1r[1]); + gkyl_mat_set(A,12,3,0.4*m1r[8]+0.4472135954999579*m1r[5]+0.4472135954999579*m1r[4]+0.5*m1r[0]); + gkyl_mat_set(A,12,4,0.4472135954999579*m1r[3]); + gkyl_mat_set(A,12,5,0.4472135954999579*m1r[3]); + gkyl_mat_set(A,12,6,0.4*m1r[7]+0.447213595499958*m1r[1]); + gkyl_mat_set(A,12,7,0.4*m1r[6]+0.447213595499958*m1r[2]); + gkyl_mat_set(A,12,8,0.4*m1r[3]); + gkyl_mat_set(A,13,0,0.5*m1r[4]); + gkyl_mat_set(A,13,1,0.4472135954999579*m1r[1]); + gkyl_mat_set(A,13,2,0.5000000000000001*m1r[6]); + gkyl_mat_set(A,13,3,0.4472135954999579*m1r[3]); + gkyl_mat_set(A,13,4,0.31943828249997*m1r[4]+0.5*m1r[0]); + gkyl_mat_set(A,13,5,0.5*m1r[8]); + gkyl_mat_set(A,13,6,0.31943828249997*m1r[6]+0.5000000000000001*m1r[2]); + gkyl_mat_set(A,13,7,0.4472135954999579*m1r[7]); + gkyl_mat_set(A,13,8,0.31943828249997*m1r[8]+0.5*m1r[5]); + gkyl_mat_set(A,14,0,0.5*m1r[5]); + gkyl_mat_set(A,14,1,0.5000000000000001*m1r[7]); + gkyl_mat_set(A,14,2,0.4472135954999579*m1r[2]); + gkyl_mat_set(A,14,3,0.4472135954999579*m1r[3]); + gkyl_mat_set(A,14,4,0.5*m1r[8]); + gkyl_mat_set(A,14,5,0.31943828249997*m1r[5]+0.5*m1r[0]); + gkyl_mat_set(A,14,6,0.4472135954999579*m1r[6]); + gkyl_mat_set(A,14,7,0.31943828249997*m1r[7]+0.5000000000000001*m1r[1]); + gkyl_mat_set(A,14,8,0.31943828249997*m1r[8]+0.5*m1r[4]); + gkyl_mat_set(A,15,0,0.5*m1r[6]); + gkyl_mat_set(A,15,1,0.447213595499958*m1r[3]); + gkyl_mat_set(A,15,2,0.447213595499958*m1r[8]+0.5000000000000001*m1r[4]); + gkyl_mat_set(A,15,3,0.4*m1r[7]+0.447213595499958*m1r[1]); + gkyl_mat_set(A,15,4,0.31943828249997*m1r[6]+0.5000000000000001*m1r[2]); + gkyl_mat_set(A,15,5,0.4472135954999579*m1r[6]); + gkyl_mat_set(A,15,6,0.2857142857142857*m1r[8]+0.4472135954999579*m1r[5]+0.31943828249997*m1r[4]+0.5*m1r[0]); + gkyl_mat_set(A,15,7,0.4*m1r[3]); + gkyl_mat_set(A,15,8,0.2857142857142857*m1r[6]+0.447213595499958*m1r[2]); + gkyl_mat_set(A,16,0,0.5*m1r[7]); + gkyl_mat_set(A,16,1,0.447213595499958*m1r[8]+0.5000000000000001*m1r[5]); + gkyl_mat_set(A,16,2,0.447213595499958*m1r[3]); + gkyl_mat_set(A,16,3,0.4*m1r[6]+0.447213595499958*m1r[2]); + gkyl_mat_set(A,16,4,0.4472135954999579*m1r[7]); + gkyl_mat_set(A,16,5,0.31943828249997*m1r[7]+0.5000000000000001*m1r[1]); + gkyl_mat_set(A,16,6,0.4*m1r[3]); + gkyl_mat_set(A,16,7,0.2857142857142857*m1r[8]+0.31943828249997*m1r[5]+0.4472135954999579*m1r[4]+0.5*m1r[0]); + gkyl_mat_set(A,16,8,0.2857142857142857*m1r[7]+0.447213595499958*m1r[1]); + gkyl_mat_set(A,17,0,0.5*m1r[8]); + gkyl_mat_set(A,17,1,0.447213595499958*m1r[7]); + gkyl_mat_set(A,17,2,0.447213595499958*m1r[6]); + gkyl_mat_set(A,17,3,0.4*m1r[3]); + gkyl_mat_set(A,17,4,0.31943828249997*m1r[8]+0.5*m1r[5]); + gkyl_mat_set(A,17,5,0.31943828249997*m1r[8]+0.5*m1r[4]); + gkyl_mat_set(A,17,6,0.2857142857142857*m1r[6]+0.447213595499958*m1r[2]); + gkyl_mat_set(A,17,7,0.2857142857142857*m1r[7]+0.447213595499958*m1r[1]); + gkyl_mat_set(A,17,8,0.2040816326530612*m1r[8]+0.31943828249997*m1r[5]+0.31943828249997*m1r[4]+0.5*m1r[0]); + // ....... Block from correction to vtSq .......... // - gkyl_mat_set(A,0,0,1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,0,1,1.5*m0r[1]-0.5*cEr[1]); - gkyl_mat_set(A,0,2,1.5*m0r[2]-0.5*cEr[2]); - gkyl_mat_set(A,0,3,1.5*m0r[3]-0.5*cEr[3]); - gkyl_mat_set(A,0,4,1.5*m0r[4]-0.5*cEr[4]); - gkyl_mat_set(A,0,5,1.5*m0r[5]-0.5*cEr[5]); - gkyl_mat_set(A,0,6,1.5*m0r[6]-0.5*cEr[6]); - gkyl_mat_set(A,0,7,1.5*m0r[7]-0.5*cEr[7]); - gkyl_mat_set(A,0,8,1.5*m0r[8]-0.5*cEr[8]); - gkyl_mat_set(A,1,0,1.5*m0r[1]-0.5*cEr[1]); - gkyl_mat_set(A,1,1,1.341640786499874*m0r[4]-0.4472135954999579*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,1,2,1.5*m0r[3]-0.5*cEr[3]); - gkyl_mat_set(A,1,3,1.341640786499874*m0r[6]-0.447213595499958*cEr[6]+1.5*m0r[2]-0.5*cEr[2]); - gkyl_mat_set(A,1,4,1.341640786499874*m0r[1]-0.4472135954999579*cEr[1]); - gkyl_mat_set(A,1,5,1.5*m0r[7]-0.5000000000000001*cEr[7]); - gkyl_mat_set(A,1,6,1.341640786499874*m0r[3]-0.447213595499958*cEr[3]); - gkyl_mat_set(A,1,7,1.341640786499874*m0r[8]-0.447213595499958*cEr[8]+1.5*m0r[5]-0.5000000000000001*cEr[5]); - gkyl_mat_set(A,1,8,1.341640786499874*m0r[7]-0.447213595499958*cEr[7]); - gkyl_mat_set(A,2,0,1.5*m0r[2]-0.5*cEr[2]); - gkyl_mat_set(A,2,1,1.5*m0r[3]-0.5*cEr[3]); - gkyl_mat_set(A,2,2,1.341640786499874*m0r[5]-0.4472135954999579*cEr[5]+1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,2,3,1.341640786499874*m0r[7]-0.447213595499958*cEr[7]+1.5*m0r[1]-0.5*cEr[1]); - gkyl_mat_set(A,2,4,1.5*m0r[6]-0.5000000000000001*cEr[6]); - gkyl_mat_set(A,2,5,1.341640786499874*m0r[2]-0.4472135954999579*cEr[2]); - gkyl_mat_set(A,2,6,1.341640786499874*m0r[8]-0.447213595499958*cEr[8]+1.5*m0r[4]-0.5000000000000001*cEr[4]); - gkyl_mat_set(A,2,7,1.341640786499874*m0r[3]-0.447213595499958*cEr[3]); - gkyl_mat_set(A,2,8,1.341640786499874*m0r[6]-0.447213595499958*cEr[6]); - gkyl_mat_set(A,3,0,1.5*m0r[3]-0.5*cEr[3]); - gkyl_mat_set(A,3,1,1.341640786499874*m0r[6]-0.447213595499958*cEr[6]+1.5*m0r[2]-0.5*cEr[2]); - gkyl_mat_set(A,3,2,1.341640786499874*m0r[7]-0.447213595499958*cEr[7]+1.5*m0r[1]-0.5*cEr[1]); - gkyl_mat_set(A,3,3,1.2*m0r[8]-0.4*cEr[8]+1.341640786499874*m0r[5]-0.4472135954999579*cEr[5]+1.341640786499874*m0r[4]-0.4472135954999579*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,3,4,1.341640786499874*m0r[3]-0.4472135954999579*cEr[3]); - gkyl_mat_set(A,3,5,1.341640786499874*m0r[3]-0.4472135954999579*cEr[3]); - gkyl_mat_set(A,3,6,1.2*m0r[7]-0.4*cEr[7]+1.341640786499874*m0r[1]-0.447213595499958*cEr[1]); - gkyl_mat_set(A,3,7,1.2*m0r[6]-0.4*cEr[6]+1.341640786499874*m0r[2]-0.447213595499958*cEr[2]); - gkyl_mat_set(A,3,8,1.2*m0r[3]-0.4*cEr[3]); - gkyl_mat_set(A,4,0,1.5*m0r[4]-0.5*cEr[4]); - gkyl_mat_set(A,4,1,1.341640786499874*m0r[1]-0.4472135954999579*cEr[1]); - gkyl_mat_set(A,4,2,1.5*m0r[6]-0.5000000000000001*cEr[6]); - gkyl_mat_set(A,4,3,1.341640786499874*m0r[3]-0.4472135954999579*cEr[3]); - gkyl_mat_set(A,4,4,0.9583148474999099*m0r[4]-0.31943828249997*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,4,5,1.5*m0r[8]-0.5*cEr[8]); - gkyl_mat_set(A,4,6,0.9583148474999099*m0r[6]-0.31943828249997*cEr[6]+1.5*m0r[2]-0.5000000000000001*cEr[2]); - gkyl_mat_set(A,4,7,1.341640786499874*m0r[7]-0.4472135954999579*cEr[7]); - gkyl_mat_set(A,4,8,0.9583148474999099*m0r[8]-0.31943828249997*cEr[8]+1.5*m0r[5]-0.5*cEr[5]); - gkyl_mat_set(A,5,0,1.5*m0r[5]-0.5*cEr[5]); - gkyl_mat_set(A,5,1,1.5*m0r[7]-0.5000000000000001*cEr[7]); - gkyl_mat_set(A,5,2,1.341640786499874*m0r[2]-0.4472135954999579*cEr[2]); - gkyl_mat_set(A,5,3,1.341640786499874*m0r[3]-0.4472135954999579*cEr[3]); - gkyl_mat_set(A,5,4,1.5*m0r[8]-0.5*cEr[8]); - gkyl_mat_set(A,5,5,0.9583148474999099*m0r[5]-0.31943828249997*cEr[5]+1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,5,6,1.341640786499874*m0r[6]-0.4472135954999579*cEr[6]); - gkyl_mat_set(A,5,7,0.9583148474999099*m0r[7]-0.31943828249997*cEr[7]+1.5*m0r[1]-0.5000000000000001*cEr[1]); - gkyl_mat_set(A,5,8,0.9583148474999099*m0r[8]-0.31943828249997*cEr[8]+1.5*m0r[4]-0.5*cEr[4]); - gkyl_mat_set(A,6,0,1.5*m0r[6]-0.5*cEr[6]); - gkyl_mat_set(A,6,1,1.341640786499874*m0r[3]-0.447213595499958*cEr[3]); - gkyl_mat_set(A,6,2,1.341640786499874*m0r[8]-0.447213595499958*cEr[8]+1.5*m0r[4]-0.5000000000000001*cEr[4]); - gkyl_mat_set(A,6,3,1.2*m0r[7]-0.4*cEr[7]+1.341640786499874*m0r[1]-0.447213595499958*cEr[1]); - gkyl_mat_set(A,6,4,0.9583148474999099*m0r[6]-0.31943828249997*cEr[6]+1.5*m0r[2]-0.5000000000000001*cEr[2]); - gkyl_mat_set(A,6,5,1.341640786499874*m0r[6]-0.4472135954999579*cEr[6]); - gkyl_mat_set(A,6,6,0.8571428571428571*m0r[8]-0.2857142857142857*cEr[8]+1.341640786499874*m0r[5]-0.4472135954999579*cEr[5]+0.9583148474999099*m0r[4]-0.31943828249997*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,6,7,1.2*m0r[3]-0.4*cEr[3]); - gkyl_mat_set(A,6,8,0.8571428571428571*m0r[6]-0.2857142857142857*cEr[6]+1.341640786499874*m0r[2]-0.447213595499958*cEr[2]); - gkyl_mat_set(A,7,0,1.5*m0r[7]-0.5*cEr[7]); - gkyl_mat_set(A,7,1,1.341640786499874*m0r[8]-0.447213595499958*cEr[8]+1.5*m0r[5]-0.5000000000000001*cEr[5]); - gkyl_mat_set(A,7,2,1.341640786499874*m0r[3]-0.447213595499958*cEr[3]); - gkyl_mat_set(A,7,3,1.2*m0r[6]-0.4*cEr[6]+1.341640786499874*m0r[2]-0.447213595499958*cEr[2]); - gkyl_mat_set(A,7,4,1.341640786499874*m0r[7]-0.4472135954999579*cEr[7]); - gkyl_mat_set(A,7,5,0.9583148474999099*m0r[7]-0.31943828249997*cEr[7]+1.5*m0r[1]-0.5000000000000001*cEr[1]); - gkyl_mat_set(A,7,6,1.2*m0r[3]-0.4*cEr[3]); - gkyl_mat_set(A,7,7,0.8571428571428571*m0r[8]-0.2857142857142857*cEr[8]+0.9583148474999099*m0r[5]-0.31943828249997*cEr[5]+1.341640786499874*m0r[4]-0.4472135954999579*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); - gkyl_mat_set(A,7,8,0.8571428571428571*m0r[7]-0.2857142857142857*cEr[7]+1.341640786499874*m0r[1]-0.447213595499958*cEr[1]); - gkyl_mat_set(A,8,0,1.5*m0r[8]-0.5*cEr[8]); - gkyl_mat_set(A,8,1,1.341640786499874*m0r[7]-0.447213595499958*cEr[7]); - gkyl_mat_set(A,8,2,1.341640786499874*m0r[6]-0.447213595499958*cEr[6]); - gkyl_mat_set(A,8,3,1.2*m0r[3]-0.4*cEr[3]); - gkyl_mat_set(A,8,4,0.9583148474999099*m0r[8]-0.31943828249997*cEr[8]+1.5*m0r[5]-0.5*cEr[5]); - gkyl_mat_set(A,8,5,0.9583148474999099*m0r[8]-0.31943828249997*cEr[8]+1.5*m0r[4]-0.5*cEr[4]); - gkyl_mat_set(A,8,6,0.8571428571428571*m0r[6]-0.2857142857142857*cEr[6]+1.341640786499874*m0r[2]-0.447213595499958*cEr[2]); - gkyl_mat_set(A,8,7,0.8571428571428571*m0r[7]-0.2857142857142857*cEr[7]+1.341640786499874*m0r[1]-0.447213595499958*cEr[1]); - gkyl_mat_set(A,8,8,0.6122448979591837*m0r[8]-0.2040816326530612*cEr[8]+0.9583148474999099*m0r[5]-0.31943828249997*cEr[5]+0.9583148474999099*m0r[4]-0.31943828249997*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,9,9,1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,9,10,1.5*m0r[1]-0.5*cEr[1]); + gkyl_mat_set(A,9,11,1.5*m0r[2]-0.5*cEr[2]); + gkyl_mat_set(A,9,12,1.5*m0r[3]-0.5*cEr[3]); + gkyl_mat_set(A,9,13,1.5*m0r[4]-0.5*cEr[4]); + gkyl_mat_set(A,9,14,1.5*m0r[5]-0.5*cEr[5]); + gkyl_mat_set(A,9,15,1.5*m0r[6]-0.5*cEr[6]); + gkyl_mat_set(A,9,16,1.5*m0r[7]-0.5*cEr[7]); + gkyl_mat_set(A,9,17,1.5*m0r[8]-0.5*cEr[8]); + gkyl_mat_set(A,10,9,1.5*m0r[1]-0.5*cEr[1]); + gkyl_mat_set(A,10,10,1.341640786499874*m0r[4]-0.4472135954999579*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,10,11,1.5*m0r[3]-0.5*cEr[3]); + gkyl_mat_set(A,10,12,1.341640786499874*m0r[6]-0.447213595499958*cEr[6]+1.5*m0r[2]-0.5*cEr[2]); + gkyl_mat_set(A,10,13,1.341640786499874*m0r[1]-0.4472135954999579*cEr[1]); + gkyl_mat_set(A,10,14,1.5*m0r[7]-0.5000000000000001*cEr[7]); + gkyl_mat_set(A,10,15,1.341640786499874*m0r[3]-0.447213595499958*cEr[3]); + gkyl_mat_set(A,10,16,1.341640786499874*m0r[8]-0.447213595499958*cEr[8]+1.5*m0r[5]-0.5000000000000001*cEr[5]); + gkyl_mat_set(A,10,17,1.341640786499874*m0r[7]-0.447213595499958*cEr[7]); + gkyl_mat_set(A,11,9,1.5*m0r[2]-0.5*cEr[2]); + gkyl_mat_set(A,11,10,1.5*m0r[3]-0.5*cEr[3]); + gkyl_mat_set(A,11,11,1.341640786499874*m0r[5]-0.4472135954999579*cEr[5]+1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,11,12,1.341640786499874*m0r[7]-0.447213595499958*cEr[7]+1.5*m0r[1]-0.5*cEr[1]); + gkyl_mat_set(A,11,13,1.5*m0r[6]-0.5000000000000001*cEr[6]); + gkyl_mat_set(A,11,14,1.341640786499874*m0r[2]-0.4472135954999579*cEr[2]); + gkyl_mat_set(A,11,15,1.341640786499874*m0r[8]-0.447213595499958*cEr[8]+1.5*m0r[4]-0.5000000000000001*cEr[4]); + gkyl_mat_set(A,11,16,1.341640786499874*m0r[3]-0.447213595499958*cEr[3]); + gkyl_mat_set(A,11,17,1.341640786499874*m0r[6]-0.447213595499958*cEr[6]); + gkyl_mat_set(A,12,9,1.5*m0r[3]-0.5*cEr[3]); + gkyl_mat_set(A,12,10,1.341640786499874*m0r[6]-0.447213595499958*cEr[6]+1.5*m0r[2]-0.5*cEr[2]); + gkyl_mat_set(A,12,11,1.341640786499874*m0r[7]-0.447213595499958*cEr[7]+1.5*m0r[1]-0.5*cEr[1]); + gkyl_mat_set(A,12,12,1.2*m0r[8]-0.4*cEr[8]+1.341640786499874*m0r[5]-0.4472135954999579*cEr[5]+1.341640786499874*m0r[4]-0.4472135954999579*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,12,13,1.341640786499874*m0r[3]-0.4472135954999579*cEr[3]); + gkyl_mat_set(A,12,14,1.341640786499874*m0r[3]-0.4472135954999579*cEr[3]); + gkyl_mat_set(A,12,15,1.2*m0r[7]-0.4*cEr[7]+1.341640786499874*m0r[1]-0.447213595499958*cEr[1]); + gkyl_mat_set(A,12,16,1.2*m0r[6]-0.4*cEr[6]+1.341640786499874*m0r[2]-0.447213595499958*cEr[2]); + gkyl_mat_set(A,12,17,1.2*m0r[3]-0.4*cEr[3]); + gkyl_mat_set(A,13,9,1.5*m0r[4]-0.5*cEr[4]); + gkyl_mat_set(A,13,10,1.341640786499874*m0r[1]-0.4472135954999579*cEr[1]); + gkyl_mat_set(A,13,11,1.5*m0r[6]-0.5000000000000001*cEr[6]); + gkyl_mat_set(A,13,12,1.341640786499874*m0r[3]-0.4472135954999579*cEr[3]); + gkyl_mat_set(A,13,13,0.9583148474999099*m0r[4]-0.31943828249997*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,13,14,1.5*m0r[8]-0.5*cEr[8]); + gkyl_mat_set(A,13,15,0.9583148474999099*m0r[6]-0.31943828249997*cEr[6]+1.5*m0r[2]-0.5000000000000001*cEr[2]); + gkyl_mat_set(A,13,16,1.341640786499874*m0r[7]-0.4472135954999579*cEr[7]); + gkyl_mat_set(A,13,17,0.9583148474999099*m0r[8]-0.31943828249997*cEr[8]+1.5*m0r[5]-0.5*cEr[5]); + gkyl_mat_set(A,14,9,1.5*m0r[5]-0.5*cEr[5]); + gkyl_mat_set(A,14,10,1.5*m0r[7]-0.5000000000000001*cEr[7]); + gkyl_mat_set(A,14,11,1.341640786499874*m0r[2]-0.4472135954999579*cEr[2]); + gkyl_mat_set(A,14,12,1.341640786499874*m0r[3]-0.4472135954999579*cEr[3]); + gkyl_mat_set(A,14,13,1.5*m0r[8]-0.5*cEr[8]); + gkyl_mat_set(A,14,14,0.9583148474999099*m0r[5]-0.31943828249997*cEr[5]+1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,14,15,1.341640786499874*m0r[6]-0.4472135954999579*cEr[6]); + gkyl_mat_set(A,14,16,0.9583148474999099*m0r[7]-0.31943828249997*cEr[7]+1.5*m0r[1]-0.5000000000000001*cEr[1]); + gkyl_mat_set(A,14,17,0.9583148474999099*m0r[8]-0.31943828249997*cEr[8]+1.5*m0r[4]-0.5*cEr[4]); + gkyl_mat_set(A,15,9,1.5*m0r[6]-0.5*cEr[6]); + gkyl_mat_set(A,15,10,1.341640786499874*m0r[3]-0.447213595499958*cEr[3]); + gkyl_mat_set(A,15,11,1.341640786499874*m0r[8]-0.447213595499958*cEr[8]+1.5*m0r[4]-0.5000000000000001*cEr[4]); + gkyl_mat_set(A,15,12,1.2*m0r[7]-0.4*cEr[7]+1.341640786499874*m0r[1]-0.447213595499958*cEr[1]); + gkyl_mat_set(A,15,13,0.9583148474999099*m0r[6]-0.31943828249997*cEr[6]+1.5*m0r[2]-0.5000000000000001*cEr[2]); + gkyl_mat_set(A,15,14,1.341640786499874*m0r[6]-0.4472135954999579*cEr[6]); + gkyl_mat_set(A,15,15,0.8571428571428571*m0r[8]-0.2857142857142857*cEr[8]+1.341640786499874*m0r[5]-0.4472135954999579*cEr[5]+0.9583148474999099*m0r[4]-0.31943828249997*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,15,16,1.2*m0r[3]-0.4*cEr[3]); + gkyl_mat_set(A,15,17,0.8571428571428571*m0r[6]-0.2857142857142857*cEr[6]+1.341640786499874*m0r[2]-0.447213595499958*cEr[2]); + gkyl_mat_set(A,16,9,1.5*m0r[7]-0.5*cEr[7]); + gkyl_mat_set(A,16,10,1.341640786499874*m0r[8]-0.447213595499958*cEr[8]+1.5*m0r[5]-0.5000000000000001*cEr[5]); + gkyl_mat_set(A,16,11,1.341640786499874*m0r[3]-0.447213595499958*cEr[3]); + gkyl_mat_set(A,16,12,1.2*m0r[6]-0.4*cEr[6]+1.341640786499874*m0r[2]-0.447213595499958*cEr[2]); + gkyl_mat_set(A,16,13,1.341640786499874*m0r[7]-0.4472135954999579*cEr[7]); + gkyl_mat_set(A,16,14,0.9583148474999099*m0r[7]-0.31943828249997*cEr[7]+1.5*m0r[1]-0.5000000000000001*cEr[1]); + gkyl_mat_set(A,16,15,1.2*m0r[3]-0.4*cEr[3]); + gkyl_mat_set(A,16,16,0.8571428571428571*m0r[8]-0.2857142857142857*cEr[8]+0.9583148474999099*m0r[5]-0.31943828249997*cEr[5]+1.341640786499874*m0r[4]-0.4472135954999579*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); + gkyl_mat_set(A,16,17,0.8571428571428571*m0r[7]-0.2857142857142857*cEr[7]+1.341640786499874*m0r[1]-0.447213595499958*cEr[1]); + gkyl_mat_set(A,17,9,1.5*m0r[8]-0.5*cEr[8]); + gkyl_mat_set(A,17,10,1.341640786499874*m0r[7]-0.447213595499958*cEr[7]); + gkyl_mat_set(A,17,11,1.341640786499874*m0r[6]-0.447213595499958*cEr[6]); + gkyl_mat_set(A,17,12,1.2*m0r[3]-0.4*cEr[3]); + gkyl_mat_set(A,17,13,0.9583148474999099*m0r[8]-0.31943828249997*cEr[8]+1.5*m0r[5]-0.5*cEr[5]); + gkyl_mat_set(A,17,14,0.9583148474999099*m0r[8]-0.31943828249997*cEr[8]+1.5*m0r[4]-0.5*cEr[4]); + gkyl_mat_set(A,17,15,0.8571428571428571*m0r[6]-0.2857142857142857*cEr[6]+1.341640786499874*m0r[2]-0.447213595499958*cEr[2]); + gkyl_mat_set(A,17,16,0.8571428571428571*m0r[7]-0.2857142857142857*cEr[7]+1.341640786499874*m0r[1]-0.447213595499958*cEr[1]); + gkyl_mat_set(A,17,17,0.6122448979591837*m0r[8]-0.2040816326530612*cEr[8]+0.9583148474999099*m0r[5]-0.31943828249997*cEr[5]+0.9583148474999099*m0r[4]-0.31943828249997*cEr[4]+1.5*m0r[0]-0.5*cEr[0]); } diff --git a/kernels/pkpm/vlasov_pkpm_self_prim_moments_3x1v_ser_p1.c b/kernels/pkpm/vlasov_pkpm_self_prim_moments_3x1v_ser_p1.c index 4c06c8e3c..2a5bd03f5 100644 --- a/kernels/pkpm/vlasov_pkpm_self_prim_moments_3x1v_ser_p1.c +++ b/kernels/pkpm/vlasov_pkpm_self_prim_moments_3x1v_ser_p1.c @@ -10,6 +10,7 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_3x1v_ser_p1(struct gkyl_mat *A, st const double *rho = &vlasov_pkpm_moms[0]; const double *p_parallel = &vlasov_pkpm_moms[8]; const double *p_perp = &vlasov_pkpm_moms[16]; + const double *M1 = &vlasov_pkpm_moms[24]; // If a corner value is below zero, use cell average. bool cellAvg = false; if (-0.25*(7.348469228349534*rho[7]-4.242640687119286*(rho[6]+rho[5]+rho[4])+2.449489742783178*(rho[3]+rho[2]+rho[1])-1.414213562373095*rho[0]) < 0) cellAvg = true; @@ -38,6 +39,8 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_3x1v_ser_p1(struct gkyl_mat *A, st if (0.25*(7.348469228349534*p_perp[7]+4.242640687119286*(p_perp[6]+p_perp[5]+p_perp[4])+2.449489742783178*(p_perp[3]+p_perp[2]+p_perp[1])+1.414213562373095*p_perp[0]) < 0) cellAvg = true; double m0r[8] = {0.0}; + double m1r[8] = {0.0}; + double cMr[8] = {0.0}; double cEr[8] = {0.0}; if (cellAvg) { m0r[0] = rho[0]; @@ -48,15 +51,23 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_3x1v_ser_p1(struct gkyl_mat *A, st m0r[5] = 0.0; m0r[6] = 0.0; m0r[7] = 0.0; - cEr[0] = boundary_corrections[0]; - cEr[1] = 0.0; - cEr[2] = 0.0; - cEr[3] = 0.0; - cEr[4] = 0.0; - cEr[5] = 0.0; - cEr[6] = 0.0; - cEr[7] = 0.0; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); + m1r[0] = M1[0]; + m1r[1] = 0.0; + m1r[2] = 0.0; + m1r[3] = 0.0; + m1r[4] = 0.0; + m1r[5] = 0.0; + m1r[6] = 0.0; + m1r[7] = 0.0; + cMr[0] = boundary_corrections[0]; + cMr[1] = 0.0; + cMr[2] = 0.0; + cMr[3] = 0.0; + cMr[4] = 0.0; + cMr[5] = 0.0; + cMr[6] = 0.0; + cMr[7] = 0.0; + gkyl_mat_set(rhs,0,0,M1[0]); gkyl_mat_set(rhs,1,0,0.0); gkyl_mat_set(rhs,2,0,0.0); gkyl_mat_set(rhs,3,0,0.0); @@ -64,6 +75,22 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_3x1v_ser_p1(struct gkyl_mat *A, st gkyl_mat_set(rhs,5,0,0.0); gkyl_mat_set(rhs,6,0,0.0); gkyl_mat_set(rhs,7,0,0.0); + cEr[0] = boundary_corrections[8]; + cEr[1] = 0.0; + cEr[2] = 0.0; + cEr[3] = 0.0; + cEr[4] = 0.0; + cEr[5] = 0.0; + cEr[6] = 0.0; + cEr[7] = 0.0; + gkyl_mat_set(rhs,8,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,9,0,0.0); + gkyl_mat_set(rhs,10,0,0.0); + gkyl_mat_set(rhs,11,0,0.0); + gkyl_mat_set(rhs,12,0,0.0); + gkyl_mat_set(rhs,13,0,0.0); + gkyl_mat_set(rhs,14,0,0.0); + gkyl_mat_set(rhs,15,0,0.0); } else { m0r[0] = rho[0]; m0r[1] = rho[1]; @@ -73,89 +100,311 @@ GKYL_CU_DH void vlasov_pkpm_self_prim_moments_3x1v_ser_p1(struct gkyl_mat *A, st m0r[5] = rho[5]; m0r[6] = rho[6]; m0r[7] = rho[7]; - cEr[0] = boundary_corrections[0]; - cEr[1] = boundary_corrections[1]; - cEr[2] = boundary_corrections[2]; - cEr[3] = boundary_corrections[3]; - cEr[4] = boundary_corrections[4]; - cEr[5] = boundary_corrections[5]; - cEr[6] = boundary_corrections[6]; - cEr[7] = boundary_corrections[7]; - gkyl_mat_set(rhs,0,0,2.0*p_perp[0]+p_parallel[0]); - gkyl_mat_set(rhs,1,0,2.0*p_perp[1]+p_parallel[1]); - gkyl_mat_set(rhs,2,0,2.0*p_perp[2]+p_parallel[2]); - gkyl_mat_set(rhs,3,0,2.0*p_perp[3]+p_parallel[3]); - gkyl_mat_set(rhs,4,0,2.0*p_perp[4]+p_parallel[4]); - gkyl_mat_set(rhs,5,0,2.0*p_perp[5]+p_parallel[5]); - gkyl_mat_set(rhs,6,0,2.0*p_perp[6]+p_parallel[6]); - gkyl_mat_set(rhs,7,0,2.0*p_perp[7]+p_parallel[7]); + m1r[0] = M1[0]; + m1r[1] = M1[1]; + m1r[2] = M1[2]; + m1r[3] = M1[3]; + m1r[4] = M1[4]; + m1r[5] = M1[5]; + m1r[6] = M1[6]; + m1r[7] = M1[7]; + cMr[0] = boundary_corrections[0]; + cMr[1] = boundary_corrections[1]; + cMr[2] = boundary_corrections[2]; + cMr[3] = boundary_corrections[3]; + cMr[4] = boundary_corrections[4]; + cMr[5] = boundary_corrections[5]; + cMr[6] = boundary_corrections[6]; + cMr[7] = boundary_corrections[7]; + gkyl_mat_set(rhs,0,0,M1[0]); + gkyl_mat_set(rhs,1,0,M1[1]); + gkyl_mat_set(rhs,2,0,M1[2]); + gkyl_mat_set(rhs,3,0,M1[3]); + gkyl_mat_set(rhs,4,0,M1[4]); + gkyl_mat_set(rhs,5,0,M1[5]); + gkyl_mat_set(rhs,6,0,M1[6]); + gkyl_mat_set(rhs,7,0,M1[7]); + cEr[0] = boundary_corrections[8]; + cEr[1] = boundary_corrections[9]; + cEr[2] = boundary_corrections[10]; + cEr[3] = boundary_corrections[11]; + cEr[4] = boundary_corrections[12]; + cEr[5] = boundary_corrections[13]; + cEr[6] = boundary_corrections[14]; + cEr[7] = boundary_corrections[15]; + gkyl_mat_set(rhs,8,0,2.0*p_perp[0]+p_parallel[0]); + gkyl_mat_set(rhs,9,0,2.0*p_perp[1]+p_parallel[1]); + gkyl_mat_set(rhs,10,0,2.0*p_perp[2]+p_parallel[2]); + gkyl_mat_set(rhs,11,0,2.0*p_perp[3]+p_parallel[3]); + gkyl_mat_set(rhs,12,0,2.0*p_perp[4]+p_parallel[4]); + gkyl_mat_set(rhs,13,0,2.0*p_perp[5]+p_parallel[5]); + gkyl_mat_set(rhs,14,0,2.0*p_perp[6]+p_parallel[6]); + gkyl_mat_set(rhs,15,0,2.0*p_perp[7]+p_parallel[7]); } + // ....... Block from weak multiply of u (correction to M1) and rho .......... // + gkyl_mat_set(A,0,0,0.3535533905932737*m0r[0]); + gkyl_mat_set(A,0,1,0.3535533905932737*m0r[1]); + gkyl_mat_set(A,0,2,0.3535533905932737*m0r[2]); + gkyl_mat_set(A,0,3,0.3535533905932737*m0r[3]); + gkyl_mat_set(A,0,4,0.3535533905932737*m0r[4]); + gkyl_mat_set(A,0,5,0.3535533905932737*m0r[5]); + gkyl_mat_set(A,0,6,0.3535533905932737*m0r[6]); + gkyl_mat_set(A,0,7,0.3535533905932737*m0r[7]); + gkyl_mat_set(A,1,0,0.3535533905932737*m0r[1]); + gkyl_mat_set(A,1,1,0.3535533905932737*m0r[0]); + gkyl_mat_set(A,1,2,0.3535533905932737*m0r[4]); + gkyl_mat_set(A,1,3,0.3535533905932737*m0r[5]); + gkyl_mat_set(A,1,4,0.3535533905932737*m0r[2]); + gkyl_mat_set(A,1,5,0.3535533905932737*m0r[3]); + gkyl_mat_set(A,1,6,0.3535533905932737*m0r[7]); + gkyl_mat_set(A,1,7,0.3535533905932737*m0r[6]); + gkyl_mat_set(A,2,0,0.3535533905932737*m0r[2]); + gkyl_mat_set(A,2,1,0.3535533905932737*m0r[4]); + gkyl_mat_set(A,2,2,0.3535533905932737*m0r[0]); + gkyl_mat_set(A,2,3,0.3535533905932737*m0r[6]); + gkyl_mat_set(A,2,4,0.3535533905932737*m0r[1]); + gkyl_mat_set(A,2,5,0.3535533905932737*m0r[7]); + gkyl_mat_set(A,2,6,0.3535533905932737*m0r[3]); + gkyl_mat_set(A,2,7,0.3535533905932737*m0r[5]); + gkyl_mat_set(A,3,0,0.3535533905932737*m0r[3]); + gkyl_mat_set(A,3,1,0.3535533905932737*m0r[5]); + gkyl_mat_set(A,3,2,0.3535533905932737*m0r[6]); + gkyl_mat_set(A,3,3,0.3535533905932737*m0r[0]); + gkyl_mat_set(A,3,4,0.3535533905932737*m0r[7]); + gkyl_mat_set(A,3,5,0.3535533905932737*m0r[1]); + gkyl_mat_set(A,3,6,0.3535533905932737*m0r[2]); + gkyl_mat_set(A,3,7,0.3535533905932737*m0r[4]); + gkyl_mat_set(A,4,0,0.3535533905932737*m0r[4]); + gkyl_mat_set(A,4,1,0.3535533905932737*m0r[2]); + gkyl_mat_set(A,4,2,0.3535533905932737*m0r[1]); + gkyl_mat_set(A,4,3,0.3535533905932737*m0r[7]); + gkyl_mat_set(A,4,4,0.3535533905932737*m0r[0]); + gkyl_mat_set(A,4,5,0.3535533905932737*m0r[6]); + gkyl_mat_set(A,4,6,0.3535533905932737*m0r[5]); + gkyl_mat_set(A,4,7,0.3535533905932737*m0r[3]); + gkyl_mat_set(A,5,0,0.3535533905932737*m0r[5]); + gkyl_mat_set(A,5,1,0.3535533905932737*m0r[3]); + gkyl_mat_set(A,5,2,0.3535533905932737*m0r[7]); + gkyl_mat_set(A,5,3,0.3535533905932737*m0r[1]); + gkyl_mat_set(A,5,4,0.3535533905932737*m0r[6]); + gkyl_mat_set(A,5,5,0.3535533905932737*m0r[0]); + gkyl_mat_set(A,5,6,0.3535533905932737*m0r[4]); + gkyl_mat_set(A,5,7,0.3535533905932737*m0r[2]); + gkyl_mat_set(A,6,0,0.3535533905932737*m0r[6]); + gkyl_mat_set(A,6,1,0.3535533905932737*m0r[7]); + gkyl_mat_set(A,6,2,0.3535533905932737*m0r[3]); + gkyl_mat_set(A,6,3,0.3535533905932737*m0r[2]); + gkyl_mat_set(A,6,4,0.3535533905932737*m0r[5]); + gkyl_mat_set(A,6,5,0.3535533905932737*m0r[4]); + gkyl_mat_set(A,6,6,0.3535533905932737*m0r[0]); + gkyl_mat_set(A,6,7,0.3535533905932737*m0r[1]); + gkyl_mat_set(A,7,0,0.3535533905932737*m0r[7]); + gkyl_mat_set(A,7,1,0.3535533905932737*m0r[6]); + gkyl_mat_set(A,7,2,0.3535533905932737*m0r[5]); + gkyl_mat_set(A,7,3,0.3535533905932737*m0r[4]); + gkyl_mat_set(A,7,4,0.3535533905932737*m0r[3]); + gkyl_mat_set(A,7,5,0.3535533905932737*m0r[2]); + gkyl_mat_set(A,7,6,0.3535533905932737*m0r[1]); + gkyl_mat_set(A,7,7,0.3535533905932737*m0r[0]); + + // ....... Block from correction to u (correction to M1).......... // + gkyl_mat_set(A,0,8,-0.3535533905932737*cMr[0]); + gkyl_mat_set(A,0,9,-0.3535533905932737*cMr[1]); + gkyl_mat_set(A,0,10,-0.3535533905932737*cMr[2]); + gkyl_mat_set(A,0,11,-0.3535533905932737*cMr[3]); + gkyl_mat_set(A,0,12,-0.3535533905932737*cMr[4]); + gkyl_mat_set(A,0,13,-0.3535533905932737*cMr[5]); + gkyl_mat_set(A,0,14,-0.3535533905932737*cMr[6]); + gkyl_mat_set(A,0,15,-0.3535533905932737*cMr[7]); + gkyl_mat_set(A,1,8,-0.3535533905932737*cMr[1]); + gkyl_mat_set(A,1,9,-0.3535533905932737*cMr[0]); + gkyl_mat_set(A,1,10,-0.3535533905932737*cMr[4]); + gkyl_mat_set(A,1,11,-0.3535533905932737*cMr[5]); + gkyl_mat_set(A,1,12,-0.3535533905932737*cMr[2]); + gkyl_mat_set(A,1,13,-0.3535533905932737*cMr[3]); + gkyl_mat_set(A,1,14,-0.3535533905932737*cMr[7]); + gkyl_mat_set(A,1,15,-0.3535533905932737*cMr[6]); + gkyl_mat_set(A,2,8,-0.3535533905932737*cMr[2]); + gkyl_mat_set(A,2,9,-0.3535533905932737*cMr[4]); + gkyl_mat_set(A,2,10,-0.3535533905932737*cMr[0]); + gkyl_mat_set(A,2,11,-0.3535533905932737*cMr[6]); + gkyl_mat_set(A,2,12,-0.3535533905932737*cMr[1]); + gkyl_mat_set(A,2,13,-0.3535533905932737*cMr[7]); + gkyl_mat_set(A,2,14,-0.3535533905932737*cMr[3]); + gkyl_mat_set(A,2,15,-0.3535533905932737*cMr[5]); + gkyl_mat_set(A,3,8,-0.3535533905932737*cMr[3]); + gkyl_mat_set(A,3,9,-0.3535533905932737*cMr[5]); + gkyl_mat_set(A,3,10,-0.3535533905932737*cMr[6]); + gkyl_mat_set(A,3,11,-0.3535533905932737*cMr[0]); + gkyl_mat_set(A,3,12,-0.3535533905932737*cMr[7]); + gkyl_mat_set(A,3,13,-0.3535533905932737*cMr[1]); + gkyl_mat_set(A,3,14,-0.3535533905932737*cMr[2]); + gkyl_mat_set(A,3,15,-0.3535533905932737*cMr[4]); + gkyl_mat_set(A,4,8,-0.3535533905932737*cMr[4]); + gkyl_mat_set(A,4,9,-0.3535533905932737*cMr[2]); + gkyl_mat_set(A,4,10,-0.3535533905932737*cMr[1]); + gkyl_mat_set(A,4,11,-0.3535533905932737*cMr[7]); + gkyl_mat_set(A,4,12,-0.3535533905932737*cMr[0]); + gkyl_mat_set(A,4,13,-0.3535533905932737*cMr[6]); + gkyl_mat_set(A,4,14,-0.3535533905932737*cMr[5]); + gkyl_mat_set(A,4,15,-0.3535533905932737*cMr[3]); + gkyl_mat_set(A,5,8,-0.3535533905932737*cMr[5]); + gkyl_mat_set(A,5,9,-0.3535533905932737*cMr[3]); + gkyl_mat_set(A,5,10,-0.3535533905932737*cMr[7]); + gkyl_mat_set(A,5,11,-0.3535533905932737*cMr[1]); + gkyl_mat_set(A,5,12,-0.3535533905932737*cMr[6]); + gkyl_mat_set(A,5,13,-0.3535533905932737*cMr[0]); + gkyl_mat_set(A,5,14,-0.3535533905932737*cMr[4]); + gkyl_mat_set(A,5,15,-0.3535533905932737*cMr[2]); + gkyl_mat_set(A,6,8,-0.3535533905932737*cMr[6]); + gkyl_mat_set(A,6,9,-0.3535533905932737*cMr[7]); + gkyl_mat_set(A,6,10,-0.3535533905932737*cMr[3]); + gkyl_mat_set(A,6,11,-0.3535533905932737*cMr[2]); + gkyl_mat_set(A,6,12,-0.3535533905932737*cMr[5]); + gkyl_mat_set(A,6,13,-0.3535533905932737*cMr[4]); + gkyl_mat_set(A,6,14,-0.3535533905932737*cMr[0]); + gkyl_mat_set(A,6,15,-0.3535533905932737*cMr[1]); + gkyl_mat_set(A,7,8,-0.3535533905932737*cMr[7]); + gkyl_mat_set(A,7,9,-0.3535533905932737*cMr[6]); + gkyl_mat_set(A,7,10,-0.3535533905932737*cMr[5]); + gkyl_mat_set(A,7,11,-0.3535533905932737*cMr[4]); + gkyl_mat_set(A,7,12,-0.3535533905932737*cMr[3]); + gkyl_mat_set(A,7,13,-0.3535533905932737*cMr[2]); + gkyl_mat_set(A,7,14,-0.3535533905932737*cMr[1]); + gkyl_mat_set(A,7,15,-0.3535533905932737*cMr[0]); + + // ....... Block from weak multiply of u (correction to M1) and M1 .......... // + gkyl_mat_set(A,8,0,0.3535533905932737*m1r[0]); + gkyl_mat_set(A,8,1,0.3535533905932737*m1r[1]); + gkyl_mat_set(A,8,2,0.3535533905932737*m1r[2]); + gkyl_mat_set(A,8,3,0.3535533905932737*m1r[3]); + gkyl_mat_set(A,8,4,0.3535533905932737*m1r[4]); + gkyl_mat_set(A,8,5,0.3535533905932737*m1r[5]); + gkyl_mat_set(A,8,6,0.3535533905932737*m1r[6]); + gkyl_mat_set(A,8,7,0.3535533905932737*m1r[7]); + gkyl_mat_set(A,9,0,0.3535533905932737*m1r[1]); + gkyl_mat_set(A,9,1,0.3535533905932737*m1r[0]); + gkyl_mat_set(A,9,2,0.3535533905932737*m1r[4]); + gkyl_mat_set(A,9,3,0.3535533905932737*m1r[5]); + gkyl_mat_set(A,9,4,0.3535533905932737*m1r[2]); + gkyl_mat_set(A,9,5,0.3535533905932737*m1r[3]); + gkyl_mat_set(A,9,6,0.3535533905932737*m1r[7]); + gkyl_mat_set(A,9,7,0.3535533905932737*m1r[6]); + gkyl_mat_set(A,10,0,0.3535533905932737*m1r[2]); + gkyl_mat_set(A,10,1,0.3535533905932737*m1r[4]); + gkyl_mat_set(A,10,2,0.3535533905932737*m1r[0]); + gkyl_mat_set(A,10,3,0.3535533905932737*m1r[6]); + gkyl_mat_set(A,10,4,0.3535533905932737*m1r[1]); + gkyl_mat_set(A,10,5,0.3535533905932737*m1r[7]); + gkyl_mat_set(A,10,6,0.3535533905932737*m1r[3]); + gkyl_mat_set(A,10,7,0.3535533905932737*m1r[5]); + gkyl_mat_set(A,11,0,0.3535533905932737*m1r[3]); + gkyl_mat_set(A,11,1,0.3535533905932737*m1r[5]); + gkyl_mat_set(A,11,2,0.3535533905932737*m1r[6]); + gkyl_mat_set(A,11,3,0.3535533905932737*m1r[0]); + gkyl_mat_set(A,11,4,0.3535533905932737*m1r[7]); + gkyl_mat_set(A,11,5,0.3535533905932737*m1r[1]); + gkyl_mat_set(A,11,6,0.3535533905932737*m1r[2]); + gkyl_mat_set(A,11,7,0.3535533905932737*m1r[4]); + gkyl_mat_set(A,12,0,0.3535533905932737*m1r[4]); + gkyl_mat_set(A,12,1,0.3535533905932737*m1r[2]); + gkyl_mat_set(A,12,2,0.3535533905932737*m1r[1]); + gkyl_mat_set(A,12,3,0.3535533905932737*m1r[7]); + gkyl_mat_set(A,12,4,0.3535533905932737*m1r[0]); + gkyl_mat_set(A,12,5,0.3535533905932737*m1r[6]); + gkyl_mat_set(A,12,6,0.3535533905932737*m1r[5]); + gkyl_mat_set(A,12,7,0.3535533905932737*m1r[3]); + gkyl_mat_set(A,13,0,0.3535533905932737*m1r[5]); + gkyl_mat_set(A,13,1,0.3535533905932737*m1r[3]); + gkyl_mat_set(A,13,2,0.3535533905932737*m1r[7]); + gkyl_mat_set(A,13,3,0.3535533905932737*m1r[1]); + gkyl_mat_set(A,13,4,0.3535533905932737*m1r[6]); + gkyl_mat_set(A,13,5,0.3535533905932737*m1r[0]); + gkyl_mat_set(A,13,6,0.3535533905932737*m1r[4]); + gkyl_mat_set(A,13,7,0.3535533905932737*m1r[2]); + gkyl_mat_set(A,14,0,0.3535533905932737*m1r[6]); + gkyl_mat_set(A,14,1,0.3535533905932737*m1r[7]); + gkyl_mat_set(A,14,2,0.3535533905932737*m1r[3]); + gkyl_mat_set(A,14,3,0.3535533905932737*m1r[2]); + gkyl_mat_set(A,14,4,0.3535533905932737*m1r[5]); + gkyl_mat_set(A,14,5,0.3535533905932737*m1r[4]); + gkyl_mat_set(A,14,6,0.3535533905932737*m1r[0]); + gkyl_mat_set(A,14,7,0.3535533905932737*m1r[1]); + gkyl_mat_set(A,15,0,0.3535533905932737*m1r[7]); + gkyl_mat_set(A,15,1,0.3535533905932737*m1r[6]); + gkyl_mat_set(A,15,2,0.3535533905932737*m1r[5]); + gkyl_mat_set(A,15,3,0.3535533905932737*m1r[4]); + gkyl_mat_set(A,15,4,0.3535533905932737*m1r[3]); + gkyl_mat_set(A,15,5,0.3535533905932737*m1r[2]); + gkyl_mat_set(A,15,6,0.3535533905932737*m1r[1]); + gkyl_mat_set(A,15,7,0.3535533905932737*m1r[0]); + // ....... Block from correction to vtSq .......... // - gkyl_mat_set(A,0,0,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); - gkyl_mat_set(A,0,1,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); - gkyl_mat_set(A,0,2,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); - gkyl_mat_set(A,0,3,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); - gkyl_mat_set(A,0,4,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); - gkyl_mat_set(A,0,5,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); - gkyl_mat_set(A,0,6,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); - gkyl_mat_set(A,0,7,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); - gkyl_mat_set(A,1,0,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); - gkyl_mat_set(A,1,1,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); - gkyl_mat_set(A,1,2,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); - gkyl_mat_set(A,1,3,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); - gkyl_mat_set(A,1,4,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); - gkyl_mat_set(A,1,5,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); - gkyl_mat_set(A,1,6,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); - gkyl_mat_set(A,1,7,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); - gkyl_mat_set(A,2,0,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); - gkyl_mat_set(A,2,1,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); - gkyl_mat_set(A,2,2,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); - gkyl_mat_set(A,2,3,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); - gkyl_mat_set(A,2,4,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); - gkyl_mat_set(A,2,5,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); - gkyl_mat_set(A,2,6,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); - gkyl_mat_set(A,2,7,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); - gkyl_mat_set(A,3,0,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); - gkyl_mat_set(A,3,1,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); - gkyl_mat_set(A,3,2,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); - gkyl_mat_set(A,3,3,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); - gkyl_mat_set(A,3,4,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); - gkyl_mat_set(A,3,5,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); - gkyl_mat_set(A,3,6,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); - gkyl_mat_set(A,3,7,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); - gkyl_mat_set(A,4,0,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); - gkyl_mat_set(A,4,1,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); - gkyl_mat_set(A,4,2,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); - gkyl_mat_set(A,4,3,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); - gkyl_mat_set(A,4,4,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); - gkyl_mat_set(A,4,5,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); - gkyl_mat_set(A,4,6,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); - gkyl_mat_set(A,4,7,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); - gkyl_mat_set(A,5,0,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); - gkyl_mat_set(A,5,1,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); - gkyl_mat_set(A,5,2,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); - gkyl_mat_set(A,5,3,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); - gkyl_mat_set(A,5,4,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); - gkyl_mat_set(A,5,5,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); - gkyl_mat_set(A,5,6,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); - gkyl_mat_set(A,5,7,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); - gkyl_mat_set(A,6,0,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); - gkyl_mat_set(A,6,1,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); - gkyl_mat_set(A,6,2,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); - gkyl_mat_set(A,6,3,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); - gkyl_mat_set(A,6,4,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); - gkyl_mat_set(A,6,5,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); - gkyl_mat_set(A,6,6,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); - gkyl_mat_set(A,6,7,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); - gkyl_mat_set(A,7,0,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); - gkyl_mat_set(A,7,1,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); - gkyl_mat_set(A,7,2,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); - gkyl_mat_set(A,7,3,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); - gkyl_mat_set(A,7,4,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); - gkyl_mat_set(A,7,5,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); - gkyl_mat_set(A,7,6,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); - gkyl_mat_set(A,7,7,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); + gkyl_mat_set(A,8,8,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); + gkyl_mat_set(A,8,9,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); + gkyl_mat_set(A,8,10,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); + gkyl_mat_set(A,8,11,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); + gkyl_mat_set(A,8,12,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); + gkyl_mat_set(A,8,13,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); + gkyl_mat_set(A,8,14,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); + gkyl_mat_set(A,8,15,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); + gkyl_mat_set(A,9,8,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); + gkyl_mat_set(A,9,9,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); + gkyl_mat_set(A,9,10,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); + gkyl_mat_set(A,9,11,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); + gkyl_mat_set(A,9,12,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); + gkyl_mat_set(A,9,13,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); + gkyl_mat_set(A,9,14,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); + gkyl_mat_set(A,9,15,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); + gkyl_mat_set(A,10,8,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); + gkyl_mat_set(A,10,9,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); + gkyl_mat_set(A,10,10,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); + gkyl_mat_set(A,10,11,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); + gkyl_mat_set(A,10,12,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); + gkyl_mat_set(A,10,13,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); + gkyl_mat_set(A,10,14,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); + gkyl_mat_set(A,10,15,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); + gkyl_mat_set(A,11,8,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); + gkyl_mat_set(A,11,9,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); + gkyl_mat_set(A,11,10,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); + gkyl_mat_set(A,11,11,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); + gkyl_mat_set(A,11,12,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); + gkyl_mat_set(A,11,13,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); + gkyl_mat_set(A,11,14,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); + gkyl_mat_set(A,11,15,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); + gkyl_mat_set(A,12,8,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); + gkyl_mat_set(A,12,9,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); + gkyl_mat_set(A,12,10,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); + gkyl_mat_set(A,12,11,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); + gkyl_mat_set(A,12,12,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); + gkyl_mat_set(A,12,13,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); + gkyl_mat_set(A,12,14,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); + gkyl_mat_set(A,12,15,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); + gkyl_mat_set(A,13,8,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); + gkyl_mat_set(A,13,9,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); + gkyl_mat_set(A,13,10,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); + gkyl_mat_set(A,13,11,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); + gkyl_mat_set(A,13,12,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); + gkyl_mat_set(A,13,13,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); + gkyl_mat_set(A,13,14,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); + gkyl_mat_set(A,13,15,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); + gkyl_mat_set(A,14,8,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); + gkyl_mat_set(A,14,9,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); + gkyl_mat_set(A,14,10,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); + gkyl_mat_set(A,14,11,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); + gkyl_mat_set(A,14,12,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); + gkyl_mat_set(A,14,13,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); + gkyl_mat_set(A,14,14,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); + gkyl_mat_set(A,14,15,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); + gkyl_mat_set(A,15,8,1.060660171779821*m0r[7]-0.3535533905932737*cEr[7]); + gkyl_mat_set(A,15,9,1.060660171779821*m0r[6]-0.3535533905932737*cEr[6]); + gkyl_mat_set(A,15,10,1.060660171779821*m0r[5]-0.3535533905932737*cEr[5]); + gkyl_mat_set(A,15,11,1.060660171779821*m0r[4]-0.3535533905932737*cEr[4]); + gkyl_mat_set(A,15,12,1.060660171779821*m0r[3]-0.3535533905932737*cEr[3]); + gkyl_mat_set(A,15,13,1.060660171779821*m0r[2]-0.3535533905932737*cEr[2]); + gkyl_mat_set(A,15,14,1.060660171779821*m0r[1]-0.3535533905932737*cEr[1]); + gkyl_mat_set(A,15,15,1.060660171779821*m0r[0]-0.3535533905932737*cEr[0]); } diff --git a/zero/dg_calc_pkpm_dist_vars.c b/zero/dg_calc_pkpm_dist_vars.c index 0d43960a4..d6c8eb53e 100644 --- a/zero/dg_calc_pkpm_dist_vars.c +++ b/zero/dg_calc_pkpm_dist_vars.c @@ -39,7 +39,7 @@ gkyl_dg_calc_pkpm_dist_vars_new(const struct gkyl_rect_grid *phase_grid, void gkyl_dg_calc_pkpm_dist_vars_mirror_force(struct gkyl_dg_calc_pkpm_dist_vars *up, const struct gkyl_range *conf_range, const struct gkyl_range *phase_range, - const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_vthsq, + const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_prim_moms_sum, const struct gkyl_array* div_b, const struct gkyl_array* pkpm_accel, const struct gkyl_array* fIn, const struct gkyl_array* F_k_p_1, struct gkyl_array* g_dist_source, struct gkyl_array* F_k_m_1) @@ -48,7 +48,7 @@ void gkyl_dg_calc_pkpm_dist_vars_mirror_force(struct gkyl_dg_calc_pkpm_dist_vars if (gkyl_array_is_cu_dev(g_dist_source)) { return gkyl_dg_calc_pkpm_dist_vars_mirror_force_cu(up, conf_range, phase_range, - pkpm_prim, nu_vthsq, div_b, pkpm_accel, + pkpm_prim, nu_prim_moms_sum, div_b, pkpm_accel, fIn, F_k_p_1, g_dist_source, F_k_m_1); } #endif @@ -63,7 +63,7 @@ void gkyl_dg_calc_pkpm_dist_vars_mirror_force(struct gkyl_dg_calc_pkpm_dist_vars long loc_phase = gkyl_range_idx(phase_range, iter.idx); const double *pkpm_prim_d = gkyl_array_cfetch(pkpm_prim, loc_conf); - const double *nu_vthsq_d = gkyl_array_cfetch(nu_vthsq, loc_conf); + const double *nu_prim_moms_sum_d = gkyl_array_cfetch(nu_prim_moms_sum, loc_conf); const double *div_b_d = gkyl_array_cfetch(div_b, loc_conf); const double *pkpm_accel_d = gkyl_array_cfetch(pkpm_accel, loc_conf); const double *fIn_d = gkyl_array_cfetch(fIn, loc_phase); @@ -73,7 +73,7 @@ void gkyl_dg_calc_pkpm_dist_vars_mirror_force(struct gkyl_dg_calc_pkpm_dist_vars double *F_k_m_1_d = gkyl_array_fetch(F_k_m_1, loc_phase); up->pkpm_dist_mirror_force(xc, up->phase_grid.dx, - pkpm_prim_d, nu_vthsq_d, div_b_d, pkpm_accel_d, + pkpm_prim_d, nu_prim_moms_sum_d, div_b_d, pkpm_accel_d, fIn_d, F_k_p_1_d, g_dist_source_d, F_k_m_1_d); } } diff --git a/zero/dg_calc_pkpm_dist_vars_cu.cu b/zero/dg_calc_pkpm_dist_vars_cu.cu index 39950d318..d6a4c65d3 100644 --- a/zero/dg_calc_pkpm_dist_vars_cu.cu +++ b/zero/dg_calc_pkpm_dist_vars_cu.cu @@ -16,7 +16,7 @@ extern "C" { __global__ void gkyl_dg_calc_pkpm_dist_vars_mirror_force_cu_kernel(struct gkyl_dg_calc_pkpm_dist_vars *up, struct gkyl_range conf_range, struct gkyl_range phase_range, - const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_vthsq, + const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_prim_moms_sum, const struct gkyl_array* div_b, const struct gkyl_array* pkpm_accel, const struct gkyl_array* fIn, const struct gkyl_array* F_k_p_1, struct gkyl_array* g_dist_source, struct gkyl_array* F_k_m_1) @@ -39,7 +39,7 @@ gkyl_dg_calc_pkpm_dist_vars_mirror_force_cu_kernel(struct gkyl_dg_calc_pkpm_dist long loc_phase = gkyl_range_idx(&phase_range, idx); const double *pkpm_prim_d = (const double*) gkyl_array_cfetch(pkpm_prim, loc_conf); - const double *nu_vthsq_d = (const double*) gkyl_array_cfetch(nu_vthsq, loc_conf); + const double *nu_prim_moms_sum_d = (const double*) gkyl_array_cfetch(nu_prim_moms_sum, loc_conf); const double *div_b_d = (const double*) gkyl_array_cfetch(div_b, loc_conf); const double *pkpm_accel_d = (const double*) gkyl_array_cfetch(pkpm_accel, loc_conf); const double *fIn_d = (const double*) gkyl_array_cfetch(fIn, loc_phase); @@ -49,7 +49,7 @@ gkyl_dg_calc_pkpm_dist_vars_mirror_force_cu_kernel(struct gkyl_dg_calc_pkpm_dist double *F_k_m_1_d = (double*) gkyl_array_fetch(F_k_m_1, loc_phase); up->pkpm_dist_mirror_force(xc, up->phase_grid.dx, - pkpm_prim_d, nu_vthsq_d, div_b_d, pkpm_accel_d, + pkpm_prim_d, nu_prim_moms_sum_d, div_b_d, pkpm_accel_d, fIn_d, F_k_p_1_d, g_dist_source_d, F_k_m_1_d); } } @@ -57,7 +57,7 @@ gkyl_dg_calc_pkpm_dist_vars_mirror_force_cu_kernel(struct gkyl_dg_calc_pkpm_dist void gkyl_dg_calc_pkpm_dist_vars_mirror_force_cu(struct gkyl_dg_calc_pkpm_dist_vars *up, const struct gkyl_range *conf_range, const struct gkyl_range *phase_range, - const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_vthsq, + const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_prim_moms_sum, const struct gkyl_array* div_b, const struct gkyl_array* pkpm_accel, const struct gkyl_array* fIn, const struct gkyl_array* F_k_p_1, struct gkyl_array* g_dist_source, struct gkyl_array* F_k_m_1) @@ -66,7 +66,7 @@ gkyl_dg_calc_pkpm_dist_vars_mirror_force_cu(struct gkyl_dg_calc_pkpm_dist_vars * int nthreads = phase_range->nthreads; gkyl_dg_calc_pkpm_dist_vars_mirror_force_cu_kernel<<>>(up->on_dev, *conf_range, *phase_range, - pkpm_prim->on_dev, nu_vthsq->on_dev, + pkpm_prim->on_dev, nu_prim_moms_sum->on_dev, div_b->on_dev, pkpm_accel->on_dev, fIn->on_dev, F_k_p_1->on_dev, g_dist_source->on_dev, F_k_m_1->on_dev); diff --git a/zero/dg_lbo_vlasov_pkpm_diff.c b/zero/dg_lbo_vlasov_pkpm_diff.c index b5de7d170..a879eba14 100644 --- a/zero/dg_lbo_vlasov_pkpm_diff.c +++ b/zero/dg_lbo_vlasov_pkpm_diff.c @@ -35,8 +35,8 @@ gkyl_lbo_vlasov_pkpm_diff_set_auxfields(const struct gkyl_dg_eqn *eqn, const str #endif struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); - lbo_vlasov_pkpm_diff->auxfields.nu = auxin.nu; - lbo_vlasov_pkpm_diff->auxfields.nuVtSq = auxin.nuVtSq; + lbo_vlasov_pkpm_diff->auxfields.nuSum = auxin.nuSum; + lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum = auxin.nuPrimMomsSum; } struct gkyl_dg_eqn* @@ -94,10 +94,11 @@ gkyl_dg_lbo_vlasov_pkpm_diff_new(const struct gkyl_basis* cbasis, const struct g assert(lbo_vlasov_pkpm_diff->surf); assert(lbo_vlasov_pkpm_diff->boundary_surf); - lbo_vlasov_pkpm_diff->auxfields.nu = 0; - lbo_vlasov_pkpm_diff->auxfields.nuVtSq = 0; + lbo_vlasov_pkpm_diff->auxfields.nuSum = 0; + lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum = 0; lbo_vlasov_pkpm_diff->conf_range = *conf_range; lbo_vlasov_pkpm_diff->vMaxSq = pow(pgrid->upper[cdim],2); + lbo_vlasov_pkpm_diff->num_cbasis = cbasis->num_basis; lbo_vlasov_pkpm_diff->eqn.flags = 0; GKYL_CLEAR_CU_ALLOC(lbo_vlasov_pkpm_diff->eqn.flags); diff --git a/zero/dg_lbo_vlasov_pkpm_diff_cu.cu b/zero/dg_lbo_vlasov_pkpm_diff_cu.cu index 1d52ac684..5054df5cf 100644 --- a/zero/dg_lbo_vlasov_pkpm_diff_cu.cu +++ b/zero/dg_lbo_vlasov_pkpm_diff_cu.cu @@ -12,22 +12,22 @@ extern "C" { // "Choose Kernel" based on cdim and polyorder #define CK(lst,cdim,poly_order) lst[cdim-1].kernels[poly_order] -// CUDA kernel to set pointer to nu*vt^2 (collision frequency * thermal velocity squared) +// CUDA kernel to set pointer to nuSum and nuPrimMomsSum (collision frequency * primitive moments) // This is required because eqn object lives on device, // and so its members cannot be modified without a full __global__ kernel on device. __global__ static void -gkyl_lbo_vlasov_pkpm_diff_set_auxfields_cu_kernel(const struct gkyl_dg_eqn *eqn, const struct gkyl_array *nu, const struct gkyl_array *nuVtSq) +gkyl_lbo_vlasov_pkpm_diff_set_auxfields_cu_kernel(const struct gkyl_dg_eqn *eqn, const struct gkyl_array *nuSum, const struct gkyl_array *nuPrimMomsSum) { struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); - lbo_vlasov_pkpm_diff->auxfields.nu = nu; - lbo_vlasov_pkpm_diff->auxfields.nuVtSq = nuVtSq; + lbo_vlasov_pkpm_diff->auxfields.nuSum = nuSum; + lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum = nuPrimMomsSum; } -//// Host-side wrapper for device kernels setting nuVtSq. +// Host-side wrapper for device kernels setting nuSum and nuPrimMomsSum. void gkyl_lbo_vlasov_pkpm_diff_set_auxfields_cu(const struct gkyl_dg_eqn *eqn, struct gkyl_dg_lbo_vlasov_pkpm_diff_auxfields auxin) { - gkyl_lbo_vlasov_pkpm_diff_set_auxfields_cu_kernel<<<1,1>>>(eqn, auxin.nu->on_dev, auxin.nuVtSq->on_dev); + gkyl_lbo_vlasov_pkpm_diff_set_auxfields_cu_kernel<<<1,1>>>(eqn, auxin.nuSum->on_dev, auxin.nuPrimMomsSum->on_dev); } // CUDA kernel to set device pointers to range object and Vlasov PKPM LBO diffusion kernel function @@ -36,8 +36,8 @@ __global__ static void dg_lbo_vlasov_pkpm_diff_set_cu_dev_ptrs(struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff, enum gkyl_basis_type b_type, int cdim, int poly_order) { - lbo_vlasov_pkpm_diff->auxfields.nu = 0; - lbo_vlasov_pkpm_diff->auxfields.nuVtSq = 0; + lbo_vlasov_pkpm_diff->auxfields.nuSum = 0; + lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum = 0; lbo_vlasov_pkpm_diff->eqn.surf_term = surf; lbo_vlasov_pkpm_diff->eqn.boundary_surf_term = boundary_surf; @@ -89,6 +89,7 @@ gkyl_dg_lbo_vlasov_pkpm_diff_cu_dev_new(const struct gkyl_basis* cbasis, const s lbo_vlasov_pkpm_diff->eqn.num_equations = 2; lbo_vlasov_pkpm_diff->conf_range = *conf_range; lbo_vlasov_pkpm_diff->vMaxSq = pow(pgrid->upper[cdim],2); + lbo_vlasov_pkpm_diff->num_cbasis = cbasis->num_basis; lbo_vlasov_pkpm_diff->eqn.flags = 0; GKYL_SET_CU_ALLOC(lbo_vlasov_pkpm_diff->eqn.flags); diff --git a/zero/dg_lbo_vlasov_pkpm_drag.c b/zero/dg_lbo_vlasov_pkpm_drag.c index c59e28185..9a7a0986c 100644 --- a/zero/dg_lbo_vlasov_pkpm_drag.c +++ b/zero/dg_lbo_vlasov_pkpm_drag.c @@ -35,8 +35,8 @@ gkyl_lbo_vlasov_pkpm_drag_set_auxfields(const struct gkyl_dg_eqn *eqn, const str #endif struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); - lbo_vlasov_pkpm_drag->auxfields.nu = auxin.nu; - lbo_vlasov_pkpm_drag->auxfields.nuVtSq = auxin.nuVtSq; + lbo_vlasov_pkpm_drag->auxfields.nuSum = auxin.nuSum; + lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum = auxin.nuPrimMomsSum; } struct gkyl_dg_eqn* @@ -94,10 +94,11 @@ gkyl_dg_lbo_vlasov_pkpm_drag_new(const struct gkyl_basis* cbasis, const struct g assert(lbo_vlasov_pkpm_drag->surf); assert(lbo_vlasov_pkpm_drag->boundary_surf); - lbo_vlasov_pkpm_drag->auxfields.nu = 0; - lbo_vlasov_pkpm_drag->auxfields.nuVtSq = 0; + lbo_vlasov_pkpm_drag->auxfields.nuSum = 0; + lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum = 0; lbo_vlasov_pkpm_drag->conf_range = *conf_range; lbo_vlasov_pkpm_drag->vMaxSq = pow(pgrid->upper[cdim],2); + lbo_vlasov_pkpm_drag->num_cbasis = cbasis->num_basis; lbo_vlasov_pkpm_drag->eqn.flags = 0; GKYL_CLEAR_CU_ALLOC(lbo_vlasov_pkpm_drag->eqn.flags); diff --git a/zero/dg_lbo_vlasov_pkpm_drag_cu.cu b/zero/dg_lbo_vlasov_pkpm_drag_cu.cu index e98cfa91a..951c7e8c7 100644 --- a/zero/dg_lbo_vlasov_pkpm_drag_cu.cu +++ b/zero/dg_lbo_vlasov_pkpm_drag_cu.cu @@ -12,23 +12,22 @@ extern "C" { // "Choose Kernel" based on cdim and polyorder #define CK(lst,cdim,poly_order) lst[cdim-1].kernels[poly_order] -// CUDA kernel to set pointer to nu (collisionality) +// CUDA kernel to set pointer to nuSum and nuPrimMomsSum (collision frequency * primitive moments) // This is required because eqn object lives on device, // and so its members cannot be modified without a full __global__ kernel on device. __global__ static void -gkyl_lbo_vlasov_pkpm_drag_set_auxfields_cu_kernel(const struct gkyl_dg_eqn *eqn, - const struct gkyl_array *nu, const struct gkyl_array *nuVtSq) +gkyl_lbo_vlasov_pkpm_drag_set_auxfields_cu_kernel(const struct gkyl_dg_eqn *eqn, const struct gkyl_array *nuSum, const struct gkyl_array *nuPrimMomsSum) { struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); - lbo_vlasov_pkpm_drag->auxfields.nu = nu; - lbo_vlasov_pkpm_drag->auxfields.nuVtSq = nuVtSq; + lbo_vlasov_pkpm_drag->auxfields.nuSum = nuSum; + lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum = nuPrimMomsSum; } -//// Host-side wrapper for device kernels setting nu. +// Host-side wrapper for device kernels setting nuSum and nuPrimMomsSum. void gkyl_lbo_vlasov_pkpm_drag_set_auxfields_cu(const struct gkyl_dg_eqn *eqn, struct gkyl_dg_lbo_vlasov_pkpm_drag_auxfields auxin) { - gkyl_lbo_vlasov_pkpm_drag_set_auxfields_cu_kernel<<<1,1>>>(eqn, auxin.nu->on_dev, auxin.nuVtSq->on_dev); + gkyl_lbo_vlasov_pkpm_drag_set_auxfields_cu_kernel<<<1,1>>>(eqn, auxin.nuSum->on_dev, auxin.nuPrimMomsSum->on_dev); } // CUDA kernel to set device pointers to range object and Vlasov PKPM LBO drag kernel function @@ -37,8 +36,8 @@ __global__ static void dg_lbo_vlasov_pkpm_drag_set_cu_dev_ptrs(struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag, enum gkyl_basis_type b_type, int cdim, int poly_order) { - lbo_vlasov_pkpm_drag->auxfields.nu = 0; - lbo_vlasov_pkpm_drag->auxfields.nuVtSq = 0; + lbo_vlasov_pkpm_drag->auxfields.nuSum = 0; + lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum = 0; lbo_vlasov_pkpm_drag->eqn.surf_term = surf; lbo_vlasov_pkpm_drag->eqn.boundary_surf_term = boundary_surf; diff --git a/zero/dg_updater_lbo_vlasov.c b/zero/dg_updater_lbo_vlasov.c index 1456bfe1d..041990174 100644 --- a/zero/dg_updater_lbo_vlasov.c +++ b/zero/dg_updater_lbo_vlasov.c @@ -60,9 +60,9 @@ gkyl_dg_updater_lbo_vlasov_advance(struct gkyl_dg_updater_collisions *lbo, // Set arrays needed if (lbo->model_id == GKYL_MODEL_PKPM) { gkyl_lbo_vlasov_pkpm_drag_set_auxfields(lbo->coll_drag, - (struct gkyl_dg_lbo_vlasov_pkpm_drag_auxfields) { .nu = nu_sum, .nuVtSq = nu_prim_moms }); + (struct gkyl_dg_lbo_vlasov_pkpm_drag_auxfields) { .nuSum = nu_sum, .nuPrimMomsSum = nu_prim_moms }); gkyl_lbo_vlasov_pkpm_diff_set_auxfields(lbo->coll_diff, - (struct gkyl_dg_lbo_vlasov_pkpm_diff_auxfields) { .nu = nu_sum, .nuVtSq = nu_prim_moms }); + (struct gkyl_dg_lbo_vlasov_pkpm_diff_auxfields) { .nuSum = nu_sum, .nuPrimMomsSum = nu_prim_moms }); } else { gkyl_lbo_vlasov_drag_set_auxfields(lbo->coll_drag, @@ -111,9 +111,9 @@ gkyl_dg_updater_lbo_vlasov_advance_cu(struct gkyl_dg_updater_collisions *lbo, // Set arrays needed if (lbo->model_id == GKYL_MODEL_PKPM) { gkyl_lbo_vlasov_pkpm_drag_set_auxfields(lbo->coll_drag, - (struct gkyl_dg_lbo_vlasov_pkpm_drag_auxfields) { .nu = nu_sum, .nuVtSq = nu_prim_moms }); + (struct gkyl_dg_lbo_vlasov_pkpm_drag_auxfields) { .nuSum = nu_sum, .nuPrimMomsSum = nu_prim_moms }); gkyl_lbo_vlasov_pkpm_diff_set_auxfields(lbo->coll_diff, - (struct gkyl_dg_lbo_vlasov_pkpm_diff_auxfields) { .nu = nu_sum, .nuVtSq = nu_prim_moms }); + (struct gkyl_dg_lbo_vlasov_pkpm_diff_auxfields) { .nuSum = nu_sum, .nuPrimMomsSum = nu_prim_moms }); } else { gkyl_lbo_vlasov_drag_set_auxfields(lbo->coll_drag, diff --git a/zero/gkyl_dg_calc_pkpm_dist_vars.h b/zero/gkyl_dg_calc_pkpm_dist_vars.h index 638ff14cb..5378288af 100644 --- a/zero/gkyl_dg_calc_pkpm_dist_vars.h +++ b/zero/gkyl_dg_calc_pkpm_dist_vars.h @@ -50,7 +50,7 @@ gkyl_dg_calc_pkpm_dist_vars_cu_dev_new(const struct gkyl_rect_grid *phase_grid, * @param phase_range Range to calculate mirror force distribution function * @param pkpm_prim Input array of primitive moments [ux, uy, uz, 1/rho div(p_par b), T_perp/m, m/T_perp] * This updater needs T_perp/m and m/T_perp - * @param nu_vthsq Input array of nu*vth^2 + * @param nu_prim_moms_sum Input array of nu*primitive moments, summed over self and cross collisions (needed for nu*vth^2) * @param div_b Input array of div(b) * @param pkpm_accel_vars Input arrary of pkpm acceleration variables ordered as: * 0: p_perp_div_b (p_perp/rho*div(b) = T_perp/m*div(b)) @@ -65,7 +65,7 @@ gkyl_dg_calc_pkpm_dist_vars_cu_dev_new(const struct gkyl_rect_grid *phase_grid, */ void gkyl_dg_calc_pkpm_dist_vars_mirror_force(struct gkyl_dg_calc_pkpm_dist_vars *up, const struct gkyl_range *conf_range, const struct gkyl_range *phase_range, - const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_vthsq, + const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_prim_moms_sum, const struct gkyl_array* div_b, const struct gkyl_array* pkpm_accel_vars, const struct gkyl_array* fIn, const struct gkyl_array* F_k_p_1, struct gkyl_array* g_dist_source, struct gkyl_array* F_k_m_1); @@ -101,7 +101,7 @@ void gkyl_dg_calc_pkpm_dist_vars_release(struct gkyl_dg_calc_pkpm_dist_vars *up) void gkyl_dg_calc_pkpm_dist_vars_mirror_force_cu(struct gkyl_dg_calc_pkpm_dist_vars *up, const struct gkyl_range *conf_range, const struct gkyl_range *phase_range, - const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_vthsq, + const struct gkyl_array* pkpm_prim, const struct gkyl_array* nu_prim_moms_sum, const struct gkyl_array* div_b, const struct gkyl_array* pkpm_accel_vars, const struct gkyl_array* fIn, const struct gkyl_array* F_k_p_1, struct gkyl_array* g_dist_source, struct gkyl_array* F_k_m_1); diff --git a/zero/gkyl_dg_calc_pkpm_dist_vars_priv.h b/zero/gkyl_dg_calc_pkpm_dist_vars_priv.h index ce21ccf6f..967d49f9d 100644 --- a/zero/gkyl_dg_calc_pkpm_dist_vars_priv.h +++ b/zero/gkyl_dg_calc_pkpm_dist_vars_priv.h @@ -11,7 +11,7 @@ #include typedef void (*pkpm_dist_mirror_force_t)(const double *w, const double *dxv, - const double *pkpm_prim, const double *nu_vthsq, + const double *pkpm_prim, const double *nu_prim_moms_sum, const double *div_b, const double *pkpm_accel_vars, const double *f, const double *F_k_p_1, double* GKYL_RESTRICT g_dist_source, double* GKYL_RESTRICT F_k_m_1); diff --git a/zero/gkyl_dg_lbo_vlasov_pkpm_diff.h b/zero/gkyl_dg_lbo_vlasov_pkpm_diff.h index 5bcdbb63f..ebc1d07e2 100644 --- a/zero/gkyl_dg_lbo_vlasov_pkpm_diff.h +++ b/zero/gkyl_dg_lbo_vlasov_pkpm_diff.h @@ -8,8 +8,8 @@ // Struct containing the pointers to auxiliary fields. struct gkyl_dg_lbo_vlasov_pkpm_diff_auxfields { - const struct gkyl_array *nu; - const struct gkyl_array *nuVtSq; + const struct gkyl_array *nuSum; + const struct gkyl_array *nuPrimMomsSum; }; /** diff --git a/zero/gkyl_dg_lbo_vlasov_pkpm_diff_priv.h b/zero/gkyl_dg_lbo_vlasov_pkpm_diff_priv.h index 7fce0a926..cc582efdd 100644 --- a/zero/gkyl_dg_lbo_vlasov_pkpm_diff_priv.h +++ b/zero/gkyl_dg_lbo_vlasov_pkpm_diff_priv.h @@ -6,10 +6,12 @@ // Types for various kernels typedef double (*lbo_vlasov_pkpm_diff_surf_t)(const double *w, const double *dxv, - const double *nuVtSq, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); + const double *nuSum, const double *nuPrimMomsSum, + const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); typedef double (*lbo_vlasov_pkpm_diff_boundary_surf_t)(const double *w, const double *dxv, - const double *nuVtSqSum, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out); + const double *nuSum, const double *nuPrimMomsSum, + const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out); // for use in kernel tables @@ -26,15 +28,16 @@ struct dg_lbo_vlasov_pkpm_diff { struct gkyl_range conf_range; // Configuration space range. struct gkyl_dg_lbo_vlasov_pkpm_diff_auxfields auxfields; // Auxiliary fields. double vMaxSq; + int num_cbasis; }; GKYL_CU_DH static inline bool checkPrimMomCross(struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff, - const double* nu_p, const double* nuVtSq_p) { + const double* nuSum_p, const double* nuVtSqSum_p) { bool noPrimMomCross = true; - noPrimMomCross = noPrimMomCross && ((nuVtSq_p[0]>0.) - && (nuVtSq_p[0]/nu_p[0] < lbo_vlasov_pkpm_diff->vMaxSq)); + noPrimMomCross = noPrimMomCross && ((nuVtSqSum_p[0]>0.) + && (nuVtSqSum_p[0]/nuSum_p[0] < lbo_vlasov_pkpm_diff->vMaxSq)); return noPrimMomCross; } @@ -51,11 +54,12 @@ kernel_lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1(const struct gkyl_dg_eqn *eqn, const struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_diff->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_diff->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1(xc, dx, nuVtSq_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_diff_vol_1x1v_ser_p1(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -69,11 +73,12 @@ kernel_lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2(const struct gkyl_dg_eqn *eqn, const struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_diff->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_diff->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2(xc, dx, nuVtSq_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_diff_vol_1x1v_ser_p2(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -87,11 +92,12 @@ kernel_lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2(const struct gkyl_dg_eqn *eqn, co struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_diff->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_diff->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2(xc, dx, nuVtSq_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_diff_vol_1x1v_tensor_p2(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -105,11 +111,12 @@ kernel_lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1(const struct gkyl_dg_eqn *eqn, const struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_diff->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_diff->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1(xc, dx, nuVtSq_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_diff_vol_2x1v_ser_p1(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -123,11 +130,12 @@ kernel_lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2(const struct gkyl_dg_eqn *eqn, co struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_diff->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_diff->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2(xc, dx, nuVtSq_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_diff_vol_2x1v_tensor_p2(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -141,11 +149,12 @@ kernel_lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1(const struct gkyl_dg_eqn *eqn, const struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_diff->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_diff->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1(xc, dx, nuVtSq_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_diff_vol_3x1v_ser_p1(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -231,12 +240,13 @@ surf(const struct gkyl_dg_eqn *eqn, struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_diff->conf_range, idxC); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_diff->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nuSum_p, nuVtSqSum_p); if ((dir >= lbo_vlasov_pkpm_diff->cdim) && (noPrimMomCross)) { return lbo_vlasov_pkpm_diff->surf(xcC, dxC, - nuVtSq_p, qInL, qInC, qInR, qRhsOut); + nuSum_p, nuPrimMomsSum_p, qInL, qInC, qInR, qRhsOut); } return 0.; } @@ -253,12 +263,13 @@ boundary_surf(const struct gkyl_dg_eqn *eqn, struct dg_lbo_vlasov_pkpm_diff *lbo_vlasov_pkpm_diff = container_of(eqn, struct dg_lbo_vlasov_pkpm_diff, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_diff->conf_range, idxSkin); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_diff->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_diff->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_diff, nuSum_p, nuVtSqSum_p); if ((dir >= lbo_vlasov_pkpm_diff->cdim) && (noPrimMomCross)) { return lbo_vlasov_pkpm_diff->boundary_surf(xcSkin, dxSkin, - nuVtSq_p, edge, qInSkin, qInEdge, qRhsOut); + nuSum_p, nuPrimMomsSum_p, edge, qInSkin, qInEdge, qRhsOut); } return 0.; } diff --git a/zero/gkyl_dg_lbo_vlasov_pkpm_drag.h b/zero/gkyl_dg_lbo_vlasov_pkpm_drag.h index edd890230..85edade37 100644 --- a/zero/gkyl_dg_lbo_vlasov_pkpm_drag.h +++ b/zero/gkyl_dg_lbo_vlasov_pkpm_drag.h @@ -8,14 +8,16 @@ // Struct containing the pointers to auxiliary fields. struct gkyl_dg_lbo_vlasov_pkpm_drag_auxfields { - const struct gkyl_array *nu; - const struct gkyl_array *nuVtSq; + const struct gkyl_array *nuSum; + const struct gkyl_array *nuPrimMomsSum; }; /** * Create a new LBO drag term equation object for Vlasov equation in * parallel-kinetic-perpendicular-moment (pkpm) model. - * Note that pkpm model is in local rest frame so drag term is only div_v(v f). + * Note that pkpm model is in local rest frame but drag term requires + * correction div((v - M1_corr)f) to insure momentum conservation and + * no spurious flow generation * * @param cbasis Configuration space basis functions * @param pbasis Phase-space basis functions diff --git a/zero/gkyl_dg_lbo_vlasov_pkpm_drag_priv.h b/zero/gkyl_dg_lbo_vlasov_pkpm_drag_priv.h index 9a38695c2..203465cd5 100644 --- a/zero/gkyl_dg_lbo_vlasov_pkpm_drag_priv.h +++ b/zero/gkyl_dg_lbo_vlasov_pkpm_drag_priv.h @@ -6,10 +6,12 @@ // Types for various kernels typedef double (*lbo_vlasov_pkpm_drag_surf_t)(const double *w, const double *dxv, - const double *nu, const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); + const double *nuSum, const double *nuPrimMomsSum, + const double *fl, const double *fc, const double *fr, double* GKYL_RESTRICT out); typedef double (*lbo_vlasov_pkpm_drag_boundary_surf_t)(const double *w, const double *dxv, - const double *nu, const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out); + const double *nuSum, const double *nuPrimMomsSum, + const int edge, const double *fSkin, const double *fEdge, double* GKYL_RESTRICT out); // for use in kernel tables typedef struct { vol_termf_t kernels[3]; } gkyl_dg_lbo_vlasov_pkpm_drag_vol_kern_list; @@ -25,15 +27,16 @@ struct dg_lbo_vlasov_pkpm_drag { struct gkyl_range conf_range; // Configuration space range. struct gkyl_dg_lbo_vlasov_pkpm_drag_auxfields auxfields; // Auxiliary fields. double vMaxSq; + int num_cbasis; }; GKYL_CU_DH static inline bool checkPrimMomCross(struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag, - const double* nu_p, const double* nuVtSq_p) { + const double* nuSum_p, const double* nuVtSqSum_p) { bool noPrimMomCross = true; - noPrimMomCross = noPrimMomCross && ((nuVtSq_p[0]>0.) - && (nuVtSq_p[0]/nu_p[0] < lbo_vlasov_pkpm_drag->vMaxSq)); + noPrimMomCross = noPrimMomCross && ((nuVtSqSum_p[0]>0.) + && (nuVtSqSum_p[0]/nuSum_p[0] < lbo_vlasov_pkpm_drag->vMaxSq)); return noPrimMomCross; } @@ -50,11 +53,12 @@ kernel_lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1(const struct gkyl_dg_eqn *eqn, const struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_drag->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_drag->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1(xc, dx, nu_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_drag_vol_1x1v_ser_p1(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -68,11 +72,12 @@ kernel_lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2(const struct gkyl_dg_eqn *eqn, const struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_drag->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_drag->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2(xc, dx, nu_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_drag_vol_1x1v_ser_p2(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -86,11 +91,12 @@ kernel_lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2(const struct gkyl_dg_eqn *eqn, co struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_drag->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_drag->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2(xc, dx, nu_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_drag_vol_1x1v_tensor_p2(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -104,11 +110,12 @@ kernel_lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1(const struct gkyl_dg_eqn *eqn, const struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_drag->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_drag->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1(xc, dx, nu_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_drag_vol_2x1v_ser_p1(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -122,11 +129,12 @@ kernel_lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2(const struct gkyl_dg_eqn *eqn, co struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_drag->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_drag->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2(xc, dx, nu_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_drag_vol_2x1v_tensor_p2(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -140,11 +148,12 @@ kernel_lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1(const struct gkyl_dg_eqn *eqn, const struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_drag->conf_range, idx); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_drag->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nuSum_p, nuVtSqSum_p); if (noPrimMomCross) { - return lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1(xc, dx, nu_p, qIn, qRhsOut); + return lbo_vlasov_pkpm_drag_vol_3x1v_ser_p1(xc, dx, nuSum_p, nuPrimMomsSum_p, qIn, qRhsOut); } else { return 0.; } @@ -231,12 +240,13 @@ surf(const struct gkyl_dg_eqn *eqn, struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_drag->conf_range, idxC); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_drag->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nuSum_p, nuVtSqSum_p); if ((dir >= lbo_vlasov_pkpm_drag->cdim) && (noPrimMomCross)) { return lbo_vlasov_pkpm_drag->surf(xcC, dxC, - nu_p, qInL, qInC, qInR, qRhsOut); + nuSum_p, nuPrimMomsSum_p, qInL, qInC, qInR, qRhsOut); } return 0.; } @@ -253,12 +263,13 @@ boundary_surf(const struct gkyl_dg_eqn *eqn, struct dg_lbo_vlasov_pkpm_drag *lbo_vlasov_pkpm_drag = container_of(eqn, struct dg_lbo_vlasov_pkpm_drag, eqn); long cidx = gkyl_range_idx(&lbo_vlasov_pkpm_drag->conf_range, idxSkin); - const double* nu_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nu, cidx); - const double* nuVtSq_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuVtSq, cidx); - bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nu_p, nuVtSq_p); + const double* nuSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuSum, cidx); + const double* nuPrimMomsSum_p = (const double*) gkyl_array_cfetch(lbo_vlasov_pkpm_drag->auxfields.nuPrimMomsSum, cidx); + const double* nuVtSqSum_p = &nuPrimMomsSum_p[lbo_vlasov_pkpm_drag->num_cbasis]; + bool noPrimMomCross = checkPrimMomCross(lbo_vlasov_pkpm_drag, nuSum_p, nuVtSqSum_p); if ((dir >= lbo_vlasov_pkpm_drag->cdim) && (noPrimMomCross)) { return lbo_vlasov_pkpm_drag->boundary_surf(xcSkin, dxSkin, - nu_p, edge, qInSkin, qInEdge, qRhsOut); + nuSum_p, nuPrimMomsSum_p, edge, qInSkin, qInEdge, qRhsOut); } return 0.; } diff --git a/zero/mom_bcorr_lbo_vlasov_pkpm.c b/zero/mom_bcorr_lbo_vlasov_pkpm.c index 1581f0362..1f91f100f 100644 --- a/zero/mom_bcorr_lbo_vlasov_pkpm.c +++ b/zero/mom_bcorr_lbo_vlasov_pkpm.c @@ -66,7 +66,7 @@ gkyl_mom_bcorr_lbo_vlasov_pkpm_new(const struct gkyl_basis* cbasis, const struct } mom_bcorr->momt.kernel = CK(mom_bcorr_lbo_vlasov_pkpm_kernels, cdim, poly_order); - mom_bcorr->momt.num_mom = 1; + mom_bcorr->momt.num_mom = 2; mom_bcorr->momt.flags = 0; GKYL_CLEAR_CU_ALLOC(mom_bcorr->momt.flags); diff --git a/zero/mom_bcorr_lbo_vlasov_pkpm_cu.cu b/zero/mom_bcorr_lbo_vlasov_pkpm_cu.cu index 1d0dc3655..ff961cab8 100644 --- a/zero/mom_bcorr_lbo_vlasov_pkpm_cu.cu +++ b/zero/mom_bcorr_lbo_vlasov_pkpm_cu.cu @@ -58,7 +58,7 @@ gkyl_mom_bcorr_lbo_vlasov_pkpm_cu_dev_new(const struct gkyl_basis* cbasis, const mom_bcorr->vBoundary[0] = vBoundary[0]; mom_bcorr->vBoundary[1] = vBoundary[1]; mom_bcorr->mass = mass; - mom_bcorr->momt.num_mom = 1; // number of moments + mom_bcorr->momt.num_mom = 2; // number of moments mom_bcorr->momt.flags = 0; GKYL_SET_CU_ALLOC(mom_bcorr->momt.flags); diff --git a/zero/mom_vlasov_pkpm.c b/zero/mom_vlasov_pkpm.c index 5f95dd43c..a9847fb9f 100644 --- a/zero/mom_vlasov_pkpm.c +++ b/zero/mom_vlasov_pkpm.c @@ -68,7 +68,7 @@ gkyl_mom_vlasov_pkpm_new(const struct gkyl_basis* cbasis, const struct gkyl_basi } else { mom_vlasov_pkpm->momt.kernel = CK(mom_vlasov_pkpm_kernels, cdim, poly_order); - mom_vlasov_pkpm->momt.num_mom = 3; // rho, p_par, p_perp + mom_vlasov_pkpm->momt.num_mom = 4; // rho, p_par, p_perp, M1 } mom_vlasov_pkpm->mass = mass; diff --git a/zero/mom_vlasov_pkpm_cu.cu b/zero/mom_vlasov_pkpm_cu.cu index b5b7190ee..6b5cac1ca 100644 --- a/zero/mom_vlasov_pkpm_cu.cu +++ b/zero/mom_vlasov_pkpm_cu.cu @@ -71,7 +71,7 @@ gkyl_mom_vlasov_pkpm_cu_dev_new(const struct gkyl_basis* cbasis, const struct gk if (diag) mom_vlasov_pkpm->momt.num_mom = 8; // rho, M1, p_par, p_perp, q_par, q_perp, r_parpar, r_parperp else - mom_vlasov_pkpm->momt.num_mom = 3; // rho, p_par, p_perp + mom_vlasov_pkpm->momt.num_mom = 4; // rho, p_par, p_perp, M1 mom_vlasov_pkpm->mass = mass; mom_vlasov_pkpm->momt.flags = 0; diff --git a/zero/prim_lbo_vlasov_pkpm.c b/zero/prim_lbo_vlasov_pkpm.c index 969a49743..8b6d20b48 100644 --- a/zero/prim_lbo_vlasov_pkpm.c +++ b/zero/prim_lbo_vlasov_pkpm.c @@ -40,8 +40,8 @@ gkyl_prim_lbo_vlasov_pkpm_new(const struct gkyl_basis* cbasis, prim_vlasov_pkpm->prim.num_phase = pbasis->num_basis; prim_vlasov_pkpm->prim.self_prim = self_prim; - // kinetic equation is in local rest frame, so no flow - prim_vlasov_pkpm->prim.udim = 0; + // kinetic equation is in local rest frame, so no flow, but still have a flow correction + prim_vlasov_pkpm->prim.udim = 1; // choose kernel tables based on basis-function type const gkyl_prim_lbo_vlasov_pkpm_self_kern_list *self_prim_kernels; diff --git a/zero/prim_lbo_vlasov_pkpm_cu.cu b/zero/prim_lbo_vlasov_pkpm_cu.cu index 676357577..57e00179c 100644 --- a/zero/prim_lbo_vlasov_pkpm_cu.cu +++ b/zero/prim_lbo_vlasov_pkpm_cu.cu @@ -55,7 +55,7 @@ gkyl_prim_lbo_vlasov_pkpm_cu_dev_new(const struct gkyl_basis* cbasis, int poly_order = prim_vlasov_pkpm->prim.poly_order = cbasis->poly_order; prim_vlasov_pkpm->prim.num_config = cbasis->num_basis; prim_vlasov_pkpm->prim.num_phase = pbasis->num_basis; - prim_vlasov_pkpm->prim.udim = 0; + prim_vlasov_pkpm->prim.udim = 1; prim_vlasov_pkpm->conf_range = *conf_range; From a1a160618f9238ddb804621935b4cec6874d4008 Mon Sep 17 00:00:00 2001 From: Junoravin Date: Sun, 10 Sep 2023 20:00:56 -0400 Subject: [PATCH 19/19] Fixing GPU build for corrected LBO in PKPM model --- zero/dg_lbo_vlasov_pkpm_diff.c | 2 +- zero/dg_lbo_vlasov_pkpm_drag.c | 2 +- zero/dg_lbo_vlasov_pkpm_drag_cu.cu | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zero/dg_lbo_vlasov_pkpm_diff.c b/zero/dg_lbo_vlasov_pkpm_diff.c index a879eba14..a961660f0 100644 --- a/zero/dg_lbo_vlasov_pkpm_diff.c +++ b/zero/dg_lbo_vlasov_pkpm_diff.c @@ -28,7 +28,7 @@ gkyl_lbo_vlasov_pkpm_diff_set_auxfields(const struct gkyl_dg_eqn *eqn, const str { #ifdef GKYL_HAVE_CUDA - if (gkyl_array_is_cu_dev(auxin.nu) && gkyl_array_is_cu_dev(auxin.nuVtSq)) { + if (gkyl_array_is_cu_dev(auxin.nuSum) && gkyl_array_is_cu_dev(auxin.nuPrimMomsSum)) { gkyl_lbo_vlasov_pkpm_diff_set_auxfields_cu(eqn->on_dev, auxin); return; } diff --git a/zero/dg_lbo_vlasov_pkpm_drag.c b/zero/dg_lbo_vlasov_pkpm_drag.c index 9a7a0986c..a10d5adb7 100644 --- a/zero/dg_lbo_vlasov_pkpm_drag.c +++ b/zero/dg_lbo_vlasov_pkpm_drag.c @@ -28,7 +28,7 @@ gkyl_lbo_vlasov_pkpm_drag_set_auxfields(const struct gkyl_dg_eqn *eqn, const str { #ifdef GKYL_HAVE_CUDA - if (gkyl_array_is_cu_dev(auxin.nu) && gkyl_array_is_cu_dev(auxin.nuVtSq)) { + if (gkyl_array_is_cu_dev(auxin.nuSum) && gkyl_array_is_cu_dev(auxin.nuPrimMomsSum)) { gkyl_lbo_vlasov_pkpm_drag_set_auxfields_cu(eqn->on_dev, auxin); return; } diff --git a/zero/dg_lbo_vlasov_pkpm_drag_cu.cu b/zero/dg_lbo_vlasov_pkpm_drag_cu.cu index 951c7e8c7..b99a94ee1 100644 --- a/zero/dg_lbo_vlasov_pkpm_drag_cu.cu +++ b/zero/dg_lbo_vlasov_pkpm_drag_cu.cu @@ -89,7 +89,8 @@ gkyl_dg_lbo_vlasov_pkpm_drag_cu_dev_new(const struct gkyl_basis* cbasis, const s lbo_vlasov_pkpm_drag->eqn.num_equations = 2; lbo_vlasov_pkpm_drag->conf_range = *conf_range; lbo_vlasov_pkpm_drag->vMaxSq = pow(pgrid->upper[cdim],2); - + lbo_vlasov_pkpm_drag->num_cbasis = cbasis->num_basis; + lbo_vlasov_pkpm_drag->eqn.flags = 0; GKYL_SET_CU_ALLOC(lbo_vlasov_pkpm_drag->eqn.flags); lbo_vlasov_pkpm_drag->eqn.ref_count = gkyl_ref_count_init(gkyl_lbo_vlasov_pkpm_drag_free);